text
stringlengths
2.85k
2.55M
label
class label
11 classes
PROC. OF THE 7th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2014) 43 Py3DFreeHandUS: a library for voxel-array reconstruction using Ultrasonography and attitude sensors Davide Monari∗† , Francesco Cenni† , Erwin Aertbeliën† , Kaat Desloovere† arXiv:1412.6391v1 [cs.CV] 19 Dec 2014 F Abstract—In medical imaging, there is a growing interest to provide real-time images with good quality for large anatomical structures. To cope with this issue, we developed a library that allows to replace, for some specific clinical applications, more robust systems such as Computer Tomography (CT) and Magnetic Resonance Imaging (MRI). Our python library Py3DFreeHandUS is a package for processing data acquired simultaneously by ultra-sonographic systems (US) and marker-based optoelectronic systems. In particular, US data enables to visualize subcutaneous body structures, whereas the optoelectronic system is able to collect the 3D position in space for reflective objects, that are called markers. By combining these two measurement devices, it is possible to reconstruct the real 3D morphology of body structures such as muscles, for relevant clinical implications. In the present research work, the different steps which allow to obtain a relevant 3D data set as well as the procedures for calibrating the systems and for determining the quality of the reconstruction. Index Terms—medical imaging, free-hand ultrasonography, optoelectronic systems, compounding 1 I NTRODUCTION In medical imaging, 3D data sets are an essential tool to explore anatomical volumes and to extract clinical features, which can describe a particular condition of the patient. These data are usually recorded by CT or MRI for identifying hard or soft tissue, respectively, and provide a high image quality together with a large field of view. On the other hand, these systems are very expensive (espacially MRI ones) and time consuming both for operators and patients. Plus, radioations from CT are an issue. Therefore, for some clinical applications, it could be interesting to replace these systems with others that can allow to provide 3D data sets quickly, although without the same high image quality. Ultrasonography (US) devices are systems largely used to collect medical images. For example, it is very common to examine pregnant women. This system, compared to other medical imaging systems, has several advantages: real-time images, portability, no ionizing radiation. However, one of the major drawbacks in US is the limited field of view and the lack of spatial information among different images acquired. Therefore a technique called 3D Freehand Ultrasound (3DUS) was originally proposed in the 90s [Rankin93], [Prager99] with the aim of reconstructing large 3D anatomical parts. The idea is to combine US images and the corresponding position and orientation (POS) of the US transducer; by simultaneously scanning a series of 2D images and recording spatial information it is possible to perform the relevant reconstruction and then the visualization of the entire volume acquired. The aim of the present work is to customize the 3DUS implementation by pushing on vectorization in NumPy / SciPy along with memory waste avoidance, for speeding up the processing phase as much as possible. These aspects are essential in this context, since for commodity hardware: i) memory resources are relatively limited and 3D volumes involved here can quickly reach large dimensions, ii) computation time can become unrealistic if very large for- or while- loops are used in Python. In addition the few existing applications for applying this technique have at least one of the following disadvantages: i) not open-source; ii) only supporting data streams from a limited number of US/POS sensors; iii) they are written in low-level languages such as C++, making rapid development and prototyping more difficult. We developed a pure Python library called Py3DFreeHandUS that solves all the above issues. 2 R EQUIREMENTS Py3DFreeHandUS was developed in Python 2.7 (Python 3 not yet supported), and uses the following libraries: • • • • • • • * Corresponding author: [email protected] † KULeuven c 2014 Davide Monari et al. This is an open-access artiCopyright ○ cle distributed under the terms of the Creative Commons Attribution License, which permits unrestricted use, distribution, and reproduction in any medium, provided the original author and source are credited. http://creativecommons.org/licenses/by/3.0/ • • NumPy SciPy (0.11.0+) matplotlib SymPy pydicom b-tk (Biomechanical ToolKit) [Barre14] VTK OpenCV (2.4.9+) Cython + gcc (optional, we are "cythonizing" bottlenecks but leaving pure Python implementation available) We used the Python distribution Python(x,y) for development and testing, since it already includes all libraries but b-tk. 44 3 PROC. OF THE 7th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2014) D ESCRIPTION OF THE PACKAGE The present package is able to process synchronized data by US and POS, being as input DICOM and C3D files, respectively. The operations flowchart is composed by: US probe temporal and spatial calibration and 3D voxel array reconstruction. 3.1 US probe temporal calibration The aim of the temporal calibration is to estimate the time delay between US and the POS devices. This procedure is foundamental whenever it is not possible to hardware-trigger US and POS devices, so data needs to be time-shifted later. Time delay resolution cannot be lower than the inverse of the lower frequency (normally US). Briefly, we moved vertically up and down the US probe (rigidly connected to the POS sensor) in a water-filled tank and generated two curves: the first one being the vertical coordinate of the the POS sensor, the second one being the vertical coordinate (in the US image) of the center of the line representing the edge between water and tank. These two sine-like signal were demeaned, normalized to be inside the range [-1,+1] and cross-correlated with the function matplotlib.pyplot.xcorr. The time of the first peak for the cross-correlation estimates the time delay. 3.2 US probe spatial calibration The probe spatial calibration is an essential procedure for image reconstruction which allows to determine the pose (position and orientation) of the US images with respect to the POS device. The corresponding results take the form of six parameters, three for position and three for orientation. The quality of this step mainly influences the reconstruction quality of the anatomical shape. To perform the probe calibration we used two different steps. First we applied an established procedure already published in the literature [Prager98] and later we tuned the results by using an image compounding algorithm [Wein08]. The established procedure was proposed by Prager et al. [Prager98] and improved by Hsu [Hsu06], with the idea of scanning the floor of a water tank by covering all the degrees of freedom (see Figure 1); this scanning modality produces clear and consistent edge lines (between water and tank bottom) in the US images (B-scans). All the pixels lying on the visible line in the B-scan should satisfy equations that come from the different spatial transformations, which leave to solve 11 identifiable parameters. Each B-scan can be used to write 2 equations. The overdetermined set of equations is solved using the Levenberg-Marquardt algorithm. We found that it is essential to move the US transducers following the sequence of movements suggested in [Prager98], in order to have reasonable results. The equation that a pixel with image coordinates (u, v) must satisfy (see [Prager98] for details) is as follows:     0 sx u 0     = C TT T TR R TP sy v, 0 0 1 1 Fig. 1: The aim of the US probe spatial calibration is to find the roto-translation matrix R TP from the image reference frame (P) to the transducer reference frame (R). The other two roto-translation matrices T TR and C TT (respectively, from transducer to optoelectronic system and from optoelectronic system to calibration phantom) are known for every time frame of the calibration acquisition. where sx and sy are conversion factors from pixel to mm. This is the code snippet for the equation creation: from sympy import Matrix, Symbol, var from sympy import cos as c, sin as s # Pp sx = Symbol(’sx’) sy = Symbol(’sy’) u = Symbol(’u’) v = Symbol(’v’) Pp = Matrix(([sx * u],\ [sy * v],\ [0],\ [1]\ )) # rTp rTp, syms = creatCalibMatrix() [x1, y1, z1, alpha1, beta1, gamma1] = syms # tTr tTr = MatrixOfMatrixSymbol(’tTr’, 4, 4) tTr[3, 0:4] = np.array([0,0,0,1]) # cTt x2 = Symbol(’x2’) y2 = Symbol(’y2’) z2 = Symbol(’z2’) alpha2 = Symbol(’alpha2’) beta2 = Symbol(’beta2’) gamma2 = Symbol(’gamma2’) cTt = Matrix(([c(alpha2)*c(beta2), ... [s(alpha2)*c(beta2), ... [-s(beta2), c(beta2)*s(gamma2), ... [0, 0, 0, 1]\ )) # see [Prager98] for full expressions # Calculate full equations Pc = cTt * tTr * rTp * Pp Pc = Pc[0:3,:] # Calculate full Jacobians x = Matrix([sx, sy, x1, y1, z1, alpha1, beta1, gamma1, x2, y2, z2, alpha2, beta2, gamma2]) J = Pc.jacobian(x) PY3DFREEHANDUS: A LIBRARY FOR VOXEL-ARRAY RECONSTRUCTION USING ULTRASONOGRAPHY AND ATTITUDE SENSORS 45 The equations system was solved by using the function scipy.optimize.root with method=’lm’. To validate the solution, the calibration part in this package allows to visualize the corresponding covariance matrix; this can be exploited to understand if some variable is not well constrained. In addition, since in each B-scan it is necessary to have the position for at least two pixels that belong to the edge line, we developed an automatic tool for extracting the corresponding lines in each image, based on the Hough transform: import cv2 # Threshold image maxVal = np.iinfo(I.dtype).max th, bw = cv2.threshold(I,np.round(thI*maxVal), maxVal,cv2.THRESH_BINARY) # Detect edges edges = cv2.Canny(bw,thCan1,thCan2, apertureSize=kerSizeCan) # Dilate edges kernel = np.ones(kerSizeDil,I.dtype) dilate = cv2.dilate(edges, kernel, iterations=1) # Find longest line lines = cv2.HoughLinesP(dilate,1,np.pi/180,thHou, minLineLength,maxLineGap) maxL = 0 if lines == None: a, b = np.nan, np.nan else: for x1,y1,x2,y2 in lines[0]: L = np.linalg.norm((x1-x2,y1-y2)) if L > maxL: maxL = L a = float(y1 - y2) / (x1 - x2) b = y1 - a * x1 # a, b being line parameters: y = a * x + b Since we experienced unsatisfactory calibration results (in terms of later reconstruction compounding) at this stage, we passed those through an image compounding algorithm which allows to achieve a good tuning. This is an image based method which uses as input 2 perpendicular sweeps, at approximately 90 degrees, for the same 3D volume [Wein08]. Briefly, a similarity measure (Normalized Cross Correlation, NCC) between the two sweeps was applied to maximize this measure with the final aim to find the calibration parameters relative to the best overlapping between the images. The initial values of this iterative method are the results of the equations-based approach. A calibration quality assessment was also implemented in terms of precision and accuracy of the calibration parameters obtained. Precision gives an indication of the dispersion of measures around their mean, whereas the accuracy gives an indication of the difference between the mean of the measures and the real value [Hsu06]. For example, this measure can be the known position of a point in space (Point accuracy) or the known dimension of an object (Distance accuracy). Fig. 2: V’ is the smallest 3D voxel array parallelepipedon able to contain all the US images. Others can be created, such as V, but they are bigger, occupy more memory and contain more empty voxels. The first step is to import the images (DICOM file, standard format for medical imaging) and the synchronized kinematics files (C3D format) containing pose data. A 3D voxel array is then initialized. The 3D voxel array (a parallelepipedon) should be the smallest one containing the sequence of all the repositioned scans, as seen in Figure 2, in order to avoid RAM waste. To face this issue, in the present package two options are presented: reorienting manually the global reference frame in order to be approximately aligned with the scan direction during the acquisition; on the other hand, by using the Principal Component Analysis (PCA), it is also possible to find the scan direction and thereby realigning the voxel array according to this direction. The grey values of the original pixels in the 2D slices are then copied in the new corresponding 3D position. This procedure is performed by using an algorithm called Pixel Nearest Neighbor (PNN) which runs through each pixel in every image and fills the nearest voxel with the value of that pixel; in case of multiple contributions to the same voxel, the values are averaged. Below the code to perform this is shown. Each 2D scan is positioned in the 3D volume in a vectorized way. # x, y, z: arrays for 3D coordinates of # the pixels in image I # idxV: unique ID for each voxel of the # 3D voxel array # V: 1D array containing grey values for the # 3D voxel-array # contV: 1D array containing current number of # contributions for voxels # I: 2D array containing US slice grey values 3.3 3D voxel array reconstruction The 3D reconstruction is performed by positioning the 2D US scans in the 3D space by using the corresponding pose. idxV = xyz2idx(x, y, z, xl, yl, zl).astype(np.int32) V[idxV] = (contV[idxV] * V[idxV]) / (contV[idxV] + 1) + I.ravel() / (contV[idxV] + 1) # iterative avg 46 PROC. OF THE 7th EUR. CONF. ON PYTHON IN SCIENCE (EUROSCIPY 2014) Fig. 4: Three transversal and one longitudinal section of a reconstructed 3D voxel array (human calf scanning, about 90M voxels, 10mm3 each). Fig. 3: Considering 2 US images consecutive in time, the convex hull is the smaller object able to contain them. An easier shape can be created, such as the parallelepipedon, but this is always bigger in volume. Only 2 outer loops exist, one for the DICOM file number and one for the scan number. After all the scans are correctly positioned in the 3D space, gaps can occur in the voxel array when the voxel size is small compared to the distance between the acquired images (e.g. scanning velocity significantly different from 0). Therefore interpolation methods are applied for filling these empty voxels. For optimizing this process, a robust method was also used, i.e. convex hull (see Figure 3), for restricting the gap filling operation only to the voxels contained between 2 consecutive slices: The quick-and-dirty way, known as VNN (Voxel Nearest Neighbour), consists of filling a gap by using the closest voxel having an assigned grey value. We also implemented another (average cube) solution which consist of the following steps: • Create a cube with side 3 voxels, centered around the gap; • Search the minimum percentage of non-gaps inside the cube (100% = number of voxels in the cube); • If that percentage is found, a non-gap voxels average (weighted by the Euclidean distances) is performed into the cube; • If that percentage is not found, the cube size in incremented by 2 voxels (e.g. 5); • If cube size is lesser or equal than a maximum size, start again from point 2. Otherwise, stop and don’t fill the gap. The entire voxel array can be subdivided in N parallelepipedal blocks, and the gap filling is performed on each one at a time, to spare some of the RAM. The bigger the number of blocks, the bigger the number of iterations to go, but the smaller the block size, the RAM used and the time spent per iteration. Finally, both the voxel array scans silhouette (previously created with the wrapping convex hulls) and the grey scale data voxel array are exported to VTI files, after being converted to vtk.vtkImageData. These can be opened with software like MeVisLab or Paraview for visualization and further processing. 3.4 Preliminary results The calibration quality assessments were 1.9 mm and 3.9 mm for the distance accuracy and reconstruction precision, respectively. The average data processing time (calibration + reconstruction + gap filling) over 3 trials on a human calf, shown in Figure 4, was 5.9 min, on a 16 GB RAM Intel i7 2.7 GHz machine. R EFERENCES [Prager99] Prager RW, Gee AH, Berman L. Stradx: Real-time acquisition and visualisation of freehand 3D ultrasound. Med Image Analysis 1999; 3(2):129-140. [Rankin93] Rankin, R. N., Fenster, A., Downey, D. B., Munk, P. L., Levin, M. F. and Vellet, A. D. (1993) Three-dimensional sonographic reconstruction: techniques and diagnostic applications. Am. J. Roentgenol., 161, 695-702. [Prager98] Prager, R. W., Rohling, R. N., Gee, A. H. and Berman, L. (1998) Rapid calibration for 3-D freehand ultrasound. Ultrasound Med. Biol., 24, 855-869. [Wein08] Wolfgang Wein and Ali Khamene. Image-Based Method for InVivo Freehand Ultrasound Calibration. Medical Imaging 2008: Ultrasonic Imaging and Signal Processing, edited by Stephen A. McAleavey, Jan D’hooge, Proc. of SPIE Vol. 6920, 69200K, (2008). [Hsu06] Po-Wei Hsu, Richard W. Prager, Andrew H. Gee, and Graham M. Treece. Rapid, easy and reliable calibration for freehand 3d ultrasound. Ultrasound in Med. & Biol., Vol. 32, No. 6, pp. 823835, 2006. [Barre14] Arnaud Barre, Stéphane Armand, Biomechanical ToolKit: Opensource framework to visualize and process biomechanical data, Computer Methods and Programs in Biomedicine, Volume 114, Issue 1, April 2014, Pages 80-87, ISSN 0169-2607.
5cs.CE
1 Anonymous Hedonic Game for Task Allocation in a Large-Scale Multiple Agent System arXiv:1711.06871v1 [cs.MA] 18 Nov 2017 Inmo Jang, Hyo-Sang Shin, and Antonios Tsourdos Abstract—This paper proposes a novel game-theoretical autonomous decision-making framework to address a task allocation problem for a swarm of multiple agents. We consider cooperation of self-interested agents and show that agents who have social inhibition can converge to a Nash stable partition (i.e., social agreement) using our proposed decentralised algorithm within polynomial time. The algorithm is simple and executable based on local interactions with neighbour agents under a strongly-connected communication network and even in asynchronous environments. We analytically present a mathematical formulation for computing the lower bound of a converged solution’s suboptimality and additionally show that 50 % of suboptimality can be minimally guaranteed if social utilities are non-decreasing functions with respect to the number of coworking agents. Through numerical experiments, it is confirmed that the proposed framework is scalable, fast adaptable against dynamical environments, and robust even in a realistic situation where some of the agents temporarily somehow do not operate during a mission. Index Terms—Distributed robot systems, Networked robots, Task allocation, Game theory, Self-organising systems subgroups to each task. In the problem, it is assumed that each agent can be assigned to at most one task, whereas each task may require multiple agents: this case falls into ST-MR (single-task robot and multi-robot task) category [10], [11]. According to [4], [5], [12]–[14], decision-making frameworks for such a large-scale multiple autonomous agent system should be • • • • I. I NTRODUCTION Cooperation of a large number of possibly small-sized robots, called robotic swarms, will play a significant role in complex missions that existing operational concepts using a few large robots could not deal with [1]. Even if every single robot (or called agent) in a swarm is incapable of accomplishing a task alone, their cooperation will lead to successful outcomes because the system is robust against failure or loss of some individual agents [2]–[5]. The possible applications include environmental monitoring [6], ad-hoc network relay [7], disaster management [8], cooperative radar jamming [9], to name a few. Due to the large cardinality of a swarm robot system, however, it is infeasible for human operators to supervise each of them directly, but needed to entrust the swarm with certain levels of decision-makings (e.g., task allocation, path planning, and individual control). Thereby, only remained is to provide a high-level mission description, which is manageable for a few or even a single human operator. Nevertheless, there still exist various challenges in the autonomous decision-making of robotic swarms. Amongst them, this paper mainly addresses a task allocation problem for a large-scale multiple agent system where the number of agents is higher than that of tasks: how to partition a set of agents into subgroups and assign the Inmo Jang, Hyo-Sang Shin, and Antonios Tsourdos are with Centre for Autonomous and Cyber-Physical Systems, Cranfield University, MK43 0AL, United Kingdom (e-mail: [email protected]; [email protected]; [email protected]). • • Decentralised: The desired collective behaviour can be achieved not by any central control unit but by allowing individual agents to locally make decisions based on local information or local interactions with neighbour agents. Scalable: The framework is operable for a wide range of the system size (e.g., the number of agents). Predictable: Human operators can estimate the quality of an outcome obtained by the framework such as its suboptimality. Preferably, a certain level of suboptimality should be minimally guaranteed. Flexible (or adaptable): The framework can quickly adapt to any dynamic environments such as elimination or addition of some agents or tasks. Robust in asynchronous environments : Due to the large cardinality of the system and its decentralisation, it is very challenging for all the given agents to execute decisionmaking procedures synchronously. For synchronisation in practice, “artificial delays and extra communication must be built into the framework” [14], which may cause considerable inefficiency on the system. Hence, the framework can be operable even under asynchronous environments. Able to accommodate different interests of agents: Individual agents may have different levels of interest. Such situations happen if the agents are “designed, owned, or operated by several individuals or organisations that may have different goals” [15]. In this paper, we propose a novel decision-making framework based on hedonic games [16]–[18], which model the task allocation problem considered as a coalition-formation game where self-interest agents are willing to form coalitions to improve their own interests. The objective of this game is to find a Nash stable partition, which is a social agreement where all the agents agree with the current task assignment. Despite any possible conflicts between the agents, this paper shows that if they have social inhibition, then a Nash stable partition can always be determined within polynomial times in the proposed framework and all the desirable characteristics mentioned above can be achieved. Furthermore, we analyse the lower bound of the outcome’s suboptimality and show that 50 2 % of suboptimality is minimally guaranteed for a particular case. Various settings of numerical experiments validate that the proposed framework is scalable, flexible, and robust even in asynchronous environments. This paper is organised as follows. Section II reviews existing literature on decentralised task allocation schemes for robotic swarms, and introduces a recent finding in hedonic game domains that inspires this study. Section III proposes a decision-making framework based on anonymous hedonic games, named GRAPE, and analytically proves the existence of and the polynomial-time convergence to a Nash stable partition. Section IV discusses the proposed framework’s algorithmic complexity (i.e., scalability), suboptimality, and adaptability. In Section V, we show that the framework can also address a task allocation problem in which each task may need a certain number of agents for completion. Numerical simulations in Section VI confirm that the proposed framework holds all the desirable characteristics. Finally, concluding remarks are followed in Section VII. II. R ELATED W ORK A. Decentralised Coordination of Robotic Swarms Existing approaches for task allocation problems can be categorised into two branches, depending on how agents eventually reach a converged outcome: orchestrated and (fully) selforganised approaches [19]. In the former, additional mechanism such as negotiation and voting model is imposed so that some agents can be worse off if a specific condition is met (e.g., the global utility is better off). Alternatively, in self-organised approaches, each agent simply makes a decision without negotiating with other agents. The latter generally induce less resource consumption in communication and computation [20], and hence they are preferable in terms of scalability. On the other hand, the former usually provide a better quality of solutions with respect to the global utility, and a certain level of suboptimality could be guaranteed [21]– [23]. A comparison result between them [20] presents that as the available information to agents becomes local, the latter becomes to outperform the former. In the following, we particularly review existing literature on self-organised approaches because, for large-scale multiple agent systems, scalability is a minimally essential feature and it is realistic to regard that the agents know not the global information but only each one’s local information. Self-organised approaches can be categorised into top-down approaches and bottom-up approaches according to which level (i.e., between an ensemble and individuals) are mainly focused on. Top-down approaches emphasise developing the macroscopic model for a whole system. For instances, population fractions associated with given tasks are represented as states, and the dynamics of the population fractions are modelled by Markov chains [12], [24]–[26] or differential equations [27]–[31]. Given a desired fraction distribution over the given tasks, agents can converge to the desired status by following local decision policies (e.g., the associated rows or columns of the current Markov matrix). One advantage of using top-down approaches is that, by simulation, a system’s emergent behaviour can be averagely predicted regarding convergence speed and the quality of a stable outcome (i.e., how well the agents converge to the desired fraction distribution) However, as top-down generated control policies regulate agents, it may be difficult to accommodate each agent’s individual preference. Also, each agent may have to physically move around according to its local policy during the entire decision-making process, and this fact may cause unnecessary time and energy costs for the transitioning. Bottom-up approaches focus on designing of a set of individual rules (i.e., microscopic models) for every agent that eventually lead to a certain emergent behaviour. Possible behaviours of a single agent can be modelled by a finite state machine [32], and change of behaviours occurs according to a probabilistic threshold model [33]. A threshold value in the model, which suggests the decision boundary between motion A to motion B, is adjustable based on an agent’s past experiences such as time spent for working a task [19], [34], the success/failure rates [32], [35], and direct communication from a central unit [33]. This feature can improve system adaptability, and may have a potential to incorporate each agent’s individual interest if required. However, it has been shown in [35]–[41] that, in order to predict or evaluate an emergent performance of a swarm utilising bottom-up approaches, a macroscopic model for the swarm eventually has to be developed by abstracting the microscopic models. B. Hedonic Games Hedonic games [16]–[18] model a conflict situation where self-interest agents are willing to form coalitions to improve their own interests. Nash stability [18], which is inspired by Nash equilibria in other game theories, plays a key role since it yields a social agreement amongst the agents even without having any negotiation between them. Many researchers have investigated conditions under which a Nash stable partition is guaranteed to exist and to be determined [18], [42]–[44]. Amongst them, the works in [43], [44] mainly addressed an anonymous hedonic game, in which each agent considers the size of a coalition to which it belongs instead of the identities of the members. Recently, Darmann [44] showed that selfish agents who have social inhibition (i.e., preference toward a coalition with a fewer number of members) could converge to a Nash stable partition in an anonymous hedonic game. The author also proposed a centralised recursive algorithm that can find a Nash stable partition within O(n2a · nt ) of iterations. Here, na is the number of agents and nt is that of tasks. C. Main Contributions Inspired by the recent breakthrough of [44], we propose a novel decentralised framework that models the task allocation problem considered as an anonymous hedonic game. The proposed framework is a self-organised approach in that agents make decisions according to its local policies (i.e., individual preferences). Unlike top-down or bottom-up approaches reviewed in the previous section, which primarily concentrate on designing agents’ decision-making policies either macroscopically or microscopically, our work instead focuses on investigating and exploiting advantages from socially-inhibitive 3 agents, while simply letting them greedily behave according to their individual preferences. Explicitly, the main contributions of this paper are as follows: 1) This paper shows that selfish agents with social inhibition, which we refer to as SPAO preference (Definition 4), can reach a Nash stable partition within less algorithmic complexity compared with [44]: O(n2a ) of iterations are required1 . 2) We provide a decentralised algorithm for each agent, which is executable under a strongly-connected communication network of agents and even in asynchronous environments. Depending on the network assumed, the algorithmic complexity may be additionally increased by O(dG ), where dG < na is the graph diameter of the network. 3) This paper analyses the suboptimality of a Nash-stable partition in term of the global utility. We firstly present a mathematical formulation to compute the suboptimality lower bound by using the information of a Nash stable partition and agents’ individual utilities. Furthermore, we additionally show that 50 % of the suboptimality can be at least guaranteed if the social utility for each coalition is defined as a non-decreasing function with respect to the number of members in the coalition. 4) Our framework can accommodate different agents with different interests as long as their individual preferences hold SPAO. 5) Through various numerical experiments, it is confirmed that the proposed framework is scalable, fast adaptable to environmental changes, and robust even in a realistic situation where some of agents are temporarily unable to proceed a decision-making procedure and communicate with other agents during a mission. III. GROUP AGENT PARTITIONING AND PLACING E VENT A. Problem Formulation Firstly, we introduce the multi-robot task allocation problem considered in this paper and underlying assumptions regarding agents and tasks. Problem 1. Suppose that there exist a set of na agents A = {a1 , a2 , ..., ana } and a set of tasks T = T ∗ ∪ {tφ }, where T ∗ = {t1 , t2 , ..., tnt } is a set of nt tasks and tφ is the void task (i.e., not to perform any task). Each agent ai has the individual utility ui : T × |A| → R, which is a function of the task to which the agent is assigned and the number of coworking agents for the task (including itself) p ∈ {1, 2, ..., na }. Since every agent is considered to have limited capabilities to finish a task alone, the agent can be assigned to at most one task. The objective of this task allocation problem is to find an assignment that maximises the global utility, i.e., the sum of individual utilities of the entire agents. The problem described above is defined as follows: X X max ui (tj , p)xij (1) {xij } ∀ai ∈A ∀tj ∈T 1 Note that the definition of iteration is described in Definition 5. This comparison assumes the fully-connected communication network because the algorithm in [44] is centralised. TABLE I N OMENCLATURE Symbol Description A ai T∗ tj tφ T (tj , p) X a set of na agents the i-th agent a set of nt tasks the j-th task the void task (i.e., not to work any task) a set of tasks, T = T ∗ ∪ {tφ } a task-coalition pair (i.e. to do task tj with p participants) the set of task-coalition pairs, X = X ∗ ∪ {tφ }, where X ∗ = T ∗ × {1, 2, ..., n} agent ai ’s preference relation over X the strong preference of agent ai the indifferent preference of agent ai the weak preference of agent ai a partition: a disjoint set that partitions the agent set A, Π = {S1 , S2 , ..., Sm , Sφ } the task-specific coalition for tj the index of the task to which agent ai is assigned given Π the graph diameter of the agent communication network Pi i ∼i i Π Sj Π(i) dG subject to X xij ≤ 1 ∀ai ∈ A (2) ∀tj ∈T xij ∈ {0, 1} ∀ai ∈ A, ∀tj ∈ T (3) where xij is a binary decision variable that indicates whether or not task tj is assigned to agent ai . This paper uses the term social utility to indicate the sum of total individual utilities within any agent group. Assumption 1 (Homogeneous agents with limited capabilities). This paper considers a large-scale multi-robot system that consists of physically homogeneous agents. This can be justified because the realisation of a swarm can be in general achieved through mass production [4]. Hence, each individual utility ui is concerned with not the combinations of the agents working for the task, but their cardinality. Despite that, it is worth noting that agents in this paper may have different preferences with respect to the given tasks (e.g., for an agent, a spatially closer task is more preferred, whereas this may not be the case for another agent). Besides, noting that “mass production favours robots with fewer and cheaper components, resulting in lower cost but also reduced capabilities [45]”, we also assume that each agent can be only assigned to perform at most a single task. According to [10], such a robot is called a single-task (ST) robot. Assumption 2 (Agents’ communication). The communication network of the entire agents is at least strongly-connected. Given a network, Ni denotes a set of neighbour agents for agent ai . Assumption 3 (Multi-robot-required tasks). Every task is a multi-robot (MR) task, meaning that the task can require multiple robots [10]. For now, we assume that each task can be performed even by a single agent although it may take a long 4 time. However, in Section V, we will also address a particular case in which some of the tasks need a certain number of agents for completion. Assumption 4 (Agents’ pre-known information). Every agent ai only knows its own individual utility ui (tj , p) with regard to every task tj , while not being aware of those of other agents. Through communication, however, they can notice which agent currently choses which task, i.e., partition (Definition 2). Note that the agents do not necessarily have to know the true partition information at all the time. Each agent owns its locally-known partition information. Remark 1 (An advantage of Nash stability: low communication burden on agents). The rationale for the use of Nash stability amongst various stable solution concepts in hedonic games [16], [46]–[48] is that it can reduce communication burden between agents required to reach an agreed assignment. In the process of converging to a Nash stable partition, an agent does not need to get any permission from other agents when it is willing to deviate. This property may not be the case for the other solution concepts. Therefore, each agent is only required to notify its altered decision without any negotiation with other agents. This fact can reduce communication burden between the agents for collective decision-making in the proposed approach. B. Proposed Game-theoretical Approach: GRAPE Let us transform Problem 1 into an anonymous hedonic game event where every agent selfishly tends to join a coalition according to its preference. Definition 1 (GRAPE). An instance of GRoup Agent Partitioning and placing Event (GRAPE) is a tuple (A, T , P) that consists of (1) A = {a1 , a2 , ..., ana }, a set of na agents; (2) T = T ∗ ∪ {tφ }, a set of tasks; and (3) P = (P1 , P2 , ..., Pna ), an na -tuple of preference relations of the agents. For agent ai , Pi describes its preference relation over the set of task-coalition pairs X = X ∗ ∪ {tφ }, where X ∗ = T ∗ × {1, 2, ..., na }; a task-coalition pair (tj , p) is interpreted as “to do task tj with p participants”. For any task-coalition pairs x1 , x2 ∈ X , x1 i x2 implies that agent ai strongly prefers x1 to x2 , and x1 ∼i x2 means that the preference regarding x1 and x2 is indifferent. Likewise, i indicates the weak preference of agent ai . Note that agent ai ’s preference relation can be derived from its individual utility ui (tj , p) in Problem 1. For instances, given that ui (t1 , p1 ) > ui (t2 , p2 ), it can be said that (t1 , p1 ) i (t2 , p2 ). Definition 2 (Partition). Given an instance (A, T , P) of GRAPE, a partition is defined as a set Π = {S1 , S2 , ..., Sm , Sφ } that disjointly partitions the agent set A. Here, Sj ⊆ A is the (task-specific) coalition for executing task tj such that ∪m j=0 Sj = A and Sj ∩ Sk = ∅ for j 6= k. Sφ is the set of agents who choose the void task tφ . Note that this paper interchangeably uses S0 to indicate Sφ . Given a partition Π, Π(i) indicates the index of the task to which agent ai is assigned. For examples, SΠ(i) is the coalition that the agent belongs to, i.e., SΠ(i) = {Sj ∈ Π | ai ∈ Sj }. The objective of GRAPE is to determine a stable partition that all the agents agree on. In this paper, we seek for a Nash stable partition, which is defined as follows: Definition 3 (Nash stable). A partition Π is said to be Nash stable if, for every agent ai ∈ A, it holds that (tΠ(i) , |SΠ(i) |) i (tj , |Sj ∪ {ai }|), ∀Sj ∈ Π. In other words, in a Nash stable partition, every agent prefers its current coalition to joining any of the other coalitions. Thus, every agent does not have any conflict within this partition, and no agent will not unilaterally deviate from its current decision. C. SPAO Preference: Social Inhibition This section introduces the key condition, called SPAO, that enables our proposed approach to provide all the desirable properties described in Section I, and then explains its implications. Definition 4 (SPAO). Given an instance (A, T , P) of GRAPE, it is said that the preference relation of agent ai with respect to task tj is SPAO (Single-Peaked-At-One) if it holds that, for every (tj , p) ∈ X ∗ , (tj , p1 ) i (tj , p2 ) for any p1 , p2 ∈ {1, ..., |A|} such that p1 < p2 . Besides, we say that an instance (A, T , P) of GRAPE is SPAO if the preference relation of every agent in A with respect to every task in T ∗ is SPAO. For an example, suppose that Pi is such that (t1 , 1) i (t1 , 2) i (t1 , 3) i (t2 , 1) ∼i (t1 , 4) i (t2 , 2). This preference relation indicates that agent ai has (t1 , 1) i (t1 , 2) i (t1 , 3) i (t1 , 4) for task t1 , and (t2 , 1) i (t2 , 2) for task t2 . According to Definition 4, the preference relation for each of the tasks holds SPAO. For another example, given that (t1 , 1) i (t1 , 2) i (t1 , 3) i (t2 , 2) ∼i (t1 , 4) i (t2 , 1), the preference relation regarding task t1 holds SPAO, whereas this is not the case for task t2 because of (t2 , 2) i (t2 , 1). This paper only considers the case in which every agent in an instance of GRAPE has SPAO preference relations regarding all the given tasks. In this case, it is said that the instance is SPAO, as mentioned in Definition 4. Agents under this condition prefer to execute a task with smaller number of collaborators, namely, they have social inhibition. Remark 2 (Implications of SPAO). SPAO implies that an agent’s individual utility should be a monotonically decreasing function with respect to the size of a task-specific coalition. In practice, SPAO can often emerge. For instance, experimental and simulation results in [49, Figures 3 and 4] show that the total work capacity resulted from a cooperation of multiple robots does not proportionally increase due to interferences of the robots. In such a non-superadditive environment [50], assuming that an agent’s individual work efficiency is considered as its individual utility, the individual utility monotonically drops as the number of collaborators enlarges even though 5 the social utility is increased. For another example, SPAO also arises when individual utilities are related with sharedresources. As more agents use the same resource simultaneously, their individual productivities become diminished (e.g., traffic affects travel times [51] [52, Example 3]). As the authors in [50] pointed out, a non-superadditive case is more realistic than a superadditive case: agents in a superadditive environment always attempt to form the grand coalition whereas those in a non-superadditive case are willing to reduce unnecessary costs. Note that social utility functions are not restricted so that they can be either monotonic or nonmonotonic. Remark 3 (Cooperation of selfish agents). The proposed framework can accommodate selfish agents who greedily follow their individual preferences as long as the preferences hold SPAO. This implies that the framework may be utilised for a combination of swarm systems from different organisations. D. Existence of and Convergence to a Nash Stable Partition Let us prove that if an instance of GRAPE holds SPAO, there always exists a Nash stable partition and it can be found within polynomial time. Definition 5 (Iteration). This paper uses the term iteration to represent an iterative stage in which an arbitrary-chosen agent compares the set of selectable task-coalition pairs given an existing partition, and then determines whether or not to join another coalition including the void task one. Assumption 5 (Mutual exclusion algorithm). We assume that, at each iteration, a single agent exclusively makes a decision and updates the partition Π if necessary. This paper refers to this agent as the deciding agent at the iteration. Based on the resultant partition, another deciding agent also performs the same process at the next iteration, and this process continues until every agent does not deviate from a specific partition, which is, in fact, a Nash stable partition. To implement this algorithmic process in practice, the agents need a mutual exclusion (or called mutex) algorithm to choose the deciding agent at each iteration. In this section, for simplicity of description, we assume that all the agents are fully-connected, by which they somehow select and know the deciding agent. However, in Section III-E, we will present a distributed mutex algorithm that enables the proposed approach to be executed under a strongly-connected communication network even in an asynchronous manner. as: ∆Π(i) := min{∆ | (tΠ(i) , |SΠ(i) | + ∆) i (tj , |Sj ∪ {ai }|), ∀Sj ∈ Π \ {SΠ(i) }, ∆ ∈ Z}. (4) Due to the SPAO preference relations, this value satisfies the following characteristics: (a) if Π is Nash stable, for every agent ai , it holds that ∆Π(i) ≥ 0; (b) if ∆Π(i) < 0, then agent ai is willing to deviate to the most preferred coalition at a next iteration; and (c) for the agent ai who deviated at the last iteration and updated the partition as Π0 , it holds that ∆Π0 (i) ≥ 0. From Definition 4, it is clear that the new instance (Ã, T , P) still holds SPAO. Let Π0 denote a Nash stable partition in the original instance (A, T , P). When a new agent ar ∈ / A decides to execute one of tasks in T and creates a new partition Π1 , it holds that ∆Π1 (r) ≥ 0, as shown in (c). If there is no existing agent aq ∈ A whose ∆Π1 (q) < 0, then the new partition Π1 is Nash stable. Suppose that there exists at least an agent aq whose ∆Π1 (q) < 0. Then, the agent must be one of members in the task-specific coalition that agent ar selected in the last iteration. As agent aq moves to another coalition and creates a new partition Π2 , for the previously-deviated agent ar , it holds that ∆Π2 (r) ≥ 1. In other words, an agent who deviates to a coalition and expels one of the existing agents in that coalition will not deviate again, even if another agent joins the coalition in a next iteration. This implies that at most |Ã| of iterations are required to hold ∆Π̃(i) ≥ 0 for every agent ai ∈ Ã, where the partition Π̃ is Nash stable. Lemma 1 is an essential property not only for the existence of and convergence to a Nash stable partition, but also for fast adaptability to dynamic environments. Theorem 1 (Existence). If (A, T , P) is an instance of GRAPE holding SPAO, then a Nash stable partition always exists. Lemma 1. Given an instance (A, T , P) of GRAPE that is SPAO, suppose that a new agent ar ∈ / A holding SPAO preference relations with regard to every task in T joins (A, T , P) in which a Nash stable partition is already established. Then, the new instance (Ã, T , P), where à = A ∪ {ar }, also (1) satisfies SPAO; (2) contains a Nash stable partition; and (3) the maximum number iterations required to re-converge to a Nash stable partition is |Ã|. Proof. This theorem will be proved by induction. Let M (n) be the following mathematical statement: For |A| = n, if an instance (A, T , P) of GRAPE is SPAO, then there exists a Nash stable partition. Base case : When n = 1, there is only one agent in an instance. This agent is allowed to participate in its most preferred coalition, and the resultant partition is Nash stable. Therefore, M (1) is true. Induction hypothesis : Assume that M (k) is true for a positive integer k such that |A| = k. Let Π denote a Nash stable partition in an instance (A, T , P). Induction step : Suppose that a new agent ai ∈ / A whose preference relation regarding every task in T is SPAO joins the instance (A, T , P). This induces a new instance (Ã, T , P) where à = A ∪ {ai } and |Ã| = k + 1. From Lemma 1, it is clear that the new instance also satisfies SPAO and has a Nash stable partition Π̃. Consequently, M (k + 1) is true. By mathematical induction, M (n) is true for all positive integers n ≥ 1. Proof. Given a partition Π, the number of agents that are additionally tolerated by agent ai to her coalition is defined Theorem 2 (Convergence). If (A, T , P) is an instance of GRAPE holding SPAO, then the number of iterations re- 6 quired to determine a Nash stable partition is at most |A| · (|A| + 1)/2. Proof. Suppose that, given a Nash stable partition in an instance where there exists only one agent, we add another arbitrary agent and find a Nash stable partition for this new instance, and repeat the procedure until all the agents in A are included. From Lemma 1, if a new agent joins an instance in which the current partition is Nash stable, then the maximum number of iterations required to find a new Nash stable partition is the number of the existing agents plus 1. Therefore, it is trivial that the maximum number of iterations to find a Nash stable partition of an instance (A, T , P) is given as |A| X k = |A| · (|A| + 1)/2. (5) k=1 Note that this is also the case even if the agents are initialised into a random partition. Suppose that we have the following setting: the entire agents A are firstly not movable from the existing partition, except a set of free agents A0 ⊆ A; whenever the agents A0 find a Nash stable partition Π0 , one arbitrary agent in ar ∈ A \ A0 additionally becomes liberated and deviates from the current coalition SΠ0 (r) to another coalition in Π0 . In this setting, for the viewpoint of the agents in A0 \SΠ0 (r) , the newly liberated agent is considered as a new agent as that in Lemma 1. Accordingly, we can still utilise Lemma 1 for the agents in A0 \ SΠ0 (r) ∪ {ar }. The agents also can find a Nash stable partition if one of them moves to SΠ0 (r) during the process, because, due to ar , it became ∆Π0 (i) ≥ 1 for every agent ai ∈ SΠ0 (r) \ {ar }. In a nutshell, the agents A ∪ {ar } can converge to a Nash stable partition within |A0 ∪{ar }|, as shown in Lemma 1, and hence Theorem 1 and this theorem are also valid for the case when the initial partition of the agents are randomly given. E. Decentralised Algorithm In the previous section, it is assumed that only one agent is somehow chosen to make a decision at each iteration. On the contrary, in this section, we propose a decentralised algorithm, as shown in Algorithm 1, in which every agent does decision making and affects its neighbour agents simultaneously. Despite that, we show that the agents can converge to a Nash stable partition thanks to our proposed distributed mutex subroutine shown in Algorithm 2. The details of the decentralised main algorithm are as follows. Each agent ai has local variables such as Πi , satisfied, i r , and si (Line 1–2). Here, Πi is the agent’s locally-known partition; satisfied is a binary variable that indicates whether or not the agent satisfies with Πi ; ri ∈ Z+ is an integer variable to represent how many times Πi has evolved (i.e., the number of iterations happened for updating Πi until that moment); and si ∈ [0, 1] is a uniform-random variable that is generated when Πi is newly updated (i.e., a random time stamp). Given Πi , agent ai examines which coalition is the most preferred amongst others, assuming that other agents remain at the existing partition (Line 5). Then, the agent joins the newly found coalition if it is strongly preferred than the existing Algorithm 1 Decision-making algorithm for each agent ai // Initialisation 1: satisfied ← f alse; r i ← 0; si ← 0 2: Πi ← {Sφ = A, Sj = φ ∀tj ∈ T } // Decision-making process begins 3: while true do // Make a new decision if necessary 4: if satisfied = f alse then 5: (tj∗ , |Sj∗ |) ← arg max∀Sj ∈Πi (tj , |Sj ∪ {ai }|) 6: if (tj∗ , |Sj∗ |) i (tΠi (i) , |SΠi (i) |) then 7: Join Sj∗ and update Πi 8: ri ← ri + 1 9: si ∈ unif[0, 1] 10: end if 11: satisfied = true 12: end if // Broadcast the local information to neighbour agents 13: Broadcast M i = {ri , si , Πi } and receive M k from its neighbours ∀ak ∈ Ni // Select the valid partition from all the received messages 14: Construct Mircv = {M i , ∀M k } 15: {ri , si , Πi }, satisfied ← D-M UTEX(Mircv ) 16: end while coalition. In this case, the agent updates Πi to reflect its new decision, increases ri , and generates a new random time stamp si (Line 6–10). In any case, since the agent ascertained that the currently-selected coalition is the most preferred, the agent becomes satisfied with Πi (Line 11). Then, agent ai generates a message M i := {ri , si , Πi } and sends it to other neighbour agents, and vice versa (Line 13). Since every agent locally updates its locally-known partition simultaneously, one of the partitions should be regarded as if it were the partition updated by a deciding agent at the previous iteration. We refer to this partition as the valid partition at the iteration. The distributed mutex subroutine in Algorithm 2) enables the agents to recognise the valid partition amongst all the locally-known current partitions Πi ∀i even under a strongly-connected network and in asynchronous environments. Before executing this subroutine, each agent ai collects all the messages received from its neighbour agents in Ni (including M i ) as Mircv = {M i , ∀M k }, where k : ak ∈ Ni . Using this message set, the agent examines whether or not its own partition Πi is valid. If there exists any other partition Πk such that rk > ri , then the agent considers Πk more valid than Πi . This also happens if sk > si and rk = ri . Since Πk is considered as more valid, agent ai needs to re-examine if there is a more preferred coalition given Πk in the next iteration. Thus, the agent sets satisfied as f alse. (Line 3–10 in Algorithm 2). After that, depending on satisfied, each agent proceeds the decision-making process again (i.e., Line 4–12 in Algorithm 1) and/or just broadcasts the existing locally-known partition to its neighbour agents (Line 13 in Algorithm 1). In a nutshell, the distributed mutex algorithm makes sure that there is only one valid partition that dominates (or will finally dominate depending on the communication network) any other partitions. In other words, regardless of the status 7 Algorithm 2 Distributed Mutex Subroutine 1: function D-M UTEX (Mircv ) 2: satisfied ← true 3: for each message Mk ∈ Mircv do 4: if (ri < rk ) or (ri = ri & si < sk ) then 5: ri ← rk 6: si ← sk 7: Πi ← Πk 8: satisfied ← f alse 9: end if 10: end for 11: return {ri , si , Πi }, satisfied 12: end function of the communication network and synchronisation amongst agents, multiple partitions locally evolve and some of them only eventually can survive at every main loop of Algorithm 1. In an extreme case, we may encounter multiple Nash stable partitions in the very last (i.e., at n2a /2 of iterations as shown in Theorem 2). Nevertheless, thanks to the mutex algorithm, one of them can be distributedly selected by the agents. This implies that agents using Algorithm 1 can find a Nash stable partition in a decentralised manner. IV. A NALYSIS Remark 4 (The number of required iterations in practice). Algorithm 1 allows the entire agents in A to involve the decision-making process, whereas, in the proof for Theorem 2, a new agent can be involved after a Nash stable partition of existing agents is found. Since agents using Algorithm 1 do not need to find every Nash stable partition for each subset of the agents, unnecessary iterations can be reduced. Hence, the number of required iterations in practice may become less than that shown in Theorem 2, which is also supported by the experimental results in Section VI. B. Suboptimality This section investigates the suboptimality lower bound (or can be called approximation ratio) of the proposed framework in terms of the global utility, i.e., the objective function in Equation (1). Given a partition Π, the global utility value can be equivalently rewritten as X ui (tΠ(i) , |SΠ(i) |). (6) J= ∀ai ∈A Note that we can simply derive {xij } for Equation (1) from Π for Equation (6), and vice versa. Let JGRAP E and JOP T represent the global utility of a Nash stable partition obtained by the proposed framework and the optimal value, respectively. This paper refers to the fraction of JGRAP E with respect to JOP T as the suboptimality of GRAPE, denoted by α, i.e., A. Algorithmic Complexity (Scalability) Firstly, let us discuss about the running time for the proposed framework to find a Nash stable partition. This paper refers to a unit time required for each agent to proceed the main loop of Algorithm 1 (Line 4-15) as a time step. Depending on the communication network considered, especially if it is not fully-connected, it may be possible that all the given agents have to execute this loop to just propagate the valid partition information over the agents without affecting ri as Line 8. Because this process also spends a unit time step, we call it as dummy iteration to distinguish from a (normal) iteration, which increases ri . Notice that such dummy iterations only sequentially happen at most dG times before a normal iteration occurs, where dG is the graph diameter of the communication network. Hence, thanks to Theorem 2, the total required time steps until finding a Nash stable partition is O(dG n2a ). For the fully-connected network case, it becomes O(n2a ) because of dG = 1. Note that this algorithmic complexity is less than that of the centralised algorithm, i.e., O(n2a · nt ), in [44]. Every agent at each iteration investigates nt + 1 of selectable task-coalition pairs including (tφ , Sφ ) given a locallyknown valid partition (as shown in Line 5 in Algorithm 1). Therefore, the computational overhead for an agent is O(nt ) per iteration. With consideration of the total required time steps, the running time of the proposed approach for an agent can be bounded by O(dG nt n2a ). Note that the running time in practice can be much less than the bound since Theorem 2 was conservatively analysed, as described in the following remark. α := JGRAP E /JOP T . (7) The lower bound of the suboptimality can be determined by the following theorem. Theorem 3 (Suboptimality lower bound: general case). Given a Nash stable partition Π obtained by GRAPE, its suboptimality in terms of the global utility is lower bounded as follows: α ≥ JGRAP E /(JGRAP E + λ), (8) where λ≡ X ∀Sj ∈Π max ai ∈A,p≤|A|    p· ui (tj , p)−ui (tj , |Sj ∪{ai }|) (9) Proof. Let Π∗ denote the optimal partition for the objective function in Equation (6). Given a Nash stable partition Π, from Definition 3, it holds that ∀ai ∈ A ui (tΠ(i) , |SΠ(i) |) ≥ ui (t∗j←i , |Sj ∪ {ai }|), (10) where t∗j←i indicates task tj ∈ T to which agent ai should have joined according to the optimal partition Π∗ ; and Sj ∈ Π is the coalition for task tj whose participants follow the Nash stable partition Π. The right-hand side of the inequality in Equation (10) can be rewritten as ui (t∗j←i , |Sj ∪ {ai }|) = ui (t∗j←i , |Sj∗ |)−  ui (t∗j←i , |Sj∗ |) − ui (t∗j←i , |Sj ∪ {ai }|) , (11) where Sj∗ ∈ Π∗ is the ideal coalition of task t∗j←i that maximises the objective function. 8 By summing the individual utilities of all the agents, the inequality in Equation (10) can be said that X ui (tΠ (i), |SΠ (i)|) ∀ai ∈A X ≥ ∀ai ∈A ui (t∗j←i , |Sj∗ |) ∀ai ∈A X − {ui (t∗j←i , |Sj∗ |) − ui (t∗j←i , |Sj ∪ {ai }|)}. ∀ai ∈A (12) The left-hand side of the inequality in Equation (12) represents the objective function value of the Nash stable partition Π, i.e., JGRAP E , and the first term of the right-hand side is the optimal objective function value, i.e., JOP T . The second term in the right-hand side can be interpreted as the summation of the utility lost of each agent caused by the belated decision to its optimal task, provided that other agents still follow the Nash stable partition. The upper bound of the second term is given by |T \{tφ }| X |Sj∗ | j=1 · max {ui (t∗j←i , |Sj∗ |) ai ∈Sj∗ − ui (t∗j←i , |Sj ∪ {ai }|)}. (13) This is at most X ∀Sj ∈Π max ai ∈A,p≤|A| Lij [p] ≡ λ, (14) where Lij [p] = p · (ui (tj , p) − ui (tj , |Sj ∪ {ai }|)). Hence, the inequality in Eqn (12) can be rewritten as JGRAP E ≥ JOP T − λ. Dividing the both sides by JGRAP E and rearranging them yield the suboptimality lower bound of the Nash stable partition, as given by Equation (8). Although Theorem 3 does not provide a fixed-value lower bound, it can be determined as long as a Nash stable partition and agents’ individual utility functions are given. Nevertheless, as a special case, if the social utility for any coalition is non-decreasing (or monotonically increasing) in terms of the number of co-working agents, then we can obtain a fixed-value lower bound for the suboptimality of a Nash stable partition. Theorem 4 (Suboptimality lower bound: a special case). Given an instance (A, T , P) of GRAPE, if (i) the social utility for any coalition is non-decreasing with regard to the number of participants, i.e., for any Sj ⊆ A and al ∈ A \ Sj , it holds that X X ui (tj , |Sj |) ≤ ui (tj , |Sj ∪ {al }|), ∀ai ∈Sj Proof. Firstly, we introduce some definitions and notations that facilitate to describe this proof. Given a partition Π of an instance (A, T , P), the global utility is denoted by X V (Π) := ui (tΠ(i) , |SΠ(i) |). (15) ∀ai ∈Sj ∪{al } and (ii) all the individual utilities can derive SPAO preference relations, then a Nash stable partition Π obtained by GRAPE guarantees to provide 50% of suboptimality in terms of the global utility. We use the operator ⊕ as follows. Given any two partitions ΠA = {S0A , ..., SnAt } and ΠB = {S0B , ..., SnBt }, ΠA ⊕ ΠB := {S0A ∪ S0B , S1A ∪ S1B , ..., SnAt ∪ SnBt }. A Note that, in this proof, we consider that ∪m = j=0 Sj m B ∪j=0 Sj = A. Thus, there may exist the same agent ai even in two different coalitions in ΠA ⊕ ΠB . For instance, suppose that ΠA = {{a1 }, {a2 }, {a3 }} and ΠB = {∅, {a1 , a3 }, {a2 }}. Then, ΠA ⊕ ΠB = {{a1 }, {a1 , a2 , a3 }, {a2 , a3 }}. We regard such an agent as two different agents in ΠA ⊕ΠB . Accordingly, the operation ⊕ may increase the number of total agents in the resultant partition. Using the definitions described above, the condition (i) implies that V (ΠA ) ≤ V (ΠA ⊕ ΠB ). (16) From now on, we will show that 21 V (Π∗ ) ≤ V (Π̂), where Π∗ = {S0∗ , S1∗ , ..., Sn∗t } is an optimal partition and Π̂ = {Ŝ0 , Ŝ1 , ..., Ŝnt } is a Nash stable partition. By doing so, this theorem can be proved. From the definition in Equation (15), it can be said that X ∗ V (Π̂ ⊕ Π∗ ) = ui (tΠ̂(i) , |ŜΠ̂(i) ∪ SΠ̂(i) |) ∀ai ∈A X + ∗ ui (tΠ∗ (i) , |ŜΠ∗ (i) ∪ SΠ ∗ (i) |), (17) ∀ai ∈A− − where A is the set of agents whose decisions follow not the Nash stable partition Π̂ but the optimal partition Π∗ . Due to the condition (ii), the first term of the right-hand side in Equation (17) is no more than X ui (tΠ̂(i) , |ŜΠ̂(i) |) ≡ V (Π̂). (18) ∀ai ∈A Likewise, the second term is also at most X ui (tΠ∗ (i) , |ŜΠ∗ (i) ∪ {ai }|). (19) ∀ai ∈A− By the definition of Nash stability (i.e., for every agent ai ∈ A, ui (tΠ̂(i) , |ŜΠ̂(i) |) ≥ ui (tj , |Ŝj ∪ {ai }|), ∀Ŝj ∈ Π̂), the above equation is at most X ui (tΠ̂(i) , |ŜΠ̂(i) |), (20) ∀ai ∈A− which is also no more than, because of A− ⊆ A, X ui (tΠ̂(i) , |ŜΠ̂(i) |) ≡ V (Π̂). (21) ∀ai ∈A In a nutshell, the left-hand side of Equation (17) holds the following inequality: V (Π̂ ⊕ Π∗ ) ≤ 2V (Π̂). Thanks to Equation (16), it follows that V (Π∗ ) ≤ V (Π̂ ⊕ Π∗ ). Therefore, V (Π∗ ) ≤ 2V (Π̂), which completes this proof. (22) 9 C. Adaptability Our proposed framework is also expected to be adaptable in dynamic environments, owing to its fast convergence to a Nash stable partition. Thanks to Lemma 1, if a new agent additionally joins an ongoing mission in which an agreed assignment was already determined, the number of iterations required for converging to a new Nash stable partition is at most the number of the total agents. Responding to any environmental change, the framework is able to establish a new agreed task assignment within polynomial time. V. GRAPE WITH M INIMUM R EQUIREMENTS This section addresses another task allocation problem where each task may require a certain number of agents for completion. This problem can be defined as follows. Problem 2. Given a set of agents A and a set of tasks T , the objective is to find an assignment such that X X max ui (tj , p)xij (23) {xij } ∀ai ∈A ∀tj ∈T subject to X xij ≥ Rj ∀tj ∈ T (24) xij ≤ 1 ∀ai ∈ A (25) ∀ai ∈A X ∀tj ∈T xij ∈ {0, 1} ∀(ai , tj ) ∈ A × T (26) where Rj ∈ N is the number of minimum required agents for task tj , and all the other variables are identically defined as those in Problem 1. Here, it is considered that, for ∀ai ∈ A and ∀tj ∈ T , ui (tj , p) = 0 if p < Rj (27) because task tj cannot be completed in this case. Even if ui (tj , p) is monotonically decreasing at p ≥ Rj , because of (27), the individual utility can not be simply transformed to a preference relation holding SPAO. Thus, we need to modify the utility function to yield alternative values for the case when p < Rj . We refer to the modified utility as auxiliary individual utility ũi , which is defined as ( u0i (tj , p) if p ≤ Rj ũi (tj , p) = (28) ui (tj , p) otherwise where u0i (tj , p) is the dummy utility of agent ai with regard to task tj when p ≤ Rj . The dummy utility is intentionally used also for the case when p = Rj . This is because we desire the auxiliary individual utility to support the agents to find an assignment that holds Equation (24). For this, the auxiliary individual utility should satisfy the following condition: Condition 1. For every agent ai ∈ A, its preference relation Pi holds that, for any two tasks ∀tj , tk ∈ T , (tj , Rj ) i (tk , Rk + 1). This condition enables every agent to prefer a task for which the number of co-working agents is less than its minimum requirement, over any other tasks whose requirements are already fulfilled. UnderPthis condition, as long as the agent set A is such that |A| ≥ ∀tj ∈T Rj and a Nash stable partition is found, the resultant assignment satisfies Equation (24). Proposition 1. Given an instance of Problem 2 where ui (tj , p) ∀i ∀j is a monotonically decreasing function with regard to ∀p ≥ Rj , if the dummy utilities u0i (tj , p) ∀i ∀j in (28) are set to satisfy Condition 1 and SPAO for ∀p ≤ Rj , then all the resultant auxiliary individual utilities ũi (tj , p) ∀i ∀j ∀p can be transformed to a na -tuple of preference relations P that hold Condition 1 as well as SPAO for ∀p ∈ {1, ..., na }. In the corresponding instance of GRAPE (A, T , P), a Nash stable partition can be determined within polynomial times as shown in Theorems 1 and 2 because of SPAO, and the resultant partition can satisfy Equation (24) due to Condition 1. Let us give an example. Suppose that there exist 100 agents A, and 3 tasks T = {t1 , t2 , t3 } where only t3 has its minimum requirement R3 = 5; for every agent ai ∈ A, individual utilities for t1 and t2 , i.e., ui (t1 , p) and ui (t1 , p), are much higher than that for t3 in ∀p ∈ {1, ..., 100}. We can find a Nash stable partition for this example, as described in Proposition 1, by setting that all u0i (tj , p), ∀j, ∀p ≥ Rj to max∀tj {ui (tj , Rj )} for each agent ai . After a Nash stable partition is found, in order to compute the objective function value in (23), the original individual utility function ui should be used instead of the auxiliary one ũi . Proposition 2. As similar to Theorem 3, the suboptimality bound α for a Nash stable partition Π obtained by implementing Proposition 1 is such that α≥ JGRAP E JGRAP E . · JGRAP E + λ̃ JGRAP E + δ (29) Here, δ ≡ J˜GRAP E −JGRAP E , where J˜GRAP E and JGRAP E is the objective function value in (23) using ũi and ui given the Nash stable partition, respectively. Likewise, λ̃ is the value in (9) using ũi . In addition to this, if every ũi satisfies the conditions for Theorem 4, then α≥ 1 JGRAP E · . 2 JGRAP E + δ (30) Proof. Since the Nash stable partition Π is obtained by using ũi , it can be said from Equations (7) and (8) that J˜GRAP E J˜GRAP E ≥ . J˜OP T J˜GRAP E + λ̃ (31) Due to the fact that ũi (tj , p) ≥ ui (tj , p) for ∀i, j, p, it is clear that J˜GRAP E ≥ JGRAP E and J˜OP T ≥ JOP T . By letting that δ ≡ J˜GRAP E − JGRAP E , the left term in (31) is at most (JGRAP E + δ)/JOP T . Besides, the right term in (31) is a monotonically-increasing function with regard to J˜GRAP E , and thus, it is lower bounded by JGRAP E /(JGRAP E − λ̃). From this, Equation (31) can be rewritten as Equation (29) by multiplying JGRAP E /(JGRAP E + δ). 10 Likewise, for the case when every ũi satisfies the conditions for Theorem 4, it can be said that J˜GRAP E ≥ 1/2 · J˜OP T , which can be transformed into Equation (30) as shown above. Peaked-reward Submodular-reward Individual Utility 40 20 20 40 60 (a) Social utility A. Mission Scenario and Settings 1) Utility functions: Firstly, we introduce the social and individual utilities used in this numerical experiment. We consider that if multiple robots execute a task together as a coalition, they are given a certain level of reward for the task. The amount of the reward varies depending on the number of the co-working agents. The reward is shared with the agents, and each agent’s individual utility is considered as the shared reward minus the cost required to personally spend for the task (e.g., fuel consumption for movement). In this experiment, the equal fair allocation rule [53], [54] is adopted. Under the rule, a task’s reward is equally shared amongst the members. Therefore, the individual utility of agent ai executing task tj with a coalition Sj is defined as ui (tj , |Sj |) = r(tj , |Sj |)/|Sj | − ci (tj ), (32) where r(tj , |Sj |) is the reward from task tj when it is executed by Sj together, and ci (tj ) is the cost that agent ai needs to pay for the task. Here, we simply set the cost as a function of the distance from agent ai to task tj . We set that if ui (tj , |Sj |) is not positive, agent ai prefers to join Sφ over Sj . This experiment considers two types of tasks. For the first type, a task’s reward becomes higher as the number of participants gets close to a specific desired number. We refer to such a task as a peaked-reward task, and its reward can be defined as rjmax · |Sj | −|Sj |/nd +1 j ·e , (33) r(tj , |Sj |) = ndj where ndj represents the desired number, and rjmax is the peaked reward in case that ndj of agents are involved in. Consequently, the individual utility for agent ai with regard to task tj becomes the following equation: ui (tj , |Sj |) = rjmax ndj d · e−|Sj |/nj +1 − ci (tj ). (34) For the second type, a task’s reward becomes higher as more agents are involved, but the corresponding marginal gain decreases. This type of tasks is said to be (monotone) submodular-reward, and the reward can be defined as r(tj , |Sj |) = rjmin · logj (|Sj | + j − 1), (35) 6 4 0 0 # Co-working Agents This section validates the performances of the proposed framework with respect to its scalability, suboptimality, adaptability against dynamic environments, and robustness in asynchronous environments. Peaked-reward Submodular-reward 8 2 0 VI. S IMULATION AND R ESULTS 10 60 Social Utility Notice that if δ = 0 for the Nash stable partition in Proposition 2, then the suboptimality bounds become equivalent to those in Theorems 3 and 4. 80 80 100 0 20 40 60 80 100 # Co-working Agents (b) Individual utility Fig. 1. Examples of the social utility for a coalition and an agent’s individual utility where rjmin indicates the reward obtained if there is only one agent involved, and j > 1 is the design parameter regarding the diminishing marginal gain. The resultant individual utility becomes as follows: ui (tj , |Sj |) = rjmin · logj (|Sj | + j − 1)/|Sj | − ci (tj ). (36) Figure 1 illustrates examples of the social utilities and individual utilities for the task types introduced above. For simplification, agents’ costs are ignored in the figure. We set rjmax , ndj , rjmin and j to be 60, 15, 10, and 2, respectively. Notice that the individual utilities are monotonically decreasing in the both cases, as depicted in Figure 1(b). Therefore, given a mission that entails these task types, we can generate an instance (A, T , P) of GRAPE that holds SPAO. 2) Parameters generation: In the following sections, we will mainly utilise Monte Carlo simulations. At each run, nt tasks and na agents are uniform-randomly located in a 1000 m × 1000 m arena and a 250 m × 250 m arena within there, respectively. For a scenario including peaked-reward tasks, rjmax is randomly generated from a uniform distribution over [1000, 2000] and ndj is selected by the rounded P× na /nt ;max max value of (rj / ∀tk ∈T ∗ rk )×na . For a scenario including submodular-reward tasks, j is set as 2, and rjmin is uniformrandomly generated over [1000, 2000] × 1/ logj (na /nt + 1). 3) Communication network: Given a set of agents, we assume that their communication network is strongly-connected. Furthermore, we also consider the fully-connected network in some experiments in order to examine the influence of the network. The communication network is randomly generated at each instance, and is assumed to be sustained during a mission except the robustness test simulations in Section VI-E. B. Scalability To investigate the effectiveness of nt and na upon the scalability of the proposed approach, we conduct a Monte Carlo simulation with 100 runs for the scenarios introduced in Section VI-A with a fixed nt = 20 and various na ∈ {80, 160, 240, 320} and for those with na = 160 and nt ∈ {5, 10, 15, 20}. Figure 2 shows the statistical results using boxand-whisker plots, where the green boxes indicate the results from the scenarios with the peaked-reward tasks and the magenta boxes are those with the submodular-reward tasks. The blue and red lines connecting the boxes represent the average 11 mean values of the graph diameter dG for the instances with na ∈ {80, 160, 240, 320} are 36, 58, 75 and 92, respectively, the results show that the amount of dummy iterations happened is much less than the bound value, which is dG as pointed out in Section IV-A. On the contrary, under the fully-connected network there is no need of such a dummy iteration, and thus the required number of iterations and that of time steps are the same. (a) na ∈ {80, 160, 240, 320} with fixed nt = 20 (b) nt ∈ {5, 10, 15, 20} with fixed na = 160 Fig. 2. The number of iterations and that of time steps required for converging into a Nash stable partition relative to the number of agents, depending on communication networks (i.e., Strongly-connected vs. Fully-connected) and utility function types (i.e., Peaked-reward vs. Submodular-reward) value for each test case (na , nt ) under a strongly-connected network and the fully-connected network, respectively. The left subfigure in Figure 2(a) shows that the ratio of the number of required iterations to that of agents linearly increases as more agents are involved. This implies that the number of iterations has a quadratic complexity (i.e., C1 n2a ), as stated in Theorem 2, but with C1 being much less than 1 2 , which is the value from the theorem. Even, C1 can become very low (e.g., 5 × 10−4 ) under the fully-connected network. Such a C1 being smaller than 12 may be explained by Remark 4: the algorithmic efficiency of Algorithm 1 can reduce unnecessary iterations that may be induced in the procedure of the proof for Theorem 2. On the other hand, it is shown in the left subfigure in Figure 2(b) that the number of required iterations decreases with regard to the number of tasks. This behaviour may be caused by the fact that more selectable options provided to a fixed number of agents can reduce possible conflicts between the agents. Furthermore, the trends regarding either na or nt have a higher slope under a strongly-connected network than that under the fullyconnected network. This is because the former condition is more sensitive to conflicts between agents, and thus causes additional iterations. For example, agents at the middle nodes of the network may change their decisions (and thus increase the number of iterations) while the local partition information of the agent at one end node is being propagated to agents at the other end nodes. Such unnecessary iterations would not have occured if the agents at the end nodes were directly connected. The right subfigures in Figure 2(a) and (b) indicate that approximately 3–4 times of dummy iterations, compared with the required number of normal iterations, are additionally needed under a strongly-connected network. Noting that the C. Suboptimality This section examines the suboptimality of the proposed framework by using Monte Carlo simulations with 100 instances. In each instance, there are nt = 3 of tasks and na = 12 of agents that are connected by a strongly-connected network. Figure 3 presents the true optimality for each instance, which is the ratio of the global utility obtained by the proposed framework to that by a brute-force search, i.e., JGRAP E /JOP T , and the lower bound given by Theorem 3. A blue circle and a red cross in the figure indicate the true suboptimality and the lower bound, respectively. The results show that the framework provides near-optimal solutions in almost all cases and the suboptimality of each Nash stable partition is enclosed by the corresponding lower bound. The suboptimality may be improved if the agents are let to investigate a larger search space, for examples, possible coalitions caused by co-deviation of multiple agents. However, this strategy in return may increase communication transactions amongst the agents because they have to notice each other’s willingness unless their individual utility functions are known, which is in contrast to Assumption 4. Besides, the computational overhead for an agent at each iteration also becomes more expensive than O(nt ), which is, as shown in Section IV-A, the complexity bound for searching only the currently-selectable coalitions. Hence, the resultant algorithm complexity may hinder its applicability to a large-scale multiple agent system. Figure 4 depicts the suboptimality lower bounds for the large-size problems that were previously addressed in Section VI-B. Firstly, it is clearly shown that the agent communication network does not make any effect on the suboptimality lower bound of a Nash stable partition. Secondly, although there is no universal trend of the suboptimality with regard to na and nt in both utility types, it is suggested that the features of the lower bound given by Theorem 3 can be influenced by the utility functions considered. D. Adaptability This section discusses the adaptability of our proposed framework in response to dynamic environments such as the inclusion or loss of agents and tasks. Suppose that there are 10 tasks and 160 agents in a mission, and a Nash stable partition was already found as a baseline. During the mission, the number of agents (or tasks) changes; the range of the change is from losing 50% of the existing agents (or tasks) to additionally including new ones as much as 50% of them. For each dynamical environment, a new set of Monte Carlo simulations with 100 instances are performed by randomly 12 100% Suboptimality (%) Suboptimality (%) 100% 80% 60% 40% 20% 80% 60% 40% 20% 0 50 Monte Carlo Case ID (a) Peaked-reward task 100 0 50 100 Monte Carlo Case ID (b) Submodular-reward task (a) Dynamic Agents Fig. 3. True suboptimality obtained by GRAPE (blue circle) and its lower bound provided by Theorem 3 (red cross) under a strongly-connected communication network (b) Dynamic Tasks (a) (b) Fig. 4. The suboptimality lower bound, given by Theorem 3, of a Nash stable partition (Left: fixed nt = 20 with varying na ∈ {80, 160, 240, 320}; Right: fixed na = 160 with varying nt = {5, 10, 15, 20}) including or excluding a subset of the corresponding number of agents or tasks. Here, we consider a strongly-connected communication network. Figure 5(a) illustrates that the more the additional agents are involved, the more the number of iterations is required for converging to a new Nash stable partition. This is because the inclusion of a new agent may lead to additional iterations at most as much as the number of total agents including the newly-joined agent (Lemma 1). On the other hand, the loss of existing agents does not seem to have any apparent relation with the number of iterations. A possible explanation is that the exclusion of an existing agent is favourable to other agents due to SPAO preferences. This stimulates only a limited number of agents who are preferred to move to the taskspecific coalition where the excluded agent was. This feature induces fewer additional iterations to reach a new Nash stable partition, compared with the case of adding a new agent. Figure 5(b) shows that to eliminate existing tasks causes more iterations than to include new tasks. This can be explained from the fact that removing any task releases the agents performing the task free and it results in extra iterations as much as the number of the freed agents. On the other hand, adding new tasks induces relatively fewer additional iterations, because only some of existing agents are attracted to those tasks. In summary, as the ratio of the number of agents to that of tasks increases, the number of additional iterations to converge a new Nash stable partition also increases. This actually corresponds to the trend described in Section VI-B, i.e., the Fig. 5. The number of additional iterations required for re-converging a Nash stable partition relative to the number of agents (Baseline: nt = 10, na = 160). Negative values in the x-axis indicate that the corresponding number of existing agents or tasks are lost; positive values indicate that the corresponding number of new agents or tasks are included in an ongoing mission; a stronglyconnected communication network is used. left subfigures in Figure 2(a) and (b). In all the cases of this experiment, the number of additionally induced iterations still remains the same order of the number of the given agents, which implies that the proposed framework provides excellent adaptability. E. Robustness in Asynchronous Environments This section investigates the robustness of the proposed framework in asynchronous environments. This scenario assumes that a certain fraction of the given agents, which are randomly chosen at each iteration, somehow can not execute Algorithm 1 and even can not communicate with other normally-working neighbour agents. We refer to such agents as non-operating agents. Given that nt = 5 and na = 40, the fractions of the non-operating agents are set as {0, 0.2, 0.4, 0.6, 0.8}. In each case, we conduct 100 instances of Monte Carlo experiments, in which the submodular-reward utilities are used. Figure 6(a) presents that the number of iterations required for converging a Nash stable partition remains the same level regardless of the fraction of the non-operating agents. Despite that, the practically required time steps increase as more agents become non-operating, as shown in Figure 6(b). Note that time steps growth rate means the ratio of the total required time steps to those for the case without non-operating agents. These findings indicate that, due to communicational discontinuity caused by non-operating agents at each iteration, the framework may take more time to wait for these agents to operate again and then to disseminate a valid partition 13 (a) coloured agents are assigned to the same coloured task, for example, yellow agents belong to a team for executing the yellow task. The square size of a task indicates the reward of the task, and the cost for an agent to execute the task is considered as a function of the distance from the agent to the task. The allocation results seem to be reasonable with consideration of the task rewards and the costs. The number of iterations required to find a Nash stable partition is 1355, 1380, and 1295 for Scenario #1, #2, and #3, respectively. Since the communication networks considered are more connected than a strongly-connected one, the number of dummy iterations happened is 20–30% of that of the iterations. VII. C ONCLUSION (b) (c) Fig. 6. Robustness test in asynchronous environments: the effectiveness of non-operating agents (Baseline: nt = 10, na = 160, and the submodularreward tasks are used). information over the entire agents. Although such dummy iterations may increase in asynchronous environments, the proposed framework is still able to find a Nash stable partition. Furthermore, the resultant Nash stable partition’s lower bound obtained by Theorem 3 is not affected, as presented in Figure 6(c). F. Visualisation We have na = 320 agents and nt = 5 tasks. The initial locations of the given agents are randomly generated, and the overall formation shape is different in each test scenario such as circle, skewed circle, and square (denoted Scenario #1, #2, and #3, respectively). The tasks are also randomly located outside the agents. In this simulation, each agent is able to communicate with its neighbour agents distant upto 50 m. Here, the submodular-reward utilities are used. Figure 7 shows the visualised task allocation results where the circles and the squares indicate the positions of the agents and the tasks, respectively. The lines between the circles represent the communication networks of the agents. The This paper proposed a novel game-theoretical framework that addresses a task allocation problem for a robotic swarm consisting of self-interested agents. We showed that selfish agents whose individual interests are transformable to SPAO preferences can converge to a Nash stable partition by using the proposed simple decentralised algorithm, which is executable even in asynchronous environments and under a strongly-connected communication network. We analytically and experimentally presented that the proposed framework provides scalability, a certain level of guaranteed suboptimality, adaptability, robustness, and an ability to accommodate different interests of agents. As this framework can be considered as a new sub-branch of self-organised approaches, one of our ongoing works is to compare it with one of the existing methods. Defining a fair scenario for both methods is non-trivial and requires careful consideration; otherwise, a resultant unsuitable scenario may provide biased results. Secondly, another natural progression of this study is to relax anonymity of agents and thus to consider a combination of the agents’ identities. Experimentally, we have often observed that heterogeneous agents with social inhibition also can converge to a Nash stable partition. More research would be needed to analyse the quality of a Nash stable partition obtained by the proposed framework in terms of min max because our various experiments showed that the outcome provides individual utilities to agents in a balanced manner. ACKNOWLEDGMENT The authors gratefully acknowledge that this research was supported by International Joint Research Programme with Chungnam National University (No. EFA3004Z) R EFERENCES [1] H.-S. Shin and P. Segui-Gasco, “UAV Swarms: Decision-Making Paradigms,” in Encyclopedia of Aerospace Engineering. John Wiley & Sons, 2014, pp. 1–13. [2] A. Khamis, A. Hussein, and A. Elmogy, “Multi-robot Task Allocation: A Review of the State-of-the-Art,” in Cooperative Robots and Sensor Networks 2015. Cham: Springer International Publishing, 2015, vol. 604, pp. 31–51. [3] A. Jevtić, Á. Gutierrez, D. Andina, and M. Jamshidi, “Distributed Bees Algorithm for Task Allocation in Swarm of Robots,” IEEE Systems Journal, vol. 6, no. 2, pp. 296–304, 2012. [4] E. Sahin, “Swarm Robotics: From Sources of Inspiration to Domains of Application,” in Swarm Robotics. Berlin: Springer, 2005, pp. 10–20. 14 (a) Scenario #1 (b) Scenario #2 (c) Scenario #3 Fig. 7. Visualisated task allocation results (nt = 5, na = 320). [5] M. Dorigo, M. Birattari, and M. Brambilla, “Swarm robotics,” p. 1463, 2014. [6] K. Barton and D. Kingston, “Systematic Surveillance for UAVs: A Feedforward Iterative Learning Control Approach,” in American Control Conference, Washington, DC, USA, 2013, pp. 5917–5922. [7] I. Bekmezci, O. K. Sahingoz, and S. Temel, “Flying Ad-Hoc Networks (FANETs): A Survey,” Ad Hoc Networks, vol. 11, no. 3, pp. 1254–1270, 2013. [8] M. Erdelj, E. Natalizio, K. R. Chowdhury, and I. F. Akyildiz, “Help from the Sky: Leveraging UAVs for Disaster Management,” IEEE Pervasive Computing, vol. 16, no. 1, pp. 24–32, 2017. [9] I. Jang, J. Jeong, H.-S. Shin, S. Kim, A. Tsourdos, and J. Suk, “Cooperative Control for a Flight Array of UAVs and an Application in Radar Jamming,” IFAC-PapersOnLine, vol. 50, no. 1, pp. 8011–8018, 2017. [10] B. P. Gerkey and M. J. Matarić, “A Formal Analysis and Taxonomy of Task Allocation in Multi-robot Systems,” International Journal of Robotics Research, vol. 23, no. 9, pp. 939–954, 2004. [11] G. A. Korsah, A. Stentz, and M. B. Dias, “A Comprehensive Taxonomy for Multi-robot Task Allocation,” The International Journal of Robotics Research, vol. 32, no. 12, pp. 1495–1512, 2013. [12] S. Bandyopadhyay, S.-J. Chung, and F. Y. Hadaegh, “Probabilistic and Distributed Control of a Large-Scale Swarm of Autonomous Agents,” IEEE Transactions on Robotics, vol. 33, no. 5, pp. 1103–1123, 2017. [13] M. Brambilla, E. Ferrante, M. Birattari, and M. Dorigo, “Swarm Robotics: a Review from the Swarm Engineering Perspective,” Swarm Intelligence, vol. 7, no. 1, pp. 1–41, 2013. [14] L. Johnson, S. Ponda, H.-L. Choi, and J. How, “Asynchronous Decentralized Task Allocation for Dynamic Environments,” in Infotech@Aerospace 2011, St.Louis, MO, USA, 2011. [15] C. M. Clark, R. Morton, and G. A. Bekey, “Altruistic relationships for optimizing task fulfillment in robot communities,” Distributed Autonomous Robotic Systems 8, pp. 261–270, 2009. [16] J. H. Drèze and J. Greenberg, “Hedonic Coalitions: Optimality and Stability,” Econometrica, vol. 48, no. 4, pp. 987–1003, 1980. [17] S. Banerjee, H. Konishi, and T. Sönmez, “Core in a Simple Coalition Formation Game,” Social Choice and Welfare, vol. 18, no. 1, pp. 135– 153, 2001. [18] A. Bogomolnaia and M. O. Jackson, “The Stability of Hedonic Coalition Structures,” Games and Economic Behavior, vol. 38, no. 2, pp. 201–230, 2002. [19] A. Brutschy, G. Pini, C. Pinciroli, M. Birattari, and M. Dorigo, “Selforganized Task Allocation to Sequentially Interdependent Tasks in Swarm Robotics,” Autonomous Agents and Multi-Agent Systems, vol. 28, no. 1, pp. 101–125, 2014. [20] N. Kalra and A. Martinoli, “A Comparative Study of Market-Based and Threshold-Based Task Allocation,” in Distributed Autonomous Robotic Systems 7. Tokyo: Springer Japan, 2006, pp. 91–101. [21] Y. Zhang and L. E. Parker, “Considering Inter-task Resource Constraints in Task Allocation,” Autonomous Agents and Multi-Agent Systems, vol. 26, no. 3, pp. 389–419, 2013. [22] H. L. Choi, L. Brunet, and J. P. How, “Consensus-based Decentralized Auctions for Robust Task Allocation,” IEEE Transactions on Robotics, vol. 25, no. 4, pp. 912–926, 2009. [23] P. Segui-Gasco, H.-S. Shin, A. Tsourdos, and V. J. Segui, “Decentralised Submodular Multi-Robot Task Allocation,” in IEEE/RSJ International Conference on Intelligent Robots and Systems, Hamburg, Germany, 2015, pp. 2829–2834. [24] B. Acikmese and D. S. Bayard, “Markov Chain Approach to Probabilistic Guidance for Swarms of Autonomous Agents,” Asian Journal of Control, vol. 17, no. 4, pp. 1105–1124, 2015. [25] I. Chattopadhyay and A. Ray, “Supervised Self-Organization of Homogeneous Swarms Using Ergodic Projections of Markov Chains,” IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), vol. 39, no. 6, pp. 1505–1515, 2009. [26] N. Demir and B. Acikmese, “Probabilistic Density Control for Swarm of Decentralized ON-OFF Agents with Safety Constraints,” in American Control Conference, Chicago, IL, USA, 2015, pp. 5238–5244. [27] S. Berman, A. Halasz, M. A. Hsieh, and V. Kumar, “Optimized Stochastic Policies for Task Allocation in Swarms of Robots,” IEEE Transactions on Robotics, vol. 25, no. 4, pp. 927–937, 2009. [28] A. Halasz, M. A. Hsieh, S. Berman, and V. Kumar, “Dynamic Redistribution of a Swarm of Robots among Multiple Sites,” in IEEE/RSJ International Conference on Intelligent Robots and Systems, San Diego, CA, USA, 2007, pp. 2320–2325. [29] M. A. Hsieh, A. Halasz, S. Berman, and V. Kumar, “Biologically Inspired Redistribution of a Swarm of Robots among Multiple Sites,” Swarm Intelligence, vol. 2, no. 2-4, pp. 121–141, 2008. [30] T. W. Mather and M. A. Hsieh, “Macroscopic Modeling of Stochastic Deployment Policies with Time Delays for Robot Ensembles,” The International Journal of Robotics Research, vol. 30, no. 5, pp. 590– 600, 2011. 15 [31] A. Prorok, M. A. Hsieh, and V. Kumar, “The Impact of Diversity on Optimal Control Policies for Heterogeneous Robot Swarms,” IEEE Transactions on Robotics, vol. 33, no. 2, pp. 346–358, 2017. [32] T. H. Labella, M. Dorigo, and J.-L. Deneubourg, “Division of Labor in a Group of Robots Inspired by Ants’ Foraging Behavior,” ACM Transactions on Autonomous and Adaptive Systems, vol. 1, no. 1, pp. 4–25, 2006. [33] E. Castello, T. Yamamoto, Y. Nakamura, and H. Ishiguro, “Foraging Optimization in Swarm Robotic Systems Based on an Adaptive Response Threshold Model,” Advanced Robotics, vol. 28, no. 20, pp. 1343–1356, 2014. [34] H. Kurdi, J. How, and G. Bautista, “Bio-Inspired Algorithm for Task Allocation in Multi-UAV Search and Rescue Missions,” in AIAA Guidance, Navigation, and Control Conference, San Diego, CA, USA, 2016. [35] W. Liu, A. F. T. Winfield, J. Sa, J. Chen, and L. Dou, “Towards Energy Optimization: Emergent Task Allocation in a Swarm of Foraging Robots,” Adaptive Behavior, vol. 15, no. 3, pp. 289–305, 2007. [36] W. Liu and A. F. T. Winfield, “Modeling and Optimization of Adaptive Foraging in Swarm Robotic Systems,” The International Journal of Robotics Research, vol. 29, no. 14, pp. 1743–1760, 2010. [37] A. Martinoli, K. Easton, and W. Agassounon, “Modeling Swarm Robotic Systems: a Case Study in Collaborative Distributed Manipulation,” The International Journal of Robotics Research, vol. 23, no. 4, pp. 415–436, 2004. [38] K. Lerman, A. Martinoli, and A. Galstyan, “A Review of Probabilistic Macroscopic Models for Swarm Robotic Systems,” in Swarm Robotics. Berlin: Springer, 2005, pp. 143–152. [39] N. Correll and A. Martinoli, “System Identification of Self-Organizing Robotic Swarms,” in Distributed Autonomous Robotic Systems 7. Tokyo: Springer Japan, 2006, pp. 31–40. [40] A. Prorok, N. Correll, and A. Martinoli, “Multi-level Spatial Modeling for Stochastic Distributed Robotic Systems,” The International Journal of Robotics Research, vol. 30, no. 5, pp. 574–589, 2011. [41] A. Kanakia, J. Klingner, and N. Correll, “A Response Threshold Sigmoid Function Model for Swarm Robot Collaboration,” Distributed Autonomous Robotic Systems, pp. 193–206, 2016. [42] D. Dimitrov and S. C. Sung, “Top responstiveness and Nash stability in coalition formation games,” Kybernetika, vol. 42, no. 4, pp. 453–460, 2006. [43] A. Darmann, E. Elkind, S. Kurz, and J. Lang, Internet and Network Economics, ser. Lecture Notes in Computer Science, P. W. Goldberg, Ed. Berlin, Heidelberg: Springer Berlin Heidelberg, 2012, vol. 7695. [44] A. Darmann, “Group Activity Selection from Ordinal Preferences,” in Algorithmic Decision Theory. ADT 2015. Lecture Notes in Computer Science, ser. Lecture Notes in Computer Science, T. Walsh, Ed. Berlin, Heidelberg: Springer Cham, 2015, vol. 9346, pp. 35–51. [45] M. Rubenstein, A. Cornejo, and R. Nagpal, “Programmable Selfassembly in a Thousand-robot Swarm,” Science, vol. 345, no. 6198, pp. 795–799, 2014. [46] S. C. Sung and D. Dimitrov, “On Myopic Stability Concepts for Hedonic Games,” Theory and Decision, vol. 62, no. 1, pp. 31–45, 2007. [47] M. Karakaya, “Hedonic Coalition Formation Games: A New Stability Notion,” Mathematical Social Sciences, vol. 61, no. 3, pp. 157–165, 2011. [48] H. Aziz and F. Brandl, “Existence of Stability in Hedonic Coalition Formation Games,” in Proceedings of the 11th International Conference on Autonomous Agents and Multiagent Systems, Valencia, Spain, 2012, pp. 763–770. [49] J. Guerrero and G. Oliver, “Multi-robot Coalition Formation in Realtime Scenarios,” Robotics and Autonomous Systems, vol. 60, no. 10, pp. 1295–1307, 2012. [50] O. Shehory and S. Kraus, “Feasible Formation of Coalitions Among Autonomous Agents in Nonsuperadditive Environments,” Computational Intelligence, vol. 15, no. 3, pp. 218–251, 1999. [51] C. Nam and D. A. Shell, “Assignment Algorithms for Modeling Resource Contention in Multirobot Task Allocation,” IEEE Transactions on Automation Science and Engineering, vol. 12, no. 3, pp. 889–900, 2015. [52] L. B. Johnson, H.-L. Choi, and J. P. How, “The Role of Information Assumptions in Decentralized Task Allocation: A Tutorial,” IEEE Control Systems, vol. 36, no. 4, pp. 45–58, 2016. [53] W. Saad, Z. Han, M. Debbah, and A. Hjørungnes, “A Distributed Coalition Formation Framework for Fair User Cooperation in Wireless Networks,” IEEE Transactions on Wireless Communications, vol. 8, no. 9, pp. 4580–4593, 2009. [54] W. Saad, Z. Han, T. Basar, M. Debbah, and A. Hjørungnes, “Hedonic Coalition Formation for Distributed Task Allocation among Wireless Agents,” IEEE Transactions on Mobile Computing, vol. 10, no. 9, pp. 1327–1344, 2011.
2cs.AI
Leveraging Parallel Data Processing Frameworks with Verified Lifting Maaz Bin Safeer Ahmad Alvin Cheung Computer Science & Engineering University of Washington [email protected] Computer Science & Engineering University of Washington [email protected] http://casper.uwplse.org Many parallel data frameworks have been proposed in recent years that let sequential programs access parallel processing. To capitalize on the benefits of such frameworks, existing code must often be rewritten to the domain-specific languages that each framework supports. This rewriting—tedious and error-prone—also requires developers to choose the framework that best optimizes performance given a specific workload. This paper describes C ASPER, a novel compiler that automatically retargets sequential Java code for execution on Hadoop, a parallel data processing framework that implements the MapReduce paradigm. Given a sequential code fragment, C ASPER uses verified lifting to infer a high-level summary expressed in our program specification language that is then compiled for execution on Hadoop. We demonstrate that C ASPER automatically translates Java benchmarks into Hadoop. The translated results execute on average 3.3× faster than the sequential implementations and scale better, as well, to larger datasets. 1 Introduction As computing becomes increasingly ubiquitous, storage cheaper, and data collection tools more sophisticated, more data is being collected today than ever before. Data-driven advances are increasingly prevalent in various scientific domains. As such, effectively analyzing and processing huge datasets poses a grand computational challenge. Many parallel data processing frameworks have been developed to handle very large datasets [2, 5, 6, 9, 12], and new ones continue to be frequently released [1, 12, 23]. Most parallel data processing frameworks come with domain-specific optimizations that are exposed either via library APIs [1, 2, 5, 6, 9, 23] or high-level, domain-specific languages (DSLs) for users to express their computations [12, 16]. Computations expressible using such API calls or DSLs are more efficient thanks to the frameworks’ domain-specific optimizations [3, 16, 20, 22]. However, the many issues with this approach often make domain-specific frameworks inaccessible to non-experts such as researchers studying physical or social sciences. First, domain-specific optimizations for different workloads require an expert to decide up front the most appropriate framework for a given piece of code. Second, end users must often learn new APIs or DSLs [1, 2, 5, 6, 9, 23] and rewrite existing code to leverage the benefits provided by these frameworks. Doing so requires not only significant time and resource but also risks introducing new bugs into the application. Moreover, even users willing to rewrite their applications must first understand the intent of the code which might have been written by others. And manually written, low-level optimizations in the code often obscure high-level intent. Finally, even after learning new APIs and rewriting code, newly emerging frameworks often turn freshly rewritten code into legacy applications. Users must then repeat this process to keep pace with Dimitrova, Piskac (Eds.): Fifth Workshop on Synthesis (SYNT 2016) EPTCS 229, 2016, pp. 67–83, doi:10.4204/EPTCS.229.7 © M. B. S. Ahmad & A. Cheung This work is licensed under the Creative Commons Attribution License. 68 Leveraging Parallel Data Processing Frameworks with Verified Lifting new advances, requiring significant time investments that could be better spent in advancing scientific discovery. One way to improve the accessibility of these parallel data processing frameworks involves building compilers that automatically convert applications written in common general-purpose languages (such as Java or Python) to high-performance parallel processing frameworks, such as Hadoop or Spark. Such compilers let users write their applications in familiar general-purpose languages and let the compiler retarget portions of their code to high-performance DSLs [7, 11, 15]. The applications can then leverage the performance of these specialized frameworks without the overhead of learning how to program individual DSLs. But such compilers don’t always exist, and building one can prove highly complex. This paper demonstrates the application of verified lifting to automatically convert sequential Java code fragments to MapReduce. As input, verified lifting takes program fragments written in a generalpurpose language and uses program synthesis to automatically find provably correct code summaries. These summaries—expressed in our program specification language—encode the semantics of the input code fragment. The found summaries are then used to translate the original input code to the target high-performance DSL. The concept of verified lifting has been previously applied to database applications [7] and stencil computations [11]. This paper applies verified lifting to the conversion of sequential data processing Java code to leverage the parallel data processing frameworks Apache Hadoop. The problem statement remains familiar and was first proposed in the MOLD compiler [15], which translates sequential Java code for execution on Apache Spark. MOLD uses pre-defined rewrite rules to search the space of equivalent Apache Spark implementations. It scans the input code for patterns that trigger such rewrite rules, an approach fraught with many limitations. For instance, it requires the a priori definition of complicated rewrite rules, which can be extremely brittle to code pattern changes. In comparison, our approach analyzes program semantics rather than program syntax, making it robust to code pattern changes. We also do not rely on pre-defined translation rules and can thus discover new solutions and optimizations that the user never knew existed. We implemented our approach described above in a compiler called C ASPER. By converting sequential code fragments to Hadoop, C ASPER parallelizes computation at crucial program points where input data collections are being processed. We used C ASPER to convert five benchmark programs with encouraging results. This paper thus makes the following contributions: • We describe the use of verified lifting to retarget sequential Java applications to Hadoop by converting code fragments within the application to Hadoop MapReduce tasks. • We design a new program specification language to express the intent of Java code fragments using the MapReduce paradigm. • We employ static program analysis techniques to intelligently restrict the search space of all possible summaries that can be expressed in our specification language and use inductive synthesis to find provably correct summaries for each input code fragment. • We present encouraging preliminary results from using C ASPER to identify and optimize code fragments written in sequential Java. To show the potential of our approach, we evaluate our system on five MapReduce benchmarks used in prior work [17] to demonstrate its capabilities and limitations. In the following, we describe C ASPER’s design and illustrate its use to convert sequential Java programs into Hadoop tasks in §2. In §3 we explain verified lifting and describe how we implemented each of its steps in C ASPER. §4 evaluates how C ASPER performs using varied benchmarks and shares our preliminary results. §5 describes related work, and we conclude in §6. M. B. S. Ahmad & A. Cheung 69 Figure 1: C ASPER system architecture diagram. Sequential code fragments (highlighted green) in the input source file are translated to equivalent Hadoop tasks (highlighted orange). 2 System Overview This section describes the architecture of the C ASPER compiler. C ASPER automatically identifies and converts sequential Java source code fragments into semantically equivalent MapReduce tasks implemented using Hadoop. It generates new, optimized version of the input source code where original code fragments are replaced by invocations to the generated MapReduce tasks. Figure 1 shows C ASPER’s different components and how they interact in the compilation pipeline. Before explaining each component in detail, we should generally note that by statically analyzing Java input source code, C ASPER extracts code fragments that can potentially be translated. It then generates a high-level summary of each extracted code fragment. Expressed in our high level program specification language (see §3.1), the summary is inferred by a program synthesizer. To quickly traverse the large space of possible summaries, C ASPER bounds the search space considered by the synthesizer and uses a bounded model-checking procedure to locate any candidate candidate summaries for a given code fragment.1 The Hadoop code generator module uses the verified summary to produce code for Hadoop MapReduce tasks. Lastly, the code generator module prepares a new version of the input source 1 While not yet implemented in the current C ASPER prototype, any candidate summary that passes the bounded model checking phase will be forwarded to a theorem prover, which verifies that the synthesizer-generated summary is semantically equivalent to the original code. 70 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 Leveraging Parallel Data Processing Frameworks with Verified Lifting int[][] histogram(int[] data) { int[] hR = new int[256]; int[] hG = new int[256]; int[] hB = new int[256]; for (int i = 0; i < data.length; i += 3){ int r = data[i]; int g = data[i + 1]; int b = data[i + 2]; hR[r]++; hG[g]++; hB[b]++; } int[][] result = new int[3][]; result[0] = hR; result[1] = hG; result[2] = hB; return result; } (a) Input source code 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 Map kvPairs = HistogramHadoop.execute(); hR = kvPairs.get(0); hG = kvPairs.get(1); hB = kvPairs.get(2); (b) C ASPER wrapper to replace the loop in (a) 18 19 20 21 public class HistogramHadoop{ class HistogramMapper extends Mapper { void map(int key, int[] value){ for (int i=0; i<value.length; i+=1) { if(i%3==0) emit((0, value[i]), 1); if(i%3==1) emit((1, value[i]), 1); if(i%3==2) emit((2, value[i]), 1); }}} class HistogramReducer extends Reducer { void reduce(Tuple key, int[] values) { int value = 0; for (int val:values) {value=value+val;} emit(key, value); }} static Map execute() { Job = Job.getInstance(); job.setMapper(HistogramMapper); job.setReducer(HistogramReducer); return job.execute(); } } (c) C ASPER-generated Hadoop task Figure 2: C ASPER translation of the 3D Histogram benchmark. code by replacing the original code fragments with invocations to the translated Hadoop tasks. Throughout the remainder of this paper, we use, as a running example, a benchmark from the Phoenix suite of benchmarks [17] that generates 3D histograms from image data stored in a file. Figure 2 shows C ASPER’s translation of this 3D Histogram benchmark. In Figure 2a, the original program sequentially iterates over an array of integers representing the intensity values of colors red, green, and blue for each pixel. It then counts the number of times each value occurs for each color from Lines 9 to 11. The parallel program C ASPER generates, on the other hand, emits a key-value pair with the tuple (color, intensity) as key and 1 as value (lines 5 to 7 in Figure 2c). The generated pairs are then grouped by key and the frequency of each key is calculated by adding all the 1’s in the reducer phase (line 12). Figure 2b shows the final code generated by C ASPER that replaces the original loop, where it invokes the Hadoop task shown in Figure 2c and uses the output from the Hadoop task to update program state accordingly. In our evaluation, the translated version of the benchmark performed over 1.5× faster for a dataset of 50GB. We now discuss the three essential modules that make up C ASPER’s compilation pipeline. 2.1 Program Analyzer The program analyzer, the first component in C ASPER’s compilation pipeline, has two goals. First, it identifies all code fragments that are candidates for conversion. Second, it generates synthesis specifications for each identified candidate code fragment. The program analyzer operations are grouped into three sub-components: the code fragment identifier, the verification conditions generator, and the grammar generator. M. B. S. Ahmad & A. Cheung 71 In the current prototype, C ASPER’s code fragment identifier finds loops from the input program and extracts them as candidates for conversion. C ASPER currently does not consider non-looping code fragments (such as recursive functions) as candidates for conversion. In addition, C ASPER also ignores loops containing calls to external library methods that are unrecognized by the C ASPER compiler. In §3.4, we formally list the criteria needed for a code fragment to be extracted as a candidate for conversion, highlighting some current limitations of C ASPER’s implementation. The second program analyzer sub-component is the grammar generator, which aims to confine the space of synthesizable summaries. Without doing so, the space of all possible summaries expressible in our program specification language would be too large. The grammar generator takes as input the code fragments extracted by the code fragment identifier and statically analyzes each one to extract semantic information. It then uses the extracted information to generate a program grammar for every code fragment. The challenge here is to generate a grammar expressive enough to express the correct summary, but not so expressive as to make the problem of summary search intractable. In §3.3.2, we explain how the grammar generator leverages static program analysis to construct a grammar for each code fragment. The third program analyzer sub-component is the verification conditions generator. This component uses Hoare logic [10] and static program analysis to generate verification conditions for each code fragment. Verification conditions are logical statements that describe what must be true for a given summary to be semantically equivalent to the original code fragment. We explain how C ASPER uses Hoare style program verification to verify program equivalence in §3.2. The output of the verification conditions generator is a search template for the summary, with: (i) the search space specified by the grammar generator, and (ii) the verification conditions generator producing the logical assertions that must be satisfied given a candidate summary. The summary generator uses this template to search for a valid summary of the input code fragment, as we next explore. 2.2 Summary Generator Using the program analyzer’s specifications, the summary generator traverses the search space to find a summary that satisfies the verification conditions. It consists of two modules: the program synthesizer and the theorem prover. The synthesizer takes the search space description and verification conditions previously generated and searches for a code summary that satisfies the verification conditions. To make the search problem tractable, it uses a bounded model checking procedure: the synthesizer checks for correctness only over a small sub-domain. When a promising candidate for the summary is found, viz., one that satisfies the verification conditions in the sub-domain, it is passed onto the formal theorem prover 2 , which checks it for correctness over the entire domain of inputs. Candidate solutions that fail the formal verification step are eliminated from the search space, and the search restarts for a new candidate solution. Using this two-step verification process helps C ASPER quickly discard bad candidates. The more computationally expensive process of formal verification is reserved only for promising candidate solutions. As output, the summary generator emits a verifiably correct summary for each code fragment that can then be translated to Hadoop. Note that the summary generator may not always find a solution that can be proven correct: some fragments are impossible to translate to MapReduce while others might have complex solutions that C ASPER currently can not generate. In such cases, C ASPER gives up on translating the code fragment. 2 See footnote 1. 72 2.3 Leveraging Parallel Data Processing Frameworks with Verified Lifting Hadoop Code Generator The summaries synthesized by the summary generator are expressed in our high-level program specification language. Generating Hadoop implementations from these high level program specifications is straightforward and is achieved in C ASPER through syntax-directed translation rules. The code generator module also outputs the code required to embed these Hadoop tasks into the original program. Essentially, C ASPER generates a new (source) version of the input code, where each code fragment that was successfully translated is replaced by code that first invokes the corresponding Hadoop task and then uses the output generated by the Hadoop task to update the state of the program. Figure 2b shows such generated wrapper code for the 3D Histogram example. We present more details about C ASPER’s code generation module in §3.5. 3 Converting Code Fragments This section explains how C ASPER uses verified lifting to convert sequential Java code fragments to MapReduce tasks. We review the concept of verified lifting in §3.1 and describe the program specification language C ASPER uses to express program summaries. In §3.2, we explain how C ASPER verifies that the identified summaries preserve program semantics of the original code fragment. §3.3 discusses the search process C ASPER uses to find program summaries, while §3.4 explains how C ASPER selects suitable code fragments for translation. Finally, §3.5 explains code generation after the program summary has been inferred. 3.1 Verified Lifting Verified lifting [7,11] is a general technique that infers the semantics of code written in a general-purpose language by “lifting” it to summaries expressed using a high-level language. C ASPER specifies code fragment summaries in our program specification language in the form of postconditions that describe the effects of the code fragment on its output variables, i.e., variables that are modified within the code fragment. The goals of our program specification language are: • To generate summaries that C ASPER can translate to the target platform DSL. This excludes valid summaries that cannot be translated. Therefore, the language should omit constructs that cannot be translated easily to the target. • To generate non-trivial summaries that exhibit parallel data processing. Obviously, this excludes summaries that execute the computation sequentially. §4.2.2 discusses the sources of parallelism in MapReduce and how C ASPER generates solutions that exploits them. With these goals in mind, C ASPER’s inferred summaries must be of the form: ∀ v ∈ out putVariables . v = reduce(map(data, fm ), fr )[idv ] (1) where data is the iterable input data collection. The map function iterates over the data while calling the fm function on each element. fm takes as input an element from data and generates potentially multiple key-value pairs. map then collects and returns key-value pairs generated by invocations of fm . The reduce function takes these key-value pairs, groups them by key, and calls fr for each key and all values that correspond to that key. Function fr aggregates all values for the given key and emits a single key-value pair. Like map, reduce collects all aggregated key-value pairs and returns an associative array M. B. S. Ahmad & A. Cheung 73 that maps each variable’s ID to its final value. The variable ID is a unique identifier that C ASPER assigns to every output variable. C ASPER requires that summaries (i.e., postconditions) be of the form described in Eqn. (1) for easy translation to Hadoop tasks. In the preceding discussion, fm and fr remain unspecified. Verified lifting seeks a definition of fm and fr that makes a valid inferred summary, viz., one that preserves the semantics of the input code fragment. To do this in C ASPER, the synthesizer generates the implementation of these two functions (see §3.3) using the verification conditions computed by the program analyzer for each code fragment (see §3.4). 3.2 Verifying Equivalence The summaries C ASPER infers must be semantically equivalent to the input code fragment. C ASPER establishes the validity of the inferred postconditions using Hoare-style verification conditions [10], which represent the weakest preconditions of a code fragment that must be true to establish the postcondition of the same code fragment under all possible executions. Generating verification conditions for simple assignment statements and conditionals is straightforward. For example, consider the imperative program statement x := y + 3. To show that the candidate postcondition x > 10 is a valid postcondition, we must prove that y + 3 > 10 is true before the statement is executes. In this case, y + 3 > 10 is called the verification condition for this postcondition. Computing verification condition is easy for simple statements. For a loop, however, computing verification conditions becomes more difficult since a loop invariant is needed. The loop invariant is a hypothesis that asserts that the postcondition is true regardless of how many times the loop iterates. Hoare logic states that the following three statements must hold for the loop invariant (and postcondition) to be valid: 1. ∀σ . preCondition(σ ) → loopInvariant(σ ) 2. ∀σ . loopInvariant(σ ) ∧ loopCondition(σ ) → loopInvariant(body(σ )) 3. ∀σ . loopInvariant(σ ) ∧ ¬loopCondition(σ ) → postCondition(σ ) Statement 1 asserts that the loop invariant must be true when the precondition is true for all program states (σ ), i.e., the loop invariant must be true before entering the loop. Statement 2 asserts that for all possible program states σ —assuming that the loop invariant is true and that the loop continues—the loop invariant remains true after one more execution of the loop body; (here, body(σ ) returns a new program state after executing the loop body at σ ). Statement 3 asserts that if the loop invariant is true and if loop terminates, then the postcondition must be true for all possible program states. Two challenges affect the identification of postconditions (and hence summaries) for code fragments that involve loops. First, both the loop invariants and postcondition must be synthesized. Unlike prior work on searching for invariants [8, 21], however, C ASPER needs to find loop invariants that are only logically strong enough to establish the soundness of the postcondition, i.e., those that satisfy statement 3. This is made easier thanks to the specific form of the postcondition that C ASPER looks for. In addition, establishing the validity of the found invariants and postconditions requires checking all possible program states, complicating the synthesis problem. We discuss how C ASPER makes the search problem manageable in §3.3.3. 3.3 Searching for summaries C ASPER seeks to infer a summary for each code fragment, where each summary is a postcondition of the form explained in §3.1. This section describes how C ASPER uses synthesis to search for postconditions and the loop invariants they require to prove the postconditions correct. 74 Leveraging Parallel Data Processing Frameworks with Verified Lifting preCondition(hR, hG, hB, i) ≡ hR = [0..0] ∧ hG = [0..0] ∧ hB = [0..0] ∧ i = 0 postCondition(data, hR, hG, hB) ≡ ∀ 0 ≤ j < hR.length. hR[ j] = reduce(map(data, fm ), fr )[(0, j)] ∧ ∀ 0 ≤ j < hG.length. hG[ j] = reduce(map(data, fm ), fr )[(1, j)] ∧ ∀ 0 ≤ j < hB.length. hB[ j] = reduce(map(data, fm ), fr )[(2, j)] loopInvariant(data, hR, hG, hB, i) ≡ LoopCounterExp ∧ ∀ 0 ≤ j < hR.length. hR[ j] = reduce(map(data[0 : i], fm ), fr )[(0, j)] ∧ ∀ 0 ≤ j < hG.length. hG[ j] = reduce(map(data[0 : i], fm ), fr )[(1, j)] ∧ ∀ 0 ≤ j < hB.length. hB[ j] = reduce(map(data[0 : i], fm ), fr )[(2, j)] Figure 3: Definitions of precondition, postcondition and loop invariant for the 3D Histogram example. 3.3.1 Generating Verification Conditions In §3.2, we explained the three verification conditions that must be satisfied by the synthesized summary. These verification conditions involve a precondition, postcondition, and loop invariant for the code fragment. Preconditions are generated by extracting, through static program analysis, the program state (values of input and output variables) just before the loop starts executing. When the value of a variable before the loop starts cannot be determined, C ASPER generates a new variable to represent the initial value. The loop invariant has a form similar to the postcondition (see §3.1); unlike the postcondition, however, which calls map and reduce on the entire data collection, the loop invariant calls map and reduce only on the subset of the collection that has so far been traversed by the loop. Also, the loop invariant includes an expression that describes the behavior of the loop counters. Figure 3 shows the precondition, postcondition and loop invariant generated for the 3D Histogram benchmark. The postcondition and loop invariant functions describe the behavior that must be true for the bodies of fm and fr to be correct. For example, the postcondition states that for each index j of hR, the value of hR[ j] must equal to the output of map and reduce functions for key (0, j). 3.3.2 Specifying Search Space This section describes how C ASPER generates the grammar that the synthesizer uses to construct bodies of fm and fr . By dynamically generating a grammar for each code fragment, C ASPER restricts the space of summaries through which the synthesizer must search. Recall that the function fm takes as parameters the input data collection and an index into the collection and returns a set of key-value pairs. C ASPER constructs the body of fm using emit statements and conditionals. The current C ASPER prototype does not generate implementations of fm that involve loops. Based on our experiments, we found that using the same number of emit statements as output variables in the code fragment works well as a starting point. The number of emit statements can then be increased if a solution cannot be found. In general, however, C ASPER takes a conservative approach to avoid implementations with redundant emit statements since they generate unnecessary shuffle data, consequently hurting performance. Each emit statement produces a key-value pair; the key and value can be any expression generated by one of our expression grammars or tuples of such expressions. The fr function reduces all values emitted by map for a given key into a single value. The body of M. B. S. Ahmad & A. Cheung fm 75 ::= {EmitMap; EmitMap; EmitMap; } EmitMap ::= emit(Exp, Exp) | if(BoolExp){ emit(Exp, Exp) } Exp ::= IntExp | BoolExp | (Exp, Exp) IntExp ::= IntTerm | data[IntExp] | IntExp + IntExp | IntExp % IntExp IntTerm ::= intLiteral | loopCounter BoolExp ::= true | false | IntExp == IntExp | BoolExp ∧ BoolExp | fr FoldExp BoolExp ∨ BoolExp ::= {value = IntLiteral; for(v in values){ value = FoldExp } emit(key, value); } ::= FoldTerm | FoldExp + FoldExp FoldTerm ::= intLiteral | value | v LoopCounterExp ::= LoopTerm <= LoopTerm <= LoopTerm LoopTerm ::= loopCounter | intLiteral | data.length Figure 4: Grammar generated for 3D Histogram example. fr implements the folding operation. C ASPER uses the synthesizer to generate the folding expression that reduces two values into one. It also generates an expression grammar to synthesize the folding expression. C ASPER generates expression grammars for each primitive data type found in the code fragment. Each grammar can be used to generate expressions that evaluate to a value of its type. The expressions are formulated using the operators and function calls from the original code fragment. Input variables, loop counters, and literals from the code fragment are used as terminals. For arithmetic types, C ASPER lets the synthesizer generate new constants as well. Furthermore, C ASPER generates an expression grammar to construct the folding expression in fr and the loop counter expression in the loop invariant. All expression grammars generated by C ASPER are bounded to a set level of recursion which the user can specify. The recursive bound of a grammar controls the amount of times the synthesizer is allowed to expand the non-terminals while formulating an expression. If the synthesizer cannot find a solution, the expression grammars can be incrementally expanded by either introducing new operators and functions that were not found in the code fragment or increasing the recursive bound on the grammar. The order in which new constructs are added to the grammar is guided by priority values that we have encoded into C ASPER. Figure 4 shows the grammar generated for the 3D Histogram benchmark after 2 iterations of grammar expansion. It is easy to see how to the solution presented in Figure 2 can be generated from this grammar. 3.3.3 Search Procedure Despite all the search space constraints already discussed, the space of possible summaries remains large. Therefore, to accelerate the search, C ASPER splits the verification process into two parts: it first uses a bounded-checking procedure to find candidate invariants and postconditions. For candidate invariants and postconditions that pass the bounded-checking procedure, it then uses a theorem prover to establish soundness for all input program states. If the theorem prover fails (via a timeout) or returns unsat, the synthesizer continues to search for a new candidate summary in the same search space. When it finds no more candidate summaries, the synthesizer expands the grammar to increase the search space. It does 76 Leveraging Parallel Data Processing Frameworks with Verified Lifting this by either adding new non-terminals, increasing the recursive bound for the grammar, or increasing the number of emits made by fm , as discussed earlier. Configuration parameters specified by the user control this iterative expansion of the search space. Eventually, the synthesizer either finds a verifiably correct summary or halts efforts to convert the code fragment. C ASPER also decouples the synthesis procedure from formal verification and uses off-the-shelf tools for each of the two sub-problems. This methodology works well in practice to reduce the synthesis time. 3.4 Initial Code Extraction The current C ASPER prototype parses the abstract syntax tree (AST) of the input program source code to extract loops as individual fragments. C ASPER then analyzes each fragment’s AST to ensure it meets the following criteria: • The code fragment contains no unsupported library function calls. To synthesize summaries, C ASPER must identify input and output variables (see §3.4.1), and the lack of library source code makes this impossible unless models that describe library function semantics are encoded into the compiler. C ASPER currently supports commonly used library functions, such as methods of the java.lang.{String,Integer} and java.util.{ArrayList,Map} classes. • Each loop contains no unstructured control flow. C ASPER’s current implementation cannot extract necessary semantics from such loops, such as the premature terminations and loop stride. • The code fragment contains no nested loops. C ASPER does not currently process nested loops. If any is found, C ASPER attempts to optimize only the innermost loop. • The code fragment contains no assignment statements that can create an alias. Moreover, C ASPER does not currently perform any alias analysis and assumes that none of the input variables in the code fragment is aliased. Thus, user defined objects cannot be assigned. Fields of these objects can be modified as long as they are a primitive type. Similarly, array indexes can be modified—if array is of an immutable type—but not the pointer to an array. Support for assigning common immutable data structures, such as java.lang.{Integer,String}, has been built into the compiler. C ASPER overlooks code fragments that do not satisfy these criteria. Once a loop has been marked for conversion, it is normalized to a simpler form before further analysis. The normalization breaks down large instructions into smaller, simpler ones (such as breaking down all expressions into binary ones) and converts all loop constructs into while(true){...} loops. All of which are standard compiler transformations. 3.4.1 Extracting Input and Output Variables C ASPER makes additional passes on the normalized AST to extract input and output variables. It examines each assignment statement inside the code fragment in isolation and extracts assignment targets as output variables. Similarly, all variables in the source of an assignment are extracted as input variables (this may also include some output variables). Local variables declared inside a loop body are considered neither input nor output variables. To determine whether a function call parameter is an input or output variable, C ASPER must analyze the function’s source code. For library functions, this information must be encoded into C ASPER beforehand. If a constant index of an array is accessed, then a separate input variable is created for the array element. However, if any dynamic accesses are made, then the entire array is considered an input variable. M. B. S. Ahmad & A. Cheung 77 For the 3D Histogram example shown in Figure 2, arrays hR, hG and hB are labeled as output variables, and the data array is identified as an input variable. Variables i, r, g and b—all declared inside the loop body—are considered to be neither input nor output variables. 3.5 Code Generation After C ASPER finds a summary for each input code fragment, the last step is to convert each such summary into a Hadoop task. The class encapsulating the Hadoop task has an execute method, which takes as parameters all input variables in the code fragment. This method invokes the Hadoop task and returns an associative array that maps each variable identifier to its final value as computed by the Hadoop task. The associative array is then used to update the output variables before the remaining program is executed. Translation of fm and fr to concrete Hadoop syntax is done using syntax-driven translation rules. Since the postcondition is already in the MapReduce form, the rules to translate them into the concrete syntax of Hadoop are straightforward and omitted here for brevity. Figure 2c shows the final output code for the 3D Histogram example. HistogramHadoop is the class generated by C ASPER, and the execute method invokes the Hadoop runtime with the generated map and reduce classes. The resulting values—hR, hG, and hB—are compiled and returned by execute and assigned to the original program’s corresponding output variables as shown in Figure 2b. The code that reconstructs the arrays from key-value pairs is not shown for brevity. 4 Evaluation We now describe our prototype implementation of C ASPER and present the results derived from applying C ASPER to varied benchmarks. 4.1 Implementation C ASPER’s program analysis and code generation modules are implemented by extending the open source Java compiler Polyglot [14]. For synthesis, C ASPER uses an off-the-shelf synthesizer called SKETCH [18]. SKETCH uses counter-example guided inductive synthesis as its core algorithm. The program analyzer encodes the verification conditions and search space in the SKETCH language. We implemented the functions and data structures required to model the semantics of MapReduce programs in SKETCH as well. In addition, C ASPER automatically models in SKETCH all program-specific user-defined data types. SKETCH performs bounded model-checking to generate a summary, which we then use to generate the Hadoop Code. We have not yet implemented C ASPER’s formal verification component in C ASPER and therefore rely solely on bounded model-checking to verify correctness. 4.1.1 Platform for Evaluation We used our C ASPER prototype to translate sequential Java benchmarks into Hadoop tasks. We measured the performance of both the original and the generated implementations on a 10 node cluster of Amazon AWS m3.xlarge instances. Each m3.xlarge node was equipped with High Frequency Intel Xeon E52670 v2 (Ivy Bridge) 2.5 GHz processors, 15 GB of memory, and 80 GB of SSD storage. The cluster ran Ubuntu Linux 14.04 LTS, Hadoop 2.7.2 and Spark 1.6.1. We used HDFS for input data storage in both sequential and MapReduce implementations. 78 Leveraging Parallel Data Processing Frameworks with Verified Lifting 4.1.2 Benchmarks We evaluated the performance of C ASPER on the following five benchmarks. These benchmarks were taken from the Phoenix suite of benchmarks [17] and represent traditional problems that can be parallelized by rewriting using the MapReduce paradigm. • The Summation benchmark sums all integer values in a list. • The Word Count benchmark counts the frequency of each word in a body of text by iterating through each word in the input file. • The String Match benchmark determines whether a set of two strings is contained in a body of text. It returns a Boolean value for each string as output. Like Word Count, this benchmark also iterates through each word in the input file. • The 3D Histogram benchmark generates a three-dimensional histogram that tallies the frequency of each RGB color component in an image (Figure 2a). The output is an array for each color component that holds the frequency of each intensity value. • The Linear Regression benchmark iterates over a collection of cartesian points (x, y) and computes a number of coefficients for linear regression: namely, x, y, x ∗ x, x ∗ y, y ∗ y. All benchmarks read input data from a text file saved on HDFS. For the generated Hadoop solutions, class org.apache.hadoop.mapred.FileInputFormat is used to read and split data across multiple mappers. 4.2 Compilation Performance This section reports the time that C ASPER takes to generate Hadoop implementations and discusses the quality of these implementations. 4.2.1 Scalability Table 1 shows the average time (over 5 runs) required to synthesize a summary for each of the five benchmarks. C ASPER synthesized Hadoop implementations for all benchmarks within an hour. Simpler benchmarks, such as Summation and Word Count, were converted in under a minute and required only one iteration of grammar generation. No benchmark required more than two iterations to successfully synthesize an implementation. Benchmark Program Analysis Synthesis and BMC # of Grammar Iterations Summation Word Count String Match 3D Histogram Linear Regression < 1s < 1s < 1s < 1s < 1s 13s 44s 1406s 2355s 1801s 1 1 2 2 2 Table 1: Average time for C ASPER to synthesize each benchmark. M. B. S. Ahmad & A. Cheung 4.2.2 79 Sources of Parallelism A MapReduce program has two primary sources of parallelism. First, processing can be parallelized in the map phase by partitioning the input data and spawning multiple mappers to process each partition simultaneously. Second, the reduce phase can be executed in parallel by grouping data to separate keys and aggregating for each key simultaneously. Hadoop also supports the use of combiners. Before the shuffle phase, combiners—if used—aggregate data locally on every node to offer additional parallelism and decrease the amount of data that needs to be shuffled. We now discuss the implementations C ASPER generated and how each leveraged both map and reduce side parallelism. The Summation benchmark produces as output a single integer variable. All data must be aggregated together and cannot be split to multiple keys. The translated solution emits a key-value pair (0, number) for each number in the input dataset during the map phase. These key-value pairs are aggregated locally on each node in parallel before being sent to the reducer. Note that key 0 is the unique ID for the output variable. The C ASPER-generated implementation of the Word Count benchmark emits (word, 1) for each word encountered. The reducer then sums the values for each key. All nodes aggregate data locally (using a combiner) to compute word counts for the assigned data partition before the reducer aggregates intermediate results. In addition, C ASPER uses the words as keys. Therefore, the aggregation for different words is performed in parallel. The generated String Match benchmark implementation parallelizes the search process. Each mapper iterates its assigned partition of text and emits (key,true) whenever a key being searched is encountered. The data is locally aggregated by doing a disjunction of all values for a given key. Reduce side parallelism is leveraged as each key is aggregated in parallel. The 3D Histogram benchmark resembles the word count problem. Hence, the C ASPER generated implementation iterates over each pixel and emits ((color, intensity), 1), where the key is a tuple of color and the intensity value. Data is aggregated in parallel in the reduce phase for each index of each histogram, for a total of 255×3 keys. As with the preceding benchmarks, data is locally aggregated before shuffling. Linear Regression resembles the summation benchmark. All coefficients for a given point (x, y, x ∗ x, y ∗ y, and x ∗ y) are calculated and emitted by the mapper, with a different key corresponding to each coefficient. For each key, the values are aggregated (by summation) locally before being globally reduced. As is evident from all these benchmarks, C ASPER generated non-trivial implementations. C ASPER leveraged reduce side parallelism, reducing each output variable in parallel by assigning to each variable a unique ID and reducing data for each variable ID in parallel. For arrays, even greater parallelism was achieved by reducing each index of the array in parallel. C ASPER also exploited map side parallelism by evaluating expressions before they are emitted by the mapper (e.g., as in Linear Regression). Lastly, C ASPER used the reduce class as a combiner to locally aggregate data whenever the reduce input and output key-value pairs were of the same type. To evaluate the quality of optimization C ASPER achieved, we compared the runtime performance of the original sequential implementations to the Hadoop implementations generated. We also examined the performance when synthesized summaries were manually translated to the Spark framework. Finally, to add context, we compared the performance of Spark implementations generated by MOLD. Figure 5 graphs the results of all five benchmarks against different dataset sizes. Leveraging Parallel Data Processing Frameworks with Verified Lifting 1200 800 2400 Sequential Hadoop Spark Mold Execution time (s) Execution time (s) 1600 400 0 1800 1200 1000 Sequential Hadoop Spark Mold Execution time (s) 80 600 20 30 40 Input Size (GB) 50 10 (a) Summation 1200 800 20 30 40 Input Size (GB) 250 50 10 (b) Word Count 2000 Sequential Hadoop Spark Mold Execution time (s) Execution time (s) 1600 500 0 0 10 750 Sequential Hadoop Spark Mold 400 0 1500 1000 20 30 40 Input Size (GB) 50 (c) String Match Sequential Hadoop Spark Mold 500 0 10 20 30 40 Input Size (GB) 50 (d) Histogram 10 20 30 40 Input Size (GB) 50 (e) Linear Regression Figure 5: Performance comparison of original implementations (blue) vs C ASPER optimized Hadoop (orange) and Spark (Green) implementations. Performance of implementations when optimized using MOLD added for reference (yellow). 4.2.3 Alternate Implementations As discussed, C ASPER generates non-trivial implementations that effectively leverage the parallelism offered by Hadoop MapReduce. However, these implementations may not be the most efficient ones. For the 3D Histogram benchmark, an alternative Hadoop implementation would be to emit for each pixel in the input data key-value pairs of the form (intensity, color). Hadoop would then group the data by the 256 intensity values. Aggregation would involve simply counting the number of times each color (Red, Green, or Blue) appears for a given key. Whether C ASPER generates this implementation or the one discussed earlier in the paper depends upon which implementation the synthesizer discovers first. An important opportunity for future work is to enable C ASPER to use heuristics to reason about the optimal implementation. 4.3 Performance of the Generated Benchmarks In all five benchmarks, the generated Hadoop implementations were not only faster than their sequential counterparts but they also scaled better. Even for our smallest dataset (10GB), the Hadoop implementations outperformed the original implementations. The average speed up for Hadoop implementations across all benchmarks was 3.3× with a maximum speedup of 4.5× in the case of String Match. Translating the summaries synthesized by C ASPER into Spark yielded even higher speedups (up to 8.1×) since Spark uses cluster memory much more efficiently and minimizes disk I/O between different MapReduce stages. Extending C ASPER to automatically generate Spark code from the synthesized summary is currently a work in progress. M. B. S. Ahmad & A. Cheung 5 81 Related Work MapReduce DSLs. MapReduce is a popular programming model. It scales elastically, integrates well with distributed file systems, and abstracts away from the user low-level synchronization details. As such, many systems have been built that compile code down to MapReduce [3–5]. However, these systems provide their own high-level DSLs in which the users must use to express their computation. In contrast, C ASPER works with native Java programs and infers rewrites automatically. Source-to-Source Compilers. Many efforts translate programs directly from low-level languages into high-level DSLs. MOLD [15], a source-to-source compiler, relies on syntax-directed rules to convert native Java programs to Apache Spark. Unlike MOLD, we translate on the basis of program semantics. This eliminates the need for rewrite rules, which are difficult to generate and brittle to code pattern changes. Many source-to-source compilers have been built in other domains for similar purposes. For instance, [13] evaluates numerous tools for C to CUDA transformations. However, these compilers often require manual efforts to annotate the original source code. Our methodology works with code without any user annotation. Synthesizing Efficient Implementations. Extensive literature describes the use of synthesis to generate efficient implementations and optimizing programs. [19] is the most recent research that attempts to synthesize MapReduce solutions with user-provided input and output examples. QBS [7] and STNG [11] both use verified lifting and synthesis to convert low-level languages to specialized high-level DSLs for database applications and stencil computations respectively. 6 Conclusion This paper presented C ASPER, a compiler that automatically re-targets native Java code to execute on Hadoop. C ASPER uses verified lifting to convert code fragments in the original program to a high-level representation that can then be translated to generate equivalent Hadoop tasks for distributed data processing. We implemented a prototype of C ASPER and evaluated its performance on several MapReduce benchmarks. Our experiments show that C ASPER can translate all input benchmarks, and the generated programs can run on average 3.3× faster compared to their sequential counterparts. 7 Acknowledgment The authors are grateful for the support of NSF grants CNS-1563788 and IIS-1546083 as well as DARPA award FA8750-16-2-0032, and DOE award DE-SC0016260. References [1] Tyler Akidau, Robert Bradshaw, Craig Chambers, Slava Chernyak, Rafael J. Fernandez-Moctezuma, Reuven Lax, Sam McVeety, Daniel Mills, Frances Perry, Eric Schmidt & Sam Whittle (2015): The Dataflow Model: A Practical Approach to Balancing Correctness, Latency, and Cost in Massive-Scale, Unbounded, Out-of-Order Data Processing. Proceedings of the VLDB Endowment 8, pp. 1792–1803, doi:10.14778/2824032.2824076. [2] Apache Hadoop. http://hadoop.apache.org. Accessed: 2016-04-19. 82 Leveraging Parallel Data Processing Frameworks with Verified Lifting [3] Apache Hive. http://hive.apache.org. Accessed: 2016-04-20. [4] Apache Pig. http://tensorflow.org/. Accessed: 2016-05-01. [5] Apache Spark. https://spark.apache.org. Accessed: 2016-04-19. [6] Apache Storm. http://storm.apache.org. Accessed: 2016-04-19. [7] Alvin Cheung, Armando Solar-Lezama & Samuel Madden (2013): Optimizing Database-backed Applications with Query Synthesis. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, ACM, New York, NY, USA, pp. 3–14, doi:10.1145/2491956.2462180. [8] Michael D. Ernst, Jeff H. Perkins, Philip J. Guo, Stephen McCamant, Carlos Pacheco, Matthew S. Tschantz & Chen Xiao (2007): The Daikon System for Dynamic Detection of Likely Invariants. Sci. Comput. Program. 69(1-3), pp. 35–45, doi:10.1016/j.scico.2007.01.015. [9] GraphLab Create. https://dato.com/. Accessed: 2016-04-20. [10] C. A. R. Hoare (1969): An Axiomatic Basis for Computer Programming. Communications of the ACM 12(10), pp. 576–580, doi:10.1145/363235.363259. [11] Shoaib Kamil, Alvin Cheung, Shachar Itzhaky & Armando Solar-Lezama (2016): Verified Lifting of Stencil Computations. SIGPLAN Not. 51(6), pp. 711–726, doi:10.1145/2980983.2908117. [12] MongoDB 3.2. https://www.mongodb.org. Accessed: 2016-04-19. [13] Cedric Nugteren & Henk Corporaal (2012): Introducing ’Bones’: A Parallelizing Source-to-source Compiler Based on Algorithmic Skeletons. In: Proceedings of the 5th Annual Workshop on General Purpose Processing with Graphics Processing Units, GPGPU-5, ACM, New York, NY, USA, pp. 1–10, doi:10.1145/2159430.2159431. [14] Polyglot. http://www.cs.cornell.edu/Projects/polyglot/. Accessed: 2016-05-01. [15] Cosmin Radoi, Stephen J. Fink, Rodric Rabbah & Manu Sridharan (2014): Translating Imperative Code to MapReduce. In: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & Applications, OOPSLA ’14, ACM, New York, NY, USA, pp. 909–927, doi:10.1145/2660193.2660228. [16] Jonathan Ragan-Kelley, Connelly Barnes, Andrew Adams, Sylvain Paris, Frédo Durand & Saman Amarasinghe (2013): Halide: A Language and Compiler for Optimizing Parallelism, Locality, and Recomputation in Image Processing Pipelines. In: Proceedings of the 34th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’13, ACM, New York, NY, USA, pp. 519–530, doi:10.1145/2491956.2462176. [17] Colby Ranger, Ramanan Raghuraman, Arun Penmetsa, Gary Bradski & Christos Kozyrakis (2007): Evaluating MapReduce for Multi-core and Multiprocessor Systems. In: Proceedings of the 2007 IEEE 13th International Symposium on High Performance Computer Architecture, HPCA ’07, IEEE Computer Society, Washington, DC, USA, pp. 13–24, doi:10.1109/HPCA.2007.346181. [18] SKETCH. https://people.csail.mit.edu/asolar/. Accessed: 2016-05-01. [19] Calvin Smith & Aws Albarghouthi (2016): MapReduce Program Synthesis. SIGPLAN Not. 51(6), pp. 326– 340, doi:10.1145/2980983.2908102. [20] Armando Solar-Lezama, Gilad Arnold, Liviu Tancau, Rastislav Bodik, Vijay Saraswat & Sanjit Seshia (2007): Sketching Stencils. In: Proceedings of the 28th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’07, ACM, New York, NY, USA, pp. 167–178, doi:10.1145/1273442.1250754. [21] Saurabh Srivastava & Sumit Gulwani (2009): Program Verification Using Templates over Predicate Abstraction. In: Proceedings of the 30th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’09, ACM, New York, NY, USA, pp. 223–234, doi:10.1145/1542476.1542501. M. B. S. Ahmad & A. Cheung 83 [22] Arvind K. Sujeeth, Kevin J. Brown, Hyoukjoong Lee, Tiark Rompf, Hassan Chafi, Martin Odersky & Kunle Olukotun (2014): Delite: A Compiler Architecture for Performance-Oriented Embedded Domain-Specific Languages. ACM Trans. Embed. Comput. Syst. 13(4s), pp. 134:1–134:25, doi:10.1145/2584665. [23] TensorFlow. http://tensorflow.org/. Accessed: 2016-04-20.
6cs.PL
Interpretable Apprenticeship Learning with Temporal Logic Specifications arXiv:1710.10532v1 [cs.SY] 28 Oct 2017 Daniel Kasenberg and Matthias Scheutz Abstract— Recent work has addressed using formulas in linear temporal logic (LTL) as specifications for agents planning in Markov Decision Processes (MDPs). We consider the inverse problem: inferring an LTL specification from demonstrated behavior trajectories in MDPs. We formulate this as a multiobjective optimization problem, and describe state-based (“what actually happened”) and action-based (“what the agent expected to happen”) objective functions based on a notion of “violation cost”. We demonstrate the efficacy of the approach by employing genetic programming to solve this problem in two simple domains. I. I NTRODUCTION Apprenticeship learning, or learning behavior by observing expert demonstrations, allows artificial agents to learn to perform tasks without requiring the system designer to explicitly specify reward functions or objectives in advance. Apprenticeship learning has been accomplished in agents in stochastic domains, such as Markov Decision Processes (MDPs), by means of inverse reinforcement learning (IRL), in which agents infer some reward function presumed to underlie the observed behavior. IRL has recently been criticized, especially in learning ethical behavior [2], because the resulting reward functions (1) may not be easily explained, and (2) cannot represent complex temporal objectives. Recent work (e.g., [5], [8], [25]) has proposed using linear temporal logic (LTL) as a specification language for agents in MDPs. An agent in a stochastic domain may be provided a formula in LTL, which it must satisfy with maximal probability. These approaches require the LTL specification to be specified a priori (e.g., by the system designer, although [6] construct specifications from natural language instruction). This paper proposes combining the virtues of these approaches by inferring LTL formulas from observed behavior trajectories. Specifically, this inference problem can be formulated as multiobjective optimization over the space of LTL formulas. The two objective functions represent (1) the extent to which the given formula explains the observed behavior, and (2) the complexity of the given formula. The resulting specifications are interpretable, and can be subsequently applied to new problems, but do not need to be specified in advance by the system designer. The key contributions of this work are (1) the introduction of this problem and its formulation as an optimization problem; and (2) the notion of violation cost, and the stateand action-based objectives based on this notion. Authors are with the Department of Computer Science, Tufts University, Medford, MA 02155, USA. The corresponding author is [email protected] In the remainder of the paper, we first discuss related work; we then describe our formulation of this problem as multiobjective optimization, defining a notion of “violation cost” and then describing state-based and action-based objectives, corresponding to inferring a specification from “what actually happened” and “what the demonstrator expected to happen” respectively. We demonstrate the usefulness of the formulation by using genetic programming to optimize these objectives in two domains, called SlimChance and CleaningWorld. We discuss issues pertaining to our approach and directions for future work, and summarize our results. II. R ELATED W ORK The proposed problem draws primarily upon ideas from apprenticeship learning (particularly, inverse reinforcement learning), stochastic planning with temporal logic specifications, and inferring temporal logic descriptions of systems. A. Apprenticeship Learning Apprenticeship learning, the problem of learning correct behavior by observing the policies or behavioral trajectories of one or more experts, has predominantly been accomplished by inverse reinforcement learning (IRL) [19], [1]. IRL algorithms generally compute a reward function that “explains” the observed trajectories (typically, by maximally differentiating them from random behavior). Complete discussion of the many types of IRL algorithms is beyond the scope of this paper. The proposed approach bears some resemblance to IRL, particularly in its inputs (sets of finite behavioral trajectories). Instead of computing a reward function based on the observed trajectories, however, the proposed approach computes a formula in linear temporal logic that optimally “explains” the data. This addresses the criticisms of [2], who claim that IRL is insufficient in morally and socially important domains because (1) reward functions can be difficult for human instructors to understand and correct, and (2) some moral and social goals may be too temporally complex to be representable using reward functions. B. Stochastic Planning with Temporal Logic Specifications There has been a wealth of work in recent years on providing agents in stochastic domains (namely, Markov Decision Processes) with specifications in linear temporal logic (LTL). The most straightforward approach is [5], which we describe further in section III-C. The problem is to compute some policy which satisfies some LTL formula with maximal probability. More sophisticated approaches consider the same problem in the face of uncertain transition dynamics [25], [8], partial observability [23], [22], and multi-agent domains [16], [11]. Also relevant to the proposed approach is the idea of “weighted skipping” that appears (in deterministic domains) in [21], [24], [15]. The problem of inferring LTL specifications from behavior trajectories is complementary to the problem of stochastic planning with LTL specifications, much as IRL is complementary to “traditional” reinforcement learning (RL). Specifications learned using the proposed approach may be used for planning, and trajectories generated from planning agents may be used to infer the underlying LTL specification. C. Inferring Temporal Logic Rules from Agent Behavior The task of generating temporal logic rules that describe data is not a new one. Automatic identification of temporal logic rules describing the behavior of software programs (in the category of “specification mining”) has been attempted in, e.g., [9], [10], [17]. Lemieux et al’s Texada [17] allows users to enter custom templates for formulas and retrieves all formulas satisfied by the observed traces up to user-defined support and confidence thresholds; this differs from the work of Gabel and Su, who decompose complex specifications into combinations of predefined templates. Specifications in a temporal logic (rPSTL) have also been inferred from data in continuous control systems in [13]. Each approach deals with (deterministic) program traces. The proposed approach is most strongly influenced by [4], which casts the task of inferring temporal logic specifications for finite state machines as a multiobjective optimization problem amenable to genetic programming. Much of our approach follows from this work; our novel contribution is introducing the problem of applying such methods to agent behavior in stochastic domains, and in particular our notion of the violation cost as an objective function. III. P RELIMINARIES In this section we provide formal definitions of Markov Decision Processes (MDPs) and linear temporal logic (LTL); we then outline the approach taken in [5] for planning to satisfy (with maximum probability) LTL formulas in MDPs. A. Markov Decision Processes The proposed approach pertains to agents in Markov Decision Processes (MDPs) augmented with a set, Π, of atomic propositions. Since reward functions are not important to this problem, we omit them. All notation and references to MDPs in this paper assume this construction. Formally, a Markov Decision Process is a tuple M = hS, U, A, P, s0 , Π, Li where • S is a (finite) set of states; • U is a (finite) set of actions; U • A : S → 2 specifies which actions are available in each state; • • • • P : S × U × S → [0, 1] is a transition function, with P (s, a, s′ ) = 0 if a ∈ / A(s), so that P (s, a, s′ ) is the probability of transitioning to s′ by beginning in s and taking action a; s0 is an initial state; Π is a set of atomic propositions; and L : S → 2Π is the labeling function, so that L(s) is the set of propositions that are true in state s. A trajectory in an MDP specifies the path of an agent through the state space. A finite trajectory is a finite sequence of state-action pairs followed by a final state (e.g., τ = (s0 , a0 ), · · · , (sT −1 , aT −1 ), sT ); an infinite trajectory takes T → ∞, and is an infinite sequence of state-action pairs (e.g., τ = (s0 , a0 ), (s1 , a1 ), · · · ). A sequence (finite or infinite) is only a trajectory if P (st , at , st+1 ) > 0 for all t ∈ {0, · · · , T − 1}. We will denote by TrajM the set of all finite trajectories in an MDP M, and by ITrajM the set of all infinite trajectories in M. We will denote by τ |T the T -time step truncation (s0 , a0 ), · · · , (sT −1 , aT −1 ), sT of an infinite trajectory r = (s0 , a0 ), (s1 , a1 ), · · · . A policy M : TrajM × U → [0, 1] is a probability distribution over an agent’s next action, given its previous (finite) trajectory. A policy is said to be deterministic if, for each trajectory, the returned distribution allots nonzero probability for only one action; we write M : TrajM → U . A policy is said to be stationary if the returned distribution depends only on the last state of the trajectory; we write π : S × U → [0, 1]. We denote ITrajM M the set of all infinite trajectories that may occur under a given policy M . More formally, ITrajM M = {τ = (s0 , a0 ), (s1 , a1 ), · · · ∈ ITrajM : M (τ |T , aT ) > 0 for all T } B. Linear Temporal Logic Linear temporal logic (LTL) [20] is a multimodal logic over propositions that linearly encodes time. Its syntax is as follows: φ ::=⊤ | ⊥ | p, where p ∈ Π | ¬φ | φ1 ∧ φ2 | φ1 ∨ φ2 | φ1 → φ2 | Xφ | Gφ | Fφ | φ1 U φ2 Here Xφ means “in the next time step, φ”; Gφ means “in all present and future time steps, φ”; Fφ means “in some present or future time step, φ”; and φ1 U φ2 means “φ1 will be true until φ2 holds”. The truth-value of an LTL formula is evaluated over an infinite sequence of valuations σ0 , σ1 , · · · , where for all i, σi ⊆ Π. We say σ0 , σ1 , · · ·  φ if φ is true given the infinite sequence of valuations σ0 , σ1 , · · · . There is thus a clear mapping between infinite trajectories and LTL formulas. We abuse notation slightly and define L((s0 , a0 ), (s1 , a1 ), · · · ) = L(s0 ), L(s1 ), · · · We abuse notation further and say that for any τ ∈ ITrajM , τ  φ if L(τ )  φ. We define the probability that a given policy satisfies an LTL formula φ by M PrM M (φ) = Pr{τ ∈ ITrajM : τ  φ} That is, the probability that an infinite trajectory under M will satisfy φ. Each LTL formula can be translated into a deterministic Rabin automaton (DRA), a finite automaton over infinite words. DRAs are the standard approach to model checking for LTL. A DRA is a tuple D = hQ, Σ, δ, q0 , F i where • Q is a finite set of states; Π • Σ is an alphabet (in this case, Σ = 2 , so words are infinite sequences of valuations); • δ : Q × Σ → Q is a (deterministic) transition function; • q0 is an initial state; and • F = {(Fin1 , Inf 1 ), · · · , (Fink , Inf k )}, where Fin ⊆ Q, Inf ⊆ Q for all (Inf, Fin) ∈ F specifies the acceptance conditions. A run r = q0 , q1 , · · · of a DRA is an infinite sequence of DRA states such that there is some word σ0 σ1 · · · such that δ(qi , σi ) = qi+1 for all i. A run r is considered accepting if there exists some (Fin, Inf) ∈ F such that for all q ∈ Fin, q is visited only finitely often in r, and Inf is visited infinitely often in r. C. Stochastic Planning with LTL Specifications Planning to satisfy a given LTL formula φ within an MDP M with maximum probability generally follows the approach of [5]. The planning agent runs the DRA for φ alongside M by constructing a product MDP M× which augments the state space to include information about the current DRA state. Formally, the product of an MDP M = hS, U, A, T, s0 , Π, Li and a DRA D = hQ, 2Π , δ, q0 , F i is an MDP × × M× = hS × , U × , A× , P × , s× 0 ,Π ,L i where × • S = S × Q; × • U = U ; A× = A; × ′ ′ • P ((s, q), a, (s , q )) = ( P (s, a, s′ ) if q ′ = δ(q, L(s′ )) 0 otherwise s× 0 = (s0 , δ(q0 , L(s0 ))) × × • Π = Π; and L = L. The agent constructs the product MDP M× , and then computes its accepting maximal end components (AMECs). An end component E of an MDP M× is a set of states SE ⊂ S × and an action restriction (mapping from states to sets of actions) AE : SE → 2U such that (1) any agent in SE that performs only actions as specified by AE will remain in SE ; and (2) any agent with a policy assigning nonzero probability to all actions in AE is guaranteed to eventually visit each state in AE infinitely often. An end component thus specifies a set of states SE such that with an appropriate choice in policy, the agent can guarantee that it will remain in SE forever, and that it will reach every state in SE infinitely often. An end component is maximal if it is not a proper subset of another end component. An end component is accepting if there is some (Fin, Inf) ∈ F such that (1) if q ∈ Fin, then (s, q) ∈ / SE for all s ∈ S; and (2) there exists some q ∈ Inf, s ∈ S such that (s, q) ∈ SE . In this case, by entering SE and choosing an appropriate policy (for instance, a uniformly random policy over AE ), the agent guarantees that the DRA run will be accepting. A method for computing the AMECs of the product MDP is found in [3]. The problem of satisfying φ with maximal probability is thus reduced to the problem of reaching, with maximal probability, any state in any AMEC. [5] shows how this can be solved using linear programming. IV. O PTIMIZATION P ROBLEM Suppose that an agent is given some set of finite behavior trajectories τ 1 , · · · , τ m ∈ TrajM , where τ i = (si0 , ai0 ), · · · , (siTi −1 , aiTi −1 ), siTi for all i ∈ {1, · · · , m}. We refer to the agent whose trajectories are observed as the demonstrator, and the agent that observes the trajectories as the apprentice. There may be several demonstrators satisfying the same objectives; this does not affect the proposed approach. The proposed problem is to infer an LTL specification that well (and succinctly) explains the observed trajectories. This can be cast as a multiobjective optimization problem with two objective functions: 1) An objective function representing how well a candidate LTL formula explains the observed trajectories (and distinguishes them from random behavior); and 2) An objective function representing the complexity of a candidate LTL formula. This section proceeds by describing a notion of “violation cost” (and defining the violation cost of infinite trajectories and policies) and using it to define two alternate objective functions representing (a) how well a candidate formula explains the actual observed state sequence (a “state-based” objective function), and (b) how well a candidate formula explains the actions of the demonstrator in each state (an “action-based” objective function). We then describe the simple notion of formula complexity we will utilize, and formulate the optimization problem. • A. Violation Cost We are interested in computing LTL formulas that well explain the demonstrator’s trajectories. These formulas should be satisfied by the observed behavior, but not by random behavior within the same MDP (since, for example, the trivial formula G ⊤ will be satisfied by the observed behavior, but also by random behavior). Ideally we could assign a “cost” either to trajectories (finite or infinite) or to policies (and, particularly, to the uniformly random policy in M), where the cost of a trajectory or policy corresponds to its adherence to or deviance from the specification. Given such function C,the objective would be to minimize P a cost i C(τ ) − C(πrand ) , where πrand : S × U → [0, 1] is i the uniformly-random (stationary) policy over M: ( 1 if a ∈ A(s) πrand (s, a) = |A(s)| 0 otherwise Π⊗ = Π, L⊗ = L The state s−1 and action a−1 are added so that the agent may choose to “skip” time step t = 0. This is necessary for the case that s0 violates the specification. Note that the transition dynamics of M⊗ are such that N (the set of “skipped” time step indices) can be defined as The obvious choice of such a cost function (over infinite trajectories τ ) would be the indicator function 1τ 2φ which returns 0 if τ  φ and 1 otherwise; this function may be extended to general policies M by 1 − PrM M (φ). This function, however, cannot distinguish between small and large deviances from the specification. For example, given the specification G p, this function cannot differentiate between τ such that p is almost always true and τ such that p is never true. We thus propose a more sophisticated cost function. For τ ∈ ITrajM , N a set of nonnegative integers, we define τ \N to be the subsequence of τ omitting the stateaction pairs with time step indices in N . For example, (s0 , a0 ), (s1 , a1 ), (s2 , a2 ), , · · · \{1} = (s0 , a0 ), (s2 , a2 ), · · · . Each time step with an index in N is said to be “skipped”. We define the violation cost of an infinite trajectory τ ∈ ITrajM subject to the formula φ as the (discounted) minimum number of time steps that must be skipped in order for the agent to satisfy the formula: T C(s⊗ , (a, ã), s⊗ ) = 1ã=susp Violφ (τ ) = min ∞ X N ⊆N0 τ \N φ t=0 γ t 1t∈N (1) Note that if τ  φ, then Violφ (τ ) = 0. In order to define a similar measure for policies, we must construct an augmented product MDP M⊗ , which is similar to M× as described in section III-C, but allows an agent to “skip” states by performing at each time step (simultaneously with their normal actions), a “DRA action” ã ∈ {keep, susp}, where keep causes the DRA to transition as usual, and susp causes the DRA to not update in response to the new state. Formally, given an MDP M = hS, U, A, T, s0 , Π, Li and a DRA D = hQ, Σ, δ, q0 , F i corresponding to the specification φ, we may construct a product MDP M⊗ = ⊗ ⊗ hS ⊗ , U ⊗ , A⊗ , T ⊗ , s⊗ −1 , Π , L i as follows: ⊗ • S = (S ∪ {s−1 }) × Q ⊗ • U = (U ∪ {a(−1 }) × Ũ , where Ũ = {keep, susp} {a−1 } × Ũ if s = s−1 ⊗ • A ((s, q)) = A(s) × Ũ otherwise ⊗ • s−1 = (s−1 , q0 ) ⊗ ⊗ • P (s−1 , (a−1 , keep), (s0 , δ(q0 , L(s0 )))) = 1 ⊗ ⊗ • P (s−1 , (a−1 , susp), (s0 , q0 )) = 1 ⊗ ′ ′ • Otherwise, P ((s, q), (a, ã), (s , q )) =  ′ ′ ′  P (s, a, s ) if q = δ(q, L(s )) and ã = keep P (s, a, s′ ) if q ′ = q and ã = susp   0 otherwise • N = {t ∈ N0 : ãt−1 = susp} (2) ′ Define the transition cost s⊗ , (a, ã), s⊗ in M⊗ as ′ (3) The violation cost of a (non-product) trajectory τ can then be rewritten as a discounted sum of the transition costs at each stage, minimized over the DRA actions ã−1 , ã0 , ã1 , · · · , subject to the constraint that the DRA run from carrying out τ and the DRA actions must be accepting. This indicates that the violation cost of a policy π may be thought of as the state-value function for the policy π with respect to T C. Indeed, we will define the violation cost of a policy this way. We define a product policy to be a stationary policy π ⊗ : ⊗ S × (U ∪ {a−1 }) → [0, 1]. When we consider the violation cost of a policy, we will assume a product policy of this form. There are two reasons for this. First, when evaluating a candidate specification, we wish to assume the demonstrator had knowledge of that specification (or else we would be unable to notice complex temporal patterns in agent behavior), and thus that the demonstrator’s policy is over product states. Second, we wish to allow the demonstrator to observe the new (non-product) state st before deciding whether to “skip” time step t. That is, st should be observed before ãt−1 is chosen, which is inconsistent with the typical policy π : S ⊗ × U ⊗ → [0, 1] over the product space. We can easily construct a product policy from the uni⊗ formly random policy on M. We define πrand ((s, q), a) = πrand (s, a) for all s ∈ S, a ∈ A. Upon constructing the product MDP M⊗ , we compute its S SE i , AMECs (as in section III-C). Then let Sgood = i∈{1,··· ,p} and let Sbad be the set of states in the product space from which no state in Sgood can be reached; these can be determined by breadth-first search. We can use a form of the Bellman update equation to perform policy evaluation on a product policy π ⊗ . For each state s⊗ ∈ Sbad , we initialize the cost of this state 1 , and we do not to the maximum discounted cost, 1−γ update these costs. This is done to enforce the constraint that the minimization should be over accepting DRA runs. Otherwise, the violation cost will always be trivially zero (since ã = keep will always be picked). The update equation has the following form: X  X π ⊗ ((s, q), a) Viol(k+1) ((s, q)) ← P (s, a, s′ ) a∈A(s) s′ ∈S min{1 + γViol(k) (s′ , q), γViol(k) (s′ , δ(q, L(s′ )))}  (4) Algorithm 1 Best DRA state sequence for finite state sequence s0 , · · · , sT π⊗ G ET R ABIN S TATE S EQUENCE(V iolφrand , M⊗ , Sbad , s0 , · · · , sT ) Ct [s⊗ ] ← ∞ for all t ∈ {−1, 0, · · · , T }, s⊗ ∈ S ⊗ R−1 = {s⊗ −1 } C−1 [s⊗ −1 ] ← 0 seq−1 [s⊗ −1 ] ← q0 for t ∈ {0, · · · , T } do Rt = ∅ for (s, q) ∈ Rt−1 do q ′ ← δ(q, L(st )) Rt ← Rt ∪ {(st , q), (st , q ′ )} if Ct−1 [(s, q)] + γ t < Ct [(st , q)] then Ct [(st , q)] ← Ct−1 [(s, q)] + γ t seqt [(st , q)] ← (seqt−1 [(s, q)], q) end if if Ct−1 [(s, q)] < Ct−1 [(st , q ′ )] then Ct [(st , q ′ )] ← Ct−1 [(s, q)] seqt [(st , q ′ )] ← (seqt−1 [(s, q)], q ′ ) end if end for end for π⊗ argmin CT [s⊗ ] + γ T +1 Violφrand (s⊗ ) return s⊗ T ← 1: function 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: 15: 16: 17: 18: 19: 20: 21: s⊗ ∈RT \Sbad π⊗ seqT [s⊗ T ], and 16). The sequence seqt [(st , qt+1 )] = q0 , · · · , qT +1 that achieves this minimal cost is also computed (lines 5, 13, and 17). The apprentice then assumes that the demonstrator acted randomly from time step T + 1 onward. Although this assumption is probably incorrect, it is not entirely unreasonable, since it avoids the assumption that the demonstrator attempted to satisfy the formula after time step T + 1, which would artificially drive the net violation cost down; this allows the apprentice to reuse values that are already computed in order to evaluate the random policy. Employing this assumption, the apprentice determines the optimal product-space interpretation as seqT [s⊗ T ], where s⊗ T = π⊗ argmin CT [s⊗ ] + γ T +1 Violφrand (s⊗ ) 1) State-based objective function: We first consider an approach to estimating the violation cost of a finite trajectory that considers only the states visited in the trajectory, ignoring the demonstrator’s actions. The state-based violation cost is the minimand of (6), which is the second value returned by Algorithm 1: π⊗ T +1 CT [s⊗ Violφrand (s⊗ T]+γ T) 22: end function T +1 ViolSφ (τ ) = CT [s⊗ Violφrand (s⊗ T]+γ T) 1 The min{·} in (4) is where the optimization over ã (implicitly) occurs. Choosing ã = susp incurs a transition cost of 1 and then causes the DRA to remain in state q; choosing ã = keep incurs no transition cost, but causes the DRA to transition to state δ(q, L(s′ )). The ability for the demonstrator to optimize over ã after observing the new state s′ corresponds to the location of the min{·} in the Bellman update. We define the violation cost of a policy as the function that results when running this update equation to convergence: ⊗ Violπφ ((s, q)) = lim Viol(k) ((s, q)) k→∞ (5) We now consider state-based (“what actually happened”) and action-based (“what the agent expected to happen”) objective functions, for explaining sets of finite trajectories. The crux of both the state- and action-based objective functions is Algorithm 1. Given a finite sequence of states s0 , · · · , sT , Algorithm 1 determines the “optimal productspace interpretation” of s0 , · · · , sT . We define a product space interpretation of a sequence of states s0 , · · · , sT in an MDP M as a sequence of DRA states q0 , · · · , qT +1 such that, for all i ∈ {1, · · · , T + 1}, either qi = qi−1 , or qi = δ(qi−1 , L(si−1 )). That is, a product-space interpretation specifies a possible trajectory in M⊗ that is consistent with the observed trajectory in M. Algorithm 1 uses dynamic programming to determine, for each time step t, the set of states Rt of DRA states that the demonstrator could be in at time t (lines 3,7, and 10), as well as the minimal violation cost Ct [qt+1 ] that would need to be accrued in order to be in each such state qt+1 (lines 2,4, 12, (6) s⊗ ∈RT \Sbad (7) m Thus the state-based objective function for τ , · · · , τ is the sum of the estimated violation costs of all observed finite trajectories, less m times the expected violation cost of the random policy from the initial state: ! m X π⊗ S S i Violφ (τ ) − mViolφrand (s⊗ (8) Obj (φ) = −1 ) i=1 The main drawback of the state-based approach is that by ignoring the observed actions, the apprentice neglects a crucial detail: that what the demonstrator “expected” or “intended” to satisfy may differ from what actually was satisfied. The fact that p did not occur does not mean that the demonstrator was not attempting to make p occur with maximal probability, particularly if p is a very rare event. To solve this problem, we consider an action-based approach. 2) Action-based objective function: We now consider estimating the violation cost of a finite trajectory τ by using the observed state-action pairs to compute a partial policy over the product MDP M⊗ . To compute the action-based violation cost of a set of trajectories τ 1 , · · · , τ m (Algorithm 2), the apprentice first runs Algorithm 1 to determine the optimal product-space interpretation q0i , · · · , qTi +1 for each trajectory τ i (line 4), and uses this to compute the resulting product-space sequence ⊗i ⊗i i i s−1 , · · · , s⊗i T where st = (st , qt+1 ). The assumption that for each i ∈ {1, · · · , m}, t ∈ {0, · · · , Ti − 1}, the demonstrator performed ait when in the inferred product MDP state s⊗i t , induces an action restriction (lines 6 and 11) A∗ : S ⊗ → 2U where  S S 6 ∅ {ait } = {ait } if   i,t: i,t: ∗ ⊗ ⊗i ⊗ A (s ) = s⊗ =s⊗i s =st   ⊗ t⊗ A (s ) otherwise Algorithm 2 Action-based violation cost of set of finite set of finite state-action trajectories τ 1 , · · · , τ m where τ i = (si0 , ai0 ), · · · , (siTi −1 , aiTi −1 ), siTi π rand 1: function ACTION B ASEDV IOLATION C OST (V iolφM 2: 3: 4: 5: 6: 7: 8: 9: 10: 11: 12: 13: 14: , M⊗ , m 1 Sbad , τ , · · · , τ ) A∗ [s⊗ ] ← ∅ for s⊗ ∈ S ⊗ for i ∈ {1, · · · , m} do q0i , · · · , qTi i +1 , V ← G ET R ABIN S TATE S E i i QUENCE (s0, · · · , sTi ) for t ∈ {−1, 0, · · · , Ti − 1} do i i A∗ [(sit , qt+1 )] ← A∗ [(sit , qt+1 )] ∪ {ait } end for end for for s⊗ = (s, q) ∈ S ⊗ do if A∗ [s⊗ ] = ∅ then A∗ [s⊗ ] = A(s) end if end for π ⊗∗ Compute ViolφA using (4) π ⊗∗ 15: return ViolφA (s⊗ −1 ) 16: end function The apprentice may then compute, using the Bellman update rand ⊗ (4), the violation cost of the policy πA (s ) that uniformly∗ randomly chooses an action from A∗ (s⊗ ) at each state s⊗ (line 14): ( 1 if a ∈ A∗ (s⊗ ) ⊗ ⊗ |A∗ (s⊗ )| πA ∗ (s , a) = 0 otherwise The action-based objective function is then π⊗ π⊗ rand ObjA (φ) = ViolφA∗ (s⊗ (s⊗ −1 ) − Violφ −1 ) (9) B. Formula Complexity Given two formulas that equally distinguish between the observed behavior and random behavior, we wish to select the less complex of the two. Here it suffices to simply minimize the number of nodes in the parse tree for the LTL formula (that is, the total number of symbols in the formula). There are also more sophisticated ways to evaluate formula complexity (such as that used in [4]), but they are not necessary for our purposes. C. Multiobjective Optimization Problem Given some set of finite trajectories τ 1 , · · · , τ m , we thus frame the problem of inferring some LTL formula φ that describes τ 1 , · · · , τ m as min (Obj(φ), F C(φ)) φ∈LTL where Obj is either ObjS , as described in (8), or ObjA , as described in (9); F C is formula complexity (in this case, the number of nodes in the formula) as specified in section IV-B. V. E XAMPLES To demonstrate the effectiveness of the proposed objective functions, we employed genetic programming to evolve a set of LTL formulas (where formulas are represented by their parse trees) in two domains. A summary of the domains used is in Table I. In all demonstrations, we used MOEAFramework [12] for genetic programming, using standard tree crossover and mutation operations [14]. We consider (separately) the state-based and action-based objectives. NSGAII over each set of objectives was run for 50 generations with a population size of 100. This process was repeated 20 times. We employed BURLAP [18] for MDP planning, and Rabinizer 3 [7] for converting LTL formulas to DRAs. In each case, we restricted search to formulas of the form G φ. The tables in this section show formulas that are Pareto efficient in at least two NSGA-II runs - that is, there were no solutions within those runs that outperformed them on both objectives. For any Pareto inefficient formula φ, there is some formula φ′ which both (1) better explains the demonstrated trajectories (as measured by the violation-cost objective function) and (2) is simpler. Thus it is reasonable to restrict consideration to only Pareto efficient solutions. A. SlimChance domain The SlimChance domain consists of two states: sGOOD , a “good” state, and sBAD , a “bad” state. The agent has two actions: try, and notry. If the agent performs notry, the next state is always sBAD ; if the agent performs try, the next state is sGOOD with small probability ǫ = 0.01 and sBAD otherwise. Thus, performing the try action is “trying” to make the good state occur, but will rarely succeed. The set Π of atomic propositions for this problem consists of a single proposition good, which is true in sGOOD but false in sBAD . We then suppose that the agent is attempting to satisfy the simple LTL formula G good. A demonstrator attempting to minimize violation cost generated three trajectories of 10 time steps each. This resulted in the following trajectories (note that τ 1 = τ 3 , which occurred randomly): τ 1 , τ 3 =(sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), sBAD τ 2 =(sBAD , try), (sGOOD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), (sBAD , try), sBAD Tables II and III show all solutions that were Pareto efficient in at least two runs, for ObjS and ObjA respectively. The results emphasize the distinction between the two objective functions. In Table II the correct formula G good is Pareto efficient in two runs, but in most runs the obviously-incorrect G ⊥ is the only Pareto efficient formula (and note that ObjS (G ⊥) ≅ ObjS (G good)). In contrast, Table III shows that when using ObjA , the true function G good is Pareto efficient in all twenty runs. TABLE I S UMMARY OF EXAMPLE DOMAINS , WITH RUN TIMES FOR STATE - BASED / ACTION - BASED OBJECTIVES # States 2 77 Domain SlimChance CleaningWorld # Actions 2 5 “Actual” specification G good G (X(vacuum) U roomClean) Time, state-based (s) 174.8 ± 18.0 19139.3 ± 671.2 Time, action-based (s) 372.0 ± 43.3 32932.3 ± 1755.0 TABLE II TABLE IV PARETO EFFICIENT SOLUTIONS IN STATE - BASED S LIM C HANCE PARETO EFFICIENT SOLUTIONS IN STATE - BASED C LEANING W ORLD Formula φ G⊥ G good ObjS (φ) -0.3139852 -0.3139852 F C(φ) 2 2 # Runs 18 2 TABLE III PARETO EFFICIENT SOLUTIONS IN ACTION - BASED S LIM C HANCE Formula φ G good G(good U (X good)) G(good ∨ X good) G((X good) U good) G((X good) ∨ good) ObjA (φ) -0.4623490 -0.4939355 -0.9400473 -0.9400473 -0.9400424 F C(φ) 2 5 5 5 5 # Runs 20 5 5 3 2 Formula φ G roomClean G(F roomClean) G((X roomClean) ∨ vacuum) G((G ⊤) U roomClean) G(F(undock U roomClean)) ObjS (φ) -208.69876 -216.91139 -217.40816 -216.91169 -216.91170 F C(φ) 2 3 5 5 5 # Runs 20 20 2 2 2 TABLE V PARETO EFFICIENT SOLUTIONS IN ACTION - BASED C LEANING W ORLD Formula φ G(roomClean) G(F roomClean) G(vacuum ∨ F roomClean) G(F(roomClean ∨ dock)) G((F roomClean) ∨ dock) G((XroomClean) ∨ vacuum) ObjA (φ) -72.74240 -75.15686 -75.15832 -75.15782 -75.15832 -75.64639 F C(φ) 2 3 5 5 5 5 # Runs 20 20 3 3 2 2 B. CleaningWorld domain In the CleaningWorld domain, the agent is a vacuum cleaning robot in a dirty room. The room is characterized by some initial amount dirt ∈ N0 of dirt; the agent has some battery level battery ∈ N0 . The actions available to the agent are: vacuum, which reduces both dirt and battery by one; dock, which plugs the robot into a charger, allowing it to increment battery for each time step it remains docked; undock, which unplugs the robot from the charger; wait, which allows the robot to remain docked if it is currently docked, but otherwise simply decrements battery. If the robot’s battery dies (battery = 0), the robot may only perform the dummy action beDead. The domain has two propositions batteryDead, which is true iff battery = 0, and roomClean, which is true iff dirt = 0. There are also propositions corresponding to each action (where, e.g., the proposition vacuum is true whenever the agent’s last action was to vacuum). The agent is to satisfy the LTL objective G ((X vacuum) U roomClean). An agent attempting to minimize violation cost for this specification produced three demonstration trajectories of 10 time steps each. Because CleaningWorld is deterministic, all three trajectories were identical. Here we represent each state s by (d, b) where d is the amount of dirt still in the room in state s and b is the robot’s current battery level. formulas (in particular, G roomClean) arguably better describe agent behavior than the “actual” specification φact = G((X vacuum) U roomClean): they are simpler than φact while generating identical trajectories. This is reflected by the fact that φact was generated by the algorithm for both state- and action-based runs, but ObjS (φact ) = −215.78773, ObjA (φact ) = −75.10621, and F C(φact ) = 5, which is Pareto dominated by G(F roomClean) when considering either ObjS or ObjA . Perhaps because of this, the actual formula is never recovered (although similar formulas occasionally are, such as G((XroomClean) ∨ vacuum)). VI. D ISCUSSION While for demonstration purposes we chose to use NSGAII for optimization, in principle any algorithm that can optimize over LTL formulas should suffice. Exploring other algorithms is a topic for future work. In particular, the genetic programming methods employed operate entirely on the syntax of LTL; a method that can make some use of LTL semantics may find optimal solutions more efficiently. Optimizing over the space of all LTL formulas is difficult because of the combinatorial nature of this space. Since the number of LTL formulas of length ℓ increases exponentially in ℓ, optimization algorithms like NSGA-II are likely to recover simple formulas that explain the demonstrator’s behavior reasonably well, but are less likely to recover complex 1 2 3 τ , τ , τ =((5, 3), vacuum), ((4, 2), vacuum), formulas that better explain the behavior. ((3, 1), dock), ((3, 1), wait), ((3, 3), undock), We do not specify how to select between Pareto efficient ((3, 3), vacuum), ((2, 2), vacuum), ((1, 1), dock), solutions; this depends on the relative degree to which system designers value simplicity versus explanatory power. ((1, 1), wait), ((1, 3), undock), (1, 3) In practice, system designers with clear preferences could convert the given problem into a single-objective problem Tables IV and V show all solutions that were Pareto with objective f (Obj(φ), F C(φ)) where f is some nondeefficient in at least two runs, for ObjS and ObjA respectively. creasing function encoding these preferences. The major drawback of the proposed approach is its scalThe formulas G roomClean and G(F roomClean) are generated in all 20 runs by both ObjS and ObjA . These ability. Table I indicates that evaluation on CleaningWorld with the action-based objective took, on average, roughly 9h 9m. For problems with much larger state and action spaces, this approach is certainly intractable. Theoretically, a single iteration in the computation of Violπφ takes time in O(|S|2 |Q||U |). Run time for objective function evaluation also scales linearly in the total number of demonstration time steps. Identifying approaches with better theoretical and practical run times is a topic for future work. This paper also assumes that the demonstrator is operating in an environment with complete information (e.g., an MDP), no other agents, and known transition dynamics. Extensions to unknown transition dynamics, POMDPs, and multi-agent domains are a topic for future work. In both given examples, the “true” specification can be modeled using a reward function: in SlimChance, give high reward if and only if the agent is in sGOOD ; in CleaningWorld, give high reward only when roomClean is true. IRL may easily recover these reward functions, and would likely converge more quickly than our approach. These examples are meant more to show the viability of the proposed approach than its superiority to IRL in these domains. While the given problem assumes that the apprentice passively observes the demonstrator’s trajectories, future work could consider an active learning approach, in which the apprentice (for example) poses new MDPs involving the same predicates (or perturbs the given MDP), and ‘asks’ the demonstrator to generate trajectories in the posed MDPs. VII. C ONCLUSION In this paper, we introduced the problem of inferring linear temporal logic (LTL) specifications from agent behavior in Markov Decision Processes as a road to interpretable apprenticeship learning, combining the representational power and interpretability of temporal logic with the generalizability of inverse reinforcement learning. We formulated this as a twoobjective optimization problem, and introduced objective functions using a notion of “violation cost” to quantify the ability of an LTL formula to explain demonstrated behavior. We presented results using genetic programming to solve this problem in the SlimChance and CleaningWorld domains. VIII. ACKNOWLEDGEMENTS This project was in part supported by ONR grant N0001416-1-2278. R EFERENCES [1] Pieter Abbeel and Andrew Y Ng. Apprenticeship learning via inverse reinforcement learning. Proc. 21st International Conference on Machine Learning (ICML), pages 1–8, 2004. [2] Thomas Arnold, Daniel Kasenberg, and Matthias Scheutz. Value alignment or misalignment–what will keep systems accountable? In 3rd International Workshop on AI, Ethics, and Society, 2017. [3] Christel Baier and Joost-Pieter Katoen. Principles of Model Checking. The MIT Press, 2008. [4] Daniil Chivilikhin, Ilya Ivanov, and Anatoly Shalyto. Inferring Temporal Properties of Finite-State Machine Models with Genetic Programming. In Proc. 2015 Annual Conference on Genetic and Evolutionary Computation, pages 1185–1188, 2015. [5] Xu Chu Ding, Stephen L. Smith, Calin Belta, and Daniela Rus. LTL control in uncertain environments with probabilistic satisfaction guarantees. In Proceedings - IFAC World Congress, volume 18, pages 3515–3520, 2011. [6] Juraj Dzifcak, Matthias Scheutz, Chitta Baral, and Paul Schermerhorn. What to do and how to do it: Translating natural language directives into temporal and dynamic logic representation for goal management and action execution. In Proceedings - IEEE International Conference on Robotics and Automation, pages 4163–4168, 2009. [7] Javier Esparza and Jan Ketı́nský. From LTL to deterministic automata: A safraless compositional approach. In Lecture Notes in Computer Science (including subseries Lecture Notes in Artificial Intelligence and Lecture Notes in Bioinformatics), volume 8559, pages 192–208. Springer International Publishing, 2014. [8] Jie Fu and Ufuk Topcu. Probably Approximately Correct MDP Learning and Control With Temporal Logic Constraints. In Robotics: Science and Systems X, 2014. [9] Mark Gabel and Zhendong Su. Symbolic mining of temporal specifications. In Proc. 30th International Conference on Software Engineering, ICSE ’08, pages 51–60, New York, NY, USA, 2008. ACM. [10] Mark Gabel and Zhendong Su. Online inference and enforcement of temporal properties. In Proceedings of the 32Nd ACM/IEEE International Conference on Software Engineering - Volume 1, ICSE ’10, pages 15–24, New York, NY, USA, 2010. ACM. [11] M. Guo and D. V. Dimarogonas. Multi-agent plan reconfiguration under local LTL specifications. The International Journal of Robotics Research, 34(2):218–235, 2014. [12] David Hadka. Moea framework: a free and open source java framework for multiobjective optimization, 2012. [13] Zhaodan Kong, Austin Jones, Ana Medina Ayala, Ebru Aydin Gol, and Calin Belta. Temporal Logic Inference for Classification and Prediction from Data. Proceedings of the 17th International Conference on Hybrid Systems: Computation and Control, pages 273–282, 2014. [14] John R Koza. Genetic programming: on the programming of computers by means of natural selection, volume 1. MIT press, 1992. [15] Morteza Lahijanian, Shaull Almagor, Dror Fried, Lydia E Kavraki, and Moshe Y Vardi. This Time the Robot Settles for a Cost: A Quantitative Approach to Temporal Logic Planning with Partial Satisfaction. In Proceedings of the AAAI Conference on Artificial Intelligence, volume 29, pages 3664–3671, 2015. [16] Kevin Leahy, Austin Jones, Mac Schwager, and Calin Belta. Distributed Information Gathering Policies under Temporal Logic Constraints. In IEEE Conference on Decision and Control (CDC), volume 54, pages 6803–6808, 2015. [17] Caroline Lemieux, Dennis Park, and Ivan Beschastnikh. General ltl specification mining. In Automated Software Engineering (ASE), 30th IEEE/ACM International Conference on, pages 81–92. IEEE, 2015. [18] James MacGlashan. Brown-UMBC Reinforcement Learning and Planning (BURLAP), 2016. [19] Andrew Ng and Stuart Russell. Algorithms for inverse reinforcement learning. In Proc. Seventeenth International Conference on Machine Learning, volume 0, pages 663–670, 2000. [20] Amir Pnueli. The temporal logic of programs. In 18th Annual Symposium on Foundations of Computer Science, pages 46–57, 1977. [21] Luis I. Reyes Castro, Pratik Chaudhari, Jana Tümová, Sertac Karaman, Emilio Frazzoli, and Daniela Rus. Incremental sampling-based algorithm for minimum-violation motion planning. In Proc. IEEE Conference on Decision and Control, pages 3217–3224, 2013. [22] Rangoli Sharan and Joel Burdick. Finite state control of POMDPs with LTL specifications. In Proceedings of the American Control Conference, pages 501–508, 2014. [23] Mária Svoreňová, Martin Chmelı́k, Kevin Leahy, Hasan Ferit Eniser, Krishnendu Chatterjee, Ivana Černá, and Calin Belta. Temporal logic motion planning using POMDPs with parity objectives. In Proceedings of the 18th International Conference on Hybrid Systems Computation and Control, pages 233–238, 2015. [24] Jana Tumova, Gavin C Hall, Sertac Karaman, Emilio Frazzoli, and Daniela Rus. Least-violating control strategy synthesis with safety rules. In Proceedings of the 16th International Conference on Hybrid Systems: Computation and Control, pages 1–10, 2013. [25] Eric M. Wolff, Ufuk Topcu, and Richard M. Murray. Robust control of uncertain Markov Decision Processes with temporal logic specifications. In IEEE Conference on Decision and Control (CDC), volume 51, pages 3372–3379, 2012.
3cs.SY
Sensitivity analysis based on Cramér von Mises distance Fabrice Gamboa∗ Thierry Klein∗† Agnès Lagnoux∗ December 1, 2017 arXiv:1506.04133v2 [math.PR] 30 Nov 2017 Abstract In this paper, we first study a sensitivity index that is based on higher moments and generalizes the so-called Sobol one. Further, following an idea of Borgonovo (see [3]), we define and study a new sensitivity index based on the Cramér von Mises distance. This index appears to be more general than the Sobol one as it takes into account the whole distribution of the random variable and not only the variance. Furthermore, we study the statistical properties of its Pick and Freeze estimator. Keywords: Sensitivity analysis, Cramér von Mises distance, Pick and Freeze method, functional delta-method. 1 Introduction A very classical problem in the study of computer code experiments (see [26]) is the evaluation of the relative influence of the input variables on some numerical result obtained by a computer code. In this context, a sensitivity analysis is performed. Such a topic has been widely studied in the last decades and is still challenging nowadays (see for example [27, 25, 13] and references therein). More precisely, the result of the numerical code Y is seen as a function of the vector of the distributed input (Xi )i=1,··· ,d (d ∈ N∗ ). Statistically speaking, we are dealing here with the following unnoisy non parametric model Y = f (X1 , . . . , Xd ), where f is a regular unknown numerical function on the state space E1 × E2 × . . . × Ed on which the distributed variables (X1 , . . . , Xd ) are living. Generally, the random inputs are assumed to be independent and a sensitivity analysis is performed using the so-called Hoeffding decomposition (see [29, 1]). In this functional decomposition, f is expanded as an L2 -sum of uncorrelated functions involving only a part of the random inputs. This leads, for any subset v of Id := {1, . . . , d}, to an index called the Sobol index ([27]) that measures the amount of randomness (more precisely, the part of the variance) of Y due to the subset of input variables (Xi )i∈v . Since nothing has been assumed on the nature of the inputs, one can consider the vector (Xi )i∈v as a single input. Without loss of generality, we then consider the case where v reduces to a singleton. More precisely, the numerator Hv2 of the Sobol index related to the input Xv is Hv2 := Var (E [Y |Xv ]) while the denominator of the index is nothing more than the variance of Y . Notice that we also have: h i h i 2 2 Hv2 = E (E[Y |Xv ] − E[Y ]) = Var(Y ) − E (E[Y ] − E [Y |Xv ]) (1) In order to estimate Hv2 , Sobol in [27] proposed to rewrite the variance of the conditional expectation as a covariance (see equation (3)). Further, a well tailored design of experiment called the Pick and Freeze scheme is considered [19]. More precisely, let X v be the random vector such that Xvv = Xv and Xiv = Xi0 if i 6= v where Xi0 is an independent copy of Xi . Then, setting Y v := f (X v ), ∗ Institut de Mathématiques de Toulouse, 118 Route de Narbonne 31062 Toulouse Cedex 9. [email protected] † ENAC - Ecole Nationale de l’Aviation Civile , Université de Toulouse, France 1 (2) France. an obvious computation leads to the following relationship (see, e.g., [19]) Var(E[Y |Xv ]) = Cov (Y, Y v ) . (3) The last equality leads to a natural Monte-Carlo estimator, the so-called Pick and Freeze estimator,  2 N N X X 1 1 v TN,Cl = Yj Yjv −  (Yj + Yjv ) N j=1 2N j=1 where for j = 1, · · · , N , Yj (resp. Yjv ) are independent copies of Y (resp. Y v ). The sharp statistical properties and some functional extensions of the Pick and Freeze method are considered in [19, 18, 12]. Notice that the Sobol indices and their Monte-Carlo estimation are order two methods since they derive from the L2 -Hoeffding functional decomposition. This is their main drawback. As an illustration consider the following example. Let X1 and X2 be two independent standardized random variables having the   same third and fourth moments with E X15 6= E X25 . Let us consider the following model Y = X1 + X2 + X12 X22 . One gets Var (E [Y |X1 ]) = Var(X1 + X12 ) = Var(X2 + X22 ) = Var (E [Y |X2 ]) . Y is an exchangeable function of the inputs but X1 and X2 do not share the same distribution. So that, X1 and X2 should not have the same importance. That shows the need to introduce a sensitivity index that takes into account all the distribution and not only the second order behavior. As pointed out before, Sobol indices are based on an L2 decomposition. As a matter of fact, they are well adapted to measure the contribution of an input on the deviation around the mean of Y . Nevertheless, it seems very intuitive that the sensitivity of an extreme quantile of Y could depend on sets of variables that cannot be captured using only the variances. Thus the same index should not be used for any task and we need to define more general indices. There are several ways to generalize the Sobol indices. For example, one can define new indices through contrast functions based on the quantity of interest (see [16]). Unfortunately the Monte-Carlo estimators of these indices are computationally very expensive. In [11], Da Veiga presents a way to define moment independent measures through dissimilarity distances. These measures define a unified framework that encompasses some known sensitivity indices. They are efficiently estimated in low dimensions but as claimed by the author “it is well known that density estimation suffers from the curse of dimensionality”. Now, as pointed out in [3, 5, 6, 24, 23], there are situations where higher order methods give a sharper analysis on the relative influence of the input and allow finer screening procedures. Borgonovo et al. propose and study an index based on the total variation distance (see [3, 5, 6]); while Owen et al. suggest to use procedures based on higher moments (see [24, 23]). Our paper follows these tracks. We will first revisit the work of Owen et al. by studying the asymptotic properties of the multiple Pick and Freeze estimation. Further, we propose a new natural index based on the Cramér von Mises distance between the distribution of the output Y and its conditional law when an input is fixed. We will show that this approach leads to natural self-normalized indices. Indeed, as for Sobol indices, the sum of all first order indices is uniformly bounded. Notice that these indices take into account the whole output distribution instead of only the order two moments and contrary to most of the other known indices, they are naturally defined for multivariate outputs. As a consequence, they are well-tailored to perform a sensitivity analysis for any vectorial output. Furthermore, we show that surprisingly a Pick and Freeze scheme is also available to estimate this new index. This scheme is not really expensive and easy to implement. The sample size required for the estimation is of the same order as the size needed for the classical Sobol index estimation allowing its use in concrete situations. As a consequence, considering a sample with the appropriate size, one can provide simultaneously the Cramér von Mises indices and the Sobol indices. Other advantage of the Cramér von Mises index with respect to the general ones presented in [11] is that the theoretical statistical properties of its estimation can be derived. Indeed, we prove a Central Limit Theorem for the estimator that allows one to exhibit confidence intervals. The paper is organized as follows. In the next section, we will study the statistical properties of the multiple Pick and Freeze method proposed earlier by Owen et al ([24, 23]). Section 3 is devoted to the new index built on the Cramér von Mises distance. In the last section, we give some numerical simulations that illustrate the interest of the new index. Moreover, we revisit a real data example introduced in [10] and studied in [15, 7]. 2 2 Higher-moment indices In the sequel, for any integer k, the notation Ik stands for the set {1, . . . , k}. Following [24, 23], we generalize the numerator of the Sobol index defined in (1) by considering higher order moments: for any integer q > 2, and singleton v ∈ Id , we set q Hvq := E [(E[Y |Xv ] − E[Y ]) ] . Properties Obviously, Hvq is non negative only for even q and q |Hvq | 6 E [|Y − E[Y ]| ] . Further, Hvq is invariant by any translation of the output. Estimation procedure In view of the estimation of Hvq , we first notice that " Hvq =E q Y # Y v,i − E[Y ]  i=1 " l # q   X Y q q−l q−l v,i = (−1) E [Y ] E Y l i=1 l=0 Q0  q with the usual convention i=1 Y v,i = 1 and l = q!/l!(q − l)!. Here, Y v,1 = Y and for i = 2, . . . , q, Y v,i is constructed independently as Y v defined in Equation (2). Second, we use scheme and consider the following Pick and Freeze design constituted by  a Monte-Carlo   v,i a N -sample Yj of Y v,1 , . . . , Y v,q . The Monte-Carlo estimator is then (i,j)∈Iq ×IN v Hq,N = q    v q−l v X q (−1)q−l P 1 Pl l l=0 where for any N ∈ N∗ , j ∈ IN and l ∈ Iq , we have defined v Pl,j  −1 q = l X l Y k1 <...<kl ∈Iq i=1 ! Yjv,ki and v Pl N 1 X v P . = N j=1 l,j Notice that we generalize the estimation procedure of [18] and use all the available information by considering the means over the set of indices k1 , . . . , kl ∈ Id , kn 6= km . v Asymptotic properties of Hq,N v Theorem 2.1. Hq,N is strongly consistent and asymptotically Gaussian: √ v N Hq,N − Hqv L  → N 0, σ 2  N →∞ where q   X σ = q Var(Y ) + (q − 1)Cov(Y, Y v,2 ) al bl 2 !2 , l=1 al = b1 = (−1) q−1 l E[Y ]l−1 , q q−1 q(q − 1)E[Y ] + l = 1, . . . , q q−1   X q l=2 l " (−1) q−l q−l−1 (q − l)E[Y ] i=1 and   q bl = (−1)q−l E[Y ]q−l , l 3 E l Y l = 1, . . . , q. # Y v,i Interpretation and comments The collection of all indices (Hvq )q is much more informative than the classical Sobol index with respect to v. Nevertheless, it has several drawbacks. First, these indices are moment-based and it is well known that they are not stable when the moment order increases. Second, q they may be negative when q is odd. To overcome this fact, one may introduce E [|E[Y |Xv ] − E[Y ]| ] but the Pick and Freeze estimation procedure is then lost. Third, the Pick and Freeze estimation procedure is computationally expensive and may be unstable: it requires a q × N -sample of the output Y . In order to have a good idea of the influence of an input on the law of the output, we need to estimate the first K − 1 indices Hvq : Hv2 , . . . , HvK . Hence, we need to run the code K × N times. In a nutshell, these indices are not attractive in a practical point of view. In the next section, we then introduce a new sensitivity index that is based on the conditional distribution of the output and requires only 3 × N runs. Concretely, it compares the output distribution to the conditional one whereas the q higher-order moment indices only compare the q-th output moment to the conditional one. 3 The Cramér von Mises index In this section, the code will be denoted by Z = f (X1 , . . . , Xd ) ∈ Rk . It is worth noticing that here we can consider multivariate outputs unlike in Section 2 and [7], e.g., Let F be the distribution function of Z:   F (t) = P (Z 6 t) = E 1 {Z6t} , for t = (t1 , . . . , tk ) ∈ Rk and F v be the conditional distribution function of Z conditionally on Xv :   F v (t) = P (Z 6 t|Xv ) = E 1 {Z6t} |Xv , for t = (t1 , . . . , tk ) ∈ Rk . Notice that {Z 6 t} means that {Z1 6 t1 , . . . , Zk 6 tk }. Obviously, E [F v (t)] = F (t). Now, we define Y (t) = 1 {Z6t} and take p = 2. Since for any fixed t ∈ Rk , Y (t) is a real-valued random variable, we apply the framework presented in Section 2. More precisely, for any v ∈ Ip let ∼ v be Ip \ {v} and we first perform the Hoeffding decomposition of Y (t): Y (t) = 1 {Z6t} = E[Y (t)] + (E[Y (t)|Xv ] − E[Y (t)]) + (E[Y (t)|X∼v ] − E[Y (t)]) + R(t, v) (4) where R(t, v) = Y (t) − E[Y (t)] − (E[Y (t)|Xv ] − E[Y (t)]) − (E[Y (t)|X∼v ] − E[Y (t)]) . As done usually, we compute the variance of both sides of (4) that leads to Var(Y (t)) = F (t)(1 − F (t)) = Var (E[Y (t)|Xv ] − E[Y (t)]) + Var (E[Y (t)|X∼v ] − E[Y (t)]) + Var(R(t, v)) = Var (F v (t)) + Var (F ∼v (t)) + Var(R(t, v)) h i h i 2 2 = E (F v (t) − F (t)) + E (F ∼v (t) − F (t)) + Var(R(t, v)) (5) by the decorrelation of the different terms involved in the Hoeffding decomposition. Remark 3.1. A straightforward application of the results of Section 2 provides for any fixed t ∈ Rk a consistent and asymptotically normal procedure for the estimation of h i h i 2 2 E (F v (t) − F (t)) = Var (F v (t)) and E (F ∼v (t) − F (t)) = Var (F ∼v (t)) . Now we integrate the terms in (5) in t ∈ Rk with respect to the distribution of Z: Z F (t)(1 − F (t))dF (t) k ZR h Z Z i h i 2 2 v ∼v = E (F (t) − F (t)) dF (t) + E (F (t) − F (t)) dF (t) + Var(R(t, v))dF (t) Rk Rk (6) Rk This integration has to be understood in the Riemmann-Stieltjes sense (see, e.g., [28]). Notice that the first term in the right hand side of (6) represents a Cramér Von Mises type distance of order 2 between 4 the distribution L (Z) of Z and the distribution L (Z|Xv ) of Z given Xv . Following the classical way of defining Sobol indices, we normalize the previous equation by Z F (t)(1 − F (t))dF (t) Rk leading to R 1= h i h i R R 2 2 ∼v E (F v (t) − F (t)) dF (t) E (F (t) − F (t)) dF (t) k R k Var(R(t, v))dF (t) R R + +R R F (t)(1 − F (t))dF (t) F (t)(1 − F (t))dF (t) F (t)(1 − F (t))dF (t) Rk Rk Rk Rk (7) Then we define the Cramér Von Mises indices with respect to v and ∼ v by h i h i R R 2 2 v ∼v dF (t) (t)) dF (t) k E (F (t) − F (t)) k E (F (t) − F R R v ∼v R R S2,CV and S2,CV . M := M := F (t)(1 − F (t))dF (t) F (t)(1 − F (t))dF (t) k R Rk Properties 3.2. These new indices are naturally adapted to multivariate outputs and they share the same properties as the classical Sobol index. Namely, 1. as seen in (7), the different contributions sum to 1. 2. they are invariant by translation, by any isometry and by any non degenerated scaling of the components of Y . Remark 3.3. 1. We could have defined the following indices instead h i h i Z E (F (t) − F ∼v (t))2 Z E (F (t) − F v (t))2 dF (t) and dF (t). F (t)(1 − F (t)) F (t)(1 − F (t)) Rk Rk normalizing by F (t)(1 − F (t)) (like in the Anderson-Darling statistic) before the integration phase. Nevertheless, the previous integrals might be not defined. Moreover, even if the integrals are well defined, one may encounter numerical explosion during the estimation procedure that might be produced for small and large values of t since the normalizing factor then cancels. 2. In this paper, we only consider first-order sensitivity indices as well for the classical Sobol indices and for the Cramér von Mises indices. Anyway, as well as for the Sobol indices, one may define higher-order and total Cramér von Mises indices. The construction of the former is straightforward taking v no longer a singleton. For example, if one is interested in the second-order Cramer von Mises index with respect to the first and second inputs, it suffices to take v = {1, 2}. Concerning T ot,v the latter, the total Cramér von Mises index S2,CV M with repect to v is defined by h i 2 ∼v E (F (t) − F (t)) dF (t) Rk R =1− . F (t)(1 − F (t))dF (t) Rk R T ot,v ∼v S2,CV M := 1 − S2,CV M 3. To use the Hoeffding decomposition, the inputs are required to be independent. Anyway, one can compute the Cramér von Mises index when the inputs are dependent. Nevertheless, there are then difficult to interpret. 3.1 General comments on the Cramér von Mises indices Cramér von Mises indices versus Sobol indices Cramér von Mises and Sobol indices are both based on the Hoeffding decomposition and sum to 1. Nevertheless, the former are based on the whole distribution of the output, in contrast with the latter that are only based on the order-two moments. Notice that two variables that have a different influence on the output may have the same Sobol indices (just as two random variables with different distribution can have the same variance). This point represents one limitation of Sobol indices and does not occur with 5 the Cramér von Mises indices as one can see in Section 4.1. In addition, remark that a null value for a Sobol index does not imply that the input is unimportant whereas a null value for a Cramér von Mises index means that the input is unimportant. Moreover, by definition, a large Cramér von Mises index means that the input variable under concern has a great influence on the output in regions where the output has a large distribution mass. That is why we advice the practitioner to use them in a general context. Nevertheless, when one is interested in the mean output behavior, the Sobol indices are more adapted. Indeed, as noted in [16], the Sobol indices minimize the contrast associated to the mean. In the same spirit, if one is interested in specific feature of the output (for example an α-quantile), one should use the index based on the associated contrast. See [16] for more details on the notion of contrast and the results therein. In contrast, the indices based on the whole distribution partially get rid of such limitations and pathological patterns. However, one can build an example based, e.g., on two input variables that leads to the 1 2 same indices S2,CV M and S2,CV M once the integration with respect to t has been done. Cramér von Mises indices versus moment independent indices There already exists several moment-independent indices: some of them have been introduced by Borgonovo et al. (density-based indices [5], cumulative distribution function based indices [9]). See also [4] for other indices and references therein. More recently, Da Veiga [11] shows that those indices are special cases of a class of sensitivity indices based on the Csizár f -divergence. A lot of classical “distances” between probability measures as, e.g., the Kullback-Leibler divergence, the Hellinger distance and the total variation distance belong to this family of divergences. Other dissimilarity measures exist to compare probability distributions: in particular, integral probability metrics [20]. In comparison with the indices defined in Equation (17) in [8], we can notice that the integration is done with respect to the distribution of the output in the former indices while the integration is done with respect to the Lebesgue measure in the latter indices. Our method represents at least two advantages: (i) the index always exist whatever the output distribution (ii) such an integration weights the support of the output distribution. Since the space of the probability measures on Rk is of infinite dimension, the different distances on this space are not equivalent; hence they are very difficult to compare. Each index is constructed on a specific distance and has its own interest. Despite the fact that the Cramér von Mises indices have no clear dual formulation, they present the following remarkable advantages. As we will see in the next sections, one can easily estimate them with a low simulation cost that does not depend on the dimension of the output. The sample required for their estimation also provide Sobol√indicies estimation. In addition, these estimators are asymptotically normal and converge at the rate N which allows the practitioner to build confidence intervals. v ∼v The rest of the section is dedicated to the estimation of S2,CV M (and S2,CV M ). One has to estimate both the numerator and the denominator of the indices. Nevertheless, when the output Z has independent coordinates that are absolutely continuous with respect to the Lebesgue measure, we have Z F (t)(1 − F (t))dF (t) = E[F (Z)(1 − F (Z)] = Rk 1 1 − k. 2k 3 Thus the normalizing factor reduces to 21k − 31k . As a consequence, we propose two versions of Central Limit Theorems: the first one deals with the numerator’s estimator and can be applied when the output Z has independent coordinates that are absolutely continuous with respect to the Lebesgue measure whereas the second one concerns the general estimator and may apply in any other cases. 6 3.2 Numerator estimation and its asymptotic properties v v We denote the numerator of S2,CV M by N2,CV M . Notice that it can be rewritten as   2  v v N2,CV = E E F ( Z̃) − F ( Z̃) Xv M Z̃ where Z̃ is an independent copy of Z. v Then we proceed to a double Monte-Carlo scheme for the estimation of N2,CV M and consider the following design of experiment consisting in: 1. The classical Pick and Freeze sample, that is two N -samples of Z: (Zjv,1 , Zjv,2 ), 1 6 j 6 N ; 2. A third N -sample of Z independent of (Zjv,1 , Zjv,2 )16j6N : Wk , 1 6 k 6 N . v The empirical estimator of N2,CV M is then given by   2   N N N     1 X 1 X 1 X v b2,CV   v,1 v,2 v,1 v,2 N = 1 1 − 1 + 1 . M {Zj 6Wk } {Zj 6Wk } {Zj 6Wk } N  N 2N j=1 {Zj 6Wk }  j=1 k=1  (8) bv Now we established the consistency of N 2,CV M that follows directly from an auxiliary lemma (see Section 6). bv Corollary 3.4. N 2,CV M is strongly consistent as N goes to infinity. bv Now we turn to the asymptotic normality of N 2,CV M . We follow van der Vaart [29] to establish the following proposition (more precisely Theorems 20.8 and 20.9, Lemma 20.10 and Example 20.11). v bv Theorem 3.5. The sequence of estimators N 2,CV M is asymptotically Gaussian in estimating N2,CV M .  √  v v b That is, N N converges in distribution towards the centered Gaussian law with a 2,CV M − N2,CV M limiting variance ξ 2 whose explicit expression can be found in the proof. Remark 3.6. Thanks to Theorem 3.5, we are now able to provide √ asymptotic confidence intervals for v bv the estimation of N2,CV M . They are of the form (N2,CV M ± zα ξ/ N ), where zα is the 1 − α/2 quantile of a standard normal distribution. Unfortunately, the variance ξ 2 is unknown but thanks to its explicit form it is easy to replace it by a consistent estimator ξb and use Slutsky’s Lemma to have an asymptotic confidence interval. 3.3 Estimation of the general index and its asymptotic properties v In order to estimate the general index S2,CV M , we first estimate its numerator as in Subsection 3.2 and v then its denominator that we denote D2,CV M . Notice that it can be rewritten as v D2,CV M = E [F (Z)(1 − F (Z))] and estimated using the design of experiment already introduced for the estimation of the numerator by   2   N  N  N      X X X 1 1 1 v b   D2,CV M = 1 {Z v,1 6Wk } + 1 {Z v,2 6Wk } − 1 {Z v,1 6Wk } + 1 {Z v,2 6Wk } . j j j j   N 2N j=1  2N j=1  k=1 (9) Proceeding as in Subsection 3.2, we have v Corollary 3.7. Sb2,CV M is strongly consistent as N goes to infinity. The following Central Limit Theorem comes from the functional Delta method. v v Theorem 3.8. The sequence of estimators Sb2,CV M is asymptotically Gaussian in estimating S2,CV M .  √  v v converges in distribution towards the centered Gaussian law with a That is, N Sb2,CV M − S2,CV M limiting variance that can be computed. 7 3.4 Practical advices In a general setting, for all the nice properties of the Cramér von Mises indices and their efficient estimation easy to implement, we recommend to use the Cramér von Mises indices. As a consequence, considering a sample with the appropriate size, one can estimate once at a time the Cramér von Mises indices and the Sobol indices. More precisely, if one wants to estimate p Sobol indices a sample size of (p + 1)N is required. With only N more output evaluations, we get both the p Sobol indices and the Cramér von Mises ones. Furthermore, the theoretical theorems provides confidence intervals that controlled the accuracy of the estimations. Anyway, when the practitioner is interested in a specific feature (e.g., mean behavior or quantile) of the output, he should use more suited indices (e.g., the classical Sobol indices for the mean or the indices introduced in [16] for the quantile). 4 4.1 Numerical applications A flavor of the method applied on a toy model Let us consider the quite simple linear model Y = αX1 + X2 , α > 0, where X1 has a Bernoulli distribution with success probability 0 < p < 1 and X1 , X2 are independent. Assume further that X2 has a continuous distribution F2 on R such that E[X2 ] = αp and with finite variance Var(X2 ) = α2 p(1 − p). With these choices, the random variables αX1 and X2 share the same expectation and the same variance. Thus X1 and X2 have the same first order Sobol indices all equal to 1/2. We present a general closed formula to compute our new indices and show that in some particular cases an exact formula is available. Then we perform a simulation study in order to illustrate the Central Limit Theorem and analyse the practical behaviour of our estimators. 4.1.1 General closed formula On one hand, the distribution of Y given X1 = 0 and the distribution of Y given X1 = 1 are given by ( L(Y |X1 = 0) = L(X2 ) L(Y |X1 = 1) = L(X2 + α). On the other hand, the conditional distribution of Y given X2 is P (Y = α + X2 | X2 ) = 1 − P (Y = X2 |X2 ) = p. Hence, the distribution function of Y is the mixture pF2 (· − α) + (1 − p)F2 (·). Tedious computations lead to Z 1 S2,CV = 6p(1 − p) (F2 (t) − F2 (t − α))2 [(1 − p)dF2 (t) + pdF2 (t − α)] M R and 2 S2,CV M  1 − = 1 − 6p(1 − p) 2 Z  F2 (t − α)dF2 (t) R (the normalizing factor being 1/6 as explained before). 1 2 As p goes to 0 (and α goes to infinity), (S2,CV M , S2,CV M ) goes to (0, 1) while the two classical Sobol indices remain equal to 1/2. Our new indices shed lights on the fact that, for small p, X2 has much more influence on Y than X1 which follows the intuition. This fact is not detected by the classical Sobol indices. Similarly we can compute the indices of order q (q > 2): H1q = αq [p(1 − p)q + (−p)q (1 − p)] 8 and H2q = E[(X2 − µ)q ]. Particular cases (i) if X2 is a centered Gaussian random variable with variance Var(X2 ) = α2 p(1 − p), one can easily derive an explicit formula for H2q : q! 1q∈2N∗ . · (q/2)! p (ii) if X2 is uniformly distributed on [0, b] with b = 2α 3p(1 − p), one can easily derive an explicit formula for the indices introduced before:      2α 1 α 2 1 1− S2,CV M = 6p(1 − p) × 1α6b + 1α>b b 3b 3 !  2 b−α 2 S2,CV 1α6b . M = 1 − 3p(1 − p) 1 − b H2q = E[(X2 − m)q ] = 2q/2 Moreover, H2q = E[(X2 − µ)q ] = (b/2)q /(q + 1)1q∈2N∗ . (iii) if X2 is exponentially distributed with mean 1/λ = α formula for the indices introduced before: 1 −λα 2 S2,CV ) M = 2p(1 − p)(1 − e p p(1 − p), one can easily derive an explicit 2 −λα and S2,CV ). M = 1 − 3p(1 − p)(1 − e Moreover, H2q = E[(X2 − µ)q ] = q!λ−q /2. 4.1.2 Simulation study A numerical illustration with sample sizes N =100 and 500 is presented in Figures 1 and 2 (remind that in order to estimate both indices we compute 4N values of the output function). We consider the case where the random variable X2 is uniformly distributed (for the other cases the simulations provide the same kind of results). We estimate the Cramér von Mises indices thanks to Equation (8) and renormalize it by the factor 1/6 since the output has a continuous distribution. Then we estimate the limiting variance in (12) in order to provide asymptotic confidence intervals. In Figures 1 and 2, the blue line represents 2 1 the true value of index D2,CV M (first row) or D2,CV M (second row). The red dashed line (resp. the red dashed line with +) represents the index estimation based on (8) (resp. the confidence interval). In the left column, α is fixed to 1/2 and p varies while in the right one, p is fixed to 1/4 and α varies. 4.2 A non linear model Now, let us consider the following non linear model Y = exp{X1 + 2X2 }, (10) where X1 and X2 are independent standard Gaussian random variables. The distribution of Y is lognormal and we can derive both its density and its distribution functions:   2 1 ln y fY (y) = √ e−(ln y) /10 1 R+ (y) and FY (y) = Φ √ 10πy 5 where Φ stands for the distribution function of the standard Gaussian random variable. Its density function will be denoted by f in the sequel. Then tedious computations lead to the Cramér von Mises 1 2 indices S2,CV M and S2,CV M . Proposition 4.1. Assume that Y is defined by Equation (10) then 1 S2,CV M = 6 arctan 2 − 2 ≈ 0.1145 π and 2 S2,CV M = √ 6 arctan 19 − 2 ≈ 0.5693. π 9 Uniform distribution and N=100 0.8 0.5 0.7 0.4 0.6 0.3 0.5 First index First index Uniform distribution and N=100 0.6 0.2 0.1 0.4 0.3 0 0.2 −0.1 0.1 −0.2 0.1 0.2 0.3 0.4 0.5 0.6 Value of p for fixed α=1/2 0.7 0.8 0 0.2 0.9 0.4 0.6 Uniform distribution and N=100 0.9 1.2 0.8 1.8 2 1.6 1.8 2 0.7 Second index 1 Second index 1.6 Uniform distribution and N=100 1.4 0.8 0.6 0.4 0.6 0.5 0.4 0.3 0.2 0 0.1 0.8 1 1.2 1.4 Value of α for fixed p=1/4 0.2 0.2 0.3 0.4 0.5 0.6 Value of p for fixed α=1/2 0.7 0.8 0.9 0.1 0.2 0.4 0.6 0.8 1 1.2 1.4 Value of α for fixed p=1/4 Figure 1: Example 1 - X2 uniformly distributed and N =100. 10 Uniform distribution and N=500 Uniform distribution and N=500 0.4 0.4 0.35 0.35 First index First index 0.3 0.25 0.2 0.3 0.25 0.15 0.2 0.1 0.05 0.1 0.2 0.3 0.4 0.5 0.6 Value of p for fixed α=1/2 0.7 0.8 0.9 0.2 0.4 0.6 0.65 0.9 0.6 0.8 0.55 0.7 0.6 0.4 0.35 0.3 0.4 0.5 0.6 Value of p for fixed α=1/2 2 1.6 1.8 2 0.45 0.4 0.2 1.8 0.5 0.5 0.1 1.6 Uniform distribution and N=500 1 Second index Second index Uniform distribution and N=500 0.8 1 1.2 1.4 Value of α for fixed p=1/4 0.7 0.8 0.9 0.2 0.4 0.6 0.8 1 1.2 1.4 Value of α for fixed p=1/4 Figure 2: Example 1 - X2 uniformly distributed and N =500. 11 Remark 4.2. In this simple example, one can compute the indices of order q (q > 2): i h i h and H2q = E (e2X1 +1/2 − e5/2 )q . H1q = E (eX1 +2 − e5/2 )q The Sobol indices and their estimation based on the Pick-Freeze scheme with a sample of size N are computed using equation (6) in [19]. We also compute the Cramér von Mises indices and their estimation based on (8). Moreover, we estimate the limiting variances in both cases (see equation (12) for the Cramér von Mises indices and equation (12) in [19] for the Sobol indices) in order to provide confidence intervals. The results are presented in Table 1. N = 102 N = 103 N = 104 True values Est. values CI 5% Est. values CI 5% Est. values CI 5% Cramér von Mises 1 2 D2,CV D2,CV M M 0.1145 0.5693 0.1287 0.6097 [-0.0601,0.3175] [0.4692,0.7503] 0.1358 0.6007 [0.07861,0.19297] [0.54897,0.65242] 0.1166 0.5585 [0.09930,0.13382] [0.54150,0.57540] Sobol indices S1 S2 0.0118 0.3738 0.0425 0.1954 [0.0265,0.0585] [0.0430,0.3477] 0.1198 0.2345 [-0.5633,0.8030] [0.1343,0.3347] 0.01685 0.26252 [0.0010,0.0327] [-1.2744, 1.7994] Table 1: Model (10). The Cramér von Mises and Sobol indices, their estimations based on (8) and (6) in [19] and the associated 5%-confidence intervals. As a conclusion, with only N = 103 , the statistical method provides a precise estimation of the different indices. Moreover, in this example, the Sobol and Cramér von Mises indices give the same influence ranking of the two random inputs. Nevertheless, the estimation of the Cramér von Mises indices seems to be more efficient to give the true ranking. 4.3 Application: The Giant Cell Arthritis Problem Context and goal In this subsection, we consider the realistic problem of management of suspected giant cell arthritis posed by Bunchbinder and Detsky in [10]. More recently, this problem was also studied by Felli and Hazen [15] and Borgonovo et al. [7]. As explained in [10], “giant cell arthritis (GCA) is a vasculitis of unknown etiology that affects large and medium sized vessels and occurs almost exclusively in patients 50 years or older”. This disease may lead to severe side effects (loss of visual accuity, fever, headache,...) whereas the risks of not treating it include the threat of blindness and major vessels occlusion. A patient with suspected GCA can receive a therapy based on Prednisone. Unfortunately, a treatment with high Prednisone doses may cause severe complications. Thus when confronted to a patient with suspected GCA, the clinician must adopt a strategy. There is a considerable literature on sensitivity analysis for these sorts of models, based on the utility of learning a model input before choosing a treatment strategy (see, e.g., [14] and [22]). In [10], the authors considered four different strategies: A : Treat none of the patients; B : Proceed to the biopsy and treat all the positive patients; C : Proceed to the biopsy and treat all the patients whatever their result; D : Treat all the patients. The clinician wants to adopt the strategy optimizing the patient outcomes measured in terms of utility. The reader is referred to [21] for more details on the concept of utility. The basic idea is that a patient with perfect health is assigned a utility of 1 and the expected utility of the other patients (not perfectly healthy) is calculated subtracting some “disutilities” from this perfect score of 1. These strategies are represented in Figures 3 to 6 with the different inputs involved in the computation of the utilities. For example in strategy A (see Figure 3), the utility of a patient having GCA and developing severe GCA complications is given by 1 − ds − dugc − dudx . His entire sub-path is then g × gc × (1 − ds − dugc − dudx ). 12 Figure 3: The decision tree for the treat none alternative Figure 4: The decision tree for the biopsy and the treat positive alternative The input parameters and the modelisation of the random ones As seen in Figures 3 to 6, the different strategies involve input parameters like, e.g., the proportion g of patients having GCA or the probability gc for a patient to develop severe GCA complications (fixed at 0.8 as done in [10]) or even the disutility associated to having GCA symptoms. Table 2 summarizes the input parameters involved. The values P[·] and D(·) refer respectively to the probability of an event and to the disutility associated with an event. The minimum and maximum values m and M depict each parameter’s range for the sensitivity analysis. The base values are provided by a clinician expertise. The utilities of the different strategies when all the input parameters are set to their base value are summarized in Table 3. The base value of some input parameters are reliable while the others are really uncertain that leads us to consider them as random. As a consequence, if YA , YB , YC and YD represent the outcomes corresponding to the four different strategies A to D, the clinician aims to determine max{E[YA ], E[YB ], E[YC ], E[YD ]} (11) with the uncertain model input presented in Table 2. A sensitivity analysis is then performed to determine the most influential input variables on the outcome. As done in [15, 7], all the random inputs will be independently based on Beta distributions. The Beta density parameters corresponding to each random input are determined by fitting the base value as their mean and capturing 95% of the probability mass in the range defined by the minimum and maximum. 13 Figure 5: The decision tree for the biopsy and the treat all alternative Figure 6: The decision tree for the treat all alternative The remaining 5% will be equally distributed to either side of this range if possible. Concretely, each random input will be distributed as Z1 m6Z<M + U 1 m>Z + V 1 Z>M where Z, U and V are independent random variables. Z is Beta distributed with parameters (α, β). U and V are uniform random variables on [0, m] and [M, 1] respectively. 14 Fixed parameters P[having GCA] D(having symptoms of GCA) D(having a temporal artery biopsy) D(not knowing the true diagnosis) Symbols g dus dub dudx Fixed value 0.8 0.12 0.005 0.025 Uncertain parameters P[developing severe complications of GCA] P[developing severe iatrogenic side effects] Efficacy of high dose Prednisone Sensitivity of temporal artery biopsy D(major complication from GCA) D(Prednisone therapy) D(major iatrogenic side effect) Symbols gc pc e sens dugc dup dupc Base 0.3 0.2 0.9 0.83 0.8 0.08 0.3 – – – – – – – – Min. m 0.05 0.05 0.8 0.6 0.3 0.03 0.2 Max. M 0.5 0.5 1 1 0.9 0.2 0.9 – – – – – – – – Beta(α,β) α β 4.179 11.011 2.647 10.589 27.787 3.087 7.554 1.547 27.454 6.864 4.555 52.380 15.291 35.680 Table 2: The data used by Buchbinder and Detsky [10] in their analysis Treatment alternative A Treat none B Biopsy and treat positive C Biopsy and treat all D Treat all Utilility 0.6870 0.7575 0.7398 0.7198 Expectation 0.6991 0.7570 0.7371 0.7171 Table 3: The utilities of the different strategies when all the input parameters are set to their base value (second column) and their expectation when they are random (third column). Sensitivity analysis As already mentioned, the clinician wants to determine the highest utility. In [4], the authors then consider the highest utility as output and lead a sensitivity analysis to determine the input having the largest influence on this output. Since we are able to treat multivariate outputs, we consider a more general framework in this paper: the output is the four-dimensional random variable Y = (YA , YB , YC , YD ) where YS represents the outcome corresponding to strategy S. We compare three different methodologies and indices. First, we consider the Sobol indices introduced in [17] (Multivariate). Second, we consider the indices constructed in this paper, based on the Cramér von Mises distance and estimated by the ratios of the numerator estimator (8) and the denominator estimator (9). Third, we consider the index presented in [4] and named β defined by βi = E[sup{|FY (y) − FY |Xi (y)|}]. y∈Y Then we use the estimator given in [7, Table 1] adapted to the multivariate case that is based on the tedious and costly estimation of conditional expectations. Results Table 4 summarizes the sensitivity measures of the seven random inputs on the multivariate output with the three different methodologies while Table 5 presents the associated ranks. It is worth mentioning that the same total sample size has been used to compare properly the three methodologies. As a conclusion, in this example, unlike the indices defined by Borgonovo et al., the multivariate sensitivity indices and the Cramér von Mises indices provide the same ranking. The main advantage of the Cramér von Mises sensitivity methodology with respect to the one of Borgonovo et al. is that one can use the Pick and Freeze estimation scheme which provides an accurate estimation (see (8)) simple to implement. Notice that in [7], the authors study a slightly different model that explains the numerical differences between their results and the ones of the present paper. Furthermore, they perform a sensitivity analysis on the best alternative with the greater mean instead of considering the multivariate output. 15 N = 102 N = 103 N = 104 Sensitivity meas. Multivariate Borgonovo et al. Cramér von Mises Multivariate Borgonovo et al. Cramér von Mises Multivariate Borgonovo et al. Cramér von Mises 1 0.3690 0.1195 0.3496 0.4024 0.1788 0.3494 0.3828 0.3842 0.3494 2 0.0193 0.1047 0.0745 0.1201 0.1192 0.0750 0.1333 0.1572 0.0775 3 0.0105 0.1064 0.0206 0.0516 0.1009 0.0209 0.0618 0.1033 0.0232 4 -0.0821 0.1022 -0.0010 -0.0190 0.1007 -0.0008 -0.0016 0.0930 0.0011 5 -0.0617 0.1046 0.0084 -0.0043 0.1044 0.0086 0.0100 0.0986 0.0108 6 0.1150 0.1063 0.1042 0.2403 0.1195 0.1045 0.3182 0.1775 0.1056 7 -0.0751 0.1027 0.0105 0.0093 0.1028 0.0109 0.0217 0.1061 0.0124 Cputime 0.0624 1.5132 0.9048 0.0156 57.8452 10.1089 0.0312 5.1988 103 436.8028 Table 4: Sensitivity measures. The estimation of the Cramér von Mises indices is the ratio of (8) and (9). N = 102 N = 103 N = 104 Sensitivity meas. Multivariate Borgonovo et al. Cramér von Mises Multivariate Borgonovo et al. Cramér von Mises Multivariate Borgonovo et al. Cramér von Mises 1 1 1 1 1 1 1 1 1 Ranking 62357 36257 62375 62375 62573 62375 62375 62735 62375 4 4 4 4 4 4 4 4 4 Table 5: Ranks. The estimation of the Cramér von Mises indices is the ratio of (8) and (9). 5 Conclusion In this paper, we first study the asymptotic properties of the multiple Pick and Freeze scheme proposed by Owen et al. for the estimation of higher order Sobol indices. This index has several drawbacks that lead us to propose a new natural index based on the Cramér von Mises distance between the distribution of the output Y and the conditional law when an input is fixed. This new index contains all the distributional information, is naturally defined for multivariate outputs and provides a rigorous sharper way for a fast screening of complex computer codes. Furthermore, our approach is generic and may be extended and implemented for general outputs (vectorial, valued on a manifold, functional, ...). Concerning its estimation, we show that surprisingly a Pick and Freeze scheme is also available for the estimation procedure and prove that it is efficient in a theoretical point of view as well as in a practical one. More precisely, we establish a Central Limit Theorem that confirms the good statistical properties of our estimator and allows us to build confidence intervals. Furthermore, the estimation is well working with moderate sample sizes as shown in toy examples. Finally, the performance of the method is proven on a real data example. Acknowledgement The authors are greatly indebted to the referees for their fruitful and detailed suggestions or comments which permit us to greatly improve our paper. Part of this research was conducted within the frame of the Chair in Applied Mathematics OQUAIDO and the ANR project PEPITO (ANR-14-CE23-0011). 16 6 6.1 Proofs Proof of Theorem 2.1 Proof of Theorem 2.1. The consistency follows from a straightforward application of the strong law of large numbers. The asymptotic normality is derived by two successive applications of the delta method [29] . (1) Let Wj1 := (Yjv,1 , . . . , Yjv,p )T (j = 1, . . . , N ) and g 1 be the mapping from Rp to Rp whose l-th coordinate is given by !  −1 l X Y p 1 gl (x1 , . . . , xp ) = xki . l i=1 k1 < . . . < kl ki ∈ Ip , i = 1, . . . , l Then (Wj1 )j=1,...,N is an i.i.d. sample distributed as W 1 := (Y v,1 , . . . , Y v,p )T . Let Σ1 be the covariance matrix of Wj1 . Clearly, one has Σ1ii = Var(Y ) for i ∈ Ip while for i 6= j, Σ1ij = Cov(Y v,i , Y v,j ) = Cov(Y, Y v,2 ). The multidimensional Central Limit Theorem gives that   N X √  1 L N Wj1 − m → Np 0, Σ1 , N →∞ N j=1 where m := (E[Y ], . . . , E[Y ])T . We then apply the so-called delta method to W 1 and g 1 so that  √  1 1    L    T  N g W N − g1 E W 1 → N 0, Jg1 E W 1 Σ1 Jg1 E W 1 N →∞ where Jg1     E W 1 is the Jacobian of g 1 at point E W 1 . Notice that for i ∈ Ip and k ∈ Ip ,  p−1  1  l ∂gl1 l−1  E W = p ml−1 = E[Y ]l−1 =: al . ∂xk p l    T Thus Σ2 := Jg1 E W 1 Σ1 Jg1 E W 1 is given by  Σ2ij = pai aj Σ111 + (p − 1)Σ112 . (2) Now consider Wj2 := (Pjv,1 , . . . Pjv,p )T (j = 1, . . . , N ) and g 2 the mapping from Rp to R defined by p   X p g (y1 , . . . , yp ) = (−1)p−l y1p−l yl . l 2 l=0 Then (Wj2 )j=1,...,N is an i.i.d. sample distributed as W 2 := (P v,1 , . . . P v,p )T . We apply once again the delta method to W 2 so that  √  2 2    L    T  N g W N − g2 E W 2 → N 0, Jg2 E W 2 Σ2 Jg2 E W 2 N →∞ where Jg2     E W 2 is the Jacobian of g 2 at point E W 2 . Notice that for k ∈ Ip ,   ∂g 2 E W 2 = (−1)p−1 p(p − 1)E[Y ]p−1 ∂y1 " l # p−1   X Y p p−l p−l−1 v,i + (−1) (p − l)E[Y ] E Y l i=1 l=2 and   ∂g 2 E W2 = ∂yl   p (−1)p−l E[Y ]p−l . l 17 Thus the limiting variance is 2 σ := Jg2 p    T  X = p Σ111 + (p − 1)Σ112 E W 2 Σ2 J g 2 E W 2 ai bi !2 , i=1   where bi is the i-th coordinate of ∇g 2 E W 2 . 6.2 An auxiliary result and the proofs of the results of Section 3 Lemma 6.1. Let G and H be two measurable functions. Let (Uj )j∈IN and (Vk )k∈IN be two independent samples of i.i.d. random variables. Assume that G(U1 , V1 ) and H(U1 , U2 , V1 ) are both integrable and centered. We define SN and TN by SN = N 1 X G(Uj , Vk ) N2 TN = and j,k=1 N 1 X H(Ui , Uj , Vk ). N3 i,j,k=1 Then SN and TN converge a.s. to 0 as N goes to infinity. 4 Proof of Lemma 6.1. Notice that if E[SN ]=O 0. Now, 4 E[SN ]= 1 N2  then by Borel-Cantelli lemma, SN converges a.s. to 1 X E[G(Ui1 , Vj1 )G(Ui2 , Vj2 )G(Ui3 , Vj3 )G(Ui4 , Vj4 )] N8 where the sum is taken over all the indices i1 , i2 , i3 , i4 , j1 , j2 , j3 , j4 from 1 to N . The only cases leading to terms in O N1 or even in O (1) appear when we sum over indices that are all different except two i’s or two j’s or over indices that are all different. Nevertheless, in those cases, at least one term of the form E[G(Ui , Vj )] appears. Since the function G is centered, those cases are then discarded. The proof of the result concerning TN follows the same tracks.   Proof of Corollary 3.4. The proof is based on Lemma 6.1. First, we define Zj = Zjv,1 , Zjv,2 , G(Zj , Wk ) = 1 {Z v,1 6Wk } 1 {Z v,2 6Wk } , j j  1 F (Zj , Wk ) = 1 {Z v,1 6Wk } + 1 {Z v,2 6Wk } , j j 2 H(Zi , Zj , Wk ) = F (Zi , Wk )F (Zj , Wk ). 18 Second, we proceed to the following decomposition bv N 2,CV M   2   N  N N     X X X 1 1 1   = 1 {Z v,1 6Wk } 1 {Z v,2 6Wk } − 1 {Z v,1 6Wk } + 1 {Z v,2 6Wk } j j j j   N 2N j=1  N j=1  k=1 = N N    X 1 1 X v,1 v,2 v,1 v,2 v,1 v,2 1 − 1 + 1 1 + 1 1 {Zj 6Wk } {Zj 6Wk } {Zi 6Wk } {Zi 6Wk } {Zj 6Wk } {Zj 6Wk } N2 4N 3 j,k=1 = = 1 N2 N X i,j,k=1 G(Zj , Wk ) − j,k=1 1 N3 N X H(Zi , Zj , Wk ) i,j,k=1 N N 1 X 1 X {G(Z , W ) − E[G(Z , W )]} − {H(Zi , Zj , Wk ) − E[H(Zi , Zj , Wk )]} j k j k N2 N3 j,k=1 + = 1 N2 N X i,j,k=1 E[G(Zj , Wk )] − j,k=1 1 N3 N X E[H(Zi , Zj , Wk )] i,j,k=1 N N 1 X 1 X {G(Z , W ) − E[G(Z , W )]} − {H(Zi , Zj , Wk ) − E[H(Zi , Zj , Wk )]} j k j k N2 N3 j,k=1 i,j,k=1   1 1 E[H(Z1 , Z2 , W1 )] − E[H(Z1 , Z1 , W1 )]. + E[G(Z1 , W1 )] − 1 − N N The two first sums converge almost surely to 0 by Lemma 6.1. The remaining term goes to E[G(Z1 , W1 )]− E[H(Z1 , Z2 , W1 )] as N goes to infinity. v It remains to show that N2,CV M = E[G(Z1 , W1 )] − E[H(Z1 , Z2 , W1 )]. On the one hand, v N2,CV M Z = E[(F (t) − F v (t))2 ]dF (t) = E[Hv2 (W1 )] R = E[Cov(1 {Z v,1 6W1 } , 1 {Z v,2 6W1 } )] 1 1 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ] − EZ [1 {Z v,1 6W1 } ]2 ]. 1 1 1 On the other hand, E[G(Z1 , W1 )] − E[H(Z1 , Z2 , W1 )] 1 = E[1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ] − E[(1 {Z v,1 6W1 } + 1 {Z v,2 6W1 } )(1 {Z v,1 6W1 } + 1 {Z v,2 6W1 } )] 1 1 1 1 2 2 4 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ]] − E[1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ] 1 1 1 2 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ]] − E[E[1 {Z v,1 6W1 } 1 {Z v,2 6W1 } |W1 ]] 1 1 1 2 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ]] − E[E[1 {Z v,1 6W1 } |W1 ]E[1 {Z v,2 6W1 } |W1 ]] 1 1 1 2 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ]] − E[E[1 {Z v,1 6W1 } |W1 ]]E[E[1 {Z v,2 6W1 } |W1 ]] 1 1 1 2 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ]] − E[1 {Z v,1 6W1 } ]E[1 {Z v,2 6W1 } ] 1 1 1 2 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ]] − E[1 {Z v,1 6W1 } ]2 1 1 1 = EW [EZ [1 {Z v,1 6W1 } 1 {Z v,2 6W1 } ] − EZ [1 {Z v,1 6W1 } ]2 ] 1 1 1 that completes the proof. 19 Proof of Theorem 3.5. We define for t ∈ R, G1,2 N (t, t) = N 1 X 1 v,1 1 v,2 , N j=1 {Zj 6t} {Zj 6t} GiN (t) = N 1 X 1 v,i , i = 1, 2, N j=1 {Zj 6t} FN (t) = N 1 X 1 {Wk 6t} N k=1 bv and we rewrite N 2,CV M as a regular function depending on the four empirical processes defined above: bv N 2,CV M =  1 2 # Z " GN + G2N 1,2 GN − dFN . 2 By Donsker’s theorem,  √  1,2 L e G1N − F, G2N − F, FN − F N GN − G, → G = (G1 , G2 , G3 , G4 ) N →∞  e = G(t, t) and G is a centered Gaussian process of dimension where G(t, s) = P Z v,1 6 t, Z v,2 6 s , G(t) 4 with covariance function defined by  T Π(t, s) = E At ATs − E (At ) E (As ) , for (t, s) ∈ R2 and At := 1 {Z v,1 6t} 1 {Z v,2 6t} , 1 {Z v,1 6t} , 1 {Z v,2 6t} , 1 {W 6t} T . Since these processes are càd-làg functions of bounded variation, we introduce the maps ψ1 , ψ2 : BV1 [−∞, +∞]2 7→ R and Ψ : BV1 [−∞, +∞]4 7→ R defined by   Z F2 + F3 ψi (F1 , F2 ) = (F1 )i dF2 , i = 1, 2 and Ψ(F1 , F2 , F3 , F4 ) = ψ1 (F1 , F4 ) − ψ2 , F4 , 2 where BVM [a, b] is the set of càd-làg functions of variation bounded by M . Hence,   1,2 v 1 2 b2,CV N = Ψ G , G , G , F , N M N N N Now using the chain rule 20.9 and Lemma 20.10 in [29], the map Ψ is Hadamard-differentiable from the domain BV1 [−∞, +∞]4 into R whose derivative is given by    h2 + h3 F2 + F3 , F4 , h4 (h1 , h2 , h3 , h4 ) 7→ Dψ1 (F1 , F4 )(h1 , h4 ) − Dψ2 2 2 where the derivative of ψi are given by Lemma 20.10: Z Z (h1 , h2 ) 7→ h2 ϕi ◦ F1 |+∞ − h dϕ ◦ F + ϕ0i (F1 )h1 dF2 2− i 1 −∞ with ϕi (x) = xi and h− is the left-continuous version of a càd-làg function h. Applying the functional delta method 20.8 in [29] we get the weak convergence of to the following limit distribution Z Z Z 2 e G4− d(F − G) + G1 dF − F (G2 + G3 )dF. 20 √   v bv N N 2,CV M − N2,CV M Since the map Ψ is continuous on the whole space BV1 [−∞, +∞]4 , the delta method in its stronger form 20.8 in [29] implies that the limit variable is the limit in distribution of the sequence  √  2 e 1 e F, F, F ) N G1,2 DΨ(G, N − G, GN − F, GN − F, FN − F Z    Z  √  1,2 2 1 2 e e = N (FN − F )− d F − G) + GN − G − F GN + GN − 2F dF . We define Z e = G(W e 1 {W <t} d(F 2 (t) − G(t) ) − F (W )2 , U := Z  V := =   1 {Z v,1 6t} 1 {Z v,2 6t} − 1 {Z v,1 6t} + 1 {Z v,2 6t} F (t) dF (t)  1 F (Z v,1 )2 + F (Z v,2 )2 − F (Z v,1 ∨ Z v,2 ). 2 By independence, the limiting variance ξ 2 is ξ 2 = VarU + VarV. 6.3 (12) Proof of Proposition 4.1 Proof of Proposition 4.1. First of all, the distribution function of Y conditioned on X1 is given by F (1) (t) = P(Y 6 t|X1 ) = Φ  ln t − X1 2  . Then 1 N2,CV M Z h i E (F (1) (t) − FY (t))2 fY (t)dt R "    2 # Z 2 ln y 1 ln t − X1 √ −Φ √ e−(ln t) /10 dt = E Φ 2 + 5 10πt R  ! !2  √ Z 2 5z − X dz 1 = E Φ − Φ (z)  e−z /10 √ 2 2π R   !! √ 2 5X2 − X1   Φ(X2 ) − Φ =E 2 = where X1 and X2 are independent standard Gaussian random variables. In the same way, h √  i 2 N2,CV = E (Φ(X ) − Φ 5X − 2X )2 . 2 2 1 M Thus we are lead to compute the bivariate function:   ϕ(α, β) := E (Φ(X2 ) − Φ (αX2 − βX1 ))2 √ √   for (α, β) = ( 5/2, 1/2) and (α, β) = ( 5, 2). The term E Φ(X2 )2 is   E Φ(X2 )2 = Z  1 Φ(z) f (z)dz = Φ(z)3 3 2 21 +∞ = −∞ 1 . 3 We introduce three independent random variables U , U 0 and V distributed as standard Gaussian random h i 2 variables. Then the term E Φ (αX2 − βX1 ) can be rewritten as h 2 E Φ (αX2 − βX1 ) i  p  h i2  2  2 2 √ =E Φ α +β V = E E 1 U 6 α2 +β 2 V |V i h ii h h ii h h = E E 1 U 6√α2 +β 2 V |V E 1 U 0 6√α2 +β 2 V |V = E E 1 U 6√α2 +β 2 V 1 U 0 6√α2 +β 2 V |V h  i  p p = E 1 U 6√α2 +β 2 V 1 U 0 6√α2 +β 2 V = P U 6 α2 + β 2 V, U 0 6 α2 + β 2 V p =: G( α2 + β 2 ). Integrating by parts, we have Z 2 2 dz G0 (a) = 2 zΦ(az)e−(a +1)z /2 2π R h  Z i+∞ 1 −(a2 +1)z 2 /2 −(a2 +1)z 2 /2 − a =− Φ(az)e f (az)e dz π(a2 + 1) −∞ R a 1 √ . = π(a2 + 1) 2a2 + 1 Since G(1) = 1/3, we get Z a p p √ 1 x 1 1 1 1 2 − arctan 3) = √ G(a) = + + (arctan 1 + 2a arctan 1 + 2a2 dx = 2 3 3 π π 2x2 + 1 1 π(x + 1) and h i 1 p p √ 1 1 2 E Φ (αX2 − βX1 ) = + (arctan 1 + 2(α2 + β 2 ) − arctan 3) = arctan 1 + 2(α2 + β 2 ). 3 π π In the same way, the last term E [Φ(X2 )Φ (αX2 − βX1 )] is given by r E [Φ(X2 )Φ (αX2 − βX1 )] = P U 6 V, 1 + β2 0 U 6V α2 ! where U , U 0 and V are independent standard Gaussian random variables. Remind that we only need to q √ √ 1+β 2 consider (α, β) = ( 5/2, 1/2) and (α, β) = ( 5, 2) in which cases α2 = 1. Thus the last term equals 1/3 in both cases. It remains to divide by the normalizing factor 1/6 to get the result. Remark 6.2. In the previous proof, we establish that G(a) = P (U 6 aV, U 0 6 aV ) √ is equal to π1 arctan 1 + 2a2 where U , U 0 and V are independent standard Gaussian random variables. √ Actually, this result is also a straightforward consequence of Lemma 4.3 in [2] with X = (aV −U )/ a2 + 1 √ and Y = (aV − U 0 )/ a2 + 1. Nevertheless, since our proof is different and elegant, we decide not to skip it. References [1] A. Antoniadis. Analysis of variance on function spaces. Statistics: A Journal of Theoretical and Applied Statistics, 15(1):59–71, 1984. [2] J.M. Azaïs and M. Wschebor. Level sets and extrema of random processes and fields. John Wiley & Sons, Inc., Hoboken, NJ, 2009. 22 [3] E. Borgonovo. A new uncertainty importance measure. Reliability Engineering & System Safety, 92(6):771–784, 2007. [4] E. Borgonovo and M. Baucells. Invariant probabilistic sensitivity analysis. Management Science, 59(11):2536–2549, 2013. [5] E. Borgonovo, W. Castaings, and S. Tarantola. Moment independent importance measures: New results and analytical test cases. Risk Analysis, 31(3):404–428, 2011. [6] E. Borgonovo, W. Castaings, and S. Tarantola. Model emulation and moment-independent sensitivity analysis: An application to environmental modelling. Environmental Modelling & Software, 34:105– 115, 2012. [7] E. Borgonovo, G. Hazen, and E. Plischke. Probabilistic sensitivity measures: Foundations and estimation. Submitted, pages 1–24, 2014. [8] E. Borgonovo and B. Iooss. Moment Independent Importance Measures and a Common Rationale. Preprint, 2015. [9] E. Borgonovo and B. Iooss. Moment-Independent and Reliability-Based Importance Measures, pages 1–23. Springer International Publishing, Cham, 2016. [10] R. Buchbinder and A. S. Detsky. Management of suspected giant cell arteritis: A decision analysis. J. Rheumatology, 19(9):1220–1228, 1992. [11] S. Da Veiga. Global sensitivity analysis with dependence measures. J. Stat. Comput. Simul., 85(7):1283–1305, 2015. [12] Y. De Castro and A. Janon. Randomized pick-freeze for sparse Sobol indices estimation in high dimension. ArXiv e-prints, March 2014. [13] E. De Rocquigny, N. Devictor, and S. Tarantola. Uncertainty in industrial practice. Wiley Online Library, 2008. [14] J.C. Felli and G. Hazen. Sensitivity analysis and the expected value of perfect information. Med. Decis. Making, 18(1):95–109, 1998. [15] J.C. Felli and G. Hazen. Javelin diagrams: A graphical tool for probabilistic sensitivity analysis. Decision Analysis, 1(2):93–107, 2004. [16] J.-C. Fort, T. Klein, and N. Rachdi. New sensitivity analysis subordinated to a contrast. Communications in Statistics - Theory and Methods, 2015 to appear. [17] F. Gamboa, A. Janon, T. Klein, and A. Lagnoux. Sensitivity analysis for multidimensional and functional outputs. Electronic Journal of Statistics, 8:575–603, 2014. [18] F. Gamboa, A. Janon, T. Klein, A. Lagnoux-Renaudie, and C. Prieur. Statistical inference for Sobol pick freeze Monte Carlo method, March 2013. [19] A. Janon, T. Klein, A. Lagnoux, M. Nodet, and C. Prieur. Asymptotic normality and efficiency of two sobol index estimators. ESAIM: Probability and Statistics, 18:342–364, 1 2014. [20] A. Müller. Integral probability metrics and their generating classes of functions. Adv. in Appl. Probab., 29(2):429–443, 1997. [21] J. von Neumann and O. Morgenstern. Theory of Games and Economic Behavior. Princeton, NJ. Princeton University Press, 1953. [22] J. E. Oakley. Decision-theoretic sensitivity analysis for complex computer models. Technometrics, 51(2):121–129, 2009. [23] A.B. Owen. Variance components and generalized sobol’ indices. SIAM/ASA Journal on Uncertainty Quantification, 1(1):19–41, 2013. 23 [24] A.B. Owen, J. Dick, and S. Chen. Higher order sobol’ indices. Information and Inference, 3(1):59–81, 2014. [25] A. Saltelli, K. Chan, and E.M. Scott. Sensitivity analysis. Wiley Series in Probability and Statistics. John Wiley & Sons, Ltd., Chichester, 2000. [26] T. J. Santner, B. Williams, and W. Notz. The Design and Analysis of Computer Experiments. Springer-Verlag, 2003. [27] I. M. Sobol. Sensitivity estimates for nonlinear mathematical models. Math. Modeling Comput. Experiment, 1(4):407–414 (1995), 1993. [28] H. J. ter Horst. On Stieltjes integration in Euclidean space. J. Math. Anal. Appl., 114(1):57–74, 1986. [29] A. W. van der Vaart. Asymptotic statistics, volume 3 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, Cambridge, 1998. 24
10math.ST
PREFERENTIAL ATTACHMENT AND VERTEX ARRIVAL TIMES Benjamin Bloem-Reddy and Peter Orbanz arXiv:1710.02159v1 [math.PR] 5 Oct 2017 University of Oxford and Columbia University We study preferential attachment mechanisms in random graphs that are parameterized by (i) a constant bias affecting the degreebiased distribution on the vertex set and (ii) the distribution of times at which new vertices are created by the model. The class of random graphs so defined admits a representation theorem reminiscent of residual allocation, or “stick-breaking” schemes. We characterize how the vertex arrival times affect the asymptotic degree distribution, and relate the latter to neutral-to-the-left processes. Our random graphs generate edges “one end at a time”, which sets up a one-toone correspondence between random graphs and random partitions of natural numbers; via this map, our representation induces a result on (not necessarily exchangeable) random partitions that generalizes a theorem of Griffiths and Spanó. A number of examples clarify how the class intersects with several known random graph models. The term preferential attachment describes generative mechanisms for random graph models that select the terminal vertices of a new edge with probability biased by the vertex degrees. These models come in many shapes and guises [e.g. 4, 5, 24, 32], and are often motivated by their ability to generate (and hence explain) power law distributions. Degree-biased selection is a form of size bias [3], and this interplay between size-biasing and power laws is not confined to random graph models, but also encountered in random partitions, which are used in population genetics, machine learning, and other fields [e.g. 36, 16, 10]. In partition models, power laws arise as heavy-tailed distributions of block sizes. Size-biased sampling as such, however, need not result in a power laws: The most basic form of size-biased sampling from a countable number of categories is a type of Pólya urn with an unbounded number of colors, or, equivalently, the one-parameter Chinese restaurant process [36]. It does not generate a power law. To obtain power laws, plain size-biased sampling can be modified in two ways: (i) By biasing the size-biased probability of each category downward. (ii) By forcing new categories to arrive at a faster rate than that induced by plain size-biased sampling. An example is the two-parameter Chinese restaurant process with parameter (α, θ), which modifies the Chinese restaurant process with a single parameter θ—a model that corresponds to plain size-biased sampling—by effectively (i) damping the size bias by a constant offset α, and (ii) increasing the rate at which new categories arrive. 1 2 An example of (ii) is the Barabási–Albert random graph model, in which vertices arrive at fixed, constant time intervals; if these times were instead determined at random by size-biased sampling, intervals would grow over time. The premise of this work is to study preferential attachment mechanisms in random graph models by explicitly controlling these two effects: (i) The attachment probability, proportional to the degree degk of each vertex k, is biased by a constant offset as degk − α. (ii) Vertex arrival times are taken into account, by explicitly conditioning the generation process on a (random or non-random) sequence of given times. The result is a class of random graphs parametrized by the offset α and a sequence t of vertex arrival times. Each such (α, t)-graph can be generalized by randomizing the arrival times, i.e. to an (α, T )-graph for a random sequence T . Preferential attachment models that constantly bias the attachment probability have been thoroughly studied [30, 24]. We consider the range α ∈ (−∞, 1), and the case α ∈ [0, 1) turns out to be of particular interest. The effects (i) and (ii) are not independent, and in models with a suitable exchangeability property, the effect of α can equivalently be induced by controlling the law of the arrival times. In this sense, (ii) can provide more control over the model than (i). Section 1 characterizes (α, T )-graphs by a representation in terms of independent beta random variables, reminiscent of stick-breaking constructions of random partitions. Section 2 considers implications for random partitions and urns. (α, T )-graphs generate edges “one end at a time”, updating the vertex degrees after each step. Although such a scheme differs from the usual preferential attachment model, it is similar to so-called “sequential” versions considered by [5, 32]. This sets up a one-to-one correspondence between multigraphs and partitions of natural numbers: There is a bijection Φ such that Φ(partition) = graph , which translates our results on graphs into statements about partitions. If G is an (α, T )-graph, the random partition Φ−1 (G) may or may not be exchangeable. The subclass of such partitions that are exchangeable are precisely the exchangeable Gibbs partitions [21, 36]. Arrival times in such partitions, known as record indices, have been studied by Griffiths and Spanò [23]. Broadly speaking, our results recover those of Griffiths and Spanò if Φ−1 (G) is exchangeable, but show there is a larger class of random partitions—either of Gibbs type, or not exchangeable—for which similar results hold. Non-exchangeable examples include partitions defined by the Yule–Simon process [42, 39]. Additionally, our representation result for graphs yields an analogous representation for this class of partitions; it also relates the work of Griffiths and Spanò [23] to that of Berger, Borgs, Chayes, and Saberi [5] on Benjamini–Schramm limits of certain random preferential attachment graphs. 3 Section 3 studies degree asymptotics of (α, T )-graphs. Properly scaled degree sequences of such graphs converge. The limiting degrees are neutral-to-the-left sequences of random variables that satisfy a number of distributional identities. We characterize cases in which power laws emerge, and relate the behavior of the degree distribution to sparsity. The range of power laws achievable is constrained by whether or not the average degree is bounded. Section 4 discusses examples, and shows how the class of (α, T )-graphs overlaps with several known models, such as the Barabási–Albert model [4], edge exchangeable graphs [14, 11, 28], and the preferential attachment model of Aiello, Chung, and Lu [1, 2]. We obtain new results for some of these submodels. For preferential attachment graphs, for example, limiting degree sequences are known to satisfy various distributional identities [32, 25, 26]. These results assume fixed intervals between vertex arrival times. We show similar results hold if arrival times are random. Perhaps most closely related is the work of Peköz, Röllin, and Ross [33] on random immigration times in a two-color Pólya urn, which corresponds to a certain (α, T )model with i.i.d. interarrival times. We use this correspondence to answer a question posed in [33] about interarrival times with geometric distribution. 1. Preferential attachment and arrival times. Consider an undirected multigraph g, possibly with self-loops, with a countably infinite number of edges. The graph models considered in the following insert edges into the graph one at a time. It is hence convenient to represent g as a sequence of edges  (1) g = (l1 , l2 ), (l3 , l4 ), . . . where lj ∈ N for all j ∈ N . Each pair (l2n−1 , l2n ) represents an undirected edge connecting the vertices l2n−1 and l2n . The vertex set of g is V(g) := {l1∗ , l2∗ , . . .}, the set of all distinct values occurring in the sequence. We assume vertices are enumerated in order of appearance, to wit (2) l1 = 1 and lj+1 ≤ max {l1 , . . . , lj } + 1 for all j ∈ N . Consequently, V(g) is either a consecutive finite set {1, . . . , m}, or the entire set N. Let G be the set of multigraphs so defined, equipped with the topology inherited from the product space N∞ , which makes it a standard Borel space. For our purposes, a random graph is a random element G = (L1 , L2 ), (L3 , L4 ), . . .) of G, for N-valued random variables Ln . Note that the same setup can be used to model directed multigraphs. For a graph g, let gn := (lj )j≤2n denote the subgraph given by the first n edges, and degk (n) the degree of vertex k in gn . The arrival time of vertex k is tk := min {j ∈ N | lj = k} , 4 with tk = ∞ if g has fewer than k vertices. The set of possible arrival time sequences is T := {(1 = t1 < t2 < . . . ≤ ∞)}. Arrival times in T2 := {t ∈ T | tk even for k > 1} is a sufficient, though not necessary, condition for g to be a connected graph; it is necessary and sufficient for each gn to be connected. If T = (T1 , T2 , . . .) is a random sequence of arrival times, the interarrival times ∆k := Tk − Tk−1 where T0 := 0 are random variables with values in N ∪ {∞}. 1.1. Degree-biased random graphs. The term preferential attachment describes a degree bias: Recall that the degree-biased distribution on the vertices of a graph gn with n edges is P (k ; gn ) := degk (n)/2n. We embed P into a one-parameter family of laws degk (n) − α Pα (k ; gn ) := for α ∈ (−∞, 1) , 2n − α|V(gn )| the α-degree biased distributions. Both P and Pα are defined on a graph gn , in which each edge is either completely present or completely absent. To permit edges to be generated “one end at a time”, we observe Pα can be rewritten as (3) Pα (k ; l1 , . . . , lj ) = |{i ≤ j|lj = k}| − α j − α max {l1 , . . . , lj } for k ≤ max {l1 , . . . , lj } , which is well-defined even if j is odd. (α, t)-graph. Given are α ∈ (−∞, 1) and t ∈ T. Generate L1 , L2 , . . . as Ln := k if n = Tk and Ln ∼ Pα ( • ; L1 , . . . , Ln−1 ) otherwise . Then G := ((L1 , L2 ), (L3 , L4 ), . . .) is a random graph, whose law we denote DB(α, t). The sequence t may additionally be randomized: We call G an (α, T )-graph if its law is DB(α, T ), for some random element T of T. Examples of multigraphs generated using different distributions for T are shown in Fig. 1. As a consequence of the family of laws (3), the finite-dimensional distributions of (α, t)-graphs have a simple product form. Proposition 1. Let Gn be an (α, t)-graph with n/2 edges and k vertices. Then Pα,t [Gn/2 = ((L1 , L2 ), . . . , (Ln−1 , Ln ))] (4) = k Y Γ(Tj − jα)Γ(#{Li = k | i ≤ n} − α) 1 . Γ(n − kα) Γ(Tj − 1 − (j − 1)α + δ1 (j))Γ(1 − α) j=1 / 5 1.2. Representation result. Fix α ∈ (−∞, 1) and t ∈ T. Let Ψ1 , Ψ2 , . . . be independent random variables with Ψ1 = 1,  (5) Ψj ∼ Beta 1 − α, tj − 1 − (j − 1)α for j ≥ 2 , and define (6) Wj,k := j X i=1 Ψi k Y (1 − Ψ` ) and Ij,k := [Wj−1,k , Wj,k ) with W0,k = 0 . `=i+1 Q Note that Wj,k = k`=j+1 (1−Ψ` ) and Wk,k = 1. Hence, ∪kj=1 Ij,k = [0, 1). Generate a random sequence U1 , U2 , . . . ∼iid Uniform[0, 1). For each n, let tk(n) be the preceding arrival time, i.e. the largest tk with tk ≤ n, and set ( k(n) if n = tk(n) (7) Ln := . j such that Un ∈ Ij,k(n) otherwise Then H(α, t) := ((L1 , L2 ), . . .) is a random element of G. d Theorem 2. A random graph G is an (α, T )-graph if and only if G = H(α, T ) for some α ∈ (−∞, 1) and a random element T of T. / Products of the form (6), for the same sequence of beta variables Ψj , previously have appeared in two separate contexts: Griffiths and Spanò [23] identify Ψj Wj,∞ as the limiting relative block sizes in exchangeable Gibbs partitions, conditioned on the block arrival times. This corresponds to the special case of Theorem 2 where the random variables (L1 , L2 , . . .) define an exchangeable Gibbs partition (see Sections 2 and 4.2). In work of Berger, Borgs, Chayes, and Saberi [5], a version of (5)–(7) arises as the representation of the Benjamini–Schramm limit of certain preferential attachment graphs (in which case all interarrival times are fixed to a single constant). That two problems so distinct lead to the same (and arguably not entirely obvious) distribution raises the question whether (5) can be understood in a more conceptual way. One such way is by regarding the graph as a recursive sequence of Pólya urns: Conditionally on an edge attaching to one of the first k vertices, it attaches to vertex k with probability Ψk and one of the first k − 1 with probability 1 − Ψk , and so on for k − 1, . . . , 2. A related interpretation is in terms of the special properties of beta and gamma random variables. Let Ga and Ba,b generically denote a gamma random variable with parameters (a, 1) and a beta variable with parameters (a, b). Beta and gamma random variables satisfy a set of relationships sometimes referred to collectively as the beta-gamma algebra [e.g. 38]. These relationships revolve around the fact that, if Ga and Gb are independent, then  d  Ga  (8) Ga+b , Ba,b = Ga + Gb , , Ga + Gb 6 where the pair on the left is independent, and so is the pair on the right. In the context of (α, T )-graphs, conditionally on the sequence ∆1 , ∆2 , . . . of interarrival times, generate two sequences of gamma variables G (1) , G (2) , . . . ∼iid Gamma(1 − α, 1) G∆2 −1 , G∆3 −1 , . . . , and all mutually independent given (∆k ). The variables Ψk can then be represented as (9) Ψj d = G (j) P (i) + i≤j G i<j G∆i+1 −1 P =: Ψ0j . Such recursive fractions are not generally independent, but as a consequence of d (8), equality in law holds even jointly, (Ψ1 , Ψ2 , . . .) = (Ψ01 , Ψ02 , . . .), recovering the d variables in Theorem 2. Identity (8) further implies Ba,b+c = Ba,b Ba+b,c , again with independence on the right. Abbreviate τj := tj − 1 + α(j − 1) d Ψj = B1−α,τj . such that (5) becomes The recursion (9) then implies d B1−α,τj = B1−α+τj−1 ,∆j −α B1−α,τj−1 hence d Ψj |Ψj−1 = Ψj−1 B1−α+τj−1 ,∆j −α , with independence on the right of both identities. Informally, one may think of G (k) as an (unnormalized) propensity of vertex k to attract edges, of those edges attaching to one of the first k vertices. The requisite normalization in (9) depends on propensities of previously created vertices (represented by the variables G (1) , . . . , G (k−1) ), and contributions of the “head start” given to previously created vertices (represented by the variables G∆j −1 ). 2. Graphs and urns. Any graph in G defines a partition of N, and vice versa. This fact is used below to classify α-degree biased graphs according to the properties of the random partition they define. More precisely, a partition of N is a sequence π = (b1 , b2 , . . .) ⊂ N of subsets, called blocks, such that each n ∈ N belongs to one and only one block. The set of all partitions is denoted P(N), and inherits the topology of N∞ . A partition can equivalently be represented as a sequence π = (l1 , l2 , . . .) of block labels, where lj = k means j ∈ bk . There is hence a bijective map  Φ : P(N) → G given by (l1 , l2 , . . .) 7→ (l1 , l2 ), (l3 , l4 ), . . . , which is a homeomorphism of P(N) and G. It identifies blocks of π with vertices of g = Φ(π). In population genetics, the smallest element of the kth block of a partition π is known as a record index [23]. Thus, the kth arrival time in g is precisely the kth record index of π. The generative process of a random partition Π can be thought of as an urn: Start with an empty urn, and add consecutively numbered balls one at a time, each colored 7 with a randomly chosen color. Colors may reoccur, and are enumerated in order of first appearance. Let Bk (n) be the set of all balls sharing the kth color after n balls have been added. For n → ∞, one obtains a random partition Π = (B1 , B2 , . . .) of N, with blocks Bk := ∪n Bk (n). In analogy to the (α, t)-graphs above, we define: (α, t)-urn. Given are α ∈ (−∞, 1) and t ∈ T. • If n = t for some k, add a single ball of a new, distinct color to the urn. k • Otherwise, add a ball of a color already present in the urn, where the jth color is chosen with probability proportional to |Bj (n)| − α. A familiar special case of such an urn is the Pólya urn with m colors, obtained for α = 0 and t = (1, 2, . . . , m, ∞, ∞, . . .). Another is the two-parameter Chinese restaurant process [36], also known as the Blackwell–MacQueen urn [7, 34]: If t is randomized by generating (T1 = 1, T2 , T3 , . . .) according to (10) P[Tk+1 = Tk + t | Tk ] = (θ + αk) Γ(θ + Tk )Γ(Tk + t − 1 − αk) , Γ(θ + Tk + t)Γ(Tk − αk) for some θ > −α, the partition has law CRP(α, θ). In general, (α, t)-urns define a class of random partitions Π that are coherent, in the sense that P(Πn−1 = {B1 , . . . , Bk }) = k+1 X P(Πn = An→j (Πn−1 )) , j=1 where An→j (Πn−1 ) denotes the operation of appending n to block Bj in Πn−1 . Partitions for which these probabilities depend only on the sizes of the blocks, and which are therefore invariant under permutations of the elements, are exchangeable random partitions [36]. That is, there is an exchangeable partition probability function (EPPF) p(·), symmetric in its arguments, such that p(|B1 |, . . . , |Bk |) = P(Πn = {B1 , . . . , Bk }) , which is invariant under the natural action of the symmetric group. A special subclass are the exchangeable partitions of Gibbs type, for which the EPPF has the unique product form [21] (11) k Y Γ(|Bj | − α) p(|B1 |, . . . , |Bk |) = Vn,k , Γ(1 − α) j=1 for a suitable sequence of coefficients Vn,k satisfying the recursion (12) Vn,k = (n − αk)Vn+1,k + Vn+1,k+1 . 8 The distribution of the arrival times can be deduced from (11) and (12) as (13) P[Tk+1 = Tk + t | Tk ] = Γ(Tk + t − 1 − αk) VTk +t,k+1 , Γ(Tk − αk) VTk ,k of which (10) for the CRP is a special case. Denote the law of T1 , . . . , Tk generated by (13) as Pα,V (T1 , . . . , Tk ). Alternatively, consider the (α, T )-urn counterpart of the EPPF, given in Proposition 1, (14) pα,T (|B1 |, . . . , |Bk |; T1 , . . . , Tk ) = P[Πn = {B1 , . . . , Bk } | T1 , . . . , Tk ] k Y Γ(Tj − jα)Γ(|Bj | − α) 1 = . Γ(n − kα) Γ(Tj − 1 − (j − 1)α + δ1 (j))Γ(1 − α) j=1 Define (15) α,T := Vn,k k Y Γ(Tj − jα) 1 , Γ(n − kα) Γ(Tj − 1 − (j − 1)α + δ1 (j)) j=1 in which case (14) takes on the Gibbs-like form pα,T (|B1 |, . . . , |Bk |; T1 , . . . , Tk ) = α,T Vn,k k Y Γ(|Bj | − α) . Γ(1 − α) j=1 This general formula holds for all (α, T )-urns. In the case that Π is exchangeable, these relationships imply a further characterization of exchangeable Gibbs partitions: (11) is obtained by marginalizing the arrival times from (14) according to Pα,V . Proposition 3. Let Π be a random partition generated by an (α, T )-urn, with finite-dimensional conditional distributions given by (14). Then Π is exchangeable if and only if there exists some sequence of coefficients V = (Vn,k ) satisfying Vn,k = k X Pα,V (T1 , . . . , Tk ) Y Γ(Tj − jα) α,T = E[Vn,k ], Γ(n − kα) Γ(Tj − 1 − (j − 1)α + δ1 (j)) T1 ,...,Tk Tk ≤n j=1 for all k ≤ n, in which case (11) holds and Π is an exchangeable Gibbs partition. / It is straightforward to verify that Φ(Π) is an (α, t)-graph if and only if Π is an (α, t)-urn. This correspondence is used in Section 4 to classify some (α, t)-graphs according to the urns they define. It also allows us to translate properties of random graphs into properties of random partitions, and vice versa. Theorem 2 implies the following result on partitions, which gives a representation of exchangeable Gibbs partitions. 9 Corollary 4. A random partition Π is an (α, t)-urn if and only if it is disd tributed as Π = (L1 , L2 , . . .), for variables Ln generated according to (5)–(7). / 3. Degree asymptotics. Let G be an (α, t)-graph, and Gn the subgraph given by its first n edges. The degree sequence of Gn is the vector D(n) = (degk (n))k≥1 , where vertices are ordered by appearance. Denote by md (n) the number of vertices in Gn with degree d. The empirical degree distribution (pd (n))d≥1 := |V(gn )|−1 (md (n))d≥1 is the probability that a vertex sampled uniformly at random from Gn has degree d. The degree sequence and the degree distribution as Gn grows large are characterized by the scaling behavior induced by α and t, which yields power laws and related properties. 3.1. Linear and sub-linear regimes. As will become clear in the next section, the scaling behavior of (α, t)-graphs is the result of products of the form (16) k Y Wj,k = (1 − Ψi ) as k→∞, i=j+1 where (Ψj )j>1 are as in (5). In particular, two regimes of distinct limiting behavior emerge. To which of the two regimes an (α, t)-graph belongs is determined by whether or not Wj,k converges to a non-zero value as k → ∞. We consider (α, t)-graphs that satisfy the following assumption: (17) a.s. |V(Gn )|/nσ −−−→ µ−σ σ n→∞ for some 0<σ≤1 and 0 < µσ < ∞ . Slower vertex arrival rates (e.g., logarithmic) result in graphs that are almost surely dense (see Section 3.4), and as such exhibit less interesting structural properties. For example, in order to generate power law distributions in (α, t)-graphs, the asymptotic arrival rate must be super-logarithmic, which follows from work on exchangeable random partitions and can be read from [36, Chapter 3]. For a growing graph sequence satisfying the assumption (17), consider the limiting average degree, lim d¯n = lim n→∞ n→∞ 2n σ µ−σ σ n = lim n→∞ 2 n µ−σ σ 1−σ . The average degree is almost surely bounded if σ = 1, which we call the linear regime; for σ ∈ (0, 1), the sub-linear regime, it diverges. This is a consequence of Proposition 5 below: For a graph Gn on k(n) vertices, the probability that the end of edge n + 1 is attached to vertex j is equal to Ψj Wj,k(n) , which results in vertex j participating in a constant proportion of edges if and only if Wj,k(n) is bounded away from zero as n grows large. 10 Proposition 5. For fixed α ∈ (−∞, 1) and t ∈ T such that (17) is satisfied for some σ ∈ (0, 1], let Wj,k be as in (16). Then for each j ≥ 1, Wj,k converges almost surely as k → ∞ to some random variable Wj,∞ , which is non-zero if and only if σ < 1. / Remark 6. For slower vertex arrivals (e.g.logarithmic) or when the limiting number of vertices is finite, Wj,k(n) also converges to a non-zero value. / 3.2. Limiting joint distributions of degree sequences for given arrival times. The previous section suggests that the limit of the scaled degrees should depend on the random variables (Ψj )j>1 . Indeed, for any (α, t)-graph G, it can be shown that for any r ∈ N+ , (18) n−1 degj (n) a.s.  −−−→ ξj 1≤j≤r n→∞  1≤j≤r where d ξj = Ψj ∞ Y (1 − Ψi ) , i=j+1 and (Ψj )j>1 are as in (5). Griffiths and Spanò [23] showed that relative degrees with such a limit uniquely characterize exchangeable Gibbs partitions among all exchangeable partitions; if the random partition Φ−1 (G) is exchangeable, that result applies to G (see Section 4.2). For a general (α, t)-graph, Φ−1 (G) need not be exchangeable, and indeed there are examples for which n−1 D(n) converges to zero, in which case Wj,k(n) does, as well. In such cases, one may ask more generally whether a finite, non-zero limit D∞ := lim n−1/γ D(n) , n→∞ exists for an appropriate scaling exponent γ. Theorem 7 establishes that this is true for (α, t)-graphs. Theorem 7. Let G be an (α, t)-graph for some α ∈ (−∞, 1) and t ∈ T. Then (18) holds. If t is such that (17) holds with σ = 1, assume lim j→∞ tj = µ ∈ (1, ∞) . j Then for every r ∈ N+ , there exists a positive, finite constant Mr (t), and positive random variables ζ1 , . . . , ζr such that a.s. Mr (t)n−r/γ deg1 (n) · · · degr (n) −−−→ ζ1 · · · ζr n→∞ where γ= µ−α . µ−1 The Pr mixed moments also converge: For any p1 , . . . , pr > −(1 − α)/2 with p̄ = j=1 pj , there exists some Mp̄ (t) ∈ (0, ∞) such that (19)     Mp̄ (t)E lim n−p̄/γ deg1 (n)p1 · · · degr (n)pr = E ζ1p1 · · · ζrpr . n→∞ 11 Furthermore, (20) ζj d  1≤j≤r = Ψj r Y  (1 − Ψi ) 1≤j≤r , i=j+1 where Ψ1 = 1 and (Ψj )j>1 are as in (5). / In the sub-linear regime, (18) agrees with and generalizes the result of [23] for exchangeable Gibbs partitions (though the proof uses different methods). In the linear regime, the mixed moments of the scaled degrees also converge to those of products of independent beta random variables. However, the result does not completely describe the joint distributions, due to the presence of the unknown scaling terms Mp̄ (t). These terms depend on the moments p1 , . . . , pr , and on t, and express the randomness remaining, for large k(n), in Wj,k(n) after the part that scales with n is removed; in particular, they result from early fluctuations of the process. Section 4 provides stronger results in several cases for which these terms are well-behaved. 3.3. Neutrality. It was noted in Section 2 that the map Φ−1 from graphs to partitions translates results on graphs into results on partitions. Conversely, one can transfer properties from partitions to graphs. A sequence (X1 , X2 , . . .) of random variables is neutral-to-the-left (NTL) if the relative increments X1 , Xj X2 , . . . , Pj ,... X1 + X2 i=1 Xi are independent random variables in (0,1) [17, 23]. If Π is an exchangeable partition, Griffiths and Spanò [23] show that the limiting relative block sizes of Π are NTL if and only if Π is an exchangeable Gibbs partition. If so, the random graph Φ(Π) has a limiting degree sequence D∞ that is NTL. Due to the representation in Theorem 2, this property generalizes beyond the exchangeable case: Corollary 8. The limiting degree sequence D∞ of an (α, t)-graph is NTL. / 3.4. Sparsity and power law degrees. Suppose Gn is the subgraph of an (α, T )graph G, given by the first n edges. Since Gn is finite, one can sample a vertex uniformly at random from its vertex set and report its degree Dn . One can then ask whether the sequence of random degrees Dn converges in distribution to some limiting variable D. We show in this section that that is indeed the case for (α, T )graphs, under some regularity conditions. We also show how the degree distribution is related to the sparsity, or, equivalently, the edge density, of (Gn ). The sequence (Gn ) is defined to be ε-dense if (21) lim sup n→∞ n = cε > 0 |V(Gn )|ε for some ε≥1. 12 If ε < 2, the graph sequence is typically called sparse; when ε ≥ 2, the sequence is dense. Note that ε > 2 is only possible for multigraphs. The level of sparsity follows from σ: Graph models in the linear regime correspond to ε = 1 [9, 5, 2]; graph models in the sub-linear regime with σ > 21 have appeared in the literature [12, 41, 14, 11], with 1 < ε < 2. See Section 4 for examples. For functions a and b, we use the notation n↑∞ a(n) ∼ b(n) :⇔ lim a(n)/b(n) → 1 . n→∞ The sequence (Gn ) has power law degree distribution with exponent η > 1 if pd (n) = (22) md (n) d↑∞ −−−→ pd ∼ L(d)d−η |V(Gn )| n→∞ for all large d , for some slowly varying function L(d), that is, limx→∞ L(rx)/L(x) = 1 for all r > 0 [6, 20]. In the sub-linear regime, the degree distribution follows from results due to Pitman and Hansen [36, Lemma 3.11], see also [22], on the limiting block sizes of exchangeable random partitions (see Section 4.2 for more details). In particular, if (17) is satisfied by an (α, t)-graph Gα = Φ(Πα ) for σ = α ∈ (0, 1), then there exist an exchangeable random partition Π and a positive, finite random variable S such that a.s. |V(Φ(Π2n ))|/nα −−−→ S, Π = Πα and S = µα . The limiting degree distribution is n→∞ pαd (23) = α Γ(d − α) Γ(d + 1)Γ(1 − α) α d−(1+α) . Γ(1 − α) d↑∞ ∼ In the linear regime, σ = 1, with limiting mean interarrival time µ1 . We show (see Appendix A.4) that the resulting limiting degree distribution is a generalization of the classical Yule–Simon distribution (which corresponds to α = 0) [42, 39, 19], (24) pγd = γ Γ(d − α)Γ(1 − α + γ) Γ(d + 1 − α + γ)Γ(1 − α) d↑∞ ∼ γ Γ(1 − α + γ) −(1+γ) d , Γ(1 − α) where γ := µµ11−α −1 , as in (19). The tail behavior of the two distributions (23), (24) partition the range of possible values of the power law exponent, as summarized by the following theorem. Theorem 9. Let G be a random (α, T )-graph for some α ∈ (−∞, 1) and T ∈ T. If a.s. Tj j −1/σ −−−→ µσ j→∞ for some σ ∈ (0, 1] and 1 < µσ < ∞ , then G has ε-density with ε = 1/σ. If σ = 1, assume that E[∆j ] = µ1 , Var(∆j ) < ∞ 2 |i − j|−`∆ for all i, j > 1, some C 2 ≥ 0, and for all j ∈ N+ , and |Cov(∆i , ∆j )| ≤ C∆ ∆ 13 some `∆ > 0. Then the degree distribution converges asymptotically, ( pαd if σ = α ∈ (0, 1) md (n) p −−−→ , |V(Gn )| n→∞ pγd if σ = 1 which for large d follows a power law with exponent ( 1 + α ∈ (1, 2) if σ = α ∈ (0, 1) η= . 1 + γ ∈ (2, ∞) if σ = 1 / The distributions (23), (24) have the following representation, which is useful for generating realizations from those distributions. Corollary 10. Let G be a random (α, T )-graph for some α ∈ (−∞, 1) and T ∈ T satisfying the conditions of Theorem 9. Then the degree Dn of a vertex sampled uniformly at random from Gn converges in distribution to D0 , where D0 is sampled as ( Beta(α, 1 − α) if σ = α ∈ (0, 1) 0 D ∼ Geom(B) for B ∼ . Beta(γ, 1 − α) if σ = 1 / This representation can be refined further: The proof of Theorem 9 shows, by extending techniques introduced by Berger, Borgs, Chayes, and Saberi [5], that the neighborhood of a random vertex can be coupled to a Poisson point process on the unit interval. That yields the following representation: Corollary 11. Let G be a random (α, T )-graph for some α ∈ (−∞, 1) and T ∈ T satisfying the conditions of Theorem 9. Then the degree Dn of a vertex sampled uniformly at random from Gn converges in distribution to D0 , where D0 is sampled as (   Beta(α, 1) if σ = α ∈ (0, 1) 1−B 0 G1−α for B ∼ . D ∼ Poisson B Beta(γ, 1) if σ = 1 / Remark 12. Based on the fact that (1 − B)/B is distributed as a so-called beta prime random variable, additional distributional identities may be deduced. To give one, let G1 , Gα , and Gγ be independent Gamma random variables. Then one can replace (1 − B)/B above by G1 /Gα (for σ = α < 1) or G1 /Gγ (for σ = 1). / 14 Fig 1. Examples of (α, T )-graphs generated using different arrival time distributions. Each graph has 500 edges. Left: arrival times generated by CRP(α, θ), with α = 0.1, θ = 5. Middle: interarrival times are i.i.d. Poisson+ (2), with α = 0.1. Right: interarrival times are i.i.d. Geom(0.25), with α = 0.5. 3.5. A note on almost surely connected graphs. Suppose one requires each graph in the evolving sequence (Gn ) drawn from an (α, T )-graph to be almost surely connected. That holds if and only if T ∈ T2 , i.e. if each arrival time after T1 = 1 is even. A simple way to generate T ∈ T2 is to sample ∆2 , ∆3 , . . . as in the generation of general T ∈ T, and to set (25) T2 = 2∆2 , Tk = Tk−1 + 2∆k for k > 2 . In the sub-linear regime, doubling the interarrival times does not affect the degree asymptotics. In the linear regime, the change has noticeable affect. For example, suppose the variables ∆k above are drawn i.i.d. from some probability distribution on N+ with mean µ. Then by Theorem 9, the limiting degree distribution has power law exponent η2 = 1 + 2µ−α 2µ−1 . For T 6∈ T2 , the upper limit of η is ∞, no matter the value of α; for T ∈ T2 , one has η2 < 3 − α. Hence, if α > 0, then η2 ∈ (2, 3), implying that the limiting degree distribution has finite mean, but unbounded variance for any µ. 4. Examples. We next discuss several subclasses of (α, T )-graphs. One is obtained by fixing all interarrival times to the same, constant value (Section 4.1). This includes the Barabási–Albert random tree as a special case. Other subclasses can be obtained by imposing exchangeability assumptions. One is that the vertex assignment variables Ln form an exchangeable sequence, and hence that the induced random partition Φ−1 (G) is exchangeable (Section 4.2). This subclass overlaps with the class of “edge exchangeable” graphs [14, 11, 28]. If the interarrival times ∆k are exchangeable (Section 4.3), the induced partition is not exchangeable. This case includes a version of the random graph model of [1, 2, 13]. 15 4.1. Barabási–Albert trees and graphs with constant interarrival time. The basic preferential attachment model popularized by [4] generates a random graph as follows: With parameter d ∈ N+ , start with any finite connected graph. At each step, select d vertices in the current graph independently from P0 in (3), add a new vertex, and connect it to the d selected vertices (multiple connections are allowed). The Barabási–Albert model can be expressed in terms of a sequence (L1 , L2 , . . .) with given arrival times as follows: Start, say, with a graph consisting of a single vertex and d self-loops. Thus, tk = 1 and L1 = . . . = L2d = 1. Each new vertex requires 2d stubs, so tk+1 = tk + 2d. At time tk+1 − 1 = (2d)k, just before the (k + 1)-st vertex arrives, the graph Gkd = (Ln )n≤2kd has k vertices and kd edges. For tk ≤ n < tk+1 , we then set Ln = k if n odd and Ln ∼ P0 ( • ; G(k−1)d ) if n even. The single vertex with self-loops is chosen as a seed graph here only to keep notation reasonable. More generally, any graph with k vertices and n edges can be encoded in the variables L1 , . . . , L2n and the first k arrival times. When d = 1, the result is a tree (with a loop at the root). When d ≥ 2, the above sampling scheme does not produce an (α, t)-graph. However, the following modified sampling scheme produces an (α, t)-graph with ∆j = 2d for all j > 1. Start as before with a graph consisting of a single vertex and d self-loops. When the k-th vertex arrives at time tk = 2(k − 1)d + 1, set Ltk = k and for tk + 1 ≤ n < tk+1 , set Ln ∼ Pα ( • ; (Li )i<n ) . The modified sampling scheme differs from the basic preferential attachment model in that it updates the degrees after each step, allows loops, and does not require that each vertex begin with d edges. Although the connectivity properties of the resulting graph may be substantially different from the Barabási–Albert model, the degree properties are similar to modifications that have been considered by [5, 32]. In this case, the results of Section 3.2 can be strengthened, showing that the scaled degrees converge to random variables that satisfy distributional relationships generalizing those of the beta-gamma algebra (8), as discussed by Dufresne [18]. (See also [27].) These relationships emerge due to the behavior of Wj,k as k → ∞, which separates into two pieces: A deterministic scaling factor, and the random variables that appear below. Proposition 13. Let G be an (α, t)-graph with α ∈ (−∞, 1) such that for some d ∈ N+ , tj = 2d(j − 1) + 1 for all j ≥ 1. Then for every r ∈ N+ ,  n 2m − 2d−1 2d−α a.s. (degj (n))1≤j≤r −−−→ (ξj )1≤j≤r . n→∞ 16 The vector of random variables (ξj )1≤j≤r satisfies the following distributional identities: Denote ᾱ := 2d − α, and define Zr = 2d−1 Y 1/ᾱ Gr+1−i/ᾱ Zr0 = and i=1 2d−1 Y 1/ᾱ G1−i/ᾱ and Zr00 = Zr0 i=1 r−1 Y Bkᾱ,1−α , k=1 where all of the random variables are independent of each other and of (ξj )j . Then with Ψ1 = 1, and (Ψj )j>1 ∼ Beta(1 − α, (j − 1)(2d − α)), the following distributional identities hold: r Y   d (26) Zr · ξj 1≤j≤r = Grᾱ · Ψj (1 − Ψi ) 1≤j≤r i=j+1 (27) Zr0 · ξj d  1≤j≤r = Grᾱ r Y Bkᾱ−2d+1,2d−1 · Ψj (28) · ξj d  1≤j≤r = Grᾱ−2d+1 r−1 Y Bkᾱ−2d+1,2d−1 · Ψj Zr00 · ξj d  1≤j≤r = G1−α · Ψj r Y (1 − Ψi )  1≤j≤r i=j+1 k=1 (29)  (1 − Ψi ) 1≤j≤r i=j+1 k=1 Zr0 r Y r Y  (1 − Ψi ) 1≤j≤r . i=j+1 / Remark 14. For a gamma random variable Ga , Gab has so-called generalized gamma distribution, denoted GGa(a/b, 1/b). Hence, Zr above is equal to the product of GGa((r + 1)ᾱ − i, ᾱ) random variables, and similarly for Zr0 . Generalized gamma random variables also appear in the limits of the preferential attachment models in [32, 37], and arise in a range of other applications [31]. / Results on power law degree distributions in preferential attachment models are numerous [e.g. 4, 1, 2, 5]. It is well-known that the degree distribution of the Barabási–Albert tree exhibits a power law with exponent η = 3 [4, 8], which agrees with the following implication of Theorem 9. Corollary 15. For the constant interarrival time model considered above, the degree distribution converges to (24) with γ = (2d − α)/(2d − 1). In particular, the α-weighted Barabási–Albert tree has power law exponent η = 3 − α. / 4.2. Graphs with exchangeable vertex assignments. Suppose G is a random graph such that the random partition Π = Φ−1 (G) is exchangeable (see [36] for more on exchangeable partitions). Equivalently, the vertex assignments L1 , L2 , . . . are exchangeable, and there is hence a random probability measure µ on N such that (30) L1 , L2 , . . . | µ ∼iid µ . 17 We first note an implication of Theorem 9. Recall that a random graph is sparse if its density (21) is ε < 2. Corollary 16. If a graph generated by an exchangeable partition is sparse and has a power law degree distribution, then σ > 1/2, and hence η ∈ (3/2, 2). / Recall from Section 2 that an exchangeable Gibbs partition is an exchangeable random partition Π such that the probability of any finite restriction Πn can be written as P(Πn = {deg1 (n), . . . , degk (n)}) = Vn,k k Y Γ(degj (n) − α) , Γ(1 − α) j=1 for a suitable sequence of weights Vn,k . Griffiths and Spanò [23] studied the block arrival times (called, in that context, the record indices) of exchangeable Gibbs partitions. For the random graph induced by such partitions, their results show that (31) ∞ Y 1 a.s. d degj (n) −−−→ Pj = Ψj (1 − Ψi ) , n→∞ n i=j+1 where Ψj is distributed as in (5). (This result is also contained in Theorem 7.) They prove that an exchangeable random partition is of Gibbs form if and only if the sequence (Pj )j≥1 is NTL conditioned on (Tj )j≥1 ; this result has implications for some recent network models. Crane and Dempsey [14] and Cai, Campbell, and Broderick [11] call a random graph ((L1 , L2 ), . . .) edge exchangeable if there is some random probability measure ν on N2 such that (L1 , L2 ), (L3 , L4 ), . . . | ν ∼iid ν . Janson [28] refers to such a graph as being rank one if ν = µ ⊗ µ for some random probability measure on N, which is just (30). Thus, rank one edge exchangeable graphs are precisely those corresponding to exchangeable random partitions via Φ. The intersection of edge exchangeable and (α, T )-graphs are precisely those (α, T )graphs that have exchangeable vertex assignments, in which case Π is an exchangeable Gibbs partition. That includes the case Π ∼ CRP(α, θ) above, for which [14] call G = Φ(Π) the Hollywood model. Proposition 17. Let G be a rank one edge exchangeable graph, and let D∞ be the limiting degree proportions n−1 (deg1 (n), deg2 (n), . . . ). Then D∞ is NTL if and only if G is distributed as a (α, T )-graph, where T distributed as in (13), in which case D∞ is distributed as in (31). / The results of Section 3.2 specialize for G = Φ(Π) where Π has law CRP(α, θ). In particular, consider conditioning on the first r arrival times, rather than all arrival 18 times. As Proposition 18 shows, the scaled degrees have the same basic structure as in Section 3.2, but E[Wr,∞ ] is captured by a single beta random variable. Proposition 18. Let G be an (α, T )-graph for fixed α ∈ (0, 1) such that T are the arrival times induced by a CRP(α, θ) partition process (10). Then for every r ∈ N+ , conditioned on T1 , . . . , Tr , a.s. n−1 (degj (n))1≤j≤r | T1 , . . . , Tr −−−→ (ξ1 , . . . , ξr ) , n→∞ where (32) ξj r Y d  1≤j≤r = BTr −rα,θ+rα · Ψj  (1 − Ψi ) 1≤j≤r , i=j+1 with Ψ1 = 1, Ψj ∼ Beta(1−α, Tj −1−(j−1)α) and BTr −rα,θ+rα mutually independent random variables for j ≥ 1. This implies the joint distributional identity (33) GTr +θ · ξj d  1≤j≤r = GTr −rα · Ψj r Y (1 − Ψi )  1≤j≤r . i=j+1 and the marginal identities for all j > 1 d ξj = B1−α,Tj −1+θ+α d ξj+1 | ξj , ∆j+1 = ξj BTj +θ,∆j+1 . / The random variable ξj is independent of j, given Tj . Among all (α, T )-graphs derived from exchangeable Gibbs partitions, this property characterizes those derived from CRP(α, θ) partitions, and stems from the arrival time distribution (see Section 4.4). Proposition 19. Let G be an (α, T )-graph such that T are the arrival times induced by an exchangeable Gibbs partition Π. For any j ≥ 1, the marginal distribution of ξj conditioned on jth arrival time depends only on Tj if and only if Π has law CRP(α, θ). / 4.3. Graphs with exchangeable interarrival times. We next consider (α, T )-graphs for which the interarrival times ∆j = Tj − TP j−1 are exchangeable. An immediate consequence of exchangeability is that k −1 j≤k ∆j → µ almost surely for some constant µ in [1, ∞]. Theorem 7 implies: Corollary 20. If µ is finite, the limiting degrees scale as n1/γ in (19), where γ = (µ − α)/(µ − 1). If Var(∆j ) is finite for all j, then the degree distribution converges to (24). / 19 Stronger results hold when the interarrivals are i.i.d. geometric variables, corresponding to the Yule–Simon model [42, 39]. Recall that a positive random variable Mσ is said to have Mittag–Leffler distribution with parameter σ ∈ (0, 1) if Mσ = Zσ−σ , where Zσ is a positive σ-stable random variable, characterized by the σ Laplace transform E[e−λZ ] = e−λ and density fσ (z). See [36, 25] for details. Define Zσ,θ for θ > −σ as a random variable with the polynomially tilted density −σ fσ,θ ∝ z −θ fσ (z), and let Mσ,θ = Zσ,θ . We denote the law of Mσ,θ by ML(σ, θ), which is known as the generalized Mittag–Leffler distribution [35, 25]. Proposition 21. Let G be an (α, T )-graph with α = 0, and T constructed from i.i.d. Geom(β) interarrival times, for β ∈ (0, 1). Then for every r ∈ N+ , conditioned on T1 , . . . , Tr , a.s. n−(1−β) (degj (n))1≤j≤r | T1 , . . . , Tr −−−→ (ξ1 , . . . , ξr ) , n→∞ where ξj (34) d  1≤j≤r = M1−β,Tr −1 BTr ,(Tr −1) with M1−β,Tr −1 , BTr ,(Tr −1) β 1−β · Ψj β 1−β r Y (1 − Ψi )  , 1≤j≤r i=j+1 , Ψ1 = 1 and Ψj ∼ Beta(1, Tj − 1) mutually indepen- dent random variables for j ≥ 1. This implies the joint distributional identity GT1−β r · ξj d  1≤j≤r = GTr · Ψj r Y (1 − Ψi )  1≤j≤r , i=j+1 and the marginal identities for j > 1 (35) 1−β ξj = M1−β B1,T j −1 (36) ξj+1 | ξj , ∆j+1 = ξj BT1−β j ,∆j+1 (37) d d d d ξj = M1−β,Tj −1 BTj ,(Tj −1) β 1−β Ψj = M1−β,Tj −1 B 1, d Tj −1 1−β = M1−β,Tj B 1, Tj −1+β 1−β ∆j+1 (38) (39) d ξj+1 | ξj , ∆j+1 = ξj B Tj ∆j+1 , 1−β 1−β Y i=1 B Tj −1+i−β 1−β β , 1−β ξj GT1−β = G1 . j d / Peköz, Röllin, and Ross [33] consider the following two-color Pólya P urn: Let ∆1 , ∆2 , . . . be drawn i.i.d. from some distribution P∆ , and define Tj = ji=1 ∆j . Starting with w white balls and b black balls, at each step n 6= Tj , a ball is drawn and replaced along with another of the same color. On steps n = Tj , a black ball is 20 P{n + 1 is arrival time|Gn } depends on Φ−1 (G) is (α, T )-urn L(Φ−1 (G)) L(G) L(∆k ) n n, #vertices in Gn n, #vertices in Gn , degrees deterministic independent n + 1 − Tk(n) yes yes no yes yes yes CRP(θ) Gibbs partition exch. partition – Yule–Simon process (α, T )-urn Hollywood model ⊂ rank one edge exch. rank one edge exch. PA tree ACL [1, 2] (α, T )-graph (10) (13) – δ2 Geom(β) i.i.d. Table 1 Classification of different models according to which statistics of Gn determine the probability that a new vertex is observed at time n + 1. added to the urn. Of interest is the distribution of the number of white balls in the urn after n steps. In the language of (α, T )-graphs, consider a seed graph Gw+b with kw+b < w + b vertices and w + b edges arranged arbitrarily, the only constraint being that there exists a bipartition Vw ∪ Vb = V(Gw+b ) so that the total degree of the vertices in Vw is Dw (w + b) = w, and of those in Vb is Db (w + b) = b. For T constructed from i.i.d. interarrivals, Dw (n) corresponds to the number of white balls after n steps. For interarrivals drawn i.i.d. from the geometric distribution, the following result characterizes the limiting distribution of Dw (n), which was left as an open question by Peköz, Röllin, and Ross [33]. Proposition 22. Let Dw (n) be the number of white balls in the Pólya urn with immigration from [33] starting with w white balls and b black balls, where the immigration times have i.i.d. Geom(β) distribution. Then n−(1−β) Dw (n) a.s. −−−→ n→∞ d ξw,w+b = Bw,b Bw+b,(w+b−1) β 1−β M1−β,w+b−1 , which implies the distributional identities (40) d ξw,w+b = Bw, (w−1)β+b M1−β,w+b−1 1−β (41) d ξw,w+b = Bw, wβ+b M1−β,w+b 1−β (42) 1−β ξw,w+b Gw+b d = Gw . / 4.4. Classification by arrival time probabilities. De Blasi, Favaro, Lijoi, Mena, Prünster, and Ruggiero [16] classify exchangeable partitions according to the quantities on which the probability of observing a new block in draw n + 1 depends [16, Proposition 1], conditionally on the partition observed up to time n. This classification can be translated to random graphs via the induced partition Φ−1 (G), and can 21 be extended further since partitions induced by (α, T )-graphs need not be exchangeable: See Table 1. One might also consider a sequence of interarrival distributions indexed by the number of vertices, yielding a bespoke generalization of the last row, where the probability of a new vertex depends on n + 1 − Tk(n) and the number of vertices. Acknowledgments. We are grateful to Nathan Ross for helpful comments on the manuscript. BBR is supported by the European Research Council under the European Union’s Seventh Framework Programme (FP7/2007–2013) / ERC grant agreement no. 617071. PO was supported in part by grant FA9550-15-1-0074 of AFOSR. References. [1] W. Aiello, F. Chung, and L. Lu. A random graph model for power law graphs. Experiment. Math., 10(1):53–66, 2001. [2] W. Aiello, F. Chung, and L. Lu. Random evolution in massive graphs. In J. Abello, P. M. Pardalos, and M. G. C. Resende, editors, Handbook of Massive Data Sets, volume II, pages 97–122, 2002. [3] R. Arratia, L. Goldstein, and F. Kochman. Size bias for one and all. 08 2013. https://arxiv.org/abs/1308.2729. [4] A.-L. Barabási and R. Albert. Emergence of scaling in random networks. Science, 186(5439): 509–512, 1999. [5] N. Berger, C. Borgs, J. T. Chayes, and A. Saberi. Asymptotic behavior and distributional limits of preferential attachment graphs. Ann. Probab., 42(1):1–40, 01 2014. [6] N. H. Bingham, C. M. Goldie, and J. L. Teugels. Regular Variation, volume 27 of Encyclopedia of Mathematics and its Applications. Cambridge University Press, 07 1989. [7] D. Blackwell and J. B. MacQueen. Ferguson distributions via pólya urn schemes. Ann. Statist., 1(2):353–355, 03 1973. [8] B. Bollobás, O. Riordan, J. Spencer, and G. Tusnády. The degree sequence of a scale-free random graph process. Random Structures & Algorithms, 18(3):279–290, 2001. [9] B. Bollobás, S. Janson, and O. Riordan. The phase transition in inhomogeneous random graphs. Random Structures & Algorithms, 31(1):3–122, 2007. [10] T. Broderick, M. I. Jordan, and J. Pitman. Beta processes, stick-breaking and power laws. Bayesian Analysis, 7(2):439–476, 06 2012. [11] D. Cai, T. Campbell, and T. Broderick. Edge-exchangeable graphs and sparsity. In D. D. Lee, M. Sugiyama, U. V. Luxburg, I. Guyon, and R. Garnett, editors, Advances in Neural Information Processing Systems 29, pages 4242–4250. Curran Associates, Inc., 12 2016. [12] F. Caron and E. B. Fox. Sparse graphs using exchangeable random measures. Journal of the Royal Statistical Society: Series B (Statistical Methodology), 79(5):1–44, 2017. [13] F. Chung and L. Lu. Complex Graphs and Networks. (CBMS Regional Conference Series in Mathematics). American Mathematical Society, 2006. [14] H. Crane and W. Dempsey. Edge exchangeable models for network data. 03 2016. URL https://arxiv.org/abs/1603.04571. [15] D. J. Daley and D. Vere-Jones. An Introduction to the Theory of Point Processes, volume II of Probability and its Applications. Springer-Verlag New York, 2008. [16] P. De Blasi, S. Favaro, A. Lijoi, R. H. Mena, I. Prünster, and M. Ruggiero. Are Gibbs-type priors the most natural generalization of the Dirichlet process? IEEE Transactions on Pattern Analysis and Machine Intelligence, 37(2):212–229, 02 2015. [17] K. Doksum. Tailfree and neutral random probabilities and their posterior distributions. Ann. Probab., 2(2):183–201, 04 1974. 22 [18] D. Dufresne. G distributions and the beta-gamma algebra. Electron. J. Probab., 15:2163–2199, 2010. [19] R. Durrett. Random Graph Dynamics. Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, New York, NY, USA, 2006. [20] W. Feller. An Introduction to Probability Theory and Its Applications, volume 2. Wiley, 2nd edition, 1971. [21] A. Gnedin and J. Pitman. Exchangeable Gibbs partitions and stirling triangles. Journal of Mathematical Sciences, 138(3):5674–5685, 2006. ISSN 1573-8795. [22] A. Gnedin, B. Hansen, and J. Pitman. Notes on the occupancy problem with infinitely many boxes: general asymptotics and power laws. Probab. Surveys, 4:146–171, 2007. [23] R. C. Griffiths and D. Spanò. Record indices and age-ordered frequencies in exchangeable Gibbs partitions. Electron. J. Probab., 12:1101–1130, 2007. [24] R. van der. Hofstad. Random Graphs and Complex Networks, volume 1 of Cambridge Series in Statistical and Probabilistic Mathematics. Cambridge University Press, 2016. [25] L. F. James. Generalized Mittag–Leffler distributions arising as limits in preferential attachment models. 09 2015. URL http://arxiv.org/abs/1509.07150. [26] S. Janson. Limit theorems for triangular urn schemes. Probability Theory and Related Fields, 134(3):417–452, 2006. [27] S. Janson. Moments of gamma type and the Brownian supremum process area. Probab. Surveys, 7:1–52, 2010. [28] S. Janson. On edge exchangeable random graphs. 02 2017. URL https://arxiv.org/abs/ 1702.06396. [29] S. V. Kerov. Coherent random allocations, and the Ewens–Pitman formula. Journal of Mathematical Sciences, 138(3):5699–5710, 2006. [30] T. F. Móri. The maximum degree of the Barabási–Albért random tree. Comb. Probab. Comput., 14(3):339–348, May 2005. [31] E. A. Peköz, A. Röllin, and N. Ross. Generalized gamma approximation with rates for urns, walks and trees. Ann. Probab., 44(3):1776–1816, 05 2016. [32] E. A. Peköz, A. Röllin, and N. Ross. Joint degree distributions of preferential attachment random graphs. Advances in Applied Probability, 49(2):368–387, 2017. [33] E. A. Peköz, A. Röllin, and N. Ross. Pólya urns with immigration at random times. Bernoulli, forthcoming. [34] J. Pitman. Some developments of the Blackwell-MacQueen urn scheme, volume Volume 30 of Lecture Notes–Monograph Series, pages 245–267. Institute of Mathematical Statistics, Hayward, CA, 1996. [35] J. Pitman. Poisson-Kingman partitions, volume Volume 40 of Lecture Notes–Monograph Series, pages 1–34. Institute of Mathematical Statistics, Beachwood, OH, 2003. [36] J. Pitman. Combinatorial Stochastic Processes, volume 1875 of Ecole d’Eté de Probabilités de Saint-Flour. Springer-Verlag Berlin Heidelberg, 2006. [37] J. Pitman and M. Racz. Beta-gamma tail asymptotics. Electron. Commun. Probab., 20:1–7, 2015. [38] D. Revuz and M. Yor. Continuous martingales and Brownian motion. Springer Science & Business Media, 3rd edition, 1999. [39] H. A. Simon. On a class of skew distribution functions. Biometrika, 42(3-4):425–440, 1955. [40] F. G. Tricomi and A. Erdélyi. The asymptotic expansion of a ratio of gamma functions. Pacific J. Math., 1(1):133–142, 1951. [41] V. Veitch and D. M. Roy. The class of random graphs arising from exchangeable random measures. 12 2015. URL http://arxiv.org/abs/1512.03099. [42] G. U. Yule. A Mathematical Theory of Evolution, Based on the Conclusions of Dr. J. C. Willis, F.R.S. Philosophical Transactions of the Royal Society of London B: Biological Sciences, 213 (402-410):21–87, 1925. ISSN 0264-3960. 23 A. Proofs. A.1. Proof of Theorem 2. Proof. Let G(α, T ) = ((L1 , L2 ), (L3 , L4 ), . . . ) be an (α, T )-graph, and let kn denote the number of vertices after n edge ends have been drawn. For notational convenience, let Dj (n) := degj (n) be the degree of the jth vertex at step n. Then from the sequence of laws Pα (k; l1 , . . . , lj ) in (3), the probability of a particular sequence is P[Gn/2 (α, T ) | T = t] = kn Y Γ(tj − jα)Γ(Dj (n) − α) 1 . Γ(n − kn α) Γ(tj − 1 − (j − 1)α + δ1 (j))Γ(1 − α) j=1 Now let Hn (α, T ) denote the first n elements of the sequence H(α, T ), so that P[Hn/2 (α, T ), (Ψj )2≤j≤kn | T = t] = D (n)−α−1 kn Y Γ(tj − jα)Ψj j (1 − Ψj )D̄j−1 (n)−(j−1)α−1 Γ(1 − α)Γ(tj − 1 − (j − 1)α) i=2 . Hence, by marginalizing (Ψj )2≤j≤kn , it follows that Z P[Hn/2 (α, T ) | T = t] = P[Hn/2 (α, T ), (Ψj )2≤j≤kn | T = t] dΨ2 · · · dΨkn [0,1]kn = P[Gn/2 (α, T ) | T = t] . The equality is true for all n ∈ N+ , and t ∈ T, implying that P[G(α, T )] = P[H(α, T )]. A.2. Proof of Proposition 5. The proof will make repeated use of the expectation of Wj,k as k → ∞. Observe that − log E[Wj,k ] = k X  log 1 + i=j+1 1−α ti − 1 − (i − 1)α k X  = i=j+1 1−α + O(i−2 ) ti − 1 − (i − 1)α By assumption in the linear regime, ti − 1 − (i − 1)α is well-approximated by (i − 1)(µ1 −α) for i large enough, resulting in a finite error Cj,k that converges as k → ∞. Hence,   k−1 1 − α X −1 1−α k−1 −2 − log E[Wj,k ] = Cj,k + i + O(i ) = Cj,k + log + O(j −1 ) , µ1 − α µ1 − α j i=j and therefore for all j > 1,  (43) E[Wj,k ] = Aj j k−1  1−α µ1 −α as k→∞. 24 Clearly, this converges to zero for each j. Similarly, in the sub-linear regime, k−1 X 1−α + O(i−2 ) 1/σ − iα µ i σ i=j  1−σ  σ(1 − α) µσ − α(k − 1)− σ 0 = Cj,k + log + O(j −1 ) . − 1−σ α(1 − σ) µσ − αj σ − log E[Wj,k ] = Since 1−σ σ 0 Cj,k + > 0, (44) E[Wj,k ] = A0j  1−  σ(1−α)  α µσ j 1−σ σ − σ(1−α) α α(1−σ) 1− µσ (k − 1) α(1−σ) as k → ∞ . 1−σ σ Clearly, this converges to something non-zero for each j. Proof of Proposition 5. Define Mj,k := Wj,k /E[Wj,k ]. Since E[Mj,k+1 | Mj,k ] = Mj,k and E[Mj,j+1 = 1], Mj,k is a nonnegative martingale with mean 1 for k > j; it therefore converges almost surely to a random variable Mj,∞ . Hence, Wj,∞ := lim Wj,k = Mj,∞ lim E[Wj,k ] . k→∞ k→∞ 2 ] = 1 + O(k −1 ), and therefore M Simple calculations show that E[Mj,k j,k is bounded in L2 and also in L1 . Hence, Wj,∞ exists if and only if limk→∞ E[Wj,k ] exists. By (43) and (44), that is the case. By Markov’s inequality, for any λ > 0, ( − 1−α 1 O(k µ1 −α ) for σ = 1 P[Wj,k ≥ λ] ≤ E[Wj,k ] ≤ , λ O(λ−1 ) for σ < 1 indicating that Wj,∞ = 0 in the linear case. On the other hand, −1 −1 P[Wj,k ≤ λ] = P[Wj,k ≥ λ−1 ] ≤ λE[Wj,k ] = λE[Wj,k ]−1 k Y i=j+1 ( 1−α O(k µ1 −α ) for σ = 1 ≤ O(λ) for σ < 1 1 ti −iα 1 ti −1−(i−1)α 1− 1− , indicating that Wj,∞ > 0 in the sub-linear case. A.3. Proofs for Section 3.2. The proof of Theorem 7 uses martingale methods adapted and extended from those used by Móri [30]. See also [24, 19]. For notational convenience, we let Dj,n = Dj (n). Fix r ∈ N+ and p = (p1 , p2 , . . . ) such that 25 pj > −(1 − α) for each 1 ≤ j ≤ r, and pj = 0 for j > r. Let p̄j = p̄0 = 0 and p̄j = p̄r := p̄ for j > r. For fixed t ∈ T, define Pj i=1 pi , with (45) Zn (p, t) := kn r Y Γ(Dj,n − α + pj ) Y Γ(n − kn α) Γ(tk − 1 − (j − 1)α)Γ(tk − jα + p̄k ) . Γ(n − kn α + p̄kn ) Γ(Dj,n − α) Γ(tk − 1 − (k − 1)α + p̄k )Γ(tk − kα) j=1 k=r+1 The asymptotic behavior of Zn (p, t) is described by the following two lemmas, from which Theorem 7 follows. Lemma 23. Let Zn (p, t) be as in (45), with pj > −(1 − α) for each j ≥ 1. Then Zn (p, t) is a nonnegative martingale with respect to (Fn )n≥Tr , the filtration generated by the (α, t) sampling process, for n ≥ Tr , and therefore a.s. Zn (p, t) −−−→ ξ1p1 · · · ξrpr . n→∞ Furthermore, if pj > −(1 − α)/2 for each j ≥ 1, then Zn (p, t) converges in L2 and therefore also in L1 . / Proof. Zn (p, t) is nonnegative by construction. Furthermore,  kn+1 Y Γ(Dj,n+1 − α + pj ) Γ(n + 1 − kn+1 α) | Fn := E[Rn+1 (p) | Fn ] Γ(n + 1 − kn+1 α + p̄kn+1 ) Γ(Dj,n+1 − α) j=1   Γ(n − kn α + p̄kn )Γ(n + 1 − (kn + 1)α) 1{tkn +1 = n + 1} , = Rn (p) 1{tkn +1 > n + 1} + Γ(n + 1 − (kn + 1)α + p̄kn +1 )Γ(n − kn α)  E from which it follows that E[Zn+1 (p, t) | Fn ] = Zn (p, t) for all n ≥ Tr . Furthermore, E[Zn (p, t)] < ∞ and does not depend on n. To bound Zn (p, t) in L2 , observe that by the properties of the gamma function [40], (46) cp̄ := Γ(n − kn α) = n−p̄ (1 + O(n−1 )) Γ(n − kn α + p̄kn ) as n→∞, which implies that c2p̄ /c2p̄ → 1. Using the fact that x 7→ Γ(x + y)/Γ(x) is increasing in x for y ≥ 0, it follows that Zn (p, t)2 ≤ Zn (2p, t) (see [24, Section 8.7] for a similar argument). Hence, E[Zn (p, t)2 ] ≤ E[Zn (2p, t)] < ∞ for pj > −(1 − α)/2. Lemma 24. Let Zn (p, t) be as in (45), with pj > −(1 − α) for each j ≥ 1. Then there exists a constant Mp̄ (t) such that Zn (p, t) = Mp̄ (t)n−p̄/γ r Y p j Dj,n (1 + O(n−1 )) as n→∞. j=1 / 26 Proof. The properties of the gamma function show that for each j ≤ r, Γ(Dj,n − α + pj ) pj = Dj,n (1 + O(n−1 )) Γ(Dj,n ) as n→∞. Hence, it suffices to examine the behavior of the product kn Γ(tj − 1 − (j − 1)α)Γ(tj − jα + p̄j ) Γ(1 − α + p1 ) Y Γ(n − kn α) Mn (p, t) := Γ(n − kn α + p̄kn ) Γ(1 − α) Γ(tj − 1 − (j − 1)α + p̄j )Γ(tj − jα) j=2 n−1 Y m − km α m − km α + p̄km 1{tkm +1 6= m + 1} m=1  n−1 kY  n −1 Y tj+1 − 1 − jα + p̄j m − km α = := Mn(1) (p, t)Mn(2) (p, t) . m − km α + p̄km tj+1 − 1 − jα = m=1 j=1 Taking the logarithm, the first term is ln Mn(1) (p, t) n−1 X = = m=1 n−1 X ln(m − km α) − ln(m − km α + p̄km ) ln 1 + m=1 n−1 X p̄km p̄km  = C1 − + O(m−2 ) , m − km α m − km α m=1 where C1 captures the error in the approximation for terms where p̄km > m − km α, which is finite because pj = 0 for j > r. By assumption when µ < ∞, for any  > 0 there exists some finite K such that for all j ≥ K, |km − m/µ| ≤ . Therefore, absorbing the additional error into C1 , ln Mn(1) (p, t) = C1 − n−1 X m=1 p̄ p̄µ + O(m−2 ) = C1 − ln n + O(n−1 ) . m(1 − α/µ) µ−α In the sub-linear regime (µ = ∞), the second term is −p̄ ln n. Similarly, for the second term of Mn (p, t), ln Mn(2) (p, t) = kX n −1 j=1 kX n −1  p̄j p̄j ln 1 + = C2 + + O(j −2 ) tj+1 − 1 − jα tj+1 − 1 − jα = C2 + j=1 kX n −1 j=1 p̄j p̄ + O(j −2 ) = C2 + ln n + O(n−1 ) . j(µ − α) µ−α In the sub-linear regime, the second term is also O(n−1 ). Hence, letting Mp̄ (t) = eC1 +C2 , the result follows. 27 Proof of Theorem 7. Equations (18) and (19) follow from Lemmas 23 and 24. To establish (20), let p \ pj be p with the jth element set to zero, observe that E[ζ1p1 · · · ζrpr ] = E[Ztr (p, t)] Γ(1 − α + pr )Γ(tr − rα)Γ(tr − 1 − (r − 1)α + p̄r−1 ) = E[Ztr −1 (p \ pr , t)] Γ(1 − α)Γ(tr − 1 − (r − 1)α)Γ(tr − rα + p̄r ) r r Y Γ(1 − α + pj )Γ(tj − jα)Γ(tj − 1 − (j − 1)α + p̄j−1 ) Y p = = E[Ψj j (1 − Ψj )p̄j−1 ] . Γ(1 − α)Γ(tj − 1 − (j − 1)α)Γ(tj − jα + p̄j ) j=2 j=2 A.4. Proofs for Section 3.4. In the sub-linear regime, the degree distribution follows from results on exchangeable random partitions and can be read from [36, Lemma 3.11]. The proof of Theorem 9 in the linear case relies on the following lemma, which says that for large enough j, Wj,k is well-approximated by (j/k)1−1/γ for all k > j, where γ = (µ − α)/(µ − 1). Lemma 25. Let G be a random (α, T ) graph for some α ∈ (−∞, 1) and T ∈ T. Assume that Var(∆j ) < V∆2 for all j ∈ N+ , that E[∆j ] = µ for all j > 1, and that 2 |i − j|−`∆ for all i, j > 1, some C 2 ≥ 0, and some ` > 0. Let |Cov(∆i , ∆j )| = C∆ ∆ ∆ Wj,k be as in (6). Then for every λ ≥ 0, there exists some K < ∞ that does not depend on n such that for all k ≥ K, " #  m 1−1/γ P sup Wj,m −1 ≤λ ≥1−λ. k k+1≤m≤n / Proof. Condition on T = t and define for fixed j k Y Mj,k := Wj,k j=k+1 Tj − jα , Tj − 1 − (j − 1)α which is a martingale with mean 1 for k ≥ j + 1. By Doob’s maximal inequality [e.g. 38, Chapter II], for any c > 0 and j ≥ 1, (47) P  1 |Mj,m − 1| ≥ c | T ≤ 2 E[(Mj,k − 1)2 | T ] . c j+1≤m≤k  sup The right-hand side is (48) 1 1 E[(Mj,k − 1)2 | T ] = 2 2 c c  2 | T] E[Wj,k E[Wj,k  1 1 1 −1 ≤ 2 + O(j −2 ) . 2 | T] c 1−αj 28 The product in Mj,k is X  X   k k 1−α 1−α −2 exp log 1 + = exp + O(i ) Ti − 1 − (i − 1)α Ti − 1 − (i − 1)α i=j+1 i=j+1  1−1/γ  k e−j,k 1 + O(j −1 ) = j where k X j,k := i=j+1 (1 − α) (1 − α) − . (i − 1)(µ − α) Ti − 1 − (i − 1)α Define ¯j,k to be sum of the absolute values of the terms in j,k . Because it is a running sum of nonnegative terms, ¯j,k is a nonnegative submartingale. Therefore, another application of Doob’s maximal inequality followed by Jensen’s inequality shows that P[ sup |j,m | ≥ c ] ≤ P[ j+1≤m≤k ¯j,m ≥ c ] sup j+1≤m≤k ≤ k X E[¯ j,k ] 1 1 E[|Tj − (j − 1)µ − 1|] ≤ c c (µ − α) j2 i=j+1 ≤ 1 c (µ − α) k X i=j+1  X 1/2 j 1 Var (∆ − µ) i j2 i=2 k X 1 1 2 2−`∆ 1/2 (V 2 (j + C∆ j )) c (µ − α) j2 ∆ i=j+1 q  2  V∆2 + C∆ 2/`+ 2/`+ −(1+`+ /2) ≤ − + O(j ) , c (µ − α) j `+ /2 k `+ /2 ≤ where `+ := min{`∆ , 1}. Let Aδj,k be the event that |j,m | < j −δ for each j + 1 ≤ m ≤ k and some fixed 0 < δ < `+ /2. Then q   2 2 V∆2 + C∆  1 −δ δ −(1+`+ /2−δ) P[Aj,k ] = P[ sup |j,m | < j ] ≥ 1 − + O(j ) . `+ (µ − α) j `+ /2−δ j+1≤m≤k Hence, the probability of Aδj,k → 1 as j → ∞. Now, taking expectation with respect to T of the left-hand side of (47) yields    m 1−1/γ ET P sup |Wj,k (1 + j,m + O(j −1 )) − 1| ≥ c | T j k+1≤m≤k   m 1−1/γ = P sup |Wj,k − 1| ≥ c · · · j j+1≤m≤k   1−1/γ  −1 )) − 1| ≥ c | T P supj+1≤m≤k |Wj,k m (1 +  + O(j j,m j ··· × ET 1Aδ  1−1/γ  j,k P supj+1≤m≤k |Wj,k m − 1| ≥ c j    m 1−1/γ + ET (1 − 1Aδ )P sup |Wj,k (1 + j,m + O(j −1 )) − 1| ≥ c | T . j,k j j+1≤m≤k 29 Observe that as j → ∞, the last term converges to zero by monotone convergence, while the ratio inside the expectation converges to one on sets where Aδj,k obtains, which have asymptotic measure equal to one. The result follows by monotone convergence and comparison with (48). The following lemma gives an estimate based on the beta-gamma algebra, and says that for large enough j, Ψj can be approximated by G1−α /((j − 1)µ − 1 − jα). Lemma 26. For j < k, let Ψj and Ψk be independent beta random variables as in (5), and let G (j) and G (k) be independent Gamma(1 − α, 1) random variables as in (9). Then there exists some J < ∞ such that for every j ≥ J and λ > 0, " # G (j) G (k) P sup Ψj Ψk − <λ ≥1−λ. (j(µ − α) − (µ − 1))(k(µ − α) − (µ − 1)) j≤k≤n / Proof. Denote the quantity of interest as Ψ j,k , and let Σj := Then using the distributional identity in (9), Pj i=1 G Pj−1 (i) + i=1 G∆i+1 −1 . (j(µ − α) − (µ − 1))(k(µ − α) − (µ − 1)) − Σj Σk (j(µ − α) − (µ − 1))(k(µ − α) − (µ − 1)) Ψj Ψk = ··· (j(µ − α) − (µ − 1))(k(µ − α) − (µ − 1)) |Ψ j,k | = Ψj Ψk × + j X k X (i) (m) G G 2 − (1 − α) i=1 m=1 j−1 k XX  + j X k−1 X  G (i) G∆m+1 −1 − (1 − α)(µ − 1) · · · i=1 m=1 j−1 X k−1  X  G∆j+1 −1 G∆m+1 −1 − (µ − 1)2 . G∆j+1 −1 G (m) − (1 − α)(µ − 1) + i=1 m=1 i=1 m=1 Ψ Denote by ¯Ψ j,k the term-wise absolute value of j,k . As a cumulative sum of nonnegative terms, ¯Ψ j,k is a nonnegative submartingale for k > j, and hence by Doob’s maximal inequality, for any c > 0, 1 Ψ  ]. P[ sup |Ψ ¯Ψ j,k | ≥ c] ≤ P[ sup  j,k ≥ c] ≤ E[¯ c j,n j≤k≤n j≤k≤n The independence properties of the beta and gamma random variables, along with simple but tedious calculations yields E[¯ Ψ j,n ] ≤ C(α, µ, V∆2 ) + O(j −1 ) , (j(µ − α) − (µ − 1))(n(µ − α) − (µ − 1)) where C(α, µ, V∆2 ) is a constant that depends only on the model parameters. The result follows. 30 Finally, the proof of Theorem 9 requires that for large enough j, the error term rj,k := k X r=j 1 2r2−2/γ (∆r+1 − µ) is small with high probability, which is established by the following lemma. Lemma 27. For any c > 0, P[ sup |rj,k | < c] ≥ 1 − j≤k≤n V∆ 1 (1 + O(j −2−2/γ )) . c j 1−2/γ / Proof. Denote by ¯rj,k the term-wise absolute value of rj,k . ¯rj,k is a nonnegative submartingale for k > j, and an application of Doob’s maximal inequality yields the result. Proof of Theorem 9. Let U0 be a Uniform[0, 1] random variable, and define j0 = dU0 kn e to be a vertex selected uniformly at random from Gn , which has kn vertices. For simplicity, assume that either all Tj are even for j > 1 (which is the case for graphs that are a.s. connected for all n), or that Tj has equal probability of being odd or even for all j > 1. (These assumptions are not necessary, but greatly simplify notation. More general assumptions may be accommodated.) Conditioned on (Ψj )j>1 , the expected number of directed edges from vertex j0 to any vertex j ∈ N+ is (49) kn X E[Nj0 →j,n ] = kn X Pj0 →j,r = r=j0 ∨j Ψj0 Wj0 ,r Ψj Wj,r (∆r+1 /2 − 1) r=j0 ∨j + 1{j0 ≥ j, Tj0 odd}Ψj Wj,j0 + 1{j0 < j, Tj even}Ψj0 Wj0 ,j−1 . Define P̂j0 →j,r   G (j0 ) G (j) (µ/2 − 1) j0 j 1−1/γ . := j0 j(µ − α)2 r r By Lemmas 25 to 27, for n large enough, with probability at least 1 − 2λ, (1 − λ) kn X r=j0 ∨j P̂j0 →j,r ≤ kn X r=j0 ∨j Pj0 →j,r ≤ (1 + λ) kn X r=j0 ∨j P̂j0 →j,r . 31 Similar approximations hold for the final two terms of (49). Let j+ = j0 ∨ j. Now summing over r yields G (j0 ) G (j) (µ/2 − 1) 1 E[N̂j0 →j,n ] = (µ − α)2 (1 − 2/γ) kn  j0 j kn kn −1/γ  kn j+ 1−2/γ  −1  1+ −1 O(j+ ) . Pdkn ue Defining for u ∈ (0, 1), E[N̂U0 ,n (u)] := j=1 E[N̂j0 →j,n ], it follows from standard results on convergence to Poisson processes [15] that N̂U0 ,n (u) converges weakly to a Poisson point process with intensity (50)   1−2/γ → − G1−α (1 − α)(µ/2 − 1) 1 −1/γ −(1−1/γ) −1/γ 1 − u+ λ (u0 , u) = (u0 u) + u− u+ , 1−2/γ µ − α (µ − α)(1 − 2/γ) 2 u + where u+ = u0 ∨u and u− = u0 ∧u. Similarly, for incoming edges to j0 , the symmetry ← − → − of the sampling process yields λ (u0 , u) = λ (u0 , u). It follows that the degree of a randomly sampled vertex is a Poisson random variable with mean parameter Z 1 ← − → − −1/γ (51) Λ(G1−α , U0 ) = λ (U0 , u) + λ (U0 , u)du = G1−α (U0 − 1) . 0 Hence, by the conjugacy relationship between the Poisson and Gamma distributions, the probability that the degree of a randomly sampled vertex, conditioned on U0 , is equal to d + 1 is P[D = d + 1 | U0 ] = E[e−Λ(G1−α ,U0 ) Λ(G1−α , U0 )d | U0 ]/d! Γ(d + 1 − α) 1/γ (1−α)/γ = (1 − U0 )d U0 . Γ(d + 1)Γ(1 − α) Finally, taking the expectation with respect to the uniform random variable U0 , Z 1 Γ(d + 1 − α) P[D = d + 1] = (1 − u1/γ )d u(1−α)/γ du Γ(d + 1)Γ(1 − α) 0 Γ(d + 1 − α) Γ(d + 1)Γ(1 − α + γ) = γ Γ(d + 1)Γ(1 − α) Γ(d + 1 + 1 − α + γ) Γ(d + 1 − α)Γ(1 − α + γ) =γ , Γ(d + 1 + 1 − α + γ)Γ(1 − α) which is the stated result. Corollary 10 follows by checking moments. For σ = 1, 1/γ Corollary 11 follows from (51) by observing that U0 is distributed as Beta(γ, 1); for σ ∈ (0, 1), it follows from a similar integral identity. 32 A.5. Proofs for Section 4. Proof of Proposition 13. Let m̄ := 2m−1 and ᾱ := 2m−α. When tj = 2m(j − 1) + 1, (45) can be manipulated into the form m̄ Γ(n − kn α)Γ(kn ᾱ − m̄ + p̄) Y Γ(kn − i/ᾱ)Γ(r + 1 + (p̄ − i)/ᾱ) Zn (p, t) = ··· Γ(n − kn α + p̄)Γ(kn ᾱ − m̄) Γ(kn + (p̄ − i)/ᾱ)Γ(r + 1 − i/ᾱ) i=1 r Γ(rᾱ) Y Γ(Dj,n − α + pj ) × Γ(rᾱ + p̄) Γ(Dj,n − α) j=1 m̄ p̄−i Γ(rᾱ) Y Γ(r + 1 + ᾱ ) = Xn (p, t) , Γ(rᾱ + p̄) Γ(r + 1 − ᾱi ) i=1 where  Xn (p, t) := n 2m −p̄ m̄ Y r ᾱ p j Dj,n (1 + O(n−1 )) . j=1 Therefore, algebraic manipulations of Zn (p, t) show that for large n: m̄ Y p̄/ᾱ Zn (p, t) = Xn (p, t)E[ Gr+1− i ]/E[Grp̄ᾱ ] (52) i=1 ᾱ m̄ r Y Y p̄/ᾱ p̄ Zn (p, t) = Xn (p, t)E[ G1− i ]/E[Grᾱ Bjp̄ᾱ−m̄,m̄ ] (53) ᾱ i=1 m̄ Y (54) Zn (p, t) = Xn (p, t)E[ i=1 (55) Zn (p, t) = Xn (p, t)E[ m̄ Y i=1 j=1 p̄/ᾱ G1− i ]/E[Grp̄ᾱ−m̄ ᾱ p̄/ᾱ G1− i ]E[ ᾱ r Y r−1 Y Bjp̄ᾱ−m̄,m̄ ] j=1 p̄ p̄ B(j−1) ᾱ,1−α ]/E[G1−α ] . j=2 On the other hand, Lemma 23 establishes that Zn (p, t) converges almost surely to the product of random variables ξ1p1 · · · ξrpr . Now, letting p \ pj denote p with the jth element set to zero, E[ξ1p1 · · · ξrpr ] = E[ lim Zn (p, t)] = E[Ztr (p, t)] n→∞ Γ(1 − α + p̄)Γ(rᾱ − m̄)Γ((r − 1)ᾱ + p̄r−1 ) Γ(1 − α)Γ(rᾱ − m̄ + p̄r )Γ((r − 1)ᾱ) r r Y Y Γ(1 − α + pj )Γ(j ᾱ − m̄)Γ((j − 1)ᾱ + p̄j−1 ) p = = E[ Ψj j (1 − Ψj )p̄j−1 ] . Γ(1 − α)Γ((j − 1)ᾱ)Γ(j ᾱ − m̄ + p̄j ) = E[Ztr −1 (p \ pr , t)] j=2 By equating (52)–(55) to E[Ztr (p, t)], the results follow. j=2 33 Proof of Proposition 18. Define T1:r := (T1 , T2 , . . . , Tr ) and r Γ(n + θ) Y Γ(Dj,n − α + pj ) Γ(n + θ + p̄) Γ(Dj,n − α) Znα,θ (p, T1:r ) := (56) j=1 = n−p̄ (57) r Y p j Dj,n (1 + O(n−1 )) . j=1 α,θ The fact that E[Zn+1 (p, T1:r ) | Fn ] = Znα,θ (p, T1:r ) shows that Znα,θ (p, T1:r ) is a nonnegative martingale for n ≥ Tr . Znα,θ (p, T1:r ) can be bounded in L2 following an argument similar to that given in the proof of Lemma 23, and hence it converges almost surely to ξ1p1 · · · ξrpr . Therefore, E[ lim n n→∞ = −p̄ r Y p j Dj,n | T1:r ] = E[ξ1p1 · · · ξrpr | T1:r ] j=1 Γ(1 − α + pr )Γ(Tr + θ)Γ(Tr − 1 − (r − 1)α + p̄r−1 ) ... Γ(1 − α)Γ(Tr + θ + p1 )Γ(Tr − 1 − (r − 1)α) r−1 Y Γ(1 − α + pj )Γ(Tj − jα)Γ(Tj − 1 − (j − 1)α + p̄j−1 ) × Γ(1 − α)Γ(Tj − jα + p̄j )Γ(Tj − 1 − (j − 1)α) j=2 = E[BTp̄ r −rα,θ+rα · r Y p Ψj j (1 − Ψj )p̄j−1 ] , j=2 from which the result follows. Proof of Proposition 19. For an exchangeable Gibbs partition with α ∈ (0, 1) and a sequence of coefficients vn,k , one may construct a martingale similar to that in (56). It is then straightforward to show that the scaled degrees converge almost surely to random variables (ξj )1≤j≤r , conditionally on T1 , . . . , Tr . Conditioned on Tj , ξj has marginal moments E[ξjp | Tj ] = VT +1,j −1 Γ(1 − α + p) 1+p j . Γ(1 − α) VTj ,j Kerov [29] showed that the only exchangeable Gibbs partitions with coefficients that can be represented as a ratio Vn,k = vk /cn are those of the CRP(α, θ), in which case the product in the previous equation becomes independent of j. See also [23, Lemma 4.1], which also implies the result. 34 Proof of Proposition 21. Define for p > −1, Znβ (p, T1:r ) r Y Γ(Dj,n + pj ) Γ(n) := Γ(n + p̄(1 − β)) Γ(Dj,n ) j=1 = n−p̄(1−β) r Y p j Dj,n (1 + O(n−1 )) , j=1 which is by construction a nonnegative martingale, bounded in L2 , for n ≥ Tr . Therefore, E[ lim n−p̄(1−β) n→∞ r Y p j Dj,n ] = E[ξ1p1 · · · ξrpr ] j=1 r Y Γ(1 + pj )Γ(Tj )Γ(Tj − 1 + p̄j−1 ) Γ(Tr + p̄) = Γ(Tr + p̄(1 − β)) Γ(Tj − 1)Γ(Tj + p̄j ) j=2 −p̄(1−β) = E[M1−β,Tr −1 ]E[B p̄ β Tr ,(Tr −1) 1−β ]E[ r Y p Ψj j (1 − Ψj )p̄j−1 ] , j=2 from which the result follows. The marginal identities result from altering the above martingale to contain only Dj,n , which is also a martingale. Similar treatment of the moments, along with the beta-gamma algebra and the identity (1.3) in James [25] yields the rest of the identities. Proof of Proposition 22. In analogy to the previous proof, for every p > −1, Znβ (p, w + b) = Γ(Dw,n + p) Γ(n) Γ(n + p(1 − β)) Γ(Dw,n ) p = n−p(1−β) Dw,n (1 + O(n−1 )) is a nonnegative martingale, bounded in L2 , for n ≥ w + b. Therefore, it converges p almost surely to a random variable ξw,w+b , where p E[ξw,w+b ]= Γ(w + b)Γ(w + p) Γ(w + b + p(1 − β))Γ(w) p(1−β) = E[Gwp ]/E[Gw+b p ] = E[Bw,b Bp β w+b,(w+b−1) 1−β Mp1−β,w+b−1 ] . The other identities can be verified by checking moments; they also follow from the beta-gamma algebra and from [25]. Department of Statistics 24–29 St. Giles’ Oxford OX1 3LB, UK E-mail: [email protected] Department of Statistics 1255 Amsterdam Avenue New York, NY 10027, USA E-mail: [email protected]
10math.ST
Model Reduction for Aperiodically Sampled Data Systems ⋆ Mert Baştuğ ∗ Laurentiu Hetel ∗ Mihály Petreczky ∗ arXiv:1703.01990v1 [cs.SY] 6 Mar 2017 ∗ Centre de Recherche en Informatique, Signal et Automatique de Lille (CRIStAL), UMR CNRS 9189, Ecole Centrale de Lille, 59650 Villeneuve d’Ascq, France (e-mail: [email protected], [email protected], [email protected]). Abstract: Two approaches to moment matching based model reduction of aperiodically sampled data systems are given. The term “aperiodic sampling” is used in the paper to indicate that the time between two consecutive sampling instants can take its value from a pre-specified finite set of allowed sampling intervals. Such systems can be represented by discrete-time linear switched (LS) state space (SS) models. One of the approaches investigated in the paper is to apply model reduction by moment matching on the linear time-invariant (LTI) plant model, then compare the responses of the LS SS models acquired from the original and reduced order LTI plants. The second approach is to apply a moment matching based model reduction method on the LS SS model acquired from the original LTI plant; and then compare the responses of the original and reduced LS SS models. It is proven that for both methods, as long as the original LTI plant is stable, the resulting reduced order LS SS model of the sampled data system is quadratically stable. The results from two approaches are compared with numerical examples. Keywords: Model reduction, sampled data systems, quadratic stability, numerical algorithms, linear systems theory. 1. INTRODUCTION The topic of model reduction deals with computing simpler approximation models for an original complex model [Antoulas (2005)]. For system classes which can be represented by state-space (SS) models, the “complexity” of a model refers usually to the state-space dimension of the corresponding model. Hence a “simpler model” is a model with less number of states whose input-output behavior is close to the one of the original system. In this paper, the term model reduction is used in this sense, i.e., approximating the input-output behavior of an original SS model with an another SS model with less number of states. Aperiodically sampled data systems appear commonly in applications since they can be used for modeling various phenomena encountered in the context of large scale networked and embedded control systems [Hespanha et al. (2007); Hristu-Varsakelis and (Editors); Zhang et al. (2001); Hetel et al. (2017); Brockett (1997); Donkers et al. (2011)]. In turn, the dimension of corresponding SS models for such systems can be very big due to the interaction of different subsystems in the network. Simulations for control synthesis or performance specifications regarding the output behavior can easily become intractable due to the complexity of the original model. Hence, model reduction approaches for such systems can be of great importance. ⋆ This work was partially supported by ESTIREZ project of Region Nord-Pas de Calais, France and by ANR project ROCC-SYS (ANR14-CE27-0008). The paper states two model reduction procedures based on moment matching for aperiodically sampled data systems. Model reduction for sampled data systems has been considered previously on [Barb and Weiss (1993); Shieh and Chang (1984)]. Both papers deal with the case of periodical sampling and are valid only for the case when the considered plant is stable. In contrast, in the present paper the general aperiodic sampling case considered and the considered plant is allowed to be unstable. In this paper, the sampling interval is considered to be time varying and assumed to be taking its values from a finite set of possible sampling intervals. The inputoutput behavior at sampling instants of such sampled data systems can be modeled by discrete-time linear switched (LS) SS representations [Gu et al. (2003); Zhang (2001); Donkers et al. (2009)]. One of the model reduction procedures considered in the paper can be summarized as follows: Apply a classical moment matching algorithm to the original continuous-time linear time-invariant (LTI) plant to get a reduced order model, and then get an LS SS representation to model the aperiodically sampled system. The other approach given is to apply an analogous moment matching based model reduction algorithm to the LS SS representation which is computed from the original LTI plant. Since the sampling interval at each time instant acts as an additional control input for aperiodically sampled data systems, intuitively, a method of approximating the input-output behavior of such systems should make use of the information of the allowed sampling interval set. The second approach is given in accordance with this idea. For both of the approaches, it is shown that the resulting reduced order discrete-time LS SS representation of the sampled data system will be quadratically stable as long as the original continuous-time LTI model is stable. The paper is organized as follows: In Section 2, we present the procedure of modeling an aperiodically sampled data system with an LS SS representation. In Section 3 we present a brief overview of the concept of model reduction by moment matching for LTI SS representations and present the first model reduction approach in detail. In Section 4 we briefly review the concept of model reduction by moment matching for LS SS representations and present the second model reduction approach in detail. In Section 5 we show that the proposed methods preserve stability. In Section 6 we illustrate the two approaches and compare their performances with two numerical examples. Notation 1. In the following, we will use Z, N and R+ to denote respectively the set of integers; the set of natural numbers including 0 and the set [0, +∞) of nonnegative real numbers. We will use Ia to denote the a × a identity matrix with a ∈ N\{0}. 2. MODELING OF SAMPLED DATA SYSTEMS WITH LS SS REPRESENTATIONS In this section we present briefly the process of modeling an aperiodically sampled continuous-time LTI system with a discrete-time LS SS model. We start with the formal definition of continuous-time LTI state-space (SS) representations. An LTI SS representation ΣLTI is a tuple ΣLTI = (A, B, C) with A ∈ Rn×n , B ∈ Rn×m , C ∈ Rp×n . The state x(t) ∈ Rn and the output y(t) ∈ Rp of the LTI system ΣLTI at time t ≥ 0 is defined by 1  ẋ(t) = Ax(t) + Bu(t) (1) ΣLTI y(t) = Cx(t), ∀t ∈ R+ . In the following, dim(ΣLTI ) will be used to denote the dimension n of the state-space of ΣLTI and the number n will be called the order of ΣLTI . Let ΣLTI = (A, B, C) be a continuous-time LTI SS representation of the form (1). Let the state x(tk ) and output y(tk ) of ΣLTI be sampled in arbitrary time instants tk , k ∈ N such that t0 = 0 and tk+1 − tk ∈ H = {ĥ1 , . . . , ĥD }, ĥ1 , . . . , ĥD ∈ R+ for all k ∈ N to form the constant control signal u(t) = uk for all t ∈ [tk , tk + 1), k ∈ N. Note that the sequence tk , k ∈ N is monotonically increasing. The resulting sampled data system ΣSD can be represented as follows:   ẋ(t) = Ax(t) + Buk , t ∈ [tk , tk+1 ), k ∈ N ΣSD yk = Cx(tk ) (2)  tk+1 = tk + hk , hk ∈ H = {ĥ1 , . . . , ĥD }. In (2), x(t) ∈ Rn is the state, uk ∈ Rm is the constant input and y(t) ∈ Rp is the output at time t ∈ R+ ; A ∈ Rn×n , B ∈ Rn×m and C ∈ Rp×n are the same as the system parameters (A, B, C) of ΣLTI . We call the set H = {ĥ1 , . . . , ĥD }, as the finite sampling interval 1 Unless stated otherwise, we take x(0) = x = 0 for all classes of 0 systems discussed in the paper for notational simplicity. Note that the result of the paper can easily be extended to the case of non-zero initial states. set and the value hk ∈ H as the kth sampling interval. We will use the shorthand notation ΣSD = (A, B, C, H) for the sampled data system of the form (2). Note that different from the model (1), model (2) has also hk ∈ H, k ∈ N as the control parameter in addition to the input u(t) = uk , t ∈ [tk , tk+1 ), k ∈ N. The state xk = x(tk ) and output yk = y(tk ) of the sampled data system ΣSD in (2) at sampling instants tk , k ∈ N can be written by induction as ! Z hk xk+1 = x(tk+1 ) = eAhk xk + eAs ds Buk , ∀k ∈ N, 0 yk = Cxk . (3) Let Θ(hk ) = Z hk eAs ds. (4) 0 It is easy to see that the following holds: eAhk = In + AΘ(hk ). (5) Replacing (5) in (3) and defining the matrix functions Φ : H → Rn×n and Γ : H → Rn×m as Φ(hk ) = eAhk = In + AΘ(hk ) and Γ(hk ) = Θ(hk )B, (3) can be rewritten as  xk+1 = Φ(hk )xk + Γ(hk )uk , Σdisc (6) yk = Cxk , ∀hk ∈ H, k ∈ N. With equation (6), the sampled LTI plant ΣSD in (2) is modeled by a discrete-time, time-varying linear system Σdisc whose read-out map (map represented by the matrix C) is time-invariant. Here, the discrete time instants k ∈ N of (6) corresponds to the time instants tk ∈ R+ , k ∈ N for the original sampled data system ΣSD . In addition, the state xk and the output yk of (6) corresponds to the state x(tk ) and output y(tk ) of ΣSD at the sampling instants tk ∈ R+ when u(t) = uk for t ∈ [tk , tk+1 ). Hence we have built the relationship between the sampled data system ΣSD = (A, B, C, H) and the corresponding discrete-time, linear time-varying system representation Σdisc . Since the sampling interval hk between any two consecutive sampling instants can take its values only from the finite set H = {ĥ1 , . . . , ĥD } one approach to design control for the model (6) is to create an LS SS model from (6). The idea is that since the set H has D elements, Θ(hk ) can only take D different values for all k ∈ N. In turn, (6) can be used to create an LS SS representation with D discrete modes. Below we summarize this procedure. Notation 2. Let a, b ∈ N. In the following, we use Iba to denote the set Iba = {c ∈ N | a ≤ c ≤ b}. Let the matrices Â1 , . . . , ÂD ∈ Rn×n and B̂1 , . . . , B̂D ∈ Rn×m be defined by Âi = In + AΘ(ĥi ), ∀i ∈ ID 1 , B̂i = Θ(ĥi )B, ∀i ∈ ID 1 . (7) Using (7), (6) can be rewritten as the following SS representation ΣLS  xk+1 = Âσk xk + B̂σk uk yk = Cxk , ∀k ∈ N. (8) where σk ∈ ID 1 is called the value of the switching sequence at time k ∈ N. Approach 1 Approach 2 Models of the form (8) are a subclass of discrete-time LS SS representations where the read-out map represented by the matrix C is constant and independent from the value of the switching signal σk at each time instant k ∈ N. Hence from now on, we will refer to the system representations of the form (8) as LS SS representations and formally define the tuple ΣLS = ({(Âi , B̂i , C)}D i=1 ) p×n with Âi ∈ Rn×n , B̂i ∈ Rn×m for all i ∈ ID 1 , C ∈ R as an LS SS representation. We remark that the discretetime LS SS representation described by (8) completely models the behavior of ΣSD in sampling instants. More clearly, note that each linear mode (Âi , B̂i , C), i ∈ ID 1 corresponds to the ith element of the sampling interval set H = {ĥ1 , . . . , ĥD }, i.e., if the kth sampling interval hk , k ∈ N is chosen as hk = ĥi , i ∈ ID 1 , then the value of the switching signal at time instant k is σk = i. In the following, analogous to the LTI case, dim(ΣLS ) will be used to denote the dimension n of the state-space of ΣLS and the number n will be called the order of ΣLS . ΣLTI ΣLTI Now we can state the problem considered in the paper as follows. Problem Let ΣLTI be a continuous-time LTI plant model of order n, which is to be sampled aperiodically with respect to the set H = {ĥ1 , . . . , ĥD } to form the sampled data system ΣSD . Compute a discrete-time model Σ̄LS of order r < n which is an approximation of the input-output behavior of ΣSD in sampling instants. Two intuitive approaches (see Figure 1) can be proposed for the solution of this problem: Approach 1 Let ΣLTI = (A, B, C) be the continuoustime LTI plant which is to be sampled aperiodically with respect to H = {ĥ1 , . . . , ĥD }. Compute from ΣLTI another LTI SS model Σ̄LTI = (Ā, B̄, C̄) of order r < n who approximates the input-output behavior of ΣLTI . Let Σ̄SD = (Ā, B̄, C̄, H) be the sampled data system corresponding to Σ̄LTI . Compute from Σ̄SD the LS SS ˆ , C̄)}D ) of order r < n of the model Σ̄LS = ({(Āˆi , B̄ i i=1 form (8). Approach 2 Let ΣSD = (A, B, C, H) be the sampled data system with H = {ĥ1 , . . . , ĥD } of the form (2) corresponding to the continuous-time LTI plant ΣLTI = (A, B, C) of the form (1). Let ΣLS = ({(Âi , B̂i , C)}D i=1 ) of the form (8) be the corresponding LS SS model for the sampled data system ΣSD . Compute from ΣLS another LS ¯ ¯ SS model Σ̄LS = ({(Âi , B̂i , Ĉ)}D i=1 ) of order r < n who approximates the input-output behavior of ΣLS . Remark 1. Note that the symbol¯over a system representation Σ is used for indicating that Σ̄ is an approximation system for Σ; whereas the subscripts LTI, SD, LS are used for referring to the particular class of system representations of the form (1), (2) and (8) respectively. The symbol ¯when used above a system matrix A, B or C of a system Σ, indicates that Ā, B̄ or C̄ are the system parameters of Σ̄. Finally, the symbol ˆ over a system parameter A or B of ΣSD is used to indicate that Âi and B̂i for all i ∈ ID 1 are the matrices of the form (7) of the resulting LS SS Model Reduction Σ̄LTI Sampling 8 2 Σ̄SD LS Modeling 5 1 3 Σ̄LS ΣSD 6 4 Sampling LS Modeling ΣLS 7 Model Reduction Σ̄LS Fig. 1. Overview of the two model reduction approaches. representation corresponding to the sampled data system with H = {ĥ1 , . . . , ĥD }. The symbols ˆ¯ and ¯ˆ used above a system matrix in the definitions of Approach 1 and Approach 2 respectively can be interpreted with respect to this remark. 3. FIRST APPROACH OF MODEL REDUCTION In this section, firstly we recall the concepts of Markov parameters and moment matching for LTI SS representations. Then we present Approach 1 in detail. 3.1 Review: Moment Matching for LTI SS Representations Notation 3. Let a ∈ N\{0}. The set of continuous and absolutely continuous maps of the form R+ → Ra is denoted by C(R+ , Ra ) and AC(R+ , Ra ) respectively; and the set of Lebesgue measurable maps of the form R+ → Ra which are integrable on any compact interval is denoted by Lloc (R+ , Ra ). We define the input-to-state map XΣx0LTI and input-to0 output map YΣxLTI of a system ΣLTI = (A, B, C) of the form (1) as the maps XΣx0LTI : Lloc (R+ , Rm ) → AC(R+ , Rn ); u 7→ XΣx0LTI (u), 0 0 YΣxLTI : Lloc (R+ , Rm ) → C(R+ , Rp ); u 7→ YΣxLTI (u), defined by letting t 7→ XΣx0LTI (u)(t) be the solution to the first equation of (1) with x(0) = x0 , and letting 0 YΣxLTI (u)(t) = CXΣx0LTI (u)(t) for all t ∈ R+ as in second equation of (1). A moment’s reflection lets us see that the kth Taylor series coefficient Mk of YΣ0LTI around t = 0 for the unit impulse input will be Mk = CAk B, k ∈ N (9) 0 where A defined to be In . The coefficients Mk , k ∈ N are called the Markov parameters or the moments of the system ΣLTI . Hence, it is possible to approximate the input-output behavior of ΣLTI by another system Σ̄LTI (possibly of reduced order), whose first some number of Markov parameters are equal to the corresponding ones of ΣLTI . If this number is chosen to be N ∈ N, we will call such approximations as N -partial realizations of ΣLTI . More precisely, a continuous-time LTI SS representation Σ̄LTI = (Ā, B̄, C̄) is an N -partial realization of another continuous-time LTI SS representation ΣLTI = (A, B, C) if CAk B = C̄ Āk B̄, k = 0, . . . , N. The problem of model reduction of LTI systems by moment matching can now be stated as follows. Consider an LTI system ΣLTI = (A, B, C) of the form (1) and fix N ∈ N. Find another LTI system Σ̄LTI of order r strictly less than n such that Σ̄LTI is an N -partial realization of ΣLTI . Below we recall a basic theorem on how to compute an N -partial realization for the LTI case. For this purpose, we define the N -partial reachability space of a continuoustime LTI realization ΣLTI = (A, B, C) as   N RLTI = im B AB · · · AN B . (10) for all N ∈ N with A0 := In . Theorem 1. (Moment Matching for LTI SS Representations, [Antoulas (2005)]). Let ΣLTI = (A, B, C) be a continuous-time LTI SS representation of the form (1), N ∈ N and V ∈ Rn×r be a full column rank matrix such that N RLTI = im(V ). If Σ̄LTI = (Ā, B̄, C̄) is an LTI SS representation such that the matrices Ā, B̄, C̄ are defined as Ā = V −1 AV , B̄ = V −1 B, C̄ = CV, (11) where V −1 is a left inverse of V , then Σ̄LTI is an N -partial realization of ΣLTI . 3.2 Approach 1 Now the first approach for model reduction of aperiodically sampled data systems can be stated in detail as follows: Approach 1 Let ΣLTI = (A, B, C) be the continuous-time LTI plant of order n which is to be sampled aperiodically with respect to H = {ĥ1 , . . . , ĥD }. By using Theorem 1, compute an N -partial realization Σ̄LTI = (Ā, B̄, C̄) of ΣLTI such that the order of Σ̄LTI is r < n. Let Σ̄SD = (Ā, B̄, C̄, H) be the sampled data system corresponding to Σ̄LTI . Compute from Σ̄SD the LS SS model Σ̄LS = ˆ , C̄)}D ) of order r < n of the form (8), with ({(Āˆi , B̄ i i=1 the procedure given in Section 2. Corollary 1. (Theorem 1). The resulting reduced order LS SS model Σ̄LS computed by Approach 1 corresponds to the discrete-time, time varying model Σdisc  x̄k+1 = Φ̄(hk )x̄k + Γ̄(hk )uk , (12) Σ̄disc ȳk = C̄ x̄k , ∀hk ∈ H, ∀k ∈ N, of the sampled data system. In (12) ! Z hk −1 Āhk Ās , Γ̄(hk ) = x̄k = V xk , Φ̄(hk ) = e e ds B̄. 0 4. SECOND APPROACH OF MODEL REDUCTION In this section, we recall the concepts of Markov parameters and moment matching for LS SS representations and the analogy between the LTI case. Then we present Approach 2 in detail. 4.1 Review: Moment Matching for LS SS Representations Notation 4. In the sequel, we use the following notation and terminology: If s = s0 · · · sN is a sequence with N + 1 elements, N ∈ N, we denote the number N as |s| = N and call |s| as the length of the sequence |s|. We use Q to denote the set of finite sequences in Q = {1, . . . , D}, D ≥ 1, i.e., Q = {σ = σ0 · · · σN | σ0 , · · · , σN ∈ Q, N ∈ N}; U to denote the set of finite sequences in Rm , i.e., U = {u = u0 · · · uN | u0 , · · · , uN ∈ Rm , N ∈ N}; X to denote the set of finite sequences in Rn , i.e., X = {x = x0 · · · xN | x0 , · · · , xN ∈ Rn , N ∈ N} and Y to denote the set of finite sequences in Rp , i.e., Y = {y = y0 · · · yN | y0 , · · · , yN ∈ Rp , N ∈ N}. In addition, we will write U × Q = {(u, σ) ∈ U × Q | |u| = |σ|}. We define the input-to-state map XΣx0LS and input-to-output 0 map YΣxLS of a system ΣLS of the form (8) as the maps U × Q → X; (u, σ) 7→ XΣx0LS (u, σ) = x, 0 U × Q → Y; (u, σ) 7→ YΣxLS (u, σ) = y, defined by letting k 7→ XΣx0LS (u, σ)k be the solution to the first equation of (8) with x(0) = x0 , and letting 0 YΣxLS (u, σ)k = CXΣx0LS (u, σ)k for all k ∈ N as in second equation of (8). Using (8), one can see that the coefficients appearing in the output of ΣLS for any pair of input and switching sequences (u, σ) ∈ U × Q are of the form C B̂j , j ∈ ID 1 (13) and C Âk1 · · · ÂkM B̂j ; k1 , · · · , kM , j ∈ ID 1 , M ∈ N\{0}. (14) Analogously to the linear case we will call the coefficients of the form (13) and (14) as the Markov parameters of ΣLS = ({(Âi , B̂i , C)}D i=1 ). Specifically, we will call the Markov parameters of the form (13) as the Markov parameters of length 0 and the Markov parameters of the form (14) as the Markov parameters of length M for any M ∈ N\{0}. In [Bastug et al. (2014)] and [Bastug et al. (2016)] it is shown that similarly to the LTI case, it is possible to approximate the input-output behavior of ΣLS by another LS SS representation Σ̄LS (possibly of reduced order), whose Markov parameters up to a certain length N ∈ N is equal with the corresponding ones of ΣLS 2 . Again, we will call such approximations as N -partial realizations of ΣLS . More precisely, a discrete-time LS SS ¯ ¯ representation Σ̄LS = ({(Âi , B̂i , C̄)}D i=1 ) is an N -partial realization of another discrete-time LS SS representation ΣLS = ({(Âi , B̂i , C)}D i=1 ) if ¯ C B̂j = C̄ B̂j , j ∈ ID 1 2 Even though the results in [Bastug et al. (2014)] and [Bastug et al. (2016)] are stated in the continuous-time context, the analogous results on N -partial realizations of discrete-time LS SS representations are also valid. See [Bastug et al. (2015)] for an application of these results for the model reduction of affine LPV systems in the discretetime context. 4.2 Approach 2 and ¯ ¯ ¯ C Âk1 · · · ÂkM B̂j = C̄ Âk1 · · · ÂkM B̂j ID 1 IN 1 . for all k1 , · · · , kM , j ∈ and M ∈ Note that an N partial realization Σ̄LS of ΣLS will have the same output with ΣLS for all time instants up to N , i.e., k ∈ IN 0 , for all input and switching sequences. The reason why the output of an N -partial realization is indeed an approximation for the output of the original system model for also the time instants k > N can be found in [Bastug et al. (2015)]. The problem of model reduction of LS systems by moment matching can now be stated as follows: Consider an LS SS model ΣLS = ({(Âi , B̂i , C)}D i=1 ) of the form (8) of order n and fix N ∈ N. Find another LS SS model Σ̄LS of order r ¯ ¯ strictly less than n such that Σ̄LS = ({(Âi , B̂i , C̄)}D i=1 ) is an N -partial realization of ΣLS . Next, we recall a theorem of model reduction with N partial realizations for the LS case [Bastug et al. (2014)]. This theorem (Theorem 2) can be considered as the analogous of Theorem 1 for the LS case (or in other words Theorem 1 is a special case of 2 when the LS system consists of only one LTI system). For this purpose, we define inductively the N -partial reachability space of a discretetime LS SS representation ΣLS = ({(Âi , B̂i , C)}D i=1 ) as [ 0 im(Bj ), RLS = span j∈ID 1 N 0 RLS = RLS + X N −1 ), N ≥ 1. im(Ak RLS (15) k∈ID 1 for all N ∈ N. In (15) the summation operator must be interpreted as the Minkowski sum of vector spaces. Theorem 2. (Moment Matching for LS SS Representations, [Bastug et al. (2014)]). Let ΣLS = ({(Âi , B̂i , C)}D i=1 ) be a discrete-time LS SS representation of the form (8), N ∈ N and V ∈ Rn×r be a full column rank matrix such that N RLS = im(V ). (16) ¯ ¯ If Σ̄LS = ({(Âi , B̂i , C̄)}D i=1 ) is an LS SS representation such ¯ ¯ , the matrices Âi , B̂i , C̄ are defined as that for each i ∈ ID 1 ¯ ¯ Âi = V −1 Âi V , B̂i = V −1 B̂i , C̄ = CV, (17) where V −1 is a left inverse of V , then Σ̄LS is an N -partial realization of ΣLS . Note that the key of model reduction lies in the number of columns of the full column rank projection matrix V ∈ Rn×r such that r < n. Choosing the number N small enough such that the matrix V satisfies the condition (16) and it has r < n columns, results in the reduced order N -partial realization Σ̄LS of order r. A simple algorithm with polynomial computational complexity to compute the matrix V in Theorem 2 is given in [Bastug et al. (2014)]. Note also that the counterpart of Theorem 2 can be given dually, using matrix representations of the N unobservability space. These discussions are left out of this paper for simplicity and they can be found in detail in [Bastug et al. (2014)]. Now the second approach for model reduction of aperiodically sampled data systems can be stated in detail as follows: Approach 2 Let ΣSD = (A, B, C, H) be the sampled data system with H = {ĥ1 , . . . , ĥD } of the form (2) corresponding to the continuous-time LTI plant ΣLTI = (A, B, C) of the form (1) of order n. Let ΣLS = ({(Âi , B̂i , C)}D i=1 ) of the form (8) be the corresponding LS SS model for the sampled data system ΣSD computed with the procedure given in Section 2. By using Theorem 2 compute an N ¯ ¯ partial realization Σ̄LS = ({(Âi , B̂i , C̄)}D i=1 ) of order r < n for ΣLS . Since we have proposed computing an N -partial realization based on the model (8) of an aperiodically sampled system as a model reduction approach for it, it could be helpful to relate the definition of N -partial realization to the model (6) of the sampled data system. The following corollary is the direct consequence of the definition of N partial realizations in the switched case and the representations (6) and (8). Corollary 2. (Theorem 2). The N -partial realization Σ̄LS of the original LS SS model ΣLS of the sampled data system computed by Approach 2 corresponds to the time-varying model  x̄k+1 = Φ̄(hk )x̄k + Γ̄(hk )uk , (18) Σ̄disc ȳk = C̄ x̄k , ∀hk ∈ H, ∀k ∈ N, such that the outputs yk of Σdisc in (6) and ȳk of Σ̄disc in (18) for any input u ∈ U will be the same for all k ∈ IN 0 . In other words, CΦ(hk ) · · · Φ(hi )Γ(hi ) = C̄ Φ̄(hk ) · · · Φ̄(hi )Γ̄(hi ), k k for all k ∈ IN 0 and i ∈ I0 , where hl ∈ H for all l ∈ Ii . The relationship between Σdisc of (6) and Σ̄disc of (18) can be constructed by stating that x̄k = V −1 xk , Φ̄(hk ) = V −1 Φ(hk )V , Γ̄(hk ) = V −1 Γ(hk ) for all hk ∈ H and k ∈ N. 5. CONSERVATION OF STABILITY In this section, we build the relationship between the stability of the original continuous-time LTI system ΣLTI and the quadratic stability of the reduced order discretetime LS SS model Σ̄LS computed with both approaches. More specifically, we will show that as long as the original continuous-time LTI system ΣLTI is stable, the reduced order discrete-time LS SS representation Σ̄LS modeling the sampled data system computed by Approach 1 or Approach 2 will be quadratically stable. As the final result of this section, we will extend this conservation of stability argument for the representations of the form (6) of aperiodically sampled data systems. We will start with presenting two technical lemmas for the purpose of presenting this result. 5.1 Technical Lemmas In the sequel, we denote the fact that a matrix G is positive definite (resp. positive semi-definite, negative definite, negative semi-definite) with G > 0 (resp. G ≥ 0, G < 0, G ≤ 0). Definition 1. (Quadratic stability). Let ΣLS = ({(Âi , B̂i , C)}D ) be an LS SS representation of the form i=1 (8). The LS SS representation ΣLS is quadratically stable if and only if there exists a symmetric positive definite P ∈ Rn×n such that (19) ÂT ∀i ∈ ID i P Âi − P < 0, 1 . Lemma 1. Let ΣLTI = (A, B, C) be an LTI SS representation. For any H = {ĥ1 , . . . , ĥD } with D ∈ N\{0}, the LS SS model ΣLS = ({(Âi , B̂i , C)}D i=1 ) of the sampled data system ΣSD = (A, B, C, H) is quadratically stable if ΣLTI is stable. Proof. The stability of ΣLTI = (A, B, C) implies the stability of the autonomous system Σaut LTI = (A, 0, 0). Then there exists a P > 0, P T = P and V (x(t)) = x(t)T P x(t) such that V (x(t)) < V (x(0)), ∀x(0) ∈ Rn , x(0) 6= 0, ∀t ∈ R+ \{0}. Then for all x(0) ∈ Rn , x(0) 6= 0 and for all t ∈ R+ \{0} x(t)T P x(t) − x(0)T P x(0) < 0. (20) At Replacing x(t) with e x(0) in (20) yields that for all x(0) ∈ Rn , x(0) 6= 0 and for all t ∈ R+ \{0}  T  (21) x(0)T eA t P eAt − P x(0) < 0. In turn (21) implies T eA ĥi P eAĥi − P < 0, ∀ĥi ∈ H. Using (6) we conclude that ΦT (ĥi )P Φ(ĥi ) − P < 0, ∀ĥi ∈ H. The proof of the statement follows by noticing that Φ(ĥi ) = Âi , for all i ∈ ID 1 . Lemma 1 establishes the connection between the stability of ΣLTI and the quadratic stability of ΣLS . Hence the proof of conservation of stability in the directions of 4 and 8 on Figure 1 is done. The following lemma establishes the remaining part of the conservation of stability argument stated in the beginning of this section (namely, in the directions of 1 and 7 on Figure 1). Lemma 2. Let ΣLS = ({(Âi , B̂i , C)}D i=1 ) be a quadratically stable LS SS representation of the form (8) and P > 0 be a solution of (19). If the left inverse V −1 of the matrix V ∈ Rn×r in Theorem 2 is chosen as ¯ ¯ V −1 = (V T P V )−1 V T P , then Σ̄LS = ({(Âi , B̂i , C̄)}D i=1 ) in Theorem 2 is also quadratically stable. Proof. See Appendix A. Remark 2. Note that even though Lemma 2 is presented in this paper as a step on proving the stability of the reduced order models for the sampled data systems computed with Approach 1 or Approach 2, on the condition of stability of the original plant; it can also be considered as an independent stability result for model reduction of discrete-time LS SS representations. With Lemma 2 we have established the connection between the quadratic stability of ΣLS and Σ̄LS in the direction of 7 in Figure 1. Using this proof, proving the counterpart argument in the direction of 1 in Figure 1 is trivial 3 . Therefore, the first statement in the beginning of the section has been proven. 5.2 Main Stability Result With the following theorem, we can relate the conservation of stability argument to the discrete-time, time varying representations of the reduced order aperiodically sampled data systems of the form (12) and (18) respectively. Theorem 3. Let ΣLTI = (A, B, C) be stable. Then (i) The model Σ̄disc of the form (12) corresponding to Σ̄LS computed with Approach 1 is quadratically stable. (ii) The model Σ̄disc of the form (18) corresponding to Σ̄LS computed with Approach 2 is quadratically stable. Proof. The proof of part (i) follows directly from the subsequent application of Lemma 2 and 1 to ΣLTI (note that to apply Lemma 2 and 1 to ΣLTI = (A, B, C) in this order, one simply considers ΣLTI as an LS SS representation consisting only of one LTI system (A, B, C)). The proof of part (ii) follows directly from the subsequent application of Lemma 1 and 2 to ΣLTI . 6. NUMERICAL EXAMPLES In this section, two generic numerical examples are presented to illustrate and compare the two proposed model reduction procedures 4 . Example 1 In the first example, the two approaches are applied to get a reduced order model for a single-input singleoutput (SISO), stable system ΣLTI = (A, B, C) of order 50, sampled to form the sampled data system ΣSD = (A, B, C, H) with H = {ĥ1 , ĥ2 , ĥ3 , ĥ4 } = {1, 1.5, 2, 3}. For Approach 1, firstly a reduced order continuous-time LTI 17-partial realization Σ̄LTI of ΣLTI with order 18 is computed. Then this model is used to get the reduced order (of order 18) LS SS model Σ̄LS of the sampled data system ΣSD . For simulation, the output sequence yk of the original sampled data system ΣSD and ȳk of the reduced order LS model Σ̄LS are acquired for k = IK 0 where K + 1 is the number of sampling instants of the simulation; by applying the same white Gaussian noise input sequence u = u0 · · · uK , uk ∈ N (0, 1) for all k ∈ IK 0 and sampling sequence h = h0 · · · hK , hk ∈ H for all k ∈ IK 0 . For this example, the total time horizon is chosen as [0, 50]. For each simulation, the distance of the values ȳk to the values yk , k ∈ IK 0 are compared with the best fit rate (BFR) [Ljung (1999)] which is defined as 3 After this statement, one must also remark that numerical issues related to the particular implementation of the moment matching algorithm can cause instability in the reduced order model even in the linear case and even when the original system is stable, [Antoulas (2005)]. 4 The implementation of the two approaches in Matlab is freely available (with the examples) for experimentation from https://sites.google.com/site/mertbastugpersonal/. The original system parameters used and reduced order system parameters computed can be obtained from the same site. Response of the Different System Models 20 4.5 ×104 Response of the Different System Models Continuous Output Output at the Sampling Instants Approach 1: Output of LSS Model Based on Reduced LTI Plant Approach 2: Output of the reduced LSS model 4 15 3.5 10 3 2.5 y(t) y(t) 5 0 2 1.5 -5 1 -10 Continuous Output Output at the Sampling Instants Approach 1: Output of LSS Model Based on Reduced LTI Plant Approach 2: Output of the reduced LSS model -15 -20 0.5 0 -0.5 0 5 10 15 20 25 30 35 40 45 50 0 0.5 1 t 2 2.5 3 3.5 4 4.5 5 t Fig. 2. Example 1: The outputs resulting from the two approaches compared with the original output. For this simulation, the BFR of Approach 1 is 53.8214% and the one of Approach 2 is 98.3700%.  1.5 qP K 2 k=0 kyk − ȳk k2 BFR = 100% max 1 − qP K 2 k=0 kyk − ym k2  , 0 (22) where ym is the mean of the sequence {yk }K k=0 . The mean of the BFRs for 200 such different simulations is acquired as 53.8303% whereas the best BFR is acquired as 73.9027% and the worst as 23.0697%. The output sequence {ȳk }K k=0 of the simulation giving the closest value to the mean of the BFRs over this 200 simulations is illustrated in Figure 2 together with the original output sequence {yk }K k=0 . Then Approach 2 is applied to the same example. Firstly the original LTI SS representation ΣLTI is used to construct to LS SS representation ΣLS which models the behavior of the sampled data system with respect to the sampling interval set H. The model ΣLS is then used to get the reduced order LS SS representation Σ̄LS using Theorem 2. The reduced order LS SS representation Σ̄LS in this case is a 2-partial realization of order 18. When the same 200 simulations is done with this model with the specifications given for Approach 1 of this example, the mean of the BFRs over these simulations is 98.4222%, best 99.6449%, worst 95.5082%. Again, the output sequence giving the closest value to the mean of the BFRs over this 200 simulations is illustrated in Figure 2 together with the original output sequence. Example 2 In the second example, the two approaches are applied to get a reduced order model for a SISO unstable system ΣLTI = (A, B, C) of order 10 sampled to form the sampled data system ΣSD = (A, B, C, H) with H = {ĥ1 , ĥ2 , ĥ3 , ĥ4 } = {0.1, 0.15, 0.2, 0.3}. For Approach 1, a reduced order continuous-time LTI 3-partial realization Σ̄LTI of ΣLTI with order 4 is computed. Then this model is used to get the reduced order (of order 4) LS SS model Σ̄LS of the sampled data system ΣSD . The simulations are done with the input and sampling sequences with the specifications analagous to the ones given for Example 1. Fig. 3. Example 2: The outputs resulting from the two approaches compared with the original output. For this simulation, the BFR of Approach 1 is 91.4432% and the one of Approach 2 is 96.4294%. Table 1. The mean of BFRs over 200 simulations for both of the examples using Approach 1 and Approach 2 Ex. / App. Example 1 Example 2 Approach 1 53.8303% 91.5237% Approach 2 98.4222% 96.1276% For this example, the total time horizon is chosen as [0, 5]. The mean of the BFRs for 200 simulations is acquired as 91.5237% whereas the best BFR is acquired as 94.7476% and the worst as 76.8753%. The output sequence {ȳk }K k=0 of the simulation giving the closest value to the mean of the BFRs over this 200 simulations is illustrated in Figure 3 together with the original output sequence. Then Approach 2 is applied to the same example. Firstly the original LTI SS representation ΣLTI is used to construct to LS SS representation ΣLS which models the behavior of the sampled data system with respect to the sampling interval set H. The model ΣLS is then used to get the reduced order LS SS representation Σ̄LS using Theorem 2. The reduced order LS SS representation Σ̄LS in this case is a 0-partial realization of order 4. When the same 200 simulations is done with this model with the corresponding same input and sampling sequences used for Approach 1, the mean of the BFRs is acquired 96.1276%, best 97.8198%, worst 91.2306%. Again, the output sequence giving the closest value to the mean of the BFRs over this 200 simulations is illustrated in Figure 3 together with the original output sequence. The results of the two simulations for both of the examples are summarized in Table 1 for Approach 1 and Approach 2. Intuitively, the reason why Approach 2 is superior to Approach 1 for these examples can be explained as follows: Approach 1 is based on model reduction of the original LTI plant where the sampling behavior is not considered at all. Whereas Approach 2 applies the model reduction on the model which already takes into account the specific set of allowed sampling intervals. It should be noted that this statement may change depending on the specific example, since for the moment, no formal proof of comparison for the two methods can be given. 7. CONCLUSIONS Two approaches for model reduction of sampled data systems by moment matching is proposed. One approach relies on applying a classical model reduction by moment matching algorithm to the original LTI plant whereas the other relies on computing a reduced order model from the LS SS model of the sampled data system. With some numerical examples, the use of two approaches are illustrated and compared. For both approaches, it is shown that the stability of the original continuous-time LTI plant guarantees the quadratic stability of the resulting reduced order discrete-time LS SS model with respect to any finite allowed sampling interval set. Hristu-Varsakelis, D. and (Editors), W.L. (2005). Handbook of networked and embedded control systems. Boston: Birkhauser. Lin, H. and Antsaklis, P.J. (2009). Stability and stabilizability of switched linear systems: A survey of recent results. IEEE Transactions on Automatic Control, 54(2), 308 – 322. Ljung, L. (1999). System Identification, Theory for the User. Prentice Hall, Englewood Cliffs, NJ. Shieh, L.S. and Chang, Y.F. (1984). Model simplification and digital design of multivariable sampled-data control systems via a dominant-data matching method. Applied Mathematical Modelling, 8(10), 355–364. Zhang, W. (2001). Stability analysis of networked control systems. Ph.D. thesis, CASE Western Reserve University, Cleveland, OH. Zhang, W., Branicky, M., and Phillips, S. (2001). Stability of networked control systems. IEEE Control Systems Magazine, 21(1), 84–99. REFERENCES Antoulas, A.C. (2005). Approximation of Large-Scale Dynamical Systems. SIAM, Philadelphia, PA. Barb, F.D. and Weiss, M. (1993). Model reduction techniques for sampled-data systems. Numerical Algorithms, 4, 47–64. Bastug, M., Petreczky, M., Toth, R., Wisniewski, R., Leth, J., and Efimov, D. (2015). Moment matching based model reduction for LPV state-space models. In Proc. of the 54th IEEE Conference on Decision and Control, 5334 – 5339. Osaka. Bastug, M., Petreczky, M., Wisniewski, R., and Leth, J. (2014). Model reduction by moment matching for linear switched systems. In Proc. of the American Control Conference (ACC), 3942 – 3947. Portland, OR, USA. Bastug, M., Petreczky, M., Wisniewski, R., and Leth, J. (2016). Model reduction by nice selections for linear switched systems. IEEE Transactions on Automatic Control, PP, 1–1. doi:10.1109/TAC.2016.2518023. Brockett, R.W. (1997). Minimum attention control. In Proc. of the 36th IEEE Conference on Decision and Control (CDC), 2628 – 2632. San Diego, CA, USA. Donkers, M.C.F., Hetel, L., Heemels, W.P.M.H., van de Wouw, N., and Steinbuch, M. (2009). Hybrid Systems: Computation and Control, chapter Stability Analysis of Networked Control Systems Using a Switched Linear Systems Approach, 150–164. Springer, Berlin Heidelberg. Donkers, M., Tabuada, P., and Heemels, W. (2011). On the minimum attention control problem for linear systems: A linear programming approach. In Proc. of the 50th IEEE Conference on Decision and Control and European Control Conference (CDC-ECC), 4717 – 4722. Orlando, FL, USA. Gu, K., Kharitonov, V.L., and Chen, J. (2003). Stability of Time-Delay Systems. Springer US, New York, NY. Hespanha, J., Naghshtabrizi, P., and Xu, Y. (2007). A survey of recent results in networked control systems. IEEE Special Issue on Technology of Networked Control Systems, 95(1), 138–162. Hetel, L., Fiter, C., Omran, H., Seuret, A., Fridman, E., Richard, J.P., and Niculescu, S.I. (2017). Recent developments on the stability of systems with aperiodic sampling: an overview. Automatica, accepted. Appendix A. PROOF OF LEMMA 2 Below, we will use the following simple claims: (C1) If S ∈ Rn×n is symmetric negative (respectively positive) definite, then Ŝ = V T SV is also symmetric negative (respectively positive) definite. (C2) V −1 = (V T P V )−1 V T P (V T P V )−1 . =⇒ V −1 P −1 (V −1 )T = (CS) (Schur Complement Lemma for positive/negative definiteness). Let S ∈ Rn×n be a symmetric positive definite matrix and G ∈ Rn×n . Then GT SG − S < 0 ⇐⇒ GS −1 GT − S −1 < 0. Note that, by the assumption of the theorem, (19) holds. Multiplying (19) by V T from left and V from right for all i ∈ ID 1 and using (C1) yields T V T ÂT i P Âi V − V P V < 0, By (CS) it follows that ∀i ∈ ID 1 . −1 Âi V (V T P V )−1 V T ÂT < 0, ∀i ∈ ID (A.1) i −P 1 . In turn, multiplying (A.1) by V −1 from left and (V −1 )T from right for all i ∈ ID 1 and using (C1) yields −1 T V −1 Âi V (V T P V )−1 V T ÂT ) − V −1 P −1 (V −1 )T < 0, i (V (A.2) T for all i ∈ ID 1 . Using (C2) and choosing P̄ = V P V , the inequality (A.2) can be rewritten as ¯ ¯ −1 < 0, ∀i ∈ ID (A.3) Âi P̄ −1 ÂT i − P̄ 1 . Finally, using (CS) one more time for (A.3) yields ¯ ¯ ∀i ∈ ID (A.4) ÂT 1 . i P̄ Âi − P̄ < 0, T Since P̄ = V P V is symmetric and positive definite by (C1), (A.4) proves the quadratic stability of Σ̄LS = ¯ ¯ ({(Âi , B̂i , C̄)}D i=1 ).
3cs.SY
2016 1st International Conference on New Research Achievements in Electrical and Computer Engineering (ICNRAECE) May 13, 2016 (AmirKabir University of Technology) ‫ ـــ‬Tehran, Iran Multi-focus image fusion using VOL and EOL in DCT domain Mostafa Amin-Naji Ali Aghagolzadeh Faculty of Electrical and Computer Engineering Babol Noshirvani University of Technology Babol, Iran [email protected] Faculty of Electrical and Computer Engineering Babol Noshirvani University of Technology Babol, Iran [email protected] and temperature sensors. Also there are some limitations such as limited band width, energy consumption and processing time, which leads us to process the local input images for decreasing the amount of transmission data [3]. Therefore many researchers are seeking efficient methods for multi-focus image fusion. Abstract—The purpose of multi-focus image fusion is gathering the essential information and the focused parts from the input multi-focus images into a single image. These multifocused images are captured with different depths of focus of cameras. Multi-focus image fusion is very time-saving and appropriate in discrete cosine transform (DCT) domain, especially when JPEG images are used in visual sensor networks (VSN). The previous works in DCT domain have some errors in selection of the suitable divided blocks according to their criterion for measurement of the block contrast. In this paper, we used variance of Laplacian (VOL) and energy of Laplacian (EOL) as criterion to measure the contrast of image. Also in this paper, the EOL and VOL calculations directly in DCT domain are prepared using vector processing. We developed four matrices which calculate the Laplacian of block easily in DCT domain. Our works greatly reduce error due to unsuitable block selection. The results of the proposed algorithms are compared with the previous algorithms in order to demonstrate the superiority of the output image quality in the proposed methods. The several JPEG multi-focus images are used in experiments and their fused image by our proposed methods and the other algorithms are compared with different measurement criteria. Several multi-focus image fusion researches have been done in the spatial domain [4-14]. The simplest methods in the spatial domain used a weighted arithmetic mean of the source image pixels intensity [14]. This method is associated with an image blurring and decreasing the image contrast. Multi-scale image fusion methods are very common and convenient. The Laplacian pyramid transform [15], gradient pyramid-based transform [16] and the premier ones, discrete wavelet transform (DWT) [17] and shift-invariant wavelet transform (SIDWT) [18] are some examples of image fusion methods based on multi-scale transform. Because of computational complexity in multi-scale methods, they need more processing time and energy consumption. Also image fusion methods based on discrete wavelet transform need a large number of convolution operations. In addition, due to creating ringing phenomena in edge place of image, quality of the output image is reduced. Keywords—multi-focus; image fusion; VSN; DCT; energy; variance; laplacian Because of aforementioned problems in multi-scale transform based image fusion methods, the researchers tended to multi-focus images fusion in DCT domain. The DCT based methods have simple calculation and are suitable for implementation in real-time applications when images are compressed in joint photographic experts group format (JPEG) [19-21]. Tang [22] proposed two image fusions techniques DCT+Average and DCT+Contrast. These methods have undesirable side effects on the output images like blurring and blocking artifact which reduces the quality of the output image. Haghighat et al. in [19] introduced the multi-focus image fusion method based on variance in DCT domain (DCT+Variance). This method divides the input images into 8×8 blocks and then creates a merged output image by selecting the corresponding blocks which have larger variance value as a criterion for evaluation of image contrast. In [23] Phamila introduced a method called DCT+AC-Max. This I. INTRODUCTION Image fusion is used to gather special and necessary information from multiple images into fewer images or preferably a single image. The fused image includes all important information from the input images, ideally, and it’s more accurate explanation of the scene than each input images. Due to limited depth of focus in cameras, it is difficult to capture an image that all components be obvious in it. This issue occurs in optical lenses of CCD/CMOS cameras [1]. Therefore, some parts of the captured images with camera sensors in visual sensor network (VSN) are blurred. In VSN there is capability to record images with different depth of focuses using several cameras [2]. The camera generate large amount of data compared to the other sensors such as pressure 728 bxx + byy = −b(x − 1, y − 1) − 4 × b(x − 1, y) − b(x − 1, y + 1) − 4 × b(x, y − 1) + 20 × b(x, y) −4 × b(x, y + 1) − b(x + 1, y − 1) −4 × b(x + 1, y) − b(x + 1, y + 1) (5) method selects the blocks which has more number of higher values AC coefficient in DCT domain. This method can’t always choose the blocks properly, because the number of higher valued AC coefficients as a fusion criterion is invalid when the majority of AC coefficients are zero. So it makes a mistake in selection of the proper focused block. The DCT+SF method in DCT domain is introduced by Cao et al [24]. This method selects the block with higher value of the spatial frequency which is computed for each block. Although these methods (DCT+Variance, DCT+AC-Max and DCT+SF) have advantages over the previous methods, due to selection the unsuitable block from input images, the quality of the output image is reduced. bxx + byy can be computed with convolving mask (6) on 8×8 block. The size of mask (6) is 3×3 and the output matrix from convolution of the mask on the block is a 6×6 matrix. Also the EOL value is computed by the sum of the squares of 6×6 matrix elements. In order to improve the quality of the output fused image, new image fusion methods in DCT domain are presented in this paper. These efficient methods are based on energy of Laplacian (EOL) and variance of Laplacian (VOL). In multifocus image fusion process, EOL and VOL are suitable criterions for measurement the contrast of image. The multifocus image fusion using EOL is introduced in the spatial domain [7, 9]. But multi-focus image fusion methods based on DCT domain are more favorable and more useful for VSN and real-time applications. So in this article, we calculate the EOL and VOL in DCT domain using vector processing and they are used as a criterion for measure the contrast of the given image. The proposed methods increase the quality of the output image substantially. 1 0 0 0 𝑚= 0 0 0 (0 −1 −4 −1 0 𝑛= 0 0 0 (0 Two-dimensional DCT transform of N×N blocks of the image b(m, n) and its inverse DCT using vector processing are given as (1) and (2), respectively. (1) (2) b = C . B. C (3) −4 −20 −4 0 𝑒= 0 0 0 ( 0 and A. EOL Calculation In DCT Domain Energy of Laplacian (EOL) measures the image border sharpness and it's calculated by (4) in the spatial domain [9]. EOL = ∑ ∑(bxx + byy ) x 2 -4 +20 -4 -1 -4 -1 (4) y where 729 0 1 0 0 0 0 0 0 0 −1 −4 −1 0 0 0 0 0 0 0 0 𝑑= 0 0 0 (0 where C and C t are orthogonal matrix consisted of the cosine coefficients and the transpose coefficients, respectively. B is the DCT coefficients for image's matrix of b. For C, we have: C −1 = C t -1 (6) We are defining m, n, d and e matrices as below: II. PROPOSED METHOD t -4 The 6×6 output matrix can be equivalent with the definition of four matrices which their multiplication on 8×8 block results in relation (5). This article is organized as follows: In section 2, the EOL and VOL calculations in DCT domain are introduced. The proposed methods are explained in section 3 and it is compared with the previous algorithms using different experiments in section 4. Finally conclusions are presented in section 5. B = C. b. C t -1 0 −4 −20 −4 0 0 0 0 1 0 1 0 0 0 0 0 0 0 −1 −4 −1 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 −4 −20 −4 0 0 0 0 1 0 1 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 −1 −4 −1 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 −1 −4 −1 0 0 0 0 1 0 0 0 0 0 0 0 −4 −20 −4 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 1 0 0)8×8 0 0 0 0 0 −1 −4 −1 0 0 0 0 1 0 0 0 0 0 0 0 −4 −20 −4 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)8×8 0 0 0 0 0 0 0 0)8×8 0 0 0 0 0 −4 −20 −4 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)8×8 q=m.b.n , p=d.b.e N−1 N−1 (7) 1 σ = 2 ∑ ∑ Laplacian2 (k, l) − μ2 N 2 Energy of Laplacian (4), as the sum of entry-wise products of the elements, can be rewritten by the trace of a product by (8). where μ is mean value of Laplacian of the block. 2 Haghighat et.al in [19] computed the variance of 8×8 block in DCT domain is as (20): EOL = ∑ ∑(bxx + byy ) = ∑ ∑(q + p)2 x y x y = trace((q + p)(q + p)t ) 7 (8) 7 σ 2 DCT = ∑ ∑ where m, n, d and e are matrices that result in (5). k=0 l=0 Defining: d2 (k, l) − d(0,0) 64 (20) where d(k, l) is the DCT representation of the block. P = C t . p. C , Q = C t . q. C t (9) t M = C . m. C , N = C . n. C (10) D = C t . d. C , E = C t . e. C (11) For calculate variance of image Laplacian directly in DCT domain we should replace d(k,l) in (20) with achieved LaplacianDCT in (15). Finally the variance of Laplacian (VOL) in DCT domain is obtained as (21): p and q can be defined as: t (19) k=0 l=0 t 7 t t q=C. Q. C = C. M. C . C. B. C . C. N. C = C. M. B. N. C t p=C. P. C t = C. D. C t . C. B. C t . C. E. C t = C. D. B. E. C t VOLDCT = ∑ ∑ (12) k=0 l=0 (13) (15) When b is a matrix of the block values and B is its DCT, we have: trace(b. bt ) = trace(B. B t ) (16) The region of the focused image has more information and high contrast. Subsequently this region has more raised and evident edges. The amount and intensity of edges in image is used as criterion to specify the image quality and contrast. Energy of Laplacian and variance of Laplacian are the appropriate measures to show the amount of edges in image. Therefore, the block of image which comes from focused area has higher EOL or VOL value than the block of the unfocused area. The proposed method divides the input images into 8×8 blocks. In next step, DCT coefficients of each block are calculated. The first input block and the second one are named as imA and imB, respectively. Then EOL or VOL value is computed for every block in DCT domain. Block with higher EOL or VOL value is represented as focused area and it is selected for the output fused image. The proposed algorithm makes a decision map X(i,j) as (22) by comparing the EOL or VOL value of the corresponding blocks. The EOL in DCT domain can be written as (17) using (8) and (16). EOLDCT = trace((Q + P)(Q + P)t ) = trace((Q + P)(Qt + P t )) (17) where P and Q, according to (9), are DCT of q and p, respectively. Finally, EOL in DCT domain for B (DCT representation of 8×8 block) is calculated by combining (14) and (17): EOLDCT = trace((M. B. N + D. B. E) × ((M. B. N)t + (M. B. N)t ) (21) C. Block Selection For a simple description of the proposed algorithm, two images A and B are considered. The proposed image fusion process could be extended for more than two images. It is assumed the input images were aligned by an image registration method before performing the image fusion process. The general structure of the proposed method for two images fusion is shown in Fig.1. (14) In other word, the Laplacian of block in DCT domain is computed as (15): LaplacianDCT = Q + P LaplacianDCT (k, l) 64 −LaplacianDCT (0,0) From (8), (9), (10) and (11) we can find Q and P in DCT domain as (14): Q=M.B.N , P=D.B.E 7 (18) B. VOL Calculation In DCT Domain Variance of Laplacian (VOL) of image is calculated in spatial domain as (19): X(i, j) = 1 if (EOL or VOL)DCT (imA) > (EOL or VOL)DCT (imB) {−1 if (EOL or VOL)DCT (imA) < (EOL or VOL)DCT (imB) 0 otherwise (22) 730 Fig. 1. General structure of proposed method. For X(i, j) = 1, the block of imA is selected for output fused image. Subsequently for X(i, j) = −1, the block of imB is selected. of image fusion are used. The structural similarity (SSIM) [28] D. Consistency Verification (CV) Suppose the central block of an area among selected blocks for fused image comes from image B, but the majority of neighboring blocks comes from image A. It means that the central block should belong to image A. Li et al. used the majority filter for consistency verification [17]. The central block replaced by the corresponding block from image A using a majority filter which is applied on decision map M(m,n). Therefore the consistency verification (CV) is applied as a post-processing after image fusion process to improve the quality of the output image and reduce the error due to unsuitable block selection. Fig. 2. Standard test images used for simulation and Mean-squared error (MSE) [29] are used as metrics that needs the ground truth image for the referenced images. The total information transferred from source images to the fused image (QAB/F ), the total loss of information (LAB/F), noise or artifacts added in fused image due to fusion process (NAB/F) which provided by Petrovic [30], and feature mutual information (FMI) [31] are used for the non-reference images which their ground truth image is not available. III. EXPERIMENTAL RESULTS AND ANALYSIS This section discusses the performance of the proposed method and exhibits the results of simulation for the proposed method and also the other methods for comparison. The results of simulation for the proposed method compared with the results of the previous methods such as the methods which are based on multi-scale transform like DWT [17] and SIDWT [18], and the methods based on DCT domain like DCT+Average [21], DCT+Variance [19], DCT+ AC_Max [23] and DCT+SF [24]. The used test images in simulations shown in Fig.2 obtained from the online database [25] as the referenced images. Also the famous non-referenced multifocus image “Disk” is used for second experiment obtained from the online database [26]. The DCT+Variance algorithm code of MATLAB simulation is taken from the online database [27]. For the wavelet based methods, DWT with DBSS (2,2) and the SIDWT for Haar basis with three levels of decomposition are considered. Simulations of these methods are done by “Image Fusion Toolbox” [26]. All of the DCT+Average, DCT+ AC_Max and DCT+SF methods are simulated by the authors in MATLAB. For the majority filter used in CV, an averaging mask of size 5×5 is considered for all experiments. The first experiment conducted for applying the proposed methods and the other methods on 12 pairs of artificial multifocus images generated from six images depicted in Fig.2. The non-focused conditions of each pairs produced by artificial blurring using two averaging masks of size 5×5 and 9×9. Blurring process is performed on right or left half of the images. The average values of SSIM and MSE for the proposed and the other algorithms are listed in TABLE I. Our proposed method shows the best results among the other methods. The second experiments conducted for assessment of the proposed algorithm and the others on real multi-focus image (“Disk”) which it was captured with different depth of focuses in camera. Evaluation performance metrics QAB/F, LAB/F, NAB/F and FMI values are showed in TABLE II. Fig.3 depicts the proposed method result image, the other methods result images and their local magnified version of “Disk” source image. Thus in the non-referenced image, the proposed method also has better results and quality. For assessment of the proposed algorithm and comparing it with the previous algorithms, evaluation performance metrics 731 THE MSE AND SSIM COMPARISION OF THE VARIOUS IMAGE FUSION APPROACHES ON REFERENCE IMAGES. Method Average values for 12 pairs image created from image shown in Fig.2 IV. CONCLUSION Two new multi-focus image fusion methods in DCT domain based on energy of Laplacian (EOL) and variance of Laplacian (VOL) were introduced in this paper. We calculate EOL and VOL directly in DCT domain using vector processing. Considering EOL and VOL as a measurement of image contrast in multi-focus image fusion process caused better results compared with the previous works. Also due to simple implementation of the proposed algorithms in DCT domain, it is appropriate for using in real-time applications. Accuracy of the proposed methods is assessed by applying the proposed algorithms and the others on the several referenced images and one non-referenced image by evaluating the results with the various performance metrics. The results show superiority of the output image quality for the proposed algorithms comparison to some precious algorithms. SSIM MSE DCT+Average [22] 0.8983 68.9065 DWT [17] 0.9542 20.5945 SIDWT [18] 0.9563 17.3855 DCT+Variance[19] 0.9683 19.2826 DCT+AC-Max [23] 0.9894 5.1054 DCT+SF [24] 0.9870 6.9794 DCT+EOL (proposed) 0.9944 2.2789 DCT+VOL (proposed) 0.9950 1.8950 DCT+Variance+CV [19] 0.9895 10.4003 REFERENCES DCT+AC-Max+CV [23] 0.9965 1.7855 DCT+SF+CV [24] 0.9958 2.8608 DCT+ EOL +CV (proposed) 0.9972 1.0205 DCT+ VOL +CV (proposed) 0.9971 0.9297 [1] B.K.S. Kumar, M..N.S Swamy, and M. O. Ahmad, “Multiresolution DCT decomposition for multifocus image fusion,” in 2013 26th Annual IEEE Canadian Conference on Electrical and Computer Engineering (CCECE), Regina, pp. 1-4, 2013. [2] M. B. A. Haghighat, A. Aghagolzadeh, and H. Seyedarabi, “Real-time fusion of multi-focus images for visual sensor networks,” in 2010 6th Iranian Machine Vision and Image Processing (MVIP), Isfahan, pp. 1-6, 2010. [3] F. Castanedo, J. García, M. Patricio, and J. M. Molina, “Analysis of distributed fusion alternatives in coordinated vision agents,” 2008 11th International Conference on Information Fusion, Cologne, pp. 1-6 , 2008. [4] S. Li, and B. Yang, “Multifocus Image Fusion Using Region Segmentation and Spatial Frequency,” Image and Vision Computing, vol. 26, no. 7, pp. 971 – 979, 2 July 2008. [5] S. Mahajan and A. Singh, “A Comparative Analysis of Different Image Fusion Techniques,” IPASJ International Journal of Computer Science (IIJCS), vol. 2, no. 1, pp. 634-642, 2014. [6] S. Pertuz, D. Puig, and M. A. Garcia, “Analysis of focus measure operators for shape-from-focus,” Pattern Recognition, vol. 46, no. 5, pp. 1415-1432, 2013. [7] W. Hongmei, N. Cong, L. Yanjun, and C. Lihua, “A Novel Fusion Algorithm for Multi-focus Image,” In Applied Informatics and Communication, vol. 227, pp. 641-647, 2011. [8] P. Kaur and M. Kaur, “A Comparative Study of Various Digital Image Fusion Techniques: A Review,” International Journal of Computer Applications, vol.114, no. 4, 2015. [9] W. Huang and Z. Jing, “Evaluation of focus measures in multi-focus image fusion,” Pattern Recognition Letters, vol. 28, no. 4, pp. 493-500, 2007. [10] S. Pertuz, D. Puig, and M. A. Garcia, “Analysis of focus measure operators for shape-from-focus,” Pattern Recognition, vol. 46, no. 5, pp. 1415-1432, 2013. [11] H. Zhao, Q. Li and H. Feng, “Multi-focus color image fusion in the HSI space using the sum-modified-laplacian and a coarse edge map,” Image and Vision Computing, vol. 26, no. 9, pp. 1285-1295, 2008. [12] V. Kazemi, H. Seyedarabi, and A. Aghagolzadeh. “Multifocus image fusion based on compressive sensing for visual sensor networks.” 22nd Iranian Conference on Electrical Engineering (ICEE), 2014. [13] Z. Zhang and R. S. Blum, “A categorization of multiscaledecomposition-based image fusion schemes with a performance study for a digital camera application,” Proceedings of the IEEE, vol. 87, no. 8, pp. 1315-1326, 1999. THE QAB/F, LAB/F, NAB/F AND FMI COMPARISION OF THE VARIOUS IMAGE FUSION APPROACHES ON NON-REFERENCED IMAGES. “DISK” Method QAB/F LAB/F NAB/F FMI DCT+Average [22] 0.5187 0.4782 0.0063 0.9013 DWT [17] 0.6302 0.2552 0.3362 0.9039 SIDWT [18] 0.6694 0.2764 0.1564 0.9049 DCT+Variance[19] 0.7165 0.2612 0.0478 0.9070 DCT+AC-Max [23] 0.6763 0.2910 0.0696 0.9057 DCT+SF [24] 0.7213 0.2600 0.0415 0.9086 DCT+EOL (proposed) 0.7271 0.2522 0.0444 0.9093 DCT+VOL (proposed) 0.7272 0.2521 0.0444 0.9094 DCT+Variance+CV [19] 0.7192 0.2734 0.0163 0.9100 DCT+AC-Max+CV [23] 0.6990 0.2922 0.0186 0.9102 DCT+SF+CV [24] 0.7269 0.2662 0.0153 0.9106 DCT+ EOL +CV (proposed) 0.7291 0.2664 0.0096 0.9109 DCT+ VOL +CV (proposed) 0.7288 0.2666 0.0097 0.9108 732 [14] H. Eltoukhy, S. Kavusi, “A computationally efficient algorithm for multi-focus image reconstruction,” in Proceedings of SPIE Electronic Imaging, vol. 5017, pp. 332–341, 2003. [15] P. J. Burt, and E. H. Adelson. “The Laplacian pyramid as a compact image code,” IEEE Transactions on Communications, vol. 31, no. 4, pp. 532-540, 1983. [16] V. Petrovic and C. Xydeas, “Gradient-Based Multiresolution Image Fusion,” IEEE Transactions on Image Processing, vol. 13, no. 2, pp. 228-237, 2004. [17] H. Li, B. Manjunath and S. Mitra, “Multisensor Image Fusion Using the Wavelet Transform,” Graphical Models and Image Processing, vol. 57, no. 3, pp. 235-245, 1995. [18] O. Rockinger, “Image sequence fusion using a shift-invariant wavelet transform,” in Proceedings of IEEE International Conference on Image Processing, vol. 3, Santa Barbara, pp. 288-291, 1997. [19] M. Haghighat, A. Aghagolzadeh and H. Seyedarabi, “Multi-focus image fusion for visual sensor networks in DCT domain,” Computers & Electrical Engineering, vol. 37, no. 5, pp. 789-797, 2011. [20] M. A. Naji and A. Aghagolzadeh, “Multi-focus image fusion in DCT domain based on correlation coefficient,” in 2015 2nd International Conference on Knowledge-Based Engineering and Innovation (KBEI), 2015, pp. 632-639. [21] M. A. Naji and A. Aghagolzadeh, “A new multi-focus image fusion technique based on variance in DCT domain,” in 2015 2nd International Conference on Knowledge-Based Engineering and Innovation (KBEI), 2015, pp. 478-484. [22] J. Tang, “A contrast based image fusion technique in the DCT domain,” Digital Signal Processing, vol. 14, no. 3, pp. 218-226, 2004. [23] Y. Phamila and R. Amutha, “Discrete Cosine Transform based fusion of multi-focus images for visual sensor networks,” Signal Processing, vol. 95, pp. 161-170, 2014. [24] L. Cao, L. Jin, H. Tao, G. Li, Z. Zhuang and Y. Zhang, “Multi-Focus Image Fusion Based on Spatial Frequency in Discrete Cosine Transform Domain,” IEEE Signal Processing Letters, vol. 22, no. 2, pp. 220-224, 2015. [25] [Online].Available: [26] [27] [28] [29] [30] [31] http://www.imageprocessingplace.com/root_files_V3/image_databases.h tm. [Accessed: Dec- 2015]. [Online]. Available: http://www.metapix.de/toolbox.htm. [Accessed: Dec - 2015]. [Online].Available: https://www.mathworks.com/matlabcentral/fileexchange/59499-multifocus-image-fusion-in-dct-domain. [Accessed: Dec - 2015]. Z. Wang, A. C. Bovik, H. R. Sheikh, and E. P. Simoncelli, “Image quality assessment: from error visibility to structural similarity,” IEEE Transactions on Image Processing, vol. 13, no.4, pp. 600-612, 2004. Zhou Wang and A. Bovik, “Mean squared error: Love it or leave it? A new look at Signal Fidelity Measures”, IEEE Signal Processing Magazine, vol. 26, no. 1, pp. 98-117, 2009. V. Petrović and C. Xydeas, “Objective image fusion performance characterisation,” in 2009 Tenth IEEE International Conference on Computer Vision (ICCV), Beijing, 2005, pp. 1866-1871. M. Haghighat, A. Aghagolzadeh and H. Seyedarabi, “A non-reference image fusion metric based on mutual information of image features,” Computers & Electrical Engineering, vol. 37, no. 5, pp. 744-756, 2011. Fig. 3. Source images ‘‘DISK” and the fusion results. (a) The first source image with focus on the right. (b) The second source image with focus on the left. (c) DCT + Average result. (d) DWT result. (e) SIDWT result. (f) DCT + Variance result. (g) DCT + Ac-Max result. (h) DCT + Spatial frequency result. (i) The result of DCT + EOL (Proposed). (j) )The result of DCT + VOL (Proposed). (k), (l), (m), (n), (o), (p), (q) and (r) are the local magnified version of (c), (d), (e), (f), (g), (h), (i) and (j), respectively. 733
1cs.CV
FedCSIS 2017, IEEE, ISSN 2300-5963 doi 10.15439/978-83-946253-7 pp.537-541 Least Square Method Robustness of Computations What is not usually considered and taught Vaclav Skala Department of Computer Science and Engineering Faculty of Applied Sciences, University of West Bohemia CZ 306 14 Plzen, Czech Republic http://www.VaclavSkala.eu Abstract — There are many practical applications based on the Least Square Error (LSE) approximation. It is based on a square error minimization “on a vertical” axis. The LSE method is simple and easy also for analytical purposes. However, if data span is large over several magnitudes or non-linear LSE is used, severe numerical instability can be expected. The presented contribution describes a simple method for large span of data LSE computation. It is especially convenient if large span of data are to be processed, when the “standard” pseudoinverse matrix is ill conditioned. It is actually based on a LSE solution using orthogonal basis vectors instead of orthonormal basis vectors. The presented approach has been used for a linear regression as well as for approximation using radial basis functions. Keywords—Least square error; approximation regression; radial basis function; approximation; condition number; linear algebra; geometric algebra; projective geometry. from the given points in this space. This algorithm is quite complex and solution can be found in [18]. It should be noted, that all methods above do have one significant drawback as values are taken in a squared value. This results to an artifact that small values do not have relevant influence to the final entity as the high values. Some methods are trying to overcome this by setting weights to each measured data [3]. It should be noted that the TLSE was originally derived by Pearson [16](1901). Deep comprehensive analysis can be found in [8][13][21][22]. Differences between the LSE a TLSE methods approaches are significant, see Fig.1. y y x x I. INTRODUCTION Wide range of applications is based on approximation of acquired data and the LSE minimization is used, known also as a linear or polynomial regression. The regression methods have been heavily explored in signal processing and geometrical problems or with statistically oriented problems. They are used across many engineering fields dealing with acquired data processing. Several studies have been published and they can be classified as follows:  “standard” Least Square Error (LSE) methods fitting data to a function 𝑦 = 𝑓(𝒙) , where 𝒙 is an independent variable and 𝑦 is a measured or given value,  “orthogonal” Total Least Square Error (TLSE) fitting data to a function 𝐹(𝒙) = 0 , i.e. fitting data to some 𝑑 − 1dimensional entity in this 𝑑-dimensional space, e.g. a line in the 𝐸 2 space or a plane in the 𝐸 3 space [1][6][8][21][22],  “orthogonally Mapping” Total Least Square Error (MTLSE) methods for fitting data to a given entity in a subspace of the given space. However, this problem is much more complicated. As an example, we can consider data given in and we need to find an optimal line in 𝐸 𝑑 , i.e. one dimensional entity, in this 𝑑-dimensional space fitting optimally the given data. Typical problem: Find a line in the 𝐸 𝑑 space that has the minimum orthogonal distance Research was supported by the and National Science Foundations (GACR) project No. 17-05534S. Fig. 1.a: Least Square Error Fig.1.b: Total Least Square Error In the vast majority the Least Square Error (LSE) methods measuring vertical distances are used. This approach is acceptable in the case of explicit functional dependences 𝑓(𝑥, 𝑦) = ℎ, resp. 𝑓(𝑥, 𝑦, 𝑧) = ℎ. However, it should be noted that a user should keep in a mind, that smaller differences than 1.0, will have significantly smaller weight than higher differences than 1.0 as the differences are taken in a square resulting to dependences in scaling of data approximated, i.e. the result will depend on physical units used, etc. The main advantage of the LSE method is that it is simple for fitting polynomial curves and it is easy to implement. The standard LSE method leads to over determined system of linear equations. This approach is also known as polynomial regression. Let us consider a data set Ω = {〈𝑥𝑖 , 𝑦𝑖 , 𝑓𝑖 〉}𝑛𝑖=1 , i.e. data set containing for 𝑥𝑖 ,𝑦𝑖 and measured functional value 𝑓𝑖 , and we want to find parameters 𝒂 = [𝑎, 𝑏, 𝑐, 𝑑]𝑇 for optimal fitting function, as an example: 𝑓(𝑥, 𝑦, 𝒂) = 𝑎 + 𝑏𝑥 + 𝑐𝑦 + 𝑑𝑥𝑦 Minimizing the vertical squared distance 𝐷, i.e.: (1) FedCSIS 2017, IEEE, ISSN 2300-5963 doi 10.15439/978-83-946253-7 𝑛 where 𝒃 = (𝑏1 , … , 𝑏𝑛 ), 𝝃 = (𝜉1 , … , 𝜉𝑚 ) and 𝑚 is a number of parameters, 𝑚 < 𝑛. 2 𝐷 = min ∑(𝑓𝑖 − 𝑓(𝑥𝑖 , 𝑦𝑖 , 𝒂)) = 𝑎,𝑏,𝑐,𝑑 (2) 𝑖=1 𝑛 𝑚𝑖𝑛 ∑(𝑓𝑖 − (𝑎 + 𝑏𝑥𝑖 + 𝑐𝑦𝑖 + 𝑑𝑥𝑖 𝑦𝑖 )) 𝑎,𝑏,𝑐,𝑑 2 𝑖=1 Conditions for an extreme are given as: 𝜕𝑓(𝑥, 𝑦, 𝒂) (3) = [1, 𝑥, 𝑦, 𝑥𝑦]𝑇 𝜕𝒂 Applying this on the expression of 𝐷 we obtain 𝑛 𝜕𝐷 𝜕𝑓(𝑥, 𝑦, 𝒂) ∑(𝑓𝑖 − (𝑎 + 𝑏𝑥𝑖 + 𝑐𝑦𝑖 + 𝑑𝑥𝑖 𝑦𝑖 )) = 0 (4) 𝜕𝒂 𝜕𝒂 𝑖=1 It leads to conditions for 𝒂 = (𝑎, 𝑏, 𝑐, 𝑑) parameteters in the form of a linear system of equations 𝑨𝒙 = 𝒃: 𝑨= 𝑛 𝑛 𝑛 ∑ 𝑖=1 𝑛 ∑ 𝑖=1 𝑛 𝑛 𝑛 ∑ 𝑥𝑖 ∑ 𝑦𝑖 ∑ 𝑥𝑖 𝑦𝑖 𝑥𝑖 ∑ 𝑥𝑖2 ∑ 𝑥𝑖 𝑦𝑖 ∑ 𝑥𝑖2 𝑦𝑖 𝑦𝑖 ∑ 𝑥𝑖 𝑦𝑖 ∑ 𝑦𝑖2 ∑ 𝑥𝑖 𝑦𝑖2 ∑ 𝑥𝑖2 𝑦𝑖 ∑ 𝑥𝑖 𝑦𝑖2 ∑ 𝑥𝑖2 𝑦𝑖2 𝑖=1 𝑛 𝑖=1 𝑛 𝑖=1 𝑛 ∑ 𝑥𝑦 [ 𝑖=1 𝑖 𝑖 𝑛 𝒃 = [∑ 𝑖=1 𝑖=1 𝑛 𝑖=1 𝑛 𝑖=1 𝑛 𝑖=1 𝑖=1 𝑛 𝑛 𝑓𝑖 , ∑ 𝑖=1 𝑛 𝑓𝑖 𝑥𝑖 , ∑ 𝑖=1 𝑖=1 (5) 𝑖=1 𝑛 𝑖=1 𝑛 𝑓𝑖 𝑦𝑖 , ∑ 𝑖=1 ] 𝑻 𝑓𝑖 𝑥𝑖 𝑦𝑖 ] The selection of bilinear form was used to show the LSE method application to a non-linear case, if the case of a linear function, i.e. 𝑓(𝑥, 𝑦, 𝒂) = 𝑎 + 𝑏𝑥 + 𝑐𝑦, the 4th row and column are to be removed. Note that the matrix 𝑨 is symmetric and the function 𝑓(𝒙) might be more complex, in general. Several methods for LSE have been derived [4][5][10], however those methods are sensitive to the vector 𝒂 orientation and not robust in general as a value of ∑𝑛𝑖=1 𝑥𝑖2 𝑦𝑖2 might be too high in comparison with the value 𝑛, which has an influence to robustness of a numerical solution. In addition, the LSE methods are sensitive to a rotation as they measure vertical distances. It should be noted, that rotational and translation invariances are fundamental requirements especially in geometrically oriented applications. The LSE method is usually used for a small size of data and span of a domain is relatively small. However, in some applications the domain span can easily be over several decades, e.g. in the case of Radial Basis Functions (RBF) approximation for GIS applications etc. In this case, the overdetermined system can be difficult to solve. II. NUMERICAL STABILITY Let us explore a simple example, when many points 𝒙𝑖 ∈ 𝐸 2 , i.e. 𝒙𝑖 = (𝑥𝑖 , 𝑦𝑖 ) , are given with relevant associated values 𝑏𝑖 , 𝑖 = 1, … , 𝑛. Expected functional dependency can be expressed (for a simplicity) as 𝑦 = 𝑎1 + 𝑎2 𝑥 + 𝑎3 𝑦. The LSE leads to an overdetermined system of equations 𝑨𝑇 𝑨 𝝃 = 𝑨𝑇 𝒃 If the values 𝑥𝑖 , 𝑦𝑖 over a large span, e.g. 𝑥𝑖 , 𝑦𝑖 ∈ 〈100 , 105 〉, the matrix 𝑨𝑇 𝑨 is extremely ill conditioned. This means that the reliability of a solution depends on the distribution of points in the domain. Situation gets worst when a non-linear polynomial regression is to be used and dimensionality of the domain is higher. As an example, let us consider a simple case, when points form regular orthogonal mesh and values are generated using 𝑅5 distribution scheme (equidistant in a logarithmic scale) as (𝑥𝑖 , 𝑦𝑖 ) ∈ 〈10, 105 〉 × 〈10, 105 〉. It can be easily found using MATLAB that conditional number 𝑐𝑜𝑛𝑑(𝑨𝑇 𝑨) ≅ 1011 . In the following, we will show how the condition number might be decreased significantly using orthogonal basis vectors instead of the orthonormal ones. III. 𝑖=1 𝑛 𝒙 = [𝑎, 𝑏, 𝑐 , 𝑑 ]𝑻 pp.537-541 (6) PROJECTIVE NOTATION AND GEOMETRY ALGEBRA The LSE approximation is based on a solution of a linear system of equations, i.e. 𝑨𝒙 = 𝒃. Usually the Euclidean representation is used. However if the projective space representation is used [19] , it is transformed into homogeneous linear system of equations, i.e. 𝑩𝜻 = 𝟎. Rewriting the Eq.(6), we obtain (7) 𝑩𝜻 = 𝟎 where 𝑩 = [−𝑨𝑇 𝒃|𝑨𝑇 𝑨] (8) 𝜻 = (𝜁0 : 𝜁1 , … , 𝜁𝑚 ) 𝜁 and 𝜉𝑖 = 𝑖⁄𝜁 , 𝑖 = 1, … , 𝑚; 𝜁0 is the homogeneous coordinate 0 in the projective representation, matrix 𝑩 size is 𝑚 × (𝑚 + 1). Now, a system of homogeneous linear equations is to me solved. It can be shown that a system of homogeneous linear equations 𝑨𝒙 = 𝟎 is equivalent to the extended cross-product, actually outer-product [19][20]. In general, solutions of the both cases 𝑨𝒙 = 𝟎 and 𝑨𝒙 = 𝒃, i.e. homogeneous and nonhomogeneous system of linear equations, is the same and no division operation is needed as the extended cross-product (outer product) does not require any division operation at all. Applying this we get: (9) 𝜻 = (𝜁0 : 𝜁1 , … , 𝜁𝑚 ) = 𝜷1 ∧ 𝜷2 ∧ … ∧ 𝜷𝑚−1 ∧ 𝜷𝑚 where (10) 𝜷𝑖 = [−𝑏𝑖0 : 𝑏𝑖1 , … , 𝑏𝑖𝑚 ]𝑇 𝑖 = 1, … , 𝑚 The extended cross-product can be rewritten using determinant of (𝑚 + 1) × (𝑚 + 1) as 𝒆0 𝒆1 𝒆2 ⋯ 𝒆𝑚 −𝑏10 𝑏11 𝑏12 ⋯ 𝑏1𝑚 (11) 𝜻 = det [ ⋮ ⋮ ⋮ ⋱ ⋮ ] −𝑏𝑚0 𝑏𝑚1 𝑏𝑚2 ⋯ 𝑏𝑚𝑚 where 𝒆0 are orthonormal basis vectors in the 𝑚-dimensional space. As a determinant is a multilinear, we can multiply any 𝑗 column by a value 𝑞𝑗 ≠ 0 FedCSIS 2017, IEEE, ISSN 2300-5963 𝜻′ = 𝒆′0 −𝑏 ′ det [ 10 ⋮ ′ −𝑏𝑚0 where 𝒆1′ ′ 𝑏11 ⋮ ′ −𝑏𝑚1 𝒆′2 ′ 𝑏12 ⋮ ′ −𝑏𝑚2 𝒆𝑗 𝑞𝑗 ⋯ ⋯ ⋱ ⋯ doi 10.15439/978-83-946253-7 𝒆′𝑚 ′ 𝑏1𝑚 ⋮ ′ −𝑏𝑚𝑚 ] (12) pp.537-541 Using the approach presented above, the conditional number 𝑇 𝑨) ≅ 2. 106 . ̅̅̅̅̅̅ was decreased significantly to 𝑐𝑜𝑛𝑑(𝑨 𝑏∗𝑗 (13) 𝑞𝑗 where 𝒆𝑗′ are orthogonal basis vectors in the 𝑚-dimensional space. 𝒆𝑗′ = ′ 𝑏∗𝑗 = From the geometrical point of view, it is actually a “temporary” scaling on each axis including the units. Of course, a question remains – how to select the 𝑞𝑗 value. The 𝑞𝑗 is to be selected as 𝑞𝑗 = max {|𝑏𝑖𝑗 |} 𝑖=1,…,𝑚 (14) where 𝑗 = 1, … , 𝑚. Note that the matrix 𝑩 is indexed as (0, … , 𝑚) × (0, … , 𝑚). Fig.3: Conditionality of the modified matrix depending on number of data set size, i.e. number of points Comparing the condition numbers of the original and modified matrices, we can see significant improvement of matrix conditionality as 10 Applying this approach, we get a modified system ′ ) (15) 𝜻′ = (𝜁0′ : 𝜁1′ , … , 𝜁𝑚 = 𝜷1′ ∧ 𝜷′2 ∧ … ∧ 𝜷′𝑚−1 ∧ 𝜷′𝑚 where ′ ′ ′ 𝑇 ] (16) 𝜷′𝑖 = [−𝑏𝑖0 : 𝑏𝑖1 , … , 𝑏𝑖𝑚 ′ 𝑇 𝑨], i.e. ̅̅̅̅̅̅ ̅ ´ = [−𝑨𝑇 𝒃|𝑨 where 𝜷𝑖 are coefficients of the matrix 𝑩 modified matrix 𝑩 as described above, for the orthogonal (not orthonormal) vector basis. 𝑇 6.10 (19) 𝜐 = 𝑐𝑜𝑛𝑑(𝑨 𝑨)⁄ ≅ = 3.104 𝑇 ̅̅̅̅̅̅ 𝑐𝑜𝑛𝑑(𝑨 𝑨) 2.106 In the case of a little bit more complex function defined by Eq.(1), i.e. 𝑓(𝑥, 𝑦) = 𝑎 + 𝑏𝑥 + 𝑐𝑦 + 𝑑𝑥𝑦 we obtain The approximated 𝑓(𝑥, 𝑦) value is computed as 𝑓(𝑥, 𝑦) = 𝑎𝑞1 + 𝑏𝑞2 𝑥 + 𝑐𝑞3 𝑦 in the case of 𝑓(𝑥, 𝑦) = 𝑎 + 𝑏𝑥 + 𝑐𝑦, or (17) (18) 𝑓(𝑥, 𝑦) = 𝑎𝑞1 + 𝑏𝑞2 𝑥 + 𝑐𝑞3 𝑦 + 𝑑𝑞4 𝑥𝑦 in the case 𝑓(𝑥, 𝑦) = 𝑎 + 𝑏𝑥 + 𝑐𝑦 + 𝑑𝑥𝑦 and similarly for the general case of a regression function 𝑦 = 𝑓(𝒙, 𝒂). The above presented modification is simple. However, what is the influence of this operation? Fig.4: Conditionality of the original matrix depending on number of data set size, i.e. number of points IV. MATRIX CONDITIONALITY Let us consider a recent simple example again, when points are generated from (𝑥𝑖 , 𝑦𝑖 ) ∈ 〈10, 105 〉 × 〈10, 105 〉. It can be found that conditional number 𝑐𝑜𝑛𝑑(𝑨𝑇 𝑨) ≅ 6. 1010 using MATLAB, Fig.2, if 𝑓(𝑥, 𝑦) = 𝑎 + 𝑏𝑥 + 𝑐𝑦 is used for the LSE. Fig.5: Conditionality of the modified matrix depending on number of data set size, i.e. number of points In this case of the LSE defined by Eq.(1) the conditionality improvement is even higher, as 20 Fig.2: Conditionality histogram of the original matrix depending on number of data set size, i.e. number of points 𝑇 6.10 (20) 𝜐 = 𝑐𝑜𝑛𝑑(𝑨 𝑨)⁄ ≅ = 109 𝑇 ̅̅̅̅̅̅ 𝑐𝑜𝑛𝑑(𝑨 𝑨) 6.1011 It means that better numerical stability is obtained by a simple operation. All graphs clearly shows also dependency on a number of points used for the experiments (horizontal axis). FedCSIS 2017, IEEE, ISSN 2300-5963 doi 10.15439/978-83-946253-7 The geometric algebra brings also an interesting view on problems with numerical solutions. Let us consider vectors ̂ 𝜷𝑖 with coordinates of points, i.e. ̂ 𝑖 = [𝑏𝑖1 , … , 𝑏𝑖𝑚 ]𝑇 𝑖 = 1, … , 𝑚 (21) 𝜷 ̂𝑖 ∧ 𝜷 ̂𝑗 = 𝜸 ̂𝑖𝑗 defines a bivector, which is an oriented Then 𝜷 ̂𝑖𝑗 ‖ surface, given by two vectors in 𝑚-dimensional space and ‖𝜸 gives the area represented by the bivector ̂𝜸𝑖𝑗 . So, the proposed approach of introducing orthogonal basis functions instead of the orthonormal ones, enable us to “eliminate” influence of “small” bivectors in the original LSE computation and increase precision of numerical computation. Of course, if the regression is to be applied, the influence of the 𝑞𝑗 values must be applied. By the presented approach we actually got values 𝜁𝑖′ using the orthogonal basis vectors instead of orthonormal. It means, that the estimated value by a regression, using recent simple example, is (22) 𝑓(𝑥, 𝑦) = 𝑞1 𝑎1 + 𝑞2 𝑎2 𝑥 + 𝑞3 𝑎3 𝑦 In the case of the least square approximation, we want to minimize using a polynomial of degree 𝑛. min ‖𝑓(𝑥) − 𝑃𝑛 (𝑥)‖ 𝑘 (23) 𝑃𝑛 (𝑥) = ∑ 𝑎𝑖 𝑥 𝑖 𝑖=0 The 𝐿2 norme of a function 𝑓(𝑥) an an interval 〈𝑎, 𝑏〉 is defined 2 𝑏 ‖𝑓(𝑥)‖ = √(∫ 𝑓(𝑥)𝑑𝑥 ) 𝑏 𝑏 ∑ 𝑎𝑖 ∫ 𝑥 𝑖+𝑘 𝑑𝑥 = ∫ 𝑥 𝑘 𝑓(𝑥)𝑑𝑥 𝑖=0 𝑎 (29) 𝑎 where 𝑘 = 1, … , 𝑛. It means that the LSE problem is the polynomial (what has been expected) 𝑘 𝑃𝑛 (𝑥) = ∑ 𝑎𝑖 𝑥 𝑖 (30) 𝑖=0 However, there is a direct connection with well known Hilbert’s matrix. It can be shown that elements of the Hilbert’s matrix (𝐻𝑛+1 (𝑎, 𝑏))𝑖,𝑘 of the size (𝑛 + 1) × (𝑛 + 1) are equivalent to 𝑏 1 (31) (𝐻𝑛+1 (𝑎, 𝑏))𝑖,𝑘 = ∫ 𝑥 𝑖+𝑘 𝑑𝑥 = 1+𝑖+𝑘 𝑎 If interval 〈𝑎, 𝑏〉 = 〈0,1〉 is used, standard Hilbert’s matrix 𝑯𝑛 (0,1) is obtained, which is extremely ill-conditioned. VI. HILBERT’S MATRIX CONDITIONALITY V. LEAST SQUARE METHOD WITH POLYNOMIALS 𝑃𝑛 (𝑥) pp.537-541 𝑛 (24) We should answer a question, how the conditional number of the Hilbert’s matrix can be improved if orthogonal basis is used instead of orthonormal one as an experimental test. A simple experiment can prove that the proposed method does not practically change the conditionality of the Hilbert’s matrix 𝑯𝑛 (0,1). However, as the LSE approximation is to be used for large span of data, it is reasonable to consider a general case and explore conditionality of the 𝑯𝑛 (𝑎, 𝑏) matrix, e.g. 𝑯5 (0, 𝑏), for demonstration. 𝑎 Minimizing square of the distance of a function of 𝑘 + 1 parameters 𝜑(𝒂) = 𝜑(𝑎0 , … , 𝑎𝑛 ) and using “per-partes” rule, we obtain 𝑏 𝜑(𝒂) = ∫ [𝑓(𝑥) − 𝑃𝑛 (𝑥)]2 𝑑𝑥 𝑎 𝑏 =∫ [𝑓(𝑥)]2 𝑎 𝑛 𝑏 𝑑𝑥 − 2 ∑ 𝑎𝑖 ∫ 𝑥𝑖 𝑓(𝑥)𝑑𝑥 𝑖=0 𝑛 𝑛 𝑎 (25) Fig.6: Conditionality of the 𝑯5 (0, 𝑏) for different values of 𝑏 using MATLAB (numerical problems can be seen for 𝑏 > 650) 𝑏 + ∑ ∑ 𝑎𝑖 𝑎𝑗 ∫ 𝑥 𝑖+𝑗 𝑑𝑥 𝑎 𝑖=0 𝑗=0 For a minimum a vector condition 𝜕𝜑(𝒂) =𝟎 𝜕𝒂 must be valid. It leads to conditions 𝑛 𝑏 𝑏 𝜕𝜑(𝒂) 𝑘 = 0 − 2 ∫ 𝑥 𝑓(𝑥)𝑑𝑥 + ∑ 𝑎𝑖 ∫ 𝑥 𝑖+𝑘 𝑑𝑥 𝜕𝑎𝑘 𝑎 𝑎 𝑖=0 𝑛 𝑏 + ∑ 𝑎𝑗 ∫ 𝑥 𝑗+𝑘 (26) (27) 𝑑𝑥 Fig.7: Conditionality of the 𝑯5 (0, 𝑏) for different values of 𝑏 using logarithmic scaling for vertical axis 𝑎 𝑖=0 and by simple algebraic manipulations we obtain: 𝑏 𝑛 𝑘 𝑏 2 [− ∫ 𝑥 𝑓(𝑥)𝑑𝑥 + ∑ 𝑎𝑖 ∫ 𝑥 𝑎 and therefore 𝑖=0 𝑎 𝑖+𝑘 𝑑𝑥 ] = 0 (28) It can be seen, that 𝑐𝑜𝑛𝑑(𝑯5 (0,800)) = 6. 1023 . If the 14 ̅̅̅̅̅̅̅̅̅̅̅̅̅̅ proposed approach is applied 𝑐𝑜𝑛𝑑(𝑯 5 (0,800)) = 2,5. 10 for the modified matrix, Fig.8 - Fig.9. FedCSIS 2017, IEEE, ISSN 2300-5963 doi 10.15439/978-83-946253-7 pp.537-541 VII. CONCLUSIONS The proposed method of application orthogonal vector basis instead of the orthonormal one decreases conditional number of a matrix used in the least square method. This approach increases robustness of a numerical solution especially when domain data range is high. It can be used also for solving systems of linear equations in general, e.g. if radial basis function interpolation or approximation is used. ACKNOWLEDGMENT Fig.8: Conditionality of the modified 𝑯5 (0, 𝑏) The author would like to thank to colleagues at the University of West Bohemia in Plzen for fruitful discussions and to anonymous reviewers for their comments and hints, which helped to improve the manuscript significantly. Special thanks belong to Zuzana Majdišová and Michal Šmolík for independent experiments, images and generation in MATLAB. REFERENCES Fig.9: Conditionality of the modified 𝑯5 (0, 𝑏) using logarithmic scaling for vertical axis It means that the conditionality improvement 𝑐𝑜𝑛𝑑(𝑯5 (0,800)) 6.1023 𝜐= ≅ ≈ 109 (32) ̅̅̅̅̅̅̅̅̅̅̅̅̅̅ 2,5.1014 𝑐𝑜𝑛𝑑(𝑯 5 (0,800)) This is a similar ratio as for the simple recent examples. A change of the size of bivectors ‖𝜷𝑖 ∧ 𝜷𝑗 ‖ can be used as a practical result using RBF approximation, which changes from the interval 〈𝑒𝑝𝑠, 1010 〉 to 〈𝑒𝑝𝑠, 8. 102 〉, which significantly increases robustness of the RBF approximation, Fig.10. Fig.10: Bivector histogram sizes for original LSE matrix and modified one The proposed approach has been used for St.Helen’s volcano approximation by 10 000 points instead of 6 743 176 original points, see Fig.11. Fig.11: LSE approximation error with RBF approximation of St.Helen’s (image generated in MATLAB by Michal Smolik) [1] Abatzoglou,T., Mendel,J. 1987. Constrained total least squares, IEEE Conf. Acoust., Speech, Signal Process. (ICASSP’87), Vol. 12, 1485–1488. [2] Alciatore,D., Miranda,R. 1995. The best least-square line fit, Graphics Gems V (Ed.Paeth,A.W.), 91-97, Academic Press. [3] Amiri-Simkooei,A.R.,Jazaeri,S. 2012.Weighted total least squares formulated by standard least squares theory,J.Geodetic Sci.,2(2):113-124. [4] Charpa,S., Canale,R. 1988. Numerical methods for Engineers, McGrawHill. [5] Chatfield,C. 1970. Statistics for technology, Penguin Book. [6] de Groen,P. 1996 An introduction to total least squares, Nieuw Archief voor Wiskunde,Vierde serie, deel 14, 237–253 [7] DeGroat,R.D., Dowling,E.M. 1993 The data least squares problem and channel equalization. IEEE Trans. Signal Processing, Vol. 41(1), 407–411. [8] Golub,G.H., Van Loan,C.F. 1980. An analysis of the total least squares problem. SIAM J. on Numer. Anal., 17, 883–893. [9] Jo,S., Kim,S.W. 2005. Consistent normalized least mean square filtering with noisy data matrix. IEEE Trans. Signal Proc.,Vol. 53(6), 2112–2123. [10] Kryszig,V. 1983. Advanced engineering mathematics, John Wiley & Sons. [11] Lee,S.L. 1994. A note on the total least square fit to coplanar points, Tech.Rep. ORNL-TM-12852, Oak Ridge National Laboratory. [12] Levy,D., 2010. Introduction to Numerical Analysis, Univ.of Maryland [13] Nievergelt,Y. 1994. Total least squares: State of the Art regression in numerical mathematics, SIAM Review, Vol.36, 258-264 [14] Nixon,M.S., Aguado,A.S. 2012. Feature extraction & image processing for computer vision, Academic Press. [15] Markowsky,I., VanHueffel,S., 2007. Overview of total least square methods, Signal Processing, 87 (10), 2283-2302. [16] Pearson,K., 1901. On line and planes of closest fit to system of points in space, Phil.Mag., Vol.2, 559-572 [17] Skala,V., 2016.Total Least Square Error Computation in E2: A New Simple, Fast and Robust Algorithm, CGI 2016 Proc., ACM, pp.1-4, Greece [18] Skala,V., 2016. A new formulation for total Least Square Error method in d-dimensional space with mapping to a parametric line, ICNAAM 2015, AIP Conf. Proc.1738, pp.480106-1 - 480106-4, Greece [19] Skala,V., 2017. Least Square Error method approximation and extended cross product using projective representation, ICNAAM 2016 conf., to appear in ICNAAM 2016 proceedings, AIP Press [20] Skala,V., 2008. Barycentric Coordinates Computation in Homogeneous Coordinates, Computers & Graphics, Elsevier, , Vol.32, No.1, pp.120-127 [21] Van Huffel,S., Vandewalle,J 1991. The total least squares problems: computational aspects and analysis. SIAM Publications, Philadelphia PA. [22] van Huffel,S., Lemmerling,P. 2002. Total least squares and errors-invariables modeling: Analysis, algorithms and applications. Dordrecht, The Netherlands: Kluwer Academic Publishers [23] Perpendicular regression of a line (download 2015-12-20) http://www.mathpages.com/home/kmath110.htm [24] Skala,V., 2017. RBF Interpolation with CSRBF of Large Data Sets, ICCS 2017, Procedia Computer Science, Vol.108, pp. 2433-2437, Elsevier [25] Skala,V., 2017. High Dimensional and Large Span Data Least Square Error: Numerical Stability and Conditionality, accepted to ICPAM 2017
1cs.CV
Distance Labelings on Random Power Law Graphs Huacheng Yu1 and Hongyang Zhang2 1 arXiv:1712.08709v1 [cs.SI] 23 Dec 2017 2 Harvard University Department of Computer Science, Stanford University, CA, USA Abstract A Distance Labeling scheme is a data structure that can answer shortest path queries on a graph. Experiment results from several recent studies (Akiba et al.’13, Delling et al.’14) found very efficient and very accurate labeling schemes, which scale to social and information networks with tens of millions of vertices and edges. Such a finding is not expected in the worst case, since even for graphs with maximum degree 3, it is known that any distance labeling requires Ω(n3/2 ) space (Gavoille et al.’03). On the other hand, social and information networks have a heavy-tailed degree distribution and small average distance, which are not captured in the worst case. In this paper, we fill in the gap between empirical and worst case results. We consider distance labeling schemes on random graph models with a power law degree distribution. For such graphs, we show that simple breadth-first-search based algorithm can find near optimal labeling schemes. The intuition behind our proof reveals that the distances between different pairs of vertices are almost independent, even for polynomially many pairs. 1 Overview Distance Labeling refers to a family of data structures for answering distance queries [28]. Each vertex is assigned a “labeling”; To answer a query between the distance of two vertices x and y, one is only allowed to use the labels of x and y to compute dist(x, y). Labeling schemes are designed to speed up distance queries on large graphs, where computing shortest path from scratch is expensive. In this paper, we study distance labeling schemes on random graph models for social and information networks. A simple yet commonly used scheme is landmark based labelings (also known as 2-hop covers [19], hub labeling [1]). The idea is to find central landmarks that lie on the shortest paths of many sources and destinations. Meanwhile, every vertex stores a set of landmarks as well as its distance to each landmark. To answer a distance query dist(x, y), we simply find a common landmark z in the landmark sets of x and y to minimize the sum of distances dist(x, z) + dist(z, y). By cleverly finding local and global landmarks, Akiba et al. [4] and Delling et al. [22] found that only a few hundred landmarks per vertex suffices to recover all-pairs distances exactly, in a collection of social, Web, and computer networks with tens of millions of edges. Such a finding does not hold in worst case, since no distance labellings can always recover the exact distance while using sub-quadratic amount of space. Even for graphs with maximum degree 3, it is known that any distance labeling scheme requires Ω(n1.5 ) space [28]. Existing models for social and information networks build on random graphs with a fixed degree distribution [24, 15, 42]. Informally, we assume that the degree sequence of our graph is given, and then we draw a “uniform” sample from graphs that have the same or very similar degree sequences. Random graphs capture the small world phenomenon [15], because the average distance grows logarithmically in the number of vertices. They serve as a basic block to richer models with more realistic features, e.g. community structures [31], shrinking diameters in temporal graphs [34]. In this work, we fill in the gap between empirical and worst case results, by studying distance labelings on random graphs: Given a random graph from the Chung-Lu model with a power law degree distribution of exponent β, how much storage does a distance labeling scheme require overall, in order to answer distance queries with no distortion? In the Chung-Lu model [14], each vertex x has a weight (expected degree) px . For every pair of vertices x and y, there is an undirected and unweighted edge between them with probability proportional to px · py , independent of other edges. Hence, Chung-Lu model generalizes ErdősRenyi graph to arbitrary degree distributions. Later on, we will discuss the implication of our results for configuration model and directed Chung-Lu model as well. In the rest of the paper, we use the term “random power law graph” to refer to a graph that is sampled from the Chung-Lu model, where the weight of each vertex is independently drawn from a power law distribution with mean value ν > 1 and exponent β. We are interested in the regime when β > 2 — this covers most of the empirical power law degree distributions that people have observed on social and information networks [16]. 1.1 Results When the degree distribution has finite variance (β > 3), we show that breadth first search produces √ a 2-hop cover which only requires each vertex to store Õ( n) landmarks. As a complement, the total length of any distance labeling schemes that answer distance queries exactly is almost surely Ω(n1.5 ). The same conclusion also applies to Erdős-Renyi graphs G(n, nc ) when c > 1, or when c = (1 + ε) log n. Theorem 1. Let G n (p) be a random power law graph model with average degree ν > 1 and exponent β > 3. For a random graph G = (V, E) drawn from G n (p), we have that: p • Almost surely there exists a 2-hop cover F such that |F (x)| ≤ O( n log3 n) for all x ∈ V . • Almost surely any distance labeling scheme will output a labeling whose total length is Ω̃(n3/2 ). We then present an algorithm such that on a random power law graph when 2 < β < 3 (infinite variance of the degree distribution), it generates at most Õ(n(β−2)/(β−1) ) landmarks per vertex when β ≥ 2.5; and Õ(n(3−β)/(4−β) ) landmarks per vertex when 2 < β < 2.5 (See Figure 1 for an illustration). We also show that when 2 < β < 3, any distance labeling scheme will generate 5−β labels of total size n 2 −o(1) almost surely. Theorem 2. Let G n (p) be a random power law graph model with average degree ν > 1 and exponent 2 < β ≤ 3. For a random graph G = (V, E) drawn from G n (p), we have that: • Almost surely there exists a 2-hop cover F such that |F (x)| ∼ O(n all x ∈ V . 1 1 , 4−β ) 1−min( β−1 · log3 n) for • For any distance labeling scheme, almost surely it will output a labeling whose total length is 5−β n 2 −o(1) . Our algorithm starts from the following observation: do a breadth-first search from each vertex √ x until either the entire connected component has been explored or n vertices has been traversed — let F (x) denote the set of vertices we discovered. For any two vertices x and y in the same component, F (x) and F (y) have a nonempty intersection, thus ensuring that there is a common landmark on the shortest path between (x, y). This simple procedure generates a 2-hop cover where √ each vertex stores Õ( n) landmarks. √ When 2 < β < 3, instead of stopping when n vertices are explored, we stop before reaching the layer containing the maximum weighted vertex. The vertices that we already discovered together with the maximum weighted vertex is essentially a (+1)-stretch scheme with at most Õ(n(β−2)/(β−1) ) landmarks per vertex. However, the size of the boundary, which contains the maximum weighted √ vertex, can be much larger than n. This is because the branching process grows doubly exponentially near the boundary [14]. Therefore, we preprocess a set of high degree vertices first, then carefully add vertices on the boundary to resolve the (+1)-stretch. It is also not hard to obtain 1.5 Storage (ny ) 1.4 1.3 1.2 1.1 1.0 2.00 2.25 2.50 β 2.75 3.00 Figure 1: An illustration of the results: The x-axis is the exponent of the power law degree distribution and for each value in the y-axis it means that the amount of storage is Õ(ny ). a (+2)-stretch scheme with Õ(nβ/2−1 ) landmarks per vertex — when β < 2.5, this improves the 3-approximate distance oracle of Chen et al. [13], which requires O(n(β−2)/(2β−3) space per vertex. Now we describe the intuition behind our lower bound for the β > 3 case. Consider two randomly chosen vertices x, y from V . We alread know that dist(x, y) is close to the average distance (on the order of O(log n)). Let d be slightly smaller than the average distance. While dist(x, y) will be at least 2d + 1 with high probability, it is crucial that Pr[dist(x, y) = 2d + 1] is already non-negligible (e.g. Ω(1/ log n) if we set d appropriatly). Hence the information of whether dist(x, y) is equal to 2d + 1 or not, is worth Ω(1/ log n) bits. If we can construct n1.5 pairs of such √ (x, y), then we could obtain the desired lower bound. Towards this goal, we note that even for n vertices, we could still maintain the neighborhood growth “almost” independently, up to distance d. In Section 3, we implement this idea via a martingale argument and an entropy argument, which yields a lower bound of Ω̃(n1.5 ). To prove the lower bound when 2 < β < 3, we adopt the high level plan described above. However, the neighborhood growth has very high variance, because there are lots of high degree vertices. To overcome the barrier, we use a technique from Van Der Hofstad (Chapter 3 [42]). We carefully construct a set of “good” path, so that with high probability, a vertex will follow our good path during the neighborhood growth. Our lower bound is nearly tight when β is close to 2, and has a small gap when β < 2.5. It would be interesting to close the gap when 2.5 < β < 3. We believe that the right answer should be Ω(n1.5 ) when β is close to 3. In Section 6, we test our algorithm on real world graphs. We found that our algorithm achieves fairly accurate results — the 80%-percentitle multiplicative error is less than 0.25 in our experiment. In addition, the algorithm is scalable to preprocess graphs with millions of edges in several minutes. One limitation is that our algorithm is designed for graphs with small average distance and a heavy tailed distribution. The second limitation is that we only derived results for Chung-Lu model. However, our technical proofs only rely on upper and lower bounding the growth rate of neighborhood growth. And it is well-known that configuration model have the same neighborhood growth rate [42], hence we expect our high level intuition to hold for the configuration model [24]. Finally, our lower bound technique only applies to labeling schemes. We refer the interested reader to Section 7 for more discussion about future work. 1.2 Related work Landmark based Labelings The problem of computing the optimal landmark based labelings can be formulated as an integer program, similar to the set cover problem [19]. It is NP-hard to compute the optimal landmark labelings (or 2-hop cover), and a log n-approximation can be obtained via a greedy algorithm [19]. See also the references [29, 23, 8, 7] for a line of followup work. Another closely related line of work is approximate distance oracle. We refer the reader to the excellent survey of Sommer [39] on this topic. as well as the classic work [6, 17, 41], and recent developments [20, 36, 3, 37, 43, 38, 5, 12] for further reading. On the practical side, numerous studies have demenstated the effectiveness of landmark based labelings on large graphs [21, 18, 4, 22, 11]. Notably, Bahmani and Goel [9] implemented the distance sketch of Das Sarma et al. [21] in a distributed setting. Power Law Graphs It has been empirically observed that many social and information networks have a heavy-tailed degree distribution [16] — concretely, the number of vertices whose degree is x, is proportional to x−β . For real world graphs, the coefficient β vary from 2 to 10, and are often greater than 3 [25]. Previous work of Chen et al. [13] proved that the space complexity of the classic Thorup and Zwick distance oracle [41] can be reduced on random graphs with a power law degree distribution, while achieving stretch 3, when 2 < β < 3. They left open the question of finding distance oracles with better stretch and less space. Gavoille et al. [27] reported a stretch 5 compact routing scheme (distance oracles for distributed settings) that also requires much less space on random power law graphs than in worst case. Enachescu et al. [26] presented a compact routing scheme that achieves stretch 2 using space O(n1.75 ) on Erdős-Renyi graphs. Existing mathematical models on special families of graphs related to distance queries include road networks [2], planar graphs [35] and graphs with doubling dimension [30]. However none of them can capture the expansion properties that have been observed on sub-networks of real-world social networks [34]. Apart from the ChungLu model and the configuration model that we have mentioned, the preferential attachment graph is also well-understood [24]. It would be interesting to see if our results extend to preferential attachment graphs as well. The Kronecker model [32] allows a richer set of features by extending previous random graph models, however its mathematical properties are not as well-understood as the other three models. Organization: The rest of the paper is organized as follows. In Section 2 we define the random graph model. In Section 3 we present our technical results along with the proof sketches. In Section 4 and 5 we fill in the missing proofs from Section 3. Section 6 describes our experiments. Finally, we discuss future extensions of our results in Section 7. 2 Preliminaries In this section, we introduce notations and define graph models. Consider an undirected graph G = (V, E). Let n = |V | be the number of vertices. For any vertex x ∈ V , Let dx denote the P degree of x. For a set of vertices S, let dS = x∈S dx denote the sum of their degrees. We use the notation x ∼ y to indicate that (x, y) ∈ E. For two disjoint sets S and T , S ∼ T means there exists an edge between S and T ; S ≁ T means there does not exist any edge between S and T . Let distG (x, y) denote the distance of x and y in G (we drop the subscript G if there is no ambiguity). For any integer 1 ≤ k ≤ n − 1, let Γk (x) = {y ∈ V : dist(x, y) = k} denote the set of vertices whose distance from x is equal to i. And let Ni (x) = {y ∈ V : dist(x, y) ≤ i} denote the set of vertices whose distance from x is at most i. 2.1 Distance Labelings A distance labeling scheme consists of two algorithms [28, 39]: • Preprocessing: given a graph G = (V, E), output a vertex-labeling L : V → {0, 1}∗ ; • Query: given input L(x) and L(y), compute dist(x, y) without accessing any other information. P For a set of vertices S, the total label size of S is defined as x∈S |L(x)|. The total label size of L is given by |L(V )|. The maximum size of L over all vertices is given by maxx∈V |L(x)|. In a landmark based labeling scheme, the labeling of each vertex x consists of a subset of vertices and their distances to x. A function F : V → 2V is said to be a 2-hop cover [19], if for every pair of vertices x and y in the same connected component of G, there exists a vertex z ∈ F (x) ∩ F (y) such that dist(x, y) = dist(x, z) + dist(z, y). When x and y are not reachable from each other, then the intersection of F (x) and F (y) should be empty. Apart from F , a 2-hop cover also stores dist(x, y) for every y ∈ F (x). The query algorithm for dist(x, y) is given by min z∈F (x)∩F (y) dist(x, z) + dist(z, y). If no common landmark in F (x) and F (y) is found, we return disconnected. Each query takes no more than O(|F (x)| + |F (y)|) time. 2.2 Chung-Lu Model In Chung-Lu model, each vertex x ∈ V has a weight px > 0, which corresponds to x’s expected degree. Given weight vector p over V P , the Chung-Lu model defines a probability distribution P over the set of all graphs G n . Let vol(S) = x∈S px denote the volume of S. And let vol2 (S) := x∈S p2x denote the second moment of S. Each edge (x, y) is chosen independently with probability   px · py ,1 . Pr[x ∼ y] = min vol(V ) Thus, px is approximately the expected degree of x, and vol(V ) is approximately the expected number of edges. Let G n (p) denote such a probability distribution over G n . We use the notation G ∈ G n (p) to refer to a graph drawn from the distribution defined by G n (p). We have the following convenient Proposition for bounding the probability of whether two sets connect or not. Proposition 3. Let G = (V, E) ∈ G n (p) be a random graph. For any two disjoint set of vertices S and T , vol(S)vol(T ) , and vol(V )   vol(S)vol(T ) Pr[S ≁ T ] ≤ exp − . vol(V ) Pr[S ∼ T ] ≤ Proof. For the first bound, we have: Pr[S ∼ T ] = 1 − YY x∈S y∈T ≤ 1 − (1 − ≤ 1 − (1 − (1 − min( XX px py , 1)) vol(V ) min( x∈S y∈T px py , 1)) vol(V ) X X px py p(S)p(T ) )= vol(V ) vol(V ) x∈S y∈T and Pr[S ≁ T ] = YY x∈S y∈T  (1 − min( ≤ exp − ≤ exp(− XX x∈S y∈T px py , 1)) vol(V )  px py min( , 1) vol(V ) p(S)p(T ) ). vol(V ) 2.3 Power Law Distribution Let f : [xmin , ∞) → R denote the probability density function of a power law [16] distribution with β−1 . The expectation of f (·) exists when exponent β > 1, i.e. f (x) = Zx−β , where Z = (β − 1) · xmin β > 2: β−1 . ν = xmin · β−2 The second moment is finite, only when β > 3, which is equal to ω = x2min · β−1 . β−3 In the random power law graph model, the weight of each vertex x is drawn independently from a power law distribution (with the same mean ν and exponent β). Given the weight vector p, we then sample a random graph according to the Chung-Lu model G n (p). It is shown in Chung and Lu [15] that if ν > 1, then almost surely a graph G ∈ G n (p) has a unique giant component. If ν < 1, almost surely all connected components have at most O(log n) vertices. In this paper, we are interested in cases when the average degree ν is a constant greater than 1. In this case, it is also known that the diameter of G is O(log n) with high probability. 3 Proof Overview In this section, we state our results formally along with a sketch for the proof. First, we consider the case when the degree distribution has finite variance. Theorem 1 (restate). Let G n (p) be a random power law graph model with average degree ν > 1 and exponent β > 3. For a random graph G = (V, E) drawn from G n (p), we have that: p • Almost surely there exists a 2-hop cover F such that |F (x)| ≤ O( n log3 n) for all x ∈ V . • Almost surely any distance labeling scheme will output a labeling whose total length is Ω̃(n3/2 ). √ For the first part, we simply observe that for each vertex, if we add the closest n vertices to the landmark set of every vertex, then the landmark sets of every pair of vertices will intersect with high probability, i.e. we have obtained a 2-hop cover. The proof can be found in Appendix A. For the lower bound, we divide the set of vertices whose weight is at most 2ν to groups of size √ n. The following Proposition shows that for each group, with high probability the total label √ √ size of Ω̃( n). This reduction will simplify the proof because the joint neighborhood growth of n vertices is almost independent in early stages. √ Proposition 4. Let S be a set of n vertices, where  every vertex has weight no more than 2ν. The −O(1+1/γ) total label size of S is at least Ω n · log n with high probability, where γ = (β − 3)/2. Let us first show that the above proposition directly implies the lower bound in Theorem 1. Proof of Theorem 1. We know that at least n/2 vertices have weight at most 2ν, by an averaging √ argument. Divide them into groups of size n, and apply Proposition 4 on each group. Clearly, √ √ except for o( n) groups, most groups there are at least Θ( n) disjoint  groups. In expectation,  √ will have label size at least Ω n · log−O(1+1/γ) n . Hence Markov’s inequality, at least Ω( n) of   the groups have total labeling size at least Ω n · log−O(1+1/γ) n with probability 1 − o(1), thus  they have a total labeling size of Ω̃ n1.5 . This proves the theorem. To build up intuition towards the proof of Proposition 4, we consider Erdős-Renyi graph G = G(n, p) where p = c/n, for a constant c > 0. Our lower bound is derived via an entropy argument. We will carefully exploit the information given by the pairwise distances of S. Note that the average n distance of G is roughly 2log log c (see e.g. [10]). We will consider distances slightly smaller than the average distance. Let d = log n 2 log c − O(log log n). We observe the following facts. • For every x ∈ S, with constant probability we have that |Γd (x)| = Θ(cd ). 2d • For every pair of vertices x, y ∈ S, the probability that dist(x, y) ≤ 2d + 1 is at most O( cn ) = 1 ). O( polylog(n) • If |Γd (x)| and |Γd (y)| are both on the order of Θ(cd ) and dist(x, y) > 2d, the probability that 2d 1 dist(x, y) = 2d + 1 is Θ( cn ) = Θ( ). polylog(n) We know that the distance labeling of S determine the pairwise distances of S. In particular, they determine whether each pair x, y has distance exactly 2d+ 1 or more, if dist(x, y) is not yet revealed by Γd (x) and Γd (y). This is worth roughly 1/polylog(n) bit of information. In expectation, we expect to have Θ(n) such pairs from S, which implies our lower bound on the labeling size of S. To implement the above plan, we need to deal two more issues. First, we need to argue that there are Θ(n) pairs with high probability. Secondly, for general degree distributions, there exists high degree vertices which introduces high variance to neighborhood growth. To resolve the first issue, we construct a martingale to grow the neighborthood of each vertex in S. To resolve the second issue, we note the second moment of the degree distribution is finite. Duing the martingale process, we carefully bound the second moment of degree sequence. We leave the full proof to Section 4. Now we consider the case when the degree distribution has infinite variance. Theorem 2 (restate). Let G n (p) be a random power law graph model with average degree ν > 1 and exponent 2 < β ≤ 3. For a random graph G = (V, E) drawn from G n (p), we have that: • Almost surely there exists a 2-hop cover F such that |F (x)| ∼ O(n all x ∈ V . 1 1 , 4−β ) 1−min( β−1 · log3 n) for • For any distance labeling scheme, almost surely it will output a labeling whose total length is 5−β n 2 −o(1) . Our upper bound uses the fact that G contains a heavy vertex whose weight is approximately n . We first add all high degreevertices to the landmark set of every vertex. Then we do 1 β−1 β−2 a breadth-first search, but stop right before the boundary size exceeding Θ̃(n β−1 ), and put all vertices that we have explored in the landmark set. We claim that this gives up a (+1)-sketch labeling. To see this, for two vertices x, y, if their landmark sets intersect with each other, then we can already compute their distances correctly. Otherwise, the bottom layer of x and y have distance at most two (through the heavy vertex) with high probability. Therefore, we only have to check whether they have distance one, i.e., there is an edge between them. To resolve the (+1)-stretch, for each vertex on the boundary, we add all of its neighbors with a higher degree to the landmark set. Clearly, this fixes the (+1)-stretch, if there is an edge connecting Algorithm 1 AlgSkewDegree Input: An undirected graph G = (V, E); Parameters δ and K. 1: Let H = {x ∈ V : dx ≥ K} 2: for x ∈ V do β−2 β−2 3: (F (x), l(x)) = AlgBfs(x, δn β−1 ) (add closest δn β−1 vertices) 4: F (x) = F (x) ∪ H (add all high degree vertices) 5: for y ∈ Γl(x)−1 (x) do 6: if dy ≤ K then 7: F (x) = F (x) ∪ {z ∈ N (y) : dy ≤ dz ≤ K} (add all neighbors of y with a higher degree) 8: end if 9: end for 10: end for the two boundaries. To bound the landmark size, we refer the reader to Appendix B. A complete description of the algorithm is shown below. For each vertex x and 0 ≤ k ≤ n−1, αk (x) is the number of edges between Γk (x) and V \Nk−1 (x). l(x) is the first non-negative integer that satisfies: αl(x)−1 (x) > δn(β−2)/(β−1) or Γl(x) (x) = ∅. It is clear that l(x) always exists. The procedure AlgBfs(x, T ) expands from x until reaching a level set whose volume is at least T ; And the output will be all the vertices visited so far — the precise definition can be found in Appendix A. Set δ = 4ν log2 n and (√ n if 2.5 ≤ β ≤ 3 K= 1 n (4−β)(β−1) if 2 < β < 2.5. Remark One can also obtain a (+2)-stretch labeling by setting K = Õ(nβ/2−1 ); The maximum labeling size will be K. We omit the proof. 3−β For the lower bound, we introduce a reduction to groups of size n 2 . 3−β Proposition 5. Let S be a set of n 2 vertices with weights between [a, b] such that a, b = nΘ(1/ log log n) and b > 2a. Then any labeling scheme must generate a total label size of at least n3−β−O(1/ log log n) for S with high probability. We first show how to reduce the lower bound part of Theorem 2 to the above proposition. Proof of Theorem 2. Consider the set of vertices with weights between a and b, and divide them 3−β β−1 into groups of size n 2 . The number of groups is n 2 −o(1) with high probability, because there are n1−o(1) such vertices. For each group, by Proposition 5, the total label size is at least n3−β−O(1/ log log n) except with o(1) probability. By Markov’s inequality, with probability 1 − o(1), β−1 at least a constant fraction (i.e. n 2 −o(1) ) of the groups have label sizes at least n3−β−O(1/ log log n) . 5−β 5−β Hence, we conclude that the total label size is at least n 2 −O(1/ log log n) = n 2 −o(1) with 1 − o(1) probability. To prove the proposition, we perform a breadth first search from S to distance d such that each vertex is “expected” to have a neighborhood of volume roughly nβ/2−1 at distance d. We show: 3−β 1. There exists a subset of vertices S ′ ⊆ S, such that: i) |S ′ | = Θ(n 2 ); ii) for each vertex β x ∈ S ′ , vol(Γd (x)) ≈ Θ(n 2 −1 ); iii) for any two vertices x, y ∈ S ′ , their “neighborhoods” are disjoint. 2. For a constant fraction of vertices x in S ′ , Γd (x) is connected to a vertex h(x) whose weight √ is about O( n), and their pairwise distance is at least 2d + 4. 3. Distance between x and y being at least 2d + 4 implies that h(x) and h(y) are not connected, which happens with roughly constant probability. However, there are n3−β such pairs, and thus every label of S which implies such a distance function could only occur with exp(−n3−β ) probability. The total label size of S is at least n3−β with high probability. The detailed proof can be found in Section 5. 4 Proof of Proposition 4 √ 2 (V ) Let r = vol vol(V ) and d = logr n − c, where c ≤ O(log log n) will be determined later. We describe an iterative process to grow the neighborhood of S up to distance d. Let S = {x1 , x2 , . . .} be any ordering of its vertices. Denote by G1 = (V1 , E1 ), where V1 = V and E1 = E. For any i ≥ 1, define T (xi ) to be the set of of vertices in Gi whose distance is at most d from xi . Define L(xi ) to be the set of vertices in Gi whose distance is equal to d from xi . More formally, ( {y : dGi (xi , y) ≤ d}, if xi ∈ Vi T (xi ) := ∅, otherwise. L(xi ) := {y ∈ T (xi ) : dGi (xi , y) = d} We then define Fi = Fi−1 ∪ T (xi ) (F0 := ∅ by default). Denote by Gi+1 to be the induced subgraph of Gi on the remaining vertices Vi+1 = V \Fi . We note that in the above iterative process, the neighborhood growth of xi only depends on the degree sequence of Vi . In order to bound rate of growth, we introduce the following Lemma. The result is standard (see e.g. [15]) – we leave the proof to Appendix C.1. Lemma 6. Let G n (p) be a random graph model with weight sequence p satisfying the following properties: 1. vol(V ) = (1 + o(1))ν · n for some constant ν; 2. vol2 (V ) = (1 + o(1))ω · n for some constant ω; 3. vol2+γ (V ) = τ · n for some positive constant γ < 1/2 and τ , where vol2+γ (S) := 4. The growth rate r = vol2 (V ) vol(V ) is bounded away from 1 (ν > ω). P x∈S p2+γ x ; Then for any vertex x with a constant weight, the set of vertices Γk (x) at distance exactly k from x has:  1. E[vol(Γk (x))] = O r k for every k ≤ logr n;  2. Pr[vol(Γk (x)) ≥ Ω r k ] ≥ Ω(1) for every k ≤ 21 logr n. As a corollary, we have that Pr[dist(x, y) ≤ k + 1] ≤ O(r k /n) for every k ≤ 21 logr n, where y is any vertex with constant weight. √ We now claim that with high probability, at least c1 n vertices x ∈ S have that vol(L(x)) ≥ √ Ω( n · r −c ), for some absolute constant c1 and c = (3 + 1/γ) log r log n; The proof consists of two parts: √ 2+ 1 a) For every 1 ≤ i ≤ n, conditional on xi ∈ Vi and vol(Fi−1 ) ≤ n/ log γ n, we have that √ vol(L(xi )) ≥ Ω( n · r −c ) with constant probability. √ b) By constructing a martingale and then apply Azuma-Hoeffding inequality, at least c1 n √ vertices x ∈ S have that vol(L(x)) ≥ Ω( n · r −c ). To prove Claim a), we note that the subgraph Gi on Vi is also a random graph sampled from Chung-Lu model. The vertices at distance d from xi in this subgraph is exactly Li . As the total weight of the subgraph is smaller than the vol(V ), the normalizer for the probability of an edge changes if restricted to Vi . To adjust for this change, we set   vol(Fi−1 ) (i) , ∀ y ∈ Vi . py = py · 1 − vol(V ) Then we have (i) (i) py · pz py · pz . Pr[y ∼ z] = P = (i) vol(V ) p x x∈Vi Hence we see that Gi is equivalent to a random graph drawn from degree sequence pi . The growth 2+1/γ 2 (Vi ) n, by Hölder’s inequality, rate is ri := vol vol(V ) . When vol(Fi−1 ) ≤ n/ log γ 1 vol2 (Fi−1 ) ≤ vol(Fi−1 ) 1+γ · O(n 1+γ ) ≤ o(n/ log n). Thus, the growth rate ri > 1. By our growth Lemma 6, with constant probability,   √ vol(V ) ≥ Ω(r d ) = Ω( n · r −c ). vol(Li ) ≥ Ω rid · vol(Vi ) Hence we proved Claim a). To prove Claim b), we consider   1 Xi :=   0 the following random variable, for any 1 ≤ i ≤ √ n. if xi ∈ / Vi , or vol(Fi−1 ) > n/ log2+1/γ , √ or vol(Li ) ≥ Ω( n · r −c ) otherwise. We have Pr[Xi = 1 | X1 , . . . , Xi−1 ] ≥ Ω(1) by Claim a). Thus by Azuma-Hoeffding inequality, P|S| √ i=1 Xi ≥ Ω( n) with probability 1 − o(1). We shall prove below that the contributions to P|S| √ i=1 Xi from the first two predicates is o( n). Hence by taking union bound, we obtain Claim b). √ • First, the number of xi such that xi ∈ / Vi is o( n) with high probability. Note that xi ∈ / Vi implies that there exists some vertex xj ∈ Fi−1 such that dist(xi , xj ) ≤ d. On the other hand, for any two vertices x, y ∈ S, Pr[dist(x, y) ≤ d] ≤ O(r d /n), by Lemma 6. Hence, the expected √ number of vertex pairs in S whose distance is at most d, is O(r d /n) ≤ o(1/ n). By Markov’s √ inequality, with probability 1 − o(1) , only o( n) vertex pairs have distance at most d in S. √ Hence for at most o( n) i’s we have that xi ∈ / Vi . 1 √ • Secondly for all 1 ≤ i ≤ n, vol(Fi ) ≤ n/ log2+ γ with high probability. This is because the set of vertices Fi is a subset of Nd (xi ), the vertices within distance d to xi . Thus, by Lemma 6, we have d E[vol(Ti )] ≤ E[vol(Nd (xi ))] ≤ O(r ). Thus, the expected volume of Fi is at most √ O(i · r d ) = O( n · r d ) = O(log−1 n) × n/ log2+1/γ , √ because d = logr n − c and c ≥ (3 + 1/γ) log r log n. Hence by Markov’s inequality, the probability that vol(F|S| ) > n/ log2+1/γ n is at most O(log−1 n). Now we are ready to prove Proposition 4. Given the labelings of S, we can recover the pairwise distances for all vertex pairs in S. Let distS : S × S → N denote the distance function restricted to all pairs in S. We show that with high probability, the total labeling size of S is at least Ω(n · r −2c ) = Ω(n · log−O(1+1/γ) n) (recall that c = (3 + 1/γ) log r log n). Consider the following two cases: 1. ∃c21 · n/4 pairs (xi , xj ) such that distS (xi , xj ) ≤ 2d + 1. By Lemma 6, we know that Pr[dist(xi , xj ) ≤ 2d + 1] = O(r 2d /n), for any xi , xj ∈ S. Hence the expected number of pairs with distance at most 2d + 1 in S, is at most O(r 2d /n). By Markov’s inequality, the probability that a random graph induces any such distance function is O(r −2c ) = o(1). 2. The number of pairs such that distS (xi , xj ) ≤ 2d + 1 is at most c21 · n/4 in S. Let A = √ {(x, y) ∈ S × S | dist(x, y) > 2d + 1, and vol(L(x)), vol(L(y)) > Ω( n · r −c )}. By Claim b), the size of A is at least c1 n(c1 n − 1)/2 − c21 n/4 ≥ c21 n/5. For any (x, y) ∈ A, L(x) and L(y) are clearly disjoint. Conditional on {T (x)} for all x ∈ S, the probability of the existences of edges between Li and Lj are unaffected. i h |S| Pr distS (x, y) > 2d + 1, ∀(x, y) ∈ A | {Ti }i=1 Y ≤ Pr [L(x) 6∼ L(y) | L(x) ∩ L(y) = ∅, (x,y)∈A  √ and vol(L(x)), vol(L(y)) ≥ Ω( n · r −c )   Y vol(L(x))vol(L(y)) ≤ exp − vol(V ) (x,y)∈A c2 n/5 ≤ exp −Ω(r −2c ) 1 ≤ exp(−Ω(n · r −2c )). Now let c2 be a sufficiently small value (e.g. 1/ log log n suffices). The number of labelings of −2c size less than c2 n · r −2c is at most 2c2 n·r . The probability that the total label size of |S| is −2c at most c2 n · r −2c , is at most 2c2 n·r × exp(−Ω(n · r −2c )) = o(1) by union bound. By taking a union bound on the two cases, we prove that with probability 1 − o(1), the total label size of S has to be at least Ω(n · r −2c ) = Ω(n · log−O(1+1/γ) n). 5 Proof of Proposition 5 We divide the proof into three parts. Let d = log log log n . 1 log β−2 In part 1, we specify the set of good path. We argue that the growth of S to the d-th level follows our good path with high probability. √ In part 2, we connect to vertices with weight n in the (d + 1)-th level. In part 3, we use the entropy argument to show that with high probability, the label size of S is at least n3−β−O(ε) , where ε = 1/ log log n. Part I: neighborhood growth For all 0 ≤ i ≤ d + 1, let d−i µi := n(β/2−1−ε)(β−2) σi := w 1/(β−2)2i (3−β) , and , where w = log log n. Denote by ai = µi /σi and bi = µi σi . µi can be thought of as the “expected” volume at distance i from a vertex x ∈ S. If the volume at distance i from x always stays inside [ai , bi ], then we think of x as a “good” vertex. It is easy to verify that both a0 and b0 are nΘ(1/ log log n) and b0 > 2a0 . Let S = {x1 , x2 , . . . } be 3−β an arbitrary vertex set of size n 2 such that all xi have weights between a0 and b0 . Clearly, for any i 6= j, the neighborhood growth of i and j are correlated. However, one would expect that the √ correlation is small, so long as the volume of the neighborhood has not reached O( n). We leverage the observation by exploring the neighborhood of S one vertex at a time. Denote by G1 = (V1 , E1 ) where V1 = V and E1 = E. For 1 ≤ i ≤ |S|, we consider the following inductive process: 1. If xi ∈ Vi , let 1 ≤ λi ≤ d be the maximum k that still satisfy vol(Γk (xi )) ∈ [ak , bk ] in graph Gi (Recall that Γk (xi ) is the set of vertices at distance exactly k from xi in Gi ); 2. Denote by Ti the set of vertices within distance min{d, λi + 1} from xi in Gi ; 3. If λi = d, let L(xi ) = Γd (xi ); otherwise, let L(xi ) = ∅; We then define Fi = Fi−1 ∪ Ti (F0 = ∅ by default). Let Gi+1 be the subgraph of Gi on remaining vertices Vi+1 = Vi \Ti . In the above process, we keep expanding the neighborhood of xi until we reach distance d or we find a distance λi + 1 such that the volume of vertices at distance λi + 1 from xi is not in [aλi +1 , bλi +1 ]. If we reach distance d, then L(xi ) is the set of vertices at distance d from xi . In order to bound the growth rate of xi on graph Gi . We introduce the following Lemma. This result follows standard arguments (see e.g. [42]) – a proof can be found in Appendix C.2 for completeness. Lemma 7. Let c1 , c2 , c3 > 0 be absolute constants. Let S be a set of fixed values within [1, nβ/2−1 ] whose size is at most 2d. Let G n (p) be a random graph with weight sequence p satisfying vol(V ) = Θ(n), and for any t ∈ S, X py ≥ c1 × nt2−β y:py ≥t X y:py ≤t X y:py ≥t p2y ≤ c2 × nt3−β , py ≤ c3 × nt2−β . Then we have the following facts regarding neighborhood growth: a) Following a good path: Let x be a fixed vertex and 1 ≤ k ≤ d+1. Suppose that vol(Γi (x)) ∈ [ai , bi ] for any 1 ≤ i < k, then vol(Γk (x)) ∈ [ak , bk ], with probability at least 1 − O(1/wβ−2 ), where w = log log n; b) Average distance: let x, y be two vertices such that px , py ∈ [a0 , b0 ], then Pr[dist(x, y) ≤ 2d + 3] = o(1). We make the following crucial claim. Claim 8. With probability 1 − o(1), at least Θ(n 3−β 2 ) vertices xi in S have vol(L(xi )) ∈ [ad , bd ]. To prove the claim, let us consider the following random variables. Define ( 1 vol(L(xi )) ∈ [ad , bd ], Xi = 0 otherwise. We show that Xi = 1 with high probability for all 1 ≤ i ≤ |S|. We first verify that Pr[xi ∈ / Vi ] = Pr[xi ∈ Fi−1 ] ≤ o(1). Consider any vertex z ∈ V and 1 ≤ j ≤ i − 1, we have that d−1 X p z · bl Pr[z ∈ Tj ] ≤ vol(Vj ) l=0 ≤ pz · n(β/2−1−ε)(β−2)−1 · wO(log 2 log n) . Thus, by union bound from 1 ≤ j ≤ i − 1, we have 1 Pr[z ∈ Fi−1 ] ≤ pz · n 2 (β 2 −5β+5)−ε(β−2)+o(ε) = pz · n λ , (1) i.e. denote the exponent by λ above. Next, we verify that the weight sequence of Gi satisfies the premises of Lemma 7 with high probability. It suffices to verify the first premise – the second and the third hold because Vi is a subset of V . It’s not hard to see that the initial weight sequence of G1 = G satisfies all the premises by Chernoff bound (details omitted). It suffices to show that Fi−1 has small volume, i.e., we only remove a small volume from G in total. By Equation (1), we have: X E[vol(Fi−1 )] ≤ pz · min{1, pz · nλ } z∈V = X z:pz ≥n−λ ≤ O(n pz + 1−λ(2−β) X z:pz <n−λ p2z · nλ + n1−λ(3−β)+λ ) = O(n1+λ(β−2) ). The second inequality above is because of Lemma 7. It is not hard to verify that 1 + λ(β − 2) 1 ≤ 1 − (β − 2)2 − Θ(ε). 2 Having bounded the expected volume of Fi−1 , we obtain that with high probability only a total 2 volume of o(n1−(β−2) /2 ) is from V in Vi . Thus, we obtain the first premise of Lemma 7, because 2 nt2−β = Ω(n1−(β−2) /2 ) for any t ≤ nβ/2−1 . Now we can apply Lemma 7 to Gi to obtain that Pr[Xi = 0] = o(1). Finally, by Markov’s P 3−β 3−β inequality, i (1 − Xi ) ≥ 12 · n 2 with o(1) probability. Hence at least 0.99n 2 vertices in S have vol(L(xi )) ∈ [ad , bd ] with high probability. Denote by S1 ⊆ S the set of such vertices. Part II: connecting to heavy vertices In this part, we show how L(xi ) and certain set of high degree vertices are connected. Let A = {x ∈ V : px ∈ [(ad /w)1/(β−2) , 2(ad /w)1/(β−2) ]} \ F|S| . We claim that there is a constant fraction of the vertices x in S1 such that each L(x) is connected to a different vertex in A. More formally, we make the following claim. Claim 9. With 1 − o(1) probability, there exists a set S2 ⊆ S1 and a function h : S2 → A such that 3−β |S2 | ≥ 13 n 2 , for every x ∈ S2 , h(x) connects to some vertex in L(x) and h is an injection. We first show that A has a large volume. By Equation (1), any vertex with weight at most 1 2(ad /w)1/(β−2) < n1/2 belongs to F|S| with probability at most n 2 (β−2)(β−3) = o(1). Thus, the volume of A is vol(A) = Θ(nw/ad ) with 1 − o(1) probability. This implies that |A| ≥ Θ(nw/(ad (ad /w)1/(β−2) )) > ω(n(3−β)/2 ). Now we construct the set S2 and the function h as follows: 1. Go over all vertices x in S1 , if L(x) has a neighbor y in A that is “unused”, add x to S2 and set h(x) to y; 2. Mark y as “used”. This procedure will generate a set S2 of size at least 13 n 3−β 2 with high probability, since 1. Only an o(1) fraction of the vertices in A are marked as “used”, as |A| ≫ n 3−β 2 ; 2. vol(L(x)) ≥ ad by Claim 8, and thus, Pr[∀y ∈ A, s.t. y “unused”, L(x) ≁ y] ≤ exp(−vol(L(x)) · vol(A)/vol(V )) ≤ exp(−ad · nw/ad n) = o(1). The claim follows by Markov’s inequality. Part III: upper bounding the label size of S Consider the distance function on G restricted to all vertex pairs in S, distS : S × S → N. Clearly, distS can be determined from the labels of S. We consider three cases: 1. The random graph does not satisfy the bound on |S2 | in Claim 9. By the above argument, such a graph can only be generated with o(1) probability. 2. If there exists 0.01 · n3−β vertex pairs from S whose distance is at most 2d + 3, we claim that the probability that a random graph induces any such distance function is at most o(1). By Lemma 7, the probability that two vertices have distance at most 2d + 3 is o(1), hence the expected number of vertex pairs in S within distance 2d + 3 is o(n3−β ). The claim then follows by Markov’s inequality. 3. If the number of vertex pairs from S within distance 2d + 3 is at most 0.01 · n3−β , then we infer that there are 0.2n(3−β)/2 vertices in S2 whose pairwise distance is at least 2d + 4. Let B ⊆ S2 × S2 be the set of all such vertex pairs. The size of B is least 0.01n3−β . Note that the distance function distS determines the set B, and we have |B| ≥ Θ(n3−β ), for any (x, y) ∈ B, h(x) and h(y) must not be connected by an edge. Hence, for any such set B, i h 3−β Pr dist(x, y) ≥ 2d + 4, ∀(x, y) ∈ B | |S2 | = Θ(n 2 ) Y ≤ Pr[h(x) ≁ h(y)] (x,y)∈B β−3 ≤ (1 − Θ((ad /w)2/(β−2) /n))Θ(n )   ≤ exp −(ad /w)2/(β−2) · nβ−4   2 1 2 = exp −n−2ε/(β−2) · w− β−2 − 3−β log log n · nβ−3   = exp −nβ−3−O(ε) .  That is, each of such labels for S could only occur with probability exp −nβ−3−O(ε) . However, there are only O(2s ) different labels of total size at most s. Then by union bound, the probability that a random graph induces labels for S of size at most nβ−3−O(ε) is o(1). This finishes the proof. 6 Experiment In this section, we evaluate our algorithms on a collection of large networks. We compare with the algorithm of Akiba et al.’s [4] and the Thorup-Zwick distance oracle [41, 13]. The first algorithm produces an exact landmark labeling via recursively pruning during breadth first search over all vertices – we will refer to it as PrunedLabel later. The second algorithm adapts the 3-approximate distance oracle of Thorup and Zwick [41], via picking high degree vertices as global landmarks – we refer to it as BallGrow. In Table 1 we list the graphs used in our experiment. More details are available at Stanford Large Network Dataset Collection [33]. graph Twitter Stanford Google BerkStan # nodes 81,306 281,903 875,713 685,230 # edges 1,768,149 2,312,497 5,105,039 7,600,595 category Social Web Web Web 90% effective diameter 4.5 9.7 8.1 9.9 average distance 3.8 5.2 6.0 6.3 Table 1: Basic statistics of graphs in experiments. Implementation We implemented all three algorithms in Scala. The graph library we used is available at https://github.com/teapot-co/tempest. We run the experiments on Amazon EC2 m4.4xlarge instance, with 64GB of RAM and 16 Intel Xeon 2.3GHz CPUs. We used a variant of AlgSkewDegree in the experiments 6. We hand tune the two parameters used in the algorithm. For PrunedLabel, a vertex ordering is required: we simply sort all vertices by indegree plus outdegree. For BallGrow, it is necessary to specify the number of global landmarks; we handtune this parameter and choose the numer of high degree vertices as global landmarks accordingly. We measure accuracy over 2000 randomly sampled pairs of source/destination vertices. We look at the 80 and 90-percentile multiplicative error (|estimated-distance / true-distance −1 |). Algorithm 2 A description of our algorithm in experiments. Input: A directed graph G = (V, E); Parameters d and K. 1: σ = vertices ordered by (indegree + outdegree) 2: for i ≤ n do 3: if i ≤ K then 4: computeGlobalLm(σi ) 5: else 6: computeLocalLm(σi ) 7: end if 8: end for 9: procedure computeGlobalLm(x) 10: {(y, dist(x, y)), ∀ y ∈ V } = Run a forward BFS 11: {(y, dist(y, x)), ∀ y ∈ V } = Run a backward BFS 12: end procedure 13: procedure computeLocalLm(x) 14: Run a forward BFS from x up to distance d, prune any node from {σi }K i=1 . 15: end procedure Results Table 2 compares the landmark size and running time of the three tested algorithms. Table 3 compares the accuracy. Looking at accuracy, we found that both our algorithm and BallGrow are fairly accurate on the three Web graphs. However, our algorithm does slightly worse for the first test cases. From the performance comparison, we found that both our algorithm and BallGrow are more scalable compared to PrunedLabel. This is to be expected, since PrunedLabel is designed to gaurantee exact distances. Our algorithm found smaller landmark sets compared to BallGrow and PrunedLabel in three out of four tests, and runs faster than PrunedLabel on the two largest instance. Twitter Stanford Google BerkStan Landmark size per node Ours PrunedLabel BallGrow 227 261 637 82 95 367 215 285 276 63 155 742 Ours <1 <1 7.2 1.0 Running time (min) PrunedLabel BallGrow 10.5 1.8 <1 2.0 84 8.2 46.9 8.6 Table 2: Comparison of performances over our algorithm, PrunedLabel and BallGrow. The landmark size is equal to the total number of forward and backward landmarks stored, divided by the total number of vertices. Twitter Stanford Google BerkStan 90% error Ours BallGrow 0.5 0.0 0.07 0.08 0.0 0.0 0.125 0.1 80% error Ours BallGrow 0.25 0.125 0.0 0.0 0.0 0.0 0.0 0.0 Table 3: Comparion of accuracy. The accuracy of PrunedLabel is not listed becaue it is gauranteed to output exact distances. 7 Discussions In this work, we studied distance labeling schemes on random graphs. We showed that simple breadth first search based algorithms are near optimal. Our experiments suggest that the algorithms we developed are effective on real world graphs that have small average distance and power law degree distribution. Apart from closing the gap between upper and lower bounds, we discuss about future work below. Extensions. The Chung-Lu model has a natural extension to directed graphs. Consider two power law distributions f in (x) and f out(x) with mean value bigger than 1, representing the indegree and outdegree distributions, respectively. Each node v is associated with two parameters out in out (·), respectively. For any two nodes u and v, there is a directed pin v ∼ f (·) and pv ∼ f out in edge from u to v with probability pu M·pv , where M is a normalization term. We sketch a √ heuristic argument which shows that O( n) landmarks per node suffices to get a 2-hop cover: √ If we do a breadth-first search forward from every node x to include Õ( n) landmarks for √ x as well as a backward BFS from x to include Õ( n) landmarks, then for every pair of nodes x and y, the forward frontier of x and the reverse frontier of y will intersect with high probability. A second possible extension is to consider configuration models with a power law degree distribution. We believe all of our proofs can be extended to configuration models, since our technical tools only involve bounding the growth of branching processes from every node; We leave the details to future work. Beyond worst case analysis. It would be interesting to consider deterministic characterizations that will ensure short distance labelings. Do constant expansion ensure the existence of subquadratic distance labeling schemes? The high level intuition behind our algorithmic result is that as long as the breadth-first search process grows neither too fast nor too last, but rather at a uniform rate, then it is possible to obtain a “short” labeling scheme. Here is a more concrete instantiation: consider any graph G = (V, E) such that for all x ∈ V and 0 ≤ i ≤ n, √ (x)| ∈ [l, c], where c > l > 1 are fixed values. Now for each x ∈ V , either |Ni (x)| ≤ n or |Γ|Γi+1 i (x)| √ add all the vertices within distance log2c n plus the closest n vertices to the landmark set of x. It is not hard to see that this gives a 2-hop cover. The total size of the 2-hop cover is log c n P logc n O(l 2 + i=12 Hcii ), where Hi is the total number of length-i path in G. For random power law graphs when β > 3, l and c are asymptotically equal to r = ω/ν, E[Hi ] = O(nr i ) and the above formula becomes O(n3/2 log n). √ Distance oracles. For the finite variance case, the query complexity is Θ( n) for labeling schemes. However, if we want faster query schemes, the situation seems very mysterious. Can we even √ obtain sub-quadratic data structures with o( n) query complexity? In another direction, we suspect that random graphs might provide a candidate hard instance for the set intersection conjecture [40]. References [1] Ittai Abraham, Daniel Delling, Andrew V Goldberg, and Renato F Werneck. A hub-based labeling algorithm for shortest paths in road networks. In International Symposium on Experimental Algorithms, pages 230–241. Springer, 2011. [2] Ittai Abraham, Amos Fiat, Andrew V Goldberg, and Renato F Werneck. Highway dimension, shortest paths, and provably efficient algorithms. In Proceedings of the twenty-first annual ACM-SIAM symposium on Discrete Algorithms, pages 782–793. Society for Industrial and Applied Mathematics, 2010. [3] Ittai Abraham and Cyril Gavoille. On approximate distance labels and routing schemes with affine stretch. In International Symposium on Distributed Computing, pages 404–415. Springer, 2011. [4] Takuya Akiba, Yoichi Iwata, and Yuichi Yoshida. Fast exact shortest-path distance queries on large networks by pruned landmark labeling. In Proceedings of the 2013 ACM SIGMOD International Conference on Management of Data, pages 349–360. ACM, 2013. [5] Stephen Alstrup, Søren Dahlgaard, Mathias Bæk Tejs Knudsen, and Ely Porat. Sublinear distance labeling. arXiv preprint arXiv:1507.02618, 2015. [6] Ingo Althöfer, Gautam Das, David Dobkin, Deborah Joseph, and José Soares. On sparse spanners of weighted graphs. Discrete & Computational Geometry, 9(1):81–100, 1993. [7] Haris Angelidakis, Yury Makarychev, and Vsevolod Oparin. Algorithmic and hardness results for the hub labeling problem. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 1442–1461. Society for Industrial and Applied Mathematics, 2017. [8] Maxim Babenko, Andrew V Goldberg, Haim Kaplan, Ruslan Savchenko, and Mathias Weller. On the complexity of hub labeling. In International Symposium on Mathematical Foundations of Computer Science, pages 62–74. Springer, 2015. [9] Bahman Bahmani and Ashish Goel. Partitioned multi-indexing: bringing order to social search. In Proceedings of the 21st international conference on World Wide Web, pages 399–408. ACM, 2012. [10] Béla Bollobás. Random graphs. In Modern Graph Theory, pages 215–252. Springer, 1998. [11] Michele Borassi, Pierluigi Crescenzi, and Luca Trevisan. An axiomatic and an average-case analysis of algorithms and heuristics for metric properties of graphs. In Proceedings of the Twenty-Eighth Annual ACM-SIAM Symposium on Discrete Algorithms, pages 920–939. SIAM, 2017. [12] Shiri Chechik. Approximate distance oracles with improved bounds. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, pages 1–10. ACM, 2015. [13] Wei Chen, Christian Sommer, Shang-Hua Teng, and Yajun Wang. Compact routing in powerlaw graphs. In International Symposium on Distributed Computing, pages 379–391. Springer, 2009. [14] Fan Chung and Linyuan Lu. The average distances in random graphs with given expected degrees. Proceedings of the National Academy of Sciences, 99(25):15879–15882, 2002. [15] Fan RK Chung and Linyuan Lu. Complex graphs and networks, volume 107. American mathematical society Providence, 2006. [16] Aaron Clauset, Cosma Rohilla Shalizi, and Mark EJ Newman. Power-law distributions in empirical data. SIAM review, 51(4):661–703, 2009. [17] Edith Cohen. Size-estimation framework with applications to transitive closure and reachability. Journal of Computer and System Sciences, 55(3):441–453, 1997. [18] Edith Cohen, Daniel Delling, Fabian Fuchs, Andrew V Goldberg, Moises Goldszmidt, and Renato F Werneck. Scalable similarity estimation in social networks: Closeness, node labels, and random edge lengths. In Proceedings of the first ACM conference on Online social networks, pages 131–142. ACM, 2013. [19] Edith Cohen, Eran Halperin, Haim Kaplan, and Uri Zwick. Reachability and distance queries via 2-hop labels. SIAM Journal on Computing, 32(5):1338–1355, 2003. [20] Hagai Cohen and Ely Porat. On the hardness of distance oracle for sparse graph. arXiv preprint arXiv:1006.1117, 2010. [21] Atish Das Sarma, Sreenivas Gollapudi, Marc Najork, and Rina Panigrahy. A sketch-based distance oracle for web-scale graphs. In Proceedings of the third ACM international conference on Web search and data mining, pages 401–410. ACM, 2010. [22] Daniel Delling, Andrew V Goldberg, Thomas Pajor, and Renato F Werneck. Robust distance queries on massive networks. In European Symposium on Algorithms, pages 321–333. Springer, 2014. [23] Daniel Delling, Andrew V Goldberg, Ruslan Savchenko, and Renato F Werneck. Hub labels: Theory and practice. In International Symposium on Experimental Algorithms, pages 259–270. Springer, 2014. [24] Richard Durrett. Random graph dynamics, volume 200. Citeseer, 2007. [25] Nicole Eikmeier and David F Gleich. Revisiting power-law distributions in spectra of real world networks. In Proceedings of the 23rd ACM SIGKDD International Conference on Knowledge Discovery and Data Mining, pages 817–826. ACM, 2017. [26] Mihaela Enachescu, Mei Wang, and Ashish Goel. Reducing maximum stretch in compact routing. In INFOCOM 2008. The 27th Conference on Computer Communications. IEEE. IEEE, 2008. [27] Cyril Gavoille, Christian Glacet, Nicolas Hanusse, and David Ilcinkas. Brief announcement: Routing the internet with very few entries. In Proceedings of the 2015 ACM Symposium on Principles of Distributed Computing, pages 33–35. ACM, 2015. [28] Cyril Gavoille, David Peleg, Stéphane Pérennes, and Ran Raz. Distance labeling in graphs. In Proceedings of the twelfth annual ACM-SIAM symposium on Discrete algorithms, pages 210–219. Society for Industrial and Applied Mathematics, 2001. [29] Andrew V Goldberg, Ilya Razenshteyn, and Ruslan Savchenko. Separating hierarchical and general hub labelings. In International Symposium on Mathematical Foundations of Computer Science, pages 469–479. Springer, 2013. [30] Ken-ichi Kawarabayashi, Philip N Klein, and Christian Sommer. Linear-space approximate distance oracles for planar, bounded-genus and minor-free graphs. In International Colloquium on Automata, Languages, and Programming, pages 135–146. Springer, 2011. [31] Tamara G Kolda, Ali Pinar, Todd Plantenga, and Comandur Seshadhri. A scalable generative graph model with community structure. SIAM Journal on Scientific Computing, 36(5):C424– C452, 2014. [32] Jure Leskovec, Deepayan Chakrabarti, Jon Kleinberg, Christos Faloutsos, and Zoubin Ghahramani. Kronecker graphs: An approach to modeling networks. Journal of Machine Learning Research, 11(Feb):985–1042, 2010. [33] Jure Leskovec and Andrej Krevl. SNAP Datasets: Stanford large network dataset collection. http://snap.stanford.edu/data, June 2014. [34] Jure Leskovec, Kevin J Lang, Anirban Dasgupta, and Michael W Mahoney. Statistical properties of community structure in large social and information networks. In Proceedings of the 17th international conference on World Wide Web, pages 695–704. ACM, 2008. [35] Shay Mozes and Christian Sommer. Exact distance oracles for planar graphs. In Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete Algorithms, pages 209–222. SIAM, 2012. [36] Mihai Patrascu and Liam Roditty. Distance oracles beyond the thorup-zwick bound. In Foundations of Computer Science (FOCS), 2010 51st Annual IEEE Symposium on, pages 815–823. IEEE, 2010. [37] Mihai Patrascu, Liam Roditty, and Mikkel Thorup. A new infinity of distance oracles for sparse graphs. In Foundations of Computer Science (focs), 2012 Ieee 53rd Annual Symposium on, pages 738–747. IEEE, 2012. [38] Ely Porat and Liam Roditty. Preprocess, set, query! Algorithmica, 67(4):516–528, 2013. [39] Christian Sommer. Shortest-path queries in static networks. (CSUR), 46(4):45, 2014. ACM Computing Surveys [40] Christian Sommer, Elad Verbin, and Wei Yu. Distance oracles for sparse graphs. In Foundations of Computer Science, 2009. FOCS’09. 50th Annual IEEE Symposium on, pages 703–712. IEEE, 2009. [41] Mikkel Thorup and Uri Zwick. Approximate distance oracles. Journal of the ACM (JACM), 52(1):1–24, 2005. [42] Remco Van Der Hofstad. Random graphs and complex networks. Available on http://www. win. tue. nl/rhofstad/NotesRGCN. pdf, page 11, 2009. [43] Christian Wulff-Nilsen. Approximate distance oracles with improved preprocessing time. In Proceedings of the twenty-third annual ACM-SIAM symposium on Discrete Algorithms, pages 202–208. SIAM, 2012. A Upper Bound of Theorem 1 In this section we consider the degree sequence p when it is drawn from a power law distribution with finite second moment. Proposition 10. Let f denote a power law distribution with mean value ν > 1 and exponent β > 3. 1 Let p denote n independent samples from f (·) and 0 < ε < 1/2 be a fixed value. Let d ∼ o(n β−1 ) be a threshold value. The following holds almost surely: 1 i) The maximum weight max p ≤ o(n β−1 ). P ii) The volume of V is vol(V ) = ni=1 px = νn ± O(n1/2+ε ). iii) The second moment below d is X x∈V px 2 1px ≤d = (ω − Zd3−β )n ± O(n(1+ε)/2 d). β−3 iv) The second moment above d is X x∈V px 2 1px ≥d = Z nd3−β (1 + o(1)). β−3 1 +ε v) The second moment vol2 (V ) = ωn ± O(n 2(β−2) ). P vi) The first moment below d is x∈V px 1px ≤d ≤ (ν − vii) The first moment above d is P x∈V px 1px ≥d ≤ Zd2−β β−2 )n Zd2−β β−2 n(1 + + o(n). o(1)). The proof is via standard concentration inequality – we leave it to the reader. We will assume that Proposition 10 holds for the degree sequence p, and condition on p being fixed. Given a random graph G = (V, E), we present an algorithm (shown below) for finding a 2-hop cover of G. Algorithm 3 AlgBoundedVar Input: An undirected graph G = (V, E); A parameter δ. 1: for x ∈ V do √ 2: (F (x), l(x)) = AlgBfs(x, δ n) 3: end for 4: procedure AlgBfs(x, t) 5: S = {x} 6: α0 (x) = dx ; k = 0 7: while αk (x) ≤ t ∧ |Γk+1 (x)| > 0 do 8: S = S ∪ Γk (x) 9: Y = {(y, z) ∈ E : y ∈ Γk (x), z ∈ Γk+1 (x)} 10: k = k + 1P 11: αk (x) = y∈Γk (x) dy − |Y | 12: end while 13: return (S, k) 14: end procedure (estimate the next boundary size) √ √ Lemma 11. Algorithm 3 with parameter δ n where δ = 5 ν log n finds a 2-hop cover F of G with high probability. Proof. Consider a fixed vertex x ∈ V , we first show that unless F (x) contains the entire √ connected component of x, the Algorithm will stop with a boundary layer whose volume is Ω( n log n) with √ probability at least 1 − n−2 . If l(x) = 1, then either x is an isolated node, or dx ≥ δ n. Since √ √ n dx ≤ n, this happens with probability at most exp(− (δ−1) ) ∼ o(n−4 ) by Proposition 21. 2 √ When l(x) = k + 1 ≥ 2, we show that vol(Γk (x)) ≥ δ n/3 with high probability. The termination √ condition implies that αk (x) ≥ δ n. Consider the process in which αk (x) is generated: we keep branching out from x until we reach the k-th level from x, then we reveal the edges between Γk (x) √ and V \Nk−1 (x). Conditional on a = vol(Γk (x)) ≤ δ n/3, αk (x) is the sum of independent 0-1-2 random variables (because the edges inside Γk (x) are counted twice), and X X py pz E[αk (x)] = vol(V ) y∈Γk (x) z ∈N / k−1 (x) √ X pz δ n =a≤ ≤a vol(V ) 3 z∈V Therefore by Chernoff bound, √ √ Pr[αk (u) ≥ δ n | vol(Γk (u)) ≤ δ n/3] √ δ n ) ≤ exp(− 18 ∼ o(n−4 ). √ Secondly, we show that if two level sets have volume Ω( n log n) but are disjoint, then the probability that there is no edge between them is very small. Let x and y be any two vertices. Let 1 ≤ k1 ≤ n − 1 and 1 ≤ k2 ≤ n − 1. Let Ωk1 ,k2 denote the set of graphs satisfying √ √ vol(Γk1 (x)) ≥ δ n/3, vol(Γk2 (y)) ≥ δ n/3 and Γk1 (x) ∩ Γk2 (y) = ∅. Then by Proposition 3 Pr[Γk1 (x) ≁ Γk2 (y) | Ωk1 ,k2 ] ≤ exp(− δ2 n ) 9vol(V ) ∼ o(n−6 ). Now we are ready to bound the probability that F is not a 2-hop cover. Let ΩS denote the set of graphs such that √ 1. Γl(x) (x) = ∅ or vol(Γl(x)−1 (x)) ≥ δ n/3, for all nodes x; 2. if Γl(x) (x) and Γl(y) (y) are both non-empty, then F (x) ∩ F (y) is non-empty, for all x, y ∈ V , where x 6= y. It’s clear that if G ∈ ΩS , then the algorithm successfully finds a 2-hop cover. The probability that Condition (1) or (2) does not hold is at most o(n2 ) by taking union bound. Lemma 12. Let x be a fixed node. Let 0 ≤ k ≤ O(log n). Let Ωk denote the set of graphs such that √ vol(Γi (x)) ≤ 4δ n, for any 0 ≤ i ≤ k − 1, and √ Then Pr[αk (x) ≤ δ n | Ωk ] ≤ n−2 . √ vol(Γk (x)) > 4δ n. Proof. Let a = vol(Γk (x)) and b = vol(Nk−1 (x)). Then conditional on Ωk , a and b satisfies √ √ a > 4δ n and b ≤ 4kδ n And αk is the sum of independent 0-1-2 random variables. Let µ denote its expected value, then µ= X X y∈Γk (x) z ∈N / k−1 (x) py pz b = a(1 − ) vol(V ) vol(V ) Since vol(V ) ∼ Θ(n) by Proposition 10, b/vol(V ) ∼ o(1). By Chernoff bound, √ √ δ n Pr[αk ≤ δ n | Ωk ] ≤ exp(− ) ∼ o(n−2 ). 4 Lemma 13. Let x be a fixed node. Let 0 ≤ k ≤ O(log n). Denote by Ω∗k the set of graphs such that √ αi ≤ δ n, for all 0 ≤ i ≤ k √ Then Pr[vol(Γk (x)) > 4δ n, Ω∗k ] ≤ (k + 1)n−2 . Proof. For k = 0, the claim follows by applying Lemma 12. For k > 0, we repeatedly apply Lemma 12 for all values of i smaller than k. For 0 ≤ i ≤ k, denote by Si ⊂ Ω∗k the set of graphs such that: √ √ (1) vol(Γk (x)) > 4δ n; (2) vol(Γj (x)) ≤ 4δ n for any 0 ≤ j ≤ i − 1. We claim that Pr[Si ] − Pr[Si+1 ] ≤ n−2 , for 0 ≤ i ≤ k − 1, and Pr[Sk ] ≤ n−2 . These two combined together would imply this conclusion. To see this, √ Pr[Si ] − Pr[Si+1 ] = Pr[vol(Γi (x)) > 4δ n, Si ] √ ≤ Pr[αi ≤ δ n, Ωi ] ≤ n−2 The first inequality is because if a graph G is in Si (in particular condition (2)) and the volume of √ √ Γi (x) is bigger than 4δ n, then G ∈ Ωi . And the condition on Si ⊂ Ω∗k implies αi ≤ δ n. The second inequality is because of Lemma 12. One can similarly argue about Pr[Sk+1 ] and we omit the details. Lemma 14. The following holds almost surely: p • |F (x)| ∼ O( n log3 n) for all x ∈ V . p • The algorithm runs in time O( n log3 n) for all x ∈ V . Proof. We first bound the number of landmarks added before reaching the boundary layer. Since √ αi (x) p ≤ δ3 n, for i = 0, . . . , l(x) − 2, and l(x) ≤ O(log n), we conclude that there are at most O( n log n) landmarks before layer l(x) − 1. The rest of the proof shows that |Γl(x)−1 (x)| ∼ p √ O( n log3 n). Set c = 8 log n + 8δω/ν. When l(x) = 1, clearly dx ≤ n by Proposition 10. √ When l(x) = k + 1 ≥ 2, we have that G ∈ Ω∗k−1 and hence vol(Γk−1 (x)) ≤ 4δ n with probability √ at least 1 − kn−2 , by Lemma 13. We now argue that vol(Γk (x)) ≤ c n with high probability. √ Conditional on a = vol(Γk−1 (x)) ≤ 4δ n, vol(Γk (x)) is the sum of independent random variables √ that are all bounded in [0, n], with expected value µ as X µ= Pr[z ∼ Γk−1 (y)] × py (by Proposition 3) y ∈N / k−1 (x) ≤ ≤ X y ∈N / k−1 (x) py 2 a vol(V ) vol2 (V ) ω × a ∼ a( + o(1)). vol(V ) ν The last line is because vol2 (V ) = ωn(1 + o(1)) and vol(V ) = νn(1 + o(1)), by Proposition 10. By Chernoff bound, √ Pr[vol(Γk (x)) > c n | vol(Γk−1 (x)) ≤ a] √ c n−µ ) ≤ exp(−3 log n) ∼ o(n−2 ), ≤ exp(− √ 2 n √ because µ ≤ ων a(1 + o(1)) and a ≤ 4δ n. √ √ For the last part, we argue that if vol(Γk (x)) ≤ c n, then αk (x) ≤ 3c n. This is because √ √ conditional on a = vol(Γk (x)) ≤ c n, the expected value of αk (x) is at most c n (details omitted). Since αk (x) is the sum of independent 0-1-2 random variables, by Chernoff bound √ √ Pr[αk (x) > 3c n | vol(Γk )(x) ≤ c n] √ c n ) ≤ exp(− 4 ∼ o(n−2 ). In summary, √ Pr[l(x) = k + 1, αk (x) > 3c n] ∼ O(n−2 ) Taking a union bound over k ≤ O(log n) and x ∈ V , we obtain the desired conclusion. B Upper Bound of Theorem 2 In this section, we consider degree sequence p whose second moment is infinite. Proposition 15. Let f denote the probability density function of a power law distribution with mean value ν > 1 and exponent 2 < β ≤ 3. Let p denote n independent samples from f (·). Let √ log n ≤ d ≤ 2 n be any fixed value and let ε(n) be a function that goes to 0 when n goes to infinity. Then almost surely the following holds: 1 i) The maximum weight max p ≥ ε(n)n β−1 . P ii) The sum of weights beyond d is x∈V px 1px ≥d ∼ o(n). iii) The volume of V is vol(V ) = νn ± o(n). √ iv) Let log n < K ≤ 2 n be a fixed value. Set c(K) = Then ( X x∈V 5−2β 3Zxmin 2β−5 3Z 5−2β 5−2β K if 2.5 ≤ β ≤ 3 if 2 < β < 2.5 px 4−β 1px ≤K ≤ c(K)n. v) Let c > 1 denote a fixed constant value. For any vertex x ∈ V , X y∈V py 1 py ≤px ≤2√n ≤ 6 max( c √ cβ−2 Z npu 2−β , n log n). β−2 The proof is via standard concentration inequality (details omitted). In the following we assume that p satisfies all properties in Proposition 15. In the following, we prove that Algorithm 1 is correct in Lemma 16 and bound its output size in Lemma 19. Lemma 16. Algorithm 1 with parameter δ and K finds a 2-hop cover F with high probability. Proof. Consider the random variable l(x) that is computed in the Algorithm for each node x. Let ΩS denote the set of graphs that satisfies Γl(x) (x) = ∅ or dist(v ∗ , x) ≤ l(x), ∀x ∈ V where v ∗ is the node with the maximum weight. We argue that Algorithm 1 finds a 2-hop cover for any G ∈ ΩS , and 1 − Pr[ΩS ] ≤ 2/n This would imply that Algorithm 1 succeeds with probability at least 1 − 2/n. We first argue that Algorithm 1 is correct if G ∈ ΩS . Let x and y be two different vertices in V . If x and y are not reachable from each other, then clearly F (x) ∩ F (y) = ∅. If x and y are reachable from each other, consider their distance dist(x, y). Note that when Γl(x) (x) (or Γl(y) (y)) is empty, then F (x) (or F (y)) includes the entire connected component that contains x (or y). Therefore, y ∈ F (x), vice versa. When none of them are empty, we know that dist(x, v ∗ ) ≤ l(x) and dist(y, v ∗ ) ≤ l(y) since G ∈ ΩS . We consider three cases: • If dist(x, y) ≤ l(x) + l(y) − 2, then there exists a node z such that dist(x, z) ≤ l(x) − 1 and dist(y, z) ≤ l(y) − 1. By our construction, z is in F (x) and F (y). • If dist(x, y) = l(x) + l(y) − 1, then consider the two nodes z and z ′ on one of the shortest path from x to y, with dist(x, z) = l(x) − 1 and dist(y, z) = l(y). If either dz or dz ′ is at least K, then they have been added as a landmark to every node in V . Otherwise, assume without loss of generality that dz ≥ dz ′ . Then our construction adds z into F (y) and clearly z is also in F (x), hence z is a common landmark for x and y. • If dist(x, y) = l(x) + l(y), then clearly v ∗ is a common landmark for x and y. We now bound 1 − Pr[ΩS ]. Clearly, 1 − Pr[ΩS ] X ≤ Pr[Γl(x) (x) 6= ∅, dist(v ∗ , x) > l(x)] x∈V = X X n−1 x∈V k=0 Pr[l(x) = k + 1, Γk+1 (x) 6= ∅, dist(v ∗ , x) > k + 1] Note that l(x) = k + 1 and Γk+1 (x) 6= ∅ is the same as the event that: 1 • αi (x) ≤ δn1− β−1 , for i = 0, . . . , k − 1; • αk (x) > δn 1 1− β−1 . Hence, Pr[l(x) = k + 1, Γk+1 (x) 6= ∅, dist(v ∗ , x) > k + 1] ≤ Pr[αk (x) > δn ≤ Pr[αk (x) > δn 1 1− β−1 1 1− β−1 + Pr[vol(Γk (x)) > δn , dist(v ∗ , x) > k + 1] , vol(Γk (x)) ≤ 1 1− β−1 3 δn 1 1− β−1 3 ] , dist(v ∗ , u) > k + 1] (2) (3) For Equation (2), consider how αk (x) is discovered when we do the level set expansion from node 1 x. Conditioned on a = vol(Γk (x)) ≤ δn1− β−1 /3, αk (x) is the sum of 0-1-2 independent random 1− 1 variables, with expected value less than δn β−1 /3. Hence by Chernoff bound, Equation (2) is at 1− 1 1− 1 most exp(−δn β−1 /6) ∼ o(n−3 ). For Equation (3), conditioned on vol(Γk (x)) ≥ δn β−1 /2 and v∗ ∈ / Nk (x), 1− 1 δn β−1 pv∗ ) ∼ o(n−3 ) Pr[v ≁ Γk (x)] ≤ exp(− 2vol(V ) ∗ The first inequality is because of Proposition 3. The second inequality is because vol(V ) ∼ νn±o(n) by Proposition 15. In summary, 1 − Pr[ΩS ] ≤ 2/n. We now consider the size of our landmark scheme. There are three parts in each landmark set: (1) the heavy nodes whose degree is at least K; (2) all the level sets before the last layer; (3) the last layer that we carefully constructed. It’s not hard to bound the first part, since the degree of a node is concentrated near its weight, and the number of nodes whose weight is Ω(K) is O(nK 1−β ). The second part can be bounded by the maximum number of layers, hence the diameter of G, which is O(log n). For the third part, the idea is that before adding all the nodes on the boundary layer, we already have a (+1)-stretch scheme. Therefore, for a given vertex x, it is enough if we only add neighbors whose degree is bigger than dx — this reduces the amount of vertices from dx to O(d3−β x ). 1 We first show that the volume of all the level sets is at most O(δn1− β−1 ) before the boundary layer. For the rest of the section, let αk = αk (x) for any 0 ≤ k ≤ n−1, unless there is any ambiguity on the vertex we are considering. Recall that αk denotes the number of edges between Γk (x) and V \Nk−1 (x). Lemma 17. Let x be a fixed node. Let k be an integer less than ≤ O(log n). Let Ωk denote the set of graphs such that 1− 1 vol(Γi (x)) < 4δn β−1 , for any 0 ≤ i ≤ k − 1, and vol(Γk (x)) > 4δn Then Pr[αk ≤ δn 1 1− β−1 1 1− β−1 . | Ωk ] ≤ n−2 . Proof. Let a = vol(Γk (x)) and b = vol(Nk−1 (x)). Conditioned on Ωk , 1 1 a > 4δn1− β−1 and b ≤ 4kδn1− β−1 . Clearly, the random variable αk is the sum of independent 0-1 random variables. Let µ denote its √ expected value. For each y ∈ Γk (x), we know that py ≤ a = O( n). Let µy denote the expected number of edges between y and V \Nk−1 (x), then X µy = min( z:z6=y∧z ∈N / k−1 (x) ≥ py (1 − because of Proposition 15. And µ = Chernoff bound, b+ P P py pz , 1)1pz ≤√n vol(V ) pz 1pz ≥√n ) = py (1 − κ(n)) vol(V ) z∈V y∈Γk (x) µy = (1 − o(1))a. Let c = µ δn 1− 1 β−1 ≥ 2 − o(1). By 1 Pr[αk ≤ δn 1 1− β−1 (c − 1)2 δn1− β−1 ) ∼ o(n−2 ) | Ωk ] ≤ exp(− 4 Lemma 18. Let x be a fixed vertex. Let 0 ≤ k ≤ O(log n). Denote by Ω∗k the set of graphs such that 1− 1 αi ≤ δn β−1 , for any 0 ≤ i ≤ k 1 Then Pr[vol(Γk (x)) > 4δn1− β−1 , Ω∗k ] ≤ (k + 1)n−2 Proof. When k = 0, the claim is proved by Lemma 17. When k ≥ 1, we will repeatedly apply Lemma 17 to prove the statement. For any values of i smaller than or equal to k, let Si ⊂ Ω∗k denote the set of graphs that also satisfy: (1) vol(Γj (x)) ≤ 4δn 1 1− β−1 . We show that Pr[Si ] − Pr[Si+1 ] ≤ vol(Γk (x)) > 4δn Our Lemma follows from the two claims. For the first part, n−2 1 1− β−1 , for any 0 ≤ j ≤ i − 1; (2) if 0 ≤ i ≤ k − 1, and Pr[Sk ] ≤ n−2 . 1 Pr[Si ] − Pr[Si+1 ] = Pr[vol(Γi (x)) > 4δn1− β−1 , Si ] 1 ≤ Pr[Ωi , αi ≤ δn1− β−1 ] ≤ n−2 1 The first inequality is because if G ∈ Si and G satisfies vol(Γi (x)) > 4δn1− β−1 , then G ∈ Ωi . Also 1 αi ≤ δn1− β−1 since G ∈ Si ⊂ Ω∗k . The second inequality is because of Lemma 17. The other part can be proved similarly and we omit the details. Now we are ready to bound the size of our landmark scheme. Lemma 19. The following holds almost surely • |F (x)| ∼ O(n 1 1 , 4−β ) 1−min( β−1 · log3 n) for all x ∈ V ; • The algorithm terminates in time O(n 1 1 2−min( β−1 , 4−β ) · log3 n). Remark To implement Line 7, one can first sort N (x) for each x ∈ V , in descending order on their degrees, and then create a separate list that truncates the nodes whose degree is at least K. Given this list, one can find the set of neighbors of x whose degree is between [dx , K]. The amount of time it takes to sort N (x) is O(dx log dx ) ∼ O(dx log n). Hence the total amount of time it takes to sort all the adjacency lists is O(|E| log n) = O(n log n). We will use the following lemma for technical reasons — the proof is deferred to the end of the section. Lemma 20. Let x be a fixed node with weight px ≤ 2K. Denote by Sx = {y ∈ N (x) : dx ≤ dy and dy ≤ K} and let dˆx = |Sx |. Then where c1 = 192Z ν(β−2) Pr[dˆx ≥ max(c1 px 3−β , c2 log n)] ≤ n−3 and c2 = 130. Proof of Lemma 19: We first bound the number of nodes in H. By Proposition 22, with probability 1 − n−1 1 1 1−min( β−1 , 4−β ) |H| = O(nK 1−β ) = O(n ) Secondly, we bound the number of landmarks added before reaching the boundary layer. For any 1 vertex x, with i = 0, . . . , l(x) − 2, |Γi (x)| ≤ αi (x) = O(δn1− β−1 ). Since l(x) ≤ O(log n), the total 1 landmarks for these layers are at most O(n1− β−1 log3 n). The rest of the proof will bound the number of landmarks on the boundary layer with depth l(x) − 1. Denote by X dˆy 1dy ≤K for x ∈ V, 0 ≤ k ≤ n − 1 πk (x) = y∈Γk (x) Hence πl(x)−1 (x) gives the number of landmarks added on the boundary layer. 1−min( 1 , 1 ) 1− 1 3Z β−1 4−β , and ∆ = max(c ψ, c δn β−1 log n), Set c3 = |2β−5| max(x5−2β 1 2 min , 1), ψ = 12c3 δn where c1 and c2 are defined in Lemma 20. We show that πl(x)−1 (x) ≤ ∆ with probability 1 − n−2 for the rest of the proof — our conclusion follows by taking union bound over x ∈ V and 1 ≤ l(x) ≤ O(log n). When l(x) = 1, π0 (x) = dx ≤ K ≤ ∆. When l(x) = k + 1 ≥ 2, we know that G ∈ Ω∗k−1 . Hence 1 by Lemma 18, vol(Γk−1 (x)) ≤ 4δn1− β−1 with high probability. More concretly, Pr[l(x) = k + 1, πk (x) ≥ ∆] 1 ≤ (k + 1)n−2 + Pr[l(x) = k + 1, vol(Γk−1 (x)) ≤ 4δn1− β−1 , πk (x) ≥ ∆] Denote by wk = X y∈Γk (x) py 3−β 1py ≤2K . (4) 1 1− Conditional on a = vol(Γk−1 (x)) ≤ 4δn β−1 , we show that wk ≤ ψ with high probability. Denote 1− 1 by Ωw the set of graphs satisfying a ≤ 4δn β−1 . Conditioned on Ωw , wk is the sum of independent random variables that are all bounded in [0, (2K)3−β ]. Hence X E[wk ] = Pr[y ∼ Nk−1 (x)]py 3−β 1py ≤2K y ∈N / k−1 (x) ≤ a ( vol(V ) ≤ X a ( py 4−β 1py ≤2K ) vol(V ) X y ∈N / k−1 (x) py 4−β 1py ≤2K ) (by Proposition 3) y∈V aφ(K)n ≤ vol(V ) aφ(K) ∼ ν ψ ≤ . 3 (by Proposition 15) (vol(V ) = νn ± o(n) by Proposition 15) The last line follows by a ≤ 4δn Chernoff bound on wk , 1 1− β−1 and φ(K)n Pr[wk > ψ | Ωw ] ≤ exp(− 1 1− β−1 ≤ c2 n 1 1 1−min( β−1 , 4−β ) . Now we apply ψ ) ∼ o(n−2 ) 4(2K)3−β because when 2.5 ≤ β ≤ 3, ψ K 3−β And when 2 < β < 2.5, = Θ(n 1 − 3−β 1− β−1 2 ψ ) = Θ(n (β−1)2 −2 2(β−1) ) (3−β)(β−2) K 3−β = Θ(n (4−β)(β−1) ) Hence the second part in Equation (4) is bounded by o(n−2 ) plus Pr[l(x) = k + 1, vol(Γk−1 (x)) ≤ 4δn ≤ Pr[wk ≤ ψ, αk−1 ≤ δn 1 1− β−1 ≤ Pr[wk ≤ ψ, |Γk (x)| ≤ δn 1 1− β−1 , wk ≤ ψ, πk (x) ≥ ∆] , πk (x) ≥ ∆] 1 1− β−1 , πk (x) ≥ ∆] In the reminder of the proof we show the above Equation is at most n−2 . Denote by X dˆy 1py ≤2K πk′ (x) = y∈Γk (x) By Proposition 21, Pr[dy ≤ K | py > 2K] ≤ exp(−K/8) ∼ o(n−3 ) for any y ∈ V . Hence πk′ (x) = πk (x) with probability at least 1 − o(n−2 ). Lastly, we have Pr[wk ≤ ψ, |Γk (x)| ≤ δn 1 1− β−1 , πk′ (x) ≥ ∆] ≤ n−2 Otherwise, there exists a vertex y ∈ Γk (x) such that py ≤ 2K and dˆy ≥ max(c1 py 3−β , c2 log n), 1− 1 because ∆ ≥ max(c1 ψ, c2 δn β−1 log n). This happens with probability at most n−2 , by taking union bound over every vertice with Lemma 20. Proof of Lemma 20: When px ≤ c2 log n/2, Pr[dˆx ≥ c2 log n] ≤ Pr[dx ≥ c2 log n] ≤ o(n−3 ) Now suppose that px > c2 log n/2. Consider any vertex y whose weight is at most px /8. Then Pr[dy ≥ dx ] ≤ Pr[dy ≥ px /4] + Pr[dx < px /4] ∼ o(n−4 ) The second inequality is because of Proposition 21. Hence y is not in Sx . Now if py ≥ 2K, then Pr[dy ≤ K] ≤∼ o(n−4 ). Hence y is also not in Sx . Lastly, let X denote the set of vertices whose weight is between [ p8x , 2K] and who is connected to x. We have X E[X] = y∈V \{x}:px /8≤py ≤2K ≤ px py vol(V ) √ 4px 8Z max( npx 2−β , n log n) vol(V ) β−1 ≤ max(c1 px 3−β , c2 log n)/3 The first inequality is because of Proposition 15. The second inequality is because vol(V ) = √ νn + o(n) by Proposition 15, and px ≤ 2K ≤ 2 n. From here it is not hard to obtain that Pr[|X| ≤ max(c1 px 3−β , c2 log n)] ∼ o(n−3 ). C Random Graph Toolbox The following Lemma characterizes the probability that a vertex’s actual degree deviates from its weight. Proposition 21. Let G = (V, E) ∈ G n (p) be a random graph. Let x be a fixed vertex with weight px and degree dx in G. Then 1. If c ≥ 3, then Pr[dx ≥ cpx ] ≤ exp(− 2. If 0 < c < 1, then Pr[dx ≤ cpx ] ≤ exp(− (c − 1)px ) 2 (1 − c)2 px ) 8 Proof. Let µ = E[dx ]. First, µ= X y∈V \{x} ≤ min( px py , 1) vol(V ) X px py = px vol(V ) y∈V By Chernoff bound, for any c ≥ 3, cpx − µ ) 2 (c − 1)px ≤ exp(− ) 2 Pr[dx ≥ cpx ] ≤ exp(− since cpx − µ ≥ 2µ. 1− 1 ν n β−1 , then for any y ∈ V where py ≤ t, we know that px py ≤ On the other hand, let t = 2ε(n) vol(V ) by Proposition 15. Hence P px y∈V py 1py ≥t − ) µ ≥ px (1 − vol(V ) vol(V ) By Proposition 15, X y∈V py 1py ≥t ∼ o(n) Since px ∼ o(n) and vol(V ) = νn + o(n), we conclude that µ = px (1 − o(1)). By Chernoff bound, for any 0 < c < 1, Pr[dx ≤ cpx ] ≤ exp(− px (1 − c)2 (cpx − µ)2 ) ≤ exp(− ) 4µ 8 for large enough n. The following Proposition characterizes the number of nodes whose degree is at least K. √ Proposition 22. Let G = (V, E) ∈ G n (p) be a random graph. Let 8 log n ≤ K ≤ n denote a fixed β−1 1−β , log n). value and S = {x ∈ V : dx ≥ K}. With probability at least 1−n−1 , |S| ≤ 3 max( Z3 β−1 nK K Proof. Let Y1 = {x ∈ V : px ≥ K 3 } and Y2 = {x ∈ V : px < 3 and K ≤ dx }. Clearly, S ⊂ Y1 ∪ Y2 . We first show that Y2 is empty with probability at least 1 − n−1 . Consider a fixed node x ∈ V with weight px ≤ K/3. By Proposition 21, Pr[dx ≥ K] ≤ exp(−K) ∼ o(n−2 ) Hence Pr[Y2 6= ∅] = o(n−1 ) by union bound. β−1 1−β . Then by Chernoff We then bound the size of Y1 . The expected value of Y1 is Z3 β−1 nK bound, it’s not hard to obtain the desired conclusion (details omitted). C.1 Proof of Growth Lemma 6: β > 3 We first show an upper bound for the expected volume for each level Γk (x). The expected volume of Γk (x) is O(r k ) Let us first fix Γk (x), and consider the set Γk+1 (x). For a vertex y, the probability that it is in Γk+1 (x) is at most py · vol(Γk (x)) vol(V ) by Proposition 3. Thus, the expected volume of Γk+1 (x) conditioned on vol(Γk (x)) is at most E[vol(Γk+1 (x)) | vol(Γk (x))] X vol(Γk (x)) ≤ p2y · vol(V ) y6∈Nk (x) vol2 (V ) vol(V ) = vol(Γk (x)) · r. ≤ vol(Γk (x)) · On the other hand, vol(Γ0 (x)) = O(1). Thus, we have E[vol(Γk (x))] = O(r k ). This proves Item 1. Two fixed constant-weight vertices are close with very low probability Fix two vertices x, y ∈ S. By Item 1, k E[vol(Nk (x))] ≤ O(r ). However, for each i, the probability that y is at distance i from x conditioned on Ni−1 (x) is at most vol(Γi−1 (x)) Pr[y ∈ Γi (x) | Ni−1 (x)] ≤ py · . vol(V ) The probability y is within distance k + 1 from x is at most k+1 X Pr[y ∈ Nk+1 (x)] ≤ i=1 Pr[y ∈ Γi (x)] k+1 X py · ≤ E[vol(Γi−1 (x))] vol(V ) i=1 Nk (x) = py · vol(V ) ≤ O(r k ). \Nk (x)) With large probability, Γk+1 (x) has volume not much smaller than Γk (x) · vol2 (V vol(V ) Conditioned on Γk (x), the probability that a vertex y ∈ / Nk (x) is in Γk+1 (x) is at least −py · 1−e vol(Γk (x)) vol(V ) by Proposition 3. For any T > 0, we have X y:py >T We also have X y:py ≤T p2y ≤ T −γ · p3y ≤ T 1−γ · X y:py >T X y:py ≤T p2+γ ≤ τ · n · T −γ . y p2+γ ≤ τ · n · T 1−γ . y Let us focus on all y’s with weight at most T . By that fact that 1 − e−x ≥ x − x2 /2 when x ≥ 0, the expected volume of Γk+1 (x) ∩ {y : py ≤ T } conditioned on Nk (x) is at least −py · py 1 − e X p2y · y6∈Nk (x):py ≤T ≥  X y6∈Nk (x):py ≤T vol(Γk (x)) vol(V ) vol(Γk (x)) 1 − vol(V ) 2  X y6∈Nk (x):py ≤T p3y ·  vol(Γk (x)) vol(V ) 2   X vol(Γk (x)) 2 1 X 3 vol(Γk (x)) 2 vol(Γk (x)) py · − py · − ≥ (vol2 (V \ Nk (x))) · vol(V ) vol(V ) 2 vol(V ) y:py ≤T y:py ≥T   vol2 (V \ Nk (x)) vol(Γk (x)) 2 −γ vol(Γk (x)) 1−γ ≥ vol(Γk (x)) · −τ ·n·T · −τ ·n·T · vol(V ) vol(V ) vol(V )    vol(Γ (x)) vol2 (V \ Nk (x)) k − τ · T −γ + T 1−γ · . ≥ vol(Γk (x)) · vol(V ) vol(V ) Note that “y ∈ Γk+1 (x)” are independent events conditioned on Nk (x) for different y ∈ / Nk (x). Now we apply Chernoff Bound to lower bound the probability that the volume of Γk+1 (x) is too small. The above inequality holds for every T > 0. In the following, we set T = vol(Γk (x))1/2 . k (x)) When vol(Γk (x)) ≤ vol(V )2/3 , T −γ ≥ T 1−γ · vol(Γ vol(V ) , the expected volume of Γk+1 (x) conditioned on Nk (x) is at least: E[vol(Γk+1 (x) ∩ {y : py ≤ T }) | Nk (x)]   vol2 (V \ Nk (x)) − 2τ · vol(Γk (x))−γ/2 . ≥ vol(Γk (x)) · vol(V ) Since each py ≤ T = vol(Γk (x))1/2 , by Chernoff bound, we have     vol2 (V \ Nk (x)) − vol(Γk (x))−γ/3 Nk (x) Pr vol(Γk+1 (x)) ≤ vol(Γk (x)) · vol(V ) 1/2−2γ/3 ), ≤ 2−Θ(vol(Γk (x)) (5) as long as vol(Γk (x)) = O(n2/3 ) and vol(Γk (x)) sufficiently large. With constant probability, Γk (x) has volume at least Ω(r k ) Fix a sufficiently large constant C, denote by E0 the event that x has a neighborhood of volume at least C. Then it is not hard to verify that for any constant C, the probability of E0 is at least a constant: Pr[vol(Γ1 (x)) ≥ C] ≥ ΩC (1). Moreover, for i ≥ 1, denote by Ei the event that either   vol2 (V \ Ni (x)) vol(Γi+1 (x)) > vol(Γi (x)) · − vol(Γi (x))−γ/3 vol(V ) or vol(Γi (x)) ≥ n2/3 . By the argument above, 1/2−2γ/3 ) Pr[Ei | Ni (x)] ≤ 2−Θ(vol(Γi (x)) We claim that these events have the following properties. . Claim 23. When Ei occurs for all 0 ≤ i < k, we must have either vol(Γk (x)) ≥ Ω(r k ) or vol(Nk (x)) ≥ n2/3 for sufficiently large C. Claim 24. All events Ei ’s (0 ≤ i < k) occur simultaneously with constant probability. Before proving the two claims, let us first show that they together imply that Pr[vol(Γk (x)) ≥ Ω(r k )] ≥ Ω(1). By Markov’s inequality, the first inequality in the lemma statement and k ≤ 12 logr n, we have √ Pr[vol(Nk (x)) ≥ n2/3 ] ≤ O( n/n2/3 ) = o(1). Therefore, we have the lower bound Pr[vol(Γk (x)) ≥ Ω(r k )] ≥ Pr[E0 , . . . , Ek−1 ] · Pr[vol(Γk (x)) ≥ Ω(r k ) | E0 , . . . , Ek−1 ] ≥ Pr[E0 , . . . , Ek−1 ] · (1 − Pr[vol(Nk (x)) ≥ n2/3 | E0 , . . . , Ek−1 ]) ≥ Pr[E0 , . . . , Ek−1 ] · (1 − Pr[vol(Nk (x)) ≥ n2/3 ]/ Pr[E0 , . . . , Ek−1 ]) = Ω(1). This proves the lemma. Proof of Claim 23: Assume Ei occurs for all 0 ≤ i < k and vol(Nk (x)) < n2/3 . The goal is to show that in this case, we must have vol(Γk (x)) ≥ Ω(r k ). In particular, vol(Nk (x)) < n2/3 implies that vol(Ni (x)) < n2/3 and vol(Γi (x)) ≤ n2/3 for every i ≤ k. By Hölder’s inequality, we also have 1 γ vol2 (Ni (x)) ≤ vol2+γ (Ni (x)) 1+γ · vol(Ni (x)) 1+γ 1 ≤ τ 1+γ · n γ 1− 3(1+γ) . Thus, the event Ei (i > 0) implies   1 − γ vol(Γi+1 (x)) > vol(Γi (x)) · r − τ 1+γ · n 3(1+γ) − vol(Γi (x))−γ/3 . 1 − γ Let r̂ = r − τ 1+γ · n 3(1+γ) − C −γ/3 . For sufficiently large C, r̂ > vol(Γi (x)) ≥ C · r̂ i−1 ≥ C · r (i−1)/2 for i ≥ 1 inductively: √ r > 1. First we can show • By the definition of E0 , vol(Γ1 (x)) ≥ C; • If vol(Γi (x)) ≥ C · r̂ i−1 , then we have   1 − γ vol(Γi+1 (x)) ≥ vol(Γi (x)) · r − τ 1+γ · n 3(1+γ) − vol(Γi (x))−γ/3   1 − γ ≥ vol(Γi (x)) · r − τ 1+γ · n 3(1+γ) − C −γ/3 ≥ vol(Γi (x)) · r̂. (6) Thus, we have vol(Γi (x)) ≥ Ω(r̂ i ) ≥ Ω(r i/2 ). By Equation (6) again, we have 1 vol(Γk (x)) > vol(Γk−1 (x)) · (r − τ 1+γ · n ≥ vol(Γ1 (x)) · ≥ r k−1 · C · k−1 Y i=1 k−1 Y i=1 k = r · αk , γ − 3(1+γ) 1 (r − τ 1+γ · n (1 − τ 1 1+γ ·n − r −(k−1)γ/6 ) ! γ − 3(1+γ) γ − 3(1+γ) − r −iγ/6 ) ! · r −1 − r −iγ/6−1 ) where αk is decreasing as k increases. α 1 logr n is lower bounded by a constant α. Thus, vol(Γk (x)) ≥ 2 α·r k ≥ Ω(r k ). This proves the claim. Proof of Claim 24: By Lemma 23, conditioned on E0 , . . . Ei−1 , we have either vol(Γi (x)) ≥ α · r i or Thus, by Equation (5), we have vol(Ni (x)) ≥ n2/3 . Pr[Ei | E0 , . . . , Ei−1 ] ≤ 2−Θ(r Ω(i) ) . Since Pr[E0 ] = Ω(1), we may lower bound the probability that all events happen simultaneously ! k−1  Y −Θ(r Ω(i) ) 1−2 Pr[E0 , . . . , Ek−1 ] ≥ Ω i=0 ≥ Ω(1). C.2 Proof of Growth Lemma 7: 2 < β < 3 Let us first upper bound the volume of k-neighborhood of any vertex x. Upper bounding vol(Γk (x)) We will upper bound vol(Γk (x)) in terms of vol(Γk−1 (x)). First, we have vol(Γ0 (x)) = vol(x) by definition. For any vertex y, the probability that it is connected to some vertex in Γk−1 (x) is at most X z∈Γk−1 (x) py · vol(Γk−1 (x)) pz = py · . vol(V ) vol(V ) Thus, the probability that Γk (x) contains any vertex with very high weight is low: h i Pr ∃y, py ≥ (vol(Γk−1 (x)))1/(β−2) · w, y ∈ Γk (x) | vol(Γk−1 (x)) X vol(Γk−1 (x)) ≤ py · vol(V ) y:py ≥(vol(Γk−1 (x)))1/(β−2) ·w   vol(Γk−1 (x)) 1 · ≤ O n· vol(Γk−1 (x)) · wβ−2 vol(V ) = O(1/wβ−2 ). That is, the highest weight in Γk (x) is at most w · (vol(Γk−1 (x)))1/(β−2) with probability at least 1 − O(1/wβ−2 ). Denote this event by Ek . We have E[vol(Γk (x)) | Ek , vol(Γk−1 (x))] ≤ X y:py ≤(vol(Γk−1 (x)))1/(β−2) ·w  By Markov’s inequality, we have p2y · vol(Γk−1 (x)) vol(V ) (3−β)/(β−2) ≤ O n · vol(Γk−1 (x)) ·w   ≤ O vol(Γk−1 (x))1/(β−2) · w3−β . 3−β vol(Γk−1 (x)) · vol(V )  Pr[vol(Γk (x)) ≥ vol(Γk−1 (x))1/(β−2) · w | Ek ] ≤ O(1/wβ−2 ). Since Ek occurs with high probability, by union bound, we have Pr[vol(Γk (x)) ≥ vol(Γk−1 (x))1/(β−2) · w] ≤ O(1/wβ−2 ). On the other hand, we have 1/(β−2) vol(Γk−1 (x))1/(β−2) · w ≤ bk−1 ·w 2(k−1) (3−β) = (ck−1 · w1/(β−2) 2k−1 (3−β)+1 = ck · w1/(β−2) )1/(β−2) · w 2k (3−β))·(β−2+(3−β)(β−2)2k ) = ck · w(1/(β−2) ≤ bk . Thus, we have Pr[vol(Γk (x)) > bk ] ≤ O(1/wβ−2 ). Lower Bounding vol(Γk (x)) For any vertex y, if py · pz ≥ vol(V ) for some z ∈ Γk−1 (x), then y must be connected to Γk−1 (x), otherwise the probability that y does not connect to Γk−1 (x) is at most  P py ·pz Y  py · pz − z∈Γ k−1 (x) vol(V ) 1− ≤e vol(V ) z∈Γk−1 (x) −py · =e vol(Γk−1 (x)) vol(V ) . −p · vol(Γk−1 (x)) That is, in either case, if y ∈ / Nk−1 (x), then Pr[y ∈ / Γk (x)] ≤ e y vol(V ) . When n is large enough, we have bk−1 < ak , and Nk−1 (x) does not contain high weight vertex by the premises of the lemma. Therefore, the probability that Γk (x) contains no high weight vertex is low: Pr[∀y, s.t. py ≥ ak , y ∈ / Γk (x)] ≤ Y −py · e vol(Γk−1 (x)) vol(V ) y:py ≥ak P vol(Γk−1 (x)) − y:py ≥a py · vol(V ) =e k −Ω(a2−β ·ak−1 ) k ≤e = e−Ω(w = e−Ω(w 1/(β−2)2k−1 (3−β)−1/(β−2)2k−2 (3−β) ) 1/(β−2)2k−1 ) ≤ e−w = 1/ log n. In particular, it implies that the probability that vol(Γk (x)) < ak is at most 1/ log n. Finally, by union bound, the probability that vol(Γk (x)) ∈ [ak , bk ] is at least 1 − O(1/wβ−2 ) as the lemma states. Lower Bounding dist(x, y) By the above argument, we have Pr[dist(x, y) ≤ 2d + 3] ≤ Pr[∃0 ≤ i, j ≤ d + 1, ∃u ∈ Γi (x), v ∈ Γj (y), u ∼ v] ≤ = ≤ d+1 X Pr[∃u ∈ Γi (x), v ∈ Γj (y), u ∼ v] i,j=0 Γi (x),Γj (y) i,j=0 d+1 X d+1 X E [Pr[∃u ∈ Γi (x), v ∈ Γj (y), u ∼ v | Γi (x), Γj (y)]] (Pr[∃u ∈ Γi (x), v ∈ Γj (y), u ∼ v | Γi (x) ∈ [ai , bi ], Γj (y) ∈ [aj , bj ]] i,j=0 + Pr[Γi (x) ∈ / [ai , bi ]] + Pr[Γj (y) ∈ / [aj , bj ]]) d+1   X bi · bj /vol(V ) + O(1/wβ−2 ) ≤ i,j=0 ≤ O(b2d+1 /n + d2 /wβ−2 ) = O(n−ε/(β−2) + log2 log log n/ logβ−2 log n) = o(1). This proves the lemma.
8cs.DS
Modular Responsive Web Design using Element Queries Lucas Wiener Tomas Ekholm Philipp Haller EVRY Stockholm, Sweden KTH Royal Institute of Technology Stockholm, Sweden KTH Royal Institute of Technology Stockholm, Sweden arXiv:1511.01223v1 [cs.SE] 4 Nov 2015 [email protected] [email protected] [email protected] ABSTRACT 1. INTRODUCTION Responsive Web Design (RWD) enables web applications to adapt to the characteristics of different devices such as screen size which is important for mobile browsing. Today, the only W3C standard to support this adaptability is CSS media queries. However, using media queries it is impossible to create applications in a modular way, because responsive elements then always depend on the global context. Hence, responsive elements can only be reused if the global context is exactly the same, severely limiting their reusability. This makes it extremely challenging to develop large responsive applications, because the lack of true modularity makes certain requirement changes either impossible or expensive to realize. Responsive Web Design (RWD) is an approach to make an application respond to the viewport size and device characteristics. This is currently achieved by using CSS media queries that are designed to conditionally design content by the media, such as using serif fonts when printed and sansserif when viewed on a screen [30]. In this paper we extend RWD to also include responsive modules, i.e., modules that adapt their design based on their local context independently of the global context. We present the ELQ project which implements our approach. ELQ is a novel implementation of so-called element queries which generalize media queries. Importantly, our design conforms to existing web specifications, enabling adoption on a large scale. ELQ is designed to be heavily extensible using plugins. Experimental results show speed-ups of the core algorithms of up to 37x compared to previous approaches. In this paper we focus on the presentation layer of web applications. As it stands, using media queries to make the presentation layer responsive precludes modularity. The problem is that there is no way to make a module responsive without making it context-aware, due to the fact that media queries can only target the viewport; this means that responsive elements can only respond to changes of the (global) viewport. Thus, a responsive module using media queries is layout dependent and has both reduced functionality and limited reusability [33]. As a result, media queries can only be used for RWD of non-modular static applications. In a world where no better solution than media queries exists for RWD, changing the layout of a responsive application becomes a cumbersome task. Categories and Subject Descriptors D.2.13 [Software Engineering]: Reusable Software—reusable libraries; I.7.2 [Document and Text Processing]: Document Preparation—hypertext/hypermedia, markup languages Keywords Responsive web design, Element queries, CSS, Modularity, Web In order to reduce complexity and enable reusability, applications are typically composed of modules, i.e., interchangeable and independent parts that have a single and well-defined responsibility [20]. In order for a module to be reusable it must not assume in which context it is being used. 1.1 The Problem Exemplified Imagine an application that displays the current weather of various cities as widgets, by using a weather widget module. The module should be responsive so that more information, such as a temperature graph over time, is displayed when the widget is big. When the widget is small it should only display the current temperature. Users should also be able to add, remove and resize widgets. Such an application cannot be built using media queries, since the widgets can have varying sizes independent of the viewport (e.g., the width of one widget is 30% while another is 40%). To overcome this problem we must change the application, so that widgets always have the same sizes. This implies that the size of the module and the media query breakpoints are coupled/intertwined, i.e. they are proportional to each other. The problem now is that we have removed the reusability of the weather module, since it re- quires the specific width that is correctly proportional to the media query breakpoints. compatible with Android version 4), Safari version 5, and Opera version 12. Imagine a company working on a big application that uses media queries for responsiveness (i.e., each responsive module assumes to have a specific percentage of the viewport size). The ability to change is desired by both developers and stakeholders, but is limited by this responsive approach. The requirement of changing a menu from being a horizontal menu at the top to being a vertical menu on the side implies that all responsive modules break, since the assumed proportionality of each module is changed. Even worse, if the menu is also supposed to hide on user input, the responsiveness of the module breaks, since the layout changes dynamically. The latter requirement is impossible to satisfy in a modular way without element queries. One could argue that a solution does not need to be executed on the client side, but instead generate media queries on the server side for all modules with respect to the current application layout. However, this approach is insufficient, since it limits modules to applications with static layouts [33]. Also, the generated media queries would not be able to respond to the user changing properties of elements such as layout and font size. Additionally, it is popular to define breakpoints relative to the font size so that conditional designs respect the size of the content [10]. Media queries can only target the font size of the document root, limiting their functionality drastically. With element queries breakpoints may be defined relative to the font size of the targeted element. As we can see, even with the exemplified limited requirements there are still significant restrictions when using media queries for responsive modules. 1.2 Requirements The desired behavior of a responsive module is having its inner design respond to the size of its container instead of the viewport. Only then is a responsive module independent of its layout context. Realizing responsive modules requires CSS rules that are conditional upon elements, instead of the global viewport. We have identified the following requirements of a solution: • It must provide the possibility for an element to automatically respond to changes of its parent’s properties. • It must conform to the syntax of HTML, CSS, and JavaScript to retain the compatibility of tools, libraries and existing projects. • It must have adequate performance for large applications that make heavy use of responsive modules. • It must enable developers to write encapsulated style rules, so that responsive modules may be arbitrarily composed without any conflicting style rules. 1.3 Approach In this paper we extend the concept of RWD to also include responsive modules. The W3C has discussed such a feature under the name of element queries given its analogy to media queries [32]. This paper presents a novel implementation of element queries in JavaScript named ELQ that enables new possibilities of RWD. Our approach satisfies all requirements given in Section 1.2. We have released ELQ as an open-source library under the MIT license.1 The implementation supports all major browsers, including Internet Explorer version 8, Chrome version 42 (the last version 1 https://github.com/elqteam/elq 1.4 Contributions This paper makes the following contributions: • A new design for element queries that enables responsive modules while conforming to the syntax of HTML, CSS, and JavaScript. • Our approach is the first to enable nested elements that are responsive in a modular way, i.e., modules fully encapsulate any styling required for RWD. As a side effect, responsive modules may also be arbitrarily styled with CSS independent of their context. • An extensible architecture that enables plugins to significantly extend the behavior of ELQ, our library implementation. This makes it possible to create plugins in order to enable new features and to ease integration of ELQ into existing projects. • A new implementation that offers substantially higher performance than previous approaches. The implementation batch-processes DOM operations in order to avoid layout thrashing (i.e., forcing the layout engine to perform multiple independent layouts). • A run-time cycle detection system that detects and breaks cycles stemming from cyclic rules due to unrestricted usage of element queries [33]. The rest of the paper is organized as follows. Section 2 introduces ELQ and its API from a user’s perspective. In Section 3 we introduce ELQ’s plugin architecture. Section 4 provides an overview of the main components of ELQ’s implementation. In Section 5 we evaluate the performance of ELQ and report on case studies. Section 6 discusses limitations of ELQ and related libraries, as well as the current state of standardization of element queries. Section 7 relates ELQ to prior work, and Section 8 concludes. 2. OVERVIEW OF ELQ Media queries and element queries are similar in the sense that they both enable developers to define conditional designs that are applied by specified criteria. The main difference is the type of criteria that can be used. With media queries critera of the device, document, and media are used, while element criteria are used with element queries. It can somewhat simplified be described as that media queries target the document root and up such as viewport, browser, device, and input mechanisms. Element queries target the document root and down, i.e., elements of the document. ELQ is designed to be plugin-based for increased flexibility and extensibility. By providing a good library foundation and plugins it is up to developers to choose the right plugins for each project. In addition, by letting the plugins satisfy the requirements it is easy to extend the library with new plugins when new requirements arise. An element breakpoint is defined as a point of an element property range which can be used to define conditional behavior, similar to breakpoints of media queries. For example, an element breakpoint of 500 pixels in width enables conditional styling depending on if the element is narrower or wider than 500 pixels. An element may have multiple breakpoints. An element breakpoint state is defined as the state of the element breakpoint relative to the current element property value. For example, if an element that is 300 pixels wide has two width breakpoints of 200 and 400 pixels the element breakpoint states are “wider than 200 pixels” and “narrower than 400 pixels”. When the breakpoint states of an element changes, ELQ performs cycle detection in order to detect and handle possible style cycles. If a cycle is detected, the new element breakpoint states are not applied in order to avoid an infinite loop of layouts. The cycle detection system is implemented as an conservative algorithm, and may in some cases detect false positives. 2.1 The API In this section, we use the elq-breakpoints API (that is bundled with ELQ as default) that let use define element breakpoints. The main idea is to define element breakpoints of interest so that children can be conditionally styled in CSS by targeting the different element breakpoint states. As CSS3 does not support custom at-rules/selectors [31], responsive elements are annotated in HTML by element attributes. ELQ then observes the annotated elements in order to automatically update breakpoint state classes. Although not written in the examples, the API also supports attributes defined with the data- prefix to conform to the HTML standard [29]. The following example shows the HTML of an element that has two annotated width breakpoints at 300 and 500 pixels: <d i v c l a s s =”f o o ” e l q e l q −b r e a k p o i n t s e l q −b r e a k p o i n t s−w i d t h s =”300 500”> <p>When i n doubt , mumble. </p> </d i v> When ELQ has processed the element it will have two classes that reflect each breakpoint state. For instance, if the element is 400 pixels wide, the element has the two classes elqmin-width-300px and elq-max-width-500px. Similarly, if the element is 200 pixels wide the classes are instead elqmax-width-300px and elq-max-width-500px. So for each breakpoint only the min/max part changes. It may seem alien that the classes describe that the width of the element is both maximum 300 and 500 pixels. This is because we have taken a user-centric approach so that the CSS usage of the classes is similar to the API of media queries. However, developers are free to change this API by creating plugins. Now that we have defined the breakpoints of the element, we can conditionally style it in CSS by using the classes as shown in listing 1. . f o o . e l q −max−width −300px { background−c o l o r : b l u e ; } . f o o . e l q −min−width −300px . e l q −max−width −500px { background−c o l o r : g r e e n ; } . f o o . e l q −min−width −500px p { c o l o r : white ; } Listing 1: Example usage of the breakpoint state classes in CSS. In order for the conditional styles to be applied, the elements that have breakpoints must be activated by the ELQ JavaScript runtime. ELQ can either be required as a module (by the CommonJS or AMD syntax), or it can be included in a HTML script tag which then will expose a global constructor Elq. The following is an example of how to create an ELQ instance and activating elements: // C r e a t e an i n s t a n c e v a r e l q = Elq ( ) ; // P l u g i n s may be r e g i s t e r e d e l q . u s e ( myPlugin ) ; e l q . u s e ( myOtherPlugin ) ; // A c t i v a t e e l e m e n t s . v a r e l e m e n t s = document . q u e r y S e l e c t o r A l l ( ”[ e l q ] ” ) ; e l q . a c t i v a t e ( elements ) ; In this example we create an ELQ instance and register two plugins with it. Then we query the document for all elements with an elq attribute (as annotated in the previous example) and then pass them as an argument to the activation method of ELQ. It should be noted that it is up to developers how to activate elements; annotating elements with elq is used for simplicity in the example. The only requirement is that conditionally-styled elements are processed by the activate method at some point. This can, for example, also be achieved with a plugin that listens to DOM mutations to perform the activation automatically, or a plugin that parses CSS and activates all elements that have conditional styles defined. 2.1.1 Nested modules The elq-breakpoints API is sufficient for applications that do not need nested breakpoint elements, and similar features are provided by related libraries such as [22, 34]. However, using such an API in responsive modules still limits composability, since modules then may not exist in an outer responsive context. The reason this API is not sufficient for nested modules is that there is no way to limit the CSS matching search of the selectors. The last style rule of the example given in listing 1 specifies that all paragraph elements should have white text if any ancestor breakpoints element is wider than 500 pixels. Since the ancestor selector may match elements outside of the module, such selectors are dangerous to use in the context of responsive modules. The problem may be somewhat reduced by more specific selectors and such, but it cannot be fully solved for arbitrary styling [33]. To solve this problem, we provide a plugin that let us define elements to “mirror” the breakpoints classes of the nearest ancestor breakpoints element (the target of the mirror element). This means that the mirror element always reflects the element breakpoint states of the target. Then, the conditional style of the mirror element may be written as a combinatory selector that is relative to the nearest ancestor breakpoints element. The following is an example usage of the mirror plugin to enable nested modules: <d i v c l a s s =”f o o ” e l q e l q −b r e a k p o i n t s e l q −b r e a k p o i n t s−w i d t h s =”300 500”> <d i v c l a s s =”f o o ” e l q e l q −b r e a k p o i n t s e l q −b r e a k p o i n t s−w i d t h s =”300 500”> <p e l q e l q −m i r r o r > . . . < / p> </d i v> <p e l q e l q −m i r r o r > . . . < / p> </d i v> In this example, the paragraph elements always have the same element breakpoint classes as the parent elq-breakpoints elements. This enables us to write CSS that does not traverse the ancestor tree: . foo { /∗ So t h a t t h e n e s t e d modules have d i f f e r e n t s i z e ∗/ wi d t h : 50%; } . f o o p . e l q −min−width −500px { c o l o r : white ; } In the examples we have given so far we have annotated element breakpoints manually; however, this does not properly show the power and flexibility of ELQ’s API. Therefore, the next section presents an API that combines JavaScript and generated CSS in order to create a flexible grid API. 2.1.2 A grid API In this section we present a plugin that defines an API that enables developers to use responsive grids consisting of twelve columns and utility classes very similar to the ones defined by the CSS Bootstrap framework [19]. The goal of the API is to provide an abstraction of element queries, so that developers may focus on responsivity using classes instead of the syntax presented in previous sections. The following is an example grid: <d i v c l a s s =”c o n t a i n e r ”> <d i v c l a s s =”row”> <d i v c l a s s =”c o l −500−4 c o l −700−6”> ... </d i v> <d i v c l a s s =”c o l −500−4” c o l −700−6> ... </d i v> <d i v c l a s s =”c o l −500−4 hidden −700−up”> ... </d i v> </d i v> </d i v> The example grid is defined to be single columned when the width of the grid is below 500 pixels, triple columned when the width is between 500 and 700 pixels, and double columned for when the width is above 700 pixels. The last column is hidden when the width is above 700 pixels. The column classes define the behaviour of the grid, and have the syntax col-[breakpoint]-[size]. The [breakpoint] part of a column class is relative to the parent row and can be any positive number including an optional unit. Currently, the supported units are px, em, rem. If the unit is omitted, px is assumed. Grids may also be nested. The plugin traverses the grid structure to initialize all columns and possible nested grids. It also generates and applies the CSS needed for each column breakpoint automatically to the document. This enables developers to easily create responsive grids in nestable modules. 3. EXTENSIONS VIA PLUGINS For example, if annotating HTML is undesired it is possible to create a plugin that instead generates element breakpoints by parsing CSS. Likewise, if adding breakpoint state classes to elements is undesired it is possible to create a plugin that does something else when an element breakpoint state has changed. A plugin is defined by a plugin definition object and has the structure shown in listing 2. var m y P l u g i n D e f i ni ti o n = { getName : f u n c t i o n ( ) { r e t u r n ”my−p l u g i n ”; }, getVersion : function () { r e t u r n ”0 . 0 . 0 ”; }, isCompatible : f u n c t i o n ( e l q ) { return true ; }, make : f u n c t i o n ( e l q , o p t i o n s ) { return { // Implement p l u g i n i n s t a n c e methods . ... }; } }; Listing 2: The structure of plugin definition objects. All of the methods are invoked when registered to an ELQ instance. The getName and getVersion methods tells the name and version of the plugin. The isCompatible tells if the plugin is compatible with the ELQ instance that it is registered to. In the make method the plugin may initialize itself to the ELQ instance and return an object that defines the plugin API accessible by ELQ and other plugins. ELQ invokes certain methods of the plugin API, if implemented, to let plugins decide the behavior of the system. Those methods are the following: • activate(element) Called when an element is requested to be activated, in order for plugins to initialize listeners and element properties. • getElements(element) Called in order to let plugins reveal extra elements to be activated in addition to the given element. • getBreakpoints(element) Called to retrieve the current breakpoints of an element. • applyBreakpointStates(element, breakpointStates) Called to apply the given element breakpoint states of an element. Plugins may also use an extended API of ELQ that offers access to subsystems such as the plugin handler, cycle detector, batch processor, etc. The extended API is exposed to plugins as an argument to the make method of the plugin definition object. In addition, plugins may set behavior properties of an element by the element.elq property. It is also possible for plugins to define own behavior properties for inter-plugin collaboration, or for storing plugin-specifc element state. Examples of behavior properties of the ELQ core are: In addition, plugins may also listen to the following ELQ events: • resizeDetection Indicates if resize detection should be performed. • resize(element) Emitted when an ELQ element has changed size. • cycleDetection Indicates if cycle detection should be performed. • breakpointStatesChanged(element, breakpointStates) Emitted when an element has changed element breakpoint states (e.g., when the width of an element changed from being narrower to being wider than a breakpoint). • updateBreakpoints Indicates if the element should be passed through the update flow. • applyBreakpointStates Indicates that plugins may apply breakpoint states of the element (for some elements it is only necessary to emit element breakpoint state changes, without applying them to the actual element [33]). There are two main flows of the ELQ system; activating an element and updating an element. When ELQ is requested to activate an element, the following flow occurs: 1. Initialize the element by installing properties and a system that handles listeners. 2. Call the getElements method of all plugins to retrieve any additional elements to activate. Perform an activation flow for all additonal elements. 3. Call the activate method of all plugins, so that pluginspecific initialization may occur. 4. If any plugin has requested ELQ to detect resize events of the element, install a resize detector to the element. 5. Pass the element through the update flow. 3.1 Example Plugin Implementation The elq-breakpoints API that enables developers to annotate breakpoints in HTML, as described in Section 2.1, is implemented as two plugins. This shows that even the core functionality of ELQ is implemented in terms of plugins. The first plugin parses the breakpoints of the element attributes. The second plugin applies the breakpoint states as classes. The following is a simplified implementation of the make method (see listing 2) of the parsing plugin: f unc tion a c t i v a t e ( element) { i f ( ! e l e m e n t . h a s A t t r i b u t e ( ” e l q −b r e a k p o i n t s ”) ) { return ; } element . element . element . element . The update flow is as follows: 1. Call the getBreakpoints method of all plugins to retrieve the breakpoints of the element. 2. Calculate the breakpoint states of the element. 3. If any state has changed since the previous update: (a) Perform cycle detection. If a cycle is detected, then abort the flow and emit a warning. (b) Call the applyBreakpointStates method of all plugins in order for plugins to apply the new element breakpoint states. (c) Emit an breakpointStatesChanged event. Of course, there are options to disable some of the steps such as cycle detection and applying breakpoint states. In additon to being triggered by the activation flow and plugins, the update flow is also triggered by element resize events. elq elq elq elq . . . . resizeDetection updateBreakpoints applyBreakpointStates cycleDetection = = = = true true true true ; ; ; ; } f unc tion getBreakpoints ( element) { // P a r s e t h e ” e l q −b r e a k p o i n t s −∗” a t t r i b u t e s // and r e t r i e v e t h e i r b r e a k p o i n t s . return . . . ; } // Return t h e p l u g i n API return { activate : activate , getBreakpoints : getBreakpoints }; In the activate method the plugin registers that resize detection is needed for the element and that it should be passed through the update flow. It also enables the application of breakpoint states and run-time cycle detection. Although not shown in the simplifed implementation, applyBreakpointStates and cycleDetection are in some cases disabled. The plugin that applies the element breakpoint states simply implements the applyBreakpointStates method to alter the className property of the element using the given element breakpoint states. 4. IMPLEMENTATION 4.1 Batch Processing Batch processing is the foundation of the performance gains of our approach, and is therefore used by several subsystems. ELQ uses a leveled batch processor, which is implemented as a stand-alone project.2 It serves two purposes: to process batches in different levels to avoid layout thrashing, and to automatically process batches asynchronously to enable multiple synchronous calls being grouped into a pending batch. Being able to process a batch in levels is important when different types of operations, that are to be processed in a specific order (usually to avoid layout thrashing), needs to be grouped together in a batch. For example, a function that doubles an element’s width and reads the new calculated height benefits by being batch processed in three levels: reading the width, mutating the width, and reading the height. The following is an example implementation of such function that uses the leveled batch processor: var b a t c h P r o c e s s o r = . . . ; f u n c t i o n doubleWidth ( e l e m e n t , c a l l b a c k ) { // F i r s t l e v e l : r e a d i n g t h e wi d t h . v a r wi d t h = e l e m e n t . o f f s e t W i d t h ; v a r newWidth = ( wi d t h ∗ 2 ) + ”px ”; // Second l e v e l : m u t a t i n g t h e wi d t h . // Th i s i s e x e c u t e d i n l e v e l 0 o f t h e b a t c h . b a t c h P r o c e s s o r . add ( 0 , f u n c t i o n mutateWidth ( ) { e l e m e n t . s t y l e . wi d t h = newWidth ; }); // Th i r d l e v e l : r e a d i n g t h e h e i g h t . // Th i s i s e x e c u t e d i n l e v e l 1 o f t h e batch , // a f t e r l e v e l 0 . Changing t h e l e v e l number // from ”1 ” t o ”0 ” r e s u l t s i n l a y o u t t h r a s h i n g . b a t c h P r o c e s s o r . add ( 1 , f u n c t i o n r e a d H e i g h t ( ) { var h e i g h t = element . o f f s e t H e i g h t ; callback ( height ) ; }); } It should be noted that the first level is executed asynchronously by the function, and not handled by the actual batch processor. Since each batch is delayed to execute asynchronously, all synchronous calls of the method is grouped into a pending batch. If the batch would not automatically be delayed, layout thrashing would occur when the method is called multiple times. This results in a 45-fold speedup, when applied to 1000 elements, of the function compared to not processing the batch in levels. It also results in a simple API that allows multiple synchronous calls without causing layout thrashing, like so: The activate method of ELQ is implemented similarly so it may also be called multiple times synchronously, without performance penalties, like the following example: var elements = [ . . . ] ; elements . forEach ( e l q . a c t i v a t e ) ; 4.2 Element Resize Detection Unfortunately, there is no standardized resize event for arbitrary elements [28]. A naive approach to detecting element resize events is to have a script continously check elements if they have resized given some interval (polling). This approach is appealing because it does not mutate the DOM, supports arbitrary elements, and it provides excellent compatibility. However, in order to prevent the responsive elements lagging behind the size changes of the user interface, polling needs to be performed quite frequently. The problem is that each poll forces the layout queue to be flushed since the computed style of elements needs to be retrieved in order to know if elements have resized or not [33]. Since the polling is performed all the time the overall page performance is decreased even if the page is idle, which is undesired especially for mobile devices running on battery. It is desired to instead have an event-based approach that only performs additional computations when an actual element resize has happened. This is achieved by the resize detection subsystem of ELQ by using two independent injecting approaches, both originally presented by [6]. These appraoches are limited to non-void elements, i.e., elements that may have content. It is a reasonable limitation since void elements can easily be wrapped with non-void elements without affecting the page visually. Like the batch processor, the resize detection subsystem is also implemented as a stand-alone project.3 Object-based resize detection. Only documents emit resize events in modern browsers and therefore such events can only be observed for frame elements (since a frame element has its own document). This approach injects object elements into the target element, which can be listened to resize events since object elements are frames. The object is styled so that it always matches the size of the target element and so that it does not affect the page visually. This approach has good browser compatability and excellent resize detection performance, but imposes severe performance impacts during injection since object elements use a significant amount of memory as shown in Section 5.1. Scroll-based resize detection. This approach injects an var elements = [ . . . ] ; elements . forEach ( f u n c t i on ( element ) { doubleWidth ( e l e m e n t , f u n c t i o n ( h e i g h t ) { ... }); }); element that contains multiple overflowing elements that listen to scroll events. The overflowing elements are styled so that scroll events are emitted when the target element is resized. For detecting when the target element shrinks, two elements are needed; one for handling the scrollbars and one for causing them to scroll. Similarly, for detecting when the target element expands, two elements are needed in the same way. As this solution only injects div elements, it offers greater opportunities for optimizations. The main algorithm 2 3 https://github.com/wnr/batch-processor https://github.com/wnr/element-resize-detector that is performed when an element e is to be observed for resize events is the following: 1. Get the computed style of e. 2. If the element is positioned (i.e., position is not static) the next step is 4. 3. Set the position of e to be relative. Here additional checks can be performed to warn the developer about unwanted side effects of doing this. 4. Create the four elements needed (two for detecting when e shrinks, and two for detecting when e expands) and attach event handlers for the scroll event of the elements. When the elements have been styled and configured properly, they are added as children to an additional container element that is injected into e. penalties of the library. Also, it is hard to compare performance results of related libraries since the functionality is different. Fortunately, element resize detection is the common denominator of all automatic libraries and the results of this system can be compared faithfully. Measurements and graphs show evaluations performed in Chrome version 42 unless stated otherwise. The object-based approach (as presented by [6]) performs well when detecting resize events, which it does with a delay of 30 ms for 100 elements. However, the injection performance is not great as presented in figure 1. As shown by the graph, the injection can be performed with adequate performance as long as the number of elements is low. The approach does not scale well as the number of elements increases. This is probably due to the fact that the heap memory usage grows roughly by 0.55 MB per element. 5. The current size of e is stored and the scrollbars of the injected elements are positioned correctly. Injection time [s] 6 6. The algorithm waits for the scroll event handlers to be called asynchronously by the layout engine (they are called since the previous step repositioned the scrollbars). When the handlers have been called, the injection is finished and observers can be notified on resize events of e when scroll events occur. 4 2 0 0 Layout thrashing can be avoided by using the leveled batch processor described in Section 4.1, which results in a significant performance improvement as shown in Section 5.1. The algorithm steps are batch processed in the following levels: 1. The read level: Step 1 is performed to obtain all necessary information about e. The information is stored in a shared state so that all other steps can obtain the information without reading the DOM. 2. The mutation level: Steps 2, 3 and 4 are performed, which mutate the DOM. All mutations performed in this level can be queued by layout engines. 3. The forced layout level: Step 5 is performed, which forces the some layout engines to perform a layout. Since repositioning a scrollbar in some layout engines forces a layout, such operations need to be performed after that all other queueable operations have been executed. Therefore, step 5 is performed in level 3 as the last step. Even though some layout engines are unable to queue the repositing of scrollbars, it is still beneficial to batch process the algorithm since only pure layouts need to be performed (instead of having to recompute styles and synchronize the DOM and render trees before each layout). As step 6 is performed by the layout engine asynchronously and does not interact with the DOM, it does not need to be batch processed. 5. EMPIRICAL EVALUATION 5.1 Performance Only the performance of the element resize detection system has been performed. This due to the fact that detecting element resize events entails the significant performance 200 400 600 Number of elements Object-based approach Figure 1: The injection performance of the objectbased approach. As the scroll-based approach (as presented by [6]) does not inject object elements the memory footprint is reduced significantly, which improves the injection performance. The amount of used memory is too low for reliable measurements. See figure 2 for graphs that show how the ELQ scroll-based approach performs compared to the other two approaches. As evident in the figure, the optimized ELQ approach has significantly reduced injection times. It achieves a 37-fold speedup compared to the object-based approach and a 17fold speedup compared to the scroll-based approach when preparing 700 elements for resize detection. It also performs well when detecting resize events, which it does with a delay of 25 ms for 100 elements. Browsers Chrome v. 42 Firefox v. 40 Safari v. 9 Internet Explorer v. 11 iOS Safari v. 9 Android v. 5 Chrome v. 39 Injection scroll object 30 ms 550 ms 150 ms 1000 ms 100 ms 400 ms 350 ms 6700 ms 350 ms 1600 ms 40 ms 1000 ms Resize detection scroll object 25 ms 20 ms 70 ms 30 ms 30 ms 20 ms 100 ms 80 ms 150 ms 60 ms 20 ms 10 ms Table 1: Performance of ELQ’s two resize detection strategies, operating on 100 elements. ELQ uses the object-based approach as a fallback for legacy browsers. Therefore the performance of the ELQ resize detection system is at minimum as performant as related approaches. See table 1 for the performance of ELQ’s two resize detection strategies in different browsers. As shown in the table, the scroll-based approach is suitable for reduced page load, but may in some cases be preferred for better resize detection performance. 5.2 Case studies In this section we aim to provide answers to the following questions: • How can ELQ be used to modularize existing responsive code bases? • How much effort is this modularization? In order to answer the questions, we have adapted the popular Bootstrap framework4 to use element queries instead of media queries. According to its website, “Bootstrap is the most popular HTML, CSS, and JS framework for developing responsive, mobile first projects on the web.” [19] In order to modularize Bootstrap, we redefine the behavior of its responsive elements so that they no longer respond to the viewport but to enclosing container elements. The following observation guides our modularization: all responsive elements should respond to their closest enclosing container or container-fluid element. Both classes are used in Bootstrap to define new parts of a page (e.g., a grid is required to have a container ancestor). We also enable them to be nestable, which is important to satisfy the requirement of composable modules. The breakpoints of the container elements are defined using the elq-breakpoints API (see Section 2.1). Since the Bootstrap API uses a predefined set of breakpoints, they are all added to the container elements with JavaScript. According to this design, we convert all responsive elements of Bootstrap to elq-mirror elements, since they need to mirror the breakpoints of the nearest ancestor elq-breakpoints element. Since container elements may be nested, they have both the elq-breakpoints and elq-mirror behavior. The breakpoints of Bootstrap are defined as the following constants:5 @ sc r e e n−sm−min : 480 px ; @ sc r e e n−md−min : 992 px ; @ sc r e e n−l g −min : 1200 px ; The following example shows how Bootstrap’s style definitions are changed from using media queries to using ELQ’s element queries: /∗ F i l e ” l e s s / g r i d . l e s s ” o f B o o t s t r a p . ∗/ // O r i g i n a l B o o t s t r a p u s i n g media q u e r i e s . . container { @media ( min−wi d t h : @ sc r e e n−sm−min ) { wi d t h : @ c o n t a i n e r −sm ; } ... } . container { &. e l q −min−width−@{ s c r e e n −sm−min} { wi d t h : @ c o n t a i n e r −sm ; } ... } By using the power of preprocessors, ELQ element queries become as pleasant to work with as media queries. In fact, only about 0.6% of the style code (LESS syntax) need to be altered. Most changes are similar to the one shown above, which replaces the media query syntax with the ELQ element queries syntax. This is especially advantageous when keeping a forked project up to date with the original project, as fewer diverged lines implies a lowered risk of merge conflicts. In summary we have shown that it is easy to adapt existing responsive code to use ELQ’s element queries instead of media queries. With only a small number of changes, the widely used Bootstrap framework can be modularized. Industrial use of ELQ. In addition to the Bootstrap case study, we have been gathering experience with the application of ELQ in large financial applications at EVRY. Our practical experience shows that complex applications require a variety of features to be supported by element queries. Such features can be provided effectively by ELQ plugins. 6. DISCUSSION 6.1 Limitations Inherent to all current implementations of element queries is that the conditional style is applied “one layout behind”. Since a layout pass needs to have been performed in order for an element to change size, the conditional styles defined by the element queries cannot be applied until next layout. Therefore, the element will display invalid design until another layout has been performed. The flash of invalid design is usually so short that users do not notice it, but in some cases developers need to work around this issue to avoid more apparent results. Another caveat is presented by the element resize detection approaches, as they mutate the DOM. Developers need to be aware of this as CSS selectors and JavaScript may also match the injected elements. This is easily avoided by good practices. It should be noted that all limitations described only affects the elements that uses the element queries functionality. ELQ does not impose potential problems to other parts of the DOM other than where applied explicitly. Currently ELQ only supports breakpoints for the width and height element properties, as it has been identified as the general use case [33]. In the future, we aim to support plugins to define custom breakpoint properties. // ELQ B o o t s t r a p u s i n g e l e m e n t q u e r i e s . 4 6.2 Standardization 5 It is stated on the W3C’s www-style mailing list [32] by Zbarsky of Mozilla, Atkins of Google and Sprehn of Google This evaluation uses Bootstrap version 3.3.2. The Bootstrap CSS is generated using the LESS preprocessor [25] whose syntax we use. Implementation MagicHTML [9] EQCSS [13] Element Media Queries [21] Localised CSS [3] Grid Style Sheets 2.0 [8] Class Query [27] breakpoints.js [26] MediaClass [17] ElementQuery [16] Responsive Elements [15] SickleS [18] Responsive Elements [34] breaks2000 [12] eq.js [22] Element Queries [7] CSS Element Queries [24] Selector queries and responsive containers [14] ELQ Syntax Custom Custom Custom Custom Custom - CSS CSS CSS CSS CSS Resize detection Viewport only Non-void elements Arbitrary elements Arbitrary elements Viewport only Viewport only Viewport only Viewport only Viewport only Viewport only Viewport only Viewport only Non-void elements Non-void elements Arbitrary elements Page dynamism Static Dynamic Dynamic Dynamic Dynamic Static Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Dynamic Composability Full support Partial support - Cycle detection - Non-void elements Dynamic Full support Yes Table 2: Classification of related approaches to modular RWD. that element queries are infeasible to implement without restricting them. By limiting element queries to specially separated container elements that can only be queried by child elements, many of the problems are resolved [2, 1]. Therefore, the Responsive Issues Community Group (RICG) is currently investigating the possibility of standardizing container queries. Unfortunately, even such limited container queries requires significant effort to implement due to the complex changes to browsers required [1]. Atkins argues that a full implementation that avoids the double layout issue is unlikely to be implemented, and therefore it might be wiser to pursue sub-standards that aids third-party solutions instead. In the future, we hope that ELQ may use the aiding substandards pushed by RICG, to achieve greater flexibility and performance. A standardized resize event would enable us to avoid injecting elements, and to reduce the code base of ELQ significantly. Support for custom at-rules/selectors would also enable us to define a more natural API in CSS. Finally, being able to tell elements to ignore children while computing their size would decrease the need for cycle detection. 7. RELATED WORK Table 2 attempts to classify all existing approaches, of modular RWD, known to us. We discuss these approaches according to two different aspects: (a) syntax extensions and (b) resize detection. Syntax extensions. The libraries [9, 13, 21, 3, 8] have in common that they require developers to write custom CSS, unlike ELQ. Since they do not conform to the CSS standard, new features are supported through custom CSS parsed using JavaScript. As shown by [13, 8] quite advanced features can be implemented this way. Additionally, adding new CSS features implies that it is possible to implement a solution to element queries that does not require any changes to the HTML, which may be preferable since all styling then can be written in CSS. However, there are numerous drawbacks with libraries that require custom CSS. Extending the CSS syntax violates the requirement of compatability and also introduces a compilation step which decreases the performance [33]. Resize detection. The libraries [13, 26, 17, 16, 15, 18, 34, 12, 22] simply observe the viewport resize event, which may be enough for static pages, but not enough to satisfy the requirements of reusable responsive modules [33]. Approach [27] does not detect resize events at all. Like ELQ, [3, 14, 21, 8, 7, 24] observe elements for resize events. The libraries [3, 14] use polling while ELQ and [21, 8, 7, 24] use different injection approaches, as described in Section 4.2. As shown in Section 5.1, the injection approaches used by related libraries have significanly less performance than the element resizing detection system used in ELQ. Constraint-based CSS. CCSS [4] proposes a more general and flexible alternative to CSS. As the name suggests, the idea of CCSS is to layout documents based on constraints. According to its authors, the constraint-based approach provides extended features and reduced complexity compared to CSS. To solve the constraints CCSS uses the Cassowary constraint solving algorithm [5]. The Grid Style Sheets library [8] builds upon the ideas of CCSS and uses a JavaScript port [23] of Cassowary to solve the constraints at runtime. While not directly offering element queries, the library enables the possibility to conditionally style elements by element criteria and thus makes it a good candidate to solve the problem of responsive modules. However, the library has two major issues: performance and browser compatibility [11]. One approach to resolve both issues is to precompute the layout in a compilation step at the server. However, precompiling styles implies static layouts. The authors discuss other approaches [11] that would increase the performance while limiting the dynamism of page layout. In contrast, ELQ only considers element queries, but without these limitations and with higher performance. 8. CONCLUSION Responsive Web Design (RWD) enables web applications to adapt to the characteristics of different devices, which is achieved using CSS media queries. However, using media queries it is impossible to create responsive applications in a modular way, because responsive elements then always depend on the global context. This paper extends RWD to also include responsive modules through element queries. We present ELQ, an open-source implementation of our approach, that conforms to the current standards of HTML, CSS and JavaScript. It enables developers to create responsive modules that are independent of their context, and a way to encapsulate their conditional style rules. The element resize detection of ELQ, used to automatically evaluate element queries on changes of responsive elements, performs up to 37x better than previous algorithms. Using a case study based on the popular Bootstrap framework we show that large code bases using media queries can be converted to using ELQ’s element queries with little effort. Changing only about 0.6% of the LOC of style related code was sufficient to enable the use of Bootstrap in responsive modules. We also report on first commercial usage of ELQ. We believe ELQ is an important contribution to realizing a modular form of element queries, in particular since standardization bodies like the RICG do not intend to standardize a complete solution. In the future we intend to improve ELQ by using forthcoming standards developed by the RICG to avoid some current limitations. 9. ACKNOWLEDGMENTS The authors would like to thank EVRY for sponsoring the ELQ project including the supporting projects for element resize detection and batch processing. 10. REFERENCES [1] CSS containment draft. Retrieved April 29, 2015 from https://github.com/ResponsiveImagesCG/cq-usecases/issues/7. [2] RICG IRC log. Retrieved April 29, 2015 from http://ircbot.responsiveimages.org/bot/log/respimg/2015-03[3] C. Ashton. Localised CSS. Retrieved April 29, 2015 from https://github.com/ChrisBAshton/localised-css. [4] G. J. Badros, A. Borning, K. Marriott, and P. Stuckey. Constraint cascading style sheets for the web. In Proceedings of the 12th annual ACM symposium on User interface software and technology, pages 73–82. ACM, 1999. [5] G. J. Badros, A. Borning, and P. J. Stuckey. The cassowary linear arithmetic constraint solving algorithm. ACM Trans. Comput.-Hum. Interact, 8(4):267–306, 2001. [6] D. Buchner. Backalleycoder. Retrieved March 23, 2015 from http://www.backalleycoder.com/. [7] D. Buchner. Element Queries. Retrieved April 29, 2015 from https://github.com/csuwildcat/element-queries. [8] e. a. Dan Tocchini. Grid Style Sheets 2.0. Retrieved April 29, 2015 from http://gridstylesheets.org/. [9] G. Felipe. MagicHTML. Retrieved April 29, 2015 from https://github.com/gabriel-felipe/MagicHTML. [10] L. Gardner. The EMs have it: Proportional media queries FTW! Retrieved April 28, 2015 from http://blog.cloudfour.com/the-ems-have-it-proportional-medi [11] Grid Style Sheets. Element queries with precompilation. Retrieved June 8, 2015 from https://github.com/gss/engine/issues/178. [12] D. Hägglund. breaks2000. Retrieved April 29, 2015 from https://github.com/judas-christ/breaks2000. [13] T. Hodgins and M. Euzière. EQCSS. Retrieved April 29, 2015 from http://elementqueries.com/. [14] A. Hume. Selector queries and responsive containers. Retrieved April 29, 2015 from https://github.com/ahume/selector-queries/. [15] K. Hunaid. Responsive Elements. Retrieved April 29, 2015 from https://github.com/kumailht/responsive-elements. [16] T. Matanich. ElementQuery. Retrieved April 29, 2015 from https://github.com/tysonmatanich/elementQuery. [17] J. Neal. MediaClass. Retrieved April 29, 2015 from https://github.com/jonathantneal/MediaClass. [18] T. Nguyen. SickleS. Retrieved April 29, 2015 from http://singggum3b.github.io/SickleS/. [19] M. Otto and J. Thornton. Bootstrap. Retrieved October 15, 2015 from http://getbootstrap.com/. [20] D. L. Parnas. On the criteria to be used in decomposing systems into modules. Communications of the ACM, 15(12):1053–1058, 1972. [21] F. Remy. Element Media Queries. Retrieved April 29, [22] [23] [24] [25] [26] [27] [28] [29] [30] [31] [32] [33] [34] 2015 from https://github.com/FremyCompany/prollyfill-min-width/. S. Richard. eq.js. Retrieved April 29, 2015 from https://github.com/Snugug/eq.js. A. Russell. Cassowary/JS. Retrieved April 28, 2015 from https://github.com/slightlyoff/cassowary.js. M. J. Schmidt. CSS Element Queries. Retrieved April 29, 2015 from https://github.com/marcj/css-element-queries. A. Sellier. LESS. Retrieved October 10, 2015 from http://lesscss.org/. J. Stoutenburg. breakpoints.js. Retrieved April 29, 2015 from https://github.com/reusables/breakpoints.js. M. Stow. Class Query. Retrieved April 29, 2015 from https://github.com/stowball/Class-Query. W3C. Document object model events. Retrieved March 14, 2015 from http://www.w3.org/TR/DOM-Level-2/events.html. W3C. HTML 5.1. Retrieved October 10, 2015 from http://www.w3.org/html/wg/drafts/html/master/dom.html. W3C. Media queries. Retrieved April 19, 2015 from http://www.w3.org/TR/css3-mediaqueries/. W3C. Selectors level 3. Retrieved March 19, 2015 from http://www.w3.org/TR/css3-selectors/. W3C. W3C public mail archive: The :min-width/:max-width pseudo-classes. Retrieved April 28, 2015 from https://lists.w3.org/Archives/Public/www-style/2013Mar/0368.html. L. Wiener. ELQ: Extensible Element Queries for Modular Responsive Web Components. Master’s thesis, KTH Royal Institute of Technology, Stockholm, Sweden, 2015. C. Worrell. Responsive Elements. Retrieved April 29, 2015 from https://github.com/coreyworrell/responsive-elements. 20 0.15 Injection time [s] Injection time [s] 15 0.1 10 5 0.05 0 0 200 400 Number of elements ELQ scroll-based solution 600 0 500 1,000 1,500 Number of elements Object-based solution Scroll-based solution ELQ scroll-based solution Figure 2: The left graph shows the injection time of the ELQ scroll-based approach. The right graph shows all three approaches, including graph predictions by polynomial regression.
6cs.PL
The NOESIS Network-Oriented Exploration, Simulation, and Induction System Vı́ctor Martı́nez,∗ Fernando Berzal,† and Juan-Carlos Cubero‡ arXiv:1611.04810v2 [cs.SI] 23 Jun 2017 Department of Computer Science and Artificial Intelligence, University of Granada, Spain Network data mining has become an important area of study due to the large number of problems it can be applied to. This paper presents NOESIS, an open source framework for network data mining that provides a large collection of network analysis techniques, including the analysis of network structural properties, community detection methods, link scoring, and link prediction, as well as network visualization algorithms. It also features a complete stand–alone graphical user interface that facilitates the use of all these techniques. The NOESIS framework has been designed using solid object–oriented design principles and structured parallel programming. As a lightweight library with minimal external dependencies and a permissive software license, NOESIS can be incorporated into other software projects. Released under a BSD license, it is available from http://noesis.ikor.org. Contents I. Introduction II. The design of the NOESIS framework A. System architecture B. Core classes C. Supported data formats D. Graphical user interface III. Network analysis tools A. Network models ∗ Electronic address: [email protected] † Electronic address: [email protected] B. Structural properties of networks C. Network visualization techniques 4 5 IV. Network data mining techniques A. Community detection B. Link scoring and prediction 6 6 8 1 2 2 2 2 3 3 3 I. INTRODUCTION Data mining techniques are intended to extract information from large volumes of data (Tan et al., 2006). Data mining includes tasks such as classification, regression, clustering, or anomaly detection, among others. Traditional data mining techniques are typically applied to tabulated data. Novel techniques have also been devised for semi-structured or structured data, since exploiting the relationships among instances from a dataset leads to new research and development opportunities (Getoor and Diehl, 2005). For example, network data mining has been used to predict previously unknown protein interactions in protein-protein interaction networks (Martı́nez et al., 2014). It has also been used to study and predict future author collaborations and tendencies in co-authorship networks (Pavlov and Ichise, 2007). Different network mining techniques are used by popular internet search engines to rank the most relevant websites (Page et al., 1999). These are only some examples of the large number of applications of network data mining. There are many software tools that facilitate the analysis of networked data. Some tools provide closed solutions for end users who need to work with their own network data sets, whereas other tools cater to software V. Conclusion 11 Acknowledgments 11 References address: [email protected] 11 ‡ Electronic developers as software libraries that collect network analysis algorithms. Most tools allow the analysis of network topology and the computation of different structural properties of networks having thousands or even millions of nodes. Some of them also include implementations of specific network data mining techniques, such as community detection algorithms or predictive models, including link prediction (Lü and Zhou, 2011) and epidemic models (Keeling and Eames, 2005). For instance, Pajek (Batagelj and Mrvar, 1998), NodeXL (Smith et al., 2009), Gephi (Bastian et al., 2009), and UCINET (Borgatti et al., 2002) are widely used for social network analysis (SNA). Graphviz (Ellson et al., 2002) and Cytoscape (Shannon et al., 2003) are two well–known alternatives for network visualization. Finally, igraph (Csardi and Nepusz, 2006) and NetworkX (Schult and Swart, 2008) are two popular software libraries of network algorithms. A more comprehensive and up–to–date list of available software tools can be found at Wikipedia: https://en.wikipedia.org/ wiki/Social_network_analysis_software. NOESIS, whose name stands for Network–Oriented Exploration, Simulation, and Induction System, is a software framework for network analysis and mining. It tries to combine the best features of closed social network analysis tools and extensible algorithm libraries, while provid- 2 The NOESIS Network-Oriented Exploration, Simulation, and Induction System GraphicalDUserDInterface 3rdDparty applications Application generator NOESISDAPI DAL: DataDAccessDLayer Data sources NOESIS ReflectiveDKernel DDHAL:DHardwareDAbstractionDLayer FIG. 1 The NOESIS framework architecture and its core subsystems. ing support for parallel execution, something that most listed tools lack. NOESIS is completely written in Java and its source code has been released under a permissive BSD open source license. Our paper is structured as follows. In Section 2, the NOESIS architectural design principles are briefly described. Section 3 covers the network analysis techniques included in NOESIS. Network data mining techniques are surveyed in Section 4. Finally, Section 5 describes the NOESIS project current status and roadmap. II. THE DESIGN OF THE NOESIS FRAMEWORK NOESIS has been designed to be an easily–extensible framework whose architecture provides the basis for the implementation of network data mining techniques. In order to achieve this, NOESIS is designed around abstract interfaces and a set of core classes that provide essential functions, which allows the implementation of different features in independent components with strong cohesion and loose coupling. NOESIS components are designed to be maintainable and reusable. A. System architecture The NOESIS framework architecture and its core subsystems are displayed in Figure 1. These subsystems are described below. The lowest-level component is the hardware abstraction layer (HAL), which provides support for the execution of algorithms in a parallel environment and hides implementation details and much of the underlying technical complexity. This component provides different building blocks for implementing well-studied parallel programming design patterns, such as MapReduce (Dean and Ghemawat, 2008). For example, we would just write result = (double) Parallel.reduce( index ->x[index] * y[index], ADD, 0, SIZE-1) to compute the dot product of two vectors in parallel. The HAL does not only implement structured parallel programming design patterns, but it is also responsible for task scheduling and parallel execution. It allows the adjustment of parallel execution parameters, including the task scheduling algorithm. The reflective kernel is at the core of NOESIS and provides its main features. The reflective kernel provides the base models (data structures) and tasks (algorithms) needed to perform network data mining, as well as the corresponding meta-objects and meta-models, which can be manipulated at run time. It is the underlying layer that supports a large collection of network analysis algorithms and data mining techniques, which are described in the following section. Different types of networks are dealt with using an unified interface, allowing us to choose the particular implementation that is the most adequate for the spatial and computational requirements of each application. Algorithms provided by this subsystem are built on top of the HAL building blocks, allowing the parallelized execution of algorithms whenever possible. The data access layer (DAL) provides an unified interface to access external data sources. This subsystem allows reading and writing networks in different file formats, providing implementations for some of the most important standardized network file formats. This module also enables the development of data access components for other kinds of data sources, such as network streaming. Finally, an application generator is used to build a complete graphical user interface following a model driven software development (MDSD) approach. This component provides a friendly user interface that allows users without programming skills to use most of the NOESIS framework features. B. Core classes The core classes and interfaces shown in Figure 2 provide the foundation for the implementation of different types of networks with specific spatial and computational requirements. Basic network operations include adding and removing nodes, adding and removing links, or querying a node neighborhood. More complex operations are provided through specialized components. NOESIS supports networks with attributes both in their nodes and their links. These attributes are defined according to predefined data models, including categorical and numerical values, among others. C. Supported data formats Different file formats have been proposed for network datasets. Some data formats are more space efficient, II The design of the NOESIS framework NetworkWriter NetworkReader 3 Network Attribute AttributeNetwork LinkAttribute NetworkRenderer FIG. 2 Some of the NOESIS core classes and interfaces represented as an UML class diagram. III. NETWORK ANALYSIS TOOLS NOESIS is designed to ease the implementation of network analysis tools. It also includes reusable implementations of a large collection of popular network–related techniques, from graph visualization (Tamassia, 2013) and common graph algorithms, to network structural properties (Newman, 2010) and network formation models (Jackson, 2008). The network analysis tools included in NOESIS and the modules that implement them are introduced in this section. whereas others are more easily parseable. NOESIS supports reading and writing network data sets using the most common data formats. For example, the GDF file format is a CSV-like format used by some software tools such as GUESS and Gephi. It supports attributes in both nodes and links. Another supported file format is GML, which stands for Graph Modeling Language. GML is a hierarchical ASCII-based file format. GraphML is another hierarchical file format based on XML, the ubiquitous eXtensible Markup Language developed by the W3C. Other file formats are supported by NOESIS, such as the Pajek file format, which is similar to GDF, or the file format of the datasets from the Stanford Network Analysis Platform (SNAP) (Leskovec and Krevl, 2014). D. Graphical user interface In order to allow users without programming knowledge to use most of the NOESIS features, a lightweight easy–to–use graphical user interface is included with the standard NOESIS framework distribution. The NOESIS GUI allows non–technical end users loading, visualizing, and analyzing their own network data sets by applying all the techniques provided with NOESIS. Some screenshots of this GUI are shown in Figure 3. A canvas is used to display the network in every moment. The network can be manipulated by clicking or dragging nodes. At the top of the window, a menu gives access to different options and data mining algorithms. The Network menu allows loading a network from an external source and exporting the results using different file formats, as well as creating images of the current network visualization both as raster and vector graphics image. The View menu allows the customization of the network appearance by setting specific layout algorithms and custom visualization styles. In addition, this menu allows binding the visual properties of nodes and links to their attributes. The Data menu allows the exploration of attributes for each node and link. Finally, the Analysis menu gives access to most of the techniques that will be described in the following sections. A. Network models NOESIS implements a number of popular random network generation models, which are described by probability distributions or random processes. Such models have been found to be useful in the study and understanding of certain properties or behaviors observed in real-world networks. Among the models included in NOESIS, the ErdösRényi model (Erdős and Rényi, 1959) is one of the simplest ones. The Gilbert model (Gilbert, 1959) is similar but a probability of existence is given for links instead. The anchored network model is also similar to the two previous models, with the advantage of reducing the occurrence of isolated nodes, but at the cost of being less than perfectly random. Finally, the connected random model is a variation of the anchored model that avoids isolated nodes. Other models included in NOESIS exhibit specific properties often found in real-world networks. For example, the Watts–Strogatz model (Watts and Strogatz, 1998) generates networks with small-world properties, that is, low diameter and high clustering. This model starts by creating a ring lattice with a given number of nodes and a given mean degree, where each node is connected to its nearest neighbors on both sides. In the following steps, each link is rewired to a new target node with a given probability, avoiding self-loops and link duplication. Despite the small-world properties exhibited by networks generated by the Watts–Strogatz model are closer to real world networks than those generated by models based on the Erdös-Rényi approach, they still lack some important properties observed in real networks. The Barabási–Albert model (Albert and Barabási, 2002) is another well-known model that generates networks whose node degree distribution follows a power law, which leads to scale-free networks. This model is driven by a preferential attachment process, where new nodes are added and connected to existing nodes with a probability proportional to their current degree. Another model with very similar properties to Barabási–Albert’s model is the Price’s citation model (Newman, 2003). In addition to random network models, a number of regular network models are included in NOESIS. These 4 The NOESIS Network-Oriented Exploration, Simulation, and Induction System FIG. 3 Different screenshots of the NOESIS graphical user interface. FIG. 4 Random networks generated using the Erdös-Rényi model (left), the Watts–Strogatz model (center), and the Barabási– Albert model (right). models generate synthetic networks that are useful in the process of testing new algorithms. The networks regular models include complete networks, where all nodes are interconnected; star networks, where all nodes are connected to a single hub node; ring networks, where each node is connected to its closest two neighbors along a ring; tandem networks, like ring model but without closing the loop; mesh network, where nodes are arranged in rows and columns, and connected only to their adjacent nodes; toruses, meshes where nodes in the extremes of the mesh are connected; hypercubes; binary trees; and isolates, a network without links. B. Structural properties of networks Network structural properties allow the quantification of features or behaviors present in the network. They can be used, for instance, to measure network robustness or reveal important nodes and links. NOESIS considers three types of structural properties: node properties, node pair properties (for pairs both with and without links among them), and global properties. NOESIS provides a large number of techniques for analyzing network structural properties. Many structural properties can be computed for nodes. For example, indegree and out-degree, indicate the number of incoming and outgoing links, respectively. Related to node degree, two techniques to measure node degree assortativity have III Network analysis tools been included: biased (Piraveenan et al., 2008) and unbiased (Piraveenan et al., 2010) node degree assortativity. Node assortativity is a score between −1 and 1 that measures the degree correlation between pairs of connected nodes. The clustering coefficient can also be computed for nodes. The clustering coefficient of a node is the fraction of its neighbors that are also connected among them. Reachability scores are centrality measures that allow the analysis of how easy it is to reach a node from other nodes. The eccentricity of a node is defined as the maximum distance to any other node (Hage and Harary, 1995). The closeness, however, is the inverse of the sum of the distance from a given node to all others (Bavelas, 1950). An adjusted closeness value that normalizes the closeness according to the number of reachable nodes can also be used. Inversely to closeness, average path length is defined as the mean distance of all shortest paths to any other node. Decay is yet another reachability score, computed as the summation of a delta factor powered by the path length to any other node (Jackson, 2008). It is interesting to note that with a delta factor close to 0, the measure becomes the degree of the node, whereas with a delta close to 1, the measure becomes the component size of the component the node is located at. A normalized decay score is also available. Betweenness, as reachability, is another way to measure node centrality. Betweenness, also known as Freeman’s betweenness, is a score computed as the count of shortest paths the node is involved in (Freeman, 1977). Since this score ranges from 2n − 1 to n2 − (n − 1) for n the number of nodes in strongly-connected networks, a normalized variant is typically used. Finally influence algorithms provide a different perspective on node centrality. These techniques measure the power of each node to affect others. The most popular influence algorithm is PageRank (Page et al., 1999), since it is used by the Google search engine. PageRank computes a probability distribution based on the likelihood of reaching a node starting from any other node. The algorithm works by iteratively updating node probability based on direct neighbors probabilities, which leads to convergence if the network satisfies certain properties. A similar algorithm is HITS (Kleinberg, 1999), which stands for hyperlink-induced topic search. It follows an iterative approach, as PageRank, but computes two scores per node: the hub, which is a score related to how many nodes a particular node links, and the authority, which is a score related to how many hubs link a particular node. Both scores are connected by an iterative updating process: authority is updated according to the hub scores of nodes connected by incoming links and hub is updated according to authority scores of nodes connected by outgoing links. Eigenvector centrality is another iterative method closely related to PageRank, where nodes are assigned a centrality score based on the summation of the centrality of their neighbors nodes. Katz centrality considers all possible paths, but penalizes long ones using a given damping factor (Katz, 5 1953). Finally, diffusion centrality (Kang et al., 2012) is another influence algorithm based on Katz centrality. The main difference is that, while Katz considers infinite length paths, diffusion centrality considers only paths of a given limited length. In the following example, we show how to load a network from a data file and compute its structural properties using NOESIS, its PageRank scores in particular: FileReader fileReader = new FileReader("karate.gml"); NetworkReader reader = new GMLNetworkReader(fileReader); Network network = reader.read(); PageRank task = new PageRank(network); NodeScore score = task.call(); Different structural properties for links can also be computed by NOESIS. For example, link betweenness, which is the count of shortest paths the link is involved in, or link rays, which is the number of possible paths between two nodes that cross a given link. Some of these properties are used by different network data mining algorithms. C. Network visualization techniques Humans are still better than machines at the recognition of certain patterns when analyzing data in a visual way. Network visualization is a complex task since networks tend to be huge, with thousands nodes and links. NOESIS enables the visualization of networks by providing the functionality needed to render the network and export the resulting visualization using different image file formats. NOESIS provides different automatic graph layout techniques, such as the well–known Fruchterman– Reingold (Fruchterman and Reingold, 1991) and Kamada–Kawai (Kamada and Kawai, 1989) force–based layout algorithms. Force–based layout algorithms assign forces among pairs of nodes and solve the system to reach an equilibrium point, which usually leads to an aesthetic visualization. Hierarchical layouts (Tamassia, 2013), which arrange nodes in layers trying to minimize edge crossing, are also included. Different radial layout algorithms are included as well (Wills, 1999). These layouts are similar to the hierarchical ones, but arrange nodes in concentric circles. Finally, several regular layouts are included. These layouts are common for visualizing regular networks, such as meshes or stars. NOESIS allows tuning the network visualization look and feel. The visual properties of nodes and links can be customized, including color, size, borders, and so on. In addition, visual properties can be bound to static or dynamic properties of the network. For example, node sizes can be bound to a specific centrality score, allowing the visual display of quantitative information. 6 The NOESIS Network-Oriented Exploration, Simulation, and Induction System FIG. 5 A dolphin social network (Lusseau et al., 2003) represented using different network visualization algorithms: random layout (top left), Kamada–Kawai layout (top right), Fruchterman–Reingold layout (bottom left), and circular layout using average path length (bottom right). IV. NETWORK DATA MINING TECHNIQUES A. Community detection Network data mining techniques exist for both unsupervised and supervised settings. NOESIS includes a wide array of community detection methods (Lancichinetti and Fortunato, 2009) and link prediction techniques (Liben-Nowell and Kleinberg, 2007). These algorithms are briefly described below. Community detection can be defined as the task of finding groups of densely connected nodes. A wide range of community detection algorithms have been proposed, exhibiting different pros and cons. NOESIS features different families of community detection techniques and implements more than ten popular community detection algorithms. The included algorithms, their time complexity, and their bibliographic references are shown in Table I. NOESIS provides hierarchical clustering algorithms. Agglomerative hierarchical clustering treats each node IV Network data mining techniques 7 FIG. 6 Community detection methods applied to Zachary’s karate club network (Zachary, 1977): Fast greedy partitioning (top left), Kernighan-Lin bi-partitioning (top right), average-link hierarchical partitioning (bottom left), and complete-link hierarchical partitioning (bottom right). as a cluster, and then iteratively merges clusters until all nodes are in the same cluster (Fortunato, 2010). Different strategies for the selection of clusters to merge have been implemented, including single-link (Sibson, 1973), which selects the two clusters with the smallest minimum pairwise distance; complete-link (Defays, 1977), which selects the two clusters with the smallest maximum pairwise distance; and average-link (Liu, 2011), which selects the two clusters with the smallest average pairwise distance. Modularity-based techniques are also available in our framework. Modularity is a score that measures the strength of particular division into modules of a given network. Modularity–based techniques search for com- munities by attempting to maximize their modularity score (Newman and Girvan, 2004). Different greedy strategies, including fast greedy (Newman, 2004) and multi-step greedy (Schuetz and Caflisch, 2008), are available. These greedy algorithms merge pairs of clusters that maximize the resulting modularity, until all possible merges would reduce the network modularity. Partitional clustering is another common approach. Partitioning clustering decomposes the network and performs an iterative relocation of nodes between clusters. For example, Kernighan-Lin bi-partitioning (Kernighan and Lin, 1970) starts with an arbitrary partition in two clusters. Then, iteratively exchanges nodes between both 8 The NOESIS Network-Oriented Exploration, Simulation, and Induction System Type Name Time complexity Reference Single-link (SLINK) O(v 2 ) (Sibson, 1973) Hierarchical Complete-link (CLINK) O(v 2 log v) (Defays, 1977) Average-link (UMPGA) O(v 2 log v) (Liu, 2011) Fast greedy O(kvd log v) (Newman, 2004) Modularity Multi-step greedy O(kvd log v) (Schuetz and Caflisch, 2008) 2 Kernighan-Lin bi-partitioning O(v log v) (Kernighan and Lin, 1970) Partitional K-means O(kvd) (MacQueen et al., 1967) Ratio cut algorithm (EIG1) O(v 3 ) (Hagen and Kahng, 1992) Spectral Jordan and Weiss NG algorithm (KNSC1) O(v 3 ) (Ng et al., 2002) Spectral k-means O(v 3 ) (Shi and Malik, 2000) Overlapping BigClam O(v 2 ) (Yang and Leskovec, 2013) TABLE I Computational time complexity and bibliographic references for the community detection techniques provided by NOESIS. In the time complexity analysis, v is the number of nodes in the network, d is the maximum node degree, and k is the desired number of clusters. clusters to minimize the number of links between them. This approach can be applied multiple times to subdivide the obtained clusters. K-means community detection (MacQueen et al., 1967) is an application of the traditional k-means clustering algorithm to networks and another prominent example of partitioning community detection. Spectral community detection (Fortunato, 2010) is another family of community detection techniques included in NOESIS. These techniques use the Laplacian representation of the network, which is a network representation computed by subtracting the adjacency matrix of the network to a diagonal matrix where each diagonal element is equal to the degree of the corresponding node. Then, the eigenvectors of the Laplacian representation of the network are computed. NOESIS includes the ratio cut algorithm (EIG1) (Hagen and Kahng, 1992), the Jordan and Weiss NG algorithm (KNSC1) (Ng et al., 2002), and spectral k-means (Shi and Malik, 2000). Finally, the BigClam overlapping community detector is also available in NOESIS (Yang and Leskovec, 2013). In this algorithm, each node has a profile, which consists in a score between 0 and 1 for each cluster that is proportional to the likelihood of the node belonging to that cluster. Also, a score between pairs of nodes is defined yielding values proportional to their clustering assignment overlap. The algorithm iteratively optimizes each node profile to maximize the value between connected nodes and minimize the value among unconnected nodes. In the following example, we show how to load a network from a data file and detect communities with the KNSC1 algorithm using NOESIS: FileReader fileReader = new FileReader("mynetwork.net"); NetworkReader reader = new PajekNetworkReader(fileReader); Network network = reader.read(); CommunityDetector task = new NJWCommunityDetector(network); Matrix results = task.call(); B. Link scoring and prediction Link scoring and link prediction are two closely related tasks. On the one hand, link scoring aims to compute a value or weight for a link according to a specific criteria. Most link scoring techniques obtain this value by considering the overlap or relationship between the neighborhood of the nodes at both ends of the link. On the other hand, link prediction computes a value, weight, or probability proportional to the likelihood of the existence of a certain link according to a given model of link formation. The NOESIS framework provides a large collection of methods for link scoring and link prediction, from local methods, which only consider the direct neighborhood of nodes, to global methods, which consider the whole network topology. As the amount of information considered is increased, the computational and spatial complexity of the techniques also increases. The link scoring and prediction methods available in NOESIS are shown in Table II. Among local methods, the most basic technique is the common neighbors score (Newman, 2001), which is equal to the number of shared neighbors between a pair of nodes. Most techniques are variations of the common neighbors score. For example, the Adamic–Adar score (Adamic and Adar, 2003) is the sum of one divided by the logarithm of the degree of each shared node. The resource–allocation index (Zhou et al., 2009) follows the same expression, but directly considers the degree instead of the logarithm of the degree. The adaptive degree penalization score (Martı́nez et al., 2016) also follows the same approach, yet automatically determines an adequate degree penalization by considering properties of the network topology. Other local measures consider the IV Network data mining techniques 9 Type Name Time complexity Reference Common Neighbors count O(vd3 ) (Newman, 2001) Adamic–Adar score O(vd3 ) (Adamic and Adar, 2003) Resource–allocation index O(vd3 ) (Zhou et al., 2009) 3 Adaptive degree penalization score O(vd ) (Martı́nez et al., 2016) Local Jaccard score O(vd3 ) (Jaccard, 1901) Leicht-Holme-Newman score O(vd3 ) (Leicht et al., 2006) 3 Salton score O(vd ) (Salton and McGill, 1986) Sorensen score O(vd3 ) (Sørensen, 1948) Hub promoted index O(vd3 ) (Ravasz et al., 2002) hub depressed index O(vd3 ) (Ravasz et al., 2002) Preferential attachment score O(vd2 ) (Barabási and Albert, 1999) Katz index O(v 3 ) (Katz, 1953) Leicht-Holme-Newman score O(cv 2 d) (Leicht et al., 2006) Random walk O(cv 2 d) (Pearson, 1905) Global Random walk with restart O(cv 2 d) (Tong et al., 2006) Flow propagation O(cv 2 d) (Vanunu and Sharan, 2008) 3 Pseudoinverse Laplacian score O(v ) (Fouss et al., 2007) Average commute time score O(v 3 ) (Fouss et al., 2007) Random forest kernel index O(v 3 ) (Chebotarev and Shamis, 2006) TABLE II Computational time complexity and bibliographic references for the link scoring and prediction methods provided by NOESIS. In the time complexity analysis, v is the number of nodes in the network, d is the maximum node degree, and c refers to the number of iterations required by iterative global link prediction methods. number of shared neighbors, but normalize their value according to certain criteria. For example, the Jaccard score (Jaccard, 1901) normalizes the number of shared neighbors by the total number of neighbors. The local Leicht-Holme-Newman score (Leicht et al., 2006) normalizes the count of shared neighbors by the product of both neighborhoods sizes. Similarly, the Salton score (Salton and McGill, 1986) also normalizes, this time using the square root of the product of both node degrees. The Sorensen score (Sørensen, 1948) considers the double of the count of shared neighbors normalized by the sum of both neighbors size. The hub promoted and hub depressed scores (Ravasz et al., 2002) normalize the count of shared neighbors by the minimum and the maximum of both nodes degree respectively. Finally, the preferential attachment score (Barabási and Albert, 1999) only considers the product of both node degrees. Global link scoring and prediction methods are more complex than local methods. For example, the Katz score (Katz, 1953) sums the influence of all possible paths between two nodes, incrementally penalizing paths by their length according to a given damping factor. The global Leicht-Holme-Newman score (Leicht et al., 2006) is quite similar to the Katz score, but resorts to the dominant eigenvalue to compute the final result. Random walk techniques simulate a Markov chain of randomly-selected nodes (Pearson, 1905). The idea is that, starting from a seed node and randomly moving through links, we can obtain a probability vector where each element corresponds to the probability of reaching each node. The classical random walk iteratively multiplies the probability vector by the transition matrix, which is the row-normalized version of the adjacency matrix, until convergence. An interesting variant is the random walk with restart (Tong et al., 2006), which models the possibility of returning to the seed node with a given probability. Flow propagation is another variant of random walk (Vanunu and Sharan, 2008), where the transition matrix is computed by performing both row and column normalization of the adjacency matrix. Finally, some spectral techniques are also available in NOESIS. Spectral techniques, as we mentioned when discussing community detection methods, are based on the Laplacian matrix. The pseudoinverse Laplacian score (Fouss et al., 2007) is the inner product of the rows of the corresponding pair of nodes from the Laplacian matrix. Other spectral technique is the average commute time (Fouss et al., 2007), which is defined as the average number of steps that a random walker starting from a particular node takes to reach another node for the first time and go back to the initial node. Despite it models a random walk process, it is considered to be a spectral technique because it is usually computed in terms of the Laplacian matrix. Given the Laplacian matrix, it can be computed as the diagonal element of the starting node plus the diagonal element of the ending node, minus two times the element located in the row of the first node and the column of the second one. 10 The NOESIS Network-Oriented Exploration, Simulation, and Induction System FIG. 7 Different link scoring techniques applied to Les Miserables coappearance network (Knuth, 2009): common neighbors (top left), preferential attachment score (top right), Sorensen score (bottom left), and Katz index (bottom right). Link width in the figure is proportional to the link score. Finally, the random forest kernel score (Chebotarev and Shamis, 2006) is a global technique based on the concept of spanning tree, i.e. a connected undirected sub-network with no cycles that includes all the nodes and some or all the links of the network. The matrix-tree theorem states that the number of spanning trees in the network is equal to any cofactor, which is a determinant obtained by removing the row and column of the given node, of an entry of its Laplacian representation. As a result of this, the inverse of the sum of the identity matrix and the Laplacian matrix gives us a matrix that can be interpreted as a measure of accessibility between pairs of nodes. Using network data mining algorithms in NOESIS is simple. In the following code snippet, we show how to generate a Barabsi-Albert preferential attachment network with 100 nodes and 1000 links, and then compute the Resource Allocation score for each pair of nodes using NOESIS: Network network = new BarabasiAlbertNetwork(100, 1000); LinkPredictionScore method = new ResourceAllocationScore(network); Matrix result = method.call(); V Conclusion V. CONCLUSION Currently, the NOESIS project comprises more than thirty five thousand lines of code organized in hundreds of classes and dozens of packages. NOESIS relies on a library of reusable components that, with more than forty thousand lines of Java code, provide a customizable collection framework, support for the execution of parallel algorithms, mathematical routines, and the model-driven application generator used to build the NOESIS graphical user interface. NOESIS can ease the development of applications that involve the analysis of any kind of data susceptible of being represented as a network. NOESIS provides an efficient, scalable, and developer–friendly framework for network data mining, released under a permissive Berkeley Software Distribution free software license. Our framework can be downloaded from its official website at http://noesis.ikor.org. Acknowledgments The NOESIS project is partially supported by the Spanish Ministry of Economy and the European Regional Development Fund (FEDER), under grant TIN2012– 36951, and the Spanish Ministry of Education under the program “Ayudas para contratos predoctorales para la formación de doctores 2013” (grant BES–2013–064699). We are grateful to Aarón Rosas, Francisco–Javier Gijón, and Julio–Omar Palacio for their contributions to the implementation of community detection methods in NOESIS. References Adamic, L. A. and Adar, E. (2003). Friends and neighbors on the web. Social Networks, 25(3):211–230. Albert, R. and Barabási, A.-L. (2002). Statistical mechanics of complex networks. Reviews of Modern Physics, 74(1):47. Barabási, A.-L. and Albert, R. (1999). Emergence of scaling in random networks. Science, 286(5439):509–512. Bastian, M., Heymann, S., Jacomy, M., et al. (2009). Gephi: an open source software for exploring and manipulating networks. International AAAI Conference on Weblogs and Social Media, 8:361–362. Batagelj, V. and Mrvar, A. (1998). Pajek-program for large network analysis. Connections, 21(2):47–57. Bavelas, A. (1950). Communication patterns in task-oriented groups. The Journal of the Acoustical Society of America, 22(6):725–730. Borgatti, S. P., Everett, M. G., and Freeman, L. C. (2002). UCINET for Windows: Software for social network analysis. Technical report, Analytic Technologies. Chebotarev, P. and Shamis, E. (2006). Matrix-forest theorems. arXiv preprint math/0602575. Csardi, G. and Nepusz, T. (2006). The igraph software package for complex network research. International Journal of Complex Systems, 1695(5):1–9. 11 Dean, J. and Ghemawat, S. (2008). MapReduce: simplified data processing on large clusters. Communications of the ACM, 51(1):107–113. Defays, D. (1977). An efficient algorithm for a complete link method. The Computer Journal, 20(4):364–366. Ellson, J., Gansner, E., Koutsofios, L., North, S. C., and Woodhull, G. (2002). Graphviz - open source graph drawing tools. In Graph Drawing, pages 483–484. Springer. Erdős, P. and Rényi, A. (1959). On random graphs. Publicationes Mathematicae Debrecen, 6:290–297. Fortunato, S. (2010). Community detection in graphs. Physics Reports, 486(3):75–174. 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. Freeman, L. C. (1977). A set of measures of centrality based on betweenness. Sociometry, pages 35–41. Fruchterman, T. M. and Reingold, E. M. (1991). Graph drawing by force-directed placement. Software: Practice and Experience, 21(11):1129–1164. Getoor, L. and Diehl, C. P. (2005). Link mining: a survey. ACM SIGKDD Explorations Newsletter, 7(2):3–12. Gilbert, E. N. (1959). Random graphs. The Annals of Mathematical Statistics, 30(4):1141–1144. Hage, P. and Harary, F. (1995). Eccentricity and centrality in networks. Social Networks, 17(1):57–63. Hagen, L. and Kahng, A. B. (1992). New spectral methods for ratio cut partitioning and clustering. IEEE Transactions on Computer-Aided Design of Integrated Circuits and Systems, 11(9):1074–1085. Jaccard, P. (1901). Étude comparative de la distribution florale dans une portion des alpes et des jura. Bulletin de la Société Vaudoise des Sciences Naturelles, 37:547–579. Jackson, M. O. (2008). Social and Economic Networks. Princeton University Press, Princeton, NJ, USA. Kamada, T. and Kawai, S. (1989). An algorithm for drawing general undirected graphs. Information Processing Letters, 31(1):7–15. Kang, C., Molinaro, C., Kraus, S., Shavitt, Y., and Subrahmanian, V. (2012). Diffusion centrality in social networks. In Proceedings of the 2012 International Conference on Advances in Social Networks Analysis and Mining (ASONAM 2012), pages 558–564. IEEE Computer Society. Katz, L. (1953). A new status index derived from sociometric analysis. Psychometrika, 18(1):39–43. Keeling, M. J. and Eames, K. T. (2005). Networks and epidemic models. Journal of the Royal Society Interface, 2(4):295–307. Kernighan, B. W. and Lin, S. (1970). An efficient heuristic procedure for partitioning graphs. Bell System Technical Journal, 49(2):291–307. Kleinberg, J. M. (1999). Authoritative sources in a hyperlinked environment. Journal of the ACM (JACM), 46(5):604–632. Knuth, D. E. (2009). The Stanford GraphBase: A Platform for Combinatorial Computing. Addison-Wesley Professional, 1st edition. Lancichinetti, A. and Fortunato, S. (2009). Community detection algorithms: a comparative analysis. Physical Review E, 80(5):056117. Leicht, E. A., Holme, P., and Newman, M. E. (2006). Vertex 12 The NOESIS Network-Oriented Exploration, Simulation, and Induction System similarity in networks. Physical Review E, 73(2):026120. Leskovec, J. and Krevl, A. (2014). SNAP Datasets: Stanford large network dataset collection. http://snap.stanford. edu/data. Liben-Nowell, D. and Kleinberg, J. (2007). The linkprediction problem for social networks. Journal of the American Society for Information Science and Technology, 58(7):1019–1031. Liu, B. (2011). Web Data Mining, 2 ed. Berlin, Germany: Springer Berlin Heidelberg. Lü, L. and Zhou, T. (2011). Link prediction in complex networks: A survey. Physica A: Statistical Mechanics and its Applications, 390(6):1150–1170. Lusseau, D., Schneider, K., Boisseau, O. J., Haase, P., Slooten, E., and Dawson, S. M. (2003). The bottlenose dolphin community of doubtful sound features a large proportion of long-lasting associations. Behavioral Ecology and Sociobiology, 54(4):396–405. MacQueen, J. et al. (1967). Some methods for classification and analysis of multivariate observations. In Proceedings of the Fifth Berkeley Symposium on Mathematical Statistics and Probability, number 14 in 1, pages 281–297. Oakland, CA, USA. Martı́nez, V., Berzal, F., and Cubero, J.-C. (2016). Adaptive degree penalization for link prediction. Journal of Computational Science, 13:1–9. Martı́nez, V., Cano, C., and Blanco, A. (2014). Prophnet: A generic prioritization method through propagation of information. BMC Bioinformatics, 15(Suppl 1):S5. Newman, M. (2010). Networks: An Introduction. Oxford University Press. Newman, M. E. (2001). Clustering and preferential attachment in growing networks. Physical Review E, 64(2):025102. Newman, M. E. (2003). The structure and function of complex networks. Society for Industrial and Applied Mathematics Review, 45(2):167–256. Newman, M. E. (2004). Fast algorithm for detecting community structure in networks. Physical Review E, 69(6):066133. Newman, M. E. and Girvan, M. (2004). Finding and evaluating community structure in networks. Physical Review E, 69(2):026113. Ng, A. Y., Jordan, M. I., Weiss, Y., et al. (2002). On spectral clustering: Analysis and an algorithm. Advances in Neural Information Processing Systems, 2:849–856. Page, L., Brin, S., Motwani, R., and Winograd, T. (1999). The pagerank citation ranking: Bringing order to the web. Technical report, Stanford InfoLab. Pavlov, M. and Ichise, R. (2007). Finding experts by link prediction in co-authorship networks. Finding Experts on the Web with Semantics Workshop, 290:42–55. Pearson, K. (1905). The problem of the random walk. Nature, 72:342. Piraveenan, M., Prokopenko, M., and Zomaya, A. (2008). Local assortativeness in scale-free networks. Europhysics Letters, 84(2):28002. Piraveenan, M., Prokopenko, M., and Zomaya, A. Y. (2010). Classifying complex networks using unbiased local assortativity. In ALIFE, pages 329–336. Ravasz, E., Somera, A. L., Mongru, D. A., Oltvai, Z. N., and Barabási, A.-L. (2002). Hierarchical organization of modularity in metabolic networks. Science, 297(5586):1551– 1555. Salton, G. and McGill, M. J. (1986). Introduction to Modern Information Retrieval. McGraw-Hill, Inc. Schuetz, P. and Caflisch, A. (2008). Efficient modularity optimization by multistep greedy algorithm and vertex mover refinement. Physical Review E, 77(4):046112. Schult, D. A. and Swart, P. (2008). Exploring network structure, dynamics, and function using NetworkX. In Proceedings of the 7th Python in Science Conferences (SciPy 2008), volume 2008, pages 11–16. Shannon, P., Markiel, A., Ozier, O., Baliga, N. S., Wang, J. T., Ramage, D., Amin, N., Schwikowski, B., and Ideker, T. (2003). Cytoscape: a software environment for integrated models of biomolecular interaction networks. Genome Research, 13(11):2498–2504. Shi, J. and Malik, J. (2000). Normalized cuts and image segmentation. Transactions on Pattern Analysis and Machine Intelligence, 22(8):888–905. Sibson, R. (1973). Slink: an optimally efficient algorithm for the single-link cluster method. The Computer Journal, 16(1):30–34. Smith, M. A., Shneiderman, B., Milic-Frayling, N., Mendes Rodrigues, E., Barash, V., Dunne, C., Capone, T., Perer, A., and Gleave, E. (2009). Analyzing (social media) networks with NodeXL. In Proceedings of the Fourth International Conference on Communities and Technologies, pages 255–264. ACM. Sørensen, T. (1948). A method of establishing groups of equal amplitude in plant sociology based on similarity of species and its application to analyses of the vegetation on danish commons. Biologiske Skrifter, 5:1–34. Tamassia, R. (2013). Handbook of Graph Drawing and Visualization. CRC Press. Tan, P.-N., Steinbach, M., Kumar, V., et al. (2006). Introduction to data mining. Pearson, Addison Wesley, Boston. Tong, H., Faloutsos, C., and Pan, J.-Y. (2006). Fast random walk with restart and its applications. In Proceedings of the Sixth International Conference on Data Mining, ICDM ’06, pages 613–622. IEEE Computer Society. Vanunu, O. and Sharan, R. (2008). A propagation-based algorithm for inferring gene-disease assocations. In German Conference on Bioinformatics, pages 54–52. Watts, D. J. and Strogatz, S. H. (1998). Collective dynamics of ‘small-world’ networks. Nature, 393(6684):440–442. Wills, G. J. (1999). Nicheworksinteractive visualization of very large graphs. Journal of Computational and Graphical Statistics, 8(2):190–212. Yang, J. and Leskovec, J. (2013). Overlapping community detection at scale: a nonnegative matrix factorization approach. In Proceedings of the Sixth ACM International Conference on Web Search and Data Mining, pages 587– 596. ACM. Zachary, W. W. (1977). An information flow model for conflict and fission in small groups. Journal of Anthropological Research, pages 452–473. Zhou, T., Lü, L., and Zhang, Y.-C. (2009). Predicting missing links via local information. The European Physical Journal B, 71(4):623–630.
2cs.AI
arXiv:1610.04807v3 [cs.DS] 10 Apr 2017 Local Max-Cut in Smoothed Polynomial Time Omer Angel Sébastien Bubeck∗ University of British Columbia Department of Mathematics Canada [email protected] Microsoft Research; USA [email protected] Yuval Peres Fan Wei Microsoft Research; USA [email protected] Stanford University Department of Mathematics USA [email protected] ABSTRACT 1 INTRODUCTION In 1988, Johnson, Papadimitriou and Yannakakis wrote that “Practically all the empirical evidence would lead us to conclude that finding locally optimal solutions is much easier than solving NPhard problems". Since then the empirical evidence has continued to amass, but formal proofs of this phenomenon have remained elusive. A canonical (and indeed complete) example is the local maxcut problem, for which no polynomial time method is known. In a breakthrough paper, Etscheid and Röglin proved that the smoothed complexity of local max-cut is quasi-polynomial, i.e., if arbitrary bounded weights are randomly perturbed, a local maximum can be found in ϕn O (log n) steps where ϕ is an upper bound on the random edge weight density. In this paper we prove smoothed polynomial complexity for local max-cut, thus confirming that finding local optima for max-cut is much easier than solving it. Let G = (V , E) be a connected graph with n vertices and w : E → [−1, 1] be an edge weight function. The local max-cut problem asks to find a partition of the vertices σ : V → {−1, 1} whose total cut weight  1 Õ w(uv) 1 − σ (u)σ (v) , (1) 2 CCS CONCEPTS • Theory of computation → Graph algorithms analysis; KEYWORDS Smoothed analysis, Max-cut, Polynomial running time, Hopfield network, Nash equilibrium, Potential game, Sherrington-Kirkpatrick model ACM Reference format: Omer Angel, Sébastien Bubeck, Yuval Peres, and Fan Wei. 2017. Local MaxCut in Smoothed Polynomial Time. In Proceedings of 49th Annual ACM SIGACT Symposium on the Theory of Computing, Montreal, Canada, June 2017 (STOC’17), 9 pages. DOI: 10.1145/3055399.3055402 ∗ The corresponding author Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. Copyrights for components of this work owned by others than ACM must be honored. Abstracting with credit is permitted. To copy otherwise, or republish, to post on servers or to redistribute to lists, requires prior specific permission and/or a fee. Request permissions from [email protected]. STOC’17, Montreal, Canada © 2017 ACM. 978-1-4503-4528-6/17/06. . . $15.00 DOI: 10.1145/3055399.3055402 uv ∈E is locally maximal, in the sense that one cannot increase the cut weight by changing the value of σ at a single vertex (recall that finding the global maximum of (1) is NP-hard). This problem comes up naturally in a variety of contexts. For example (Schäffer and Yannakakis 1991) showed that local max-cut is complete for the complexity class Polynomial-Time Local Search (PLS). It also appears in the party affiliation game, (Fabrikant et al. 2004): this is an n-player game where each player v ∈ V selects an action σ (v) ∈ {−1, 1} and  Í the resulting payoff for player v is sign uv ∈E w(uv) 1 − σ (u)σ (v) . It is easy to see that a local maximum of (1) exactly corresponds to a Nash equilibrium for the party affiliation game. Yet another appearance of this problem is in the context of Hopfield networks, (Hopfield 1982): this is a collection of neurons with weighted connections between them, where each neuron is in one of two states (either firing or not firing) and with state update at random times by thresholding the sum of incoming weights from firing neurons. It is again easy to see that such dynamics make the state configuration converge (for undirected weights) to a local maximum of (1) (with σ (u) representing the state of neuron u and w(uv) the weight of the connection between neurons u and v). There is a natural algorithm to find a local maximum of (1), sometimes referred to as the FLIP algorithm: Start from some initial partition σ , and until reaching a local maximum, repeatedly find a vertex for which flipping the sign of σ would increase the cut weight - and carry out this flip. (To be precise, this is a family of algorithms corresponding to different ways of selecting the improving change when there are multiple possibilities.) This algorithm also corresponds to a natural dynamics for the party affiliation game, and a specific implementation (random selection of an improving vertex) exactly corresponds to the asynchronous Hopfield network dynamics described above. However, it is easy to see that there exists weight functions such that FLIP takes an exponential number of steps before reaching a local maximum. As noted in (Johnson et al. 1988) (who introduced the PLS class), this seems STOC’17, June 2017, Montreal, Canada at odd with empirical evidence suggesting that algorithms such as FLIP usually reach a local maximum in a reasonable time. This conflicting situation naturally motivates the study of the smoothed complexity of local max-cut: is it true that after adding a small amount of noise to the edge weights, the FLIP algorithm terminates in polynomial time with high probability? In this paper we answer this question affirmatively, provided that a small amount of noise is added to all vertex pairs (i.e., even to non-edges); in other words, we assume that G is a complete graph. We note that a similar subtlety arises in the smoothed analysis of the simplex algorithm by (Spielman and Teng 2004) where noise is added to every entry of the constraint matrix (in particular, the null entries are also smoothed). We now introduce the problem formally, discuss existing results, and state our main contributions. Let X = (X e )e ∈E ∈ [−1, 1]E be a random vector with independent entries. One should think of X e as the original edge weight w(e) plus some independent small noise. We assume that X e has a density fe with respect to the Lebesgue measure, and we denote ϕ = maxe ∈E k fe k∞ . In this paper the phrase with high probability means with probability at least 1−on (1) with respect to X . We consider the space of spin configurations {−1, 1}V , and for a spin configuration σ ∈ {−1, 1}V we denote by σ (v) the value of σ at vertex v. We are interested in the random map H : {−1, 1}V → R (usually called the Hamiltonian) defined by: 1 Õ H(σ ) = − Xuv σ (u)σ (v). (2) 2 uv ∈E Our objective is to find a local maximum of H with respect to the Hamming distance d(σ, σ ′ ) = #{v : σ (v) , σ ′ (v)}. Equivalently, we are looking for a locally optimal cut in the weighted graph (G, X ) (since (1) and (2) differ by the half of the total weight of all edges). We say that σ ′ is an improving move from σ if d(σ ′, σ ) = 1 and H(σ ′ ) > H(σ ). We will sometimes refer to a sequence of improving moves as an improving sequence. The FLIP algorithm iteratively performs improving moves until reaching a configuration with no improving move. An implementation of FLIP specifies how to choose the initial configuration and how to choose among the improving moves available at each step. (Etscheid and Röglin 2014) show that for any graph with smoothed weights, with high probability, any implementation of FLIP will terminate in at most nC log(n) steps, for some universal constant C > 0. Our main result is that FLIP terminates in a polynomial number of steps for the complete graph. Since our results are asymptotic in n, in the rest of the paper we assume n ≥ n 0 for some universal constant n 0 . Theorem 1.1. Let G be the complete graph on n vertices, and assume the edge weights X = (X e )e ∈E are independent random variables with |X | ≤ 1 and density bounded above by ϕ. For any η > 0, with high probability any implementation of FLIP terminates in at most O(ϕ 5n 15+η ) steps, with implicit constant depending only on η. Corollary 1.2. Under the assumptions of Theorem 1.1, the expected number of steps of any implementation of FLIP is O(n 15), with implicit constant depending only on ϕ. Omer Angel, Sébastien Bubeck, Yuval Peres, and Fan Wei Note that any implementation is a very broad category. It includes an implementation where an adversary with unbounded computational power chooses each improving step. Theorem 1.1 implies that even in this case the number of steps is polynomial with high probability. Remark 1.3. The edge weights are assumed to be bounded only for simplicity. Our methods can be used to give the same bound as long as the edge weights have finite variance, and a polynomial bound as long as the weights have a polynomial tail. Indeed, if P(|X | > t) ≪ t −δ , then with high probability all edge weights are at most n 3/δ ; rescaling the edge weights by n 3/δ increases ϕ by a corresponding factor, giving a bound of order n 15+15/δ +η . Remark 1.4. In the the classical Sherrington-Kirkpatrick model (Sherrington and Kirkpatrick 1975), a mean field model for a spin glass, the Hamiltonian is exactly a scaled version of the random map defined in (2) and when X i j are i.i.d. Gaussian random variables for all pairs i, j. Therefore our Theorem 1.1 implies that in the in the Sherrington-Kirkpatrick model, the maximal length of a monotone path (along which the energy is decreasing) in the random energy landscape is O(n 15+η ). Theorem 1.1 can be equivalently stated as follows. Theorem 1.5. Let G be the complete graph. Assume the edge weights X = (X e )e ∈E are independent random variables with |X | ≤ 1 and density bounded above by ϕ. The probability that there is an improving sequence of length Ω(ϕ 5 n 15+η ) is o(1). We say that a sequence L is ϵ-slowly improving from an initial state σ0 if each step of L increases H by at most ϵ (and more than 0). Our main task will be to prove the following proposition: Proposition 1.6. Fix η > 0 and let ϵ = n −(12+η)ϕ 5 . Then with high probability, there is no ϵ-slowly improving sequence of length 2n from any σ0 . Proposition 1.6 implies Theorem 1.5 as follows. Since X e ∈ [−1, 1], the maximum total improvement for H is at most n 2 . If there exists an improving sequence of length at least Ω(n 15+η ϕ 5 ) then there must exist an improving sequence of length 2n with total improvement less than O(n −(12+η)ϕ −5 ). Apart from Section 5 the rest of the paper is dedicated to proving Proposition 1.6. We believe that the exponent 15 in Theorem 1.1 is far from tight. In fact we make the conjecture that local max-cut is in smoothed quasi-linear time: Conjecture 1.7. Let G be the complete graph on n vertices, and assume the edge weights X = (X e )e ∈E are independent random variables with |X | ≤ 1 and density bounded above by ϕ. With high probability any implementation of FLIP terminates in at most n(ϕ log n)c steps where c > 0 is a universal constant. This quasi-linear time behavior could quite possibly extend to an arbitrary graph G; however, the first step should be to show smoothed polynomial complexity in this setting (that is, to generalize Theorem 1.1 to an arbitrary graph). Some graphs are easier than others. E.g., (Elsässer and Tscheuschner 2011) observed that for graphs with maximum degree O(log(n)) endowed with Gaussian edge weights, with high probability, any implementation of Local Max-Cut in Smoothed Polynomial Time FLIP terminates in a polynomial number of steps. (Since, with high probability, each improving move increases H significantly.) In the final section of the paper we show that a natural approach to generalize our result to arbitrary graphs cannot work; the proof relies on a new result on combinatorics of words, which is of independent interest. 2 PRELIMINARIES In this section we provide a high-level overview of the proof of Proposition 1.6. We also state and prove some lemmas which will be useful in our analysis. Recall that we work in the state space {−1, 1}V and that a move flips the sign of a single vertex. Each move can be viewed as a linear operator, which we define now. For any σ ∈ {−1, 1}V and v ∈ V , we denote by σ −v the state equal to σ except for the coordinate corresponding to v which is flipped. For such σ, v there exists a vector α = α(σ, v) ∈ {−1, 0, 1} E such that H(σ −v ) = H(σ ) + hα, X i. More specifically α = (αuw )uw ∈E is defined by  αuv = σ (v)σ (u) ∀u , v (3) αuw = 0 if v < {u,w } Crucially, note that α does not depend on X . We say that v is an improving move from a configuration σ if hα, X i > 0. It will be convenient to identify a move with the corresponding vector α. Thus we may talk of improving vectors (meaning that hα, X i > 0). Similarly, we say that certain moves are linearly independent if the corresponding vectors are. 2.1 Basic idea for the analysis We first observe that for non-zero α ∈ ZE , the random variable hα, X i also has density bounded by ϕ. Thus for a fixed move from σ to σ −v , one has P(hα, X i ∈ (0, ϵ]) ≤ ϕϵ. Naively (ignoring correlations), one could expect that for a fixed sequence of moves with corresponding vectors α 1 , . . . , α ℓ ,   P ∀i ∈ [ℓ], hαi , X i ∈ (0, ϵ] ≤ (ϕϵ)ℓ . (4) A rigorous and more general statement in this direction is given in the following lemma. STOC’17, June 2017, Montreal, Canada is to fix the above calculation when the length of the sequence is replaced by the linear rank of the sequence of improving moves. A particularly important task for us will be to show that given any sequence of length Ω(n) of potentially improving moves, one can always find many αi ’s which are linearly independent. (Some sequences of moves cannot possibly be improving, e.g., if the same coordinate is flipped twice in a row.) Given an initial configuration σ0 and a sequence of moves L of length ℓ, let the corresponding move operators be α 1 , . . . , α ℓ . Consider the |E| × ℓ matrix A L = [αi ]iℓ=1 whose ith column is the vector αi ∈ {−1, 0, 1} E (thus each row is indexed by an edge e ∈ E). Note that the vectors αt , and thus also the matrix A L depends (implicitly) on the initial spin state σ0 . The maximum number of linearly independent moves in L is the rank of the matrix A L ; and thus we may apply Lemma 2.1 with k being this rank. This turns out not to be sufficient for our needs. However, if a sequence of moves L is an improving sequence from some initial state, then every contiguous segment of L is also improving from some (different) state. We use the term block to refer to a contiguous segment of some sequence of moves under consideration (we will formally define it in Section 3). Thus to bound the probability that L is improving we can instead consider only a segment of our choice of L. Note that there are two competing effects in the choice of a segment: on the one hand the probability that a block is ϵ-slowly improving is generally much larger than the probability that the full sequence is ϵ-slowly improving; on the other hand any given block appears in many different sequences, which yields an improvement in the union bound. Our proof will proceed in two key steps: (i) find a block of L with relatively high rank (this is done in Section 3), and (ii) apply the union bound we alluded to above in a more efficient way so as to replace the term 2n (counting possible initial configurations) by a smaller term (Section 4). To this end, we will want to find a block in L which has a high rank and in which the number of distinct symbols is as small as possible. 2.2 Preliminary linear algebra We now provide some preliminary results which prepare us to find Lemma 2.1 (Lemma A.1 (Etscheid and Röglin 2014)). Let α 1 , . . . , αk a lower bound for the rank of the matrix A L corresponding to a sequence L = (v 1 , . . . ,v ℓ ). (Here vt ∈ V denotes the vertex which be k linearly independent vectors in ZE . Then the joint density of moves at step t.) Denote by σt the spin configuration after step t. k (hαi , X i)i ≤k is bounded by ϕ . In particular, if sets Ji ⊂ R have The following statement is a direct consequence of equation (3). measure at most ϵ each, then   Lemma 2.2. The vector αt is supported precisely on the edges inP ∀i ∈ [k], hαi , X i ∈ Ji ≤ (ϕϵ)k . cident to vt . The entry in αt corresponding to the edge {vt , u} is −σt (vt )σt (u), which is also equal to σt −1 (vt )σt −1 (u). This lemma is stated slightly differently from Lemma A.1 of (Etscheid and Röglin 2014) but the same proof applies. If in a seWe now make the following simple observation. quence of moves all moves are linearly independent, then (4) holds. Lemma 2.3. The rank of A L does not depend on the initial configUnder this assumption, a union bound implies that the probability uration σ0 . there exists an initial configuration and a sequence of ℓ improving moves which improves by at most ϵ (since each step improves Proof. Let A L be obtained from some initial configuration σ0 by at most ϵ), is smaller than 2n n ℓ (ϕϵ)ℓ , since there are 2n iniand let A L′ be obtained from another initial configuration σ0′ . Both matrices are derived from the same sequence L. For any vertex u tial configurations and at most n ℓ sequences of length ℓ. In other and time t we have that σt (u)σt′(u) = σ0 (u)σ0′(u). Thus the row corwords, with high probability, any sequence of length Ω(n) would responding to an edge {u,v } in A L is σ0 (u)σ0 (v)σ0′ (u)σ0′(v) times improve the cut value by at least Ω(1/poly(n)). Since H is bounded the corresponding row in A L′ , and thus these two matrices have by poly(n), as a consequence of this, the FLIP algorithm should the same rank.  reach a local maximum after at most poly(n) steps. The challenge STOC’17, June 2017, Montreal, Canada Rather than working with the matrix A L directly, we will consider the matrix A = AL whose t-th column is −σt (vt )αt (for t ∈ [ℓ]). Obviously A has the same rank as A; in light of this and of Lemma 2.3, we define the rank of a sequence of moves by rank(L) = rank(AL ). For future reference, we give the following alternative definition of the matrix A (the two definitions are equivalent by Lemma 2.2). Definition 2.4. For a given sequence L = (v 1 , . . . ,v ℓ ), let A = AL be the |E| × ℓ matrix with rows indexed by edges. For an edge e = {u,v } and time t such that u , vt , the entry A[e, t] = 1vt =v σt (u). Thus the t-th entry of the row corresponding to an edge e = {u,v } is non-zero, if and only if vt ∈ {u,v }. If vt = v, then the t-th entry of the row A[{u,v }] is the spin of u (the other endpoint of the edge) at time t, i.e., σt (u) (which also equals σt −1 (u) since u , v = vt ). 3 BOUNDING THE RANK OF L The goal of this section is to prove Lemma 3.1 which gives a lower bound on the rank of L in terms of simple combinatorial properties of L. First we introduce some notation. For any sequence of moves L, a vertex that appears only once in L is called a singleton; vertices that appear at least twice are called repeated vertices. Let ℓ(L) be the length of L; Let s 1 (L) be the number of singletons in L, and let s 2 (L) be the number of repeated vertices in L. Denote by s(L) = s 1 (L) + s 2 (L) the total number of distinct vertices that appear in L. When the sequence of moves L is clear from the context, we shall use ℓ, s, s 1 and s 2 to denote ℓ(L), s(L),s 1 (L) and s 2 (L), respectively. A block of a sequence L = (v 1 ,v 2 , . . . ,v ℓ ) is a contiguous segment from the sequence, i.e. (vi , . . . , v j ) of length j −i + 1 for some i ≤ j. We denote this block by L[i, j]. A maximal block (w.r.t. inclusion) of L which consists of only singletons is called a singleton block. A maximal block of L which consists of only repeated vertices is called a transition block. Thus L is naturally partitioned into alternating singleton and transition blocks. Note that a repeated vertex might appear only once in a specific transition block, in which case it must appear also in at least one other transition block. For every v in L, let b(v) be the number of transition blocks containing v. Let T1 , . . . ,Tk denote the transition blocks, and x + = max(x, 0). Throughout the proof, we use u,v, w etc. to denote vertices in V ; sometimes for the purpose of enumeration, we might also use integers 1, 2, . . . to denote vertices in V which should cause no confusion. The next lemma is the main result of this section. Lemma 3.1. For any sequence of moves L one has (i) rank(L) ≥ min(s(L), n − 1). Furthermore, if s(L) < n and L does not visit any state more than once, then (ii) rank(L) ≥ s(L) + s 2 (L)/2. Í Í (iii) rank(L) ≥ s 1 (L) + i s(Ti ) = s(L) + v (b(v) − 1)+ , where the sum is over the transition blocks of L. Note that L visits a state more than once if σi = σ j for some i < j, or equivalently the block L[i + 1, j] contains every vertex an even number of times. (This clearly is a property of L, independent of σ0 ). If a sequence is improving, then it cannot revisit any state. Omer Angel, Sébastien Bubeck, Yuval Peres, and Fan Wei We can safely disregard any sequence which fails this condition in later analysis. Proof. (i) Without loss of generality, suppose 1, 2, . . . , s are the only vertices appearing in L, and suppose that s < n. Let ti be some time at which vertex i appears in L; Consider the s × s sub-matrix of A restricted to the columns ti ’s and the rows corresponding to edges {i, n} for i = 1, 2, . . . , s. By our choice of ti , the column ti has a non-zero entry at the row corresponding to {i, n}, and no others, and thus has full rank s. If s = n apply the above reasoning to the set of times {t 1 , . . . , tn−1 }. (ii) We first make the following simple observation. Given a sequence L which does not revisit any state, if vertex v is moved at least twice, then the block between any two consecutive moves of v contains some vertex u an odd number of times in this block. This is clear, since any block in L contains some vertex an odd number of times by an earlier argument. We create an auxiliary directed graph H as follows. The vertices of H are the n vertices of G. For each repeated vertex v, there must be a vertex u that appears an odd number of times between the first two times v appears. We pick one such u arbitrarily, and add to H a directed edge from v to u. Note that H might contain both an edge and its reverse (e.g. for the sequence L = 1, 2, 1, 3, 2). Each repeated vertex has one out-going edge in H , and so H has exactly s 2 directed edges. Moreover, directed cycles (including cycles of length 2) in H are vertex-disjoint, and their total length is at most s 2 . Let us define a sub-graph of H by removing one edge from each directed cycle of H . Since the cycles are vertex-disjoint (since the out-degree for each vertex is at most 1), we remove at most s 2 /2 edges, and obtain an acyclic sub-graph of H with at least s 2 /2 edges. Since not all vertices appear in L, suppose without loss of generality that vertex n does not appear in L. Part (ii) of the lemma now follows from the following. Claim 3.2. For any acyclic sub-graph H ′ of H , the following edges correspond to linearly independent rows in A: All edges of H ′, together with {v, n} for vertices v ∈ L. We prove this by induction on the number of edges in H ′. If H ′ is the empty subgraph, these are precisely the rows used to prove part (i). Now suppose H ′ is not empty. Since H ′ is acyclic, there must be a vertex v with in-degree 0 and unique outgoing edge Í e = {v, u}. Suppose we have a linear combination i λi A[{i, n}] + Í e ∈H ′ µ e A[e] = 0, where A[e] is the row corresponding to e and the sum is over the edges of the claim. Let t 1 , t 2 be the first two times that v moves. By the definition of A (see Definition 2.4), the t 1 -th and t 2 -th entry of A[{v, n}] are both σt1 (n) = σt2 (n) (since n does not move). Furthermore, since u appears an odd number of times between the first two appearance of v we have that the t 1 -th entry and t 2 -th entry of A[e] are of opposite signs. Furthermore, since v has out-degree 1 in H ′ and in-degree 0, among the rows we have picked, only the rows A[{v, n}] and A[e] have non-zero entries in positions t 1 , t 2 . We thus have λv ± µ e = 0, implying λv = µ e = 0. Thus the linear combination involves only edges of H ′ \ e and edges to n. Applying the inductive hypothesis to H ′ \ e gives that the linear combination is trivial. Local Max-Cut in Smoothed Polynomial Time (iii) Suppose without loss of generality that 1, . . . , s 2 are the repeated vertices in L. By the definition of b(i), there exist times t 1 (i), t 2 (i), . . . , tb (i ) (i) in different transition blocks at which i moves, and for any 2 ≤ j ≤ b(vi ), there is a singleton vertex wi, j that appears in the block L[t j−1 (i), t j (i)]. We claim that the following rows are linearly independent. For each v in L the edge {v, n}, and for each repeated vertex i, the rows ei, j = {i, wi, j } for j = 2, . . . , b(i). For any repeated vertex vi , among the rows we have picked, the ones which have non-zero entries at times t 1 (i), . . . , tb (i ) (i) correspond to the rows of {i, n}, and ei, j for j = 2, . . . , b(vi ). At those columns, by Lemma 2.3, we can assume the row A[{i, n}] has all ones. The row A[ei, j ] has entries 1 before the (unique) appearance of wi, j and −1 after the appearance. Thus the minor for these rows and the sequence of times {t 1 (i), . . . , tb (i ) (i)} has the form 1  1  1  1  .  ..  1 −1 1 1 .. . 1 −1 −1 1 .. . 1 −1 −1 −1 .. . · · ·  · · ·  · · ·  . · · ·  . .  . This clearly has full rank b(i). For singleton vertices v appearing at time t = tv , the only selected row with no-zero t-th entry corresponds to edge {v, n}. Thus if we group together columns for the repeated vertices, the selected rows of A have a block structure, with blocks of the form above along the diagonal and zeros elsewhere. It follows that Õ Õ rank(A) ≥ s 1 + b(i) = s + (b(i) − 1)+ .  i ≤s2 4 i ≤s2 PROOF OF PROPOSITION 1.6 STOC’17, June 2017, Montreal, Canada this contradicts criticality of B.  Lemma 4.2. Suppose s(B) < n. For a critical block B as in Lemma 4.1, we have β s 1 (B). rank(B) ≥ s(B) + 1+β Proof. We apply Lemma 3.1(iii) to B. Let T1 , . . . ,Tk be the transition blocks of B. If the whole of B is a transition block, i.e. s 1 (B) = 0, then s(T1 ) = s(B) and rank(B) = s(B) by Lemma 3.1(iii) yields the claim. Otherwise, each Ti is a proper sub-block of B, and by criticality of B we find ℓ(Ti ) < (1 + β)s(Ti ) for each Ti . Thus rank(B) ≥ s 1 + Õ vertices i in B b(i) = s 1 (B) + ≥ s 1 (B) + k Õ i =1 s(Ti ) k 1 Õ ℓ(Ti ) 1 + β i =1 ℓ(B) − s 1 (B) 1+β β ℓ(B) + s 1 (B), ≥ 1+β 1+β Í where we have used that ℓ(B) = s 1 (B)+ ki=1 ℓ(Ti ), since each letter is either a singleton or part of one of the Ti . By Lemma 4.1, ℓ(B) = ⌈(1 + β)⌉s(B), and the claim follows.  ≥ s 1 (B) + Corollary 4.3. For a critical block B with s(B) < n, we have   β 1 s 1 (B), s 2 (B) . rank(B) ≥ s(B) + max 1+β 2 In particular, In this section we prove Proposition 1.6, and thus conclude the proof of our main result (Theorem 1.1). We first show in Subsection 4.1 that any improving sequence contains a certain special block which we can use to obtain high rank. Then we conclude the proof of Proposition 1.6 in Section 4.3 with an “improved” union bound argument. Proof. The two bounds come from Lemmas 3.1 and 4.2. Since s 1 (B) + s 2 (B) = s(B), the last bound is obtained by a convex combination of the two preceding bounds.  4.1 4.2 A better bound on improving sequences Finding a critical block with large rank We start with a simple combinatorial lemma. Fix some β > 0. We say that a block B is critical if ℓ(B) ≥ (1 + β)s(B), and every block B ′ strictly contained in B has ℓ(B ′) < (1 + β)s(B ′). Lemma 4.1. Fix any positive integer n ≥ 2 and a constant β > 0. Given a sequence L consisting of s(L) < n letters and with length ℓ(L) ≥ (1+ β)s, there exists a critical block B in L. Moreover, a critical block satisfies ℓ(B) = ⌈(1 + β)s(B)⌉. Proof. A block satisfying ℓ(B) ≥ (1 + β)s(B) exists, since the whole sequence L satisfies this. A minimal (w.r.t. inclusion) block that satisfies this will by definition be a critical block. We now show that B satisfies ℓ(B) = ⌈(1 + β)s(B)⌉. If ℓ(B) ≥ ⌈(1 + β)s(B)⌉ + 1, remove the last vertex from B, thus obtaining B ′. Then ℓ(B ′) = ℓ(B) − 1, while s(B) ≥ s(B ′) ≥ s(B) − 1. For the block B ′ we thus have ℓ(B ′) = ℓ(B) − 1 ≥ ⌈(1 + β)s(B)⌉ ≥ ⌈(1 + β)s(B ′)⌉ ; rank(B) ≥ 1 + 4β s(B). 1 + 3β Lemma 2.1 implies that the probability that a sequence L is ϵ-slowly improving from any given σ0 is at most (ϕϵ)rank(L) , and therefore the probability that L is ϵ-slowly improving from some σ0 is at most 2n (ϕϵ)rank(L) . For sequences with large rank this is sufficiently small for our needs. However, for sequences with small rank and small s a better bound is needed. The next novel ingredient of our proof is an improvement of this bound that reduces the factor of 2n , provided s(L) is small. Lemma 4.4. Suppose the random weights X e a.s. have |X e | ≤ 1. Then  s 4n P(L is ϵ-slowly improving from some σ ) ≤ 2 (8ϕϵ)rank(L) . ϵ The key idea is that instead of taking a union over the initial state σ0 for the non-moving vertices, we only consider the influence of the non-moving vertices on the moving vertices. STOC’17, June 2017, Montreal, Canada Proof. Without loss of generality, we may assume that the vertices that appear in L = L[1, ℓ] are 1, . . . , s, and that s + 1, . . . , n do not appear. We separate H(σ ) = H0 (σ ) + H1 (σ ) + H2 (σ ), where Hj is the sum over edges with j endpoints that appear in L ∪ {s + 1}, for j ∈ {0, 1, 2}. The reason for including s + 1 will become clear later. With a given initial state σ0 , let σt be the state after flipping the state of vt . For u > s (so u does not appear in L), we have that σt (u) is constant over t ≤ ℓ and thus H0 (σt ) = H0 (σ0 ) for all t ≤ ℓ. Moreover, as in (3), we get n Õ H1 (σt ) − H1 (σt −1 ) = −σt (vt ) Xvt ,u σ0 (u) = σt (vt )Q(vt ), u=s+2 Ín where Q(v) = − u=s+2 Xvt ,u σ0 (u). One may think of Q as a constant external field acting on the s moving vertices. Finally, the increments of H2 are linear functionals of the weights on edges with both endpoints in {1, . . . , s, s + 1}. We denote these functionals by ᾱt , so that Omer Angel, Sébastien Bubeck, Yuval Peres, and Fan Wei by Lemma 3.1(i). By Lemma 2.1, each term in (5) is bounded by (ϕϵ)n−1 , and so provided H(σt ) − H(σt −1 ) = hᾱt , X i + σt (vt )d(vt ) + δ t , where |δ t | ≤ ϵ. If the sequence is ϵ-slowly increasing, then hᾱt , X i + σt (vt )d(vt ) ≤ 2ϵ, and thus hᾱt , X i lies in the union of two intervals of length 4ϵ centered at ±d(vt ). Note that rank(ᾱt ) = rank(L), since we included in ᾱ the contributions from the stationary vertex s + 1. (This holds also if s = n.) By Lemma 2.1, the probability of this event is at most (8ϵϕ)rank(L) . Crucially, if we know (σ0 (i))i ≤s+1 and d(v) for v = 1, . . . , s, then the event under consideration is the same for all 2n−(s+1) possible configurations σ0 . The claim now follows by a union bound over the possible values of (σ0 (i))i ≤s+1 and d(v).  4.3 Proof of Proposition 1.6 Proof of Proposition 1.6. Fix β = 1. Let R be the event that there exists an initial configuration σ0 and a sequence L of length 2n which is ϵ-slowly improving. Our goal is to show P(R) = o(1). We consider two cases: either the sequence L has s(L) = n or else s(L) < n. Call these events R 0 and R 1 . We bound P(R 0 ) by a union bound over sequences: Õ Õ P(L is ϵ-slowly improving from σ0 ). (5) P(R 0 ) ≤ σ0 L:s(L)=n The summation is over all initial configurations σ0 and all possible sequences of improving moves L from σ0 with n moving vertices. There are 2n initial configurations and at most n 2n sequences of length 2n. Since s = n, each such sequence has rank(L) ≥ n − 1 (6) is small. We turn to the event R 1 , that there exists an initial configuration σ0 and an ϵ-slowly improving sequence L of length 2n such that s(L) < n. By Lemma 4.1, on the event R 1 for some s < n there exists a critical block using precisely s vertices and some initial configuration such that the block is ϵ-slowly improving from that configuration. Thus Õ P(R 1 ) ≤ P(B is ϵ-slowly improving from some σ ). (7) critical B By definition, a critical block has ℓ(B) = 2s(B). By Corollary 4.3, it has rank(B) ≥ 5s(B)/4. Thus by Lemma 4.4, for any critical block we have P(B is ϵ-slowly improving from some σ )   s(B)   s(B) 4n ≤2 (8ϕϵ)5s(B)/4 ≤ 2 64ϕ 5/4nϵ 1/4 . ϵ H(σt ) − H(σt −1 ) = σt (vt )Q(vt ) + hᾱt , X i. Note that ᾱt is simply the restriction of αt to edges with both endpoints in {1, . . . , s + 1}. Observe that ᾱt depends on the first s + 1 coordinates of σ0 , but not on the other coordinates. Since X e is assumed to be bounded, we have |Q(v)| ≤ n. Consider the set D = 2ϵZ ∩ [−n, n], of size at most n/ϵ + 1 ≤ 2n/ϵ. We have that Q(v) is within ϵ of some element of d(v) ∈ D. Instead of a union bound on σ0 , we now use a union bound over (σ0 (i))i ≤s+1 and the vector (d(v))v ≤s . From the above definitions it follows that 2n 2ϕϵ P(R 0 ) ≤ 2n n 2n (ϕϵ)n−1 = o(1), The number of critical blocks using s letters is at most n 2s , (which is the number of sequences of length ℓ = 2s). Thus  s Õ P(R 1 ) ≤ 2 n 2s 64ϕ 5/4nϵ 1/4 . (8) s <n This sum tends to 0 as n → ∞ when ϵ = n −(12+η)ϕ −5 with η > 0.  Remark 4.5. The proof above shows that for ϵ = αϕ −5 n −12 , we have P(R 1 ) ≤ O(α 3/4 ) as α → 0 (since a critical block with β = 1 has s ≥ 3) and hence that the run time of the FLIP algorithm, divided by n 15 is tight. The number of critical blocks with a given s can be bounded by ns s 2s ≤ (ens)s which is less than n 2s for s ≤ n/e. Using this gives s Õ P(R 1 ) ≤ 2 Cϕ 5/4n 2sϵ 1/4 , (9) s <n and so P(R 1 ) decays super-polynomially in α. Corollary 1.2 follows easily from the proof of Proposition 1.6: Proof of Corollary 1.2. Suppose an increasing sequence of length L ≥ 2n exists. Since the total weight of any cut is in [−n 2/4, n 2 /4, there must be a block of size 2n in L such that the total improven2 ≤ 2n 3 /L. Let R(n, L) be ment along the block is at most ϵ = 2[L/2n] the probability there is such a block using all n letters (R 0 above), and R(s, L) the probability there is a critical block of length 2s using s letters. Let T be the number of steps before FLIP terminates. Then we have Õ P(R(s, L)). P(T ≥ L) ≤ s ≤n and so E(T ) = ∞ Õ L=1 P(T ≥ L) ≤ n 15 + Õ Õ L>n 15 s ≤n P(R(s, L)), Local Max-Cut in Smoothed Polynomial Time and we need to show that the last sum is O(n 15). For s = n, by (6), P(R(n, L)) ≤ 2n n 2n (ϕϵ)n−1 = 2n n 2n (ϕ2n 3 /L)n−1 , and the sum over L > n 15 is o(n 15 ). For s > 4, by (9),  s P(R(s, L)) ≤ 2 Cϕ 5/4n 2s(2n 3 /L)1/4 , and so Õ C P(R(s, L)) ≤ (Cs)s n 11s/4 (n 15 )1−s/4 ≤ (Cs)s−1n 15−s . s L>n 15 Í Í Thus 4<s <n L>n 15 P(R(s, L)) = O(n 15 ). For small s the bound above is not sufficient, and we need a better rank bound. There are no critical blocks with s = 1 or s = 2. It is easy to check that critical blocks with s = 3 all have rank 6. A short exhaustive search yields that critical blocks with s = 4 have rank 7 or 8. Since the number of sequences with s = 3 or s = 4 is O(n s ), for s = 3, 4 we get   s  4n P(R(s, L)) ≤ O n s (8ϕϵ)s+3 = O(n 2s ϵ 3 ). ϵ Í Í Thus s=3, 4 L>n 15 P(R(s, L)) = o(1), which completes the proof.  5 A WORD THAT IS SPARSE AT EVERY SCALE The quasi-polynomial proof in (Etscheid and Röglin 2014) (which applies to any graph) relied crucially on the following lemma: for any word of length ℓ = Ω(n) over an alphabet of size n, there must exist a subword of some length ℓ ′ such that the number of distinct letters which appear more than once in this subword is Ω(ℓ ′ /log(n)) (see Lemma 5.1 below for a precise statement). In some sense this says that “a word cannot be too sparse at every scale” (a word is viewed as sparse if it is mostly made of letters that appear only once). We provide here a simple new proof of this statement. A natural approach to prove smoothed polynomial complexity for any graph (that is generalize Theorem 1.1 to arbitrary graphs) would be to remove the log(n) term in this combinatorics of words lemma (see paragraph after Lemma 5.1 for more details). Our main contribution is this section is to show that such an improvement is not possible: we show by a probabilistic construction that Lemma 5.1 is tight, that is there exist words which are sparse at every scale to the extent allowed by the lemma. More specifically we construct a word of length Ω(n) such that for any subword of length ℓ ′ the number of repeating letters is O(ℓ ′/log(n)) (in fact we prove a stronger version of this statement where ℓ ′ is replaced by the number of distinct letters in the subword), see Theorem 5.2 below. Lemma 5.1. Suppose a > 1, and that L is a sequence of length an in an alphabet of n letters. Then there exists a block B in L such that s 2 (B) s 2 (B) a−1 ≥ ≥ . s(B) ℓ(B) a log2 (n) Proof. The first inequality holds trivially for every block B. Define the surplus of a sequence L to be ℓ(L) − s(L), i.e. the difference between the number of elements and the number of distinct elements in the sequence. If a block B is a concatenation of B 1 and B 2 then its surplus is at most the total surplus of B 1 and B 2 plus s 2 (B). STOC’17, June 2017, Montreal, Canada Let m(ℓ) be the maximum surplus in any block of length ℓ in L. Assume that for some ϵ, for every block B from L we have s 2 (B) ≤ ϵℓ(B). Then one has m(2ℓ) ≤ 2m(ℓ) + ϵ · 2ℓ. By recursing this inequality, with m(2ℓ − 1) ≤ m(2ℓ) and m(1) = 0 we get m(an) ≤ ϵan log2 (n). Since m(an) = an − s(L) ≥ (a − 1)n, this shows that ϵ has to be a−1 which concludes the proof.  greater than a log (an) 2 It is easy to check that the proof of the rank lower bound given in Lemma 3.1(ii) (and (i)) applies to arbitrary graphs. By using Lemma 5.1 above together with the union bound argument from Section 4.3 one obtains an alternative proof to the quasi-polynomial complexity result of (Etscheid and Röglin 2014). A tempting approach to prove a polynomial complexity result for any graph would be to “simply” replace the log(n) term in Lemma 5.1 by some constant. The main result of this section is to show that this cannot be done, and that the log(n) in Lemma 5.1 is tight up to possibly constant factors. As noted above, this can be interpreted as saying that there exist words which are sparse at every scale. In fact, we prove something stronger, as stated in the following theorem. Theorem 5.2. For every a > 1 there exists a C so that for every n there is a sequence of length ℓ = [an] in n letters so that every block B of L has s 2 (B)/s(B) ≤ C/log n. Moreover, for n > n 0 (a) one may take C = 9a log(a). This is stronger in that we have a bound on s 2 (B)/s(B) ≥ s 2 (B)/ℓ(B). We remark that decreasing a makes the problem easier (just take the first [a ′n] letters). We can assume all letters are used in the sequence, otherwise we can replace some repetitions by unused letters. 5.1 The probabilistic construction The construction proving Theorem 5.2 is probabilistic, and implies that there are many sequences with these properties. We do not optimize the constant C here in order to keep the proof simple and clean. A more careful analysis will improve C. We create a sequence as follows. In stage one of the construction we write down the (potentially) repeated letters. Each repeated letter is written in some random set of locations, possibly overwriting previous letters. Afterwards, in stage two, all positions where no repeated letters have been written are filled in with new and unique letters. Note that it is possible that a potentially repeated letter is overwritten, and consequently appears only once or even not at all in the final sequence. The construction is defined in terms of integers b 0 , b 1 and γ which we will specify later in the proof. The potentially repeated letters are denoted by i and i ′ for i ∈ {b 0, . . . , b 1 −1}. Thus the total number of potentially repeated letters is 2(b 1 −b 0 ). To simplify the description, we construct an infinite sequence and truncate afterwards to the first ℓ letters. For each i ∈ [b 0 , b 1 ), split N to blocks of size γi. In each block [kγi, (k + 1)γi) where k ∈ N, we choose uniformly one position; In that position write the letter i if k is even, and i ′ if k is odd. All these choices are independent. (Creating an infinite sequence at this stage avoids having shorter blocks at the STOC’17, June 2017, Montreal, Canada Omer Angel, Sébastien Bubeck, Yuval Peres, and Fan Wei end.) A position that is left empty at the end of stage one is filled in stage two. 5.2 Negative correlations For t ≤ ℓ, let Ut be the event that position t is empty at the end of stage one. We will prove that any block contains many unique letters. If the Ut were independent this would follow from standard large deviation bounds for Binomial random variables. While the Ut are not independent, they have a weaker property which is sufficient for our needs. A collection of events {Ut } is called negatively correlated if for every subset S of indices and every t < S we have P(Ut |Us ∀s ∈ S) ≤ P(Ut ), P(Utc |Usc ∀s ∈ S) ≤ P(Utc ). (10) (11) Negative correlation of the (Ut ) will follow from the following more general statement. Proposition 5.3. Let A1 , . . . , Am be some finite sets, and pick a uniform element from each set independently. Let Ux be the event that element x is never picked. Then the Ux are negatively correlated. This applies to our model, by taking the sets to be the intervals [kγi, (k + 1)γi) for b 0 ≤ i < b 1 and all k. Proof. The effect of conditioning on Us ∀s ∈ S is simple: The element from Ai is chosen uniformly from Ai \ S. Clearly this can only decrease the probability that an element t is not selected from any Ai . Since selections are independent, this gives (10). Now we prove (11). The claim is equivalent to proving P(Ut |Usc ∀s ∈ S) ≥ P(Ut ), which in turn is equivalent to P(Usc ∀s ∈ S |Ut ) ≥ P(Usc ∀s ∈ S). Let ai be the element picked from Ai . To obtain the law of (ai ) conditioned on Ut , start with the unconditioned selections, and resample each ai if ai = t, until another element is chosen. If initially (in the unconditioned vector), every element of S is selected from some Ai , then this is also true after the resampling, and so the probability of such full occupation is increased.  We use the following generalized Chernoff bounds for negatively correlated events. Î 1 −1  i −1/γ +x  Proof. Let f (x) = bi =b . Then f is increasing in x, i +x 0 and d = f (0). We have that d γ ≤ f (1/γ ) · f (2/γ ) · · · f (1) = b0 , b1 as this is a telescoping product. Similarly, d γ ≥ f (0) · f (−1/γ ) · · · f ((1 − γ )/γ ) = b0 − 1 . b1 − 1  Proof of Theorem 5.2. With a > 1 and n given, we apply the probabilistic construction above with parameters   √  log n b 0 = [log n] b1 = n γ = . 2 log(2a) 1 as n → Note that b 0 /b 1 = n −1/2+o(1) , and therefore d tends to 2a ∞. We first claim that with good probability the resulting sequence √ uses at most n letters. Stage one uses at most 2b 1 = 2 n letters. The expected number of letters used in stage two is dℓ ≤ n/2 + o(n). By Markov’s inequality, the whole sequence use at most n letters with asymptotic probability at least 1/2. Next we consider repetitions within (possibly smaller) blocks. Since occurences of the letter i are at least γi apart, and similarly for the letter i ′ , not all letters can appear multiple times in short blocks. In particular, each block B ∈ L is certain to have s 2 (B) ≤ 2ℓ(B)/γ . Moreover, blocks B with ℓ(B) ≤ γb 0 have no repeated letters by our construction, so that s 2 (B) = 0 for such blocks. To estimate s(B), we note that the number of letters in B is at least the number of letters added to B in stage two: s(B) ≥ u(B) := j Õ 1Ut . t =i We have Eu(B) = dℓ(B). By the Chernoff bound Theorem 5.4 with δ = 1/2 we have   p P u(B) ≤ 12 dℓ(B) ≤ ( 2/e)d ℓ(B) . 2 For blocks of length at least γb 0 this is e −c log n = o(n −2). By a union bound, with high probability every block of length at least γb 0 has dℓ(B) s 2 (B) ≤ 2ℓ(B)/γ and s(B) ≥ , Theorem 5.4 ((Panconesi and Srinivasan 1997)). Suppose U1 , . . . , Uk 2 Ík are negatively correlated events, and let Y = i =1 1Ui be the number 4 . (Shorter blocks have s (B) = 0.) 2 (B) and so ss(B) ≤ dγ of bad events occur. Then for any constant δ ∈ (0, 1), 2   E[Y ] 8a log(2a)+o(1) As n → ∞, this decays as , implying the claim for log(n) P(Y ≤ (1 − δ )E[Y ]) ≤ (1 − δ )−(1−δ )e −δ . n large enough. By changing C we can get the claim also for all smaller n.  5.3 Analysis of the construction We first estimate the probability that a letter of the sequence is  Îb 1 −1  1 filled in stage two. This probability is P(Ut ) = i =b 1 − γ i , 0 which we denote by d. Lemma 5.5.    1/γ  b0 b 0 − 1 1/γ . ≤d ≤ b1 − 1 b1 Remark 5.6. The above construction can be used to show that for any a > 0 and η > 0 there exist infinitely many graphs G (with number of vertices tending to infinity), paired with some initial configurations σ0 and sequence of moves L, such that ℓ(L) ≥ a|V (G)|, and for each block B ∈ L, rank(B) ≤ (1 + η)s(B). These graphs are a significant obstacle to generalizing our main result (Theorem 1.1) beyond the complete graph via rank arguments. Local Max-Cut in Smoothed Polynomial Time ACKNOWLEDGMENTS We are grateful to Constantinos Daskalakis for bringing this problem to our attention, and for helpful discussions at an early stage of this project. We thank the Bellairs Institute, where this work was initiated. Most of this work was done at Microsoft Research Redmond during the first author’s visit and the last author’s internship. O. Angel is supported in part by NSERC. REFERENCES R. Elsässer and T. Tscheuschner. 2011. Settling the complexity of local max-cut (almost) completely. In Proceedings of the 38th international colloquim conference on Automata, languages and programming - Volume Part I (ICALP’11). 171–182. M. Etscheid and H. Röglin. 2014. Smoothed analysis of local search for the maximumcut problem. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA ’14). 882–889. STOC’17, June 2017, Montreal, Canada A. Fabrikant, C. Papadimitriou, and K. Talwar. 2004. The complexity of pure Nash equilibria. In Proceedings of the thirty-sixth annual ACM symposium on Theory of computing (STOC ’04). 604–612. J. J. Hopfield. 1982. Neural networks and physical systems with emergent collective computational abilities. Proceedings of the National Academy of Sciences 79, 8 (1982), 2554–2558. D. S. Johnson, C. H. Papadimtriou, and M. Yannakakis. 1988. How easy is local search? J. Comput. Syst. Sci. 37, 1 (1988), 79–100. A. Panconesi and A. Srinivasan. 1997. Randomized Distributed Edge Coloring via an Extension of the Chernoff–Hoeffding Bounds. SIAM J. Comput (1997), 350–368. A. A. Schäffer and M. Yannakakis. 1991. Simple local search problems that are hard to solve. SIAM J. Comput. (1991), 56–87. David Sherrington and Scott Kirkpatrick. 1975. Solvable Model of a SpinGlass. Phys. Rev. Lett. 35 (Dec 1975), 1792–1796. Issue 26. DOI: https://doi.org/10.1103/PhysRevLett.35.1792 D. A. Spielman and S-H. Teng. 2004. Smoothed analysis of algorithms: Why the simplex algorithm usually takes polynomial time. J. ACM (2004), 385–463.
8cs.DS
COCHARACTER-CLOSURE AND THE RATIONAL HILBERT-MUMFORD THEOREM arXiv:1411.7849v5 [math.AG] 3 Oct 2016 MICHAEL BATE, SEBASTIAN HERPEL, BENJAMIN MARTIN, AND GERHARD RÖHRLE Abstract. For a field k, let G be a reductive k-group and V an affine k-variety on which G acts. Using the notion of cocharacter-closed G(k)-orbits in V , we prove a rational version of the celebrated Hilbert-Mumford Theorem from geometric invariant theory. We initiate a study of applications stemming from this rationality tool. A number of examples are discussed to illustrate the concept of cocharacter-closure and to highlight how it differs from the usual Zariski-closure. Contents 1. Introduction 2. Preliminaries 3. Cocharacter-closure 4. The rational Hilbert-Mumford Theorem 5. Ascent and descent 6. Reduction to k-points 7. Geometric and rational conjugacy 8. Reduction to GLn 9. G-complete reducibility 10. The action of GL(W ) on End(W ) 11. Further examples References 1 5 10 11 14 17 19 23 25 27 30 33 1. Introduction Let G be a (possibly non-connected) reductive algebraic group over an algebraically closed field k, and let V be an affine variety over k on which G acts. A central problem in geometric invariant theory is to understand the structure of the set of orbits of G on V . The closed orbits are particularly important, because they can be identified with the points of the quotient variety V //G. Given v ∈ V , it is well known that the closure G · v of the orbit G · v contains a unique closed orbit O. The Hilbert-Mumford Theorem says there exists a cocharacter λ of G such that the limit lima→0 λ(a) · v exists and lies in O—in fact, we can replace O with any closed G-stable subset of V that meets G · v [29, Thm. 1.4]. This gives a characterization of the closed orbits in terms of cocharacters: if the orbit G · v is not closed, then there is a cocharacter λ of G such that lima→0 λ(a) · v exists and lies outside G · v. 2010 Mathematics Subject Classification. 20G15 (14L24). Key words and phrases. Affine G-variety, cocharacter-closed orbit, rationality. 1 Conversely, if G · v is closed then lima→0 λ(a) · v lies in G · v for all λ such that the limit exists (cf. Section 2.4). A strengthening of the Hilbert-Mumford Theorem due to Hesselink [27], Kempf [29] and Rousseau [48] shows that if G · v is not closed, then there is a class of so-called “optimal” cocharacters λopt such that the limit lima→0 λopt (a) · v exists in V but lies outside G · v. Each cocharacter λopt enjoys some nice properties: for instance, if G is connected, then the parabolic subgroup Pλopt associated to λopt contains the stabiliser Gv . Moreover, if G, V and the G-action are defined over a perfect subfield k0 of k, k/k0 is algebraic and v ∈ V (k0 ), then λopt is Gal(k/k0 )-fixed and hence is defined over k0 . The (strengthened) Hilbert-Mumford Theorem has become an indispensable tool in algebraic group theory and has numerous applications in geometric invariant theory and beyond [41]: e.g., geometric complexity theory [39], [40], nilpotent and unipotent elements of reductive groups [18], [44], [43], [2], moduli spaces of bundles [24], good quotients in geometric invariant theory [25], Hilbert schemes [42], moduli spaces of sheaves [28], the structure of the Horn cone [45], Kähler geometry [56], filtrations for representations of quivers [58], symplectic quotients [41, App. 2C], degenerations of modules [59] and G-complete reducibility [4], [9]. Now suppose k is an arbitrary field, not necessarily algebraically closed. The orbit G · v is a union of G(k)-orbits. The structure of this set of G(k)-orbits can be very intricate. For instance, if w ∈ G·v and v, w are k-points then one can ask whether w is G(k)-conjugate to v. The answer is no in general; if k is perfect then this is controlled by the Galois 1-cohomology of Gv (ks ) (see Remark 7.3(iv) or [10]). Things only get more complicated when one considers the G(k)-orbits that are contained in G · v. Orbits of actions of reductive groups over nonalgebraically closed fields have come under increasing attention, particularly from number theorists. For instance, suppose k is a global function field, let v ∈ V (k) and let C be the set of all w ∈ V (k) such that w is G(kν )-conjugate to v for every completion kν of k; then Conrad showed that C is a finite union of G(k)-orbits [19, Thm. 1.3.3]. Bremigan studied the strong topology of the orbits when k is a local field [17] (see also Remark 7.3(v) below). Now let V be the Lie algebra g with the adjoint action of G. When k is perfect, J. Levy proved that if x ∈ g, then any two elements of the form lima→0 λ(a) · x that are semisimple are G(k)conjugate [32, 33]. We extend Levy’s result below, see Remark 4.4(ii). W. Hoffmann asked a question about limits lima→0 λ(a) · x when k is a global field of arbitrary characteristic, see Remark 7.7(ii). Both Levy and Hoffmann were motivated by constructions involving orbital integrals and the Selberg trace formula. In this paper we develop a theory of G(k)-orbits for k an arbitrary field, building on earlier work of three of us with Tange [9]. To make our results as general as possible, we do not endow the field k with any extra structure. Moreover, we need not always assume that v is a k-point. The most difficult problems arise when k is non-perfect. However, even for groups over perfect fields our methods apply; see Theorem 1.6(ii). Observe that for perfect fields the hypotheses on the stabilizers needed for our main results hold automatically (e.g., see Proposition 7.4). As noted above, the concept of a closed orbit is fundamental in geometric invariant theory over algebraically closed fields. A first problem is to devise a suitable analogue of this idea for G(k)-orbits. One can define the notion of a k-orbit over G [15, 10.2, Def. 4], or study the Zariski closure of a G(k)-orbit, but such constructions do not appear to be helpful here (cf. the discussion in [9, Rem. 3.9]). Instead we adopt an approach involving cocharacters. Let 2 Yk (G) denote the set of k-defined cocharacters of G. In [9, Def. 3.8], we made the following definition. Definition 1.1. The orbit G(k) · v is cocharacter-closed over k provided for all λ ∈ Yk (G), if v ′ := lima→0 λ(a) · v exists, then v ′ ∈ G(k) · v. We now extend this definition to cover arbitrary subsets of V , and introduce the cocharacterclosure of a subset of V : Definition 1.2. (a) Given a subset X of V , we say that X is cocharacter-closed (over k) if for every v ∈ X and every λ ∈ Yk (G) such that v ′ := lima→0 λ(a) · v exists, v ′ ∈ X. Note that this definition coincides with the one above if X = G(k) · v for some v ∈ V . c (b) Given a subset X of V , we define the cocharacter-closure of X (over k), denoted X , to be c c the smallest subset of V such that X ⊆ X and X is cocharacter-closed over k. (This makes sense because the intersection of cocharacter-closed subsets is clearly cocharacter-closed.) It follows from the Hilbert-Mumford Theorem that G · v is cocharacter-closed over k if c and only if G · v is closed. It is obvious that G · v is contained in G · v. Note, however, that this containment can be proper: e.g., see Example 11.1. Our first main result is a rational version of the Hilbert-Mumford Theorem. Theorem 1.3. Let v ∈ V . Then there is a unique cocharacter-closed G(k)-orbit O inside c G(k) · v . Moreover, there exists λ ∈ Yk (G) such that lima→0 λ(a) · v exists and lies in O. By a standard fact, the closure of a geometric G-orbit is again a union of G-orbits, [13, I 1.8 Prop.]. Thanks to Lemma 3.3(i), the rational counterpart holds for the cocharacterclosure of a G(k)-orbit in V . Therefore, we can mimic the usual “degeneration” partial order on the G-orbits in V in this rational setting: c Definition 1.4. Given v, v ′ ∈ V , we write G(k) · v ′ ≺ G(k) · v if v ′ ∈ G(k) · v . Then it is clear that ≺ is reflexive and transitive, so ≺ gives a preorder on the set of G(k)-orbits in V . In general, the behavior of the G(k)-orbits can be quite pathological; e.g., see Example 3.4, Remark 7.3(i), Example 7.6(ii) and Remark 7.7(ii). Our second main result holds under some mild hypotheses on the stabilizer Gv of v in G. Theorem 1.5. Let v ∈ V and suppose that Gv is k-defined. Then the following hold: (i) If G · v is Zariski-closed, then G(k) · v is cocharacter-closed over k. (ii) Let k ′ /k be an algebraic field extension and suppose that G(k ′ )·v is cocharacter-closed over k ′ . Then G(k) · v is cocharacter-closed over k. Moreover, the converse holds provided that v ∈ V (k) and k ′ /k is separable. (iii) Let S be a k-defined torus of Gv and set L = CG (S). Then G(k) · v is cocharacterclosed over k if and only if L(k) · v is cocharacter-closed over k. (iv) Let w ∈ V and suppose that both G(k) · w ≺ G(k) · v and G(k) · v ≺ G(k) · w. Then G(k) · v = G(k) · w. In fact, we prove stronger versions of the results of Theorem 1.5 in Proposition 5.5, Theorems 5.7 and 7.1 and Corollary 7.2 below. Note that the rationality condition on the centralizer Gv in Theorem 1.5 is satisfied in many instances, e.g., if v ∈ V (k) and k is perfect (see Proposition 7.4). 3 Recall that G is k-anisotropic provided Yk (G) = {0}. Part (i) of the next theorem gives a characterization of k-anisotropic reductive groups over an arbitrary field k in terms of cocharacter-closed orbits. In the special case when k is perfect, we recover in part (ii) a result of Kempf [29, Thm. 4.2]. Theorem 1.6. (i) G is k-anisotropic if and only if for every k-defined affine G-variety W and every w ∈ W (k), the orbit G(k) · w is cocharacter-closed over k. (ii) Suppose k is perfect. Then G is k-anisotropic if and only if for every k-defined affine G-variety W and every w ∈ W (k), the orbit G · w is closed in W . Part (ii) of Theorem 1.6 follows from part (i), Theorem 1.5(ii) and the Hilbert-Mumford Theorem. Observe that it suffices to consider the case when W is a k-defined rational Gmodule, cf. Remark 2.3. Characterizing anisotropy over perfect fields in terms of closed orbits was a question of Borel, [12, Rem. 8.8 (d)]. As noted above, this question was answered by Kempf. Birkes [11] proved Theorem 1.6(ii) over the reals and number fields, and Bremigan [17] proved it for p-adic fields. Note that Theorem 1.6(ii) fails for non-perfect fields; see Remark 5.9(ii). The notion of a cocharacter-closed G(k)-orbit has already proved very useful in the context of Serre’s notion of G-complete reducibility over k, see Section 9. In [9, Thm. 5.9] we gave a geometric characterisation of the latter using the former. In Theorem 9.3, we strengthen this result by removing the connectedness assumption on G from [9, Thm. 5.9]. In Corollary 9.5, we prove a general Galois descent result for G-complete reducibility for arbitrary algebraic field extensions k ′ /k under very mild assumptions on char(k) which guarantee smoothness of centralizers of subgroups, [26, Thm. 1.1]. General results of this nature were previously only known when both fields are algebraically closed or perfect, [4, Thms. 5.3, 5.8], or else when the extension k ′ /k is separable, [9, Thm. 5.11]. The paper is organized as follows. We spend most of Section 2 recalling some results from [9]. In Section 3, we discuss the concept of cocharacter-closure in detail, and introduce the notion of accessibility of G(k)-orbits and its relation to the cocharacter-closure of a G(k)-orbit, see Lemma 3.3. Theorem 1.3 is proved in Section 4 (Theorem 4.3). This is followed in Section 5 by a discussion of various ascent/descent results for field extensions on the one hand and for Levi subgroups on the other: see Theorems 5.4 and 5.7, which prove Theorem 1.5(ii) (second assertion) and (iii). A technical result needed in the proof of Theorem 5.7 is postponed to Theorem 6.1 in Section 6. Section 7 addresses questions of geometric G-conjugacy versus rational G-conjugacy. In particular, here we prove Theorem 1.5(i), (ii) (first assertion) and (iv) (see Corollary 7.2). We close the section with a discussion of when the preorder ≺ from Definition 1.4 is a partial order. It turns out that this is closely related to a descent result for geometric conjugacy, see Corollary 7.15. In Section 8, we give an application of our results from Sections 5 and 7: we show that Galois ascent and certain conjugacy results hold for general G provided they hold for GLn . In Section 9, we discuss applications to Serre’s notion of G-complete reducibility over k. Under some mild rationality assumptions we obtain corresponding Galois and Levi ascent/descent results, see Corollary 9.7. 4 In Section 10, we discuss the notion of cocharacter-closure in the classical context of conjugacy of endomorphisms under the general linear group in great detail. Here the preorder from Definition 1.4 is automatically antisymmetric (Corollary 10.3). We then consider modules over finitely generated k-algebras. Our methods give a geometric way to explore the notion of degenerations of modules over a non-algebraically closed field. We finish (Section 11) with some examples of unipotent classes in G2 and a representation of SL2 , demonstrating that the notions of Zariski-closure and cocharacter-closure already differ for an algebraically closed field. 2. Preliminaries 2.1. Basic notation. Let k be a field, let k denote a fixed algebraic closure, and let ks ⊆ k denote the separable closure and ki ⊆ k the purely inseparable closure of k. Note that ks = k if k is perfect. We denote the Galois group Gal(ks /k) = Gal(k/k) by Γ. We use the notion of a k-scheme from [13, AG.11]: a k-scheme is a k-scheme together with a k-structure. So k-schemes are assumed to be of finite type and reduced separated k-schemes are called k-varieties. Furthermore, a subscheme of a scheme V over k or over k is always a subscheme of V as a scheme over k and points of V are always closed points of V as a scheme over k. By “variety” we mean “variety over k”. Now let V be a k-variety. If k1 /k is an algebraic extension, then we write V (k1 ) for the set of k1 -points of V . If W is a subvariety of V , then we set W (k1) = W (k) ∩ V (k1 ). Here we do not assume that W is k-defined, so W (k1 ) can be empty even when k1 = ks . The Galois group Γ acts on V (ks ); see, e.g., [53, 11.2]. Recall the Galois criterion for a closed subvariety W of V to be k-defined: W is k-defined if and only if W (k) contains a Γ-stable subset of V (ks ) which is dense in W (see [13, Thm. AG.14.4]). 2.2. Algebraic groups. All linear algebraic groups are assumed to be smooth. Let H be a k-defined linear algebraic group. By a subgroup of H we mean a smooth subgroup. We let Z(H) denote the centre of H and H 0 the connected component of H that contains 1. Recall that H has a k-defined maximal torus [13, 18.2(i) Thm.]. For K a subgroup of H, we denote the centralizer of K in H by CH (K). For the set of cocharacters (one-parameter subgroups) of H we write Y (H); the elements ∗ of Y (H) are the homomorphisms from the multiplicative group k to H. We denote the set of k-defined cocharacters by Yk (H). There is a left action of H on Y (H) given by ∗ (h · λ)(a) = hλ(a)h−1 for λ ∈ Y (H), h ∈ H and a ∈ k . The subset Yk (H) is stabilized by H(k). The unipotent radical of H is denoted Ru (H); it is the maximal connected normal unipotent subgroup of H. The algebraic group H is called reductive if Ru (H) = {1}. Note that we allow a reductive group to be non-connected. 2.3. Reductive groups. Throughout the paper, G denotes a k-defined reductive algebraic group, possibly disconnected. The crucial idea which allows us to deal with non-connected groups is the introduction of so-called Richardson parabolic subgroups (R-parabolic subgroups) of a reductive group G. We briefly recall the main definitions and results; for more details and further results, the reader is referred to [4, Sec. 6] and [9, Sec. 2.2]. 5 Definition 2.1. For each cocharacter λ ∈ Y (G), let Pλ = {g ∈ G | lim λ(a)gλ(a)−1 exists} a→0 (see Section 2.4 for the definition of limit). Recall that a subgroup P of G is parabolic if G/P is a complete variety. The subgroup Pλ is parabolic in this sense, but the converse is not true in general. If we define Lλ = {g ∈ G | lim λ(a)gλ(a)−1 = g}, then Pλ = Lλ ⋉ Ru (Pλ ), a→0 and we also have Ru (Pλ ) = {g ∈ G | lim λ(a)gλ(a)−1 = 1}. The subgroups Pλ for λ ∈ Y (G) a→0 are called the Richardson parabolic (or R-parabolic) subgroups of G. Given an R-parabolic subgroup P , a Richardson Levi (or R-Levi ) subgroup of P is any subgroup Lλ such that λ ∈ Y (G) and P = Pλ . If G is connected, then the R-parabolic subgroups (resp. R-Levi subgroups of R-parabolic subgroups) of G are exactly the parabolic subgroups (resp. Levi subgroups of parabolic subgroups) of G; indeed, most of the theory of parabolic subgroups and Levi subgroups of connected reductive groups—including rationality properties—carries over to R-parabolic and R-Levi subgroups of arbitrary reductive groups. In particular, Ru (P )(k) acts simply transitively on the set of k-defined R-Levi subgroups of a k-defined R-parabolic subgroup P . If P, Q are R-parabolic subgroups of G and P 0 = Q0 , then Ru (P ) = Ru (Q). Given any maximal torus T of an R-parabolic subgroup P , there is a unique R-Levi subgroup L of P such that T ⊆ L, and if P is k-defined then L is k-defined if and only if T is. If λ is k-defined then Pλ and Lλ are k-defined. Conversely, if G is connected and P is a k-defined Rparabolic subgroup of G with a k-defined Levi subgroup L then there exists λ ∈ Yk (G) such that P = Pλ and L = Lλ . (See [9, Rem. 2.4] for a counter-example with G non-connected.) If H is a subgroup of G, then there is an obvious inclusion Y (H) ⊆ Y (G) of the sets of cocharacters. When H is reductive and λ ∈ Y (H), there is then an R-parabolic subgroup of H associated to λ, as well as an R-parabolic subgroup of G. In order to distinguish between R-parabolic subgroups associated to different subgroups of G, we use the notation Pλ (H), Lλ (H), etc., where necessary, but we write Pλ for Pλ (G) and Lλ for Lλ (G). Note that Pλ (H) = Pλ ∩ H, Lλ (H) = Lλ ∩ H and Ru (Pλ (H)) = Ru (Pλ ) ∩ H. More generally, for H ⊆ G a closed subgroup which is not necessarily reductive and λ ∈ Y (G) a cocharacter normalizing H, we define Pλ (H) = H ∩Pλ and Ru (Pλ (H)) = H ∩Ru (Pλ ). We recall a smoothness result from [20, Prop. 2.1.8(3) and Rem. 2.1.11] which holds for these intersections. Proposition 2.2. Let H ⊆ G be a closed subgroup, and let λ ∈ Y (G) be a cocharacter that normalizes H. Then the scheme-theoretic intersections H ∩ Pλ , H ∩ Ru (Pλ ) are smooth and coincide with Pλ (H), Ru (Pλ (H)) respectively. 2.4. G-varieties and limits. Throughout the paper, V denotes an affine k-defined Gvariety. This means that we assume both V and the action of G on V are k-defined. By a rational G-module, we mean a finite-dimensional vector space over k with a linear Gaction. If both the G-module and the action are k-defined, then we say the rational Gmodule is k-defined. For a subgroup H of G, we denote the set of H-fixed points in V by V H = {v ∈ V | h · v = v for all h ∈ H}. For v ∈ V , let Gv denote the (set-theoretic) stabilizer of v, and let G0v = (Gv )0 denote its identity component. Let G(k) · v denote the orbit of v under G(k); we call this the rational orbit. We write G · v for G(k) · v and call this the geometric orbit. We say that G · v is 6 separable provided that the orbit map G → G · v is a separable morphism. Equivalently, G · v is separable if and only if the scheme-theoretic stabilizer Gv of v in G is smooth. ∗ For each cocharacter λ ∈ Y (G), we define a morphism of varieties φv,λ : k → V via the formula φv,λ (a) = λ(a) · v. If this morphism extends to a morphism φbv,λ : k → V , then we say that lim λ(a) · v exists, and set this limit equal to φbv,λ (0); note that such an extension, if a→0 it exists, is necessarily unique. We sometimes call v ′ the limit of v along λ. If X is a closed G-stable subset of V and v ∈ X then lim λ(a) · v belongs to X. a→0 For λ ∈ Yk (G) we say that λ destabilizes v over k (for G) provided lim λ(a) · v exists, and a→0 if lim λ(a) · v exists and does not belong to G(k) · v, then we say λ properly destabilizes v a→0 over k (for G). Remark 2.3. Sometimes we want to reduce the case of a general (k-defined) affine G-variety V to the case of a (k-defined) rational G-module V0 . Such a reduction is possible, thanks to [29, Lem. 1.1(a)], for example: given V , there is a k-defined G-equivariant embedding of V inside some V0 . We set up some standard notation which is in force throughout the paper. Let V be a rational G-module. Given λ ∈ Y (G) and n ∈ Z, we define ∗ Vλ,n := {v ∈ V | λ(a) · v = an v for all a ∈ k }, X X X Vλ,≥0 := Vλ,n , Vλ,>0 := Vλ,n and Vλ,<0 := Vλ,n . n≥0 n>0 n<0 Then Vλ,≥0 consists of the vectors v ∈ V such that lim λ(a) · v exists, Vλ,>0 is the subset of a→0 vectors v ∈ V such that lim λ(a) · v = 0, and Vλ,0 is the subset of vectors v ∈ V such that a→0 lim λ(a) · v = v. Furthermore, the limit map v 7→ lim λ(a) · v is nothing but the projection of a→0 a→0 Vλ,≥0 with kernel Vλ,>0 and image Vλ,0 . If the G-module V is k-defined, then each Vλ,n and Vλ,>0 , etc., is k-defined (cf. [13, II.5.2]). It is sometimes possible to pass from a geometric point in V to an element of V n (k), using the following technical lemma. Lemma 2.4. Suppose V is a k-defined rational G-module. Let v ∈ V and let k1 /k be a finiteP field extension such that v ∈ V (k1 ). Let α1 , . . . , αn ∈ k1 be a basis for k1 over k. Write v = i αi vi for certain (unique) vi ∈ V (k), and set v = (v1 , . . . , vn ) ∈ V n (k). Let G act diagonally on V n . Then the following assertions hold: (i) For λ ∈ Yk (G), the limit lima→0 λ(a) · v exists if and only if the limit lima→0 λ(a) · v exists. (ii) Let λ ∈ Yk (G) and suppose that the limits v ′ = lima→0 λ(a) · v and v′ = lima→0 λ(a) · v exist. Then for any g ∈ G(k), we have v ′ = g · v if and only if v′ = g · v. (iii) We have Gv ⊆ Gv and Gv (k) = Gv (k). Proof. Parts (i) and (ii) are [9, Lem. 2.16], while part (iii) follows directly from the definitions.  The following result asserts that when considering fixed points one may approximate ksplit tori by k-defined cocharacters. 7 Lemma 2.5. Given a k-split torus S of G, there exists µ ∈ Yk (S) such that CG (S) = Lµ and V S = V Im(µ) . Proof. Let W be a k-defined finite-dimensional rational G-module. Since S is k-split, we can write W as a direct sum of S-weight spaces W = W0 ⊕ · · · ⊕ Wr for some r, with the corresponding weights α0 , . . . , αr of S, where α0 is the trivial weight. Given i > 0, set Ci := {σ ∈ Yk (S) ⊗ Q | hσ, αi i = 0} (where we extend the pairing in the obvious way). Since αi is non-trivial for each i > 0, the subspace Ci is proper for each i. Hence the complement in Yk (S)⊗Q of C1 ∪...∪Cr is non-empty. Taking a point in this complement and multiplying by a suitably large integer, we can find a cocharacter µ ∈ Yk (S) such that hµ, αi i = 6 0 for all S Im(µ) i > 0. Then W = W . Now consider the affine G-variety X := G × V , where G acts on the first factor by conjugation and on the second factor by the given action of G on V . By embedding X Gequivariantly in a rational G-module W and applying the argument in the first paragraph, we can find a cocharacter µ ∈ Yk (S) such that X S = X Im(µ) . But X S = CG (S) × V S and X Im(µ) = Lµ × V Im(µ) , which gives the result.  Next we recall a transitivity result for limits along commuting cocharacters. Lemma 2.6. Let v ∈ V . Suppose λ, µ ∈ Y (G) are commuting cocharacters and that v ′ := lima→0 λ(a) · v and v ′′ := lima→0 µ(a) · v ′ both exist. Then lima→0 (nλ + µ)(a) · v = v ′′ for all sufficiently large n. Proof. It suffices to prove this when V is a vector space, and then the result is contained in [9, Lem. 2.15].  The next result is similar to Lemma 2.6, but the assumption is that the limits of v exist along both λ and µ. Lemma 2.7. Let v ∈ V . Suppose λ, µ ∈ Y (G) are commuting cocharacters and suppose v ∈ V is such that v ′ := lima→0 λ(a) · v and v ′′ := lima→0 µ(a) · v both exist. Let m, n ∈ N. Then lima→0 λ(a) · v ′′ , lima→0 µ(a) · v ′ and lima→0 (mλ + nµ)(a) · v all exist and these limits are equal. Proof. It suffices to prove this when V is a vector space. Then, using the notation from Remark 2.3, we have v ∈ Vλ,≥0 , the set of all points for which λ acts with a non-negative weight. This set is closed in V and, since λ and µ commute, it is µ-stable. Therefore v ′′ := lima→0 µ(a) · v ∈ Vλ,≥0 , and hence the limit along λ for v ′′ exists. Similarly, v ′ ∈ Vµ,≥0 , and hence the limit along µ for v ′ exists. Clearly v ∈ U := Vλ,≥0 ∩ Vµ,≥0 , so the limit along mµ + nµ for v also exists. Restricting attention to the subspace U, taking the limit along λ is the same as projecting onto Uλ,0 := U ∩ Vλ,0 , and taking the limit along µ is the same as projecting onto Uµ,0 := U ∩ Vµ,0 . The combination of taking the limit along λ and then along µ is the same as taking the limit along µ and then along λ, and the result is simply the projection of U onto Uλ,0 ∩ Uµ,0 . It is clear that the same is true for taking the limit along mµ + nµ for v.  Lemma 2.8. Let v ∈ V and let S be a maximal k-defined torus of Gv . Suppose λ ∈ Yk (CG (S)) destabilizes v and does not fix v. Then λ properly destabilizes v over k for G. 8 Proof. Let v ′ := lima→0 λ(a) · v. Then S and Im(λ) generate a k-defined torus S ′ of Gv′ . Now Im(λ) is not contained in S because λ does not fix v, so dim S ′ > dim S. But S is a maximal k-defined torus of Gv , so v and v ′ cannot be G(k)-conjugate.  2.5. Results about Ru (Pλ )-conjugacy. First we recall two of the main results from [9]: Theorem 2.9 ([9, Thm. 3.1]). Let v ∈ V such that Gv (ks ) is Γ-stable and let λ ∈ Yk (G) such that v ′ := lima→0 λ(a) · v exists and is Ru (Pλ )(ks )-conjugate to v. Then v ′ is Ru (Pλ )(k)conjugate to v. Theorem 2.10 ([9, Thm. 3.3]). Let v ∈ V and suppose k is perfect. Let λ ∈ Yk (G) such that v ′ := lim λ(a) · v exists and is G(k)-conjugate to v. Then v ′ is Ru (Pλ )(k)-conjugate to a→0 v. Theorem 2.10 was first proved by H. Kraft and J. Kuttler for k algebraically closed of characteristic zero in case V = G/H is an affine homogeneous space, cf. [49, Prop. 2.4] or [24, Prop. 2.1.2]. The following result is an analogue of Theorem 2.9 involving descent to Levi subgroups; the proof involves very similar ideas. Proposition 2.11. Let v ∈ V . Suppose S is a k-defined torus of Gv , L = CG (S) and λ ∈ Yk (L) is such that v ′ := lima→0 λ(a) · v exists and is Ru (Pλ )(k)-conjugate to v. Then v ′ is Ru (Pλ (L))(k)-conjugate to v. Proof. Set P = Pλ and let u ∈ Ru (P )(k) be such that v ′ = u · v. Then u−1 · λ fixes v. Let H be the subgroup of Gv generated by the image of u−1 · λ and S; then H is a k-defined subgroup of Gv , and hence contains a k-defined maximal torus S ′ with S ⊆ S ′ . Moreover, since λ commutes with S and Pu−1 ·λ = P , we have H ⊆ P ∩ Gv . Since u−1 · λ is a k-defined cocharacter of H, we can find h ∈ H(k) such that µ := hu−1 · λ ∈ Yk (S ′ ). Since S ⊆ S ′ , we have µ ∈ Yk (L). Now λ, µ ∈ Yk (L) give rise to the same parabolic subgroup P = Pλ = Pµ of G, and hence Pλ (L) = Pµ (L). The R-Levi subgroups Lλ (L) and Lµ (L) are conjugate by an element u0 ∈ Ru (Pλ (L))(k), i.e., u0 Lµ (L)u0 −1 = Lλ (L). We claim that u0 · µ = λ. To see this, note that since u0 ∈ P , u0 Lµ u0 −1 is an R-Levi subgroup of P , and this Levi subgroup contains the image of λ. Since Ru (P ) acts simply transitively on the set of R-Levi subgroups of P , there is only one R-Levi subgroup of P containing the image of λ, namely Lλ itself, and hence u0 Lµ u0 −1 = Lu0 ·µ = Lλ . But now, since u0 , h and u are all elements of P , we have p := u0 hu−1 ∈ P and u0 · µ = p · λ. Writing p = u1 l, with u1 ∈ Ru (P ) and l ∈ Lλ , we have p · λ = u1 · λ and Lλ = Lp·λ = Lu1 ·λ = u1 Lλ u1 −1 . Appealing to the simple transitivity of the action of Ru (P ) on the R-Levi subgroups of P again, we see that u1 = 1, so u0 · µ = p · λ = λ, as required. Finally, we have found u0 ∈ Ru (Pλ (L))(k) such that v ′ := lima→0 λ(a) · v exists and µ = u0 −1 · λ fixes v, so by [9, Lem. 2.12], we have v ′ = u0 · v, which completes the proof.  2.6. k-rank. Let H be a subgroup of G, not necessarily k-defined. It makes sense to speak of k-defined (or k-split) subgroups of H: a subgroup of H is k-defined (k-split) if it is kdefined (k-split) as a subgroup of the k-defined group G. Likewise we can speak of k-defined cocharacters of H. The notion of maximal k-defined (or k-split) torus of H has the usual meaning. 9 Below we will need the following result for H of the form Gv for some v ∈ V . Note that even when v ∈ V (k), Gv need not be k-defined. Lemma 2.12. Let H be a subgroup of G. Then any two maximal k-split tori of H are H(k)-conjugate. T e be the closure of e Proof. Let H γ∈Γ γ · H(ks ). Then H is k-defined by the Galois criterion. e so S is a subgroup of H e as S(ks ) is dense If S is a k-defined torus of H then S(ks ) ⊆ H, in S. Standard results for k-defined groups [53, Thm. 15.2.6] imply that any two maximal e are H(k)-conjugate. e k-split tori of H The assertion of the lemma now follows.  Definition 2.13. We define the k-rank of H to be the dimension of a maximal k-split torus of H. 3. Cocharacter-closure Recall the definitions of a cocharacter-closed G(k)-orbit and of a cocharacter-closed subset of V from the Introduction, Definitions 1.1 and 1.2. We begin with a few elementary observations. Remarks 3.1. (i). Note that the notions in Definition 1.2 depend on the given action of G on V , because they are made with reference to the limits along cocharacters of G. (ii). A closed G-stable set is cocharacter-closed. (iii). The cocharacter-closed subsets of V form the closed sets of a topology on V (it is clear that arbitrary intersections and unions of cocharacter-closed sets are cocharacter-closed, and that the empty set and the whole space V are cocharacter-closed). (iv). Clearly, if a set is cocharacter-closed over k, it is cocharacter-closed over k0 where k0 is any subfield of k (such that V is a k0 -defined G-variety). c (v) Let X ⊆ V . If X is not G(k)-stable then X need not be G(k)-stable. For example, suppose G acts freely on V and let X = {v} for some v ∈ V . Then v is not destabilized by any non-zero λ ∈ Y (G): for if v ′ = lima→0 λ(a) · v then λ fixes v ′ , which forces λ = 0 by the c freeness of the action. Hence X = X = {v}. Recall the definition of the preorder ≺ from Definition 1.4. Examples 11.1 below compares this preorder with the usual degeneration order on orbits in the case k = k. See also Example 3.4. We have the following related notion. Definition 3.2. Suppose v, v ′ ∈ V . We say that the orbit G(k) · v ′ is 1-accessible from G(k) · v if there exists λ ∈ Yk (G) such that lima→0 λ(a) · v exists and lies in G(k) · v ′ . Similarly, for n ≥ 1, we say that G(k) · v ′ is n-accessible from G(k) · v provided there exists a finite sequence of G(k)-orbits G(k) · v = G(k) · v1, G(k) · v2, . . . , G(k) · vn+1 = G(k) · v ′ with G(k) · vi+1 1-accessible from G(k) · vi for each 1 ≤ i ≤ n. We say G(k) · v ′ is accessible from G(k) · v if it is n-accessible for some n ≥ 1. Note that this definition does not depend on the chosen representative of G(k) · v since if lima→0 λ(a)·v = v ′′ ∈ G(k)·v ′ and g ∈ G(k) then lima→0 (g ·λ)(a)·(g ·v) = g ·v ′′ ∈ G(k)·v ′ . It is clear from the definitions that if G(k)·v ′ is 1-accessible from G(k)·v then G(k)·v ′ ≺ G(k)·v. Example 11.2 below shows that the converse to this is not true, but we do have the following: Lemma 3.3. Suppose v ∈ V . 10 S c (i) We have G(k) · v = G(k) · v ′ , where the union is taken over all v ′ ∈ V such that G(k) · v ′ is accessible from G(k) · v. (ii) The preorder ≺ coincides with the accessibility relation; that is, given v, v ′ ∈ V , G(k) · v ′ ≺ G(k) · v if and only if there exists a finite sequence from G(k) · v to G(k) · v ′ as in Definition 3.2. Proof. (i). Let X denote the union defined above. Then given v ′ ∈ X, G(k) · v ′ is accessible from G(k) · v. But now if lima→0 λ(a) · v ′ = v ′′ exists for some λ ∈ Yk (G), then G(k) · v ′′ is 1-accessible from G(k) · v ′ , and hence G(k) · v ′′ is accessible from G(k) · v, so v ′′ ∈ X. Hence c X is cocharacter-closed over k. Since G(k) · v ⊆ X, we have G(k) · v ⊆ X. But the reverse inclusion is clear: by definition, the cocharacter-closure of G(k) · v must contain all orbits 1-accessible from G(k) · v, and all orbits 1-accessible from those orbits, and so on. (ii). This follows from (i).  The following elementary example illustrates some of the complexities that can arise, even over a field of characteristic 0. Example 3.4. Let k = R and consider the group G = Gm acting on V = A1 by a · z := a2 z. The group G(k) = Gm (k) is just the multiplicative group of the field R, and there are three orbits of G(k) on k-points of V : G(k) · (−1) = {x ∈ R | x < 0}, G(k) · 0 = {0} and c c G(k) · 1 = {x ∈ R | x > 0}. We have G(k) · (−1) = G(k) · (−1) ∪ {0} and G(k) · 1 = G(k) · 1 ∪ {0}. On the other hand, since the non-zero G(k)-orbits G(k) · 1 and G(k) · (−1) are both infinite subsets of V , their Zariski closures are the whole of A1 . We also have G · 1 = G · (−1) = {z ∈ A1 | z 6= 0}. This gives an example of how the cocharacter-closure isn’t the same as the closure (or the closure intersected with the set of k-points) and how different parts of the same G-orbit may be inaccessible from each other when viewed as G(k)-orbits. For more examples, see Sections 10 and 11. 4. The rational Hilbert-Mumford Theorem In this section we prove Theorem 1.3. We start with a key technical result. Proposition 4.1. Let v ∈ V . Suppose λ ∈ Yk (G) is such that v ′ := lima→0 λ(a) · v exists but is not Ru (Pλ )(k)-conjugate to v. Let S be a k-split torus of Gv . Then there exists τ ∈ Yk (CG (S)) such that ṽ := lima→0 τ (a) · v exists and lies outside G(k) · v. Moreover, there exists a k-split torus S̃ in Gṽ such that dim S̃ > dim S. Proof. It does no harm to assume that S is a maximal k-split torus of Gv : else S ⊂ S ′ for a maximal k-split torus S ′ of Gv and then Yk (CG (S ′ )) ⊆ Yk (CG (S)), so the result for S follows from the result for S ′ . Using Lemma 2.5, we can find µ ∈ Yk (S) such that V S = V Im(µ) and L := CG (S) = Lµ . Now let T be a maximally split k-defined maximal torus of Pλ ∩Pµ . There exists u ∈ Ru (Pλ )(k) such that u · λ ∈ Yk (T ). Moreover, lima→0 (u · λ)(a) · v = u · v ′ exists and cannot be Ru (Pλ )(k)-conjugate to v, since then v ′ would also be Ru (Pλ )(k)-conjugate to v, contradicting our hypothesis. Hence we may replace λ with u · λ and v ′ with u · v ′ if we like and assume that λ ∈ Yk (T ). 11 Now there exists u1 ∈ Ru (Pµ )(k) such that ν := u1 · µ belongs to Yk (T ), and since µ fixes v, lima→0 ν(a) · v = u1 · v exists. Since λ and ν belong to Yk (T ), they commute. By Lemma 2.7, v ′′ := lima→0 (λ + nν)(a) · v exists for all positive integers n, and this limit does not depend on n. Choosing n sufficiently large, we may assume that Pλ+nν ⊆ Pν = Pµ and Ru (Pµ ) ⊆ Ru (Pλ+nν ) [9, Lem. 2.15]. In particular, u1 ∈ Ru (Pλ+nν )(k). Let σ = λ + nν for such a choice of n. Note that, since v ′′ can be obtained as a limit along λ and as a limit along ν (Lemma 2.7), λ and ν both fix v ′′ . Now ν = u1 · µ; so u1 Su1−1 ⊆ Gv′′ , since V S = V Im(µ) , and Im(λ) commutes with u1 Su1 −1 , since Lµ = CG (S). Hence Im(λ) and u1 Su1 −1 generate a k-defined torus S ′′ of Gv′′ of dimension at least as large as the dimension of S. Note that S ′′ is k-split, by [13, Thm. 15.4 (i)]. If S ′′ = u1 Su1 −1 , then Im(λ) ⊆ u1 Su1 −1 , and therefore λ fixes u1 · v. Since λ evaluates in Pµ , u1 ∈ Ru (Pµ )(k) and Ru (Pµ ) is a closed connected normal subgroup of Pµ , we can write u1 = xu2 with x ∈ P−λ (k), u2 ∈ Ru (Pλ )(k) by [53, Thm. 13.4.2, Cor. 13.4.4]. But now [9, Lem. 2.13] implies that v ′ = u2 · v ∈ Ru (Pλ )(k) · v, which contradicts the hypothesis on λ. Hence we must conclude that dim S ′′ > dim S. In particular, v and v ′′ are not G(k)-conjugate, since S is a maximal k-split torus of Gv . Finally, recall that u1 ∈ Ru (Pσ )(k), so ṽ := lima→0 (u1 −1 · σ)(a) · v = u1 −1 · v ′′ exists and is also not G(k)-conjugate to v. But u1 −1 · σ = u1 −1 · λ + nµ ∈ Yk (Lµ ) = Yk (CG (S)) so, setting τ = u1 −1 · σ and S̃ = u1 −1 S ′′ u1 , we are done.  We note here a consequence of Proposition 4.1 which we use at the end of Section 5. Corollary 4.2. Let v ∈ V . If Gv contains a maximal k-split torus of G, then G(k) · v is cocharacter-closed over k. Proof. Let S be a maximal k-split torus of G contained in Gv . The result now follows from  Proposition 4.1 applied to S. We can now give our generalisation of the Hilbert-Mumford Theorem. Recall in particular the notions of cocharacter-closed and cocharacter-closure, Definitions 1.1 and 1.2, the preorder ≺ on the G(k)-orbits of V , Definition 1.4, and the relationship of these notions with the notion of accessibility, Lemma 3.3. The key result, which proves Theorem 1.3, is the following. Theorem 4.3 (The rational Hilbert-Mumford Theorem). Suppose v ∈ V . (i) There is a unique cocharacter-closed (over k) G(k)-orbit 1-accessible from G(k) · v. c (ii) The orbit from part (i) is the unique cocharacter-closed G(k)-orbit in G(k) · v . c (iii) If G(k) · v ′ ≺ G(k) · v, then the unique cocharacter-closed G(k)-orbits in G(k) · v and c G(k) · v ′ are equal. Proof. (i). We first show existence. If G(k)·v is already cocharacter-closed over k, then there is nothing to do. Otherwise, there exists λ ∈ Yk (G) such that v ′ = lima→0 λ(a) · v exists and is not G(k)-conjugate to v. By Proposition 4.1, we can even assume that λ ∈ Yk (CG (S)), where S is a maximal k-split torus of Gv , and that the k-rank of Gv′ is strictly greater than the k-rank of Gv . If G(k) · v ′ is cocharacter-closed over k then we are done. If not, repeat the process to find µ ∈ Yk (CG (S1 )) such that v ′′ = lima→0 µ(a) · v ′ exists and Gv′′ has strictly greater k-rank than Gv′ . Note that, since µ ∈ Yk (CG (S1 )) and Im(λ) ⊆ S1 , λ and µ commute, so by Lemma 2.6 G(k) · v ′′ is 1-accessible from G(k) · v. Again, if G(k) · v ′′ is cocharacterclosed over k then we are done. Otherwise, repeat the process again. Since the k-rank of the 12 stabilizer increases at each step, the process must terminate at a cocharacter-closed orbit which is 1-accessible from G(k) · v. For uniqueness, suppose G(k)·v1 and G(k)·v2 are two cocharacter-closed orbits 1-accessible from G(k) · v. Choose λ1 , λ2 ∈ Yk (G) such that lima→0 λi (a) · v ∈ G(k) · vi for i = 1, 2. Without loss we can assume that lima→0 λi (a) · v = vi for i = 1, 2. Then Pλ1 ∩ Pλ2 contains a maximally split k-defined maximal torus of G and we can conjugate λ1 (resp. λ2 ) by an element of Ru (Pλ1 )(k) (resp. an element of Ru (Pλ2 )(k)) so that λ1 and λ2 commute. Let v ′ = lima→0 λ1 (a) · v2 = lima→0 λ2 (a) · v1 (these limits exist and are equal by Lemma 2.7). Since G(k) · vi is cocharacter-closed over k for i = 1, 2, v ′ is G(k)-conjugate to v1 and v2 , and hence G(k) · v1 = G(k) · v ′ = G(k) · v2 , as required. This completes the proof of (i). (ii). Suppose G(k) · v ′ is the unique cocharacter-closed orbit 1-accessible from G(k) · v, as c provided by part (i), and suppose G(k) · v ′′ is another cocharacter-closed orbit in G(k) · v . By Lemma 3.3(i), there is a finite sequence G(k) · v = G(k) · v1 , G(k) · v2 , . . . , G(k) · vn = G(k) · v ′′ of orbits with G(k) · vi+1 1-accessible from G(k) · vi for each 1 ≤ i ≤ n − 1. By choosing our representatives suitably, we have cocharacters λ and µ ∈ Yk (G) such that lima→0 λ(a) · vn−2 = vn−1 and lima→0 µ(a) · vn−1 = vn = v ′′ . Now, by the usual argument, we can find u1 ∈ Ru (Pλ )(k) and u2 ∈ Ru (Pµ )(k) such that σ := u1 · λ and τ := u2 · µ commute. Moreover, lima→0 σ(a) · vn−1 = u1 · vn−1 and lima→0 τ (a) · vn−1 = u2 · v ′′ . Hence by Lemma 2.7, lim σ(a) · (u2 · v ′′ ) exists and equals lim τ (a) · (u1 · vn−1 ). a→0 a→0 ′′ Call this common limit w. Since the orbit G(k) · v is cocharacter-closed over k, we have that G(k) · w = G(k) · v ′′ . But, since u1 · vn−1 = lima→0 σ(a) · vn−2 and σ and τ commute, we can apply Lemma 2.6 to conclude that there exists n ∈ N such that lima→0 (nσ + τ )(a) · vn−2 = w ∈ G(k) · v ′′ ; in particular, G(k) · v ′′ is 1-accessible from G(k) · vn−2 . Continuing in this way, we conclude that G(k) · v ′′ is 1-accessible from G(k) · v and hence G(k) · v ′′ = G(k) · v ′ by the uniqueness in part (i). This completes the proof of (ii). c c c (iii). If G(k) · v ′ ≺ G(k) · v, then v ′ ∈ G(k) · v and hence G(k) · v ′ ⊆ G(k) · v . This c c means that any cocharacter-closed orbit in G(k) · v ′ is also contained in G(k) · v , and the uniqueness from part (ii) gives the result.  Remarks 4.4. (i). See Example 10.7 for a linear algebra example illustrating the uniqueness of the cocharacter-closed orbit in the cocharacter-closure. (ii). In [33, Thm. 3.4], Levy considers the case where k is perfect and proves the following result: Let v ∈ V (k) and assume that two limits s1 = lima→0 λ(a) · v, s2 = lima→0 µ(a) · v along k-defined cocharacters λ and µ exist. Further assume that both G · s1 and G · s2 are Zariski-closed. Then s1 and s2 are G(k)-conjugate. Since k is assumed to be perfect, it is known that the orbits through s1 and s2 are Zariski-closed if and only if they are cocharacterclosed over k, compare Theorem 5.7 and Proposition 7.4(i) below. Hence Levy’s conjugacy result follows from the uniqueness assertion of Theorem 4.3, and moreover holds for arbitrary (possibly non-rational) points v ∈ V . The following result is a rational version of the form of the Hilbert-Mumford Theorem given in [29, Thm. 1.4]. In our setting, it is a direct consequence of Theorem 4.3. Corollary 4.5. Suppose X is a G(k)-stable cocharacter-closed subset of V which meets c G(k) · v . Then there exists λ ∈ Yk (G) such that lima→0 λ(a) · v exists and lies in X. 13 c Proof. Since X ∩ G(k) · v is G(k)-stable, it contains a G(k)-orbit. Since the intersection is cocharacter-closed, it contains the cocharacter-closure of this orbit, and hence it contains the corresponding unique cocharacter-closed orbit provided by Theorem 4.3(ii). However, this cocharacter-closed orbit must also be the unique cocharacter-closed orbit contained in c G(k) · v , by Theorem 4.3(iii). Since this orbit is 1-accessible from G(k) · v by Theorem 4.3(i), we get the result required.  Remark 4.6. We do not know whether the strengthened version of the Hilbert-Mumford Theorem discussed in the Introduction can be extended to arbitrary fields. For more on this, see [9, Sec. 1]. 5. Ascent and descent Given a field extension k ′ /k, we use the terminology “Galois descent” to refer to a result which guarantees that a given G(k)-orbit is cocharacter-closed over k provided the corresponding G(k ′ )-orbit is cocharacter-closed over k ′ , and vice versa for “Galois ascent”. Likewise, we refer to “Levi descent” if the result at hand implies that a given L(k)-orbit (for L a k-defined Levi subgroup) is cocharacter-closed over k provided the corresponding G(k)-orbit is cocharacter-closed over k, and vice versa for “Levi ascent”. We begin this section with a further consequence of Proposition 4.1. Corollary 5.1. Let v ∈ V . Suppose G(k) · v is cocharacter-closed over k. Then for all λ ∈ Yk (G) such that v ′ := lima→0 λ(a) · v exists, v ′ is Ru (Pλ )(k)-conjugate to v. Proof. Suppose, for contradiction, that we have λ ∈ Yk (G) such that v ′ exists but is not Ru (Pλ )(k)-conjugate to v. Then, by Proposition 4.1, there exists a point v ′′ which can be obtained as the limit of v along a k-defined cocharacter of G but is not G(k)-conjugate to v. But this contradicts the assumption that G(k) · v is cocharacter-closed over k.  Remark 5.2. Corollary 5.1 generalizes [9, Thm. 3.10] by removing the connectedness assumption on G. As a direct consequence of Corollary 5.1, we see that cocharacter-closedness only depends on the identity component of G. Corollary 5.3. Let v ∈ V . The orbit G(k) · v is cocharacter-closed over k if and only if G0 (k) · v is cocharacter-closed over k. Proof. It is immediate from the definition that if G0 (k) · v is cocharacter-closed over k, then G(k) · v is cocharacter-closed over k. Conversely, suppose G0 (k) · v is not cocharacter-closed over k. Then there exists λ ∈ Yk (G0 ) = Yk (G) such that λ destabilizes v and lima→0 λ(a) · v does not belong to Ru (Pλ (G0 ))(k) · v = Ru (Pλ (G))(k) · v. It follows from Corollary 5.1 that G(k) · v is not cocharacter-closed over k, as required.  Here is our main result on Levi descent and split Levi ascent; it proves Theorem 1.5(iii). Theorem 5.4. Let v ∈ V . Suppose S is a k-defined torus of Gv and set L = CG (S). (i) If G(k) · v is cocharacter-closed over k, then L(k) · v is cocharacter-closed over k. (ii) If S is k-split, then G(k) · v is cocharacter-closed over k if and only if L(k) · v is cocharacter-closed over k. 14 Proof. (i). Suppose G(k) · v is cocharacter-closed over k, and let λ ∈ Yk (L) be such that v ′ := lima→0 λ(a)·v exists. Then, by Corollary 5.1, v ′ is Ru (Pλ )(k)-conjugate to v. Now apply Proposition 2.11 to get that v ′ is Ru (Pλ (L))(k)-conjugate—and hence L(k)-conjugate—to v. (ii). The forward implication follows from part (i). Now suppose that G(k) · v is not cocharacter-closed over k. Then, by Proposition 4.1, there exists τ ∈ Yk (L) such that lima→0 τ (a) · v exists but is not G(k)-conjugate to v. But then this limit cannot be L(k)conjugate to v, and hence L(k) · v is not cocharacter-closed over k.  Our next result—which proves the second assertion of Theorem 1.5(ii)—is Galois descent for separable algebraic extensions. Proposition 5.5. Let v ∈ V such that Gv (ks ) is Γ-stable and let k ′ /k be a separable algebraic extension. If G(k ′ ) · v is cocharacter-closed over k ′ then G(k) · v is cocharacter-closed over k. Proof. Suppose G(k ′ ) is cocharacter-closed over k ′ . Let λ ∈ Yk (G) such that v ′ := lima→0 λ(a)· v exists. By Corollary 5.1, v ′ is Ru (Pλ )(k ′ )-conjugate to v. In particular, v ′ is Ru (Pλ )(ks )conjugate to v. The result now follows from Theorem 2.9.  It turns out to be more subtle to prove converse statements to Proposition 5.5—i.e., Galois ascent results—under appropriate hypotheses on v. Such a result would follow for v ∈ V (k) if we could prove a rational version of the strengthened Hilbert-Mumford Theorem (cf. Remark 4.6): for then the optimal ks -defined cocharacter λopt would be Γ-fixed and hence would be k-defined. As a first lemma, we prove that G(k) · v is not cocharacter-closed over k, provided the limit along some ks -defined cocharacter lies outside the geometric orbit. Lemma 5.6. Let v ∈ V (k). Suppose there exists λ ∈ Yks (G) such that λ properly destabilizes v over k̄. Then G(k) · v is not cocharacter-closed over k. Proof. Let v ′ = lima→0 λ(a) · v ∈ VS (ks ) and let Y ⊆ V (ks ) be the set of Galois-conjugates of ′ v ; note that Y is finite. Set S = y∈Y G · y. Since Y is finite, S is closed. This closed set is also G-stable, Γ-stable and ks -defined, hence k-defined. Note also that since λ properly destabilises v to v ′ , the dimension of the G-orbit of v ′ is strictly smaller than that of v, and hence all G-orbits in S have dimension strictly smaller than that of G · v. This implies that S ∩ G · v = ∅; in particular, S ∩ G(k) · v = ∅. Now, using the terminology of [9, §4], v is uniformly S-unstable over ks , so we may thus apply [9, Cor. 4.9] to conclude that v is uniformly S-unstable over k (note that {v} is k-closed). In other words, there exists a k-defined cocharacter µ with lima→0 µ(a) · v ∈ S. The claim follows.  We get stronger ascent and descent results under some assumptions of k-definability on Gv . In general, the stabilizer Gv is only ki -defined but not k-defined. If Gv is k-defined, then we can say more. In particular, for v ∈ V (k), the stabilizer Gv is k-defined if G · v is separable or if k is perfect, see Proposition 7.4. The following result proves Theorem 1.5(ii) (second assertion) and (iii). Theorem 5.7. Let v ∈ V . Suppose Gv has a maximal torus that is k-defined. Then the following hold. (i) Suppose v ∈ V (k). For any separable algebraic extension k ′ /k, G(k ′ )·v is cocharacterclosed over k ′ if and only if G(k) · v is cocharacter-closed over k. 15 (ii) Let S be a k-defined torus of Gv and let L = CG (S). Then L(k) · v is cocharacterclosed over k if and only if G(k) · v is cocharacter-closed over k. Proof. The forward implication of (i) follows from Proposition 5.5. We prove the reverse implication of (i) using induction on dim G. By Remark 2.3, we may assume that V is a kdefined rational G-module. The result holds trivially if dim G = 0. Assume the result holds for any G′ such that dim G′ < dim G. Let k ′ /k be a separable algebraic extension. Suppose G(k ′ )·v is not cocharacter-closed over k ′ . We prove that G(k)·v is not cocharacter-closed over k. By Proposition 5.5, we can assume that k ′ = ks . So some λ ∈ Yks (G) properly destabilizes v over ks . If λ properly destabilizes v over k̄, then G(k) · v is not cocharacter-closed over k, by Lemma 5.6. So suppose λ does not properly destabilize v over k̄. Then u · λ centralizes v for some u ∈ Ru (Pλ ), by Theorem 2.10 for k̄. By hypothesis, there exists a k-defined maximal torus S ′ of Gv . Set G′ = CG (S ′ ), a reductive k-defined subgroup of G. Since λ properly destabilizes v over ks , u · λ 6= λ, which implies that Im(u · λ) is not contained in Z(G0 ). It follows that S ′ 6⊆ Z(G0 ), so dim G′ < dim G. By Theorem 5.4(ii) applied to the ks -split torus S ′ , G′ (ks ) · v is not cocharacter-closed over ks . By the induction hypothesis, G′ (k) · v is not cocharacter-closed over k. So choose µ ∈ Yk (G′ ) such that v ′ := lima→0 µ(a) · v exists and is not G′ (k)-conjugate to v. Then in particular, µ does not fix v. Hence µ properly destabilizes v over k for G, by Lemma 2.8, and we are done. Finally, we prove part (ii). We want to apply (i) to both G and L, so we first check that Lv has a maximal torus that is k-defined. By assumption, Gv has a maximal torus T that is e and T is e be as in the proof of Lemma 2.12; then S ⊆ H k-defined. Let H = Gv and let H e e a maximal torus of H. As S and H are k-defined, we can choose a k-defined maximal torus e containing S. Then dim T ′ = dim T , so T ′ is a maximal torus of both Gv and Lv , T ′ of H as required. If v ∈ V (k) then the result follows from Theorem 5.4. More generally, if k is infinite then we can first apply Lemma 2.4 and replace an arbitrary v with some v ∈ V (k)n (note that S ⊆ Gv as S(k) is dense in S). For arbitrary k and v we need the following argument, which relies on constructions from Section 6. We use Theorem 6.1 below to replace V with another k-defined G-variety W and v with some w ∈ W (k). By Theorem 6.1(i), L(k) · v is cocharacter-closed if and only if L(k) · w is so, and likewise for G(k) · v. Moreover, Theorem 6.1(ii) assures that S ⊆ Gw and that Gw has a maximal torus that is k-defined. We may thus apply Theorem 5.7(i) and assume k = ks . But then S is k-split, so the result follows from Theorem 5.4.  Corollary 5.8. Let v ∈ V . If Gv contains a maximal k-torus of G, then G(k) · v is cocharacter-closed over k. Proof. Suppose Gv contains a maximal k-torus S of G. Then S is a k-defined maximal torus of G, so S is a k-defined maximal torus of Gv . By Theorem 5.7(i), it is enough to show that G(ks ) · v is cocharacter-closed over ks . But this follows from Corollary 4.2, as S splits over ks .  We turn now to the proof of Theorem 1.6(i). Proof of Theorem 1.6(i). Suppose G is k-anisotropic. Let W be an affine k-defined G-variety and let w ∈ W . Since Yk (G) = {0}, the G(k)-orbit of w in W is cocharacter-closed over k. 16 (Note that we do not require that w ∈ W (k) here.) The converse follows from the argument in the proof of [11, Lem. 10.1].  Remarks 5.9. (i). We recover the result (cf. [14, Cor. 3.8]) that if k is perfect and G is k-anisotropic, then every element in G(k) is semisimple. For if g ∈ G(k) is not semisimple, then its G(k)-conjugacy class in G is not closed, contradicting Theorem 1.6(ii). (ii). Theorem 1.6(ii) fails for non-perfect fields. In [23, p. 488], Gille and QuéguinerMathieu give an example of a k-anisotropic semisimple group G of the form G = PGL1 (A), where A is a simple central division algebra over k containing a field K such that K/k is purely inseparable. Moreover, G contains a smooth unipotent subgroup admitting nontrivial k-points. If 1 6= g ∈ G(k) is unipotent, then its G(k)-conjugacy class is not closed. So the conclusion of Theorem 1.6(ii) does not hold in this instance. We finish with the following result, which is an easy consequence of Corollary 4.2 and Theorem 1.5(ii); it shows that [11, Property (B)] holds for any perfect field (cf. [11, Thm. 7.2, Thm. 8.2]). Proposition 5.10. Suppose k is perfect. Let v ∈ V . If Gv contains a maximal k-split torus of G, then G · v is closed. Remark 5.11. Proposition 5.10 fails for non-perfect fields: Remark 5.9(ii) gives an example of this with G anisotropic. The assertion of Proposition 5.10 does hold for any k, however, if we assume that G is split: for if Gv contains a maximal k-split torus S of G then S is a maximal torus of G, so G · v is closed by Theorem 5.7(ii) applied to the field k. 6. Reduction to k-points In this section we prove the following result which makes it possible to pass from a geometric point in V to a rational point in another affine variety W . Theorem 6.1. Let v ∈ V . Then there exists an affine G-variety W and w ∈ W (k) with the following properties: (i) For any reductive k-defined subgroup M of G, M(k) · v is cocharacter-closed over k if and only if M(k) · w is cocharacter-closed over k. (ii) Let H ⊆ G be a connected k-defined subgroup. Then H ⊆ Gv if and only if H ⊆ Gw . To prove Theorem 6.1 we require a series of lemmas. We first reduce from geometric points to ks -points. Lemma 6.2. To prove Theorem 6.1, we may assume v ∈ V (ks ). Proof. By Remark 2.3, we may assume that V is a k-defined rational G-module. Let k1 /ks be a finite field extension such that v ∈ V (k1 ). We now apply Lemma 2.4 to produce v ∈ V n (ks ) for suitable n. It follows from Lemma 2.4(i) and (ii) (for the field ks ) that M(k) · v is cocharacter-closed if and only if M(k) · v is so. Suppose H is a connected k-defined subgroup of G. If H is contained in Gv , then by Lemma 2.4(iii) we have H ⊆ Gv ⊆ Gv . Conversely, suppose that H ⊆ Gv . Since H(ks ) is dense in H, it is enough to show H(ks ) ⊆ Gv , which follows from the equality Gv (ks ) = Gv (ks ). We  conclude that we may replace V by V n and v by v to prove Theorem 6.1. 17 The next step is to make v ∈ V (ks ) become stable under the action of the Galois group. We may achieve this by passing from V to the quotient by a finite group, using the following result. Lemma 6.3. Let F be a finite abstract group, regarded as a k-defined algebraic group endowed with the usual k-structure (so that F = F (k)). Suppose F × G has a k-defined action on V . Then the action of G on V descends to give a k-defined action of G on V /F . Let π : V → V /F be the canonical G-equivariant projection. Then the following hold for v ∈ V : (i) Let λ ∈ Y (G). Then λ destabilizes v if and only if λ destabilizes π(v). (ii) For any reductive k-defined subgroup M ⊆ G, M(k) · v is cocharacter-closed over k if and only if M(k) · π(v) is cocharacter-closed over k. (iii) Let H ⊆ G be a connected subgroup. Then H ⊆ Gv if and only if H ⊆ Gπ(v) . Proof. We first note that V /F is defined over k by [1, 2.2], so the statement of the proposition makes sense. (i). The forward direction is obvious. So suppose λ destabilizes π(v). By Remark 2.3, there is a G-equivariant closed embedding of V in an F × G-module W . Let πW : W → W/F be the canonical projection. We have an induced G-equivariant map φ from V /F to W/F , and λ destabilizes φ(π(v)) = πW (v). Hence it is enough to prove the result when V = W . Clearly, we can take G to be Im(λ). Let V1 = Vλ,≥0 and let V2 = Vλ,<0 . Then V = V1 ⊕ V2 and V1 and V2 are both F -stable, since F commutes with G. The projection V → V2 is G-equivariant and gives rise to a G-equivariant map V /F → V2 /F . Let π2 : V2 → V2 /F be the canonical projection. The group G acts on the dual space V2∗ . Let X1 , . . . , Xm ∈ V2∗ be a basis such that each Xi is a weight vector for λ. Since the weights of λ on V2 are all negative, these weights are all positive. We can regard the Xi as regular functions on V2 . Choose a generating set f1 , . . . , fr for the ring of invariants k[V2 ]F . We can assume that each fj is a polynomial in the Xi with no constant term and, since k[V2 ]F is G-stable, we can assume also that each fj is a weight vector for λ. Clearly each of these weights is positive. Write v = (v1 , v2 ). Since π(v) is destabilized by λ, so is π2 (v2 ). If f ∈ k[V2 ]F has weight m > 0 with respect to λ, then f (λ(a) · π2 (v2 )) = (λ(a−1 ) · f )(π2 (v2 )) = a−m f (v2 ), and so lima→0 λ(a) · π2 (v2 ) can only exist if f (v2 ) = 0. It follows that fj (v2 ) = 0 = fj (0) for all j. This implies that π2 (v2 ) = π2 (0). But F is finite, so we must have v2 = 0. Hence v = (v1 , 0) ∈ V1 and so λ destabilizes v, as required. (ii). Suppose M(k) · v is cocharacter-closed over k. Let λ ∈ Yk (M) ⊆ Yk (G) such that λ destabilizes π(v). Then λ destabilizes v by part (i), so there exists g ∈ M(k) such that lima→0 λ(a) · v = g · v. Now g · π(v) = π(g · v) = π (lima→0 λ(a) · v) = lima→0 λ(a) · π(v). It follows that M(k) · π(v) is cocharacter-closed over k. Conversely, suppose M(k) · v is not cocharacter-closed over k. Then (F × M)(k) · v is not cocharacter-closed over k, by Corollary 5.3. Hence there exists λ ∈ Yk (M) such that v ′ := lima→0 λ(a)·v exists and is not (F ×M)(k)-conjugate to v. Now π(v ′ ) = lima→0 λ(a)·π(v). If π(v ′ ) is M(k)-conjugate to π(v), say g ·π(v) = π(v ′ ), then π(g ·v) = π(v ′ ), so g ·v ∈ F ·v ′ . But then v ′ is (F × M)(k)-conjugate to v, a contradiction. Hence M(k) · π(v) is not cocharacterclosed over k. (iii). We have Gv ⊆ Gπ(v) , hence one assertion of (iii) is clear. Conversely, suppose that H ⊆ Gπ(v) is a connected subgroup. Then the orbit map H → H · v has image in the finite set F · v. As H is connected, this implies that H ⊆ Gv , as required.  18 We are now in a position to prove Theorem 6.1. Proof of Theorem 6.1. By Lemma 6.2, we may assume v ∈ V (ks ). Let 1 = γ1 , . . . , γr ∈ Γ be chosen such that {v, γ2(v), . . . , γr (v)} is the Γ-orbit through v. Set v = (v, γ2 (v), . . . , γr (v)) ∈ V (ks )r . We first show that we may replace v by v, where we consider the diagonal action of M on V r . Let λ ∈ Yk (M). As γ(λ) = λ for all γ ∈ Γ, we have that λ destabilizes v if and only if it destabilizes the tuple v. If λ destabilizes v and lima→0 λ(a) · v = v ′ , then lima→0 λ(a) · v = (γ1 (v ′ ), . . . , γr (v ′ )) =: v′ . For g ∈ M(k), the equation γ(g) = g for all γ ∈ Γ implies that g · v = v ′ if and only if g · v = v′ . In particular, M(k) · v is cocharacter-closed over k if and only if M(k) · v is so. Now let H ⊆ G be a k-defined connected subgroup. If H ⊆ Gv , then clearly H ⊆ Gv . Conversely, suppose H ⊆ Gv and let h ∈ H(ks ). As γ(h) ∈ H(ks ) for all γ ∈ Γ, we get h ∈ Gv . Since H(ks ) is dense in H, this implies that H ⊆ Gv . It thus suffices to construct W and w and prove the assertions in (i) and (ii) for v. Let F = Sr be the symmetric group on r letters, and let F act on V r by permuting the coordinates. Then the action of F commutes with the diagonal action of G, hence F ×G acts on V r . As the assumptions of Lemma 6.3 are satisfied, we may replace V r by W = V r /Sr and v by w = π(v) ∈ W (ks ). Now by construction, γ(w) = w for all γ ∈ Γ, hence w is a k-point. This finishes the proof.  7. Geometric and rational conjugacy Our next theorem allows us to relate geometric G-conjugacy to rational Ru (Pλ )-conjugacy, provided the orbit has a k-defined stabilizer. The result relies on Theorem 2.10, but here we do not require k to be perfect. Theorem 7.1. Let v ∈ V and suppose that G0v is k-defined. Let λ ∈ Yk (G). Suppose that v ′ = lima→0 λ(a) · v exists and is G-conjugate to v. Then v ′ is Ru (Pλ )(k)-conjugate to v. Proof. Let g ∈ G satisfy v ′ = g · v. By Theorem 2.10, we can find u ∈ Ru (Pλ ) such that v ′ = u−1 · v. Then u · λ is a cocharacter of G0v . We first claim that Pu·λ(G0v ) is k-defined. Indeed, by Proposition 2.2 this group coincides with the scheme-theoretic intersections G0v ∩Pu·λ = G0v ∩Pλ , which are therefore smooth. According to our assumptions both G0v and Pλ are k-defined, and thus the (smooth) intersection is k-defined by [53, Prop. 12.1.5]. By [13, Thm. 18.2], Pu·λ (G0v ) contains a k-defined maximal torus S, which automatically is a maximal torus of G0v . Then S is contained in some k-defined maximal torus T of Pu·λ . Since T is contained in a k-defined R-Levi subgroup of Pu·λ and all such subgroups are Ru (Pλ )(k)-conjugate, we can find x ∈ Ru (Pλ )(k) such that S ⊆ Lx·λ . After replacing λ with x · λ and v ′ with x · v ′ , we may assume without loss of generality that λ centralises S. This forces S to be contained in Gv′ , since v ′ = lima→0 λ(a) · v. By assumption, Gv′ is G-conjugate to Gv and thus has the same rank. In particular, S is a maximal torus of Gv′ . But as λ is a cocharacter of Gv′ that commutes with S, we deduce that Im(λ) ⊆ S ⊆ Gv . Hence v ′ = v, which finishes the proof.  We record a number of consequences of Theorem 7.1 which include Theorem 1.5(i), (ii) (first assertion) and (iv). Corollary 7.2. Let v ∈ V and suppose that G0v is k-defined. 19 (i) Let λ ∈ Yk (G). Suppose that v ′ = lima→0 λ(a) · v exists and is G-conjugate to v. Then v ′ is G(k)-conjugate to v. (ii) Suppose G · v is Zariski-closed. Then G(k) · v is cocharacter-closed over k. (iii) Let k ′ /k be an algebraic field extension and suppose that G(k ′ )·v is cocharacter-closed over k ′ . Then G(k) · v is cocharacter-closed over k. (iv) Let S be a k-defined torus of Gv and set L := CG (S). Let λ ∈ Yk (L) such that v ′ := lima→0 λ(a) · v exists and v ′ ∈ G · v. Then v ′ ∈ Ru (Pλ (L))(k) · v. (v) Let w ∈ V and suppose that both G(k) · w ≺ G(k) · v and G(k) · v ≺ G(k) · w. Then G(k) · v = G(k) · w. Proof. Parts (i) and (ii) are immediate consequences of Theorem 7.1. Part (iii) follows from (i) and the fact that G(k ′ )-conjugacy implies G-conjugacy. Part (iv) follows from Theorem 7.1 and Proposition 2.11. For (v), by assumption, there exist cocharacters λ1 , . . . , λn ∈ Yk (G) and elements v1 , . . . , vn+1 ∈ V such that v1 = v, vn+1 = g · v for some g ∈ G(k), vj = g ′ · w for some j and some g ′ ∈ G(k), and lima→0 λi (a) · vi = vi+1 for 1 ≤ i ≤ n. As v1 and vn+1 are G-conjugate, all of the vi are G-conjugate (for if vi 6∈ G · vi−1 , then, as vi lies in the closure of G · vi−1 , the orbit G · vi has strictly smaller dimension than G · vi−1 , which forces all of the subsequent orbits G · vi , . . . , G · vn+1 to have smaller dimension than G · v). By (i), v2 is G(k)-conjugate to v1 . In particular, G0v2 is again k-defined. Repeating the argument for v3 and so on, we find that w is G(k)-conjugate to v, as required.  Remarks 7.3. (i). Note that Theorem 7.1 fails without the assumption on G0v . E.g., see [9, Rem. 5.10] for the failure of Corollary 7.2(ii) without this assumption. (ii). Suppose that G0v is k-defined and that G(k) · v is not cocharacter-closed over k. By Theorem 7.1, there exists a k-defined cocharacter λ such that v ′ = lima→0 λ(a) · v exists and does not belong to G · v. In the terminology of [9, §4], v is uniformly S-unstable over k for S := G · v ′ , and v does not belong to S (cf. the proof of Lemma 5.6). In particular, there exist non-trivial cocharacters which belong to the optimal class for v with respect to S over k, see [9, Thm. 4.5]. (iii). Corollary 7.2 refines the descent assertions in Theorem 5.4 and Proposition 5.5 (Levi and Galois descent), albeit under the stronger hypothesis that G0v is k-defined. (iv). Corollary 7.2(i) is an instance where G-conjugacy descends to G(k)-conjugacy. This property may be studied in cohomological terms as follows: Suppose that v, v ′ ∈ V (k) are k-points which are G-conjugate. This means that v ′ ∈ (G · v)(k). Thus G(k)-conjugacy would follow provided that the map G(k) → (G · v)(k) is surjective. By [21, III, §4, Cor. 4.7] this is automatic if all Gv -torsors over k are trivial, where Gv is the scheme-theoretic stabilizer of v in G. If we further assume that either k is perfect or that the orbit map G → G · v is separable, then the isomorphism classes of Gv -torsors over k are parametrized by the Galois cohomology H 1 (Γ, Gv ), where Γ = Gal(ks /k) (see [21, III, §5, Cor. 3.5,3.6]). But even in the separable case, H 1 (Γ, Gv ) does not always vanish. Our assumption that v ′ arises as the limit along a k-defined cocharacter λ allows us to circumvent all these technical difficulties and to avoid additional assumptions. (v). Bremigan considers the case where the field k has characteristic 0 and is complete under a non-trivial real absolute value, [17]. In [17, Prop. 5.3], he proves that if G · v is Zariski-closed, then G(k) · v is Hausdorff-closed (i.e., closed in the topology induced by the extra structure on k). It follows that G(k) · v is cocharacter-closed over k, as the limit 20 along a k-defined cocharacter belongs to the Hausdorff-closure of G(k) · v. Hence, we obtain Corollary 7.2(ii) in this case. (vi). Corollary 7.2(v) does not imply that the relation ≺ on all G(k)-orbits is antisymmetric. It does, however, assert that antisymmetry holds if one of the two orbits has a k-defined stabilizer. The following result shows that the assumption in Theorem 7.1 that G0v is k-defined is automatic in many naturally-occurring cases (e.g., if char(k) = 0). Proposition 7.4. Let v ∈ V and assume that one of the following conditions is satisfied: (i) v ∈ V (k) and k is perfect; (ii) v ∈ V (ks ), Gv (ks ) is Γ-stable and G · v is separable. Then G0v is k-defined. In particular, the assertions of Theorem 7.1 and Corollary 7.2 hold for v. Proof. Case (i) is [53, Prop. 12.1.2]. For (ii), suppose that v ∈ V (ks ), that Gv (ks ) is Γ-stable and that G · v is separable. Then G0v is k-defined. Indeed, separability implies that Gv is ks -defined (see [53, loc. cit.]). Due to the assumption on Gv (ks ), the Galois criterion for k-definedness implies that Gv is k-defined, hence so is G0v .  Remark 7.5. There are situations where G0v is k-defined for all k-points v ∈ V (k). For instance, Proposition 7.4 above implies that this is the case whenever k is perfect or all G(k)-orbits are separable. In this case ≺ is antisymmetric on the set {G(k) · v | v ∈ V (k)}, hence is a partial order on this set. We do not know whether antisymmetry holds in general. See also Proposition 7.11 below. We give two simple examples. The first example illustrates that having Gv k-defined does not imply separability in general (cf. Proposition 7.4(ii)). The second example shows that even for separable orbits, the converse of Corollary 7.2(ii) is false in general. Examples 7.6. (i). 2, and  consider the  adjoint action of G on  Let  G = SL2 , char(k) =  0 1 1 a ∈ V (k). Then Gv = a ∈ k is k-defined, but G · v is V = sl2 . Let v = 0 0 0 1 not separable. (ii). Let G = PGL2 , char(k) = 2, acting on V = pgl2 by conjugation. Let A denote the image in PGL2 of A ∈ GL2 , and likewise for images of elements of gl2 . Define v ∈ V (k) by     0 1 1 0 2 −1 v := , where x ∈ k but x 6∈ k. Then v = gṽg , where g := and ṽ := x2 0 x 1       x 1 0 1 a 0 . Then lima→0 λ(a) · ṽ = 0, = . Define λ ∈ Yk (G) by λ(a) = 0 x 0 0 0 a−1 so G · ṽ is not closed and hence G · v is not closed. Moreover, G · v is separable. However, it is easily checked that G(k) · v is cocharacter-closed over k (the unique Borel subgroup whose Lie algebra contains v is not k-defined). Note that 0 lies in G · v \ G · v, so G · v \ G · v does indeed have a k-point. Remarks 7.7. (i). The non-separability of the orbit map G → G · v in Examples 7.6(i) is because z(g) is non-zero for G = SL2 in characteristic 2, whereas the group-theoretic centre Z(G) vanishes. However, as z(g) consists of semisimple elements, this does not affect the separability of the Ru (Pλ )-orbit through v. 21 In general, let v ∈ V (ks ) such that Gv (ks ) is Γ-stable, and suppose λ ∈ Yk (G) is such that v ′ := lima→0 λ(a) · v exists and lies in G · v. Further suppose that the orbit Ru (Pλ ) · v is separable. Then we may still conclude that v ′ ∈ Ru (Pλ )(k) · v, i.e., the assertion of Theorem 7.1 holds in this case. Indeed, according to Theorem 2.10, v ′ ∈ Ru (Pλ ) · v, and v ′ is a ks point. Clearly, H 1 (Gal(ks /ks ), Ru (Pλ )v ) vanishes. Due to the separability assumption, this means that the map Ru (Pλ )(ks ) → (Ru (Pλ ) · v)(ks ) is surjective (see Remark 7.3(iv)), hence v ′ ∈ Ru (Pλ )(ks ) · v. By Theorem 2.9, v ′ ∈ Ru (Pλ )(k) · v. (ii). Hoffmann asked the following question: let v ∈ V (k) and suppose that G · v \ G · v has a k-point. Does there exist λ ∈ Yk (G) such that v ′ := lima→0 λ(a) · v exists and v ′ 6∈ G · v? Clearly, the answer is no if G(k) · v is cocharacter-closed over k. Example 7.6(ii) shows that this is possible under the present hypotheses, even if we assume G · v is separable. If we assume that G(k) · v is not cocharacter-closed over k and that G0v is k-defined, the answer is yes, by Corollary 7.2(i). If v ′ = lima→0 λ(a) · v then we have seen there is a complicated relationship between the property that v ′ lies in G(k) · v and the property that v ′ lies in Ru (Pλ )(k) · v. If the latter holds then we can, for instance, apply Theorem 2.9 and Proposition 2.11. The following open question seems technical but resolving it is crucial to gaining a more complete understanding of the behavior of the G(k)-orbits. Question 7.8. Let v ∈ V and λ ∈ Yk (G) such that v ′ := lima→0 λ(a) · v exists. Suppose that v ′ is G(k)-conjugate to v. Is v ′ then Ru (Pλ )(k)-conjugate to v? Remarks 7.9. (i). Theorem 2.10 implies that Question 7.8 has a positive answer whenever k is perfect. (ii). By Theorem 7.1, Question 7.8 has a positive answer whenever G0v is k-defined. In particular, see Proposition 7.4 for separability assumptions that are sufficient to imply this. (iii). Corollary 5.1 shows that Question 7.8 has an affirmative answer for cocharacterclosed orbits. (iv). In the context of G-complete reducibility, the fact that Question 7.8 has a positive answer for algebraically closed fields has been used for instance by Stewart ([54, Cor. 3.6.2]) and Uchiyama ([57, Prop. 3.6]). For another application, see [9, Cor. 3.5]. In order to study the question of whether ≺ is antisymmetric, we also state the following weaker version of Question 7.8. Question 7.10. Let v ∈ V and λ ∈ Yk (G) such that v ′ := lima→0 λ(a) · v exists. Suppose that v ′ is G(k)-conjugate to v. Is v ′ then G0 (k)-conjugate to v? A positive answer to this question is related to antisymmetry as follows. Proposition 7.11. Suppose that the assertion of Question 7.10 holds for any reductive group acting on an affine variety. Then the preorder ≺ on G(k)-orbits is antisymmetric, hence is a partial order. Proof. Suppose we have v, v ′ ∈ V with G(k) · v ′ ≺ G(k) · v ≺ G(k) · v ′ . By Lemma 3.3 we can find v1 , . . . , vn ∈ V , λ1 , . . . , λn ∈ Yk (G) such that all limits lima→0 λi (a) · vi (1 ≤ i ≤ n) exist, v = v1 , vi = lima→0 λi−1 (a) · vi−1 for 2 ≤ i ≤ n, v ′ = g ′ · vj for some 1 ≤ j ≤ n, g ′ ∈ G(k) and lima→0 λn (vn ) = g ·v for some g ∈ G(k). Now let v = (v1 , . . . , vn ) ∈ V n and let G = Cn ⋉Gn . 22 Here Cn = hσi denotes the cyclic group of order n acting on Gn by permuting the indices cyclically (σ(i) = i + 1 mod n). Let λ = (λ1 , . . . , λn ) ∈ Yk (Gn ) = Yk (G). Then G acts naturally on V n , and lim λ(a) · v = (lim λ1 (a) · v1 , . . . , lim λn (a) · vn ) a→0 a→0 a→0 = (v2 , . . . , vn , g · v) = ((1, . . . , 1, g)σ) · v ∈ G(k) · v. Since we assume that Question 7.10 has an affirmative answer for G, we can find u = (u1 , . . . , un ) ∈ G0 (k) = G(k)n such that u · v = (v2 , . . . , vn , g · v). Hence v ′ = g ′ · vj = (g ′ uj−1 · · · u1 ) · v ∈ G(k) · v. We conclude that G(k) · v = G(k) · v ′ .  Remark 7.12. Note that the proof of Proposition 7.11 requires that Question 7.10 has an affirmative answer for all groups of the form Cn ⋉ Gn acting on V n , n ∈ N. In particular, even though the assertion of Question 7.10 holds trivially for connected G, this does not imply the antisymmetry of ≺ for connected G. In order to obtain a converse of Proposition 7.11, we need the following lemma. Lemma 7.13. Let v ∈ V , λ ∈ Yk (G). Suppose that v ′ = lima→0 λ(a) · v exists and v ′ = g · v for some g ∈ G(k). Then G0 (k) · v is accessible from G0 (k) · v ′ . Proof. As G/G0 is finite, there exists some n ∈ N such that g n ∈ G0 (k). Taking the limit along g · λ maps v ′ = g · v to g · v ′ = g 2 · v, and then taking the limit along g 2 · λ maps g 2 · v to g 2 · v ′ = g 3 · v. Continuing in this way, we see that the orbit through g n · v is accessible from v ′ . As g n ∈ G0 (k), this implies that G0 (k) · v is accessible from G0 (k) · v ′ , as claimed.  Proposition 7.14. Suppose that the preorder ≺ is antisymmetric on the set of G0 (k)-orbits in V . Then the assertion of Question 7.10 holds for G. Proof. Let v ∈ V , λ ∈ Yk (G) and suppose that v ′ = lima→0 λ(a) · v exists and v ′ = g · v with g ∈ G(k). By Lemma 7.13, G0 (k) · v is accessible from G0 (k) · v ′ . Conversely, it is immediate that G0 (k) · v ′ is accessible from G0 (k) · v. By the antisymmetry of ≺, we conclude that G0 (k) · v = G0 (k) · v ′ . Hence v ′ ∈ G0 (k) · v, as required.  Combining Propositions 7.11 and 7.14 we obtain the following result. Corollary 7.15. The following are equivalent (for fixed k): (i) The assertion of Question 7.10 holds for any reductive group acting on any affine variety; (ii) the preorder ≺ is antisymmetric for any reductive group acting on any affine variety; (iii) the preorder ≺ is antisymmetric for any connected reductive group acting on any affine variety. 8. Reduction to GLn In this section we use Theorem 7.1 to prove a result which reduces certain questions involving G(k)-orbits to the special case when G = GLn for some n. We start by recalling a standard construction from GIT, cf. [1, 5.3]. Let G, M be reductive k-groups with G ⊆ M and let V be an affine G-variety over k. We define an action of G on M × V by g · (m, v) = (mg −1 , g · v). Write M ×G V for the quotient of M × V by this G-action and let πG : M × V → M ×G V be the canonical projection. Then πG is k-defined [1, 2.2]. The 23 group M acts on M × V by left multiplication on the first factor and trivially on the second factor; this descends to give an action of M on M ×G V . If G = M then there is an obvious k-defined G-equivariant isomorphism from G ×G V to V . Projection onto the first factor gives a k-defined M-equivariant morphism η : M ×G V → M/G, where M acts on the coset space M/G by left multiplication. Theorem 8.1. Let G, M be reductive k-groups with G ⊆ M and let V be an affine Gvariety over k. Let k ′ /k be an extension of fields. Set W = M ×G V and define φ : V → W by φ(v) = πG (1, v) (note that φ is a k-defined G-equivariant closed embedding: see [1], for example). Then the following hold: (i) for all v ∈ V and all λ ∈ Yk′ (M), if λ destabilizes φ(v) then u · λ ∈ Yk′ (G) for some u ∈ Ru (Pλ (M))(k ′ ); (ii) for all v ∈ V and all λ ∈ Yk′ (G), if v ′ := lima→0 λ(a) · v exists and m · φ(v) = φ(v ′ ) for some m ∈ M(k ′ ) then m ∈ G(k ′ ); (iii) Mφ(v) = Gφ(v) = Gv ; (iv) for all v ∈ V and all λ ∈ Yk′ (G), λ destabilizes v if and only if λ destabilizes φ(v); (v) for all v ∈ V and all λ ∈ Yk′ (G), λ properly destabilizes v over k ′ for G if and only if λ properly destabilizes φ(v) over k ′ for G if and only if λ properly destabilizes φ(v) over k ′ for M; (vi) for all v ∈ V , G(k ′ ) · v is cocharacter-closed over k ′ if and only if G(k ′ ) · φ(v) is cocharacter-closed over k ′ if and only if M(k ′ ) · φ(v) is cocharacter-closed over k ′ . Proof. By extending scalars, we can regard G and M as k ′ -groups and V as a k ′ -defined G-variety. Hence we can assume without loss that k ′ = k. Now let v ∈ V , let λ ∈ Yk (M) and suppose λ destabilizes φ(v). Let x be the coset G ∈ M/G. Since the map η : M ×G V → M/G induced by projection onto the first factor is M-equivariant, λ destabilizes η(φ(v)) = x. Set x′ = lima→0 λ(a) · x. The orbit M · x is closed—it is the whole of M/G—and Mx = G is k-defined, so M(k) · x is cocharacter-closed over k, by Corollary 7.2(ii). Hence by Corollary 5.1, there exists u ∈ Ru (Pλ (M))(k) such that x = u · x′ . Then u · λ fixes x, so u · λ is a cocharacter of Mx = G. This proves (i). If we assume in addition that λ is already a cocharacter of G then x′ = x; hence if m ∈ M(k) and m · φ(v) = φ(v ′) then m · x = x by the M-equivariance of η, so m ∈ G(k) and (ii) follows. This also proves part (iii) (take λ = 0 in (ii)). Parts (iv)–(vi) now follow immediately from (i)–(ii).  We now see that to prove Galois ascent and to answer Question 7.8, it suffices to consider the special case G = GLn . Corollary 8.2. (i) If the answer to Question 7.8 is yes when G = GLn then the answer is yes for all G. (ii) If Galois ascent holds when G = GLn then it holds for all G. Proof. We can embed G as a k-defined subgroup of some GLn . Define φ as in Theorem 8.1. Part (i) now follows from Theorem 8.1. For part (ii), suppose G(ks ) · v is not cocharacterclosed over ks . We want to show that G(k) · v is not cocharacter-closed over k. Now GLn (ks ) · φ(v) is not cocharacter-closed over ks , by Theorem 8.1(vii) (with k ′ = ks ). By assumption, Galois ascent holds for GLn , so GLn (k) · φ(v) is not cocharacter-closed over k.  The result now follows from Theorem 8.1(vii) (with k ′ = k). 24 9. G-complete reducibility In this section we apply our previous results to the theory of G-completely reducible subgroups over k. This was the original motivation for much of our work, and is an important source of examples. The notion of a G-completely reducible subgroup was introduced by Serre [51]; there are applications to the subgroup structure of reductive groups [34], [35], spherical buildings [50] and the Langlands correspondence [31, Sec. 13]. For more details, see [4] and [51]. First we recall the relevant definitions, then we explain the link with geometric invariant theory. Definition 9.1. A subgroup H of G is said to be G-completely reducible (G-cr) if whenever H is contained in an R-parabolic subgroup P of G, there exists an R-Levi subgroup of P containing H. Similarly, a subgroup H of G is said to be G-completely reducible over k if whenever H is contained in a k-defined R-parabolic subgroup P of G, there exists a k-defined R-Levi subgroup of P containing H. In [4, Cor. 3.7], we show that G-complete reducibility has a geometric interpretation in terms of the action of G on Gn , the n-fold Cartesian product of G with itself, by simultaneous conjugation. Let h ∈ Gn and let H be the algebraic subgroup of G generated by h, i.e., by the components of the n-tuple h. Then G · h is closed in Gn if and only if H is G-cr [4, Cor. 3.7]. To generalize this to subgroups that are not topologically finitely generated, we employed the following concept [9, Def. 5.4]. Definition 9.2. Let H be a subgroup of G and let G ֒→ GLm be an embedding of algebraic groups. Then h ∈ H n is called a generic tuple of H for the embedding G ֒→ GLm if h generates the associative subalgebra of Matm spanned by H. We call h ∈ H n a generic tuple of H if it is a generic tuple of H for some embedding G ֒→ GLm . Note that generic tuples exist for any embedding G ֒→ GLm provided n is sufficiently large. We give a characterization of G-complete reducibility over k in terms of geometric invariant theory. Theorem 9.3. Let H be a subgroup of G and let h ∈ H n be a generic tuple of H. Then H is G-completely reducible over k if and only if G(k) · h is cocharacter-closed over k. Proof. This follows from the proof of [9, Thm. 5.9] (which is the special case when G is connected), replacing [9, Thm. 3.10] with Corollary 5.3.  Remark 9.4. Suppose the subgroup H of G is k-defined. We can pick a generic tuple h ∈ H(ks )n of H for some n, and without loss we can assume that Γ permutes the entries of the tuple. Let W = H n /Sn , where Sn acts by permuting the entries of tuples, and let πW : H n → W be the canonical projection. Then w := πW (h) is a k-point, and it follows from Lemma 6.3 and Theorem 9.3 that H is G-cr over k if and only if G(k) · w is cocharacterclosed over k. With this characterization in hand, we may apply our earlier rationality results. Recall (cf. [26, Def. 2.11]) that a prime p is called pretty good for G provided it is a good prime with the extra property that both the root lattice in the character group and the coroot 25 lattice in the cocharacter group have no p-torsion. A prime p which is very good for G is automatically pretty good, but the converse fails in general. Corollary 9.5. Suppose p = char(k) is a pretty good prime for G and let H be a k-defined subgroup of G. Let k ′ /k be an algebraic field extension. If H is G-completely reducible over k ′ , then H is G-completely reducible over k. Proof. Let h be a generic tuple of H. By [8, Cor. 3.4], the orbit G · h is separable, provided that p is a very good prime for G. It follows from [26, Thm. 1.1] that the condition may be relaxed to require only that p is pretty good for G. Moreover, since H is k-defined, H(ks ) is dense in H, so we can choose h ∈ H(ks )n such that h is a generic tuple of H. Then Gh (ks ) = CG (H)(ks) is Γ-stable. Hence the conditions of Proposition 7.4(ii) are satisfied, and the result follows from Theorem 9.3 together with Corollary 7.2(iii).  Remark 9.6. The assertion of Corollary 9.5 is false for inseparable field extensions without the assumption on p = char(k): see [8, Ex. 7.22] for an example in G2 with p = 2 and [57, Thm. 1.10] for an example in E7 with p = 2. Corollary 9.5 shows that this kind of pathology can occur only in small characteristic. Theorem 5.7 and Remark 9.4 immediately yield the following results on Galois ascent/ descent and Levi ascent/descent for G-complete reducibility. We note that we are able to obtain results of this nature under slightly different hypotheses using a building-theoretic approach: see [6], [3]. Corollary 9.7. Let H be a k-defined subgroup of G such that CG (H) is k-defined. Then the following hold. (i) For any separable algebraic extension k ′ /k, H is G-completely reducible over k ′ if and only if H is G-completely reducible over k. (ii) For a k-defined torus S of CG (H) let L = CG (S). Then H is G-completely reducible over k if and only if H is L-completely reducible over k. The Levi ascent/descent statement of Corollary 9.7(ii) provides a different proof—valid for non-connected G—of Serre’s result [50, Prop. 3.2]. The next result has been obtained by McNinch in [38, Prop. 4.1.1]. We give a different proof, which relies on Theorem 7.1. Corollary 9.8. Let H be a k-defined linearly reductive subgroup of G. Then H is Gcompletely reducible over k. Proof. Since H is k-defined, as in the proof of Corollary 9.5 we may choose a generic tuple h ∈ H(ks )n of H such that Gh (ks ) is Γ-stable. By Theorem 9.3, it suffices to show that G(k) · h ⊆ Gn is cocharacter-closed over k. By [5, Lem. 2.4] and [9, Thm. 5.8(iii)], the orbit G · h is closed. We have cg (h) = cg (H) = Lie(CG (H)) = Lie(CG (h)), where the second equation follows from [46, Lem. 4.1], and the other equations from [9, Lem. 5.5] and its proof. Thus the orbit G · h is separable. Therefore, it follows from Corollary 7.2(ii) and Proposition 7.4(ii) that G(k) · h is cocharacter-closed over k, which finishes the proof.  Remark 9.9. Observe that Corollary 9.8 is false if H is not k-defined: e.g., let G be k-split and let S be a maximal k-defined torus. Suppose λ ∈ Yk (S) and u ∈ Ru (Pλ ) \ Ru (Pλ )(k) are 26 chosen so that H = u · S is a torus which is no longer k-defined. Clearly, H ⊆ Pλ . But H is not contained in any k-defined Levi subgroup. Indeed, if L = Lx·λ with x ∈ Ru (Pλ )(k) is such a Levi subgroup, then it must coincide with Lu·λ , which is the unique Levi subgroup of Pλ containing H. But this implies that u = x ∈ Ru (Pλ )(k), a contradiction. Remark 9.10. Following McNinch (see [37]), a subalgebra h of g is called G-completely reducible provided that whenever h is contained in Lie(P ) for P an R-parabolic subgroup of G, there exists an R-Levi subgroup L of P with h ⊆ Lie(L). All of the concepts and results of this section may be formulated and proved for Lie algebras as well. For a generic tuple associated to h we simply take a generating tuple h ∈ hn for a suitable n. See also [9, §5.3]. 10. The action of GL(W ) on End(W ) In this section we illustrate the notion of cocharacter-closedness in the classical context of conjugacy of endomorphisms under the general linear group. Let W0 be a finite-dimensional k-vector space with associated k-space W = k ⊗k W0 . Consider G = GL(W ) with its natural action by conjugation on V = End(W ), and let both G and V be endowed with the kstructures induced from W0 , so that the action is k-defined. For f ∈ V (k) = End(W0 ), let µf ∈ k[T ] be the minimal polynomial of f , and χf ∈ k[T ] the characteristic polynomial. Note that both χf and µf remain invariant under field extensions of k. For any µ ∈ k[T ], there exists f ∈ V (k) having µ as its minimal polynomial and its characteristic polynomial (e.g., via considering the companion matrix of µ, see [47, Thm. 7.12]). In general, the minimal polynomial µf only encodes partial information about the rational normal form of f and hence about the orbit G(k) · f = GL(W0 ) · f . However, our next result shows that one can read off from µf whether G(k) · f is cocharacter-closed. It is convenient to consider W0 as a k[T ]-module, where T acts via f . Proposition 10.1. The following are equivalent: (i) The orbit G(k) · f ⊆ V is cocharacter-closed over k; (ii) µf is square-free in k[T ] (i.e., has no repeated irreducible factors); (iii) W0 is semisimple as a k[T ]-module. Proof. Suppose first that W0 = W1 ⊕ W2 decomposes as a k[T ]-module. Let fi = f |Wi and let Gi = GL(k ⊗ Wi ) (i = 1, 2). Then by an application of Theorem 5.4(ii), G(k) · f is cocharacter-closed if and only if G1 (k) · f1 and G2 (k) · f2 are cocharacter-closed. Moreover, µf = lcm(µf1 , µf2 ) (cf. [47, Thm. 7.7]) is square-free if and only if both µf1 and µf2 are. Thus we may assume from the outset that W0 is an indecomposable k[T ]-module. In this case, it follows (e.g., from the primary cyclic decomposition of W0 , see [47, Thm. 7.6]) that χf = µf is the power of an irreducible polynomial in k[T ]. Hence µf is square-free if and only if χf is irreducible, which is easily seen to be equivalent to W0 being irreducible as a k[T ]-module. This proves the equivalence of (ii) and (iii). To prove that (i) is equivalent to (iii), suppose first that W0 is irreducible. Then f stabilizes no proper subspace of W0 , and hence f is not destabilized by any non-central kdefined cocharacter of G. Thus G(k) · f is cocharacter-closed. Conversely, suppose that W0 contains a proper f -stable subspace U. Let λ be a k-defined cocharacter such that Pλ (G)(k) is the stabilizer of U in G(k). Then f ′ = lim λ(a) · f stabilizes a complement to U. As W0 is indecomposable, f ′ is not G(k)-conjugate to f , hence G(k) · f is not cocharacter-closed.  27 Remark 10.2. (i). Note that f is a semisimple endomorphism if and only if µf is separable (that is, square-free in k[T ]), see [47, Thm. 8.11]. Proposition 10.1 thus recovers the fact that an endomorphism f is semisimple if and only if G · f is cocharacter-closed over k. An endomorphism satisfying the equivalent conditions of Proposition 10.1 is called k-semisimple in [22], where an independent proof of the equivalence of (ii) and (iii) may be found. (ii). If k is not perfect, there exist irreducible polynomials in k[T ] which are not separable. Hence there exist f ∈ V (k) with G(k) · f cocharacter-closed over k and G(k) · f not cocharacter-closed over k. (iii). We have used Levi descent and ascent in the proof of Proposition 10.1. In terms of the characterization by k[T ]-modules, Levi descent/ascent is just the fact that a module W = W1 ⊕ W2 is semisimple if and only if both summands are. All G = GL(W )-orbits on V = End(W ) are separable (as orbit stabilizers are principal open subsets of the stabilizers in gl(W )). Hence we may apply Proposition 7.4 and Remark 7.5 and deduce the following results: Corollary 10.3. Let k ′ /k be an algebraic field extension and let f ∈ V (k) as above. If G(k ′ )·f is cocharacter-closed over k ′ , then G(k)·f is cocharacter-closed over k. The converse holds provided that k ′ /k is separable. Moreover, the preorder ≺ is antisymmetric on the set of G(k)-orbits on End(W0 ). Remark 10.4. The first part of the above corollary may also be deduced from the following two facts, which are even valid for non-algebraic field extensions: if µf is square-free in k ′ [T ], it is also square-free in k[T ]; if k ′ /k is separable and µf is square-free in k[T ], then µf is square-free in k ′ [T ] (see [16, Ch. V, §15, Cor. 1]). We give an example for the failure of Galois ascent for inseparable field extensions. Example 10.5. Let k = F2 (t) and suppose that µf = T 12 + t. This polynomial is irreducible in k[T ] (e.g., by Eisenstein’s criterion), so in particular G(k) · f is cocharacter-closed over k, by Proposition 10.1. Over separable field extensions k ′ /k, µf can only split up to the point µf = (T 4 + s)(T 4 + ζs)(T 4 + ζ 2s), where s3 = t and ζ 6= 1, ζ 3 = 1, and this expression is still square-free. In particular, G(k ′ ) · v is then still cocharacter-closed over k ′ , by Proposition 10.1. If a ∈ k satisfies a4 = s, we may further decompose µf by inseparable field extensions to obtain µf = (T 2 + a2 )2 (T 2 + ζ 2a2 )2 (T 2 + ζa2)2 = (T + a)4 (T + ζa)4 (T + ζ 2a)4 . If for example k ′ = k(a2 ), then the factor (T 2 + a2 )2 = (T + a)4 in µf is a maximal prime power in µf . In the primary cyclic decomposition (cf. [47, Thm. 7.6]) it hence corresponds to a 4-dimensional indecomposable subspace of k ′ ⊗ W0 where the restriction g of f to this subspace has minimal polynomial µg = χg = (T + a)4 . This implies (see [47, Thm. 7.12]) that a matrix representative for g is given by the companion matrix of (T + a)4 , which over 28 k ′ is conjugate to the matrix  0 a2 1 0  0 0 0 0  0 a2 0 0 . 0 a2  1 0 Clearly, we may pick a cocharacter which kills the entry a2 in the top right corner while leaving the other entries untouched. In particular, the limit along such a cocharacter takes this matrix to a matrix with minimal polynomial T 2 + a2 , so the orbit G(k ′ ) · g is no longer cocharacter-closed over k ′ . Hence G(k ′ ) · f is not cocharacter-closed over k ′ , by Theorem 5.4(ii). Remark 10.6. (i). For a cocharacter λ ∈ Yk (G) and f ∈ V (k), the limit lim λ(a) · f exists if and only if f stabilizes the flag associated to λ in W0 . Moreover, after choosing a basis compatible with the flag, the limit f ′ is then the endomorphism corresponding to the block diagonal of the corresponding matrix of f . In particular, χf = χf ′ and µf ′ divides µf . (ii). As noted before Corollary 10.3 above, the assumptions of Proposition 7.4 are satisfied for all f ∈ V (k), hence the assertion of Theorem 7.1 holds in our setup: if f stabilizes a flag associated to λ as in (i), and if f ′ is G-conjugate to f , then it is Ru (Pλ )(k) conjugate. After again choosing a basis compatible with the flag, this translates into the following nonelementary statement about matrices: a block upper triangular matrix A over k that is conjugate (over k) to the corresponding block diagonal matrix A′ , can be conjugated to A′ by an block upper triangular matrix over k with identity matrices on the diagonal. We use these facts to give an example motivated by classical invariant theory (see [30]), concerning cocharacter-closures of sets. Example 10.7. For χ ∈ k[T ] consider the set Cχ ⊂ V (k) of endomorphisms with prescribed characteristic polynomial χ. By Remark 10.6(i), Cχ is cocharacter-closed. Moreover, f ∈ Cχ has a cocharacter-closed orbit precisely when µf is the product of all distinct irreducible factors of χ (Proposition 10.1). In this case, µf together with χf = χ uniquely determine the orbit G(k) · f . Indeed, it follows—e.g., from the primary cyclic decomposition of W0 (cf. [47, Thm. 7.2])—that the elementary divisors of f must in this case be given by the irreducible factors of µ, counted with their multiplicities as factors of χ. Since the elementary divisors determine a rational canonical form of f (cf. [47, Thm. 7.14]), they determine the orbit G(k) · f . In particular, Cχ contains a unique cocharacter-closed orbit. It is well known that the closed orbits in V —that is, the conjugacy classes of diagonalisable n matrices—are parametrized by k , where n := dim W . We now see that the cocharacterclosed orbits in V (k) are parametrized by the space k n . For let π : V (k) → k n be the surjective function that maps f to the coefficients of 1, T, . . . , T n−1 in χf . The above discussion shows that each fibre of π contains a unique orbit that is cocharacter-closed over k. We finish this section by discussing representations of algebras. As in the case k = C (see [30]), the setup in this section may be generalized by replacing the algebra k[T ] with some finitely generated k-algebra A0 . Let A = k ⊗k A0 , where A0 is a finitely generated k-algebra, and let V = modA,W be the variety of all A-module structures on W . We may endow V with a k-structure such that V (k) = modA0 ,W0 . More specifically, if A0 has r 29 generators, we may identify V with a subvariety of End(W )r , with G := GL(W ) acting by simultaneous conjugation. Here instead of considering orbits of a single endomorphism, we are now studying orbits of tuples of endomorphisms, and these orbits correspond to the isomorphism classes of A-module structures. It can be shown that the cocharacterclosed orbits (over k) in V (k) correspond to isomorphism classes of semisimple A0 -module structures on W0 . Note that all GL(W )-orbits in W n are separable, hence the preorder ≺ is antisymmetric (cf. Corollary 10.3). Moreover, by applying Corollary 7.2(ii), we get a geometric proof of the algebraic fact that an A0 -algebra is semisimple if it becomes semisimple after extending scalars from k to k. Suppose k is algebraically closed. We say that one module is a degeneration of another if the tuple defining the first module is in the closure of the GL(W )-orbit of the tuple defining the second. This yields a partial ordering ≤ on the set of modules. Zwara gave an algebraic characterization of when a module is a degeneration of another [59, Thm. 1]. There is no obvious geometric notion of degeneration if k is not algebraically closed. Our formalism of cocharacter-closures and accessibility gives a way to approach this problem for arbitrary fields: our accessibility relation ≺ gives a partial order on the set of modules. This does not coincide with the partial ordering ≤ when k = k, for the same reason that the Zariski closure of an orbit and its cocharacter-closure over k are not the same. It would be interesting to take the algebraic condition from [59, Thm. 1] and give a geometric interpretation when k 6= k. 11. Further examples Already for k algebraically closed, the notions of cocharacter-closure and Zariski closure differ, as illustrated by our first example. More precisely, there may exist non-accessible orbits in the Zariski closure of an orbit. The fact that not every orbit in an orbit closure need be 1-accessible was already noted by Kraft in [30, II, Rem. 4.6]. Example 11.1. We consider the unipotent classes in the simple group of type G2 over an algebraically closed field k of characteristic p. Corresponding to each choice of maximal torus T of G and Borel subgroup B of G containing T , we have two simple roots α (short) and β (long) and then for each root γ in the root system of G we have a coroot γ ∨ , a root group Uγ and a corresponding root group homomorphism uγ : k → Uγ . We have the following information about conjugacy classes of unipotent elements (see [36, Table 22.1.5], and [55] for the representatives): Class label Representative Centralizer G2 uα (1)uβ (1) 2 G2 (a1 ) uβ (1)u2α+β (1) 4 (Ã1 )3 (p = 3) uβ (1)uα+β (1) 6 Ã1 uα (1) A1 + 3 (p 6= 3), A1 + 5 (p = 3) A1 uβ (1) A1 + 5 Trivial 1 G2 The notation in the final column gives the reductive part of the centralizer plus a number denoting the dimension of the unipotent radical of the centralizer. We record the closure and 1-accessibility relations in Figure 11.1. Here the first and third diagrams give the Hasse diagrams for the partial order of containment between orbit closures 30 G2 G2 G2 G2 (a1 ) G2 G2 (a1 ) G2 (a1 ) (Ã1 )3 G2 (a1 ) (Ã1 )3 Ã1 Ã1 A1 A1 1 1 1 1 (p 6= 3) (p 6= 3) (p = 3) (p = 3) Ã1 Ã1 A1 A1 Figure 1. Closure relation and 1-accessibility of unipotent classes in G2 taken from [52, II, Prop. 10.4]. In particular, the (Zariski) closure of a given conjugacy class consists of the union of that class together with those classes below it which are linked to it by a downwards path in the diagram. The second and fourth diagrams depict the directed graphs corresponding to the reflexive relation given by 1-accessibility (see Definition 3.2). In this case, it turns out that 1-accessibility is transitive (see Example 11.2 for an instance where this property fails). The cocharacter-closure of a given class can be read off similarly from these diagrams. In particular, it can be seen here that the cocharacter-closure of an orbit may be strictly smaller than the closure: e.g., the regular unipotent class labelled G2 has the subregular class G2 (a1 ) in its closure, but not in its cocharacter-closure. The correctness of the two graphs for 1-accessibility can be verified by an argument along the following lines. First, orbits that are not in the closure cannot be 1-accessible. Therefore, for p = 3, the class A1 is not 1-accessible from Ã1 (and vice versa for all p). Second, orbits with a unipotent centralizer cannot be 1-accessible from other orbits (as a limit along a cocharacter is fixed by that cocharacter). Thus the classes G2 (a1 ) and (Ã1 )3 are not 1accessible from any other class. It remains to check that all further possible 1-accessibility relations do hold. The trivial class is clearly 1-accessible from every unipotent class. For the regular class G2 , the representative uα (1)uβ (1) is destabilized by (3α + 2β)∨ to uα (1), and by (2α + β)∨ to uβ (1). The element uβ (1)u2α+β (1) in G2 (a1 ) is also taken by (2α + β)∨ to uβ (1), and by β ∨ to u2α+β (1), which is another representative for Ã1 . The representative uα (1) of Ã1 is conjugate by u2α+β (1) to uα (1)u3α+β (±3), and the latter element is destabilized by −(α + β)∨ to u3α+β (±3). If p 6= 3, this is a representative for the class labelled A1 . Finally, the element uβ (1)uα+β (1) in (Ã1 )3 is destabilized by (2α + β)∨ to uβ (1), and by −(3α + β)∨ to uα+β (1), which represents Ã1 . Example 11.2. We give an elementary example which shows that 1-accessibility is not a transitive relation. Start with H = SL2 (k), where k is an algebraically closed field, and let E denote the natural module for H, with standard basis {e1 , e2 }. Set W = S 2 (E), the 31 symmetric square of E, and let {x2 , xy, y 2} denote the standard basis for W . Let λ denote the diagonal cocharacter of H which acts with weight 1 on e1 and weight −1 on e2 , and with weights 2, 0 and −2 on x2 , xy and y 2 respectively. Now let G := H × k ∗ and let µ : k ∗ → G be the cocharacter given by µ(a) = (1, a) ∈ G for each a ∈ k ∗ . Then the images of λ and µ generate a maximal torus T of G, and λ and µ span the cocharacter group YT . Let the k ∗ -factor of G act on E with weight −1 and on W with weight 2. Since these actions of k ∗ commute with the H-actions, we get actions of G on E and W , and we can combine these to get an action of G on V := W ⊕ E. Consider the element v := xy + e1 ∈ V . Then λ(a) · v = xy + ae1 , so lima→0 λ(a) · v exists and equals v ′ := xy. Now let u = (uh , 1) in G, where uh ∈ Ru (Pλ )(H) is the unipotent element for which uh · xy = x2 + xy. Then u · v ′ = x2 + xy. Define another cocharacter σ ∈ Y (T ) by σ = µ − λ. We have σ(a) · (x2 + xy) = x2 + a2 xy, so lima→0 σ(a) · (x2 + xy) = x2 . Set v ′′ := x2 . The above shows that, in the language of this paper, we have a sequence of orbits G(k) · v, G(k) · v ′ , G(k) · v ′′ , with G(k) · v ′ 1-accessible from G(k) · v and G(k) · v ′′ 1-accessible from G(k) · v ′ . One can see by direct calculation that these are distinct orbits. We claim that G(k) · v ′′ is not 1-accessible from G(k) · v, which shows that 1-accessibility is not transitive. Since λ and µ generate the cocharacter group Y (T ) of the maximal torus T of G, and every cocharacter of G is conjugate to one in Y (T ), to check that G(k) · v ′′ is not 1-accessible from G(k) · v, it suffices to show that lima→0 (mλ + nµ)(a) · (g · v) 6∈ G(k) · v ′′ for any g ∈ G and m, n ∈ Z for which limit exists. Let g = (h, b) ∈ G be an arbitrary  the  q r element, and suppose h has matrix with respect to the fixed basis for E. Then we s t can write (mλ + nµ)(a) · (g · v) = (mλ + nµ)(a) · (b2 (qrx2 + (qt + rs)xy + sty 2 ) + b−1 (qe1 + se2 )) = b2 (qra2m+2n x2 + (qt + rs)a2n xy + sta−2m+2n y 2 ) + b−1 (qam−n e1 + sa−m−n e2 ). Now any G-conjugate of v ′′ = x2 has zero component in E, hence to stand any chance of the limit existing and lying in G(k) · v ′′ we need to kill off the e1 and e2 component in the limit. For the element h to lie in SL2 (k), we can’t have q = s = 0, so we have three cases to consider. First suppose q 6= 0 and s 6= 0. Then we need m − n > 0 and −m − n > 0 to kill off the e1 and e2 components. But −m − n > 0 implies 2m + 2n < 0, so looking at the coefficient of x2 , we must have qr = 0 and hence r = 0. Also, m − n > 0 implies −2m + 2n < 0, so looking at the coefficient of y 2 we must have st = 0 and hence t = 0. But then h is not an invertible matrix, so this is impossible. Second suppose q = 0 and s 6= 0. Then we need −m − n > 0, i.e., −m > n. For h to be invertible, we must have r 6= 0 and then the coefficient of xy tells us that n ≥ 0. The inequality −m > n now gives −m > 0, and hence −2m + 2n > 0. In this case the limit does exist and it equals 0 if n > 0 or b2 rsxy if n = 0. In the first case, this is clearly not ′′ ′ conjugate to   v , and in the second case the limit is conjugate to v = xy (e.g., by the element 1 I, (b2 rs) 2 ∈ G). As v ′ 6∈ G · v ′′ , we therefore cannot get into the orbit of v ′′ when q = 0 and s 6= 0. 32 The case q 6= 0 and s = 0 is similar—the limit, when it exists, is either 0 or conjugate to v ′ —and we see that G(k) · v ′′ is not 1-accessible from G(k) · v, as claimed. Acknowledgments: The authors acknowledge the financial support of EPSRC Grant EP/L005328/1 and of Marsden Grants UOC1009 and UOA1021. Part of the research for this paper was carried out while the authors were staying at the Mathematical Research Institute Oberwolfach supported by the “Research in Pairs” programme. Also, part of this paper was written during mutual visits to Auckland, Bochum and York. We are grateful to the referees for their careful reading of the paper and for helpful suggestions. References [1] P. Bardsley and R.W. Richardson, Étale slices for algebraic transformation groups in characteristic p, Proc. London Math. Soc. (3) 51 (1985), no. 2, 295–317. [2] M. Bate, Optimal subgroups and applications to nilpotent elements, Transformation Groups 14 (2009), no. 1, 29–40. [3] M. Bate, S. Herpel, B. Martin, G. Röhrle, Cocharacter-closure and spherical buildings, Pacific J. Math. 279 (2015), no. 1–2, 65–85. [4] M. Bate, B. Martin, G. Röhrle, A geometric approach to complete reducibility, Invent. Math. 161, no. 1 (2005), 177–218. , Complete reducibility and commuting subgroups, J. Reine Angew. Math. 621 (2008), 213–235. [5] [6] , Complete reducibility and separable field extensions, C. R. Acad. Sci. Paris Ser. I Math. 348 (2010), 495–497. , The strong Centre Conjecture: an invariant theory approach, J. Algebra 372 (2012), 505–530. [7] [8] M. Bate, B. Martin, G. Röhrle, R. Tange, Complete reducibility and separability, Trans. Amer. Math. Soc. 362 (2010), no. 8, 4283–4311. , Closed orbits and uniform S-instability in geometric invariant theory, Trans. Amer. Math. Soc. [9] 365 (2013), no. 7, 3643–3673. [10] G. Berhuy, An introduction to Galois cohomology and its applications. With a foreword by Jean-Pierre Tignol. London Mathematical Society Lecture Note Series, 377. Cambridge University Press, Cambridge, 2010. [11] D. Birkes, Orbits of linear algebraic groups, Ann. of Math. (2) 93 (1971), 459–475. [12] A. Borel, Introduction aux groupes arithmétiques, Publications de l’Institut de Mathématique de l’Université de Strasbourg, XV. Actualités Scientifiques et Industrielles, No. 1341 Hermann, Paris 1969. [13] , Linear algebraic groups, Graduate Texts in Mathematics, 126, Springer-Verlag 1991. [14] A. Borel, J. Tits, Éléments unipotents et sous-groupes paraboliques des groupes réductifs, I,, Invent. Math. 12 (1971), 95–104. [15] S. Bosch, W. Lütkebohmert, M. Raynaud, Néron models, Ergebnisse der Mathematik und ihrer Grenzgebiete, 21. Springer-Verlag, Berlin, 1990. [16] N. Bourbaki, Éléments de mathématique, Algèbre, Chapitres 4 à 7, Lecture Notes in Mathematics, 864, Masson, Paris, 1981. [17] R.J. Bremigan, Quotients for algebraic group actions over non-algebraically closed fields, J. Reine Angew. Math. 453 (1994), 21–47. [18] M. Clarke and A. Premet, The Hesselink stratification of nullcones and base change, Invent. Math. 191 (2013), 631–669. [19] B. Conrad, Finiteness theorems for algebraic groups over function fields, Compositio Math. 148 (2012), no. 2, 555–639. [20] B. Conrad, O. Gabber, G. Prasad, Pseudo-reductive groups, New Mathematical Monographs, vol. 17, Cambridge University Press, Cambridge, 2010. [21] M. Demazure, P. Gabriel, Groupes algébriques. Tome I: Géométrie algébrique, généralités, groupes commutatifs, Masson & Cie, Éditeur, Paris, 1970, Avec un appendice Corps de classes local par M. Hazewinkel. 33 [22] C. Dietz, k-semisimple elements and pseudotori, Dissertation, Fakultät für Mathematik der Universität Bielefeld, 2013. [23] P. Gille, A. Quéguiner-Mathieu, Exemples de groupes semi-simples simplement connexes anisotropes contenant un sous-groupe unipotent, Pure Appl. Math. Q. 9 (2013), no. 3, 487–492. [24] T.L. Gómez, A. Langer, A.H.W. Schmitt, I. Sols, Moduli spaces for principal bundles in arbitrary characteristic, Adv. Math. 219 (2008), no. 4, 1177–1245. [25] J. Hausen, A general Hilbert-Mumford criterion, Ann. Inst. Fourier 53 (2003), no. 3, 701–712. [26] S. Herpel, On the smoothness of centralizers in reductive groups, Trans. Amer. Math. Soc. 365 (2013), no. 7, 3753–3774. [27] W.H. Hesselink, Uniform instability in reductive groups, J. Reine Angew. Math. 303/304 (1978), 74–96. [28] D. Huybrechts and M. Lehn, The geometry of moduli spaces of sheaves, 2nd ed., Cambridge Mathematical Library, Cambridge University Press, Cambridge, 2010. [29] G.R. Kempf, Instability in invariant theory, Ann. Math. 108 (1978), 299–316. [30] H. Kraft, Geometric Methods in Representation Theory. Representations of algebras (Puebla, 1980), pp. 180–258, Lecture Notes in Math. 944, Springer, Berlin-New York, 1982. [31] V. Lafforgue, Chtoucas pour les groupes réductifs et paramétrisation de Langlands globale, http://arxiv.org/abs/1209.5352v5. [32] J. Levy, Rationality and orbit closures, Canad. Math. Bull. 46, (2003), 204–215. , Rationality and the Jordan-Gatti-Viniberghi decomposition, Canad. Math. Bull. 57 (2014), no. [33] 1, 97–104. [34] M.W. Liebeck, G.M. Seitz, Reductive subgroups of exceptional algebraic groups. Mem. Amer. Math. Soc. no. 580 (1996). , Variations on a theme of Steinberg, Special issue celebrating the 80th birthday of Robert [35] Steinberg. J. Algebra 260 (2003), no. 1, 261–297. , Unipotent and nilpotent classes in simple algebraic groups and Lie algebras, Mathematical [36] Surveys and Monographs 180, American Mathematical Society (2012). [37] G. McNinch, Completely reducible Lie subalgebras, Transform. Groups 12 (2007), no. 1, 127–135. , Linearity for actions on vector groups, J. Algebra 397 (2014), 666–688. [38] [39] K. Mulmuley, M. Sohoni, Geometric complexity theory. I. An approach to the P vs. NP and related problems, SIAM J. Comput. 31 (2001), no. 2, 496–526. [40] , Geometric complexity theory. II. Towards explicit obstructions for embeddings among class varieties, SIAM J. Comput. 38 (2008), no. 3, 1175–1206. [41] D. Mumford, J. Fogarty, F. Kirwan, Geometric invariant theory. Third edition. Ergebnisse der Mathematik und ihrer Grenzgebiete, 34. Springer-Verlag, Berlin, 1994. [42] H. Nakajima, Lectures on Hilbert schemes of points on surfaces, University Lecture Series 18, American Mathematical Society, Providence, RI, 1999. [43] A. Premet, An analogue of the Jacobson-Morozov theorem for Lie algebras of reductive groups of good characteristics, Trans. Amer. Math. Soc. 347 (1995), 2961–2988. , Nilpotent orbits in good characteristic and the Kempf-Rousseau theory, J. Algebra 260 (2003), [44] 338–366. [45] N. Ressayre, Geometric invariant theory and the generalized eigenvalue problem, Invent. Math. 180 (2010), 389–441. [46] R.W. Richardson, On orbits of algebraic groups and Lie groups, Bull. Austral. Math. Soc. 25 (1982), no. 1, 1–28. [47] S. Roman, Advanced Linear Algebra, Third Edition, Graduate Texts in Mathematics, 135, Springer, New York, 2008. [48] G. Rousseau, Immeubles sphériques et théorie des invariants, C.R.A.S. 286 (1978), 247–250. [49] A.H.W. Schmitt, A closer look at semistability for singular principal bundles, Int. Math. Res. Not. 62 (2004), 3327–3366. [50] J.-P. Serre, La notion de complète réductibilité dans les immeubles sphériques et les groupes réductifs, Séminaire au Collège de France, résumé (1997). , Complète réductibilité, Séminaire Bourbaki, 56ème année, 2003–2004, no 932. [51] 34 [52] N. Spaltenstein, Classes unipotentes et sous-groupes de Borel, Lecture Notes in Mathematics, 946, Springer-Verlag, Berlin Heidelberg New York, 1982 [53] T.A. Springer, Linear algebraic groups, Second edition. Progress in Mathematics, 9. Birkhäuser Boston, Inc., Boston, MA, 1998. [54] D.I. Stewart, On unipotent algebraic G-groups and 1-cohomology, Trans. Amer. Math. Soc. 365 (2013), no. 12, 6343–6365. [55] U. Stuhler, Unipotente und nilpotente Klassen in einfachen Gruppen und Liealgebren vom Typ G2 , Indag. Math. 33 (1971), 365–378. [56] G. Székelyhidi, An introduction to extremal Kähler metrics, Graduate Studies in Mathematics 152, American Mathematical Society, Providence, RI, 2014. [57] T. Uchiyama, Separability and complete reducibility of subgroups of the Weyl group of a simple algebraic group of type E7 , J. Algebra 422 (2014), 357–372. [58] A. Zamora, On the Harder-Narasimhan filtration for finite dimensional representations of quivers, Geom. Dedicata 170 (2014), 185–194. [59] G. Zwara, Degenerations of finite-dimensional modules are given by extensions, Compositio Math. 121 (2000), 205–218. Department of Mathematics, University of York, York YO10 5DD, United Kingdom E-mail address: [email protected] Fakultät für Mathematik, Ruhr-Universität Bochum, D-44780 Bochum, Germany E-mail address: [email protected] Department of Mathematics, University of Aberdeen, King’s College, Fraser Noble Building, Aberdeen AB24 3UE, United Kingdom E-mail address: [email protected] Fakultät für Mathematik, Ruhr-Universität Bochum, D-44780 Bochum, Germany E-mail address: [email protected] 35
4math.GR
arXiv:1507.08020v4 [math.AG] 31 May 2017 Geometry & Topology XX (20XX) 1001–999 1001 Affine representability results in A1 –homotopy theory II: principal bundles and homogeneous spaces ARAVIND ASOK MARC HOYOIS MATTHIAS WENDT We establish a relative version of the abstract “affine representability” theorem in A1 –homotopy theory from Part I of this paper. We then prove some A1 –invariance statements for generically trivial torsors under isotropic reductive groups over infinite fields analogous to the Bass–Quillen conjecture for vector bundles. Putting these ingredients together, we deduce representability theorems for generically trivial torsors under isotropic reductive groups and for associated homogeneous spaces in A1 –homotopy theory. 14F42; 14L10, 55R15, 20G15 1 Introduction Suppose k is a fixed commutative unital base ring, and write H (k) for the Morel– Voevodsky A1 –homotopy category over k [44]. The category H (k) is constructed as a certain localization of the category of simplicial presheaves on Smk , the category of smooth k–schemes. Write Smaff for the subcategory of Smk consisting of affine k schemes. If X is a simplicial presheaf on Smk , by an “affine representability” result defined by for X , we will mean, roughly, a description of the presheaf on Smaff k U 7→ [U, X ]A1 := HomH (k) (U, X). Here is a flavor of the description we provide: if X is a simplicial presheaf on 1 one can consider the simplicial set SingA X (U) Smk , then for any U ∈ Smaff k [44, p. 87]. The 0–simplices of this simplicial set are morphisms U → X and the 1–simplices are “naive” or “elementary” A1 –homotopies U × A1 → X . The 1 1 assignment U 7→ π0 (SingA X (U)) defines a presheaf π0 (SingA X ) of “naive” A1 – homotopy classes of maps U → X . In [9], we gave conditions that allowed us 1 to identify π0 (SingA X )(U) ∼ = [U, X ]A1 , i.e., under which “naive” A1 –homotopy classes coincide with “true” A1 –homotopy classes. Published: XX Xxxember 20XX DOI: 10.2140/gt.20XX.XX.1001 1002 Aravind Asok, Marc Hoyois and Matthias Wendt In [9, Theorem 1], building on results of M Schlichting [56, Theorems 6.15 and 6.22], we simplified and generalized F Morel’s affine representability result for vector bundles; we encourage the reader to consult the introduction of [9] for a more detailed discussion of these points. Our goal in this paper is to further extend the scope of these affine representability results in A1 –homotopy theory. For example, the following result provides a generalization of the representability result from vector bundles to torsors under suitable reductive group schemes (the description in terms of naive homotopy classes is hidden here). Theorem 1 (See Theorem 4.1.3) Suppose k is an infinite field, and G is an isotropic reductive k –group (see Definition 3.3.5). For every smooth affine k –scheme X , there is a bijection 1 HNis (X, G) ∼ = [X, BG]A1 that is functorial in X . Remark 2 Theorem 1 is essentially the strongest possible representability statement for which one could hope. First, one cannot expect the functor “isomorphism classes of Nisnevich locally trivial G–torsors” to be representable on H (k) in general. Indeed, if we do not restrict attention to the category Smaff k , then this functor need not even be 1 A –invariant (see, e.g., Ramanathan [55] for a study of failure of homotopy invariance in case X = P1 or the introduction to [9] for other ways in which A1 –invariance can fail). Second, at least if k is infinite and perfect, then the hypothesis that G is isotropic cannot be weakened. Indeed, if G is not an isotropic reductive k–group in the sense mentioned above, then even affine representability for G–torsors fails in general; see Remark 3.3.8 and Balwe–Sawant [14, Theorem 1] for more details. We do not know if Theorem 1 holds if k is finite. Remark 3 It has been known for some time that an analogue of Morel’s theorem should hold for torsors under groups like SLn and Sp2n (for SLn this is mentioned, e.g., in Asok–Fasel [5, Theorem 4.2]). Schlichting observed [56, Remark 6.23] that his techniques also apply to torsors under groups like SLn or Sp2n . Combined with the results of [9], one therefore expects affine representability results to hold for torsors under such groups in the same generality as for vector bundles. For completeness, we include such results here as Theorems 4.1.1 and 4.1.2. We also establish affine representability results for various homogeneous spaces under reductive groups. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1003 Theorem 4 (See Theorem 4.2.10) Suppose k is an infinite field, and G is an isotropic reductive k –group. If P ⊂ G is a parabolic k –subgroup possessing an isotropic Levi k –subgroup, then for any smooth affine k –scheme X , there is a bijection 1 ∼ π0 (SingA G/P)(X) −→ [X, G/P]A1 that is functorial in X . Remark 5 As suggested prior to the statement, we actually establish representability results with targets that are more general homogeneous spaces. In this direction, observe that it is often possible to “explicitly” identify sets of naive homotopy classes and thus, via Theorem 4 true A1 –homotopy classes. Barge and Lannes [15, Chapter 4] provide such identifications in the case where the target is related to symmetric bilinear forms. Cazanave [19] provides such identifications in the case where the target is Pn . In addition, Fasel [26, Theorem 2.1] gives such an identification in the case where the target is a Stiefel variety (various homogeneous spaces of GLn ). Building on the ideas of Schlichting and Morel, the proofs of the results above are established using the framework developed in [9]: affine representability follows from affine Nisnevich excision and affine homotopy invariance. The restrictions on k that appear in our results are imposed to guarantee that affine homotopy invariance holds for Nisnevich locally trivial torsors under G. While affine homotopy invariance for vector bundles is precisely the Bass–Quillen conjecture (about which much is known), precise statements regarding affine homotopy invariance for torsors under other groups are harder to find in the literature (in part because such results are typically false for étale locally trivial torsors), but see Wendt [65, Section 3]. The entirety of Section 3 is devoted to studying affine homotopy invariance for torsors under reductive group schemes over a rather general base. Theorem 1 is a straightforward consequence of our general representability result (see Theorem 2.3.5) combined with affine homotopy invariance (see Theorem 3.3.7 for a precise statement of what we mean by this term). Theorem 4 follows from Theorem 2.4.2 and affine homotopy invariance for isotropic reductive k–groups by a reduction from P to a Levi factor of P (which by assumption is also an isotropic reductive k–group). Again, for certain groups, significantly more general statements can be made; see Theorem 4.2.12. Our techniques also allow us to establish significant generalizations (with simpler proofs) of some results of F Morel regarding when classifying spaces for split groups are A1 –local [42, Theorems 1.3, 1.5 and A.2]. While Morel deduces these results Geometry & Topology XX (20XX) 1004 Aravind Asok, Marc Hoyois and Matthias Wendt from strong A1 –invariance of non-stable K1 –functors, which he establishes by appeal to classical results regarding elementary matrices, we are, in sharp contrast, able to deduce such strong A1 –invariance statements as a direct consequence of our general representability result (see Theorem 4.3.3 for more details). As another sample application of these results, we adapt some classical ideas of G W Whitehead [66] to establish nilpotence results for non-stable K1 –functors (see Theorem 4.4.3), along the lines of the results of Bak [11] and Bak–Hazrat–Vavilov [12]. In particular, we are able to resolve [12, Problem 6] in a number of new situations (see Remark 4.4.4 for more details). The representability results for homogeneous spaces are relevant when applying the methods of obstruction theory to analyze algebraic classification problems. For example, if the base k is a perfect field, the A1 –fibration sequence An \ {0} −→ BGLn−1 −→ BGLn was used by F Morel [43, Chapter 8] to develop an obstruction-theoretic approach to answering the question of when a vector bundle over a smooth affine variety splits off a trivial rank 1 summand; this approach was further developed by the first author and Fasel in [6, 7] to which we refer the interested reader for a more detailed discussion. The results of this paper (specifically Theorem 2.2.5) open the possibility of studying such questions over more general base rings, e.g., Z. Our representability results also broaden the scope of geometric and algebraic applications of A1 –homotopy theory. We mention a few such directions here (though we do not develop the applications). First, Theorem 1 allows one to give explicit classifications of principal G–bundles on certain quadric hypersurfaces, see Asok–Fasel [5] and Asok– Doran–Fasel [4]. Theorems 4.2.1 and 4.2.2 establish affine representability results for “split” quadric hypersurfaces. The former result has relevance to questions regarding unimodular rows (see [5]). Building on the ideas of Fasel [27], affine representability results for even dimensional quadrics are a key tool in Asok–Fasel [8] to interpret Euler class groups à la Bhatwadekar–Sridharan in terms of A1 –homotopy theory. In another direction, since the homogeneous space G2 /SL3 is a 6–dimensional “split” smooth affine quadric, we use our results in [10] to study questions regarding reductions of structure group for “generically trivial” octonion algebras. In algebraic terms this can be rephrased as follows: when is an octonion algebra a Zorn (“vector-matrix”) algebra (see, e.g., Springer and Veldkamp [57, p. 19])? Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1005 Dependency of sections/prerequisites Section 2 is devoted to extending our results from [9]; the proofs rely on ideas from loc. cit, which we will use rather freely together with some basic properties of torsors and homogeneous spaces collected in Sections 2.3 and 2.4. Section 3 is devoted to establishing affine homotopy invariance results for torsors under reductive groups. The results of this section rely on the basic properties of torsors and homogeneous spaces recalled in Section 2 as well as the theory of (reductive) group schemes over a base; regarding the latter: we review some of the main definitions and basic properties, but we mainly provide pointers to the literature. At the very end of Section 3.3 we also rely on the representability results from Section 2. Section 4 contains applications of our main results and thus relies on all of the preceding sections. We refer the reader to the beginning of each section for a more detailed description of its contents. Acknowledgements The authors would like to thank Brian Conrad for extremely helpful correspondence regarding [21] and [22]. In particular, the proof of Lemma 3.1.5 in its current form was a product of these discussions. The authors would also like to thank Chetan Balwe and Anand Sawant for helpful discussions of [13], Philippe Gille and Anastasia Stavrova for helpful comments and corrections on a previous version of this paper, and Marco Schlichting and Jean Fasel for mentioning at some point the Zariski local triviality of the torsor appearing in the proof of Lemma 3.1.7. Finally, this paper owes an intellectual debt to Marco Schlichting: even if it is obscured in references to [9], the ideas of [56, §6] served to focus our attention (for example, he established a representability result for special linear groups or symplectic groups [56, Remark 6.23]). Aravind Asok was partially supported by National Science Foundation Award DMS1254892. Marc Hoyois was partially supported by National Science Foundation Award DMS-1508096. Matthias Wendt was partially supported by EPSRC grant EP/M001113/1. Preliminaries/Notation All rings considered in this paper will be assumed unital. We use the symbol S for a quasi-compact, quasi-separated base scheme, SmS for the category of finitely presented smooth S–schemes, and Smaff S ⊂ SmS for the full subcategory of affine schemes (in the absolute sense). We also reuse some terminology and notation introduced in [9], Geometry & Topology XX (20XX) 1006 Aravind Asok, Marc Hoyois and Matthias Wendt e.g., the notion of affine Nisnevich excision [9, Example 2.1.2 and Definition 3.2.1], the t–localization functor Rt [9, §3.1], the singular construction SingI [9, §4.1], etc. 2 Some general representability results The goal of this section is to extend the affine representability results of [9]. In particular, Theorem 2.2.4 provides a relative version of [9, Theorem 5.1.3]. We then specialize this result to two cases of particular interest in Theorems 2.3.5 and 2.4.2. 2.1 Naive A1 –homotopy classes Let F be a simplicial presheaf on SmS . Given X ∈ SmS , there is a canonical map (2–1) 1 π0 (SingA F )(X) → [X, F ]A1 , where the right-hand side is the set of maps in the A1 –homotopy category H (S). The left-hand side is the set of naive A1 –homotopy classes of maps from X to F : it is the quotient of the set of maps X → F by the equivalence relation generated by A1 –homotopies. For presheaves F of “geometric origin”, such as representable presheaves, it is rare that (2–1) is a bijection for all X ∈ SmS (this happens for example when F is represented by an A1 –rigid smooth scheme in the sense of Morel– Voevodsky [44, §3 Example 2.4], e.g., a smooth curve of genus g > 0 or an abelian variety). However, one of the main themes of this paper is that there are many examples of presheaves F such that (2–1) is a bijection for every affine X . We formalize this idea in the following definition. Definition 2.1.1 Let F be a simplicial presheaf on SmS and let F˜ be a Nisnevich1 local A1 –invariant fibrant replacement of F . Then there is a canonical map SingA F → F˜ , well-defined up to simplicial homotopy. We will say that F is A1 –naive if the 1 map SingA F (X) → F˜ (X) is a weak equivalence for every X ∈ Smaff S . Remark 2.1.2 If F is A1 –naive, then in particular (2–1) is a bijection for every 1 X ∈ Smaff S . More generally, if F is A –naive and pointed, then 1 πn (SingA F )(X) ∼ = [Sn ∧ X+ , F ]A1 ,∗ for every X ∈ Smaff S and n ≥ 0. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1007 Proposition 2.1.3 If F is a simplicial presheaf on SmS , then F is A1 –naive if 1 and only if SingA F satisfies affine Nisnevich excision (see [9, §2.1]). In that case, 1 RZar SingA F is Nisnevich-local and A1 –invariant. Proof Let F˜ be a Nisnevich-local A1 –invariant replacement of F . Suppose that 1 F is A1 –naive. Then the restriction of SingA F to Smaff is (objectwise) weakly S 1 equivalent to F˜ , and hence it is Nisnevich-local. But this implies that SingA F satisfies affine Nisnevich excision, by [9, Theorem 3.2.5]. 1 Conversely, suppose that SingA F satisfies affine Nisnevich excision. By [9, Theorem 3.3.4], the canonical map 1 1 SingA F (X) → RZar SingA F (X) 1 A is a weak equivalence for every X ∈ Smaff S , and RZar Sing F is Nisnevich-local. By 1 A1 1 [9, Lemma 5.1.2], RZar Sing F is also A –invariant. Hence, RZar SingA F ≃ F˜ and F is A1 –naive. 2.2 The singular construction and homotopy fiber sequences The notion of representable interval object was formulated in [9, Definition 4.1.1]. By a homotopy fiber sequence of pointed simplicial presheaves, we mean a homotopy Cartesian square in which either the top-right or bottom-left corner is a point. Proposition 2.2.1 Let C be a small category and I a representable interval object in C . Let F −→ G −→ H be a homotopy fiber sequence of pointed simplicial presheaves on C . If π0 (H ) is I –invariant, then SingI F −→ SingI G −→ SingI H is a homotopy fiber sequence. Proof For X ∈ C, consider the square of bisimplicial sets F (X × I• ) / G (X × I• )   / H (X × I• ) ∗ Geometry & Topology XX (20XX) 1008 Aravind Asok, Marc Hoyois and Matthias Wendt which is degreewise homotopy Cartesian. Since π0 (H ) is I–invariant, the simplicial set π0 H (X × I• ) is constant. By [9, Lemma 4.2.1], the diagonal of this square is homotopy Cartesian, i.e., SingI F (X) −→ SingI G (X) −→ SingI H (X) is a homotopy fiber sequence. Corollary 2.2.2 Let C be a small category and I a representable interval object in C . If F is a pointed simplicial presheaf on C such that π0 (F ) is I –invariant, then the canonical map SingI RΩF −→ RΩ SingI F is a weak equivalence. Proof This follows from Proposition 2.2.1 applied to the homotopy fiber sequence RΩ(F ) → ∗ → F . Lemma 2.2.3 Suppose C is a small category with an initial object and let P be a cd-structure on C . If J is a small diagram and F : J → sPre(C) is a functor such that F(j) satisfies P –excision for every j ∈ J , then holimJ F satisfies P –excision as well. Proof This is a straightforward consequence of commutation of homotopy limits. Theorem 2.2.4 Suppose F −→ G −→ H is a homotopy fiber sequence of pointed simplicial presheaves on SmS . If the following conditions hold: (i) G and H satisfy affine Nisnevich excision, and (ii) π0 (G ) and π0 (H ) are A1 –invariant on affine schemes, then F is A1 –naive. Proof By Proposition 2.2.1, for every U ∈ Smaff S , the sequence (2–2) 1 1 1 SingA F (U) −→ SingA G (U) −→ SingA H (U) 1 1 is a homotopy fiber sequence. By [9, Corollary 4.2.4], both SingA G and SingA H 1 satisfy affine Nisnevich excision. Hence by Lemma 2.2.3, SingA F also satisfies affine Nisnevich excision. In other words, by Proposition 2.1.3, F is A1 –naive. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1009 The following result is not used in the sequel, but it fits the theme of this section. It is a variant of a result of Morel [43, Theorem 6.53] that holds over arbitrary base schemes. Theorem 2.2.5 Let F → G → H be a homotopy fiber sequence of pointed simplicial presheaves on SmS . Assume that: (i) H satisfies affine Nisnevich excision; (ii) π0 (H ) is A1 –invariant on affine schemes. Then F → G → H is an A1 –fiber sequence, i.e., it remains a homotopy fiber sequence after taking Nisnevich-local A1 –invariant replacements. Proof As in Theorem 2.2.4, the sequence (2–2) is a homotopy fiber sequence for aff ∗ every U ∈ Smaff and Ri∗ its S . Let i be the restriction functor from SmS to SmS derived right adjoint. By [9, Lemma 3.3.2], there is a natural equivalence of functors RZar ≃ Ri∗ RZar i∗ . Since Ri∗ and RZar preserve homotopy fiber sequences, we deduce that 1 1 1 RZar SingA F −→ RZar SingA G −→ RZar SingA H 1 is a homotopy fiber sequence. By [9, Theorem 5.1.3], RZar SingA H is Nisnevich-local and A1 –invariant. But it follows from the right properness of the Morel–Voevodsky model structure [44, §2 Theorem 2.7] that every homotopy fiber sequence whose base is Nisnevich-local and A1 –invariant is an A1 –fiber sequence. 2.3 Application to torsors In this subsection we specialize the general representability result of [9, §5.1] to simplicial presheaves classifying G–torsors for some group G. We start by recalling some general facts about torsors. Definition 2.3.1 Let C be a small category equipped with a Grothendieck topology t, let G be a t–sheaf of groups on C, and let X ∈ C. A G–torsor over X is a triple (P, π, a) where P is a t–sheaf on C, a : P × G → P is a right action of G on P , and π : P → X is a morphism that is G–equivariant for the trivial G–action on X , such that: (i) the morphism P × G → P ×X P of components π1 and a is an isomorphism; (ii) π is t–locally split, i.e., the collection of morphisms U → X in C such that P ×X U → U has a section is a t–covering sieve of X . Geometry & Topology XX (20XX) 1010 Aravind Asok, Marc Hoyois and Matthias Wendt The collection of G–torsors over various X ∈ C can be assembled into a category Torst (G) fibered in groupoids over C. We write BTorst (G) for the simplicial presheaf whose value on U ∈ C is the nerve of the groupoid of sections of Torst (G) over C/U (this groupoid is canonically equivalent to the groupoid of G–torsors over U , but is strictly functorial in U , cf. Hollander [33, §3.3]). It is well-known that Torst (G) is a stack for the topology t. As shown in [33, Theorem 3.9], this is equivalent to the statement that BTorst (G) satisfies t–descent. We denote by BG the pointed simplicial presheaf with n–simplices Gn and with the usual face and degeneracy maps, and we let Bt G := Rt BG be its t–local replacement (see [9, §3]). There is a morphism BG → BTorst (G) sending the unique vertex of BG(U) to the trivial G–torsor over U . Since BTorst (G) is t–local, we obtain a morphism of simplicial presheaves (2–3) Bt G −→ BTorst (G). Lemma 2.3.2 Let C be a small category, t a Grothendieck topology on C , and G a t –sheaf of groups on C . Then: (i) The map (2–3) is a weak equivalence of simplicial presheaves. (ii) There is a natural isomorphism π0 (Bt G)(−) ∼ = Ht1 (−, G). (iii) There is a canonical weak equivalence RΩBt G ≃ G . Proof It is clear that the map (2–3) induces an isomorphism on t–sheaves of homotopy groups, so that it is a weak equivalence in the Jardine model structure. To deduce that it is a weak equivalence, it therefore suffices to show that the source and target are fibrant in the Jardine model structure. By Dugger{Hollander{Isaksen [25, Corollary A.8], it suffices to show that, for every U ∈ C, the simplicial sets Bt G(U) and BTorst (G)(U) have no homotopy in dimensions ≥ 2. This statement is clear for the latter as it is the nerve of a groupoid. To treat the former case, we recall a fact from simplicial homotopy theory: if X is a simplicial set, then X has no homotopy in dimensions ≥ k if and only if the homotopy fibers of the diagonal map X → X ×h X have no homotopy in dimensions ≥ k − 1; this can be checked by assuming X is a Kan complex and studying homotopy groups. Thus, a simplicial set X has no homotopy in dimensions ≥ 2 if and only if its 3-fold diagonal X −→ X ×hX×h X×h X Geometry & Topology XX (20XX) X X Affine representability results in A1 –homotopy theory II 1011 is a weak equivalence. Since Rt preserves homotopy pullbacks, it also preserves the property of having no homotopy in dimensions ≥ 2. This proves (i). Assertions (ii) and (iii) are true essentially by definition if we replace Bt G by BTorst (G), so they both follow from (i). Torsors under S–group schemes Our main interest is to representability results for torsors under group schemes, so we now discuss that situation in greater detail. Let G be an S–group scheme and let X be an S–scheme. By a G–torsor over X we will mean a G–torsor in the sense of Definition 2.3.1, for C the category of S–schemes and t the fppf topology. In the sequel G will always be affine over S, and in that case a G–torsor over X is automatically representable by an S–scheme, by Milne [40, Theorem III.4.3 (a)] (note: the implicit Noetherian hypothesis in Milne’s argument is unnecessary). If moreover X and G belong to SmS , then taking C to be the category SmS with t the étale topology one obtains an equivalent notion of torsor. Indeed, if π : P → X is a G–torsor over X , then π is finitely presented and smooth by the following lemma. Since smooth morphisms admit sections étale locally, π itself is a cover of X in the étale topology which trivializes the torsor. Lemma 2.3.3 Suppose G is an affine S –group scheme, X is an S –scheme, and π : P → X is a G –torsor over X . If G → S is finitely presented, flat, or smooth, then so is π : P → X . Proof By definition, there exists an fppf cover {Ui → X}i∈I such that P ×X Ui → Ui is isomorphic to G ×S Ui → Ui , which is finitely presented, flat, or smooth. We conclude using the fact that each of these properties of a morphism is fppf-local on the target, by [58, Tag 02L0 Lemma 34.19.11, Tag 02L2 Lemma 34.19.13, and Tag 02VL Lemma 34.19.25]. Example 2.3.4 Let t be a topology on SmS in between the Zariski topology and the étale topology and let n ≥ 1. The groupoid of GLn –torsors over a scheme is canonically equivalent to the groupoid of rank n vector bundles. Since GLn is a smooth special group, any GLn –torsor is t–locally trivial. In particular, by Lemma 2.3.2 (ii), we have π0 (Bt GLn )(X) ∼ = Vn (X) Geometry & Topology XX (20XX) 1012 Aravind Asok, Marc Hoyois and Matthias Wendt for any X ∈ SmS , where Vn (X) denotes the set of isomorphism classes of rank n vector bundles on X . Similarly, we have π0 (Bt SLn )(X) ∼ = Vno (X) and π0 (Bt Sp2n ) ∼ = H V 2n (X), where Vno (X) (resp. H V 2n (X)) is the set of isomorphism classes of rank n oriented (resp. rank 2n symplectic) vector bundles (see the beginning of Section 3.3 for reminders about oriented and symplectic vector bundles). Affine representability for Nisnevich locally trivial G–torsors Theorem 2.3.5 Suppose G is a finitely presented smooth S –group scheme. 1 (−, G) is A1 –invariant on Smaff , then HNis S If 1 (i) The simplicial presheaf RZar SingA BNis G is Nisnevich-local and A1 –invariant. (ii) For every affine X ∈ Smaff S , the canonical map 1 HNis (X, G) −→ [X, BG]A1 is a bijection that is functorial with respect to X . Proof Since BNis G is Nisnevich-local by definition, it satisfies Nisnevich excision by 1 (−, G) [9, Theorem 3.2.5]. Taking into account the identification π0 (BNis G) ∼ = HNis from point (ii) of Lemma 2.3.2, we can apply [9, Theorem 5.1.3] to BNis G, which implies (i) and (ii) (note also that [X, BNis G]A1 ∼ = [X, BG]A1 since BG → BNis G is a Nisnevich-local equivalence). 2.4 Application to homogeneous spaces Let C be a small category equipped with a Grothendieck topology t. Let G and H be t–sheaves of groups on C with H ⊂ G. We then have a homotopy fiber sequence of simplicial presheaves G/H −→ BH −→ BG, where G/H denotes the presheaf U 7→ G(U)/H(U). Applying the t–localization functor Rt , we obtain a homotopy fiber sequence of t–local simplicial presheaves (2–4) at (G/H) −→ Bt H −→ Bt G. We now restrict attention to C = SmS with the goal of applying Theorem 2.2.4. For geometric applications, we need to better understand the sheaf at (G/H). Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1013 Homogeneous spaces: topologies and quotient sheaves Write rX for the presheaf on the category of S–schemes represented by an S–scheme X , and r′ X for the restriction of the presheaf rX to SmS . Suppose that G and H are finitely presented smooth S–group schemes, and that H is a closed subgroup of G. The right translation action of H on G is scheme-theoretically free and it follows from a result of Artin [2, Corollary 6.3] that the sheaf afppf (rG/rH) is representable by an S–algebraic space. Two questions naturally present themselves: first, when does the fppf sheaf quotient coincide with the Zariski or Nisnevich sheaf quotient and second, is the fppf-sheaf afppf (rG/rH) representable by a smooth scheme? We address the first question here; we answer the second question in various cases in Section 3.1. Lemma 2.4.1 Suppose G is a finitely presented S –group scheme and H ⊂ G is a finitely presented closed S –subgroup scheme. Assume that H is flat over S and that the quotient G/H exists as an S –scheme. Then G → G/H is an H –torsor, and the following statements hold. (i) If t is a subcanonical topology on S –schemes such that the map G → G/H is t –locally split, then r(G/H) ∼ = at (rG/rH) . (ii) If G is smooth over S , then G/H is smooth over S . Moreover, if t is a subcanonical topology on SmS such that the map G → G/H is t –locally split, then r′ (G/H) ∼ = at (r′ G/r′ H) . Proof By a theorem of Anantharaman [1, Appendice I, Théorème 6], we have r(G/H) ∼ = afppf (rG/rH). In particular, G → G/H is an H –torsor, and hence it is flat by Lemma 2.3.3. If G is smooth, it follows from [32, Proposition 17.7.7] that G/H is also smooth. If G → G/H is t–locally split, then rG → r(G/H) is an epimorphism of t–sheaves. By [3, Proposition 4.3 (2)], this implies that r(G/H) is the coequalizer of the equivalence relation rG ×r(G/H) rG ∼ = rG × rH ⇒ rG in the category of t–sheaves, which exactly means that r(G/H) ∼ a = t (rG/rH). The second statement is proved in the same way. Affine representability for homogeneous spaces Theorem 2.4.2 Suppose G is a finitely presented smooth S –group scheme and H ⊂ G is a finitely presented smooth closed S –subgroup scheme such that the quotient G/H exists as an S –scheme. Suppose that G → G/H is Nisnevich locally split and that Geometry & Topology XX (20XX) 1014 Aravind Asok, Marc Hoyois and Matthias Wendt 1 (−, G) and H 1 (−, H) are A1 –invariant on Smaff . Then G/H is A1 –naive. In HNis S Nis particular, for every X ∈ Smaff S , there is a bijection 1 π0 (SingA G/H)(X) ∼ = [X, G/H]A1 . Proof The assumption on G → G/H combined with Lemma 2.4.1 allow us to conclude that r′ (G/H) ∼ = aNis (r′ G/r′ H) and thus the homotopy fiber sequence (2–4) has the form r′ (G/H) → BNis H → BNis G. The simplicial presheaves BNis G and BNis H are Nisnevich-local and hence satisfy Nisnevich excision by [9, Theorem 3.2.5]. The result is now a direct application of Theorem 2.2.4, taking into account Lemma 2.3.2 (ii). 3 Homotopy invariance for torsors under group schemes 1 (−, G) for G The main goal of this section is to study A1 –invariance of the functors HNis a linear group. Section 3.1 reviews basic definitions about group schemes, torsors and homogeneous spaces; it also collects a number of results that will be used later in the text. Section 3.2 establishes an analog of the local-to-global principle (a.k.a. “Quillen patching”) for torsors under linear group schemes under rather general hypotheses; the main result is Theorem 3.2.5. Finally, Section 3.3 proves general homotopy invariance results; the main results are Theorems 3.3.3 and 3.3.7. For simplicity, we assume throughout this section that the base scheme S is the spectrum of a commutative ring R. In general there is a tradeoff between generality of the group G under consideration and the base ring R. 3.1 Reductive group schemes and homogeneous spaces: recollections The goal of this section is to recall some basic definitions and properties of group schemes, torsors and homogeneous spaces over rather general bases. Rather than attempting to be exhaustive, we only aim to point the reader to places in the literature where they can find the required results. The grouping of these results is slightly eclectic: only a very small portion of the definitions and results established here will be used in the remainder of Section 3. Many of the results we state here are significantly easier to establish (or even unnecessary) if the base ring R is a field. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1015 Linear and reductive group schemes We write GLn,R for the general linear group scheme over R and Gm ,R for GL1,R . If R is clear from context, we will drop it from the notation. Definition 3.1.1 By a linear R–group scheme, we mean a group scheme G over R admitting a finitely presented closed immersion group homomorphism G → GLn,R . Later, the homotopy invariance results we establish will require much more stringent hypotheses on G. We use the definition of reductive (resp. semi-simple) R–group scheme of Demazure–Grothendieck [24, Exposé XIX Definition 2.7]: a reductive (resp. semi-simple) R–group scheme is a smooth, affine R–group scheme with geometric fibers that are connected reductive (resp. semi-simple) groups in the usual sense [24, Exposé XIX 1.6], i.e., have trivial unipotent radical (resp. radical). Recall that a reductive R–group scheme G is called split if it contains a split maximal torus [24, Exposé XXII Définition 1.13]. Any split reductive group scheme is pulled back from a unique “Chevalley” group scheme over Spec Z. If R is a field, it is a well-known consequence of the classification of reductive groups that reductive R–group schemes are linear R–group schemes. If R is no longer a field, the connection between “reductive” and “linear” becomes more complicated, as the following example demonstrates. Example 3.1.2 Groups of multiplicative type need not be linear in general [23, Expose IX Définition 1.1]. Indeed, [23, Exposé XI Remarque 4.6] explains that if R is a Noetherian and connected ring, then a group G of multiplicative type admits an embedding in GLn if and only if it is isotrivial. Nevertheless, the following result shows that, assuming suitable hypotheses on the base, reductive R–group schemes are always linear. Proposition 3.1.3 (Thomason) Suppose G is a reductive R –group scheme. Assume one of the following additional hypotheses holds: (i) R is regular and Noetherian; or (ii) G is split. Then G is a linear R –group scheme. Proof If G is split, we can assume that R = Z and in particular that R is regular Noetherian. In that case, the result follows from Thomason [61, Corollary 3.2 (3)]. Geometry & Topology XX (20XX) 1016 Aravind Asok, Marc Hoyois and Matthias Wendt Remark 3.1.4 Thomason actually gives a sufficient condition for a group scheme to admit a closed immersion group homomorphism into the automorphism group scheme of a vector bundle over an arbitrary base S [61, Theorem 3.1]. Since we have in mind applications to homotopy invariance, we have restricted attention to spectra of regular rings. Homogeneous spaces for reductive groups Suppose G is a reductive R–group scheme and λ : Gm → G is a homomorphism of R–group schemes. Via λ, we may consider the Gm –action λ : Gm × G → G defined pointwise by the formula λ(t, g) := λ(t)gλ(t)−1 . We can define a subfunctor PG (λ) ⊂ G consisting of those points g ∈ G such that limt→0 λ(t, g) exists and a sub-functor UG (λ) ⊂ G consisting of those points g ∈ G such that limt→0 λ(t, g) = 1 (see Conrad [21, Theorem 4.1.7] for precise definitions). By [21, Theorem 4.1.7] both of these functors are representable by R–subgroup schemes of G; since we assumed G reductive it follows also that PG (λ) and UG (λ) are smooth and connected. By [21, Example 5.2.2] PG (λ) is parabolic, and UG (λ) is a closed normal R–subgroup scheme whose geometric fibers correspond to unipotent radicals of the geometric fibers of PG (λ) [21, Corollary 5.2.5]; we will abuse terminology and refer to UG (λ) as the unipotent radical of PG (λ). If ZG (λ) is the centralizer of λ, then by [21, Definition 5.4.2] and the subsequent discussion, ZG (λ) is a Levi factor of PG (λ), i.e., ZG (λ) is a smooth reductive R–group scheme, and there is a semi-direct product decomposition of the form ZG (λ)⋉UG (λ) ∼ = PG (λ). This description of parabolics, their unipotent radicals and Levi factors is called a “dynamic” description in [22, 21] (since it arises from a study of “flows” under an action of Gm ). We use these ideas to establish the following result. Lemma 3.1.5 Suppose R is a connected ring, G is a reductive R –group scheme, P ⊂ G is a parabolic R –subgroup scheme and L is a Levi factor of P . The following statements hold. (i) The quotients G/L and G/P exist as smooth R –schemes. (ii) The morphism G → G/L is a generically trivial L –torsor. (iii) The morphism G/L → G/P is a composition of torsors under vector bundles. Proof For later use, we observe that since R is assumed connected and L is presumed to exist, by Gille [30, Théorème 9.3.1], there is a cocharacter λ : Gm → G such that Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1017 P = PG (λ) and L = ZG (λ). If S is the spectrum of a field, which is the case we will use later, the fact that all pairs (P, L) consisting of a parabolic together with a Levi factor, are of the form (PG (λ), ZG (λ)) for a suitable cocharacter λ is contained in [22, Proposition 2.2.9]. For Point (i), begin by observing that since P is a parabolic subgroup of G it is a self-normalizing subgroup [21, Corollary 5.2.8]. The quotients G/L and G/P exist as smooth R–schemes by [21, Theorems 2.3.1 and 2.3.6] (and, by Lemma 2.4.1, the morphisms G → G/L and G → G/P are an L–torsor and a P–torsor, respectively). For Point (ii), set U − = UG (−λ), i.e., the “unipotent radical” of an opposite parabolic. We know that there is a dense open subscheme of G isomorphic to U − × P [21, Theorem 4.1.7] (here and below, we will refer to this as the “big cell”). The image of this open subscheme in G/L, which is isomorphic to U − × P/L, is again open and dense since G → G/L is smooth and surjective. The Levi decomposition yields an isomorphism of schemes P ∼ = L × U , and thus an identification P/L ∼ = U . Under these − identifications, the unit map U → P provides a morphism U × U → U − × L × U , which yields the required generic trivialization. For Point (iii), let U be the unique smooth closed normal R–subgroup scheme of P whose geometric fibers coincide with the unipotent radicals of the geometric fibers of P, which is guaranteed to exist by [21, Corollary 5.2.5]. By the uniqueness assertion, U∼ = UG (λ) for the character whose existence we observed in the first paragraph. By [21, Theorem 5.4.3], U admits a finite descending filtration by AutP/R –stable closed normal smooth R–subgroup schemes Ui with successive subquotients Ui /Ui+1 isomorphic to P–equivariant vector bundles over R. Moreover, the isomorphism P/L ∼ = U described in Point (ii) is actually P–equivariant. Now, the morphism G/L −→ G/P is G–equivariant by definition. The schemetheoretic fiber over the identity coset in G/P is isomorphic to the quotient P/L and ∼ there is an induced G–equivariant isomorphism G ×P P/L → G/L under which the morphism G/L → G/P is sent to the projection onto the first factor. In particular, since P/L ∼ = U is smooth, G × P/L → G is smooth and since smoothness is fppf local on the base [58, Tag 02VL Lemma 34.19.25], we conclude that G/L → G/P is also smooth. By discussion of the previous paragraph, the morphism G/L → G/P thus factors successively through morphisms of the form (3–1) G ×P U/Ui+1 −→ G ×P U/Ui . To finish the proof, it suffices to inductively establish that each morphism in (3–1) is a torsor under a vector bundle. Geometry & Topology XX (20XX) 1018 Aravind Asok, Marc Hoyois and Matthias Wendt Each morphism U/Ui+1 → U/Ui is, by construction, a torsor under the vector bundle Ui /Ui+1 and, as we observed above, provided with a P–equivariant structure. If 1 (X, E ) = H 1 (X, E ) by [58, E is a quasi-coherent sheaf on a scheme X , then Hfppf Zar 1 (X, E ) parameterizes fppf-torsors under Tag 03DR Proposition 34.7.10]. Since Hfppf the quasi-coherent sheaf E , the P–equivariant structure on Ui /Ui+1 allows us to conclude, by fppf-descent, that G ×P Ui /Ui+1 is a torsor under a vector bundle on G/P. In other words, each morphism in (3–1) is again a torsor under the vector bundle Ui /Ui+1 . Remark 3.1.6 A number of remarks are in order. (1) Since R a connected ring, it is not necessary to assume in the statement above that L exists; this follows from Conrad [21, Corollary 5.4.8]. If we were to work over a non-affine base scheme, parabolics need not have Levi factors (see [21, Example 5.4.9] for more details). By reorganizing the proof, the argument presented in Point (iii) actually shows that the quotient G/L exists assuming we know G/P to exist and the relevant results on the structure of U . (2) By Lemma 2.3.3, since L is a smooth R–group scheme by assumption, G → G/L is étale locally trivial. If R is Noetherian and regular, then the morphism G → G/L being generically trivial is tantamount to G → G/L being Nisnevich locally trivial. To prove this, it suffices to show that generically trivial L–torsors over Henselian local rings are trivial. If G is split reductive, then L is as well, and the asserted triviality follows from Białynicki-Birula [17, Proposition 2]. If G is not necessarily split, then L can be an arbitrary reductive group and one can appeal to Nisnevich [47, Théorème 4.5] to deduce the required triviality result (Nisnevich makes a statement for semi-simple group schemes, but it is true more generally, see Fedorov and Panin [28, §1.1]). (3) If G is split, it is possible to use translation of the big cell by elements of the Weyl group to produce an explicit Zariski local trivialization of G → G/L. In fact, even if G is not split, to establish Zariski local triviality of G → G/L (or, equivalently, G → G/P), it suffices to know that the G(R)–translates of the big-cell form an open cover of G/L (or G/P). If R is an infinite field, this kind of result follows from the fact that the image of G(R) in G/P(R) is Zariski dense (via the unirationality of G). (4) In contrast, if R is a finite field (and G is non-split), it is a priori not obvious that G(R) translates of the big cell cover G/L (or G/P). Nevertheless, assuming the Grothendick–Serre conjecture, one knows that G → G/L is Zariski locally trivial. If R is the spectrum of a finite field, the Grothendieck–Serre conjecture Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1019 was established by Gabber for reductive groups coming from the ground field (unpublished), but another proof of a more general case was recently given by Panin [48] (see also [28]). Write SOn for the split special orthogonal group over R. We restrict attention to the case where 2 is a unit in R so we can view SOn as the R–subgroup scheme of GLn consisting of automorphisms of the standard hyperbolic form qn with trivial determinant (see, e.g., Conrad [21, Definition C.1.2]); for more details on special orthogonal groups, see [21, Appendix C]). Lemma 3.1.7 If R is a ring in which 2 is invertible, then the following statements hold. (i) If n ≥ 3 , the quotient SOn /SOn−1 exists and is isomorphic to a quadric hypersurface in AnR defined by the equation qn = 1 . (ii) If n ≥ 3 , the projection morphism SOn → SOn /SOn−1 makes SOn into a Zariski locally trivial SOn−1 –torsor over the quotient. Proof Without loss of generality, we can take R = Z[1/2], which is Noetherian of dimension ≤ 1. Since SOn−1 is a closed R–subgroup scheme of SOn , the quotient SOn /SOn−1 exists as a scheme [1, Théorème 4.C]. To identify this quotient with the quadric in the statement, we proceed as follows. Since SOn−1 = SOn ∩ SLn−1 inside of SLn , the inclusion SOn ⊂ SLn induces a monomorphism SOn /SOn−1 ֒→ SLn /SLn−1 . Note that if A is an R–algebra, the map sending X ∈ SLn (A) to its first row and the first column of its inverse determines an isomorphism SLn /SLn−1 ∼ = Spec R[x1 , . . . , x2n ]/(q2n − 1). If we restrict X ∈ SOn (A) and if J is the symmetric matrix corresponding to the bilinear form associated with qn , then the orthogonality condition imposes the relation X −1 = JX T . Using this observation, it is straightforward to check that the image is isomorphic, in suitable coordinates, to a sub-quadric given by the equation qn = 1. For the second statement, observe that morphisms X → SOn /SOn−1 classify SOn−1 – torsors which are trivial after stabilization to SOn –torsors. The Witt cancellation theorem (see Milnor and Husemoller [41, Lemma 6.3]) implies that, over a local ring in which 2 is invertible, such an SOn−1 –torsor is already trivial. Geometry & Topology XX (20XX) 1020 Aravind Asok, Marc Hoyois and Matthias Wendt 3.2 The local-to-global principle for torsors under linear group schemes In this section we establish a local-to-global principle or “Quillen patching” for torsors under linear R–group schemes in the sense of Definition 3.1.1. The main result of this section is Theorem 3.2.5, which is a multi-variable analog of a result of Quillen [53, Theorem 1] along the lines of Lam [38, Theorem V.1.6]. As will be clear from the presentation, the argument follows quite closely that for projective modules given in [38, Chapter V.1]. That the local-to-global principle holds for torsors under linear group schemes is certainly “well-known to experts”, under suitable hypotheses. For example, Raghunathan [54] states (without proof) that Quillen’s local-to-global principle holds for linear algebraic groups over a field and Bass–Connell–Wright developed an axiomatic method to establish such results [16, Proposition 3.1]; in particular, the latter approach applies for various classical groups [16, Remark 4.15.4] over a general base ring. Nevertheless, since we could not find a suitable published reference for precisely what we needed, in the interest of completeness, we decided to collect the necessary results here. Modifying automorphisms We begin by generalizing [53, Lemma 1] (also [38, Corollary V.1.2]) and [38, Corollary V.1.3] to linear R–group schemes over an arbitrary commutative ring R. The following pair of results are due to Moser [45, Lemmas 3.5.3–3.5.5] (though our hypotheses differ slightly); we include them here for the convenience of the reader. Lemma 3.2.1 Let R be a commutative ring, let G be a linear R –group scheme, let f ∈ R , and let θ(t) ∈ G(Rf [t]) be such that θ(0) = 1 ∈ G(Rf ) . There exists an integer s ≥ 0 such that for any a, b ∈ R with a − b ∈ f s R , there exists ψ ∈ G(R[t]) with ψ(0) = 1 and such that ψf (t) = θ(at)θ(bt)−1 ∈ G(Rf [t]) . Proof Since G is a linear R–group scheme, by definition there is a finitely presented closed immersion G → GLn . For s ∈ N, set ψs (t, x, y) := θ((x + f s y)t)θ(xt)−1 ∈ G(Rf [t, x, y]). It suffices to show that there exists s such that ψs can be lifted to an element ψs ∈ G(R[t, x, y]). Indeed, in that case, by specializing with x = b, a = b + f s α, we see that θ(at)θ(bt)−1 = ψs (t, b, α) lifts as well. By the proof of [53, Lemma 1], we know that there exists s such that ψs (t, x, y) lifts to an element of GLn (R[t, x, y]) and such that ψs (0, x, y) = 1 (see also [38, Theorem V.1.1]). Observe that, by definition, ψs (t, x, 0) = 1 and thus ψs (t, x, 0) ∈ G(R[x, t]). Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1021 It remains to show that there exists i ≥ 0 such that ψs (t, x, f i y) ∈ G(R[t, x, y]). We first recast this in ring-theoretic terms. Set A := R[t, x], let B be the coordinate ring of GLn , and let I ⊂ B be the finitely generated ideal defining G. The lift of ψs is given by a homomorphism ϕ : B → A[y], and we want to show that, for some i ≥ 0, ϕ(−)(f i y) vanishes on I . We claim that, for every r ∈ I , there exists an integer ir such that ϕ(r)(f i y) = 0 for i ≥ ir . If J ⊂ I is a finite generating set and i = maxr∈J ir , then i will have the desired property. Note that ϕ has the following properties: if ev0 : A[y] → A is the evaluation homomorphism, then the composites ev0 ◦ ϕ : B → A and B → A[y] → Af [y] both vanish on I . If r ∈ I and P := φ(r) ∈ A[y], these properties imply that P = yQ for some Q ∈ A[y] and that f ir P = 0 for some ir ≥ 0. Combining these two observations, we have 0 = f ir P = f ir yQ. Therefore, f ir Q = 0 as well. Thus, P(f i y) = f i yQ(f i y) = 0 for all i ≥ ir , which is what we wanted to show. Lemma 3.2.2 Let R be a commutative ring and G a linear R –group scheme. Given f0 , f1 ∈ R such that f0 R + f1 R = R , and θ ∈ G(Rf0 f1 [t]) with θ(0) = 1 , then we can find τi ∈ G(Rfi [t]) with τi (0) = 1 such that θ = τ0 τ1−1 . Proof Let θ(t) ∈ G(Rf0 f1 [t]). We can apply Lemma 3.2.1 to the localizations Rf0 → Rf0 f1 and Rf1 → Rf1 f0 : pick an integer s that suffices for both localizations. For any b ∈ R, we can write θ(t) = [θ(t)θ(bt)−1 ]θ(bt). If f0 R + f1 R = R, then the same thing is true for f0s and f1s . Thus, we can pick b ∈ f1s R such that 1 − b ∈ f0s R. In that case, θ(t)θ(bt)−1 ∈ G(Rf1 [t])f0 and θ(bt) ∈ G(Rf0 [t])f1 lift to elements τ1 and τ0 with the stated properties. Remark 3.2.3 Lemma 3.2.1 implies “Axiom Q” (in the sense of Bass, Connell, and Wright [16, §1.1]) holds for the functor on R–algebras determined by G. Lemma 3.2.2 essentially corresponds to [16, Theorem 2.4]. The local-to-global principle Let R be a commutative ring and suppose G is a linear R–group scheme. If A is a commutative R–algebra, by a G–torsor over A we will mean a G–torsor over Spec A; by assumption our G–torsors are locally trivial in the fppf-topology (see Definition 2.3.1 and the discussion just prior to Lemma 2.3.3 for more details). A G–torsor over A[t1 , . . . , tn ] that is pulled back from a G–torsor over A will be called Geometry & Topology XX (20XX) 1022 Aravind Asok, Marc Hoyois and Matthias Wendt extended from A. For the remainder of this section, we will essentially confine our attention to a fixed G–torsor P , which will be important for subsequent applications. Proposition 3.2.4 Let R be a commutative ring. If P is a G –torsor over R[t] , then the set Q(P) consisting of g ∈ R such that P|Spec Rg [t] is extended from Rg is an ideal in R . Proof It is immediate that Q(P) is closed under multiplication by elements in R. Thus, we have to show that if f0 , f1 ∈ Q(P), then f = f0 + f1 lies in Q(P) as well. After replacing R by Rf , we can assume that f0 R + f1 R = R. Write 0 : Spec R → A1R , and pr : A1R → Spec R for the zero section and the structure morphism. Thus, suppose P is a G–torsor over R[t] and assume that the restrictions Pi := P|Spec Rfi [t] are extended. We want to show that P ∼ = pr∗ 0∗ P . ∼ pr∗ 0∗ Pi over Rf [t]. By modifying By assumption, there are isomorphisms ui : Pi = i ui if necessary, we may assume that 0∗ ui = 1. Let P01 be the restriction of P to Rf0 f1 [t]. Then u0 and u1 restrict to give two isomorphisms (u0 )f1 , (u1 )f0 : P01 ∼ = ∈ G(R [t]), then there is a commutative pr∗ 0∗ P01 . If we set θ = (u1 )f0 (u0 )−1 f f 0 1 f1 diagram of the form P0 o u0  pr∗ 0∗ P0 o s ss ss s s yss (u0 )f1 pr∗ 0∗ P01 P01 ❑ θ ❑❑ (u1 )f ❑❑ 0 ❑❑ ❑❑ % / pr∗ 0∗ P01 / P1 u1  / pr∗ 0∗ P1 . If θ is the identity, then by fppf descent for G–torsors, the isomorphisms u0 and u1 glue to give an isomorphism P ∼ = pr∗ 0∗ P , as desired. If not, since 0∗ ui = 1, we see that θ restricts along t = 0 to the identity. Then, Lemma 3.2.2 guarantees that we can find τi ∈ G(Rfi [t]) such that τi (0) = 1 and such that θ = τ0 τ1−1 . Thus, (τ0 u0 )f1 = (τ1 u1 )f0 and replacing u0 by τ0 u0 and u1 by τ1 u1 , we can glue these isomorphisms to conclude that P is extended. Theorem 3.2.5 (Local-to-global principle) Let R be a commutative ring and suppose G is a linear R –group scheme. If P is a G –torsor over R[t1 , . . . , tn ] , then (An ) the set Q(P) consisting of g ∈ R such that P|Spec Rg [t1 ,...,tn ] is extended from Rg is an ideal in R . (Bn ) If P|Spec Rm [t1 ,...,tn ] is extended for every maximal ideal m ⊂ R , then P is extended. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1023 Proof We know that (A1 ) holds by Proposition 3.2.4. We show (An ) =⇒ (Bn ). It suffices to check that for P satisfying the conditions in (Bn ) that the ideal Q(P) is the unit ideal in R. To this end, let P|0 be the pullback of P along the zero section Spec R → Spec R[t1 , . . . , tn ] and let P ′ be the pullback of P|0 along the structure map Spec R[t1 , . . . , tn ] → Spec R. For any maximal ideal m ⊂ R, since P|Spec Rm [t1 ,...,tn ] is by assumption extended, we ∼ know there is an isomorphism ϕ : P|Spec Rm [t1 ,...,tn ] → P ′ |Spec Rm [t1 ,...,tn ] . Since G– torsors over affine bases are of finite presentation under our hypotheses by Lemma 2.3.3, there exists g ∈ R \ m such that ϕ is the localization of an isomorphism of torsors over Spec Rg [t1 , . . . , tn ]. It follows that g ∈ Q(P) \ m and therefore that Q(P) is not contained in m, i.e., Q(P) = R. We show (A1 ) =⇒ (An ). We proceed by induction on n. Assume therefore that (An−1 ) holds. By the conclusion of the previous step, this means (Bn−1 ) holds as well. Form the set Q(P) as in (An ). It is straightforward to check that R · Q(P) ⊂ Q(P) and therefore it suffices to show that if f0 , f1 ∈ Q(P), then f0 + f1 ∈ Q(P) as well. Write f = f0 + f1 . Consider the quotient map R[t1 , . . . , tn ] → R[t1 , . . . , tn−1 ] and set P|tn =0 to be the restriction of P under the corresponding morphism of schemes. Likewise, write P|0 for the restriction of P along the zero section as in the previous step. Applying (A1 ) to the map R[t1 , . . . , tn−1 ] → R[t1 , . . . , tn−1 ][tn ], we conclude that Pf is extended from (P|tn =0 )f . We claim that (P|tn =0 )f is itself extended from Rf . If that is the case, then Pf is extended and so f ∈ Q(P). Since (Bn−1 ) holds, it suffices to show that (P|tn =0 )f is extended upon restriction to every maximal ideal m ∈ Rf . Write m = pf where p is the pre-image of m under the localization map R → Rf . Since f ∈ / p it follows that either f0 or f1 is not in p; without loss of generality, we can assume that f0 ∈ / p. By assumption, however, Pf0 is extended from (P0 )f0 so we conclude that the restriction of (P|tn =0 )f to the maximal ideal m is extended from (P0 )p , which is what we wanted to show. Corollary 3.2.6 Let G be a reductive R –group scheme. If R is regular Noetherian or G is split, then the local-to-global principle holds for G –torsors, i.e., a G –torsor over R[t1 , . . . , tn ] is extended from R if and only if for every maximal ideal m ⊂ R , the G –torsor on Rm [t1 , . . . , tn ] obtained by restriction is extended from Rm . Proof Combine Proposition 3.1.3 and Theorem 3.2.5. Geometry & Topology XX (20XX) 1024 Aravind Asok, Marc Hoyois and Matthias Wendt 3.3 Affine homotopy invariance for G–torsors Let G be a smooth linear R–group scheme. In this section, we analyze when the pullback map 1 1 HNis (X, G) −→ HNis (X × A1 , G) is a bijection for X a smooth affine R–scheme. Special linear groups We begin by recalling some facts about oriented vector bundles over schemes. If X is a scheme, then recall that an oriented vector bundle on X is a pair (E , ϕ) consisting ∼ of a vector bundle E on X equipped with an isomorphism ϕ : det E → OX . There is a standard equivalence between the groupoid of oriented vector bundles on X and that of SLn –torsors over X . Write Vno (X) for the set of isomorphism classes of rank n oriented vector bundles on X . Theorem 3.3.1 (Special linear homotopy invariance) Fix an integer n ≥ 1 and suppose R is a ring such that, for every maximal ideal m ⊂ R , Rm is ind-smooth over a Dedekind ring with perfect residue fields (for example, Rm is Noetherian and regular over such a Dedekind ring). For every integer m ≥ 0 , the map Vno (Spec R) −→ Vno (Spec R[t1 , . . . , tm ]) is a bijection. Proof By [9, Theorem 5.2.1], every vector bundle on Spec R[t1 , . . . , tm ] is pulled back from a vector bundle on Spec R. In particular, every oriented vector bundle on Spec R[t1 , . . . , tm ] is pulled back from a vector bundle on Spec R with trivial determinant. It remains to show that every automorphism of the trivial line bundle on Spec R[t1 , . . . , tm ] is extended from Spec R. In other words, we must show that the inclusion map R → R[t1 , . . . , tm ] induces an isomorphism on unit groups. Observe that our assumptions guarantee that Rm is reduced for every maximal ideal m ⊂ R, and therefore R must itself be reduced. Since R is reduced, the fact that R → R[t1 , . . . , tm ] induces an isomorphism on unit groups follows from a straightforward induction argument, using the elementary observation that if A is a reduced commutative ring, then the map A → A[t] induces an isomorphism A× → A[t]× . Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1025 Remark 3.3.2 In [43, Definition 4.3], Morel defines an orientation on a vector bundle E to be an isomorphism between det E and the square of a line bundle. Oriented vector bundles in this sense correspond to torsors under the metalinear group MLn defined by the pullback square / Gm MLn 2   GLn det / Gm . This more general notion of orientation is very natural in Morel’s theory of the Euler class, since the latter only depends on an orientation in this sense. Theorem 3.3.1 is also true for MLn –torsors instead of SLn –torsors, with a very similar proof. Symplectic groups We refer the reader to Knus [36, §I.4] for more details about symplectic spaces over rings; we briefly fix notations in the scheme-theoretic context. If X is a scheme and B is a quasi-coherent sheaf on X , an alternating bilinear form on B is a morphism of quasicoherent sheaves ϕ : B ⊗OX B → OX such that ϕ ◦ ∆ = 0, where ∆ : B → B ⊗OX B is the (nonlinear) diagonal map. If (B, ϕ) is a quasi-coherent sheaf equipped with an alternating bilinear form, then we will say that ϕ is non-degenerate if ϕ induces an isomorphism B → B ∨ := HomOX (B, OX ). By a symplectic bundle (of rank 2n) we will mean a pair (B, ϕ) consisting of a (rank 2n) vector bundle B on X equipped with a non-degenerate alternating bilinear form ϕ. Write H V 2n (X) for the set of isomorphism classes of rank 2n symplectic bundles on X . We briefly recall the standard equivalence between the groupoid of symplectic vector bundles and that of Sp2n –torsors on X . In one direction, send a symplectic vector bundle (B, ϕ) to its bundle of “symplectic frames”; by [36, Proposition I.4.1.4] this construction yields an fppf torsor under Sp2n . In the other direction, given an Sp2n – torsor P on X , consider the vector bundle associated with the standard 2n–dimensional representation of Sp2n , which comes equipped with a reduction of structure group to Sp2n , i.e., an alternating form on the bundle. By [36, Corollary 4.1.2] any symplectic bundle on a scheme X is Zariski locally on X isometric to the hyperbolic space of a trivial vector bundle [36, I.3.5]. Combining these observations, we see that Sp2n – torsors are Zariski locally trivial and that there is an equivalence between the groupoid of symplectic vector bundles over X and that of Nisnevich locally trivial Sp2n –torsors (as mentioned in Example 2.3.4). Geometry & Topology XX (20XX) 1026 Aravind Asok, Marc Hoyois and Matthias Wendt Theorem 3.3.3 (Symplectic homotopy invariance) Fix an integer n ≥ 1 and suppose R is a ring such that, for every maximal ideal m ⊂ R , Rm is ind-smooth over a Dedekind ring with perfect residue fields (for example, Rm is Noetherian and regular over such a Dedekind ring). For every integer m ≥ 0 , the map H V 2n (Spec R) −→ H V 2n (Spec R[t1 , . . . , tm ]) is a bijection. Proof For any integer n ≥ 1, the group Sp2n is a split reductive R–group scheme (and, by definition, linear). Therefore, applying Theorem 3.2.5, it suffices to demonstrate the result with R replaced by Rm . Since Rm is local, every finitely generated projective module over Rm is free. By the assumption on R and [9, Theorem 5.2.1], we know that, for any integer m, every finitely generated projective Rm [t1 , . . . , tm ]–module is free. Applying [36, Corollary I.4.1.2], we conclude that every symplectic space over Rm [t1 , . . . , tm ] is isometric to the hyperbolic space of a free module. In particular, every symplectic space over Rm [t1 , . . . , tm ] is extended from Rm . A formalism for homotopy invariance We recall a formalism introduced by Colliot-Thélène–Ojanguren; the following result is a slight extension of [20, Théorème 1.1]. Proposition 3.3.4 Fix an infinite base field k . Suppose F is a functor from the category of k –algebras to the category of pointed sets with the following properties: P1 The functor F commutes with filtered inductive limits of rings with flat transition morphisms. P2 For every extension field L/k and every integer n ≥ 0 , the restriction map F(L[t1 , . . . , tn ]) −→ F(L(t1 , . . . , tn )) has trivial kernel. P3 The functor F has weak affine Nisnevich excision, i.e., for any smooth k –algebra A , any étale A –algebra B , and any element f ∈ A such that A/fA ∼ = B/fB the map ker(F(A) → F(Af )) −→ ker(F(B) −→ F(Bf )) is a surjection. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1027 If B is the localization of a smooth k –algebra at a maximal ideal, then, setting KB = Frac(B) , for any integer n ≥ 0 the restriction map F(B[t1 , . . . , tn ]) −→ F(KB (t1 , . . . , tn )) has trivial kernel. Proof Set d := dim B and write m for the maximal ideal of B. Suppose that ξ0 ∈ ker(F(B[t1 , . . . , tn ]) −→ F(KB (t1 , . . . , tn ))). Let ξ be the image of ξ0 in F(KB [t1 , . . . , tn ]). Then, by assumption, ξ lies in the kernel of F(KB [t1 , . . . , tn ]) → F(KB (t1 , . . . , tn )). By P2, we conclude that ξ is trivial. By using P1, we conclude that there is an element g ∈ m \ 0 such that ξ0 restricts trivially to F(Bg [t1 , . . . , tn ]). Then, by Knus [36, Corollary VIII.3.2.5], there exist a polynomial ring L[x1 , . . . , xd ], a maximal ideal n ⊂ L[x1 , . . . , xd ], a local essentially étale morphism ϕ : A → B (where A = L[x1 , . . . , xd ]n ), and an element f ∈ m such that ϕ(f ) = ∼ ug for u a unit in Bm and ϕ induces an isomorphism A/fA → B/gB. By P3, we conclude that there exists an element ξ0′ ∈ ker(F(A[t1 , . . . , tn ]) → F(Af [t1 , . . . , tn ])) mapping to ξ0 . However, ξ0′ is also evidently in ker(F(A[t1 , . . . , tn ]) → F(KA (t1 , . . . , tn ))). Thus, it suffices to establish the result in the case where B is the localization of a polynomial ring at a maximal ideal, which is precisely [20, Proposition 1.5]. Isotropic reductive groups If k is a field, a reductive k–group scheme will be called anisotropic if it contains no k–subgroup isomorphic to Gm . We take the following definition for isotropic reductive k–group, but we caution the reader that our definition differs from that of Borel [18, Definition V.20.1]; we choose this definition because it better suits our eventual applications. Definition 3.3.5 If k is a field, a reductive k–group scheme G will be called isotropic if each of the almost k–simple components of the derived group of G contains a k–subgroup scheme isomorphic to Gm . Remark 3.3.6 See Borel [18, §V.20] or Gille [30, §9.1] for further discussion of isotropic reductive groups. In general, the existence of a non-central split multiplicative k–subgroup is equivalent to the existence of a parabolic k–subgroup by the dynamic construction described just before Lemma 3.1.5. In particular, isotropic reductive k–groups admit proper parabolic subgroups. Geometry & Topology XX (20XX) 1028 Aravind Asok, Marc Hoyois and Matthias Wendt Theorem 3.3.7 If k is an infinite field, and G is an isotropic reductive k –group (see Definition 3.3.5), then for any smooth k –algebra A and any integer n ≥ 0 , the map 1 1 HNis (Spec A, G) −→ HNis (Spec A[t1 , . . . , tn ], G) is a bijection. Proof We have to show that every Nisnevich locally trivial G–torsor P over A[t1 , . . . , tn ] is extended from A. After Corollary 3.2.6, it suffices to show that, for every maximal ideal m of A, the G–torsor Pm over Am [t1 , . . . , tn ] is extended from Am ; we will show that in fact Pm is trivial. 1 (Spec A, G) from k–algebras to pointed sets satisWe claim that the functor A 7→ HNis fies the axioms P1 − P3 of Proposition 3.3.4. Axiom P1 is a consequence of our finite presentation hypotheses by way of Lemma 2.3.3. Axiom P2 uses the hypothesis that G is isotropic and follows from [20, Proposition 2.4 and Theorem 2.5] (note that our definition of isotropic reductive k–group coincides with that used in [20, §2 p. 103]). Axiom 1 (−, G) ∼ π (BTors (G)) where P3 is a formal consequence of the fact that HNis = 0 Nis BTorsNis (G) satisfies affine Nisnevich excision (see Section 2.3). By the conclusion of Proposition 3.3.4, it suffices to show Pm becomes trivial over Frac(Am )(t1 , . . . , tn ), but this follows immediately from the fact that a field has no nontrivial Nisnevich covering sieves. Remark 3.3.8 At least if k is an infinite perfect field, Theorem 3.3.7 admits a converse: 1 (−, G) is A1 –invariant on Smaff , then G if G is a reductive k–group such that HNis k is isotropic, see Balwe and Sawant [14, Theorem 1]. In fact, for G reductive, the following three conditions are equivalent: (i) G is isotropic (in the sense of Definition 3.3.5); 1 (−, G) is A1 –invariant on smooth affine k–schemes; (ii) HNis 1 (iii) RNis SingA G is A1 –invariant. The implication (i) ⇒ (ii) is Theorem 3.3.7, (ii) ⇒ (iii) is a special case of Theorem 2.4.2, and (iii) ⇒ (i) is [14, Theorem 4.7]. 4 Applications In this section, we collect a number of applications of the results established so far. Section 4.1 discusses representability results for Nisnevich locally trivial torsors. As Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1029 mentioned in Remark 3, that representability results should hold for torsors under SLn and Sp2n was observed by Schlichting [56, Remark 6.23]; we simply observe in these cases that the expected classical geometric objects yield models for the representing spaces. In Section 4.2 we establish that for various classes of homogeneous spaces for reductive groups applying the singular construction produces an A1 –local space. Section 4.3 establishes strong A1 –invariance of homotopy sheaves of the singular construction of a reductive group under suitable additional hypotheses. Finally, Section 4.4 studies a purely algebraic problem using our techniques, namely nilpotence of non-stable K1 –functors. 4.1 Affine representability results for torsors Let Grn,n+N be the usual Grassmannian parameterizing n–dimensional subspaces of an f n,n+N be the complement of the zero section (n + N)–dimensional vector space. Let Gr in the total space of the determinant of the tautological vector bundle on Grn,n+N . The f n,n+N parameterizes rank n subspaces of the (n + N)–dimensional vector space Gr fn := space equipped with a specified trivialization of their determinant. We set Gr f colimN Grn,n+N where the transition maps are the same as those in the definition Grn . With these definitions, we can establish a geometric representability result for oriented vector bundles. Theorem 4.1.1 Suppose k is ind-smooth over a Dedekind ring with perfect residue fields. Then, for any X ∈ Smaff k , and any integer n ≥ 1 , there is a bijection f n ]A1 Vno (X) ∼ = [X, Gr that is functorial in X . Proof Recall from Example 2.3.4 and the discussion preceding Theorem 3.3.1 that, 1 (X, SL ). for any integer n ≥ 1, there is a functorial bijection of the form Vno (X) ∼ = HNis n Combining Theorems 2.3.5 and 3.3.1, we conclude that, under the stated hypotheses 1 (X, SL ) ∼ [X, BSL ] . on k, for any smooth affine k–scheme X , HNis n = n A1 Using the notation of Morel and Voevodsky [44, §4.2], the space Bgm (SLn , i) (attached fn . Therefore to the defining inclusion i : SLn ֒→ GLn ) is precisely the space Gr combining the results of [44, §4.2], and using the fact that all SLn –torsors are Zariski f n → BSLn classifying (and thus Nisnevich) locally trivial we conclude that the map Gr 1 fn is an A –weak equivalence. the universal SLn –torsor over Gr Geometry & Topology XX (20XX) 1030 Aravind Asok, Marc Hoyois and Matthias Wendt If we let H be the standard 2–dimensional hyperbolic space, then we can consider the symplectic vector space H⊕N . Panin and Walter construct a scheme HGrn,n+N that parameterizes rank 2n symplectic subspaces of H⊕(n+N) and we set HGrn := colimN HGrn,n+N [50]. Alternatively, HGr can be described as the colimit colimN Sp2(n+N) /(Sp2n × Sp2N ). Using these definitions, we are now able to establish a geometric representability theorem for symplectic vector bundles. Theorem 4.1.2 Suppose k is ind-smooth over a Dedekind ring with perfect residue fields. Then, for any X ∈ Smaff k , there is a bijection H V 2n (X) ∼ = [X, HGrn ]A1 that is functorial in X . Proof Proceeding as in the proof of Theorem 4.1.1, we combine Example 2.3.4 and the discussion preceding Theorem 3.3.3 to conclude that there is a functorial bijection 1 (X, Sp ). Combining Theorems 2.3.5 and 3.3.3, we of the form H V 2n (X) ∼ = HNis 2n conclude that, under the stated hypotheses on k, for any smooth affine k–scheme 1 (X, Sp ) ∼ [X, BSp ] . Finally, by the proof of [49, Theorem 8.2], we X , HNis 2n = 2n A1 can conclude that HGrn is A1 –weakly equivalent to BSp2n , and thus for any smooth k–scheme X , [X, HGrn ]A1 ∼ = [X, BSp2n ]A1 . We now establish Theorem 1. Theorem 4.1.3 Suppose k is an infinite field, and G is an isotropic reductive k –group (see Definition 3.3.5). For any smooth affine k –scheme X , there is a functorial bijection 1 HNis (X, G) ∼ = [X, BG]A1 . Proof Combine Theorems 2.3.5 and 3.3.7. Remark 4.1.4 In Theorem 4.1.3, the isotropy condition on G cannot be weakened, cf. Remark 3.3.8. 4.2 Affine representability results for some homogeneous spaces P Let Q2n−1 be the smooth affine quadric over Z defined by i xi yi = 1. There is a ∼ standard identification SLn /SLn−1 → Q2n−1 . Let Q2n be the smooth affine quadric P over Z defined by i xi yi = z(z + 1) (in Asok–Doran–Fasel [4], it is shown that Q2n Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1031 ∧n is A1 –weakly equivalent to P1 over Spec Z). In particular, there are isomorphisms Q2 ∼ = SL2 /Gm and Q4 ∼ = Sp4 /(Sp2 × Sp2 ) over Spec Z. If R is a ring in which 2 is invertible, then Q2n is isomorphic over R to the quadric defined by the standard P 2 hyperbolic form i xi yi + z = 1. It then follows from Lemma 3.1.7 that Q2n is isomorphic over R to the homogeneous space SO2n+1 /SO2n . Theorem 4.2.1 If R is a ring that is ind-smooth over a Dedekind ring with perfect residue fields, then Q2n−1 is A1 –naive. In particular, for any smooth affine R –scheme X , there is a functorial bijection ∼ 1 π0 (SingA Q2n−1 )(X) −→ [X, Q2n−1 ]A1 . Proof The scheme Q2n−1 is isomorphic over Spec Z to the homogeneous space GLn /GLn−1 . Since all torsors for GLn−1 are Zariski locally trivial, it follows that GLn → Q2n−1 is Zariski locally trivial (in fact, one can just write down an explicit trivialization). Using [9, Theorem 5.2.1] we may apply Theorem 2.4.2 to conclude. Theorem 4.2.2 If either (a) n ≤ 2 , and R is a ring that is ind-smooth over a Dedekind ring with perfect residue fields, or (b) n ≥ 3 and R is an infinite field having characteristic unequal to 2 , then Q2n is A1 –naive. In particular, under either set of hypotheses, for any smooth affine R –scheme X , there is a functorial bijection 1 ∼ π0 (SingA Q2n )(X) −→ [X, Q2n ]A1 . Proof For n = 1 consider the identification Q2 ∼ = SL2 /Gm . Affine homotopy invariance holds for Gm –torsors over an arbitrary regular base, and for torsors under SL2 ∼ = Sp2 by assumption. The result follows immediately from Theorem 2.4.2. Similarly, for n = 2 consider the identification Q4 ∼ = Sp4 /(Sp2 × Sp2 ). Again, by assumption we may combine Theorems 3.3.3 and 2.4.2 to conclude. For n ≥ 3 we proceed slightly differently. The SO2n –torsor SO2n+1 → Q2n is still Zariski locally trivial by Lemma 3.1.7. Since SOm is split for m ≥ 3, we may apply 1 (−, SO ) is A1 –invariant on Smaff for any integer Theorem 3.3.7 to conclude that HNis m R m ≥ 3. Then, we apply Theorem 2.4.2 to conclude. Remark 4.2.3 If X = Spec A, then a map f : X → Q2n yields an ideal I ⊂ A and a surjection ω : (A/I)⊕n → I/I 2 ; the ideal I is the ideal generated by the images of x1 , . . . , xn , z in the coordinate presentation of the quadric. The class of f 1 in π0 (SingA Q2n )(X) depends only on the pair (I, ω) and is called the “Segre class” of (I, ω), see Fasel [27, Theorem 2.0.2]. When X is smooth over an infinite field, the Segre class provides an obstruction to lifting ω to a surjection A⊕n → I [27, Theorem 3.2.8]. Geometry & Topology XX (20XX) 1032 Aravind Asok, Marc Hoyois and Matthias Wendt Zariski fiber bundles with affine space fibers If F is a fixed S–scheme, we will say that an S–morphism π : E → B is a Zariski fiber bundle of S–schemes with fibers isomorphic to F if there exist an S–scheme U , a ∼ Zariski covering morphism U → B and an isomorphism ϕ : U ×B E → U ×S F over U . The following result, which generalizes a result of Morel [43, Theorem 8.9(2)], applies to affine vector bundle torsors (a.k.a. Jouanolou–Thomason devices, see Weibel [63, Definition 4.2 and Proposition 4.4]). Lemma 4.2.4 Suppose B ∈ SmS , and π : E → B is a Zariski fiber bundle of S – schemes with fibers isomorphic to AnS . For any X = Spec R ∈ Smaff S , the induced map 1 1 SingA E(X) −→ SingA B(X) is an acyclic Kan fibration. Moreover, E is A1 –naive if and only if B is A1 –naive. Proof By Goerss and Jardine [31, Theorem I.11.2], it suffices to show that for any integer n ≥ 0, given a diagram of the form ∂∆nR /E   π ∆nR /B there is a morphism ∆nR → E making both resulting triangles commute. Given a diagram as above, there is an induced map ∂∆nR → ∆nR ×B E . By the assumption on π , the pullback π ′ : ∆nR ×B E → ∆nR makes the ring of functions on ∆nR ×B E into a locally polynomial algebra over R[t1 , . . . , tn ] in the sense of Bass– Connell–Wright [16, Theorem 4.4]. Therefore, by [16, Theorem 4.4] we conclude that π ′ is a geometric vector bundle over ∆nR , i.e., the spectrum of a symmetric algebra over ∆nR . Now, if E → ∆nR is a geometric vector bundle, then the inclusion map ∂∆nR → ∆nR induces a surjective map Hom(∆nR , E ) → Hom(∂∆nR , E ). Therefore, the lift we hoped to construct is guaranteed to exist. For the second statement, let Ẽ and B̃ be Nisnevich-local A1 –invariant replacements of E and B, respectively, and consider the commutative square of simplicial presheaves 1 SingA E / Ẽ   / B̃. 1 SingA B Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1033 Since the left vertical map is a weak equivalence on affines, the right vertical map is a weak equivalence. It follows that the upper horizontal map is a weak equivalence on affines if and only if the lower horizontal map is. Example 4.2.5 If X ∈ Smaff S is an affine scheme, then any finitely presented Zariski fiber bundle of S–schemes π : E → X with fibers isomorphic to affine spaces is actually a vector bundle by the result of Bass–Connell–Wright mentioned above [16]; this result was obtained independently by Suslin [60]. On the other hand, if X is not affine, then even if π admits a section, it may not be isomorphic to a vector bundle: see Iarrobino [34, Theorem 1] for an example with X = P1 . Homogeneous spaces with non-reductive stabilizers The following result extends and simplifies the proof of a theorem of Morel [43, Theorem 8.9] (in particular, we allow the case n = 2). Corollary 4.2.6 If R is a ring that is ind-smooth over a Dedekind ring with perfect residue fields, then An \ 0 is A1 –naive. In particular, for any smooth affine R –scheme X , there is a canonical bijection 1 ∼ π0 SingA (An \ 0)(X) −→ [X, An \ 0]A1 . Proof The map SLn → An \ 0 given by “projection onto the first column” factors through a map SLn /SLn−1 → An \ 0; this map is a Zariski fiber bundle with fibers isomorphic to affine spaces. By Lemma 4.2.4, it suffices to show that SLn /SLn−1 is A1 – naive. This follows from Theorem 4.2.1 via the standard isomorphism SLn /SLn−1 ∼ = Q2n−1 (send a matrix in SLn to the first row and first column of its inverse). Lemma 4.2.7 Let X be a simplicial set and k ≥ 0 . If X has the right lifting property with respect to the inclusion ∂∆m ⊂ ∆m for every m ≤ k + 1 , then X is k –connected. Proof A simplicial set X is k–connected if and only if the Kan complex coskk+1 Ex∞ X is contractible, or equivalently has the right lifting property with respect to ∂∆m ⊂ ∆m for all m. By adjunction, this is the case if and only if Ex∞ X has the right lifting property with respect to ∂∆m ⊂ ∆m for m ≤ k + 1. By definition of Ex∞ , it suffices to show that X itself has the right lifting property with respect to sdr (∂∆m ) ⊂ sdr (∆m ) for all r and all m ≤ k + 1. In fact, X has the right lifting property with respect to any monomorphism between (k + 1)–skeletal simplicial sets, since such a monomorphism is a transfinite composition of pushouts of ∂∆m ⊂ ∆m for m ≤ k + 1. Geometry & Topology XX (20XX) 1034 Aravind Asok, Marc Hoyois and Matthias Wendt Proposition 4.2.8 Let n, k ≥ 0 and let R be a commutative ring such that the Bass 1 stable range of R[t0 , . . . , tk ] is at most n . Then the simplicial set SingA (An \0)(R) is k – 1 connected. In particular, if R is Noetherian of Krull dimension d , then SingA (An \0)(R) is (n − d − 2) –connected. Proof By Lemma 4.2.7, it suffices to show that the map m Umn (∆m R ) → Umn (∂∆R ) is surjective for all m ≤ k+1, where Umn (X) = Hom(X, An \0) is the set of unimodular rows of length n in O(X). By assumption, the Bass stable range of ∆k+1 is at most n. It R m follows that the Bass stable range of ∆R is at most n, for all m ≤ k + 1. Now the result is a special case of the following more general statement, which follows easily from the definition of Bass stable range: if X is an affine scheme of Bass stable range ≤ n and Y ⊂ X is a finitely presented closed subscheme, then the map Umn (X) → Umn (Y) is surjective. 1 Remark 4.2.9 Under the assumption of Corollary 4.2.6, if n ≥ 3, the set π0 SingA (An \ 0)(X) has a concrete description due to Fasel [26, Theorem 2.1]. Indeed, it is the quotient of the set Umn (X) of unimodular rows of length n by the action of the subgroup En (X) ⊂ SLn (X) generated by elementary shearing matrices. In loc. cit., it is assumed that R is a field, but the proof works more generally using a result of Lindel–Popescu [52, Proposition 2.1]. Taking X = Q2n−1 , we obtain a bijection [An \ 0, An \ 0]A1 ∼ = Umn (Q2n−1 )/En (Q2n−1 ). 1 By Corollary 4.2.6, we have [S1 , An \ 0]A1 ,∗ ∼ = π1 SingA (An \ 0)(R), and Proposition 4.2.8 shows that this group is trivial if n is at least the Bass stable range of R[t0 , t1 ]. In that case, we may therefore identify [An \ 0, An \ 0]A1 with the set of maps in the pointed A1 –homotopy category. Note that colimn [An \ 0, An \ 0]A1 ,∗ is the set of endomorphisms of the motivic sphere spectrum over the ring R. The following result is Theorem 4. Theorem 4.2.10 If k is an infinite field, G is an isotropic reductive k –group (see Definition 3.3.5) and P ⊂ G is a parabolic k –subgroup possessing an isotropic Levi factor (e.g., if G is split), then G/P is A1 –naive. In particular, for any smooth affine k –scheme X , there is a functorial bijection 1 ∼ π0 (SingA G/P)(X) −→ [X, G/P]A1 . Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1035 Remark 4.2.11 Given a reductive k–group and a non-trivial parabolic subgroup P ⊂ G, it is not obvious that P has a Levi factor. Nevertheless, as mentioned in Remark 3.1.6, our hypotheses guarantee that P has a Levi factor. If L is a Levi factor for P, then L may itself be anisotropic. Proof Lemma 3.1.5(ii) implies that G → G/L is generically trivial. Since k is assumed infinite and L is reductive, we claim G → G/L is actually Zariski locally trivial. An elementary argument for Zariski local triviality of G → G/L sketched in Remark 3.1.6(2), but alternatively we can use [20, Théorème 2.1], to which, momentarily, implicit appeal will be made. By Theorem 2.4.2, whose hypotheses hold by Theorem 3.3.7, we conclude that G/L is A1 –naive. By Lemma 3.1.5(iii), G/L → G/P is a composition of Zariski fiber bundles with affine space fibers. Hence, G/P is also A1 –naive by Lemma 4.2.4. The above result can be significantly strengthened at the expense of further restrictions on the groups under consideration. Theorem 4.2.12 Suppose R is ind-smooth over a Dedekind ring with perfect residue fields (for example, R is Noetherian and regular over such a Dedekind ring). If G ∼ = GLn 1 or Sp2n , and if P ⊂ G is a standard parabolic subgroup, then G/P is A –naive. In particular, for any smooth affine R –scheme X , there is a functorial bijection 1 ∼ π0 (SingA G/P)(X) −→ [X, G/P]A1 . Proof Assume first that R = Z. If P ⊂ G is a standard parabolic with Levi factor L, then L is itself a special group in the sense of Grothendieck–Serre, i.e., all étale locally trivial torsors are Zariski locally trivial. Thus, the map G → G/L in Lemma 3.1.5(ii) is automatically Zariski locally trivial. One sees that the map G/L → G/P is a Zariski fiber bundle with affine space fibers by combining Lemma 3.1.5(iii) with the fact that all finitely generated projective Z–modules are free. By extending scalars to R, it follows that corresponding statements hold for the resulting group scheme over R. With these modifications, the proof is essentially identical to that of Theorem 4.2.10; however, instead of appealing to Theorem 3.3.7, we use Theorem 3.3.3 or [9, Theorem 5.2.1] to establish the necessary homotopy invariance statement. Example 4.2.13 Theorem 4.2.12 applies if P ⊂ GLn is a maximal parabolic subgroup, in which case G/P ∼ = Grm,n for some integer m ≤ n. Geometry & Topology XX (20XX) 1036 Aravind Asok, Marc Hoyois and Matthias Wendt 4.3 Affine representability for non-stable K-theory and strong A1 –invariance results Suppose G is a smooth linear R–group scheme. For any integer i ≥ 1, one can define Karoubi–Villamayor-style non-stable K-theory functors attached to G by means of the formula: 1 G KVi+1 (U) := πi (SingA G)(U) In this form, the definition goes back to Jardine [35, Theorem 3.8], but had precursors in the work of Krusemeyer [37, §3]; see Wendt [64] for a more detailed analysis of such functors in the context of A1 –homotopy theory. As a straightforward application of our results, we obtain A1 –representability results for non-stable KV –functors. Theorem 4.3.1 If k is an infinite field, and G is an isotropic reductive k –group (in the sense of Definition 3.3.5), then G is A1 –naive. In particular, for any smooth affine k –scheme U , there are canonical isomorphisms G KVi+1 (U) ∼ = [Si ∧ U+ , G]A1 ,∗ . Proof Apply Theorem 2.4.2 with H = e (hypotheses being satisfied by Theorem 3.3.7). Remark 4.3.2 Results such as the above were studied initially by Morel [43, Theorem 8.1] and Moser [46] (see also [65, Theorem 5.3]) for G a general split group, and by the third author and K Völkel in the isotropic reductive case [62]. These results depend crucially on first establishing homotopy invariance for non-stable K1 –functors via “elementary matrix” techniques. As a consequence these proofs do not easily extend to the important case where G has semi-simple rank 1, which was treated separately by Moser. Our proof above makes no such assumption on the homotopy invariance of non-stable K1 –functors. As a consequence, Theorem 4.3.1 can also be used to slightly uniformize the proof of [13, Theorem 3.4]. We can also establish the strong A1 –invariance of the sheafifications of the non-stable K1 –presheaves attached to arbitrary isotropic reductive k–groups with k infinite. Theorem 4.3.3 Suppose k is an infinite field, and G is an isotropic reductive k –group (in the sense of Definition 3.3.5). For any integer n ≥ 0 , the following statements hold. 1 (i) The Zariski sheaf aZar πn (SingA G) is a Nisnevich sheaf. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1037 1 (ii) The sheaf aZar πn (SingA G) is strongly A1 –invariant. Proof We begin by recalling some key results of Morel [43, Chapter 6]. If X is a Nisnevich-local and A1 –invariant pointed simplicial presheaf on Smk , the sheaf aNis π1 (X ) is strongly A1 –invariant by [43, Theorem 6.1]. Moreover, the map aZar π1 (X ) → aNis π1 (X ) is an isomorphism by [43, Corollary 6.9(2)] (the standing assumption that aNis π0 (X ) is trivial is not used in the proof). By Theorems 2.3.5(i) and 3.3.7, under the stated hypotheses on k, the simplicial 1 presheaf RZar SingA BNis G is Nisnevich-local and A1 –invariant. Applying the results of the previous paragraph to the simplicial presheaf 1 X = RΩn RZar SingA BNis G, we conclude that 1 aZar πn+1 (SingA BNis G) is a strongly A1 –invariant Nisnevich sheaf of groups for any n ≥ 0. By Corollary 2.2.2, the map 1 1 πn (SingA RΩBNis G) −→ πn+1 (SingA BNis G) is an isomorphism on affines, and hence it becomes an isomorphism after Zariski sheafification. Finally, we conclude the proof by observing that G ≃ RΩBNis G by Lemma 2.3.2 (iii). Remark 4.3.4 We note that the results from [43, Chapter 6] used in the proof of Theorem 4.3.3 do not require k to be perfect. If the base field k is in addition perfect, 1 then, provided aZar πn (SingA G) is abelian, we can use [43, Theorem 5.46] to conclude that it is strictly A1 –invariant. The assumption that k is infinite in the above statement only appears because of our appeal to Theorem 3.3.7. To remove this restriction, we would need homotopy invariance for torsors under isotropic reductive groups over finite fields. If G is a reductive k–group, we can define G(k)+ to be the normal subgroup of G(k) generated by the k–points of subgroups of G isomorphic to Ga . The Whitehead group of G is defined by the formula W(k, G) := G(k)/G(k)+ ; we refer the reader to P Gille’s survey [29] for more details about Whitehead groups. In particular, Tits showed that W(k, G) detects whether G(k) is projectively simple. Results of Margaux allow us to connect non-stable K1 –functors (as above) with Whitehead groups. More precisely, one has the following result. Geometry & Topology XX (20XX) 1038 Aravind Asok, Marc Hoyois and Matthias Wendt Proposition 4.3.5 Suppose k is an infinite field, and G is an isotropic reductive k – group (in the sense of Definition 3.3.5). For any finitely generated separable extension L/k , there are canonical isomorphisms 1 π0 (SingA G)(L) ∼ = W(L, G). functorial with respect to field extensions. Moreover, the assignment L 7→ W(L, G) extends to a strongly A1 –invariant sheaf on Smk . Proof The first statement follows from Margaux [39, Theorem 3.10] (see also Gille [29, §4.3]) and only requires G to be isotropic in the sense of Borel [18, Definition V.20.1]. The second statement follows from the strong A1 –invariance of 1 aZar π0 (SingA G) established in Theorem 4.3.3(2). Whitehead groups are also related to arithmetic questions, e.g., regarding R–equivalence in G(k) (see Gille [29, §7] for a discussion of R–equivalence in the context under consideration). Corollary 4.3.6 Let k be an infinite field and G a semisimple simply-connected 1 absolutely almost simple isotropic k –group, and set G := aZar π0 (SingA G) . The following statements hold: (i) for any finitely generated separable extension L/k , there is an isomorphism of the form G(L) ∼ = G(L)/R , (ii) the contracted sheaf G−1 is trivial, and (iii) if k is furthermore perfect, and G has classical type, then G is strictly A1 – invariant. Proof The first statement follows from Proposition 4.3.5 and [29, Théorème 7.2]. For the second statement, recall that G−1 (U) = ker((id, 1)∗ : G(U × Gm ) → G(U)). As G is strongly A1 –invariant by Theorem 4.3.3, G−1 is also strongly A1 –invariant by Morel [43, Lemma 2.32]. In particular, it is an unramified sheaf, which implies that the map G(X) → G(k(X)) is injective for any irreducible smooth scheme X . By [29, Theorem 5.8], we conclude that G(k(U)) → G(k(U × Gm )) is a bijection and thus that G−1 (U) is trivial, for any U ∈ Smk . For the final statement, if k is furthermore perfect, it suffices by [43, Theorem 5.46] to show that G is an abelian group valued functor. Because G is unramified, it suffices to check abelianness on sections over extensions of the base field. By Point (i), if G has classical type, this follows from a result of Chernousov–Merkurjev [29, Théorème 7.7]. Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1039 Remark 4.3.7 The statement G−1 = 0 of Corollary 4.3.6(ii) is equivalent to the assertion that G is a birational sheaf. If G is not simply-connected, then the sheaf G is not, in general, birational. For example suppose G is a split semisimple group having non-trivial algebraic fundamental group Π (in the sense of Chevalley groups). If we let Hét1 (Π) be the Nisnevich sheaf associated with the presheaf U 7→ Hét1 (U, Π), then G∼ = Hét1 (Π), which is not birational. 4.4 Nilpotence for non-stable K1 functors In this section, we include one more sample application of our results: we give a uniform proof of some nilpotence results for non-stable K1 –functors discussed in the previous section; such nilpotence results have been studied for instance by Bak [11] and Bak– Hazrat–Vavilov [12]. The main result of this section is Theorem 4.4.3 which solves [12, Problem 6] in a number of cases of interest (see Remark 4.4.4 for more details). The approach we pursue has the benefit that it is conceptually simple (modelled on classical topological results) and applies to rather general isotropic reductive k–groups. The tradeoff to this generality is that unlike [12] we are forced to restrict attention to smooth k–algebras with k an infinite field. We use the following notation/terminology. If (X , x) is a pointed simplicial presheaf on Smk , we will say that X is Nisnevich-connected if aNis π0 (X ) is trivial and, given an integer n ≥ 1, we will say that X is Nisnevich n–connected if aNis πi (X , x) is trivial for i ≤ n. Now, suppose G is a simplicial presheaf of group-like h–spaces on Smk (h–group for short) pointed by the identity. In that case, there is an induced morphism G → aNis π0 G ; this morphism is a morphism of h–groups. Write G 0 for the homotopy fiber of G , so that there is a homotopy fiber sequence of the form G 0 −→ G −→ aNis π0 G . By construction, G 0 is a Nisnevich-connected h–group. Using this notation, we can adapt arguments of Whitehead [66, Corollary 2.12] to establish an abstract nilpotence result. Proposition 4.4.1 Assume k is a Noetherian ring of finite Krull dimension, and suppose G is a Nisnevich-local simplicial presheaf of h –groups on Smk (pointed by the identity). (i) For any X ∈ Smk , there is an exact sequence of groups of the form 1 −→ [X, G 0 ] −→ [X, G ] −→ aNis π0 (G )(X). Geometry & Topology XX (20XX) 1040 Aravind Asok, Marc Hoyois and Matthias Wendt (ii) If X ∈ Smk has Krull dimension ≤ d , then [X, G 0 ] is nilpotent of class ≤ d . Proof Point (i) is immediate from the long exact sequence of maps into a homotopy fiber sequence and the fact that aNis π0 (G ) is 0–truncated. For Point (ii), it suffices to assume G = G 0 is Nisnevich-connected. In that case, G ∧n is Nisnevich n–connected. Indeed, this follows from the corresponding connectivity estimate for smash products of simplicial sets by checking on stalks. Now, a straightforward obstruction theory argument (see Morel [43, Lemma B.5]) using the connectivity estimate we just mentioned shows that [X, G ∧n ] = ∗ if dim X ≤ n. To conclude, we simply observe that every n–fold commutator in [X, G ] factors as X → G ∧n → G (here, we use the assumption that G is an h–group and thus has a strict identity). Remark 4.4.2 The result above is rather general. Indeed, as is evident from the proof, it holds for simplicial h–group objects in the local homotopy theory of simplicial presheaves on a site for which Postnikov towers converge. Now, suppose G is an isotropic reductive k–group in the sense of Definition 3.3.5. Following Petrov and Stavrova [51], for any commutative k–algebra R and any parabolic k–subgroup P ⊂ G, we define the elementary subgroup EP (R) as the subgroup of G(R) generated by the R–points of the unipotent radical of P and the R–points of the unipotent radical of its opposite. A priori EP (R) depends on P and EP (R) need not be a normal subgroup of G. However, [51, Theorem 1] guarantees that if each semi-simple normal subgroup of G has rank ≥ 2, then EP (R) is both independent of P and normal in G(R); under these hypotheses we define E(R) := EP (R) for any choice of proper parabolic and define K1G (R) := G(R)/E(R). We can also consider G0 (R) ⊂ G(R), the subset of G(R) consisting of matrices g for which there exists g(t) ∈ G(R[t]) with g(0) = 1 and g(1) = g; this subgroup is evidently normal. By construction EP (R) ⊂ G0 (R) and KV1G (R) = G(R)/G0 (R). Therefore there is a short exact sequence of groups 1 −→ G0 (R)/E(R) −→ K1G (R) −→ KV1G (R) −→ 1. Theorem 4.4.3 Suppose k is an infinite field, G is an isotropic reductive k –group in the sense of Definition 3.3.5 and R is a smooth k –algebra of dimension d . (i) If for every finitely generated separable extension L/k the Whitehead group W(L, G) is trivial (abelian), then KV1G (R) is (an extension of an abelian group by) a nilpotent group of class ≤ d . Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1041 (ii) If furthermore k is perfect, for every finitely generated separable extension L/k the Whitehead group W(L, G) is trivial (abelian), and every semi-simple normal subgroup of G has rank ≥ 2 , then K1G (R) is (an extension of an abelian group by) a nilpotent group of class ≤ d . 1 Proof Let G = RZar SingA G. According to Theorem 4.3.3, the Nisnevich sheaf aNis π0 (G ) is strongly A1 –invariant. By Proposition 4.3.5 the group of sections aNis π0 (G )(L) over finitely generated extensions L/k coincides with W(L, G). In particular, the assumption that W(L, G) is trivial (abelian) for every finitely generated separable extension L/k implies that the sheaf aNis π0 (G ) is trivial (abelian). By Theorem 4.3.1 and Proposition 2.1.3, G is Nisnevich-local and KV1G (R) = [Spec R, G ]. Point (i) then follows immediately from Proposition 4.4.1. Consider the exact sequence appearing before the statement gives a surjective map K1G (R) → KV1G (R). Under the additional hypotheses in Point (ii), it follows immediately from a result of Stavrova [59, Theorem 1.3] that this surjection is an isomorphism and Point (ii) follows from Point (i). Remark 4.4.4 Combined with known structural results about W(−, G) (viewed as a functor on the category of finitely generated extensions of the base field), the above result solves a problem posed by Bak, Hazrat, and Vavilov [12, Problem 6] in a number of new cases. For example, in [29, Théorème 6.1], Gille summarizes results of Chernousov–Platonov that detail situations where W(−, G) is trivial for all finitely generated separable extensions L/k. See Corollary 4.3.6(iii) for hypotheses that guarantee W(−, G) is an abelian group valued functor on the category of (e.g., if G has classical type). Furthermore, it has been conjectured that W(−, G) always takes values in abelian groups. References [1] S Anantharaman, Schémas en groupes, espaces homogènes et espaces algébriques sur une base de dimension 1, volume 33 of Mémoires de la Société Mathématique de France (1973) [2] M Artin, Versal deformations and algebraic stacks, Invent. Math. 27 (1974) 165–189 [3] M Artin, A Grothendieck, J-L Verdier, Théorie des topos et cohomologie étale des schémas. Tome 1: Théorie des topos, Lecture Notes in Mathematics, Vol. 269, Springer-Verlag, Berlin-New York (1972)Séminaire de Géométrie Algébrique du BoisMarie 1963–1964 (SGA 4), Dirigé par M. Artin, A. Grothendieck, et J. L. Verdier. Avec la collaboration de N. Bourbaki, P. Deligne et B. Saint-Donat Geometry & Topology XX (20XX) 1042 Aravind Asok, Marc Hoyois and Matthias Wendt [4] A Asok, B Doran, J Fasel, Smooth models for motivic spheres and the clutching construction, Int. Math. Res. Not. IMRN (2016)Available at http://dx.doi.org/10.1093/imrn/rnw065 [5] A Asok, J Fasel, Algebraic vector bundles on spheres, J. Topol. 7 (2014) 894–926 [6] A Asok, J Fasel, A cohomological classification of vector bundles on smooth affine threefolds, Duke Math. J. 163 (2014) 2561–2601 [7] A Asok, J Fasel, Splitting vector bundles outside the stable range and A1 -homotopy sheaves of punctured affine spac J. Amer. Math. Soc. 28 (2015) 1031–1062 [8] A Asok, J Fasel, Euler class groups and motivic stable cohomotopy (2016)Preprint, available at http://arxiv.org/abs/1601.05723 [9] A Asok, M Hoyois, M Wendt, Affine representability results in A1 -homotopy theory I: vector bundles, Duke Math. J. (2017)Advance publication, 18 March 2017. doi: http://dx.doi.org/10.1215/00127094-0000014X [10] A Asok, M Hoyois, M Wendt, Generically split octonion algebras in A1 -homotopy theory (2017)Preprint, available at https://arxiv.org/abs/1704.03657 [11] A Bak, Nonabelian K -theory: the nilpotent class of K1 and general stability, Theory 4 (1991) 363–397 K- [12] A Bak, R Hazrat, N Vavilov, Localization-completion strikes again: relative K1 is nilpotent by abelian, J. Pure Appl. Algebra 213 (2009) 1075–1085 [13] C Balwe, A Sawant, R-equivalence and A1 -connectedness in anisotropic groups, Int. Math. Res. Not. IMRN (2015) 11816–11827 [14] C Balwe, A Sawant, A1 -connectedness in reductive algebraic groups (2016)Preprint, available at http://arxiv.org/abs/1605.04535 [15] J Barge, J Lannes, Suites de Sturm, indice de Maslov et périodicité de Bott, volume 267 of Progress in Mathematics, Birkhäuser Verlag, Basel (2008) [16] H Bass, E H Connell, D L Wright, Locally polynomial algebras are symmetric algebras, Invent. Math. 38 (1976/77) 279–299 [17] A Białynicki-Birula, Rationally trivial homogeneous principal fibrations of schemes, Invent. Math. 11 (1970) 259–262 [18] A Borel, Linear algebraic groups, volume 126 of Graduate Texts in Mathematics, second edition, Springer-Verlag, New York (1991) [19] C Cazanave, Algebraic homotopy classes of rational functions, Ann. Sci. Éc. Norm. Supér. (4) 45 (2012) 511–534 (2013) [20] J-L Colliot-Thélène, M Ojanguren, Espaces principaux homogènes localement triviaux, Inst. Hautes Études Sci. Publ. Math. (1992) 97–122 [21] B Conrad, Reductive group schemes, from: “Autour des schémas en groupes. Vol. I”, Panor. Synthèses 42/43, Soc. Math. France, Paris (2014) 93–444 Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1043 [22] B Conrad, O Gabber, G Prasad, Pseudo-reductive groups, volume 17 of New Mathematical Monographs, Cambridge University Press, Cambridge (2010) [23] M Demazure, A Grothendieck, Schémas en groupes. II: Groupes de type multiplicatif, et structure des schémas en groupes généraux, Séminaire de Géométrie Algébrique du Bois Marie 1962/64 (SGA 3). Dirigé par M. Demazure et A. Grothendieck. Lecture Notes in Mathematics, Vol. 152, Springer-Verlag, Berlin-New York (1970) [24] M Demazure, A Grothendieck, Schémas en groupes. III: Structure des schémas en groupes réductifs, Séminaire de Géométrie Algébrique du Bois Marie 1962/64 (SGA 3). Dirigé par M. Demazure et A. Grothendieck. Lecture Notes in Mathematics, Vol. 153, Springer-Verlag, Berlin-New York (1970) [25] D Dugger, S Hollander, D Isaksen, Hypercovers and simplicial presheaves, Math. Proc. Cambridge Philos. Soc. 136 (2004) 9–51 [26] J Fasel, Some remarks on orbit sets of unimodular rows, Comment. Math. Helv. 86 (2011) 13–39 [27] J Fasel, On the number of generators of ideals in polynomial rings, Ann. of Math. (2) 184 (2016) 315–331 [28] R Fedorov, I Panin, A proof of the Grothendieck–Serre conjecture on principal bundles over regular local rings conta Publ. Math. Inst. Hautes Études Sci. 122 (2015) 169–193 [29] P Gille, Le problème de Kneser-Tits, from: “Séminaire Bourbaki, volume 2007/2008, Exposés 982–996”, Astérisque 326 (2009) 39–81 [30] P Gille, Sur la classification des schémas en groupes semi-simples, from: “Autour des schémas en groupes. Vol. III”, Panor. Synthèses 47, Soc. Math. France, Paris (2016) 39– 110Preprint available at https://hal.archives-ouvertes.fr/hal-01063601v2 [31] P G Goerss, J F Jardine, Simplicial homotopy theory, Modern Birkhäuser Classics, Birkhäuser Verlag, Basel (2009)Reprint of the 1999 edition [MR1711612] [32] A Grothendieck, Éléments de géométrie algébrique. IV. Étude locale des schémas et des morphismes de schémas. IV, Inst. Hautes Études Sci. Publ. Math. (1967) 361 [33] S Hollander, A homotopy theory for stacks, Israel J. Math. 163 (2008) 93–124 [34] A Iarrobino, An algebraic fibre bundle over P1 that is not a vector bundle, Topology 12 (1973) 229–232 [35] J F Jardine, On the homotopy groups of algebraic groups, J. Algebra 81 (1983) 180– 201 [36] M-A Knus, Quadratic and Hermitian forms over rings, volume 294 of Grundlehren der Mathematischen Wissenschaften, Springer-Verlag, Berlin (1991)With a foreword by I. Bertuccioni [37] M I Krusemeyer, Fundamental groups, algebraic K -theory, and a problem of Abhyankar, Invent. Math. 19 (1973) 15–47 Geometry & Topology XX (20XX) 1044 Aravind Asok, Marc Hoyois and Matthias Wendt [38] T Y Lam, Serre’s problem on projective modules, Springer Monographs in Mathematics, Springer-Verlag, Berlin (2006) [39] B Margaux, The structure of the group G(k[t]): variations on a theme of Soulé, Algebra Number Theory 3 (2009) 393–409 [40] J Milne, Étale Cohomology, Princeton University Press (1980) [41] J W Milnor, D Husemoller, Symmetric bilinear forms, Springer-Verlag (1973)Ergebnisse der Mathematik und ihrer Grenzgebiete 73 [42] F Morel, On the Friedlander-Milnor conjecture for groups of small rank, from: “Current developments in mathematics, 2010”, Int. Press, Somerville, MA (2011) 45–93 [43] F Morel, A1 -algebraic topology over a field, volume 2052 of Lecture Notes in Mathematics, Springer, Heidelberg (2012) [44] F Morel, V Voevodsky, A1 -homotopy theory of schemes, Inst. Hautes Études Sci. Publ. Math. (1999) 45–143 (2001) [45] L-F Moser, Rational triviale Torseure und die SerreGrothendiecksche Vermutung (2008)Diplomarbeit, available at http://www.mathematik.uni-muenchen.de/~lfmoser/da.pdf [46] L-F Moser, A1 -locality results for linear algebraic groups (2011)In preparation [47] Y A Nisnevich, Espaces homogènes principaux rationnellement triviaux et arithmétique des schémas en groupes réductifs sur les anneaux de Dedekind, C. R. Acad. Sci. Paris Sér. I Math. 299 (1984) 5–8 [48] I Panin, Proof of the Grothendieck-Serre conjecture on principal bundles over regular local rings containing a finite field (2015)Preprint available at http://arxiv.org/abs/1406.0241 [49] I Panin, C Walter, On the motivic commutative ring spectrum BO (2010)Preprint available at http://arxiv.org/abs/1011.0650 [50] I Panin, C Walter, Quaternionic Grassmannians and Pontryagin classes in algebraic geometry (2010)Preprint available at http://arxiv.org/abs/1011.0649 [51] V A Petrov, A K Stavrova, Elementary subgroups in isotropic reductive groups, Algebra i Analiz 20 (2008) 160–188 [52] D Popescu, Polynomial rings and their projective modules, Nagoya Math. J. 113 (1989) 121–128 [53] D G Quillen, Projective modules over polynomial rings, Invent. Math. 36 (1976) 167– 171 [54] M S Raghunathan, Principal bundles on affine space, from: “C. P. Ramanujam—a tribute”, Tata Inst. Fund. Res. Studies in Math. 8, Springer, Berlin-New York (1978) 187–206 [55] A Ramanathan, Deformations of principal bundles on the projective line, Invent. Math. 71 (1983) 165–191 Geometry & Topology XX (20XX) Affine representability results in A1 –homotopy theory II 1045 [56] M Schlichting, Euler class groups, and the homology of elementary and special linear groups (2015)Preprint, available at http://arxiv.org/abs/1502.05424 [57] T A Springer, F D Veldkamp, Octonions, Jordan algebras and exceptional groups, Springer Monographs in Mathematics, Springer-Verlag, Berlin (2000) [58] T Stacks Project Authors, Stacks Project, http://stacks.math.columbia.edu (2015) [59] A Stavrova, Homotopy invariance of non-stable K1 -functors, J. K-Theory 13 (2014) 199–248 [60] A A Suslin, Locally polynomial rings and symmetric algebras, Izv. Akad. Nauk SSSR Ser. Mat. 41 (1977) 503–515, 717 [61] R W Thomason, Equivariant resolution, linearization, and Hilbert’s fourteenth problem over arbitrary base schemes Adv. in Math. 65 (1987) 16–34 [62] K Völkel, M Wendt, On A1 -fundamental groups of isotropic reductive groups, C. R. Math. Acad. Sci. Paris 354 (2016) 453–458 [63] C A Weibel, Homotopy algebraic K -theory, from: “Algebraic K -theory and algebraic number theory (Honolulu, HI, 1987)”, Contemp. Math. 83, Amer. Math. Soc., Providence, RI (1989) 461–488 [64] M Wendt, A1 -homotopy of Chevalley groups, J. K-Theory 5 (2010) 245–287 [65] M Wendt, Rationally trivial torsors in A1 -homotopy theory, J. K-Theory 7 (2011) 541–572 [66] G W Whitehead, On mappings into group-like spaces, Comment. Math. Helv. 28 (1954) 320–328 Department of Mathematics, University of Southern California, Los Angeles, CA 90089-2532, United States Department of Mathematics, Massachusetts Institute of Technology, Cambridge, MA 021394307, United States Fakultät für Mathematik, Universität Duisburg-Essen, Thea-Leymann-Strasse 9, 45127 Essen, Germany [email protected], [email protected], [email protected] Geometry & Topology XX (20XX)
4math.GR
Neural Task Programming: Learning to Generalize Across Hierarchical Tasks arXiv:1710.01813v2 [cs.AI] 14 Mar 2018 Danfei Xu∗1 , Suraj Nair∗2 , Yuke Zhu1 , Julian Gao1 , Animesh Garg1 , Li Fei-Fei1 , Silvio Savarese1 I. I NTRODUCTION Autonomy in complex manipulation tasks, such as object sorting, assembly, and de-cluttering, requires sequential decision making with prolonged interactions between the robot and the environment. Planning for a complex task and, vitally, adapting to new task objectives and initial conditions is a long-standing challenge in robotics [6, 12]. Consider an object sorting task in a warehouse setting – it requires sorting, retrieval from storage, and packing for shipment. Each task is a sequence of primitives – such as pick_up, move_to, and drop_into – that can be composed into manipulation sub-tasks such as grasping and placing. This problem has an expansive space of variations – different objects-bin maps in sorting, permutations of subtasks, varying length order lists – resulting in a large space of tasks. As a concrete example, Figure 1(C) shows a simplified setup of the object sorting task. The task is to transport objects of four categories to four shipping containers. There is a total of 256 possible mappings between object categories and containers, and the variable number of object instances further increases the complexity. In this paper, we attempt to address two challenges in complex task planning domains, namely (a) learning policies that generalize to new task objectives, and (b) hierarchical composition of primitives for long-term environment interactions. We propose Neural Task Programming (NTP), a unified, task-agnostic learning algorithm that can be applied to a variety of tasks with latent hierarchical structure. The key underlying idea is to learn reusable representations shared across tasks and domains. NTP interprets a task specification (Figure 1 left) and instantiates a hierarchical policy as a neural program (Figure 1 middle), where the bottom-level programs are primitive actions that are executable in the environment. A task specification is defined as a time-series that describes * These authors contributed equally to the paper 1 Stanford Vision & Learning Lab, 2 CS, Caltech. Task Demonstration Task(i) Abstract— In this work, we propose a novel robot learning framework called Neural Task Programming (NTP), which bridges the idea of few-shot learning from demonstration and neural program induction. NTP takes as input a task specification (e.g., video demonstration of a task) and recursively decomposes it into finer sub-task specifications. These specifications are fed to a hierarchical neural program, where bottomlevel programs are callable subroutines that interact with the environment. We validate our method in three robot manipulation tasks. NTP achieves strong generalization across sequential tasks that exhibit hierarchal and compositional structures. The experimental results show that NTP learns to generalize well towards unseen tasks with increasing lengths, variable topologies, and changing objectives. stanfordvl.github.io/ntp/ Robot API NTP ``` A Task Final State Env. B State obs. Task-Conditional Policy C D Fig. 1: (top) At test time, NTP instantiates a task-conditional policy (a neural program) that performs the specified task by interpreting a demonstration of a task. The policy interacts with the environment through robot APIs. (bottom) We evaluate NTP on Block Stacking (A,B), Object Sorting (C, D) and Table Clean-up (Figure 8) tasks in both simulated and real environment. the procedure and the final objective of a task. It can either be a task demonstration recorded as a state trajectory, first/thirdperson video demonstrations, or even a list of language instructions. In this work, we use task demonstration as the task specification. We experiment with two forms of task demonstration: location trajectories of objects that are involved in a task, and a third-person video demonstration of a task. NTP decodes the objective of a task from the input specification and factorizes it into sub-tasks, interacting with the environment with closed-loop feedback until the goal is achieved (Figure 1 right). Each program call takes as input the environment observation and a task specification, producing the next sub-program and a corresponding sub-task specification. The lowest level of the hierarchy is symbolic actions captured through a Robot API. This hierarchical decomposition encourages information hiding and modularization, as lower-level modules only access their corresponding sub-task specifications that pertain to their functionality. It prevents the model from learning spurious dependencies on training data, resulting in better reusability. Essentially, NTP addresses the key challenges in task generalization: meta-learning for cross-task transfer and hierarchical model to scale to more complex tasks. Hence, NTP builds on the strengths of neural programming and hierarchical RL while compensating for their shortcomings. We demonstrate that NTP generalizes to three kinds of variations in task structure: 1) Task Length: varying number of steps due to the increasing problem size (e.g., having more objects to transport); 2) Task Topology: the flexible permutations and combinations of sub-tasks to reach the same end goal (e.g., manipulating objects in different orders); and 3) Task Semantics: the varying task definitions and success conditions (e.g., placing objects into a different container). We evaluate NTP on three table-top manipulation tasks State observation Observation Encoder Task Spec. Encoder Input “pick_and_place” program Input task specification Task Spec. Interpreter NTP Output program Core Network Is output Yes program Primitive ? No End-of-program probability API Decoder API arguments Task Spec. Selection Output task specification that require long-term interactions: Block Stacking, Object Sorting, and Table Clean-up. We evaluate each task in both simulated and real-robot setups. Summary of Contributions: 1) Our primary contribution is a novel modeling framework: NTP that enables meta-learning on hierarchical tasks. 2) We show that NTP enables knowledge transfer and oneshot demonstration based generalization to novel tasks with increasing lengths, varying topology, and changing semantics without restriction on initial configurations. 3) We also demonstrate that NTP can be trained with visual input (images and video) end-to-end. II. BACKGROUND & R ELATED WORK Skill Learning: The first challenge is learning policies that adapt to new task objectives. For learning a single task policy, traditional methods often segment a complex task into hand-engineered state machine composed of motion primitives [6, 12, 27]. Although the model-based approaches are well-founded in principle, they require meticulous model specification and task-specific treatment leading to challenges in scaling. Contrarily, learning-based methods such as reinforcement learning (RL) have yielded promising results using end-to-end policy learning that obviates the need for manually designed state representations through data-driven task-salient features [20, 33]. Yet these methods fall short because they need task-specific reward functions [21]. Learning from Demonstrations: LfD fills these gaps by avoiding the need to define state machines or reward functions. The objective in LfD is to learn policies that generalize beyond the provided examples and are robust to perturbations [3, 17] A common treatment to LfD is to model data as samples from an expert policy for a fixed task, and use behavior cloning [16, 25] or reward function approximation [22] to output an expert-like policy for that task. However, learning policies that generalize to new objectives with LfD remains largely an unexplored problem. Few-Shot Generalization in LfD: Our work is an instantiation of the decades-old idea of meta-learning with few examples [11, 30]. It has seen a recent revival in deep learning in part because it can address the problems above [31]. Our setting resembles learning by demonstration (LfD) in robotics [5], particularly one-shot imitation [10, 32]. Our method learns to learn from an input task specification during training. At test time, it generates a policy conditioned on a single demonstration provided as a time-series showing the task execution. While similar in these aspects, existing works in both skill learning and LfD are inept at tasks with sparse reward functions and complex hierarchical structures such as Montezuma’s Revenge [19]. Fig. 2: Neural Task Programming (NTP): Given an input program, a task specification, and the current environment observation, a NTP model predicts the sub-level program to run, the subsequence of the task specification that the sub-level program should take as input, and if the current program should stop. Hierarchical Skill Composition: The second challenge we consider is the hierarchical composition of primitives to enable long-term robot-environment interaction. The idea of using hierarchical models for complex tasks has been widely explored in both reinforcement learning and robotics [17, 28]. A common treatment to manage task structure complexity is to impose hierarchy onto the learned policy. The options framework composes primitive actions into multi-step actions, which facilitates policy learning at higher-level semantic and/or temporal abstraction [13, 29]. Notable examples include structured reinforcement learning methods, especially hierarchical variants of RL that handle decomposition through multi-stage policies operating over options [4, 19, 23]. However, the naïve use of a hierarchical RL model with "sub-policies" or options optimized for a specific task doesn’t guarantee modularity or reusability across task objectives. The core idea of NTP resonates with recent works on dynamic neural networks, which aim to learn and reuse primitive network modules. These methods have been successfully applied to several domains such as robot control [1] and visual question answering [2]. However, they have exhibited limited generalization ability across tasks. In contrast, we approach the problem of hierarchical task learning via neural programming to attain modularization and reusability [24]. As a result, our model achieves significantly better generalization results than non-hierarchical models such as [10]. FSMs and Neural Program Induction: An exciting and non-intuitive insight of this paper is that the well-studied Finite State Machine (FSM) model lends itself to learning reusable hierarchical policies thereby addressing the problem of composability without the need for hand-crafting state transitions. There have been a few studies learning FSMs from data [14, 18]. In line with the idea, recent works in neural programming using deep models have enabled symbolic reasoning systems to be trained end-to-end, which have shown potential to handle multi-modal and raw input/out data [9, 24] and achieve symbolic generalization [7]. NTP belongs to a family of neural program induction methods, where the goal is to learn a latent program representation that generates program outputs [9, 24]. While these models have been shown to generalize on task length, they are tested on basic computational tasks only with limited generalization to task semantics and topology. Similar to NTP, Neural Programmer-Interpreter (NPI) [24] has proposed to use a task-agnostic recurrent neural network to represent and execute programs. In contrast to previous work on neural program induction, NPI-based models are trained with richer supervision from the full program execution traces and can learn semantically meaningful programs with high data efficiency. However, program induction, including NPI, is not … … Input Task Spec. Env. Observation EOP: False Pin: block_stacking EOP: False Pout: pick_and_place Output Task Spec. Pout: pick_and_place Output Task Spec. Env. Observation EOP: False Pin: pick_and_place EOP: True Pout: pick Output Task Spec. Pout: place Output Task Spec. Env. Observation Input Task Spec. Env. Observation Input Task Spec. Pin: pick EOP: False Pin: pick EOP: True Args: block_E Pout: grip Pout: move_to move_to (block_E) return Args: block_E grip (block_E) Env. Observation Input Task Spec. Env. Observation Input Task Spec. Pin: place EOP: False Pin: place EOP: True Args: block_B Pout: release Pout: move_to return Input Task Spec. Input Task Spec. move_to (block_B) return return Input Task Spec. Pin: pick_and_place return Env. Observation return Env. Observation Pin: block_stacking Args: N/A release() return Fig. 3: Sample execution trace of NTP on a block stacking task. The task is to stack lettered blocks into a specified configuration (block_D on top of block_E, block_B on top of block_D, etc). Top-level program block_stacking takes in the entire demonstration as input (red window), and predicts the next sub-program to run is pick_and_place, and it should take the part of task specification marked by the orange window as the input specification. The bottom-level API call moves the robot and close / open the gripper. When End of Program (EOP) is True, the current program stops and return its caller program. capable of generalizing to novel programs without training. NTP is a meta-learning algorithm that learns to instantiate neural programs given demonstrations of tasks, thereby generalizing to unseen tasks/programs. Intuitively, NTP decomposes the overall objective (e.g., object sorting) into simpler objectives (e.g., pick and place) recursively. For each of such sub-tasks, NTP delegates a neural program to perform the task. The neural programs, together with the task decomposition mechanism, are trained end-to-end. While previous work has largely focused on executing a pre-defined task one at a time NTP not only exhibits one-shot generalization to tasks with longer lengths as NPI, but also generalizes to sub-task permutations (topology) and success conditions (semantics). III. P ROBLEM F ORMULATION We consider the problem of an agent performing actions to interact with an environment to accomplish tasks. Let T be the set of all tasks, S be the environment state space, and A be the action space. For each task t ∈ T, the Boolean function g : S × T → {0, 1} defines the success condition of the task. Given any state s ∈ S, g(s,t) = 1 if the task t is completed in the state s, and g(s,t) = 0 otherwise. The task space T can be infinite. We thus need a versatile way to describe the task semantics. We describe each task using a task specification ψ(t) ∈ Ψ, where Ψ is the set of all possible task specifications. Formally, we consider a task specification as a sequence of random variables ψ(t) = {x1 , x2 , . . . , xN }. NTP takes a task specification ψ(t) as input in order to instantiate a policy. ψ(t) is defined as a time series that describes the procedure and the final objective of the task. In experiments, we consider two forms of task specifications: trajectories of object locations and raw video sequences. In many real-world tasks, the agent has no access to the underlying environment states. It only receives a sample of environment observation o ∈ O that corresponds to the state s, where O is the observation space. Our goal is to learn a “meta-policy” that instantiates a feedback policy from a specification of a task, π̃ : Ψ → (O → A). At test time, a specification of a new task ψ(t) is input to NTP. The metapolicy then generates a policy π(a|o; ψ(t)) : O → A, to reach task-completion state sT where g(sT ,t) = 1. Why use Neural Programming for LfD? Previous work has mostly used a monolithic network architecture to represent a goal-driven policy [10, 26, 33]. These methods cannot exploit the compositional task structures to facilitate modularization and reusability. Instead, we represent our policy π̃ as a neural program that takes a task specification as its input argument. As illustrated in Figure 2, NTP uses a task-agnostic core network to decide which sub-program to run next and adaptively feeds a subset of the task specification to the next program. Intuitively, NTP recursively decomposes a task specification and solves a hierarchical task by divideand-conquer. Figure 3 highlights this feature with a sample execution of a task. Our method extends upon a special type of neural programming architecture named Neural ProgrammerInterpreter (NPI) [7, 24]. NPI generalizes well to input size but cannot generalize to unseen task objectives. NTP combines the idea of meta-learning and NPI. The ability to interpret task specifications and instantiate policies accordingly makes NTP generalize across tasks. A. Neural Programmer-Interpreter (NPI) Before introducing our NTP model, it is useful to briefly overview the NPI paradigm [24]. NPI is a type of neural program induction algorithm, in which a network is trained to imitate the behavior of a computer program, i.e., the network learns to invoke programs recursively given certain context or stop the current program and return to upperlevel programs. The core of NPI is a long-short memory (LSTM) [15] network. At the i-th time step, it selects the next program to run conditioned on the current observation oi and the previous LSTM hidden units hi−1 . A domainspecific encoder is used to encode the observation oi into a state representation si . The NPI controller takes as input the state si , the program embedding pi retrieved from a learnable key-value memory structure [M key ; M prog ], and the current arguments ai . It generates a program key, which is used to invoke a sub-program pi+1 using content-based addressing, the arguments to the next program ai+1 , and the end-ofprogram probability ri . The NPI model maintains a program call stack. Each time a sub-program is called, the caller’s LSTM hidden units embedding and its program embedding is pushed to the stack. Formally, the NPI core has three learnable components, a domain-specific encoder fenc , an LSTM flstm , and an output decoder fdec . The full update being: si = fenc (oi , ai ) hi = flstm (si , pi , hi−1 ) ri , pi+1 , ai+1 = fdec (hi ). When executing a program with the NPI controller, it performs one of the following three things: 1) when the end-of-program probability exceeds a threshold α (set to 0.5), this program is popped up from the stack and control is returned to the called; 2) when the program is not primitive, a sub-program with its arguments is called; and 3) when the program is primitive, a low-level basic action is performed in the environments. The LSTM core is shared across all tasks. IV. N EURAL TASK P ROGRAMMING Overview. NTP has three key components: Task Specification Interpreter fT SI , Task Specification Encoder fT SE , and a core network fCN (Figure 2. The Task Specification Encoder transforms a task specification ψi into a vector space. The core network takes as input the state si , the program pi , and the task specification ψi , producing the next sub-program to invoke pt+1 and an end-of-program probability rt . The program returns to the caller when rt exceeds a threshold α (set to 0.5). We detail the inference procedure in Algorithm 1. NTP vs NPI: We highlight three main differences of NTP than the original NPI: (1) NTP can interpret task specifications and perform hierarchical decomposition and thus can be considered as a meta-policy; (2) it uses APIs as the primitive actions to scale up neural programs for complex tasks; and (3) it uses a reactive core network instead of a recurrent network, making the model less history-dependent, enabling feedback control for recovery from failures. In addition to the three key components, NTP implements two modules similar to the NPI architectures [7, 24]: (1) domain-specific task encoders that map an observation to a state representation si = fENC (oi ), and (2) a key-value memory that stores and retrieves embeddings: prog j∗ = arg max j=1...N (M key j,: ki ) and pi = M j∗ ,: , where ki is the program key predicted by the core network. Scaling up NTP with APIs. The bottom-level programs in NPI correspond to primitive actions that are executable in the environment. To scale up neural programs in coping with the complexity of real-world tasks, it is desirable to use existing tools and subroutines (i.e., motion planner) such that learning can be done at an abstract level. In computer programming, application programming interfaces (APIs) have been a standard protocol for developing software by using basic modules. Here we introduce the concept of API to neural programming, where the bottom-level programs correspond to a set of robot APIs, e.g., moving the robot arm using inverse kinematics. Each API takes specific arguments, e.g., an object category or the end effector’s target position. NTP jointly learns to select APIs functions and to generate their input arguments. The APIs that are used in the experiments are move_to, grip, and release. move_to takes an object Algorithm 1 NTP Inference Procedure Inputs: task specification ψ, program id i, and environment observation o function RUN(i, ψ) r ← 0, p ← Mi,:prog , s ← fENC (o), c ← fT SE (ψ) while r < α do k, r ← fCN (c, p, s), ψ2 ← fT SI (ψ, p, s) i2 ← arg max j=1...N (M key j,: k) if program i2 is primitive then . if i2 is an API a ← fT SI (ψ2 , i2 , s) . decode API args RUN_API(i2 , a) . run API i2 with args a else RUN(i2 , ψ2 ) . run program i2 w/ task spec ψ2 end if end while end function index as the API argument and calls external functions to move the gripper to above the object whose position is either given by the simulator or predicted by an object detector. grip closes the gripper and release opens the gripper. Task Specification Interpreter. The Task Specification Interpreter, taking a task specification as input, chooses to perform one of the two operations: (1) when the current program p is not primitive, it predicts the sub-task specification for the next sub-program; and (2) when p is primitive (i.e., an API), it predicts the arguments of the API. Let ψi be the task specification of the i-th program call, where ψi is a sequence of random variables ψi = {x1 , x2 , . . . , xNi }. The next task specification ψi+1 is determined by three inputs: the environment state si , the current program pi , and the current specification ψi . When pi is a primitive, TSI uses an API-specific decoder (i.e., an MLP) to predict the API arguments from the tuple (si , pi , ψi ). We focus on the cases when pi is not primitive. In this case, TSI needs to predict a sub-task specification ψi+1 for the next program pi+1 . This sub-task specification should only access relevant information to the sub-task. To encourage information hiding from high-level to low-level programs, we enforce the scoping constraint, such that ψi+1 is a contiguous subsequence of ψi . Formally, given ψi = {x1 , x2 , . . . , xNi }, the goal is to find the optimal contiguous subsequence ψi+1 = {x p , x p+1 , . . . , xq−1 , xq }, where 1 ≤ p ≤ q ≤ Ni . Subsequence Selection (Scoping). We use a convolutional architecture to tackle the subsequence selection problem. First, we embed each input element ψi = {x1 , x2 , . . . , xNi } into a vector space φi = {w1 , w2 , . . . , wNi }, where each wi ∈ Rd . We perform temporal convolution at every temporal location j of the sequence φi , where each convolutional kernel is parameterized by W ∈ Rm×dk and b ∈ Rm , which takes a concatenation of k consecutive input elements and produces a single output yij ∈ Rm . We use relu as the nonlinearities. The outputs from all convolutional kernels yij are concatenated with the program embedding pi and the encoded states si into a single vector h j = [pi ; yij ; si ]. Finally, Task Semantics Variation A B C D E Task Topology Variation C A B B A D E C D E D A B C C D A B B A E D C E E Task Length Variation Fig. 4: The variability of a task structure consists of changing success conditions (task semantics), variable subtask permutations (task topology), and larger task sizes (task length). We evaluate the ability of our proposed model in generalizing towards these three types of variations. we compute the softmax probability of four scoping labels Pr j (l ∈ {Start, End, Inside, Outside}). These scoping labels indicate whether this temporal location is the start/end point of the correct subsequence, or if it resides inside/outside the subsequence. We use these probabilities to decode the optimal subsequence as the output sub-task specification ψi+1 . The decoding process can be formulated as the maximum contiguous subsequence sum problem, which can be solved optimally in linear time. However in practice, taking the start and end points with the highest probabilities results in a good performance. In our experiments, we set ψi+1 = {xst , xst+1 , . . . , xed }, where st = arg max j=1...Ni Pr j (Start) and ed = arg max j=1...Ni Pr j (End). This process is illustrated in Figure 3, wherein the model factorizes a video sequence which illustrates the procedure of pick_and_place into a fraction that only illustrates pick. This convolutional TSI architecture is invoked recursively along the program execution trace. It decomposes a long task specification into increasingly fine-grained pieces from high-level to low-level tasks. This method naturally enforces the scoping constraint. Our experimental results show that such information hiding mechanism is crucial to good generalization. Model Training. We train the model using rich supervision from program execution traces. Each execution trace is a list of tuples {ξt | ξt = (ψt , pt , st ),t = 1 . . . T }, where T is the length of the execution trace. Our training objective is to maximize the probability of the correct executions over all the tasks in the dataset D = {(ξt , ξt+1 )}, such that θ ∗ = ΣD log Pr[ξt+1 |ξt ; θ ]. We collect a dataset that consists of execution traces from multiple types of tasks and their task specifications. For each specification, we provide the ground-truth hierarchical decomposition of the specification for training by rolling a hard-coded expert policy. We use cross-entropy loss at every temporal location of the task specification to supervise the scoping labels. We also adopted the idea of adaptive curriculum from NPI [24], where the frequency of each minibatch being fetched is proportional to the model’s prediction error with respect to the corresponding program. V. E XPERIMENTAL S ETUP The goal of our experimental evaluation is to answer the following questions: (1) Does NTP generalize to changes in all three dimensions of variation: length, topology, and semantics, as illustrated in Figure 4, (2) Can NTP use image-based input without access to ground truth state, and (3) Would NTP also work in real-world tasks which have combinations of these variations. We evaluate NTP in three robot manipulation tasks: Object Sorting, Block Stacking, and Table Clean-up. Each of these tasks requires multiple steps to complete and can be recursively decomposed into repetitive sub-tasks. Input State Representation. We use an expert policy to generate program execution traces as training data. An expert policy is an agent with hard-coded rules that call programs (move_to, pick_and_drop, etc.) to perform a task. In our experiment, we use the demonstration of a robot carrying out a task as the task specification. For all experiments, unless specified, the state representation in the task demonstrations is in the form of object position trajectories relative to the gripper frame. In the Block Stacking experiment, we also report the results of using a learned object detector to predict object locations and the results of directly using RGB video sequence as state observations and task demonstrations. Simulator Setup. We conduct our experiments in a 3D environment simulated using the Bullet Physics engine [8]. We use a disembodied PR2 gripper for both gathering training data and evaluation. We also evaluate NTP on a simulated 7-DoF Sawyer arm with a parallel-jaw gripper as shown in Figure 1 and Figure 8. Since NTP only considers end-effector pose, the choice of robot does not affect its performance in the simulated environment. Real-Robot Setup. We also demonstrate NTP’s performance on the Block Stacking and the Object Sorting tasks on a 7DoF Sawyer arm using position control. We use NTP models that are trained with simulated data. Task demonstration are obtained in the simulator, and the instantiated NTP models are executed on the robot. All real-robot experiments use object locations relative to the gripper as state observations. A Kinect2 camera is used to localize objects in the 3D scene. Evaluation Metrics. We evaluate NTP on three variations of task structure as illustrated in Figure 4: 1) task length: varying number of steps due to the increasing problem size (e.g., having more objects to transport); 2) task topology: variations in permutations of steps of sub-tasks to reach the same end goal (e.g., manipulating objects in different orders); and 3) task semantics: the unseen task objectives and success conditions (e.g., placing objects into a different container). We evaluate Task length on the Object Sorting task varying the number of objects instances from 1 to 10 per category. Further, we evaluate Task Topology on the Block Stacking task with different permutations of pick-and-place sub-tasks that lead to the same block configurations. Finally, we evaluate Task Semantics on Block Stacking on a held-out set of task demonstrations that lead to unseen block configurations as task objectives.We report success rates for simulation tasks, and we analyze success rates, causes of failure, and proportion of task completed for real-robot evaluation. All objects are randomly placed initially in all of the evaluation tasks in both the simulated and the real-robot setting. Baselines. We compare NTP to four baselines architecture Object Sorting: Task Length failures: a grasp failure and a collision checking failure. VII. E XPERIMENT 2: B LOCK S TACKING Fig. 5: Task Length: Evaluation of the Object Sorting in simulation. The axes represent mean success rate (y) with 100 evaluations each and the number of objects in unseen task instances (x). NTP generalizes to increasingly longer tasks while baselines do not. variations. (1) Flat is a non-hierarchical model, similar to [10], that takes as input task demonstration and current observation, and directly predicts the primitive APIs instead of calling hierarchical programs. (2) Flat (GRU) is the Flat model with a GRU cell. (3) NTP (no scope) is a variant of the NTP model that feeds the entire demonstration to the subprograms, thereby discarding the scoping constraint. (4) NTP (GRU) is a complete NTP model with a GRU cell. This is to demonstrate that the reactive core network in NTP can better generalize to longer tasks and recover from unexpected failures due to noise, which is crucial in robot manipulation tasks. VI. E XPERIMENT 1: O BJECT S ORTING Setup. The goal of Object Sorting is to transport objects randomly scattered on a tabletop into their respective shipping containers stated in the task demonstration. We use 4 object categories and 4 containers in evaluating the Object Sorting task. In the real robot setup, a toy duck, toy frog, lego block, and marker are used as the objects for sorting, and are sorted into 4 black plastic bins. This results in a total of 44 = 256 category-container combinations (multiple categories may be mapped to the same container). However, as each category can be mapped to 4 possible containers, a minimum of 4 tasks can cover all possible category-container pairs. We select these 4 tasks for training and the other 252 unseen tasks for evaluation. We train all models with 500 trajectories. Each test run is on 100 randomly-selected unseen tasks. Simulator. As shown in Figure 5, NTP significantly outperforms the flat baselines. We examine how the task size affects its performance. We vary the numbers of objects to be transported from 4 to 40 in the experiments. The result shows that NTP retains a stable and good performance (over 90%) in longer tasks. On the contrary, the flat models’ performances decline from around 40% to around 25%, which is close to random. The performance of the NTP (GRU) model also declines faster comparing to the NTP model as the number of objects increases. This comparison illustrates NTP’s ability to generalize towards task length variations. Real robot. Table I shows the results of the Object Sorting task on the robot. We use 4 object categories with 3 instances of each category. We carried out a total of 10 evaluation trials on randomly selected unseen Object Sorting tasks. 8 trials completed successfully, and 2 failed due to of manipulation Setup. The goal of Block Stacking is to stack a set of blocks into a target configuration, similar to the setup in [10]. We use 8, 5×5 cm wooden cubes of different colors both in simulation and with real-robot. We randomly generate 2000 distinct Block Stacking task instances. Two tasks are considered equivalent if they have the same end configuration. We use a maximum of 1000 training tasks and 100 trials for each task, leaving the remaining 1000 task instances as unseen test cases. A task is considered successful if the end configuration of the blocks matches the task demonstration. We evaluate both seen and unseen tasks, i.e., whether the end configuration appears in training set. We use N = 8 blocks in our evaluation. Simulator. Figure 6 shows that all models except the Flat baseline are able to complete the seen tasks at around 85% success rate. The performance of the Flat baseline decreases dramatically when training with more than 400 tasks. It is because the Flat model has very limited expressiveness power to represent complex tasks. The Flat (GRU) model performs surprisingly well on the seen tasks. However, as shown in Figure 6, both Flat and Flat (GRU) fail to generalize to unseen tasks. We hypothesize that the Flat (GRU) baseline simply memorizes the training sequences. On the other hand, NTP achieves increasingly better performances when the diversity of the training data increases. We evaluate task topology generalization on random permutations of the pick-and-place sub-tasks that lead to the same end configuration. Specifically, the task variations are generated by randomly shuffling the order that the "block towers" are built in the training tasks. Figure 6 illustrates that NTP generalizes better towards variable topologies when trained on a larger variety of tasks. We find that increasing the diversity of training data facilitates NTP to learn better generalizable modules. Next, we evaluate task semantics generalization. The variability of real-world environments prevents any taskspecific policy learning method from training for every possible task. Figure 6(A) illustrates that NTP generalizes well to novel task demonstrations and new goals. As the number of training tasks increases, both NTP and its recurrent variation steadily improve their performance on the unseen tasks. When trained with 1000 tasks, their performances on unseen tasks are almost on par with that of seen tasks. The performance gaps between NTP (no scope) and NTP highlight the benefit of the scoping constraint. NTP (no scope) performance drops gradually as the task size grows implying that the programs in NTP learn modularized and reusable semantics due to information hiding, which is crucial to achieving generalization towards new tasks. Real robot. Table I shows the results of the Object Sorting task in the real world setting. We carried out 20 trails of randomly selected unseen Block Stacking tasks. Out of the 2 failure cases, one is caused by an incorrect placing; the other is caused by the gripper knocking down a stacked tower and not able to recover from the error. A. Seen Task Objectives Block Stacking: Task Semantics B. Unseen Task Objectives Block Stacking: Task Topology Fig. 6: Task Semantics: Simulated evaluation of the Block Stacking. The x-axis is the number of tasks used for training. The y-axis is the overall success rate. (A) and (B) show that NTP and its variants generalize better to novel task demonstrations and objectives as the number of training tasks increases. Task Topology: Simulated evaluation of the Block Stacking. NTP shows better performance in task topology generalization as the number of training tasks grows. In contrast, the flat baselines cannot handle topology variability. B. Unseen Task Objectives N/A N/A Block Stacking: Visual State N/A N/A A. Seen Task Objectives A. Adversarial Dynamics We show that the reactive core network in NTP enables it to better recover from failures compared to its recurrent variation. We demonstrate this by performing Block Stacking under an adversary. Upon stacking each block, an adversary applies a force to the towers with a probability of 25%. The force can knock down the towers. We evaluate NTP and its recurrent variant on the 1000 unseen tasks. Table II shows that under the same adversary, the success rate of NTP with the GRU core decreases by 46%, whereas the success rate of NTP only decreases by 20%. This indicates that a reactive model is more robust against unexpected failures as its behavior is less history dependent than the recurrent counterpart. We also demonstrate this feature in the supplementary video in the real world setting. B. NTP with Visual State This experiment examines the ability of NTP to learn when demonstrations come in the form of videos and the state is a single image. Unlike the full state information used in experiments thus far, we train an NTP model NTPVID (E2E) to jointly learn a policy and task-relevant features without explicit auxiliary supervision. An alternative is to use a 2phase pipeline with an object detector as state preprocessor for NTP, termed as NTPVID (Detector). The detector is a separately trained CNN to predict object position in R3 . We explore these results in Figure 7, where we see compare the visual models (NTPVID (E2E) and NTPVID (Detector)) against the best full state model (NTP), all trained on 100 demonstrations per task, for a varying number of tasks. For NTPVID (E2E) we use a 7-layer convolutional network, which takes as input a 64 × 64 image and outputs a length 128 feature vector. For NTPVID (Detector) , we use a VGG16 Fig. 7: NTP with Visual State: NTPVID (Detector) uses an object detector on images which is subsequently used as state in NTP. NTP (E2E) is an end-to-end model trained completely on images with no low-level state information. We note that in the partial observation case (only video), similar learning trends were observed as compared to fully observed case (NTP (Full State)), albeit with a decrease in performance. based architecture, predicting the position of the N-task objects from an input image of size 224 × 224. We note that NTPVID (E2E) outperforms NTPVID (Detector) and achieves a higher success rate despite only having partial state information. Both of these methods are inferior to the full-state NTP version. NTPVID (Detector) does not generalize due to task-specific state representation, and cascading errors in detection propagate to NTP reducing performance even when using a very deep network for the detection. The detector errors are Gaussian with standard deviation of 2 cm. However, this performance comes at a computational cost. NTPVID (E2E) was trained on 1000 training tasks for 10 days on 8 Nvidia Titan X GPUs. NTPVID (Detector) was trained for 24 hours on a single GPU. Due to computational cost, we only evaluated NTPVID (E2E) on 400 and 1000 training tasks. VIII. E XPERIMENT 3: TABLE C LEAN - UP Setup. We also evaluate NTP on the Table Clean-up task, which exemplifies a practical real-world task. Specifically, the goal of the task is to clear up to 4 white plastic bowls and 20 red plastic forks into a bin such that the resulting stack of bowls and forks can be steadily carried away in a tray. Task variation comes in task length, where the number of utensils varies, and task topology, where the ordering in which bowls are stacked can vary. Using trajectories as demonstrations and object positions as state space, a model is trained using 1000 task instances. Simulator. We observe that performance varies between 55%-100% where increasing errors with more objects are attributed to failures in collision checking, not incorrect decisions from NTP. The result shows that NTP retains (e.g. grasping failures and collisions). Tasks Blk. Stk. Sorting # Trials Tasks 20Stk. Blk. 10 Sorting Success # Trials 0.9 20 0.8 10 NTP Fail NTP Manip. Success Fail Fail Manip. Fail 0.05 0.9 0.050.05 0.05 0.80 0 0.20 0.20 3 B, 2 F 3 B, 3 F 0.60 0.55 Fig. 8: Table Cleanup: in simulated and real environment.The table shows success rates for varying numbers of forks and bowls in simulated evaluation. II: TABLE RecoverII:from failure: results of the Block Recover fromEvaluation failure: Evaluation results of the Block TABLE Real Robot Evaluation: Results 20find unseen Stacking Task in a I: simulated adversarial environment. We that Block Task in a simulated adversarial environment. We findof that # Bowls, Success Stacking evaluations andwith 10 unseen evaluations on Sawyer Fig. 8: Table Cleanup: in simulated and real environment.The table NTP with GRU performs markedly worse withsorting intermittent failures. h GRU performs markedly worse intermittent failures. # Forks robot for the NTP model trained on simulator. NTP Fail denotes shows success rates for varying numbers of forks and bowls in 2 B, 1 F 1.00 No failure With failures algorithmic mistake, while Manip. Fail denotes a mistake in evaluation. Model an Model No failure With failures simulated 2 B, 2 F 0.95 NTP 0.863 0.663 physical interaction (e.g. grasping NTP 0.863 0.663 failures and collisions). 0.884 0.422 0.422 NTP (GRU)NTP (GRU) 0.884 Tasks # Trials Success NTP Fail Manip. Fail [5] 3 B, 2 F 0.75 P. Bacon, J. Harb, and D. Precup, “The option-critic 3 B, 3architecture”, F 0.55 arXiv preprint arXiv:1609.05140, 2016. Blk.aStk. 20 0.9 0.05 instead 0.05 of a Simulator. We use full Sawyer robot model putational cost, we Sorting only evaluated NTPVID (E2E) on0.20 [6] A. Billard, Fig. 8: Clean-up: in simulated and real environment.The S. Table Calinon, R. Dillmann, and S. Schaal, “Robot program10 0 gripper only, and we evaluate NTP 0.8 performance on this task table shows success rates for varying numbers of forks and bowls ming by demonstration”, in Handbook of robotics, 2008. d 1000 training tasks. TABLE II: Adversarial Dynamics: Evaluation results of the Block in the “A simulated in a simulator. WeTask observe that performance varies between [7] that R. Brooks, robust evaluation. layered control system for a mobile robot”, Stacking in a simulated adversarial environment. We find 55%-90% where increasing errors with more objects can IEEE journal on roboticsinand automation, 1986. VIII. E XPERIMENT 3:performs TABLEmarkedly C LEANworse U P with intermittent failures. NTP with GRU Fig. 9: Table Cleanup: simulated and real environment.The table [11] L. Fei-Fei, R. Fergus, and P. Perona, “One-shot learning of object [8] Bullet Physics Library, http://bulletphysics.org/. be attributed to failures in collision checking,not incorrect shows success rates for varying numbers of forks and and bowls in Model on the No practical failure With failures categories”, transactions on pattern machine p. We also evaluate NTP task of [9] simulated J. Cai, R.evaluation. Shin, and IEEE D. Song, “Making neuralanalysis programming decisions from NTP. NTP 0.863 0.663 intelligence, vol. 28, no. 4, pp. 594–611, 2006. architectures generalize via recursion”, ICLR, 2017. g the table, which combines the features stacking (GRU) 0.884theof 0.422model on [12] R. E. P. E. Hart, and N.and J. Nilsson, “Learning and executing Real robot. We haveNTP also transferred trained [14] R. Fox, S. Fikes, Krishnan, I. Stoica, K. Goldberg, [10] C. Devin, A.generalized Gupta, T. robot Darrell, P. Abbeel, and S. Levine, “Multi-Level “Learning plans”, ARTIFICIAL INTELLIGENCE, 1972. ting. Specifically, the goal of the task is to clear upto Discovery of Deep Options”, preprint arXiv:1703.08294, 2017. its generalization abilitythe in feasibility a task thatasrequires the real-Sawyer arm to evaluate shown multiple in Modular Network PoliciesI. in for Multi-Task and Multi-Robot [13]Neural R. Fox, S. Krishnan, Stoica, and K. Goldberg, “Multi-Level [15] C. L. Giles, C. B. Miller, D. Chen, H.-H. Chen, G.-Z. Sun, and plastic bowls and 20 red plastic forks into a bin such Transfer”, arXiv preprint arXiv:1609.07088, 2017. dimensions of generalization. Discovery of Deep Options”, in Preprint arXiv:1703.08294, 2017. Figure 9. We also demonstrate this task in the supplementary Y.-C. Lee, “Learning and extracting finite state automata with second[11] J. Devlin, J. Uesato, S. Bhupatiraju, R. Singh, A.-r. Mohamed, and C. L. Giles, C. B. Miller, D. Chen, H.-H. Chen, G.-Z. Sun, and [14] resulting ofworld bowls and forks can be steadily Real robot. Wesetting. have also transferred the trained model on video in stack the real order recurrent networks”, Learning, vol. 4, no. 3, with 2008. Y.-C. Lee, neural “Learning and extracting finite state automata secondP. Kohli, “RobustFill: Neural Program Learning under Noisy I/O”, the real-Sawyer arm tocomes evaluate in away in a tray. Task variation in the taskfeasibility length, as shown [16] A. Graves, G. Wayne,neural and I.networks”, Danihelka, “Neuralvol. Turing order recurrent 4, no.Machines”, 3, 2008. arXiv preprint arXiv:1703.07469, 2017. Learning, IX. D ISCUSSION & task Fthis UTURE Wthe ORK arXiv preprint arXiv:1410.5401, 2014.“Long short-term memory”, Neural 8. Wevaries, demonstrate task in supplementary video S. Hochreiter and J. Schmidhuber, [15] he number ofFigure utensils and topology, where [12] A. Dosovitskiy and V. Koltun, “Learning to act by predicting the [17] S. Hochreiter and J. vol. Schmidhuber, “Long short-term memory”, Neural computation, 9, no. 8, pp. 1735–1780, 1997. in thebowls real world setting. ICLR, 2017. Neural Programming eringWe in introduced which areTask stacked can vary.(NTP), Usinga meta- future”,[16] T. M. Jochem, and C. E. Thorpe, “Maniac: A next computation, vol. 9, D. no.A.8,Pomerleau, pp. 1735–1780, 1997. [13] [18] Y. Duan, Andrychowicz, B. C. Stadie, J. Ho, J. Schneider, generation based autonomous follower”, in Int’l Conf. framework that learns modular reusable neural T. M.M.Jochem, D.neurally A. Pomerleau, and C. E. road Thorpe, “Maniac: A next rieslearning as demonstrations and object positions as state IX. D ISCUSSION & Fand UTURE W ORK I. Sutskever, Abbeel,based and autonomous W. Zaremba, “One-Shot Imitation onP.Intelligent Autonomous Systems, IOS Publishers, Amsterdam., generation neurally road follower”, in Int’l Conf. programs for hierarchical tasks. We demonstrate NTP’s a model is trained using 1000 demonstrations. Learning”, arXiv preprint arXiv:1703.07326, Pittsburgh, PA, 1993, pp. 15–18. IOS 2017. We introduced Neural Task Programming (NTP), a metaon Intelligent Autonomous Systems, Publishers, Amsterdam., in two thatinstead require pro[17] J. Kober, A. Peters, “Reinforcement [14] Y. Duan, J. Schulman, X. Bagnell, Chen, P.and L.J.Bartlett, I. Sutskever, learning and P. in tedstrengths world. We use robot aframework full manipulation Sawyer model Pittsburgh, PA, J. 1993, pp. 15–18. learning that robot learnstasks modular and reusable neural 2robotics: AFern, survey”, The Int’l Journal ofGoetschalckx, Robotics Research, vol. 32, Abbeel, “RL : Fast Reinforcement Learning via Slow Reinforcement longed and complex interactions with the environment. NTP [19] K. Judah, A. P. P. Tadepalli, and R. “Imitation programs for hierarchical tasks. We demonstrate NTP’s ipper only, and we evaluate NTP performance on no. 11,preprint pp. 1238–1274, 2013. Learning”, arXiv arXiv:1611.02779, 2016. learning with demonstrations and shaping rewards”, in AAAI, 2014. strong generalization results towards varies task [18] S. Krishnan*, A. Garg*, S. Patil, C. Lea, G. Hager, P. Abbeel, and strengths in three that robot manipulation tasks length, that require k inachieves a simulator. We observe performance J. Kober, J. A. Bagnell, and J. state Peters, “Reinforcement learning in [15] [20] L. Fei-Fei, R. and“Transition P. Perona, “One-shot of object K. Fergus, Goldberg, clustering:learning Unsupervised surgical topology, and semantics. This work opens up with the opportunity prolonged and complex interactions the environment. robotics: A survey”, The Int’l Journal of Robotics Research, vol. 32, categories”, IEEE transactions on pattern analysis and machine n 55%-90% where increasing errors with more objects trajectory segmentation for robot learning”, IJRR, 2018. to use generalizable neural programs fortowards modeling no. 11,T. pp. 1238–1274, NTP achieves generalization taskhierarchical length, topology, intelligence, vol. no. 4, pp. 594–611, 2006. [19] D.28, Kulkarni, K.2013. Narasimhan, A. Saeedi, and J. Tenenbaum, attributed to failures in collision checking,not incorrect [21] S. Krishnan*, A. Garg*, C. Lea, G. Hager, P. executing Abbeel, and “Hierarchical deepN.S. reinforcement learning: Integrating temporal [16] R. E. Fikes, P. E. Hart, and J.Patil, Nilsson, “Learning and semantics. This opens uptothe opportunity to use tasks. We and intend to extend thiswork framework tackle a richer K. Goldberg, “Transition state clustering: Unsupervised surgical ns from NTP. abstraction and Artificial intrinsic motivation”, in NIPS, 2016. generalized robot plans”, Intelligence, 1972. generalizable neural programs for modeling hierarchical set of complex tasks on real robots in future work. trajectory segmentation for robot 2018. [20] Mnih, K. I. Kavukcuoglu, D.learning”, Silver, A. IJRR, A. Rusu, J. Veness, M. G. [17] state R. Fox, S. V. Krishnan, Stoica, and K. Goldberg, “Multi-Level orld. We have also model on tasks. Fortransferred future work,the wetrained intend to 1) improve the [22] T. D. Kulkarni, K. Narasimhan, A. Saeedi, and J. Tenenbaum, Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, Discovery of Deep Options”, in preprint arXiv:1703.08294, 2017. Rthe EFERENCES -Sawyer arm to evaluate feasibility shown insuch as object “Hierarchical et al., “Human-level control through deep Integrating reinforcementtemporal learning”, encoder to extract more task-salientasinformation deep reinforcement learning: [18] C. L. Giles, Nature, C. B. vol. Miller, D. Chen, H.-H. Chen, G.-Z. Sun, and 518, no.motivation”, 7540, pp. 529–533, abstraction and intrinsic in NIPS,2015. 2016. [1] also J. Andreas, D. Klein, S. Levine, “Modular reinforcerelationships, 2)and devise a richer set ofmultitask APIs such as velocity 8. We demonstrate this task in the supplementary Y.-C. Lee, “Learning and extracting finite state automata with secondA. Y. D. Harada, D. andSilver, S. J. Russell, “Policy [23] [21] V. Mnih, K. Ng, Kavukcuoglu, A. A. Rusu, J. invariance Veness, M.under G. mentand learning with policycontrollers, sketches”, in and ICML, torque-based 3) 2017. extend this framework order recurrent neural networks”, Learning, vol. 4, no.to3,reward 2008. n the[2]realJ. world reward Theory and shaping”, Bellemare, A.transformations: Graves, M. Riedmiller, A. application K. Fidjeland, G. Ostrovski, Andreas,setting. M. Rohrbach, T. Darrell, and D. Klein, “Neural module in ICML, 1999, pp. 278–287. [19] A. Graves, Wayne, and control I. Danihelka, Turing Machines”, to tackle more 2016. complex tasks on real robots. et al.,G. “Human-level through“Neural deep reinforcement learning”, networks”, in CVPR, [22] Y. Ng J. Russell, “Algorithms for inverse reinforcement arXiv preprint arXiv:1410.5401, 2014. IX. B.DD. ISCUSSION & F UTURE W ORK Nature,A.vol. 518,and no.S.7540, pp. 529–533, 2015. [3] Argall, S. Chernova, M. Veloso, and B. Browning, “A Survey ACKNOWLEDGMENT learning.”, in ICML, 2000. [20] [24] S. Hochreiter andS.J. Sen, Schmidhuber, “Long memory”, Neural A. Murali, B. Kehoe, A. Garg,short-term S. McFarland, et al., “Learning of Robot Learning from Demonstration”, Robotics and Autonomous [23] R.vol. Parr9,and S.8,J. pp. Russell, “Reinforcement learning with hierarchies ntroduced Neural Task (NTP), a metacomputation, no. 1735–1780, 1997. by observation for surgical subtasks: Multilateral cutting of 3d This was performed at 2009. the SVL at Stanford in affiliation with Systems, vol.research 57, no.Programming 5, pp. 469–483, of machines”, in NIPS, 1998. [21] T. M. Jochem, A. and Pomerleau, andtissue C.“Neural E.phantoms”, Thorpe, “Maniac: A next viscoelastic and 2d N. orthotropic in IEEE Int’l Conf.in [4] P. Bacon, J. learns Harb, D.Stanford-Toyota Precup,and “Thereusable option-critic architecture”, g framework that modular the Stanford AIand Lab, AI Center. neural [24] S. D. Reed de Freitas, programmer-interpreters”, on Robotics and Automation, ICRA, 2015. generation neurally based autonomous road follower”, in Proceedings arXiv preprint arXiv:1609.05140, 2016. ICLR, 2016. ms for tasks.R. Dillmann, We Rdemonstrate [25] A. Y. S. Ng,Ross, D. Harada, and on S.and J. Russell, “Policy invariance under [5] hierarchical A. Billard, S. Calinon, and S. Schaal, NTP’s “Robot programof the [25] International Conference Intelligent Autonomous Systems, EFERENCES G. J. Gordon, D. Bagnell, “A reduction of imitation rewardlearning transformations: Theory and application to reward shaping”,in hs in twoming robot manipulation tasks that require proby demonstration”, in Handbook of robotics, 2008. and structured prediction to no-regret online learning”, IOS Publishers, Amsterdam., Pittsburgh, PA, 1993, pp. 15–18. [1] J. Andreas, D. Klein, and S. Levine, “Modular multitask reinforcein ICML, 278–287.Intelligence R. Brooks, “A robust layered control system in forICML, a mobile Conf. pp. on Tadepalli, Artificial and Statistics, 2011. [22] K. Judah, A.Int’l P. 1999, Fern, P. and R. Goetschalckx, “Imitation ment learning with the policy sketches”, 2017.robot”, and [6] complex interactions with environment. NTP [26] A.with Y. Ng and S. D. J. Russell, “Algorithms reinforcement [26] T.demonstrations Schaul, Horgan, Gregor, rewards”, andfor D.inverse Silver, “Universal value IEEE journal on robotics automation, 1986. learning andK. shaping in AAAI, 2014. [2] J. Andreas, M. and Rohrbach, T. Darrell, and D. Klein, “Neural module s strong generalization results task length, [23] Ł. Kaiser approximators”, ICML, learn 2015. algorithms”, arXiv learning.”, in ICML, 2000. [7] Bullet Physics Library, networks”, inhttp://bulletphysics.org/. CVPR, towards 2016. andfunction I. Sutskever, “NeuralinGPUs [27] Sen*, D.“Reinforcement Gealy, S. McKinley, Y. Jen, andhierarchies K. Goldberg, [27] R.arXiv:1511.08228, ParrS.and S. A. J. Garg*, Russell, learning with [8] semantics. J. Cai,[3]R. B. Shin, and D. Song, up “Making neural D. Argall, S. opens Chernova, M.the Veloso, and B.programming Browning, “A Survey y, and This work opportunity preprint 2015. “Autonomous Multiple-Throw Multilateral Surgical Suturing with a of machines”, in NIPS, 1998. architecturesofgeneralize via recursion”, ICLR, 2017. Robot Learning from Demonstration”, Robotics and Autonomous [24] S. Krishnan,Mechanical A. Garg, Needle S. Patil, C. and Lea, G. Hager,based P. Abbeel, and eneralizable neural programs hierarchical Guide Optimization Needle Planning”, [28] S. Reed and N. de Freitas, “Neural programmer-interpreters”, in [9] J. Devlin, J.Systems, Uesato, S. Bhupatiraju, Singh, A.-r. vol. 57,for no. modeling 5, pp.R. 469–483, 2009. Mohamed, and K. Goldberg, “Transition state clustering: Unsupervised surgical in IEEE Int. Conf. Robotics and Automation (ICRA), 2016. [4] P. Bacon, J. Harb, and D. Precup, “The option-critic architecture”, ICLR, 2016. Kohli, “RobustFill: Neural Program Noisy I/O”, We intendP. to extend this framework to Learning tackle aunder richer [28] J. Sung, Selman, andD. A.Bagnell, Saxena,IJRR, “Learning of contrajectory segmentation for robot learning”, 2018.sequences ArXiv preprint arXiv:1609.05140, 2016. [29] S. Ross, G. J. B. Gordon, and “A reduction of imitation arXiv preprint arXiv:1703.07469, 2017. trollersK. complex manipulation in International Conference omplex tasks on A. real robotsCalinon, in future work. [25] T. D. learning Kulkarni, Narasimhan, A. Saeedi, and J. Tenenbaum, [5] Billard, R. Dillmann, “Robot programand for structured prediction to tasks”, no-regret online learning”, in [10] A. Dosovitskiy and V.S.Koltun, “Learning to and act S. bySchaal, predicting the ondeep Machine Learning, Citeseer, 2013. Integrating temporal “Hierarchical reinforcement learning: ming by demonstration”, in Handbook of robotics, 2008. Int’l Conf. on Artificial Intelligence and Statistics, 2011. future”, ICLR, 2017. [29] and R. S.intrinsic Sutton, D.motivation”, Precup, and S.in Singh, “Between and semi-mdps: R. Brooks, “A robustB.layered controlJ. system a mobile robot”, [6] R EFERENCES abstraction NIPS, 2016. mdps [30] T. Schaul, D. Horgan, Gregor, and D. Silver, “Universallearning”, value [11] Y. Duan, M. Andrychowicz, C. Stadie, Ho, J.forSchneider, A framework for K. temporal abstraction in reinforcement IEEE journal on robotics and automation, 1986. [26] K. Kurach, M. Andrychowicz, and I. Sutskever, “Neural randomfunction approximators”, invol. ICML, 2015. P.S.Abbeel, and W. Zaremba, “One-Shot Imitation Andreas, I. D. Sutskever, Klein, and Levine, “Modular multitask reinforceArtificial intelligence, 112, no. 1-2, pp. 181–211, 1999. [7] J. Cai, R. Shin, and D. Song, “Making neural programming access [30] machines”, arXiv preprint [31] S. Sen*, Garg*, S. Jen,2015. and survey K. Goldberg, Learning”, arXivsketches”, preprint arXiv:1703.07326, R. A. Vilalta andD. Y.Gealy, Drissi,arXiv:1511.06392, “AMcKinley, perspectiveY.view and of metaent learning with policy in ICML, 2017. 2017. architectures generalize via recursion”, ICLR, 2017. “Autonomous Multiple-Throw Multilateral Surgical SuturingM.with [27] V. Mnih, K. learning”, Kavukcuoglu, D.Intelligence Silver, A. Review, A. Rusu, J. Veness, G. a [12] L. Fei-Fei, and P.Y.Perona, “One-shot learning of object Artificial 2002. Andreas, M. Rohrbach, T. Darrell, D. “Neural module [8] R. E. Fergus, Coumans andand Bai,Klein, Pybullet, a python module for physics Mechanical Needle Guide and Optimization based Needle Planning”, categories”, IEEE transactions on pattern analysis and machine [31] O. Vinyals, C. Blundell, T. Lillicrap, D. Wierstra, et al., “Matching Bellemare, A. Graves, M. Riedmiller, A. K. Fidjeland, G. Ostrovski, simulation, games, robotics and machine learning, http : / / etworks”, in CVPR, 2016. IEEE Int. Conf. Robotics and Automation (ICRA), 2016. networks for one shot learning”, in reinforcement Advances in Neural Information intelligence,pybullet.org/, vol. 28, no. 4, pp.2016–2017. 594–611, 2006. et al., in “Human-level control through deep learning”, M. Andrychowicz, M. Denil, S. G. Colmenarejo, M. W. Hoffman, Processing Systems, 2016, pp. 3630–3638. [13] R. E. Fikes, P.Devlin, E. Hart, and N. S. J. Nilsson, “Learning and executing Nature, vol. 518, no. 7540, pp. 529–533, 2015. [9] J. J. Uesato, Bhupatiraju, R. Singh, A.-r. Mohamed, and . Pfau, T. Schaul, and N. de Freitas, “Learning to learn by gradient [32] S. Y. Wu Demiris, A. “Towards learning byS.imitation generalized P. robot plans”, Artificial Intelligence, Kohli, Neural Program 1972. Learning under Noisy [28] I/O”, A. Murali, Sen,andB.Y. Kehoe, Garg,one S. shot McFarland, Patil, for escent by gradient descent”, in“RobustFill: NIPS, 2016. humanoid robots”, in ICRA, 2010. ArXiv preprint arXiv:1703.07469, 2017. W. D. Boyd, S. Lim, P. Abbeel, and K. Y. Goldberg, “Learning . D. Argall, S. Chernova, M. Veloso, and B. Browning, “A Survey [33] Y. Zhu, R. Mottaghi, E. Kolve, J. J. Lim, A. Gupta, L. Fei-Fei, and [10] Y. Duan, M. Andrychowicz, B. C. Stadie, J. Ho, J. Schneider, by observation for surgical subtasks: Multilateral of Scenes 3d visA. Farhadi, “Target-driven Visual Navigationcutting in Indoor using Robot Learning fromI. Demonstration”, Robotics andZaremba, Autonomous Sutskever, P. Abbeel, and W. “One-Shot Imitation coelastic andDeep 2d orthotropic tissue phantoms”, in IEEE Reinforcement Learning”, in ICRA, 2017. International ystems, vol. 57, no. 5,Learning”, pp. 469–483, ArXiv 2009. preprint arXiv:1703.07326, 2017.
2cs.AI
On One Generalization of LRC Codes with Availability Stanislav Kruglik∗†‡ , Marina Dudina∗, Valeriya Potapova∗† and Alexey Frolov∗† ∗ Skolkovo Institute of Science and Technology Moscow, Russia arXiv:1705.11095v1 [cs.IT] 30 May 2017 † Institute for Information Transmission Problems Russian Academy of Sciences Moscow, Russia ‡ Moscow Institute of Physics and Technology Moscow, Russia [email protected], [email protected], [email protected], [email protected] Abstract—We investigate one possible generalization of locally recoverable codes (LRC) with all-symbol locality and availability when recovering sets can intersect in a small number of coordinates. This feature allows us to increase the achievable code rate and still meet load balancing requirements. In this paper we derive an upper bound for the rate of such codes and give explicit constructions of codes with such a property. These constructions utilize LRC codes developed by Wang et al. I. I NTRODUCTION A locally recoverable code (LRC) is a code over finite alphabet such that each symbol is a function of small number of other symbols that form a recovering set [1], [2], [3], [4], [5]. These codes are important due to their applications in distributed and cloud storage systems. LRC codes are wellinvestigated in the literature. The bounds on the rate and minimum code distance are given in [1], [3] for the case of large alphabet size. The alphabet-dependent shortening bound (see [6] for the method explanation) is proposed in [7]. Optimal code constructions are given in [8] based on rankmetric codes (for large alphabet size, which is an exponential function of the code length) and in [9] based on Reed-Solomon codes (for small alphabet, which is a linear function of the code length). The natural generalization of an LRC code is an LRC code with availability (or multiple disjoint recovering sets). Availability allows us to handle multiple simultaneous requests to erased symbol in parallel. This property is very important for hot data that is simultaneously requested by a large number of users. The case of LRC codes with availability is much less investigated. Bounds on parameters of such codes and constructions are given in [4], [10], [11], [12]. Most of the papers focused on information-symbol locality and availability. In what follows we are interested in all-symbol locality and availability that is preferable in applications as it permits a uniform approach system design. The property of availability decreases maximum achievable code rate [10]. In this paper we propose a new generalization of LRC codes with availability. Namely, we assume that recovering sets can intersect in a small number of coordinates. This feature allows us to increase the achievable code rate and still meet load balancing requirements. Our contribution is as follows. We investigate one possible generalization of locally recoverable codes (LRC) with allsymbol locality and availability when recovering sets can intersect in a small number of coordinates. We derive an upper bound for the rate of such codes and give explicit constructions of codes with such a property. These constructions utilize LRC codes developed in [13]. II. P RELIMINARIES A. LRC codes Let us denote by Fq a field with q elements. Let [n] = {1, 2, . . . , n}. The code C ⊂ Fnq has locality r if every symbol of the codeword c ∈ C can be recovered from a subset of r other symbols of c [1]. In other words, this means that, given c ∈ C, i ∈ [n], there exists a subset of coordinates Ri ⊂ [n]\i, |Ri | ≤ r such that the restriction of C to the coordinates in Ri enables one to find the value of ci . The subset Ri is called a recovering set for the symbol ci . B. LRC codes with availability Generalizing this concept, assume that every symbol of the code C can be recovered from t disjoint subsets of symbols of size r. More formally, denote by CI the restriction of the code C to a subset of coordinates I ⊂ [n]. Given a ∈ Fq define the set of codewords C(i, a) = {c ∈ C : ci = a}, i ∈ [n]. Definition 1: A code C is said to have t disjoint recovering sets if for every i ∈ [n] there are t pairwise disjoint subsets R1i , . . . , Rti ⊂ [n]\i such that for all j = 1, . . . , t and every pair of symbols a, a′ ∈ Fq , a 6= a′ C(i, a)Rj ∩ C(i, a′ )Rj = ∅. i i In what follows we refer these codes as (r, t)-LRC codes. We briefly list the existing results below. The first bound for (r, t)-LRC codes was given in [14], [15]   t(k − 1) + 1 . d≤n−k+2− t(r − 1) + 1 An improvement of this bound was obtained in [10]  t  X k−1 d≤n− . ri i=0 III. A N min k−1 1≤x≤⌈ (r−1)t+1 ⌉;1≤yj ≤t;j∈[x] A. The recovery graph dql−opt [n − B, k − A], A<k;x,yj ∈Z + P P where A = xj=1 (r −1)yj +x, B = xj=1 ryj +x and dql−opt denote the largest possible minimum distance of a code over Fq . The bound on the rate of (r, t)-LRC codes was given in [10] t Y 1 k (1) ≤ R∗ (r, t) = 1 . n 1 + ir i=1 This bound was improved in [11] for t = 2. In [13] a recursive construction of binary (r, t)-LRC codes was proposed. The parameters of these codes are as follows:  r n = r+t , R = t r+t and d = t + 1. We refer these codes as WZL codes. WZL code is defined by its’ parity-check matrix. Let m = r + t. Let us define matrix H(m, t) as follows. Each row of H(m, t) is associated with (t − 1)-subset of [m] sorted in lexicographical order, each column – with t-subset of [m] also sorted in lexicographical order. In this case the element (i, j) of H(m, t) is equal to 1 if Ei ⊆ Fj , where Ei is (t − 1)-subset of [m] associated with i-th row and Fj is t-subset of [m] associated with  j-th column.  It must be m mentioned that H(m, t) has t−1 rows and m t columns and has the following structure: H(m, t) = (r, t, x)-LRC CODES An alphabet-dependent bound was proposed in [12] and has form d≤ UPPER BOUND ON THE RATE OF Based on the original idea from [10] we represent locally recoverable codes with locality r and availability t as a graph G in the following way. In accordance to the Definition 2 a coordinate i has t recovering sets R1i , ...Rti , each of size r, where Rji ⊂ [n]\i. Define a directed graph G as follows. The set of vertices V = [n] corresponds to the set of n coordinates of the LRC code. The ordered pair of vertices (i, j) forms a directed edge i → j if j ∈ Rli for some l ∈ [t]. We color the edges of the graph with t distinct colors in order to differentiate between the recovering sets of each coordinate. Note, that as the recovering sets can intersect, then some edges may have several colors. We call G the recovery graph of the code C. In what follows we need the following lemma Lemma 1: Let j ∈ [t] and s = min{j, ⌊r/x⌋ + 1}, then j [ (2r − (s − 1)x) Rli ≤ N (r, j, x) = jr. s = N (r, j, x) ≤ 2 l=1 Proof: The upper bound is trivial and correspond to the case, when recovering sets do not intersect. To prove the lower bound assume, that any two recovering sets intersect in exactly x positions, we have t [ Rli ≥ r + (r − x) + (r − 2x) + . . . + (r − (s − 1)x) = (2r − (s − 1)x) s. 2 l=1 Corollary 1: The out-degree of each vertex i ∈ V = V (G) is upper bounded with tr and lower bounded with N (r, t, x). ! H(m − 1, t − 1) 0 I(m−1) H(m − 1, t) , t−1 where H(m, m) = H(m, 1)T = dim(H(m, 1)) = dim(H(m, t)) = m. (1, ..., 1)T and C. LRC codes with availability and intersection of recovering sets Let us give to recovering sets an ability to intersect in at most x positions and define this code as (r, t, x)-LRC. More formally, we can say Definition 2: A code C is said to be (r, t, x)-LRC if for every i ∈ [n] there are t subsets Ri1 , ..., Rit ⊂ [n] \ i such, that the following relations follow 1) for every pair l, l′ ∈ [t], l 6= l′ ′ |Ril ∩ Ril | ≤ x; 2) for all j = 1, . . . , t and every pair of symbols a, a′ ∈ Fq , a 6= a′ C(i, a)Rj ∩ C(i, a′ )Rj = ∅. i i In what follows we investigate the parameters of such codes. B. Upper bound on the rate The proof is very similar to the proof from [10]. For the simplicity of the reader we present the proof here in all the details. Let us introduce the following function f (r, t, x)   t 1 j N (r, j, x) + 1 j=1,j=1 mod 2   t X t 1 − j N (r, j, x) + 1 = t X j=1,j=0 mod 2 The following lemma will be used in the proof. Lemma 2: There exists a subset of vertices U ⊆ V of size at least |U | ≥ nf (r, t, x), such that for any U ′ ⊆ U , the induced subgraph GU ′ on the vertices U ′ has at least one vertex v ∈ U ′ such that its set of outgoing edges {(v, j), j ∈ U ′ )} is missing at least one color. Proof: For a given permutation τ of the set of vertices V = [n], we define the coloring of some of the vertices as follows: The color j ∈ [t] is assigned to the vertex v if τ (v) > τ (m) for all m ∈ Rjv . (2) Now let Xv be the indicator random variable for the event that v ∈ U , then X E(|U |) = E(Xv ) v∈V = Rjv , If this condition is satisfied for several recovering sets the vertex v is assigned any of the colors j corresponding to these sets. Finally, if this condition is not satisfied at all, then the vertex v is not colored. Let U be the set of colored vertices, and consider one of its subsets U ′ ⊆ U . Let GU ′ be the induced subgraph on U ′ . We claim that there exists v ∈ U ′ such that its set of outgoing edges is missing at least one color in GU ′ . Assume toward a contradiction that every vertex of GU ′ has outgoing edges of all t colors. Choose a vertex v ∈ U ′ and construct a walk through the vertices of GU ′ according to the following rule. If the path constructed so far ends at some vertex with color j, choose one of its outgoing edges also colored in j and leave the vertex moving along this edge. By assumption, every vertex has outgoing edges of all t colors, so this process, and hence this path can be extended indefinitely. Since the graph GU ′ is finite, there will be a vertex, call it v1 , that is encountered twice. The segment of the path that begins at v1 and returns to it has the form v1 → v2 → ... → vl , where v1 = vl . For any i = 1, ..., l − 1 the vertex vi and the edge (vi , vi+1 ) are colored with the same color. Hence by the definition of the set U we conclude that τ (vi ) > τ (vi+1 ) for all i = 1, . . . , l − 1, a contradiction. In order to show that there exists such a set U of large cardinality, we choose the permutation τ randomly and uniformly among all the n! possibilities and compute the expected cardinality of the set U. Let Av,j be the event that (2) holds for the vertex v and the color j. Since Pr(Av,j ) does not depend on v, we suppress the subscript v, and write Pr(v ∈ U ) = Pr(∪tj=1 Aj ). Let us compute the probability of the event ∪tj=1 Aj . Note that for any set S ⊆ [t] the probability of the event that all the Aj , j ∈ S occur simultaneously can be estimated as follows 1 1 ≤ P (∩j∈S Aj ) ≤ . N (r, |S|, x) + 1 N (r, |S|, x) + 1 Hence by the inclusion exclusion formula we get   t X j−1 t t P (A1 ∩ ... ∩ Aj ) (−1) Pr(∪j=1 Aj ) = j j=1   t X t 1 ≥ j N (r, j, x) + 1 j=1,j=1 mod 2   t X t 1 − j N (r, j, x) + 1 j=1,j=0 = Pr(v ∈ U ) v∈V = n Pr(∪tj=1 Aj ) ≥ nf (r, t, x). The proof is completed by observing that there exists at least one choice of τ for which |U | ≥ E(|U |). Theorem 1: The rate of an (r, t, x)-LRC code C satisfies R(C) ≤ R∗ (r, t, x) = 1 − f (r, t, x). Proof: The colored vertices can be viewed as check symbols as they can be recovered from the rest symbols. Thus, the number of information symbols can be estimated as follows k ≤ n(1 − f (r, t, x)). IV. L OWER BOUNDS ON THE RATE OF (r, t, x)-LRC CODES In this section we derive a lower bound on the rate of codes with all symbol locality and availability in which recovering sets can intersect. To find a lower bound we propose the following rather simple code construction. In what follows we explain how to construct a parity-check matrix of a linear (r, t, x)-LRC code. We start with a parity-check of (r̃, x̃)-WZL code. Let is denote the matrix by HWZL . The matrix H of (r, t, x)-LRC code is constructed as follows H = HWZL ⊗ [11 . . . 1], | {z } x+1 where ⊗ denotes a Kronecker product of matrices.  t̃ As a result, we have a matrix of length n = (x + 1) r̃+ t̃ . It is obvious, that each row of the new matrix will have (x + 1)(r̃ + 1) ones and the number of positions, in which two recovering sets intersects is equal to x. This construction will have the same availability t as it was for the standard WZL code. Thus, the parameters of the resulting code are as follows r = (r̃ + 1)(x + 1) − 1 t = t̃ The matrix H has exactly the same rank as the matrix  t̃−1 HWZL , the rank is equal to r̃+ . Thus, the rate of the t̃−1 resulting code can be calculated as follows R t̃ (r̃ + t̃)(x + 1) t  = 1−  r+1 x+1 − 1 + t (x + 1)) = 1− t r + t + (t − 1)x r + (t − 1)x . r + t + (t − 1)x = 1− mod 2 f (r, t, x). X = TABLE I U PPER BOUNDS ON THE RATE OF (r, t, x)-LRC CODES (r, t) (4, 2) (5, 2) (6, 2) (7, 2) (4, 3) (5, 3) (6, 3) (7, 3) x=0 0.7111 0.7576 0.7912 0.8167 0.6564 0.7102 0.7496 0.7795 x=1 0.7250 0.7667 0.7976 0.8214 0.6981 0.7375 0.7688 0.7938 x=2 0.7429 0.7778 0.8052 0.8269 0.7516 0.7708 0.7915 0.8103 x=3 0.7667 0.7917 0.8143 0.8333 0.8231 0.8125 0.8188 0.8295 TABLE II C OMPARISON OF UPPER AND LOWER BOUNDS ON THE RATE OF (r, t, x)-LRC CODES (r, t) (3, 2) (5, 2) (7, 2) (3, 3) (5, 3) (7, 3) x = 0 (WZL) 0.6000 0.7143 0.7778 0.5000 0.6250 0.7000 R∗ (r, t, x = 0) 0.6429 0.7576 0.8167 0.5786 0.7102 0.7795 Example 1: Let us start from  0 0  0 1 HWZL =   1 0 1 1 and construct a The matrix has  0  0 H=  1 1 x=1 0.6667 0.7500 0.8000 0.6250 0.7000 0.7500 R∗ (r, t, x = 1) 0.6667 0.7667 0.8214 0.6500 0.7375 0.7938 an (2, 2)-WZL code  0 1 1 1 1 0 0 1   1 0 1 0  0 1 0 0 parity-check matrix of an (5, 2, 1)-LRC code. a rate R = 0.75 and shown below  0 0 0 0 0 1 1 1 1 1 1 0 1 1 1 1 0 0 0 0 1 1   1 0 0 1 1 0 0 1 1 0 0  1 1 1 0 0 1 1 0 0 0 0 V. N UMERICAL RESULTS In Table I we present the comparison of upper bounds on the rate of (r, t, x)-LRC codes for different values of parameter x. We see that the value of the upper bound increases with the parameter x. In the Table II we present the comparison of the code rate obtained by proposed code construction (x = 1) and the code rate of WZL codes with the same locality and availability. In addition, we include the values of the upper bounds for the code rate from [10] and the upper bounds for the code rate proposed in this paper. We see, that e.g. for r = 3, t = 2 and x = 1 the lower bound is tight and it is better, then the upper bound for the case of r = 3, t = 2 and x = 0. VI. C ONCLUSION We investigated one possible generalization of locally recoverable codes (LRC) with all-symbol locality and availability when recovering sets can intersect in a small number of coordinates. This feature allows us to increase the achievable code rate and still meet load balancing requirements. In this paper we derived an upper bound for the rate of such codes and gave explicit constructions of codes with such a property. ACKNOWLEDGMENT A. Frolov thanks A. Barg for introducing this problem to him and for numerous fruitful discussions during his stay in University of Maryland. R EFERENCES [1] P. Goplan, C. Huang, H. Simitci, and S. Yekhanin, “On the locality of codeword symbols,” IEEE Trans. Inf. Theory, vol. 58, no. 11, pp. 6925–6934, Nov. 2011. [2] P. Goplan, C. Huang, B. Jenkins, and S. Yekhanin, “Explicit maximally recoverable codes with locality,” IEEE Trans. Inf. Theory, vol. 60, no. 9, pp. 5245 –5256, Sep. 2014. [3] D. S. Papailiopoulos and A. G. Dimakis, “Locally repairable codes,” IEEE Trans. Inf. Theory, vol. 60, no. 10, pp. 5843–5855, Oct 2014. [4] A. S. Rawat, O. O. Koyluoglu, N. Silberstein, and S. Vishwanath, “Optimal locally repairable and secure codes for distributed storage systems,” IEEE Trans. Inf. Theory, vol. 60, no. 1, pp. 212–236, Jan 2014. [5] S. Yekhanin, “Locally decodable codes,” Found. Trends Theoretical Comput. Sci., vol. 6, no. 3, pp. 139 –255, 2012. [6] Y. Ben-Haim and S. Litsyn, “Upper bounds on the rate of ldpc codes as a function of minimum distance,” IEEE Trans. Inf. Theory, vol. 52, no. 5, pp. 2092 –2100, May 2006. [7] V. R. Cadambe and A. Mazumdar, “Bounds on the size of locally recoverable codes,” IEEE Trans. Inf. Theory, vol. 61, no. 11, pp. 5787 –5794, Nov. 2015. [8] N. Silberstein, A. S. Rawat, O. Koyluogly, and S. Vishwanath, “Optimal locally repairable codes via rank metric codes,” in Proceedings IEEE International Symposium on Information Theory (ISIT), Jul. 2013, pp. 1819–1823. [9] I. Tamo and A. Barg, “A family of optimal locally recoverable codes,” IEEE Trans. Inf. Theory, vol. 60, no. 8, pp. 4661 –4676, Aug. 2014. [10] I. Tamo, A. Barg, and A. Frolov, “Bounds on the parameters of locally recoverable codes,” IEEE Trans. Inf. Theory, vol. 62, no. 6, pp. 3070 –3083, Jun. 2016. [11] N. Prakash, V. Lalitha, and P. V. Kumar, “Codes with locality for two erasures,” in Proceedings IEEE International Symposium on Information Theory (ISIT), Jun. 2014, pp. 1962–1966. [12] P. Huang, E. Yaakobi, H. Uchikawa, and P. H. Siegel, “Linear locally repairable codes with availability,” in Proceedings IEEE International Symposium on Information Theory (ISIT), Jun. 2015, pp. 1871–1875. [13] A. Wang, Z. Zhang, and M. Liu, “Achieving arbitrary locality and availability in binary codes,” in Proceedings IEEE International Symposium on Information Theory (ISIT), Jun. 2015, pp. 1866 – 1870. [14] A. Wang and Z. Zhang, “Repair locality with multiple erasure tolerance,” IEEE Trans. Inf. Theory, vol. 60, no. 11, pp. 6979–6987, Nov 2014. [15] A. S. Rawat, D. S. Papailiopoulos, A. G. Dimakis, and S. Vishwanath, “Locality and availability in distributed storage,” in Proceedings IEEE International Symposium on Information Theory (ISIT), June 2014, pp. 681–685.
7cs.IT
Mask R-CNN Kaiming He Georgia Gkioxari Piotr Dollár Ross Girshick arXiv:1703.06870v3 [cs.CV] 24 Jan 2018 Facebook AI Research (FAIR) Abstract class box We present a conceptually simple, flexible, and general framework for object instance segmentation. Our approach efficiently detects objects in an image while simultaneously generating a high-quality segmentation mask for each instance. The method, called Mask R-CNN, extends Faster R-CNN by adding a branch for predicting an object mask in parallel with the existing branch for bounding box recognition. Mask R-CNN is simple to train and adds only a small overhead to Faster R-CNN, running at 5 fps. Moreover, Mask R-CNN is easy to generalize to other tasks, e.g., allowing us to estimate human poses in the same framework. We show top results in all three tracks of the COCO suite of challenges, including instance segmentation, boundingbox object detection, and person keypoint detection. Without bells and whistles, Mask R-CNN outperforms all existing, single-model entries on every task, including the COCO 2016 challenge winners. We hope our simple and effective approach will serve as a solid baseline and help ease future research in instance-level recognition. Code has been made available at: https://github.com/ facebookresearch/Detectron. RoIAlign conv conv Figure 1. The Mask R-CNN framework for instance segmentation. segmentation, where the goal is to classify each pixel into a fixed set of categories without differentiating object instances.1 Given this, one might expect a complex method is required to achieve good results. However, we show that a surprisingly simple, flexible, and fast system can surpass prior state-of-the-art instance segmentation results. Our method, called Mask R-CNN, extends Faster R-CNN [36] by adding a branch for predicting segmentation masks on each Region of Interest (RoI), in parallel with the existing branch for classification and bounding box regression (Figure 1). The mask branch is a small FCN applied to each RoI, predicting a segmentation mask in a pixel-topixel manner. Mask R-CNN is simple to implement and train given the Faster R-CNN framework, which facilitates a wide range of flexible architecture designs. Additionally, the mask branch only adds a small computational overhead, enabling a fast system and rapid experimentation. In principle Mask R-CNN is an intuitive extension of Faster R-CNN, yet constructing the mask branch properly is critical for good results. Most importantly, Faster RCNN was not designed for pixel-to-pixel alignment between network inputs and outputs. This is most evident in how RoIPool [18, 12], the de facto core operation for attending to instances, performs coarse spatial quantization for feature extraction. To fix the misalignment, we propose a simple, quantization-free layer, called RoIAlign, that faithfully preserves exact spatial locations. Despite being 1. Introduction The vision community has rapidly improved object detection and semantic segmentation results over a short period of time. In large part, these advances have been driven by powerful baseline systems, such as the Fast/Faster RCNN [12, 36] and Fully Convolutional Network (FCN) [30] frameworks for object detection and semantic segmentation, respectively. These methods are conceptually intuitive and offer flexibility and robustness, together with fast training and inference time. Our goal in this work is to develop a comparably enabling framework for instance segmentation. Instance segmentation is challenging because it requires the correct detection of all objects in an image while also precisely segmenting each instance. It therefore combines elements from the classical computer vision tasks of object detection, where the goal is to classify individual objects and localize each using a bounding box, and semantic 1 Following common terminology, we use object detection to denote detection via bounding boxes, not masks, and semantic segmentation to denote per-pixel classification without differentiating instances. Yet we note that instance segmentation is both semantic and a form of detection. 1 bus.99 umbrella.98 umbrella.98 person1.00 person1.00 person1.00 backpack1.00 person1.00 person1.00 person1.00 person1.00 person.94 person.99 person1.00 handbag.96 person1.00 person1.00 person.95 person1.00 person.89 person1.00 person1.00 person.98 person1.00 person.99 person1.00 sheep.99 backpack.99 backpack.93 sheep1.00 sheep.96 sheep.99 sheep.99 sheep.96 sheep.93 sheep.99 sheep1.00 sheep.91 sheep.86 sheep.96 sheep.82 sheep1.00 sheep.95 sheep.96 sheep.99 dining table.96 person.99 bottle.99 bottle.99 bottle.99 person1.00 person.99person1.00 tv.99 traffic light.96 chair.90 dining table.99 chair.98 chair.99 chair.86 elephant1.00 chair.96 person1.00 person1.00 traffic light.95 person1.00 motorcycle1.00 person.96 person.96person1.00 person.83 person.98 person.99person.91 person.90 person.92 truck1.00 person1.00 chair.96 wine glass.97 bottle.99wine glass.93 bowl.85 wine glass1.00 chair.99 wine glass.99 chair.99 fork.95 bowl.81 traffic light.92 motorcycle1.00 wine glass1.00 traffic light.84 person.87 car1.00 car.99 car.92 person.99 car.99 car.93 motorcycle.95 person1.00 person.85 person.99 knife.83 person.96 Figure 2. Mask R-CNN results on the COCO test set. These results are based on ResNet-101 [19], achieving a mask AP of 35.7 and running at 5 fps. Masks are shown in color, and bounding box, category, and confidences are also shown. 2. Related Work a seemingly minor change, RoIAlign has a large impact: it improves mask accuracy by relative 10% to 50%, showing bigger gains under stricter localization metrics. Second, we found it essential to decouple mask and class prediction: we predict a binary mask for each class independently, without competition among classes, and rely on the network’s RoI classification branch to predict the category. In contrast, FCNs usually perform per-pixel multi-class categorization, which couples segmentation and classification, and based on our experiments works poorly for instance segmentation. Without bells and whistles, Mask R-CNN surpasses all previous state-of-the-art single-model results on the COCO instance segmentation task [28], including the heavilyengineered entries from the 2016 competition winner. As a by-product, our method also excels on the COCO object detection task. In ablation experiments, we evaluate multiple basic instantiations, which allows us to demonstrate its robustness and analyze the effects of core factors. Our models can run at about 200ms per frame on a GPU, and training on COCO takes one to two days on a single 8-GPU machine. We believe the fast train and test speeds, together with the framework’s flexibility and accuracy, will benefit and ease future research on instance segmentation. Finally, we showcase the generality of our framework via the task of human pose estimation on the COCO keypoint dataset [28]. By viewing each keypoint as a one-hot binary mask, with minimal modification Mask R-CNN can be applied to detect instance-specific poses. Mask R-CNN surpasses the winner of the 2016 COCO keypoint competition, and at the same time runs at 5 fps. Mask R-CNN, therefore, can be seen more broadly as a flexible framework for instance-level recognition and can be readily extended to more complex tasks. We have released code to facilitate future research. R-CNN: The Region-based CNN (R-CNN) approach [13] to bounding-box object detection is to attend to a manageable number of candidate object regions [42, 20] and evaluate convolutional networks [25, 24] independently on each RoI. R-CNN was extended [18, 12] to allow attending to RoIs on feature maps using RoIPool, leading to fast speed and better accuracy. Faster R-CNN [36] advanced this stream by learning the attention mechanism with a Region Proposal Network (RPN). Faster R-CNN is flexible and robust to many follow-up improvements (e.g., [38, 27, 21]), and is the current leading framework in several benchmarks. Instance Segmentation: Driven by the effectiveness of RCNN, many approaches to instance segmentation are based on segment proposals. Earlier methods [13, 15, 16, 9] resorted to bottom-up segments [42, 2]. DeepMask [33] and following works [34, 8] learn to propose segment candidates, which are then classified by Fast R-CNN. In these methods, segmentation precedes recognition, which is slow and less accurate. Likewise, Dai et al. [10] proposed a complex multiple-stage cascade that predicts segment proposals from bounding-box proposals, followed by classification. Instead, our method is based on parallel prediction of masks and class labels, which is simpler and more flexible. Most recently, Li et al. [26] combined the segment proposal system in [8] and object detection system in [11] for “fully convolutional instance segmentation” (FCIS). The common idea in [8, 11, 26] is to predict a set of positionsensitive output channels fully convolutionally. These channels simultaneously address object classes, boxes, and masks, making the system fast. But FCIS exhibits systematic errors on overlapping instances and creates spurious edges (Figure 6), showing that it is challenged by the fundamental difficulties of segmenting instances. 2 Figure 3. RoIAlign: The dashed grid rep- Another family of solutions [23, 4, 3, 29] to instance segmentation are driven by the success of semantic segmentation. Starting from per-pixel classification results (e.g., FCN outputs), these methods attempt to cut the pixels of the same category into different instances. In contrast to the segmentation-first strategy of these methods, Mask R-CNN is based on an instance-first strategy. We expect a deeper incorporation of both strategies will be studied in the future. resents a feature map, the solid lines an RoI (with 2×2 bins in this example), and the dots the 4 sampling points in each bin. RoIAlign computes the value of each sampling point by bilinear interpolation from the nearby grid points on the feature map. No quantization is performed on any coordinates involved in the RoI, its bins, or the sampling points. class label used to select the output mask. This decouples mask and class prediction. This is different from common practice when applying FCNs [30] to semantic segmentation, which typically uses a per-pixel softmax and a multinomial cross-entropy loss. In that case, masks across classes compete; in our case, with a per-pixel sigmoid and a binary loss, they do not. We show by experiments that this formulation is key for good instance segmentation results. 3. Mask R-CNN Mask R-CNN is conceptually simple: Faster R-CNN has two outputs for each candidate object, a class label and a bounding-box offset; to this we add a third branch that outputs the object mask. Mask R-CNN is thus a natural and intuitive idea. But the additional mask output is distinct from the class and box outputs, requiring extraction of much finer spatial layout of an object. Next, we introduce the key elements of Mask R-CNN, including pixel-to-pixel alignment, which is the main missing piece of Fast/Faster R-CNN. Mask Representation: A mask encodes an input object’s spatial layout. Thus, unlike class labels or box offsets that are inevitably collapsed into short output vectors by fully-connected (fc) layers, extracting the spatial structure of masks can be addressed naturally by the pixel-to-pixel correspondence provided by convolutions. Specifically, we predict an m × m mask from each RoI using an FCN [30]. This allows each layer in the mask branch to maintain the explicit m × m object spatial layout without collapsing it into a vector representation that lacks spatial dimensions. Unlike previous methods that resort to fc layers for mask prediction [33, 34, 10], our fully convolutional representation requires fewer parameters, and is more accurate as demonstrated by experiments. This pixel-to-pixel behavior requires our RoI features, which themselves are small feature maps, to be well aligned to faithfully preserve the explicit per-pixel spatial correspondence. This motivated us to develop the following RoIAlign layer that plays a key role in mask prediction. Faster R-CNN: We begin by briefly reviewing the Faster R-CNN detector [36]. Faster R-CNN consists of two stages. The first stage, called a Region Proposal Network (RPN), proposes candidate object bounding boxes. The second stage, which is in essence Fast R-CNN [12], extracts features using RoIPool from each candidate box and performs classification and bounding-box regression. The features used by both stages can be shared for faster inference. We refer readers to [21] for latest, comprehensive comparisons between Faster R-CNN and other frameworks. Mask R-CNN: Mask R-CNN adopts the same two-stage procedure, with an identical first stage (which is RPN). In the second stage, in parallel to predicting the class and box offset, Mask R-CNN also outputs a binary mask for each RoI. This is in contrast to most recent systems, where classification depends on mask predictions (e.g. [33, 10, 26]). Our approach follows the spirit of Fast R-CNN [12] that applies bounding-box classification and regression in parallel (which turned out to largely simplify the multi-stage pipeline of original R-CNN [13]). Formally, during training, we define a multi-task loss on each sampled RoI as L = Lcls + Lbox + Lmask . The classification loss Lcls and bounding-box loss Lbox are identical as those defined in [12]. The mask branch has a Km2 dimensional output for each RoI, which encodes K binary masks of resolution m × m, one for each of the K classes. To this we apply a per-pixel sigmoid, and define Lmask as the average binary cross-entropy loss. For an RoI associated with ground-truth class k, Lmask is only defined on the k-th mask (other mask outputs do not contribute to the loss). Our definition of Lmask allows the network to generate masks for every class without competition among classes; we rely on the dedicated classification branch to predict the RoIAlign: RoIPool [12] is a standard operation for extracting a small feature map (e.g., 7×7) from each RoI. RoIPool first quantizes a floating-number RoI to the discrete granularity of the feature map, this quantized RoI is then subdivided into spatial bins which are themselves quantized, and finally feature values covered by each bin are aggregated (usually by max pooling). Quantization is performed, e.g., on a continuous coordinate x by computing [x/16], where 16 is a feature map stride and [·] is rounding; likewise, quantization is performed when dividing into bins (e.g., 7×7). These quantizations introduce misalignments between the RoI and the extracted features. While this may not impact classification, which is robust to small translations, it has a large negative effect on predicting pixel-accurate masks. To address this, we propose an RoIAlign layer that removes the harsh quantization of RoIPool, properly aligning the extracted features with the input. Our proposed change is simple: we avoid any quantization of the RoI boundaries 3 Faster R-CNN w/ ResNet [19] class or bins (i.e., we use x/16 instead of [x/16]). We use bilinear interpolation [22] to compute the exact values of the input features at four regularly sampled locations in each RoI bin, and aggregate the result (using max or average), see Figure 3 for details. We note that the results are not sensitive to the exact sampling locations, or how many points are sampled, as long as no quantization is performed. RoIAlign leads to large improvements as we show in §4.2. We also compare to the RoIWarp operation proposed in [10]. Unlike RoIAlign, RoIWarp overlooked the alignment issue and was implemented in [10] as quantizing RoI just like RoIPool. So even though RoIWarp also adopts bilinear resampling motivated by [22], it performs on par with RoIPool as shown by experiments (more details in Table 2c), demonstrating the crucial role of alignment. 7×7 7×7 ave 2048 RoI ×1024 res5 ×2048 14×14 ×256 Faster R-CNN w/ FPN [27] class box RoI 7×7 ×256 14×14 ×80 RoI 14×14 14×14 ×256 ×4 ×256 mask 1024 1024 28×28 ×256 box 28×28 ×80 mask Figure 4. Head Architecture: We extend two existing Faster RCNN heads [19, 27]. Left/Right panels show the heads for the ResNet C4 and FPN backbones, from [19] and [27], respectively, to which a mask branch is added. Numbers denote spatial resolution and channels. Arrows denote either conv, deconv, or fc layers as can be inferred from context (conv preserves spatial dimension while deconv increases it). All convs are 3×3, except the output conv which is 1×1, deconvs are 2×2 with stride 2, and we use ReLU [31] in hidden layers. Left: ‘res5’ denotes ResNet’s fifth stage, which for simplicity we altered so that the first conv operates on a 7×7 RoI with stride 1 (instead of 14×14 / stride 2 as in [19]). Right: ‘×4’ denotes a stack of four consecutive convs. Network Architecture: To demonstrate the generality of our approach, we instantiate Mask R-CNN with multiple architectures. For clarity, we differentiate between: (i) the convolutional backbone architecture used for feature extraction over an entire image, and (ii) the network head for bounding-box recognition (classification and regression) and mask prediction that is applied separately to each RoI. We denote the backbone architecture using the nomenclature network-depth-features. We evaluate ResNet [19] and ResNeXt [45] networks of depth 50 or 101 layers. The original implementation of Faster R-CNN with ResNets [19] extracted features from the final convolutional layer of the 4-th stage, which we call C4. This backbone with ResNet-50, for example, is denoted by ResNet-50-C4. This is a common choice used in [19, 10, 21, 39]. We also explore another more effective backbone recently proposed by Lin et al. [27], called a Feature Pyramid Network (FPN). FPN uses a top-down architecture with lateral connections to build an in-network feature pyramid from a single-scale input. Faster R-CNN with an FPN backbone extracts RoI features from different levels of the feature pyramid according to their scale, but otherwise the rest of the approach is similar to vanilla ResNet. Using a ResNet-FPN backbone for feature extraction with Mask RCNN gives excellent gains in both accuracy and speed. For further details on FPN, we refer readers to [27]. For the network head we closely follow architectures presented in previous work to which we add a fully convolutional mask prediction branch. Specifically, we extend the Faster R-CNN box heads from the ResNet [19] and FPN [27] papers. Details are shown in Figure 4. The head on the ResNet-C4 backbone includes the 5-th stage of ResNet (namely, the 9-layer ‘res5’ [19]), which is computeintensive. For FPN, the backbone already includes res5 and thus allows for a more efficient head that uses fewer filters. We note that our mask branches have a straightforward structure. More complex designs have the potential to improve performance but are not the focus of this work. 3.1. Implementation Details We set hyper-parameters following existing Fast/Faster R-CNN work [12, 36, 27]. Although these decisions were made for object detection in original papers [12, 36, 27], we found our instance segmentation system is robust to them. Training: As in Fast R-CNN, an RoI is considered positive if it has IoU with a ground-truth box of at least 0.5 and negative otherwise. The mask loss Lmask is defined only on positive RoIs. The mask target is the intersection between an RoI and its associated ground-truth mask. We adopt image-centric training [12]. Images are resized such that their scale (shorter edge) is 800 pixels [27]. Each mini-batch has 2 images per GPU and each image has N sampled RoIs, with a ratio of 1:3 of positive to negatives [12]. N is 64 for the C4 backbone (as in [12, 36]) and 512 for FPN (as in [27]). We train on 8 GPUs (so effective minibatch size is 16) for 160k iterations, with a learning rate of 0.02 which is decreased by 10 at the 120k iteration. We use a weight decay of 0.0001 and momentum of 0.9. With ResNeXt [45], we train with 1 image per GPU and the same number of iterations, with a starting learning rate of 0.01. The RPN anchors span 5 scales and 3 aspect ratios, following [27]. For convenient ablation, RPN is trained separately and does not share features with Mask R-CNN, unless specified. For every entry in this paper, RPN and Mask R-CNN have the same backbones and so they are shareable. Inference: At test time, the proposal number is 300 for the C4 backbone (as in [36]) and 1000 for FPN (as in [27]). We run the box prediction branch on these proposals, followed by non-maximum suppression [14]. The mask branch is then applied to the highest scoring 100 detection boxes. Although this differs from the parallel computation used in training, it speeds up inference and improves accuracy (due to the use of fewer, more accurate RoIs). The mask branch 4 person1.00 person1.00 person1.00 person1.00 person1.00 person.99 person1.00 person1.00 bench.76 person.93 person.99 person1.00 person.95 umbrella.97 umbrella.97 umbrella.96 umbrella.99 person.99 umbrella1.00 person1.00 person.99 person.98 umbrella.89 umbrella1.00 person1.00 person1.00person1.00 person.89 person1.00umbrella.98 person1.00 handbag.97 person.95 person.80 person1.00 backpack.98 backpack.95 backpack.96 skateboard.91 handbag.81 person1.00 person1.00 person.98 person1.00 surfboard1.00 person1.00 person.91 surfboard1.00 surfboard.98 surfboard1.00 person.74 surfboard1.00 person1.00 person.98 person1.00 person1.00 baseball bat.99 handbag.85 person.93 person1.00 person1.00 person.99 horse1.00 horse1.00 horse1.00 skateboard.83 bicycle.93 skateboard.82 baseball bat.85 baseball bat.98dog1.00 person.99 kite.72 kite.89 kite.81 kite1.00 kite.98 person1.00 person.99 kite.73 kite.99 kite.89 kite.88 zebra1.00 zebra.90 zebra.99 zebra.96 zebra.99 zebra.74 zebra.99 zebra.96 zebra.88 zebra1.00 person.82 zebra.76 zebra1.00 kite.82 kite.97 person1.00 person.87 person.95person.72 person.94 person.99 person.92 person.95 person.97 person.99 person.88 person.97 person.97 person.77 person.82 person.83 person.89 person.97 person.98 person.99 person.86 person.81 person.77 person.88 person.98 person.96 person.94 person.88 person.96person.99 person.86 person.99 frisbee1.00 person.80 person.91 chair.96 chair.78 cup.93 cup.79 dining table.81 dining table.75 dining table.96 chair.85 chair.89 cup.75 cup.71 chair.99 chair.95 chair.99 chair.98 chair.92 wine glass.80 chair.85 chair.98 dining table.78 wine glass.80 cup.83 chair.95 cup.71 cup.98 chair.94 chair.87 chair.97 kite.99 kite.95 kite.86 kite.88 kite.84 wine glass.91 wine glass.93 cup.91 person.80 person.87person.71 person.98 person.78 person.89 person.77 person.98 person.98 person.99 person.94 person.81 person.72 person1.00 person.84 person.99 person.95 person.82 person.72 person1.00 person.94 person1.00 person.99 person.99 person.96 person.98 motorcycle.72 person1.00 person1.00 person1.00 person1.00 person1.00 tv.98 person.91 person1.00 person.99 person.99 person1.00person1.00 person.99 person.98 person.80 person1.00 handbag.80 bus1.00 car1.00 car.95truck.86 car.98 bus1.00 car.97 skateboard.98 person1.00 couch.82 person.99 person.90 car.93 car.82 car.99 car.99 car.99 person.99 car.98 car.96 car.91car.94 backpack.88 handbag.91 person.76 person1.00 person.78 person.98 person.78 person.86person1.00 potted plant.92 car.93 car.78 traffic light.73 car.93 car.98 truck.88 skateboard.99 wine wineglass.94 glass.94 wine glass.83 person.88 person1.00 traffic light.87 car.87 car.95 car.95 car.97 car.99 kite.93 diningchair.83 table.91 cup.96 person1.00 kite.98 kite.95 kite.84 car.98 person1.00 person.98 tv.84 car.78 person1.00 elephant1.00 elephant1.00 person1.00 traffic light.99 elephant.97 elephant1.00 bottle.97 person1.00 person.92 person.74 person.87 person.98 person1.00 tie.85 elephant.99 bird.93 traffic light.71 person.98 person.97 person.95 person1.00 person.99 person1.00 person.99 person.95 person.95 person.73 person.98 person.99 person.95 person1.00 person1.00 person.80 person.99 person.95 person1.00 dining table.95 handbag.88 handbag.88 handbag.73 bench.97 wine glass.99 person.99 stop sign.88 person.77 wine glass1.00 person.87 wine glass1.00 person.97 person.81 person.90 cell clock.73 phone.77 handbag.99 person.96 chair.93 chair.81 chair.97 chair.99 chair.99 chair.81 chair.93 chair.94 chair.92 chair.81 chair.98 chair.83 chair.91 chair.80 person.71 person.99 person.94 suitcase.98 suitcase1.00 chair.71 person.98 chair.73 suitcase.93 suitcase.72 suitcase.96 person1.00 suitcase1.00 suitcase.88 person.98 traffic light.99 traffic light1.00 car.95 car.81 car.89 car.98 car.91 car.96 car.97 car.96 person.99 car.95 car.97 car.97 car.99 car.94 car.94 person.87 car.95 car.97 bicycle.86 car1.00 car.98 car.97 car.99 car.97 donut.95 donut.89 donut.90 donut1.00 donut.99 donut.98 donut.89 donut.97 donut.94 parking meter.98 donut.96 suitcase.99 person1.00 horse.97 person.96 person.96 person.97 person.98 horse.99 donut.89donut.89 donut.93donut.99 donut.96 donut.86 donut.95 donut.98 donut.81 donut.89 donut1.00 donut.96donut.98 donut.98 horse.77 person1.00 sports ball.99 person1.00 tennis racket1.00 cow.93 person.99 donut.95 donut.98 donut.95 car1.00 donut.86 truck.92 donut1.00 donut.99 truck.93 bus.90 bus.99 donut.90 truck.97 truck.99 truck.96 truck.99 donut1.00 donut.88 car.86 Figure 5. More results of Mask R-CNN on COCO test images, using ResNet-101-FPN and running at 5 fps, with 35.7 mask AP (Table 1). MNC [10] FCIS [26] +OHEM FCIS+++ [26] +OHEM Mask R-CNN Mask R-CNN Mask R-CNN backbone ResNet-101-C4 ResNet-101-C5-dilated ResNet-101-C5-dilated ResNet-101-C4 ResNet-101-FPN ResNeXt-101-FPN AP 24.6 29.2 33.6 33.1 35.7 37.1 AP50 44.3 49.5 54.5 54.9 58.0 60.0 AP75 24.8 34.8 37.8 39.4 APS 4.7 7.1 12.1 15.5 16.9 APM 25.9 31.3 35.6 38.1 39.9 APL 43.6 50.0 51.1 52.4 53.5 Table 1. Instance segmentation mask AP on COCO test-dev. MNC [10] and FCIS [26] are the winners of the COCO 2015 and 2016 segmentation challenges, respectively. Without bells and whistles, Mask R-CNN outperforms the more complex FCIS+++, which includes multi-scale train/test, horizontal flip test, and OHEM [38]. All entries are single-model results. 4.1. Main Results can predict K masks per RoI, but we only use the k-th mask, where k is the predicted class by the classification branch. The m×m floating-number mask output is then resized to the RoI size, and binarized at a threshold of 0.5. Note that since we only compute masks on the top 100 detection boxes, Mask R-CNN adds a small overhead to its Faster R-CNN counterpart (e.g., ∼20% on typical models). We compare Mask R-CNN to the state-of-the-art methods in instance segmentation in Table 1. All instantiations of our model outperform baseline variants of previous state-of-the-art models. This includes MNC [10] and FCIS [26], the winners of the COCO 2015 and 2016 segmentation challenges, respectively. Without bells and whistles, Mask R-CNN with ResNet-101-FPN backbone outperforms FCIS+++ [26], which includes multi-scale train/test, horizontal flip test, and online hard example mining (OHEM) [38]. While outside the scope of this work, we expect many such improvements to be applicable to ours. Mask R-CNN outputs are visualized in Figures 2 and 5. Mask R-CNN achieves good results even under challenging conditions. In Figure 6 we compare our Mask R-CNN baseline and FCIS+++ [26]. FCIS+++ exhibits systematic artifacts on overlapping instances, suggesting that it is challenged by the fundamental difficulty of instance segmentation. Mask R-CNN shows no such artifacts. 4. Experiments: Instance Segmentation We perform a thorough comparison of Mask R-CNN to the state of the art along with comprehensive ablations on the COCO dataset [28]. We report the standard COCO metrics including AP (averaged over IoU thresholds), AP50 , AP75 , and APS , APM , APL (AP at different scales). Unless noted, AP is evaluating using mask IoU. As in previous work [5, 27], we train using the union of 80k train images and a 35k subset of val images (trainval35k), and report ablations on the remaining 5k val images (minival). We also report results on test-dev [28]. 5 FCIS umbrella.99 umbrella1.00 Mask R-CNN person1.00 person1.00 person1.00 person1.00 person1.00 person1.00 person1.00 person1.00 person1.00 person1.00 person1.00 person.99 car.99 car.93 person1.00 person1.00 person1.00 person1.00 person1.00 person.99 giraffe1.00 person1.00 train1.00 train.99 giraffe1.00 train.80 person.95 handbag.93 skateboard.98 tie.95 tie1.00 sports ball.98 sports ball1.00 skateboard.99 Figure 6. FCIS+++ [26] (top) vs. Mask R-CNN (bottom, ResNet-101-FPN). FCIS exhibits systematic artifacts on overlapping objects. net-depth-features ResNet-50-C4 ResNet-101-C4 ResNet-50-FPN ResNet-101-FPN ResNeXt-101-FPN AP 30.3 32.7 33.6 35.4 36.7 AP50 51.2 54.2 55.2 57.3 59.5 AP75 31.5 34.3 35.3 37.5 38.9 (a) Backbone Architecture: Better backbones bring expected gains: deeper networks do better, FPN outperforms C4 features, and ResNeXt improves on ResNet. RoIPool RoIAlign AP 23.6 30.9 +7.3 AP50 46.5 51.8 + 5.3 AP75 21.6 32.1 +10.5 softmax sigmoid AP 24.8 30.3 +5.5 AP50 44.1 51.2 +7.1 AP75 25.1 31.5 +6.4 align? bilinear? agg. RoIPool [12] RoIWarp [10] RoIAlign (b) Multinomial vs. Independent Masks (ResNet-50-C4): Decoupling via perclass binary masks (sigmoid) gives large gains over multinomial masks (softmax). APbb 28.2 34.0 +5.8 APbb 50 52.7 55.3 +2.6 APbb 75 26.9 36.4 +9.5 (d) RoIAlign (ResNet-50-C5, stride 32): Mask-level and box-level AP using large-stride features. Misalignments are more severe than with stride-16 features (Table 2c), resulting in big accuracy gaps. MLP MLP FCN X X X X X X max max ave max ave AP 26.9 27.2 27.1 30.2 30.3 AP50 48.8 49.2 48.9 51.0 51.2 AP75 26.4 27.1 27.1 31.8 31.5 (c) RoIAlign (ResNet-50-C4): Mask results with various RoI layers. Our RoIAlign layer improves AP by ∼3 points and AP75 by ∼5 points. Using proper alignment is the only factor that contributes to the large gap between RoI layers. mask branch fc: 1024→1024→80·282 fc: 1024→1024→1024→80·282 conv: 256→256→256→256→256→80 AP 31.5 31.5 33.6 AP50 53.7 54.0 55.2 AP75 32.8 32.6 35.3 (e) Mask Branch (ResNet-50-FPN): Fully convolutional networks (FCN) vs. multi-layer perceptrons (MLP, fully-connected) for mask prediction. FCNs improve results as they take advantage of explicitly encoding spatial layout. Table 2. Ablations. We train on trainval35k, test on minival, and report mask AP unless otherwise noted. 4.2. Ablation Experiments mask per class. Interestingly, Mask R-CNN with classagnostic masks (i.e., predicting a single m×m output regardless of class) is nearly as effective: it has 29.7 mask AP vs. 30.3 for the class-specific counterpart on ResNet-50-C4. This further highlights the division of labor in our approach which largely decouples classification and segmentation. We run a number of ablations to analyze Mask R-CNN. Results are shown in Table 2 and discussed in detail next. Architecture: Table 2a shows Mask R-CNN with various backbones. It benefits from deeper networks (50 vs. 101) and advanced designs including FPN and ResNeXt. We note that not all frameworks automatically benefit from deeper or advanced networks (see benchmarking in [21]). RoIAlign: An evaluation of our proposed RoIAlign layer is shown in Table 2c. For this experiment we use the ResNet50-C4 backbone, which has stride 16. RoIAlign improves AP by about 3 points over RoIPool, with much of the gain coming at high IoU (AP75 ). RoIAlign is insensitive to max/average pool; we use average in the rest of the paper. Additionally, we compare with RoIWarp proposed in MNC [10] that also adopt bilinear sampling. As discussed in §3, RoIWarp still quantizes the RoI, losing alignment with the input. As can be seen in Table 2c, RoIWarp performs on par with RoIPool and much worse than RoIAlign. This highlights that proper alignment is key. We also evaluate RoIAlign with a ResNet-50-C5 backbone, which has an even larger stride of 32 pixels. We use the same head as in Figure 4 (right), as the res5 head is not applicable. Table 2d shows that RoIAlign improves mask AP by a massive 7.3 points, and mask AP75 by 10.5 points Multinomial vs. Independent Masks: Mask R-CNN decouples mask and class prediction: as the existing box branch predicts the class label, we generate a mask for each class without competition among classes (by a per-pixel sigmoid and a binary loss). In Table 2b, we compare this to using a per-pixel softmax and a multinomial loss (as commonly used in FCN [30]). This alternative couples the tasks of mask and class prediction, and results in a severe loss in mask AP (5.5 points). This suggests that once the instance has been classified as a whole (by the box branch), it is sufficient to predict a binary mask without concern for the categories, which makes the model easier to train. Class-Specific vs. Class-Agnostic Masks: Our default instantiation predicts class-specific masks, i.e., one m×m 6 Faster R-CNN+++ [19] Faster R-CNN w FPN [27] Faster R-CNN by G-RMI [21] Faster R-CNN w TDM [39] Faster R-CNN, RoIAlign Mask R-CNN Mask R-CNN backbone APbb APbb 50 APbb 75 APbb S APbb M APbb L ResNet-101-C4 ResNet-101-FPN Inception-ResNet-v2 [41] Inception-ResNet-v2-TDM ResNet-101-FPN ResNet-101-FPN ResNeXt-101-FPN 34.9 36.2 34.7 36.8 37.3 38.2 39.8 55.7 59.1 55.5 57.7 59.6 60.3 62.3 37.4 39.0 36.7 39.2 40.3 41.7 43.4 15.6 18.2 13.5 16.2 19.8 20.1 22.1 38.7 39.0 38.1 39.8 40.2 41.1 43.2 50.9 48.2 52.0 52.1 48.8 50.2 51.2 Table 3. Object detection single-model results (bounding box AP), vs. state-of-the-art on test-dev. Mask R-CNN using ResNet-101FPN outperforms the base variants of all previous state-of-the-art models (the mask output is ignored in these experiments). The gains of Mask R-CNN over [27] come from using RoIAlign (+1.1 APbb ), multitask training (+0.9 APbb ), and ResNeXt-101 (+1.6 APbb ). 4.4. Timing (50% relative improvement). Moreover, we note that with RoIAlign, using stride-32 C5 features (30.9 AP) is more accurate than using stride-16 C4 features (30.3 AP, Table 2c). RoIAlign largely resolves the long-standing challenge of using large-stride features for detection and segmentation. Finally, RoIAlign shows a gain of 1.5 mask AP and 0.5 box AP when used with FPN, which has finer multi-level strides. For keypoint detection that requires finer alignment, RoIAlign shows large gains even with FPN (Table 6). Inference: We train a ResNet-101-FPN model that shares features between the RPN and Mask R-CNN stages, following the 4-step training of Faster R-CNN [36]. This model runs at 195ms per image on an Nvidia Tesla M40 GPU (plus 15ms CPU time resizing the outputs to the original resolution), and achieves statistically the same mask AP as the unshared one. We also report that the ResNet-101-C4 variant takes ∼400ms as it has a heavier box head (Figure 4), so we do not recommend using the C4 variant in practice. Although Mask R-CNN is fast, we note that our design is not optimized for speed, and better speed/accuracy tradeoffs could be achieved [21], e.g., by varying image sizes and proposal numbers, which is beyond the scope of this paper. Mask Branch: Segmentation is a pixel-to-pixel task and we exploit the spatial layout of masks by using an FCN. In Table 2e, we compare multi-layer perceptrons (MLP) and FCNs, using a ResNet-50-FPN backbone. Using FCNs gives a 2.1 mask AP gain over MLPs. We note that we choose this backbone so that the conv layers of the FCN head are not pre-trained, for a fair comparison with MLP. Training: Mask R-CNN is also fast to train. Training with ResNet-50-FPN on COCO trainval35k takes 32 hours in our synchronized 8-GPU implementation (0.72s per 16image mini-batch), and 44 hours with ResNet-101-FPN. In fact, fast prototyping can be completed in less than one day when training on the train set. We hope such rapid training will remove a major hurdle in this area and encourage more people to perform research on this challenging topic. 4.3. Bounding Box Detection Results We compare Mask R-CNN to the state-of-the-art COCO bounding-box object detection in Table 3. For this result, even though the full Mask R-CNN model is trained, only the classification and box outputs are used at inference (the mask output is ignored). Mask R-CNN using ResNet-101FPN outperforms the base variants of all previous state-ofthe-art models, including the single-model variant of GRMI [21], the winner of the COCO 2016 Detection Challenge. Using ResNeXt-101-FPN, Mask R-CNN further improves results, with a margin of 3.0 points box AP over the best previous single model entry from [39] (which used Inception-ResNet-v2-TDM). As a further comparison, we trained a version of Mask R-CNN but without the mask branch, denoted by “Faster R-CNN, RoIAlign” in Table 3. This model performs better than the model presented in [27] due to RoIAlign. On the other hand, it is 0.9 points box AP lower than Mask R-CNN. This gap of Mask R-CNN on box detection is therefore due solely to the benefits of multi-task training. Lastly, we note that Mask R-CNN attains a small gap between its mask and box AP: e.g., 2.7 points between 37.1 (mask, Table 1) and 39.8 (box, Table 3). This indicates that our approach largely closes the gap between object detection and the more challenging instance segmentation task. 5. Mask R-CNN for Human Pose Estimation Our framework can easily be extended to human pose estimation. We model a keypoint’s location as a one-hot mask, and adopt Mask R-CNN to predict K masks, one for each of K keypoint types (e.g., left shoulder, right elbow). This task helps demonstrate the flexibility of Mask R-CNN. We note that minimal domain knowledge for human pose is exploited by our system, as the experiments are mainly to demonstrate the generality of the Mask R-CNN framework. We expect that domain knowledge (e.g., modeling structures [6]) will be complementary to our simple approach. Implementation Details: We make minor modifications to the segmentation system when adapting it for keypoints. For each of the K keypoints of an instance, the training target is a one-hot m × m binary mask where only a single pixel is labeled as foreground. During training, for each visible ground-truth keypoint, we minimize the cross-entropy loss over an m2 -way softmax output (which encourages a 7 Figure 7. Keypoint detection results on COCO test using Mask R-CNN (ResNet-50-FPN), with person segmentation masks predicted from the same model. This model has a keypoint AP of 63.1 and runs at 5 fps. CMU-Pose+++ [6] G-RMI [32]† Mask R-CNN, keypoint-only Mask R-CNN, keypoint & mask APkp AP50 kp AP75 kp APM kp APL kp 61.8 62.4 62.7 63.1 84.9 84.0 87.0 87.3 67.5 68.5 68.4 68.7 57.1 59.1 57.4 57.8 68.2 68.1 71.1 71.4 Faster R-CNN Mask R-CNN, mask-only Mask R-CNN, keypoint-only Mask R-CNN, keypoint & mask APbb person APmask person APkp 52.5 53.6 50.7 52.0 45.8 45.1 64.2 64.7 Table 5. Multi-task learning of box, mask, and keypoint about the person category, evaluated on minival. All entries are trained on the same data for fair comparisons. The backbone is ResNet50-FPN. The entries with 64.2 and 64.7 AP on minival have test-dev AP of 62.7 and 63.1, respectively (see Table 4). Table 4. Keypoint detection AP on COCO test-dev. Ours is a single model (ResNet-50-FPN) that runs at 5 fps. CMU-Pose+++ [6] is the 2016 competition winner that uses multi-scale testing, post-processing with CPM [44], and filtering with an object detector, adding a cumulative ∼5 points (clarified in personal communication). † : G-RMI was trained on COCO plus MPII [1] (25k images), using two models (Inception-ResNet-v2 for bounding box detection and ResNet-101 for keypoints). RoIPool RoIAlign APkp AP50 kp AP75 kp APM kp APL kp 59.8 64.2 86.2 86.6 66.7 69.7 55.1 58.7 67.4 73.0 Table 6. RoIAlign vs. RoIPool for keypoint detection on minival. The backbone is ResNet-50-FPN. single point to be detected). We note that as in instance segmentation, the K keypoints are still treated independently. We adopt the ResNet-FPN variant, and the keypoint head architecture is similar to that in Figure 4 (right). The keypoint head consists of a stack of eight 3×3 512-d conv layers, followed by a deconv layer and 2× bilinear upscaling, producing an output resolution of 56×56. We found that a relatively high resolution output (compared to masks) is required for keypoint-level localization accuracy. Models are trained on all COCO trainval35k images that contain annotated keypoints. To reduce overfitting, as this training set is smaller, we train using image scales randomly sampled from [640, 800] pixels; inference is on a single scale of 800 pixels. We train for 90k iterations, starting from a learning rate of 0.02 and reducing it by 10 at 60k and 80k iterations. We use bounding-box NMS with a threshold of 0.5. Other details are identical as in §3.1. multaneously predict boxes, segments, and keypoints while running at 5 fps. Adding a segment branch (for the person category) improves the APkp to 63.1 (Table 4) on test-dev. More ablations of multi-task learning on minival are in Table 5. Adding the mask branch to the box-only (i.e., Faster R-CNN) or keypoint-only versions consistently improves these tasks. However, adding the keypoint branch reduces the box/mask AP slightly, suggesting that while keypoint detection benefits from multitask training, it does not in turn help the other tasks. Nevertheless, learning all three tasks jointly enables a unified system to efficiently predict all outputs simultaneously (Figure 7). We also investigate the effect of RoIAlign on keypoint detection (Table 6). Though this ResNet-50-FPN backbone has finer strides (e.g., 4 pixels on the finest level), RoIAlign still shows significant improvement over RoIPool and increases APkp by 4.4 points. This is because keypoint detections are more sensitive to localization accuracy. This again indicates that alignment is essential for pixel-level localization, including masks and keypoints. Given the effectiveness of Mask R-CNN for extracting object bounding boxes, masks, and keypoints, we expect it be an effective framework for other instance-level tasks. Main Results and Ablations: We evaluate the person keypoint AP (APkp ) and experiment with a ResNet-50-FPN backbone; more backbones will be studied in the appendix. Table 4 shows that our result (62.7 APkp ) is 0.9 points higher than the COCO 2016 keypoint detection winner [6] that uses a multi-stage processing pipeline (see caption of Table 4). Our method is considerably simpler and faster. More importantly, we have a unified model that can si8 InstanceCut [23] DWT [4] SAIS [17] DIN [3] SGN [29] Mask R-CNN Mask R-CNN training data fine + coarse fine fine fine + coarse fine + coarse fine fine + COCO AP [val] 15.8 19.8 29.2 31.5 36.4 AP 13.0 15.6 17.4 20.0 25.0 26.2 32.0 AP50 27.9 30.0 36.7 38.8 44.9 49.9 58.1 person 10.0 15.1 14.6 16.5 21.8 30.5 34.8 rider 8.0 11.7 12.9 16.7 20.1 23.7 27.0 car 23.7 32.9 35.7 25.7 39.4 46.9 49.1 truck 14.0 17.1 16.0 20.6 24.8 22.8 30.1 bus 19.5 20.4 23.2 30.0 33.2 32.2 40.9 train 15.2 15.0 19.0 23.4 30.8 18.6 30.9 mcycle bicycle 9.3 4.7 7.9 4.9 10.3 7.8 17.1 10.1 17.7 12.4 19.1 16.0 24.1 18.7 Table 7. Results on Cityscapes val (‘AP [val]’ column) and test (remaining columns) sets. Our method uses ResNet-50-FPN. Appendix A: Experiments on Cityscapes person:1.00 rider:0.59 person:0.79 person:1.00 person:1.00 person:0.66 person:1.00 person:0.59 person:0.99person:0.67 person:0.82 We further report instance segmentation results on the Cityscapes [7] dataset. This dataset has fine annotations for 2975 train, 500 val, and 1525 test images. It has 20k coarse training images without instance annotations, which we do not use. All images are 2048×1024 pixels. The instance segmentation task involves 8 object categories, whose numbers of instances on the fine training set are: person 17.9k rider 1.8k car 26.9k truck 0.5k bus 0.4k train 0.2k car:0.81 person:0.99 person:1.00 bus:1.00 person:0.99 car:0.98 person:1.00 car:0.98 person:1.00 bus:0.95 truck:0.66 person:0.98 person:0.94 person:0.94 person:0.98 car:0.95 car:1.00 person:0.99 person:0.98 person:0.73 person:1.00 person:1.00 person:1.00 person:1.00 person:1.00 person:1.00 person:1.00 person:0.98 person:0.82 car:0.52 car:0.95 car:0.57 person:0.92 car:1.00 car:0.68 car:1.00 car:0.68 car:0.52 bicycle:0.83 car:1.00 car:0.64 person:0.82 person:0.63car:1.00 car:0.99car:1.00 car:0.69 car:1.00 car:0.95 car:1.00 car:0.95 rider:0.68 person:0.72 car:1.00 bicycle:0.56 person:1.00 person:0.99 person:0.98 person:0.73 person:0.98 person:0.99 person:0.99 person:0.93 person:0.97 person:0.86 person:0.84 person:0.99 person:0.98 person:0.72 person:0.72 person:0.91 car:1.00 person:1.00 car:1.00 car:1.00 person:0.73 car:1.00 person:0.85 person:0.93 car:1.00 car:1.00 car:1.00 car:1.00 car:1.00 car:1.00 car:0.98 car:0.88 car:1.00 car:0.97 car:0.72 person:0.98 car:0.72 car:0.76 person:0.78 person:1.00 person:0.58 car:1.00 car:1.00 car:0.65 car:1.00 car:1.00 car:0.50 car:1.00 car:1.00 person:1.00 person:1.00 car:1.00 car:1.00 car:1.00 car:1.00 car:1.00 car:1.00 car:1.00 bus:0.75 car:1.00 car:0.99 car:0.67 person:1.00 person:1.00 person:0.82 car:0.89 mcycle bicycle 0.7k 3.7k Instance segmentation performance on this task is measured by the COCO-style mask AP (averaged over IoU thresholds); AP50 (i.e., mask AP at an IoU of 0.5) is also reported. person:1.00 person:0.75 person:1.00 person:1.00 person:1.00 person:1.00 person:1.00 person:0.99 person:1.00 person:1.00person:1.00 person:1.00person:0.98 person:1.00 person:1.00 person:1.00 person:0.99 person:1.00 person:1.00 person:0.70 person:0.59 person:1.00 person:1.00person:1.00 person:0.92 person:1.00person:0.97 person:1.00 person:1.00 person:0.96 person:1.00 person:1.00 person:1.00 person:0.93 car:1.00 person:1.00 rider:0.94 car:0.99 person:0.88 person:0.89 car:0.89 bicycle:0.99 person:1.00 person:1.00 person:0.96 car:1.00 bicycle:0.97 person:0.91 Implementation: We apply our Mask R-CNN models with the ResNet-FPN-50 backbone; we found the 101-layer counterpart performs similarly due to the small dataset size. We train with image scale (shorter side) randomly sampled from [800, 1024], which reduces overfitting; inference is on a single scale of 1024 pixels. We use a mini-batch size of 1 image per GPU (so 8 on 8 GPUs) and train the model for 24k iterations, starting from a learning rate of 0.01 and reducing it to 0.001 at 18k iterations. It takes ∼4 hours of training on a single 8-GPU machine under this setting. Figure 8. Mask R-CNN results on Cityscapes test (32.0 AP). The bottom-right image shows a failure prediction. ing samples each. To partially remedy this issue, we further report a result using COCO pre-training. To do this, we initialize the corresponding 7 categories in Cityscapes from a pre-trained COCO Mask R-CNN model (rider being randomly initialized). We fine-tune this model for 4k iterations in which the learning rate is reduced at 3k iterations, which takes ∼1 hour for training given the COCO model. The COCO pre-trained Mask R-CNN model achieves 32.0 AP on test, almost a 6 point improvement over the fine-only counterpart. This indicates the important role the amount of training data plays. It also suggests that methods on Cityscapes might be influenced by their lowshot learning performance. We show that using COCO pretraining is an effective strategy on this dataset. Finally, we observed a bias between the val and test AP, as is also observed from the results of [23, 4, 29]. We found that this bias is mainly caused by the truck, bus, and train categories, with the fine-only model having val/test AP of 28.8/22.8, 53.5/32.2, and 33.0/18.6, respectively. This suggests that there is a domain shift on these categories, which also have little training data. COCO pre-training helps to improve results the most on these categories; however, the domain shift persists with 38.0/30.1, 57.5/40.9, and 41.2/30.9 val/test AP, respectively. Note that for the person and car categories we do not see any such bias (val/test AP are within ±1 point). Example results on Cityscapes are shown in Figure 8. Results: Table 7 compares our results to the state of the art on the val and test sets. Without using the coarse training set, our method achieves 26.2 AP on test, which is over 30% relative improvement over the previous best entry (DIN [3]), and is also better than the concurrent work of SGN’s 25.0 [29]. Both DIN and SGN use fine + coarse data. Compared to the best entry using fine data only (17.4 AP), we achieve a ∼50% improvement. For the person and car categories, the Cityscapes dataset exhibits a large number of within-category overlapping instances (on average 6 people and 9 cars per image). We argue that within-category overlap is a core difficulty of instance segmentation. Our method shows massive improvement on these two categories over the other best entries (relative ∼40% improvement on person from 21.8 to 30.5 and ∼20% improvement on car from 39.4 to 46.9), even though our method does not exploit the coarse data. A main challenge of the Cityscapes dataset is training models in a low-data regime, particularly for the categories of truck, bus, and train, which have about 200-500 train9 description original baseline + updated baseline + e2e training + ImageNet-5k + train-time augm. + deeper + Non-local [43] + test-time augm. backbone X-101-FPN X-101-FPN X-101-FPN X-101-FPN X-101-FPN X-152-FPN X-152-FPN-NL X-152-FPN-NL AP 36.7 37.0 37.6 38.6 39.2 39.7 40.3 41.8 AP50 59.5 59.7 60.4 61.7 62.5 63.2 64.4 66.0 AP75 38.9 39.0 39.9 40.9 41.6 42.2 42.8 44.8 APbb 39.6 40.5 41.7 42.7 43.5 44.1 45.0 47.3 APbb 50 61.5 63.0 64.1 65.1 65.9 66.4 67.8 69.3 APbb 75 43.2 43.7 45.2 46.6 47.2 48.4 48.9 51.5 description original baseline + updated baseline + deeper + ResNeXt + data distillation [35] + test-time augm. backbone R-50-FPN R-50-FPN R-101-FPN X-101-FPN X-101-FPN X-101-FPN APkp 64.2 65.1 66.1 67.3 69.1 70.4 kp AP50 86.6 86.6 87.7 88.0 88.9 89.3 kp AP75 69.7 70.9 71.7 73.3 75.3 76.8 kp APM 58.7 59.9 60.5 62.2 64.1 65.8 kp APL 73.0 73.6 75.0 75.6 77.1 78.1 Table 9. Enhanced keypoint results of Mask R-CNN on COCO minival. Each row adds an extra component to the above row. Here we use only keypoint annotations but no mask annotations. We denote ResNet by ‘R’ and ResNeXt by ‘X’ for brevity. Table 8. Enhanced detection results of Mask R-CNN on COCO minival. Each row adds an extra component to the above row. We denote ResNeXt model by ‘X’ for notational brevity. Train-time augmentation: Scale augmentation at train time further improves results. During training, we randomly sample a scale from [640, 800] pixels and we increase the number of iterations to 260k (with the learning rate reduced by 10 at 200k and 240k iterations). Train-time augmentation improves mask AP by 0.6 and box AP by 0.8. Model architecture: By upgrading the 101-layer ResNeXt to its 152-layer counterpart [19], we observe an increase of 0.5 mask AP and 0.6 box AP. This shows a deeper model can still improve results on COCO. Using the recently proposed non-local (NL) model [43], we achieve 40.3 mask AP and 45.0 box AP. This result is without test-time augmentation, and the method runs at 3fps on an Nvidia Tesla P100 GPU at test time. Test-time augmentation: We combine the model results evaluated using scales of [400, 1200] pixels with a step of 100 and on their horizontal flips. This gives us a singlemodel result of 41.8 mask AP and 47.3 box AP. The above result is the foundation of our submission to the COCO 2017 competition (which also used an ensemble, not discussed here). The first three winning teams for the instance segmentation task were all reportedly based on an extension of the Mask R-CNN framework. Appendix B: Enhanced Results on COCO As a general framework, Mask R-CNN is compatible with complementary techniques developed for detection/segmentation, including improvements made to Fast/Faster R-CNN and FCNs. In this appendix we describe some techniques that improve over our original results. Thanks to its generality and flexibility, Mask R-CNN was used as the framework by the three winning teams in the COCO 2017 instance segmentation competition, which all significantly outperformed the previous state of the art. Instance Segmentation and Object Detection We report some enhanced results of Mask R-CNN in Table 8. Overall, the improvements increase mask AP 5.1 points (from 36.7 to 41.8) and box AP 7.7 points (from 39.6 to 47.3). Each model improvement increases both mask AP and box AP consistently, showing good generalization of the Mask R-CNN framework. We detail the improvements next. These results, along with future updates, can be reproduced by our released code at https://github.com/ facebookresearch/Detectron, and can serve as higher baselines for future research. Updated baseline: We start with an updated baseline with a different set of hyper-parameters. We lengthen the training to 180k iterations, in which the learning rate is reduced by 10 at 120k and 160k iterations. We also change the NMS threshold to 0.5 (from a default value of 0.3). The updated baseline has 37.0 mask AP and 40.5 box AP. End-to-end training: All previous results used stagewise training, i.e., training RPN as the first stage and Mask R-CNN as the second. Following [37], we evaluate endto-end (‘e2e’) training that jointly trains RPN and Mask RCNN. We adopt the ‘approximate’ version in [37] that only computes partial gradients in the RoIAlign layer by ignoring the gradient w.r.t. RoI coordinates. Table 8 shows that e2e training improves mask AP by 0.6 and box AP by 1.2. ImageNet-5k pre-training: Following [45], we experiment with models pre-trained on a 5k-class subset of ImageNet (in contrast to the standard 1k-class subset). This 5× increase in pre-training data improves both mask and box 1 AP. As a reference, [40] used ∼250× more images (300M) and reported a 2-3 box AP improvement on their baselines. Keypoint Detection We report enhanced results of keypoint detection in Table 9. As an updated baseline, we extend the training schedule to 130k iterations in which the learning rate is reduced by 10 at 100k and 120k iterations. This improves APkp by about 1 point. Replacing ResNet-50 with ResNet-101 and ResNeXt-101 increases APkp to 66.1 and 67.3, respectively. With a recent method called data distillation [35], we are able to exploit the additional 120k unlabeled images provided by COCO. In brief, data distillation is a self-training strategy that uses a model trained on labeled data to predict annotations on unlabeled images, and in turn updates the model with these new annotations. Mask R-CNN provides an effective framework for such a self-training strategy. With data distillation, Mask R-CNN APkp improve by 1.8 points to 69.1. We observe that Mask R-CNN can benefit from extra data, even if that data is unlabeled. By using the same test-time augmentation as used for instance segmentation, we further boost APkp to 70.4. 10 Acknowledgements: We would like to acknowledge Ilija Radosavovic for contributions to code release and enhanced results, and the Caffe2 team for engineering support. [21] J. Huang, V. Rathod, C. Sun, M. Zhu, A. Korattikara, A. Fathi, I. Fischer, Z. Wojna, Y. Song, S. Guadarrama, et al. Speed/accuracy trade-offs for modern convolutional object detectors. In CVPR, 2017. 2, 3, 4, 6, 7 [22] M. Jaderberg, K. Simonyan, A. Zisserman, and K. Kavukcuoglu. Spatial transformer networks. In NIPS, 2015. 4 [23] A. Kirillov, E. Levinkov, B. Andres, B. Savchynskyy, and C. Rother. Instancecut: from edges to instances with multicut. In CVPR, 2017. 3, 9 [24] A. Krizhevsky, I. Sutskever, and G. Hinton. ImageNet classification with deep convolutional neural networks. In NIPS, 2012. 2 [25] Y. LeCun, B. Boser, J. S. Denker, D. Henderson, R. E. Howard, W. Hubbard, and L. D. Jackel. Backpropagation applied to handwritten zip code recognition. Neural computation, 1989. 2 [26] Y. Li, H. Qi, J. Dai, X. Ji, and Y. Wei. Fully convolutional instance-aware semantic segmentation. In CVPR, 2017. 2, 3, 5, 6 [27] T.-Y. Lin, P. Dollár, R. Girshick, K. He, B. Hariharan, and S. Belongie. Feature pyramid networks for object detection. In CVPR, 2017. 2, 4, 5, 7 [28] T.-Y. Lin, M. Maire, S. Belongie, J. Hays, P. Perona, D. Ramanan, P. Dollár, and C. L. Zitnick. Microsoft COCO: Common objects in context. In ECCV, 2014. 2, 5 [29] S. Liu, J. Jia, S. Fidler, and R. Urtasun. SGN: Sequential grouping networks for instance segmentation. In ICCV, 2017. 3, 9 [30] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In CVPR, 2015. 1, 3, 6 [31] V. Nair and G. E. Hinton. Rectified linear units improve restricted boltzmann machines. In ICML, 2010. 4 [32] G. Papandreou, T. Zhu, N. Kanazawa, A. Toshev, J. Tompson, C. Bregler, and K. Murphy. Towards accurate multiperson pose estimation in the wild. In CVPR, 2017. 8 [33] P. O. Pinheiro, R. Collobert, and P. Dollar. Learning to segment object candidates. In NIPS, 2015. 2, 3 [34] P. O. Pinheiro, T.-Y. Lin, R. Collobert, and P. Dollár. Learning to refine object segments. In ECCV, 2016. 2, 3 [35] I. Radosavovic, P. Dollár, R. Girshick, G. Gkioxari, and K. He. Data distillation: Towards omni-supervised learning. arXiv:1712.04440, 2017. 10 [36] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NIPS, 2015. 1, 2, 3, 4, 7 [37] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In TPAMI, 2017. 10 [38] A. Shrivastava, A. Gupta, and R. Girshick. Training regionbased object detectors with online hard example mining. In CVPR, 2016. 2, 5 [39] A. Shrivastava, R. Sukthankar, J. Malik, and A. Gupta. Beyond skip connections: Top-down modulation for object detection. arXiv:1612.06851, 2016. 4, 7 [40] C. Sun, A. Shrivastava, S. Singh, and A. Gupta. Revisiting unreasonable effectiveness of data in deep learning era. In ICCV, 2017. 10 References [1] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2D human pose estimation: New benchmark and state of the art analysis. In CVPR, 2014. 8 [2] P. Arbeláez, J. Pont-Tuset, J. T. Barron, F. Marques, and J. Malik. Multiscale combinatorial grouping. In CVPR, 2014. 2 [3] A. Arnab and P. H. Torr. Pixelwise instance segmentation with a dynamically instantiated network. In CVPR, 2017. 3, 9 [4] M. Bai and R. Urtasun. Deep watershed transform for instance segmentation. In CVPR, 2017. 3, 9 [5] S. Bell, C. L. Zitnick, K. Bala, and R. Girshick. Insideoutside net: Detecting objects in context with skip pooling and recurrent neural networks. In CVPR, 2016. 5 [6] Z. Cao, T. Simon, S.-E. Wei, and Y. Sheikh. Realtime multiperson 2d pose estimation using part affinity fields. In CVPR, 2017. 7, 8 [7] M. Cordts, M. Omran, S. Ramos, T. Rehfeld, M. Enzweiler, R. Benenson, U. Franke, S. Roth, and B. Schiele. The Cityscapes dataset for semantic urban scene understanding. In CVPR, 2016. 9 [8] J. Dai, K. He, Y. Li, S. Ren, and J. Sun. Instance-sensitive fully convolutional networks. In ECCV, 2016. 2 [9] J. Dai, K. He, and J. Sun. Convolutional feature masking for joint object and stuff segmentation. In CVPR, 2015. 2 [10] J. Dai, K. He, and J. Sun. Instance-aware semantic segmentation via multi-task network cascades. In CVPR, 2016. 2, 3, 4, 5, 6 [11] J. Dai, Y. Li, K. He, and J. Sun. R-FCN: Object detection via region-based fully convolutional networks. In NIPS, 2016. 2 [12] R. Girshick. Fast R-CNN. In ICCV, 2015. 1, 2, 3, 4, 6 [13] R. Girshick, J. Donahue, T. Darrell, and J. Malik. Rich feature hierarchies for accurate object detection and semantic segmentation. In CVPR, 2014. 2, 3 [14] R. Girshick, F. Iandola, T. Darrell, and J. Malik. Deformable part models are convolutional neural networks. In CVPR, 2015. 4 [15] B. Hariharan, P. Arbeláez, R. Girshick, and J. Malik. Simultaneous detection and segmentation. In ECCV. 2014. 2 [16] B. Hariharan, P. Arbeláez, R. Girshick, and J. Malik. Hypercolumns for object segmentation and fine-grained localization. In CVPR, 2015. 2 [17] Z. Hayder, X. He, and M. Salzmann. Shape-aware instance segmentation. In CVPR, 2017. 9 [18] K. He, X. Zhang, S. Ren, and J. Sun. Spatial pyramid pooling in deep convolutional networks for visual recognition. In ECCV. 2014. 1, 2 [19] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. 2, 4, 7, 10 [20] J. Hosang, R. Benenson, P. Dollár, and B. Schiele. What makes for effective detection proposals? PAMI, 2015. 2 11 [41] C. Szegedy, S. Ioffe, and V. Vanhoucke. Inception-v4, inception-resnet and the impact of residual connections on learning. In ICLR Workshop, 2016. 7 [42] J. R. Uijlings, K. E. van de Sande, T. Gevers, and A. W. Smeulders. Selective search for object recognition. IJCV, 2013. 2 [43] X. Wang, R. Girshick, A. Gupta, and K. He. Non-local neural networks. arXiv:1711.07971, 2017. 10 [44] S.-E. Wei, V. Ramakrishna, T. Kanade, and Y. Sheikh. Convolutional pose machines. In CVPR, 2016. 8 [45] S. Xie, R. Girshick, P. Dollár, Z. Tu, and K. He. Aggregated residual transformations for deep neural networks. In CVPR, 2017. 4, 10 12
1cs.CV
A Simple Parallel and Distributed Sampling Technique: Local Glauber Dynamics arXiv:1802.06676v1 [cs.DS] 19 Feb 2018 Manuela Fischer ETH Zurich [email protected] Mohsen Ghaffari ETH Zurich [email protected] Abstract Sampling constitutes an important tool in a variety of areas: from machine learning and combinatorial optimization to computational physics and biology. A central class of sampling algorithms is the Markov Chain Monte Carlo method, based on the construction of a Markov chain with the desired sampling distribution as its stationary distribution. Many of the traditional Markov chains, such as the Glauber dynamics, do not scale well with increasing dimension. To address this shortcoming, we propose a simple local update rule based on the Glauber dynamics that leads to efficient parallel and distributed algorithms for sampling from Gibbs distributions. Concretely, we present a Markov chain that mixes in O(log n) rounds when Dobrushin’s condition for the Gibbs distribution is satisfied. This improves over the LubyGlauber algorithm by Feng, Sun, and Yin [PODC’17], which needs O(∆ log n) rounds, and their LocalMetropolis algorithm, which converges in O(log n) rounds but requires a considerably stronger mixing condition. Here, n denotes the number of nodes in the graphical model inducing the Gibbs distribution, and ∆ its maximum degree. In particular, our method can sample a uniform proper coloring with (2 + ε)∆ colors in O(log n) rounds, for any constant ε > 0, which almost matches the threshold of √ the sequential Glauber dynamics and improves on the (2 + 2 + ε)∆ threshold of Feng et al. 1 Introduction Markov Chain Monte Carlo Method: The Markov Chain Monte Carlo (MCMC) method is a central class of algorithms for sampling, that is, for randomly drawing an element from a ground set according to a certain probability distribution. It works by constructing a Markov chain with the targeted sampling distribution as its stationary distribution. Within a number of steps, known as the mixing time, the Markov chain converges; its state then (approximately) follows this distribution. Besides the intrinsic interest of such a general sampling method, in particular for complex distributions where simple sampling techniques fail, the MCMC method gives rise to efficient approximation algorithms in a variety of areas: enumerative combinatorics (due to the fundamental connection between sampling and counting established by Jerrum, Valiant, and Vazirani [JVV86]), simulated annealing [NSS86] in combinatorial optimization, Monte Carlo simulations [MRR+ 53] in statistical physics, computation of intractable integrals for, among many others, Bayesian inference [ADFDJ03] in machine learning. Parallel and Distributed Sampling: The employment of MCMC methods is particularly important when confronted with high-dimensional data, where traditional (exact) approaches quickly become intractable. Such data sets are not only increasingly frequent, but also critical for the success of many applications. For instance in machine learning, higher-dimensional models help expressability and hence predictability. It is thus central that MCMC algorithms scale well with increasing dimensions. This is not the case, however, for most sequential methods, as they process and update the variables one by one, that is, a single site per step. To speed up the sampling process, Markov chain updates can be parallelized by spreading the variables across several processors. In other settings, such as distributed machine learning, the (data associated to) variables might already be naturally distributed among several machines, and the overhead of aggregating them into one machine, if they fit there in the first place, would be untenable. Local Sampling: In either case, to avoid overhead in communication and coordination, local update rules for Markov chains are needed: a machine must be able to change the value of its variables without knowing all the values of the variables on other machines. Yet, the joint distribution, over all variables in the system, must converge to a certain distribution. This local sampling problem was introduced in a recent work by Feng, Sun, and Yin [FSY17], whose title asks “What can be sampled locally?”. We address this question by providing a simple and generic sampling technique—the Local Glauber Dynamics, informally introduced in Section 1.2 and formally described in Section 2—which is applicable for a wide range of distributions, as stated in Section 1.1. This moves us a step closer towards an answer of this question, thus towards the goal of generally understanding what can be sampled locally. Besides its many practical ramifications, especially on the area of distributed machine learning, this gives us a theoretical insight about the locality of problems, whose systematic study has been initiated by the seminal works of Linial [Lin87] and Naor and Stockmeyer [NS95] with the pithy title “What can be computed locally?”. 1.1 Our Result, and Related Work For the sake of succinctness and comprehensibility of the presentation, we state and prove our main result in terms of the special case that gets most attention for sequential sampling: sampling proper colorings of a graph. We refer to [FV07] for a survey on sequential sampling of proper colorings. Our result applies to a more general set of distributions, however, as explained in Remark 1.2. Theorem 1.1. A uniform proper q-coloring of an n-node  graph with maximum degree ∆ can be sampled within total variation distance ε > 0 in O log nε rounds, where q = α∆ for any α > 2. Our parallel and distributed sampling algorithm  improves over the LubyGlauber algorithm by Feng, Sun, and Yin [FSY17], which needs O ∆ log nε rounds, and their LocalMetropolis algorithm, 1  which converges in O log nε rounds but requires a considerably stronger mixing condition of α > √ √ 2 + 2. They state that “We also believe that the 2 + 2 threshold is of certain significance to this [LocalMetropolis] chain as the Dobrushin’s condition to the Glauber dynamics.”, thus implying that this value is a barrier for their approach. This is also justified by the supposedly easiest special case of √ a tree that leads to the same threshold for their algorithm. Our result gets rid of the additional 2 while not incurring any loss in the round complexity, with a considerably easier and more natural update rule. Not least also our proof  is simpler and shorter. Moreover, our algorithm is asymptotically best possible, as there is an Ω log nε lower bound [GJL17,FSY17] due to the exponential correlation between variables. The threshold of α > 2 corresponds to Dobrushin’s condition, thus almost matches the threshold of the sequential Glauber dynamics [Jer95, SS97] at 2∆ + 1. In other words, we present a technique that fully parallelizes the Glauber dynamics, speeding up the mixing time from poly n steps to O(log n) rounds. In terms of number of colors needed, Dobrushin’s condition can be undercut: Vigoda [Vig00] showed that α = 11 6 are enough, when resorting to a different highly non-local Markov chain. This gives rise to the question whether efficient distributed algorithms intrinsically need to be stuck at Dobrushin’s condition, which would imply that this bound is inherent to the locality of the sampling process, or whether our threshold is an artifact of our possibly suboptimal dynamics. Remark 1.2. In fact, our technique directly applies for sampling from the Gibbs distribution induced by a Markov random field1 if Dobrushin’s condition [Dob68] is satisfied. More generally, it can used for sampling from any local (that is, constant-radius) constraint satisfaction problems, which is universal for conditional independent joint distributions, due to Hammersley-Clifford’s fundamental theorem [HC71]. Moreover, our proof presented here captures all the difficulties that arise in these more general cases, thus can be adapted in a straight-forward manner. We defer this generalization to the full version of the paper. 1.2 Our Sampling Technique, and Related Approaches Over the past few years, several methods to parallelize sequential Markov chains have been proposed. Most of them rely on a heavy coordination machinery, are special purpose, and/or do not provide any theoretical guarantees. In the following, we briefly outline two of the most promising and more generic parallel and distributed sampling techniques, in the context of colorings. The most natural one follows a standard decentralization approach, also implemented in the LubyGlauber algorithm by [FSY17]: an independent set of nodes (e.g., a color class of a proper coloring) simultaneously updates their color [FSY17], ensuring that no two neighboring nodes change their color at the same time. This approach mainly suffers from the limitation that the number of independent sets needed to cover all nodes might be large, which slows down mixing. In particular, a multiplicative ∆-term in the mixing time seems inevitable [GLGG11, FSY17]. In the worst case of a clique, this approach falls back to sequential sampling, updating one node after the other. Moreover, this method requires an independent set to be computed, which incurs a significant amount of additional communication and coordination. An orthogonal direction was pursued by [NSWA08,YXQ09,FSY17], where methods are introduced to update the colors of all nodes simultaneously. One example is the LocalMetropolis algorithm by [FSY17]. This extreme parallelism, however, comes at a cost of either introducing a bias in the stationary distribution, resulting in a non-uniform coloring [NSWA08, YXQ09], or having to demand stronger mixing conditions [FSY17]. 1 This captures many graph problems—such as independent set, vertex cover, graph homomorphism—and physical models—such as Ising model, Potts model, general spin systems, and hardcore gas model. 2 Our Local Sampling Technique: We aim for the middle ground between these two approaches, motivated by the following observation: we do not need to prevent simultaneous updates of adjacent nodes, only simultaneous conflicting updates of adjacent nodes. Preventing two adjacent nodes in the first place from picking a new color in the same round seems to be way too restrictive, in particular because it is unlikely that both nodes aim for the same new color. On the other hand, if all nodes update their colors simultaneously, a node is expected to have a conflict with at least one of its neighbors, which prevents any progress. We interpolate between the two extreme cases by introducing a marking probability, so that only a small fraction of a node’s neighbors is expected to update the color, and hence also, in worst case, only these can conflict with its update. Concretely, we propose the following generic sampling method, which we call Local Glauber Dynamics: In every step, every variable independently marks itself at random with a certain (low) probability. If it is marked, it samples a proposal at random and checks with its neighbors whether the proposal leads to a conflict with their current state or their new proposals (if any). If there is a conflict, the variable rolls back and stays with its current state, otherwise the state is updated. As opposed to sequential sampling, where only one variable per step updates its value, here the expected number of variables simultaneously updating their value is Ω(n), resulting in the desired speed-up from O(n log n), say, to O(log n). Of course, the main technical aspect lies in showing that this simple update rule converges to the uniform distribution in O(log n) rounds, which we prove in Section 2. 1.3 Notation and Preliminaries Model: We work with the standard distributed message-passing model for the study of locality: the LOCAL model introduced by Linial [Lin87], defined as follows. Given a graph G = (V, E) on n nodes with maximum degree ∆, the computation proceeds in rounds. In every round, every node can send a message to each of its neighbors. We do not limit the message sizes, but for the algorithm that we present, O(log n)-bit messages suffice. In the end of the computation, every node v outputs a color. The quantity of main interest is the round complexity, i.e., the number of rounds until the joint output of all nodes satisfies a certain condition. We assume that all nodes have knowledge of log n and ∆.    (t) Markov Chain: We will consider a Markov chain X = X (t) t≥0 , where X (t) = Xv ∈ [q]V is v∈V the coloring of the graph in round t. We will omit the round index, and use X = (Xv )v∈V ∈ [q]V for the coloring at time t and X 0 = (Xv0 )v∈V ∈ [q]V for the coloring at time t + 1, for a t ≥ 0, instead.  (t) Mixing Time: For a Markov chain X (t) t≥0 with stationary distribution µ, let πσ denote the distribution of the random coloring nX (t) of the  chain atotime t ≥ 0, conditioned on X (0) = σ. The (t) mixing time τmix (ε) = maxσ∈Ω min t ≥ 0 : dTV πσ , µ is defined to be the minimum number of rounds needed so that the Markov chain is ε-close (in terms of total variation distance) to its stationary distribution µ, regardless P of X (0) . The total variation distance between two distributions µ, ν over Ω is defined as dTV (µ, ν) = σ∈Ω 21 |µ(σ) − ν(σ)|. Path Coupling: The Path Coupling Lemma by Bubley and Dyer [BD97, Theorem 1] (also see [FSY17, Lemma 4.3]) gives rise to a particularly easy way of designing couplings. In a simplified version, it says that it is enough to define the coupling of a Markov chain only for pairs of colorings that are adjacent, that is, differ at exactly one node. The expected number of differing nodes after one coupling step then can be used to bound the mixing time of the Markov chain. Lemma 1.3 (Path Coupling [BD97], simplified). For σ, σ 0 ∈ [q]V , let φ(σ, σ 0 ) := |{v ∈ V : σv 6= σv0 }|. If there is a coupling (X, Y ) → (X 0 , Y 0 ) of the Markov chain, defined only for (X, Y ) with φ(X,  Y ) = 1, that satisfies E[φ(X 0 , Y 0 ) | X, Y ] ≤ 1 − δ for some 0 < δ < 1, then τmix (ε) = O 1δ · log nε . 3 2 Local Glauber Dynamics Local Glauber Dynamics: We define a transition from X = (Xv )v∈V to X 0 = (Xv0 )v∈V in one round as follows. Every node v ∈ V marks itself independently with probability 0 < γ < 1. If it is marked, it proposes a new color cv ∈ [q] uniformly at random, independently from all the other nodes. If this proposed color proposed colors of any neighbor, S does not lead to a conflict with the current and the that is, cv ∈ / u∈N (v) {Xu , cu } and cu ∈ / {Xv , cv } for any u ∈ N (v)2 , then v accepts color cv , thus sets Xv0 = cv . Otherwise, v keeps its current color, thus sets Xv0 = Xv . Stationary Distribution: The local Glauber dynamics is ergodic: it is aperiodic, as there is always a positive probability of not changing any of the colors, and irreducible, since any (proper) coloring can be reached from any coloring. Moreover, the chain might possibly start from an improper coloring, but it will never move from a proper to an improper coloring, that is, it is absorbing to proper colorings. It is easy to verify that this local Glauber dynamics, due to its symmetric update rule, satisfies the detailed balance equation for the uniform distribution, meaning that the transition from X to X 0 has the same probability as a transition from X 0 to X for proper colorings. The chain thus is reversible and has the uniform distribution over all proper colorings as unique stationary distribution. Mixing Time: Informally speaking, the Path Coupling Lemma says that if for all X and Y which differ in one node, we can define a coupling (X, Y ) → (X 0 , Y 0 ) in such a way that the expected number of nodes at which X 0 and Y 0 differ is bounded away from 1 from above, then the chain converges quickly. In Section 2.1, we formally describe such a path coupling, in Section 2.2, we list necessary (but not necessarily sufficient) conditions for a node to have two different colors after one coupling step, which is then used in Section 2.3 to bound the expected number of differing nodes by 1 − δ for some constant 0 < δ < 1, depending on α. Application of Lemma 1.3 then concludes the proof of Theorem 1.1. 2.1 Description of Path Coupling We look at two colorings X and Y that differ at a node v0 ∈ V only. That is, r = Xv0 6= Yv0 = b, for some r 6= g ∈ [q], which we will naturally refer to as red and blue, respectively, and Xv = Yv for all Y v 6= v0 ∈ V . In the following, we explain how every node v ∈ V comes up with a pair (cX v , cv ) of new proposals, which then will be accepted or rejected based on the local Glauber dynamics rules. Marking: In both chains, every node v ∈ V is marked independently with probability γ, using the same randomness in both chains. In the following, we restrict our attention to marked nodes only; Y non-marked nodes are thought of proposing their current color as new color, i.e., cX v = Xv and cv = Yv . Consistent, Mirrored, and Flipped Proposals: We introduce two possible ways of how proposals for a node v can be sampled: consistently and mirroredly. For the consistent proposals, both chains Y propose the same randomly chosen color, that is, cX v0 = cv0 = c for a u.a.r. c ∈ [q]. For the mirrored proposals, both chains assign the same random proposal if it is neither red nor blue, and a flipped Y proposal (i.e., red to one and blue to the other chain) otherwise. More formally, cX v0 = c and cv0 = c if X Y c ∈ {r, g} and c the element in {r, g} \ {c}, and cv0 = cv0 = c if c ∈ / {r, g}, for a u.a.r. c ∈ [q]. We say Y . Note that we say mirrored proposal to refer to the process of that v has flipped proposals if cX = 6 c v v sampling mirroredly, and we say flipped if, as a result of sampling mirroredly, a node proposes different colors in the two chains. Breadth-First Assignment of Proposals: Let B = {v ∈ V \ {v0 } : Xv ∈S{r, b}} ⊆ V \ {v0 } be + the set of nodes v 6= v0 with current color red or blue, as well as K = v∈B N (v) \ {v0 } its inclusive neighborhood, without v0 . We now ignore this set K for the moment, thus focus on the set S ⊆ V \ K of marked nodes that are not adjacent to a node with color red or blue (except for 2 To simplify notation, we assume that cu = Xu in case u is not marked. 4 v0 v0 M0 M1 M1 u u M2 w v M0 M2 w M3 v M4 M3 M4 Figure 1: The breadth-first layers M d for d ≥ 0 of two chains that differ at v0 ∈ M 0 . The disk color corresponds to the node’s current color, where black means any color except red and blue. The color of the box around a node shows this node’s proposed color, where white stands for any color (possibly also red or blue, but consistent). Dashed boxes indicate the sets F d of nodes with flipped proposals. Note that node v appears in layer 4 even though it has distance 3 to v0 . This is because we perform the breadth-first assignment only on nodes with flipped proposals. v’s neighbor u does not have flipped proposals, thus is in M 2 \ F 2 , which means that u’s neighbors are not added to the next layer. Only v’s neighbor w ∈ F 3 leads to v being added to M 4 . possibly v0 ). Informally speaking, we will go through these nodes in a breadth-first manner, with increasing distance d ≥ 0 to node v0 , and fix their proposals layer by layer, but defer the assignment of nodes not (yet) adjacent to a node with flipped proposals, as follows. We repeatedly add all (still remaining) nodes that have a node in the last layer with flipped proposals to a new layer, and sample their proposals mirroredly, thus perform a breadth-first assignment on nodes with flipped proposals only. All remaining nodes sample their proposals consistently. Note that this in particular guarantees that a node is sampled consistently only if it not adjacent to a node with flipped proposals. More formally, this can be described as follows. We define M 0 = F 0 = {v0 }, even if v0 is not marked. For node v0 , if marked, the proposals are sampled consistently. For d ≥ 1 and v ∈ M d , the proposals are sampled mirroredly. For the subsequent layer, we restrict the attention  Sd to (new) d d+1 d neighbors of nodes in M with flipped proposals only, i.e., consider M = N F \ i=0 M d for d d X Y F = {v ∈ M : cv0 6= cv0 }. For all remaining (marked) nodes, that is, nodes in S \ M and nodes in K, proposals are sampled consistently. See Figure 1 for an illustration of this breadth-first-based approach. Y Accept Proposals: The proposals (cX v )v∈V and (cv )v∈V in the chains X and Y are accepted or rejected based on the local Glauber dynamics rules, leading to colorings X 0 , Y 0 ∈ [q]V . 2.2 Properties of the Coupling The main observation is the following. If we ignore nodes with current colors red and blue for the moment, one can argue that X 0 and Y 0 can only differ at a node different from v0 if its proposals are flipped. Flipped proposals, however, can only arise when the proposals are sampled mirroredly, which happens only if there is a node in the preceding layer with flipped proposals (due to the breadth-first order in which we assign the proposals). A node thus can lead to an inconsistency only if there is path in G from v0 to this node consisting of nodes with flipped proposals, called a flip path. We will next make this intuition with the flip paths more precise, in two parts: for nodes in S 5 (that sample their proposals mirroredly if adjacent to a node with flipped proposals) in Lemma 2.1 and for nodes in K (that always sample their proposals consistently) in Lemma 2.2. See Figure 2 for an illustration of these two cases. Lemma 2.1. If X 0 and Y 0 differ at v 6= v0 ∈ S, there is a flip path (v0 , . . . , v` = v) ∈ F 0 × · · · × F ` of length ` ≥ 1 in G, with the additional property that the proposal of v is the opposite of the last Y color (in red and blue) seen on this path, in both chains. More formally, cY = cX v 6= cv = cX , where X Y cX = cv`−1 and cY = cv`−1 if ` > 1, and cX = Xv0 and cY = Yv0 if ` = 1. Proof. We first argue that v’s proposals must be flipped and accepted in both chains. Trivially, acceptance of a consistent proposal in both chains or rejection in both chains leads to Xv0 = Yv0 . Moreover, observe that flipped proposals are, by construction, either accepted in both or rejected in both chains, as flipping changes the role of red and blue, but not the overall behavior. Indeed, suppose, without loss of generality, that cX v = c ∈ {r, g} is rejected by X. Thus, in particular, v has a neighbor u with current color or proposal c in X. As we are restricting our attention to the set S which does not have any adjacent node with current color red or blue, except for v0 , either u = v0 or u proposes c. So u either must have different current colors (if u = v0 ) or have mirrored proposals (if v ∈ F d , 0 then u ∈ M d for some d0 ≤ d + 1, because at the latest v’s flipped proposal leads to u being added to the subsequent layer, by how we assign the proposals in breadth-first manner) and hence flipped proposals. Thus, v’s proposal c in Y will be rejected by Y , since either u = v0 ∈ N (v) has color c or u ∈ N (v) proposes c. It thus remains to rule out the case of consistent proposals that are accepted in one and rejected in the other chain. Towards a contradiction, suppose that v proposes the same color cv in both chains, Y and that it is accepted in one and rejected in the other. Since Xv = Yv and cX v = cv , this can happen only if v is adjacent either to v0 or to at least one node with flipped proposals, as otherwise all proposals and all current colors in v’s inclusive neighborhood would be the same, leading to the same behavior in both chains. In both cases, v ∈ M d for some d ≥ 1, which means that its proposals are sampled mirroredly. Hence, cv ∈ / {r, g}, as otherwise the proposals would be flipped. Now, since neither v’s current color nor v’s proposals is red or blue, and neighbors of v can differ in their colors or proposals only if red or blue is involved, the proposals are either accepted or rejected in both chains. It follows that indeed only nodes in S with flipped proposals that are accepted in both chains can have different colors in X 0 and Y 0 . By construction of the layers, and since v ∈ F ` for some ` ≥ 1, there must exist a sequence of nodes v1 ∈ F 1 , . . . , v`−1 ∈ F `−1 connecting v0 to v in G: a flip path of length `. Moreover, the proposal is accepted in a chain only if the proposed color is the opposite of the color (red or blue) that is seen on the path (either as proposal if ` > 1, or as current color of v0 if ` = 1). Lemma 2.2. If X 0 and Y 0 differ at v 6= v0 ∈ K, there is an almost flip path (v0 , . . . , v` = v) ∈ F 0 × · · · × F `−1 × K of length ` ≥ 1 in G, with the additional property that the proposal of v is either Y red or blue, that is, cv = cX v = cv ∈ {r, b}. Proof. Since, by definition of the coupling, v ∈ K samples its proposals consistently, X 0 and Y 0 can only differ at v 6= v0 if the proposal is accepted in one and rejected in the other chain. This can happen only if v is adjacent to either v0 or to at least one node with flipped proposals. Otherwise, all proposals and all current colors in v’s inclusive neighborhood would be the same, leading to the same behavior. Hence, v is adjacent to some u ∈ F d for some d ≥ 0. By construction of the layers, there must exist a sequence of nodes v1 ∈ F 1 , . . . , v`−1 = u ∈ F `−1 connecting v0 to v in G: an almost flip path of length ` = d + 1. Note that, in particular, because neighbors of nodes in B are by definition sampled consistently (as they are in K), and a node at the end of an almost flip path has a neighbor with flipped proposals, this last node on an almost flip path must be in K \ B. 6 The proposal cv is accepted in one and rejected in the other chain only if cv ∈ {r, g}. In that case, the chain with the same color on the end of the path will reject, the other will (possibly) accept. v0 F0 v0 F0 v0 v0 F0 F0 F1 F1 F1 F1 F2 F2 F2 F2 F3 F3 v K nB K nB v B v F4 X v B F4 X Y Y Figure 2: A flip path on the left: v’s flipped proposals are accepted in both chains, yielding Xv0 = r and Yv0 = b. An almost flip path on the right: v ∈ K \ B samples its proposals consistently. In chain X, the proposal r will be accepted, in chain Y , it will be rejected, leading to Xv0 = r 6= Yv0 = Yv . The disk color corresponds to the node’s current color, where black means any color except red and blue. The color of the box around a node indicates this node’s proposed color, where white means any color ( also red and blue, but consistent). 2.3 Bounding the Expected Number of Differing Nodes P We show that E[φ(X 0 , Y 0 ) | X, Y ] ≤ 1 − δ for some 0 < δ < 1, by bounding E[ v6=v0 ∈V 1 (Xv0 6= Yv0 ) |  X, Y ] and E[1 Xv0 0 6= Yv00 | X, Y ] separately. We will see that, as δ → 0, both terms can be bounded by ≈ α1 , leading to an expected number of roughly α2 , which is strictly less than 1 for α > 2. Nodes v 6= v0 : Section 2.2, or more precisely, Lemmas 2.1 and 2.2, show that the number of nodes (different from v0 ) that have different colors in X 0 and Y 0 can be bounded by the number of (almost) flip paths with an additional property. We will next see that the expected number of such (almost) flip paths can be expressed as a geometric series summing over the depths of the layers. There are at most ∆` paths (v0 , . . . , v` ) of length ` in G. Moreover, each such path has probability (2γ/q)`−1 γ/q of being a flip or almost flip path with the mentioned additional property, since all intermediate nodes v1 , . . . , v`−1 need to mark themselves and to propose one arbitrary color in {r, g}, and v` needs to mark itself and to propose the one color in {r, g} as specified in Lemma 2.1 and Lemma 2.2, respectively. Note that a path in G can either be a flip path or an almost flip path, but never both. Moreover, observe that node v0 does not need to be marked. We get     `−1 γ∆ ∞  ∞ X X γ 1 X 2γ∆ ` 2γ q · = ≤ . (1) E 1(Xv0 6= Yv0 ) | X, Y  ≤ ∆` · q q 2 q 1 − 2γ∆ v6=v0 ∈V `=1 `=1 7 q Node v0 : Chains X 0 and Y 0 can agree at node v0 only if at least one the proposals is accepted. For X Y that, v0 needs to be marked and its proposal cvS 0 = cv0 = cv0 needs to be different from all the at most ∆ current colors of its neighbors, that is, cv ∈ / v∈N (v0 ) {Xv }, which happens with probability at least γ (1 − ∆/q). Moreover, the proposals of v0 ’s neighbors (if marked) need to avoid at most three colors in {cv0 , r, g}, possibly less, which happens with probability at least 1 − 3γ/q. We thus get      ∆ 3γ ∆ 0 0 E 1 Xv0 6= Yv0 ≤ 1 − γ 1 − 1− (2) q q Wrap-Up: Overall, combining Equations (1) and (2), we get   1 E[φ(X 0 , Y 0 ) | X, Y ] ≤ 1 − γ 1 − α  − 6γ α e + γ α 1− 2γ α   1 − 1 = 1 − γe | {z }  α  →1 − 6γ α as γ→0  ! 6γ  eα  1+ 2γ  . 1− α  {z } | →2 as γ→0 For α > 2 and γ := γ(α) small enough, this is strictly bounded away from 1 from above, where the hidden constant depends on α (but not on ∆ or n). References [ADFDJ03] Christophe Andrieu, Nando De Freitas, Arnaud Doucet, and Michael I. Jordan. An Introduction to MCMC for Machine Learning. Machine Learning, 50(1-2):5–43, 2003. [BD97] Russ Bubley and Martin Dyer. Path Coupling: A Technique for Proving Rapid Mixing in Markov Chains. In the Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 223–231, 1997. [Dob68] Roland L. Dobruschin. The Description of a Random Field by Means of Conditional Probabilities and Conditions of its Regularity. Theory of Probability & Its Applications, 13(2):197–224, 1968. [FSY17] Weiming Feng, Yuxin Sun, and Yitong Yin. What Can Be Sampled Locally? In Proceedings of the International Symposium on Principles of Distributed Computing (PODC), pages 121–130, 2017. [FV07] Alan Frieze and Eric Vigoda. A Survey on the Use of Markov Chains to Randomly Sample Colourings. Oxford Lecture Series in Mathematics and its Applications, 34:53, 2007. [GJL17] Heng Guo, Mark Jerrum, and Jingcheng Liu. Uniform Sampling Through the Lovász Local Lemma. Proceedings of the Symposium on Theory of Computing (STOC), pages 342–355, 2017. [GLGG11] Joseph Gonzalez, Yucheng Low, Arthur Gretton, and Carlos Guestrin. Parallel Gibbs Sampling: From Colored Fields to Thin Junction Trees. In the Proceedings of the International Conference on Artificial Intelligence and Statistics, pages 324–332, 2011. [HC71] John M. Hammersley and Peter Clifford. Markov Fields on Finite Graphs and Lattices. 1971. [Jer95] Mark Jerrum. A Very Simple Algorithm for Estimating the Number of k-Colorings of a Low-Degree Graph. Random Structures & Algorithms, 7(2):157–165, 1995. 8 [JVV86] Mark R. Jerrum, Leslie G. Valiant, and Vijay V. Vazirani. Random Generation of Combinatorial Structures from a Uniform Distribution. Theoretical Computer Science, 43:169– 188, 1986. [Lin87] Nathan Linial. Distributive Graph Algorithms - Global Solutions From Local Data. In the Proceedings of the Symposium on Foundations of Computer Science (FOCS), pages 331–335. IEEE, 1987. [MRR+ 53] Nicholas Metropolis, Arianna W. Rosenbluth, Marshall N. Rosenbluth, Augusta H. Teller, and Edward Teller. Equation of State Calculations by Fast Computing Machines. The Journal of Chemical Physics, 21(6):1087–1092, 1953. [NS95] Moni Naor and Larry Stockmeyer. What Can Be Computed Locally? SIAM Journal on Computing, 24(6):1259–1277, 1995. [NSS86] Surendra Nahar, Sartaj Sahni, and Eugene Shragowitz. Simulated Annealing and Combinatorial Optimization. In Proceedings of the Design Automation Conference, pages 293–299. IEEE Press, 1986. [NSWA08] David Newman, Padhraic Smyth, Max Welling, and Arthur U. Asuncion. Distributed Inference for Latent Dirichlet Allocation. In Advances in Neural Information Processing Systems, pages 1081–1088, 2008. [SS97] Jesús Salas and Alan D. Sokal. Absence of Phase Transition for Antiferromagnetic Potts Models via the Dobrushin Uniqueness Theorem. Journal of Statistical Physics, 86(34):551–579, 1997. [Vig00] Eric Vigoda. Improved Bounds for Sampling Colorings. Journal of Mathematical Physics, 41(3):1555–1569, 2000. [YXQ09] Feng Yan, Ningyi Xu, and Yuan Qi. Parallel Inference for Latent Dirichlet Allocation on Graphics Processing Units. In Advances in Neural Information Processing Systems, pages 2134–2142, 2009. 9
8cs.DS
Mining relevant interval rules Thomas Guyet1 , René Quiniou2 , and Véronique Masson3 arXiv:1709.03267v1 [cs.AI] 11 Sep 2017 1 AGROCAMPUS-OUEST/IRISA-UMR 6074 2 Inria, Centre de Rennes 3 University Rennes-1/IRISA-UMR 6074 Abstract. This article extends the method of Garriga et al. for mining relevant rules to numerical attributes by extracting interval-based pattern rules. We propose an algorithm that extracts such rules from numerical datasets using the interval-pattern approach from Kaytoue et al. This algorithm has been implemented and evaluated on real datasets. Keywords: rule learning, interval patterns, relevant rules, closed patterns 1 Introduction Garriga et al. [2] proposed a method to extract relevant association rules from labeled itemsets. We extend the work of Garriga et al. to numerical attributes using the pattern mining approach of Kaytoue et al. [3] which is based on FCA (Formal Concept Analysis). Kaytoue et al. [3] proposed to extend the mining of frequent closed interval pattern to numerical data. Our work bridges the gap between these two approaches to extract relevant interval pattern rules. 2 Closed interval patterns Let F = {f1 , . . . , fn } be a fixed set of n features. We represent a training example as a tuple of real values x = {x1 , . . . , xn }, where xi ∈ Dom(fi ), with an associated class label. The tuple stores one value per feature of F . We consider two-class learning problems where the set of examples E is divided in positives (P ) and negatives (N ) such that E = P ∪N and P ∩N = ∅. Multi-class problems can be transformed in two-class learning problems. An n-dimensional interval pattern is a tuple of intervals h[li , ui ]ii∈[1,...n] , where li , ui ∈ Mi ⊂ R, li ≤ ui and Mi is an ordered finite set of modalities (i.e. each Mi is a set of feature values, i.e. Dom(fi ), or a subset of values Mi ⊂ Dom(fi )). An interval pattern P = h[li , ui ]ii∈[1,...n] covers a tuple x = {x1 , . . . , xn }, denoted x ⊑ P , iff ∀i ∈ [1, ...n], li < xi ≤ ui . Let X = h[li , ui ]ii∈[1,...n] and Y = h[li′ , u′i ]ii∈[1,...n] be two n-dimensional interval patterns. We define X ⊔Y = h[min (li , li′ ) , max (ui , u′i )]ii∈[1,...n] . Further, X ⊑ Y iff ∀i ∈ [1, ...n], [li , ui ] ⊆ [li′ , u′i ]. This definition extends the previous one for tuple covering considering a value v as a singleton interval [v, v]. Let X → + be a positive rule where X is an interval pattern. True positives are positive examples covered by the rule: T P (X) = {e|e ∈ P ∧ e ⊑ X}. False positives are negative examples covered by the rule: F P (X) = {e|e ∈ N ∧ e ⊑ X}. True negatives are negative examples not covered by the rule: T N (X) = {e|e ∈ N ∧ e 6⊑ X}. supp(X), the support of pattern X is defined as supp(X) = |{e|e ∈ E ∧ e ⊑ X}|. We also define supp+ (X) = |T P (X)| and supp− (X) = |F P (X)|. supp+ is antimonotone w.r.t the ⊑ relation and supp− is monotone w.r.t ⊑. This means that ∀X, Y, X ⊑ Y, supp+ (X) ≤ supp+ (Y ) and supp− (Y ) ≤ supp− (X). The learning task consists in constructing all interval patterns X such that supp+ (X) > minsup and supp− (X) < maxf p where minsup and maxf p are given parameters. From the practical point of view of data mining algorithms, closed patterns are the largest patterns (w.r.t. a partial order ⊑ on the set of patterns, denoted P) among patterns occurring in the exact same set of examples. Formally, a set X ∈ P is closed when there is no other set Y ∈ P such that X ⊏ Y (i.e. Y ⊑ X ∧ Y 6= X) and supp(X) = supp(Y ). Closed patterns are interesting because they carry the same information as the total set of frequent patterns. Kaytoue et al. [3] have investigated the problem of mining frequent closed interval patterns with Formal Concept Analysis (FCA). They proposed the MinIntChange algorithm which enumerates all frequent closed frequent patterns. It starts from the most generic interval pattern that covers all the examples: IP = h[min (Mi ) , max (Mi )]ii∈1...n . Then, each interval pattern is specialized applying minimal changes on the left or on the right of the interval. 3 Mining relevant interval-rules The theory of relevancy, described in [4], aims mainly at reducing the hypothesis space by eliminating irrelevant features. This theory has been used by Garriga et al. [2] to extract relevant features in example database where an example is a tuple of symbolic features. Here, we extend the definition of relevancy of Garriga et al. [2] to the relevancy of interval patterns. First, we define two closure operators, Γ + and Γ − , that respectively stand for the closure of interval pattern on P (positive examples) and on N (negative examples). Definition 1 (Relevancy of an interval pattern) Let X and Y be two interval patterns. X is more relevant than Y iff Γ + (Y ) = Γ + (X ⊔ Y ) and Γ − (X) = Γ − (X ⊔ Y ). Thus, similar results as those of Garriga et al. [2] can be deduced about the characterization of the space of relevant interval patterns. Theorem 1. Let X and Y be two interval patterns. If Γ + (Y ) = X and Y 6= X then Y is less relevant than X. Theorem 2. Let X and Y be two different closed interval patterns such that X ⊏ Y . Then, we have that Y is less relevant than X iff Γ − (X) = Γ − (Y ). Algorithm 1 Closed interval rule mining algorithm. P is the set of positive examples, N is a set of negative examples and M is the set of modalities. 1: F CIP ←MinIntChange(P , M) 2: for (X, Y ) ∈ F CIP do 3: if F P (X) = F P (Y ) and X ⊏ Y then 4: F CIP ← F CIP \ {Y } 5: end if 6: end for The first theorem shows that the relevant rules X → + are those for which the interval pattern X is closed over the positive examples. According to the second theorem, in case of similar negative supports, the interval pattern with largest intervals is preferred. Proofs for Theorems 1 and 2 may be deduced from proofs on features sets [2]. Algorithm 1 is based on these theorems to extract the relevant interval patterns. The first step of the algorithm is to extract F CIP , the set of frequent interval patterns closed over the positives. Then, line 3 prunes irrelevant patterns in accordance with Theorem 2. For any closed interval pattern Y ∈ F CIP , if there exists another closed interval pattern X such that both have the same support in the negatives (i.e. same number false-positives) and such that X ⊏ Y then Y is removed.  The size of the interval patterns search space is O m2×n where n is the number of features and m is the number of modalities Mi of one attribute. Thus, we are facing a memory usage constraint. Keeping all the frequent concept in memory require a large memory. This memory issue is classically encountered in formal concept analysis but it becomes harder when the number of modalities increases. To tackle the issue of memory usage, we reduce the modalities to a subset Mi of a fixed maximal size, defined by parameter eqmod. The overall rule mining algorithm has not to be modified. There are several methods to reduce the number of modalities. We choose to extract the equi-probable intervals from the positives examples. 4 Implementation and results We evaluated our algorithm on three UCI datasets [1] (Haberman, Iris and Vertebral column). The algorithm is implemented in C++. Experiments are conducted on an Intel Core-I5 with 8Go of RAM with Linux system. For all experiments in this section, f pmax = 10% and eqmod = 10. Figure 1 illustrates the number of closed interval patterns in positive examples, the number of frequent and accurate rules; and the number of relevant interval pattern rules. We can see that the computing times (see Figure 2) are strongly correlated to the number of patterns. Fig. 1. Number of closed interval patterns in positives, number of rules satisfying minsup and maxf p; and number of relevant interval-rules w.r.t. minimal support. Fig. 2. Computing time (in millisecond) w.r.t. minimal support. Even for small data such as the Iris dataset, the number of patterns is high for low thresholds (≈ 3000) but the number of relevant patterns is significantly lower than the total number of closed rules. Moreover, the number of patterns increases exponentially with the number of modalities. 5 Conclusions We have presented a new algorithm for extracting relevant rules from a numerical dataset. It offers a wider choice of possibly interesting rules for experts. The number of extracted patterns is high but more representative of the input dataset whereas standard algorithms such as CN2 or Ripper select a priori a very limited set of rules simply based on covering and accuracy criteria. Future work will be devoted to proposing additional selection criteria which enable the expert to express his/her preferred set of relevant rules. References 1. K. Bache and M. Lichman. UCI machine learning repository. http://archive.ics.uci.edu/ml, 2013. 2. Gemma C. Garriga, Petra Kralj, and Nada Lavrač. Closed sets for labeled data. Journal of Machine Learning Research, 9:559–580, 2008. 3. Mehdi Kaytoue, Sergei O. Kuznetsov, and Amedeo Napoli. Revisiting numerical pattern mining with formal concept analysis. In Proceedings of International Join Conference on Artificial Intelligence (IJCAI), pages 1342–1347, 2011. 4. Nada Lavrač and Dragan Gamberger. Relevancy in constraint-based subgroup discovery. In Jean-François Boulicaut, Luc Raedt, and Heikki Mannila, editors, Constraint-Based Mining and Inductive Databases, volume 3848 of Lecture Notes in Computer Science, pages 243–266. Springer Berlin Heidelberg, 2006.
2cs.AI
An Integrated and Scalable Platform for Proactive Event-Driven Traffic Management Alain Kibangou Alexander Artikis Evangelos Michelioudakis Georgios Paliouras Marius Schmitt John Lygeros Chris Baber Natan Morar Fabiana Fournier Inna Skarbovsky arXiv:1703.02810v1 [cs.AI] 8 Mar 2017 Abstract Traffic on freeways can be managed by means of ramp meters from Road Traffic Control rooms. Human operators cannot efficiently manage a network of ramp meters. To support them, we present an intelligent platform for traffic management which includes a new ramp metering coordination scheme in the decision making module, an efficient dashboard for interacting with human operators, machine learning tools for learning event definitions and Complex Event Processing tools able to deal with uncertainties inherent to the traffic use case. Unlike the usual approach, the devised event-driven platform is able to predict a congestion up to 4 minutes before it really happens. Proactive decision making can then be established leading to significant improvement of traffic conditions. 1 Introduction Congestion can be defined as a situation when traffic is moving at speed below the designed capacity of a roadway [9] or as a state of traffic flow on a transportation facility characterized by high densities and low speeds, relative to some chosen reference state [3]. It results of various root causes (e.g. traffic incidents, work zones, weather, special events, physical bottlenecks), often interacting with one another [9] and induces excess delays, reduced safety, and increased environmental pollution due to stop-and-go behaviour. One approach to tackle congestion could be to increase the capacity of the traffic infrastructure by constructing new roads. This approach is very costly and it is often not possible due to societal constraints as citizens are more and more aware of environment protection. The solution is then to control traffic in order to avoid, reduce or at least postpone congestion. To do so, most cities in the world have taken important decisions to invest in road sensor capabilities to get measurements of traffic parameters and to build modern Road Traffic Control rooms where traffic operators monitor the traffic situation based on video images and measurements from loop detectors and wireless magnetic sensors, for instance [18]. Actions to control traffic are two-fold: manage ramp metering and/or change speed limits according to the current traffic status [27]. We will focus on ramp metering which is the most common regulation policy. As stated above, existing traffic management platforms are mainly based on human operators and noisy data arriving from various sensors [18]. They are based on the paradigm sense-respond. In contrast, here, we consider a sense-recognise-forecast-decide-act-explain paradigm where decisions are triggered by forecasting events, whether they correspond to problems or opportunities, instead of reacting to them once they happen. We present SPEEDD (Scalable Proactive Event-Driven Decision Making), an integrated platform for 1 proactive event-driven decision-making and demonstrate its capabilities to be resilient to the inherent uncertainty of the sensor readings, which include incomplete data streams, erroneous data and imprecise definitions of the events that need to be detected and/or forecasted. The following steps are to be considered. First, data are continuously acquired from various types of sensor and fused in order to recognise, in real-time, events of special significance. Second, the recognised events are correlated with historical information to forecast congestion that may take place in the near future. Third, both forecasted and recognised events are leveraged for real-time operational decision-making. Fourth, visual analytics [34] prioritise and explain possible proactive actions, enabling human operators to reach and execute the correct decision. The novelty of the proposed platform lies in the difficult task of on-the-fly, low-latency processing of large, geographically distributed, noisy event streams and historical data, for recognising and forecasting congestion, making decisions to reduce the impact of the congestion, and explaining the decisions to human operators in order to facilitate correct decision execution. Operators in Road Traffic Control rooms have to monitor several on-ramps and actions are in general restricted to the identified bottleneck. In absence of coordination of all the ramp meters, the on-ramp immediately upstream of a bottleneck will solely attempt to prevent a congestion forming at the bottleneck. This local control often results in a quick growth of the queue length on the ramp. Then, to avoid an unacceptable spill of the congestion in the nearby urban area, the metering action needs to be limited, resulting in a congestion starting at the bottleneck and propagating upstream. By contrast, coordination between the ramps allows to distribute the control burden onto multiple ramps, thereby preventing ramp overflow without causing a congestion on the mainline. The main challenge is to determine when it is necessary to use on-ramps to hold vehicles back in the queue and reduce traffic demand from a downstream bottleneck. Such an action necessarily has to happen in a proactive way, since any effects of ramp metering travel downstream at most with the free-flow speed. SPEEDD supports a hierarchical coordination scheme with predictions made by means of complex event processing tools. The hierarchical coordination scheme decomposes the controller into distributed, local feedback loops, and a high-level coordination scheme based on events. Unlike existing approaches [26, 25], it is based on the optimality analysis of decentralized ramp metering carried out in [31]. The remainder of this paper is organized as follows: in Section 2 we describe the scenario under study. Then, following the sense-recognise-forecast-decide-act-explain paradigm we describe the methods for event recognition and forecasting in Section 3, decision making in Section 4, and dashboard design in Section 5. Based on the developed method, we describe the integrated prototype in Section 6 and evaluate its performance in Section 7. Finally in Section 8 we propose directions for future work and conclude. 2 Scenario description We consider the Grenoble South Ring road, in France, as the case study. This freeway links the city of Grenoble from the north-east to the south-west. In addition to sustaining local traffic, it has a major role since it connects two highways: the A480, which goes from Paris and Lyon to Marseille, and the A41, which goes from Grenoble to Switzerland. Moreover, the mountains surrounding Grenoble prevent the development of new roads, and also have a negative impact on pollution dispersion, making the problem of traffic regulation on this road even more crucial. From the Road traffic Control room of DIR CE1 , operators can monitor 1 Direction Interdépartementale des Routes Centre-Est 2 traffic on the road network, including the South Ring road, though hundreds of CCTV cameras, verbal reports (primarily from traffic operators on the road but also from police or other emergency service personnel), emails and other text messages, and data from sensors placed on the road. They can also effect traffic though variable message signs (VMS) and soon they will be involved in management of ramp metering, which is still under deployment. DIR CE is also a partner of the GTL (Grenoble Traffic Lab), which offers a dense network of wireless magnetic sensors (see Fig. 1 and [6] for a full description of the sensing platform). GTL also provides a microscopic calibrated simulator of the Grenoble south ring where the dynamics of each each vehicle in the road are simulated. This simulator has been developed using the AIMSUN platform2 . It gives the opportunity to test the entire system in closed loop, from sensing to actuation; which is not possible with the actual freeway. In addition, synthetic data produced by the simulator have annotations that can serve as baseline in order to test the effectiveness and efficiency of the developed system. Figure 1: Grenoble South Ring Network: the road is divided in 45 cells numbered from east to west; Cells equipped with sensors have an S symbol; nodes, marked with N , are constituted by on-ramps (blue arrow) or off-ramps (red arrow). Our objective is to detect congestions a few minutes before they happen. So, proactive suggestions to traffic operators can be provided, or automatic actions can be carried out, to alleviate the forecasted congestion. The following sections describe the methods allowing us to reach this objective. 3 Event-driven Congestion detection and forecasting The detection of congestions is based on information received from the sensors. Special behaviors of variables that describe the system such as speed, density, occupancy allow to infer the existence of congestion. In what follows, we adopt a Complex Event Processing 2 http://www.aimsun.com/ 3 (CEP) approach, sometimes called event stream processing, which is a method that combines data from multiple sources for tracking and analyzing (processing) streams of information (data) to infer events or patterns that suggest more complicated circumstances. The goal of complex event processing is to identify meaningful events (such as opportunities or threats) and respond to them as quickly as possible [21]. In general, there exist two methods to define the rule patterns for a CEP application: machine learning and domain experts. In the first case, the patterns are learnt automatically by a computer program, while in the second, they are given by an external entity; usually a subject expert matter specialized in the domain. It is also possible to combine these two methods. Historical data used at design time contain raw events reported during the observed period along with annotations provided by domain experts. These annotations mark important situations that have been observed in the past and should be detected automatically in the future. Due to the dynamic nature of the proactive traffic management application, the knowledge base of event pattern definitions may require to be refined or enhanced with new ones. 3.1 Machine learning for event definitions In order to effectively learn definitions for traffic congestion using sensor data, we have developed OSLα [22], an online structure learner for Markov Logic Networks (MLNs) [30]. OSLα extends the procedure of OSL [16] by exploiting a given background knowledge to effectively constrain the space of possible structures during learning. The space is constrained subject to characteristics imposed by the rules governing a specific task, herein stated as axioms. As a background knowledge we make use of MLN−EC [32], a probabilistic variant of the Event Calculus [19, 23] for event recognition. Fig. 2 presents the components of OSLα. OSLα Learnt Hypothesis Ht : 0.4 HoldsAt(congestion(lid), t+1) ⇐ HappensAt(fast Slt20(lid), t)∧ HappensAt(fast Ogt45(lid), t) Data Stream/Training Examples ... Hypergraph Inference + Paths to Clauses MLN−EC Axioms: HoldsAt(f, t+1) ⇐ InitiatedAt(f, t) HoldsAt(f, t+1) ⇐ HoldsAt(f, t) ∧ ¬TerminatedAt(f, t) ¬HoldsAt(f, t+1) ⇐ TerminatedAt(f, t) ¬HoldsAt(f, t+1) ⇐ ¬HoldsAt(f, t) ∧ ¬InitiatedAt(f, t) Weight Learning Clause Evaluation Micro-Batch Dt HappensAt(fast Slt25(53708), 99) HappensAt(fast Ogt55(53708), 99) HappensAt(slow Slt15(53708), 99) HappensAt(slow Ogt65(53708), 99) Next(99, 100) HoldsAt(congestion(53708), 100) ... ... Micro-Batch Dt+1 HappensAt(fast Sgt70(53708), 200) HappensAt(fast Olt25(53708), 200) HappensAt(slow Sgt40(53708), 200) HappensAt(slow Olt18(53708), 200) Next(200, 201) ¬HoldsAt(congestion(53708), 201) ... ... Figure 2: The procedure of OSLα. The background knowledge consists of the MLN−EC axioms (i.e., domain-independent rules) and an already known (possibly empty) hypothesis (i.e., set of clauses). Each axiom contains query predicates HoldsAt ∈ Q that consist of the supervision and template predicates InitiatedAt, TerminatedAt ∈ P that specify the conditions under which a complex event starts and stops being recognized. The latter form the target complex event definitions that we want to learn. OSLα exploits these axioms in order to create mappings of supervision predicates into template predicates and search only for explanations of these 4 template predicates. Upon doing so, OSLα does not need to search over time sequences, instead only needs to find appropriate bodies over the current time-point for the following definite clauses: InitiatedAt(f , t) ⇐ body TerminatedAt(f , t) ⇐ body At any step t of the online procedure a training example (micro-batch) Dt arrives containing sensor readings, e.g. a fast lane in a highway has average speed less than 25 km/hour and sensor occupancy greater than 55%. Dt is used together with the already learnt hypothesis to predict the truth values ytP of the complex events of interest. This is achieved by (maximum a posteriori) MAP inference based on LP-relaxed Integer Linear Programming [15]. Given Dt OSLα constructs a hypergraph that represents the space of possible structures as graph paths. Then for all incorrectly predicted complex events the hypergraph is searched, guided by MLN−EC axioms and path mode declarations [16] using relational pathfinding [29] up to a predefined length, for definite clauses explaining these complex events. The paths discovered during the search correspond to conjunctions of true ground atoms and are generalized into first-order clauses by replacing constants in the conjunction with variables. Then, these conjunctions are used as a body to form definite clauses using as head the template predicate present in each path. The resulting set of formulas is converted into clausal normal form and evaluated. The weights of the retained clauses are then optimized by the AdaGrad online learner [10]. Finally, the weighted clauses are appended to the hypothesis Ht and the procedure is repeated for the next training example Dt+1 . 3.2 Event-driven approach to forecast congestions in real-time Event definitions learnt as described above are then used to forecast congestions in realtime by means of an event-driven application which can be defined by an event processing network (EPN) [12]. An EPN, a conceptual model describing the event processing flow execution, comprises a collection of event processing agents (EPAs), event producers, events, and consumers. The network describes the flow of events originating at event producers and flowing through various event processing agents to eventually reach event consumers. We resort to the IBM PROactive Technology ONline (PROTON3 ) as the CEP engine. In our scenario, the CEP component receives events emitted from the sensors (producers) every 15 seconds and based on predefined event rules, it alerts in case of a detection of a possible congestion. In this scenario, the input events are certain (a sensor reading event happens) but the derived event is not certain (e.g., the fact that we have 15 sensor readings in 5 minutes that show an increase in the density, doesn’t necessarily imply there will be a traffic congestion for sure). In other words, the capability to forecast events requires the inclusion of uncertainty aspects. Proactive event-driven computing deals with the inherent uncertainty in the event inputs, in the output events, or in both ([1, 36, 11]). The EPN for the proposed system includes the following EPAs: • Congestion at a specific location: it exists if the density in a specific location is above a certain given value (density threshold1) and the speed is below a certain given value (speed threshold1) for at least 15 input events within the time period of 5 min or until a ClearCongestion EPA occurs. 3 https://github.com/ishkin/Proton/ 5 • ClearCongestion at a specific location: it occurs when a congestion is over, i.e. whenever the density is below a certain given value (density threshold2) and the speed is above a certain given value (speed threshold2) for at least 15 input events within a time window that is opened with either a Congestion or a PredictedCongestion events and is closed after 5 min. • PredictedCongestion: it occurs when a forecasted congestion is identified at a specific location. This event pattern or rule is probabilistic in the sense that the output or derived event has a certainty attribute value associated to it. It is of type TREND, meaning that it derives an event whenever a specific change (increasing or decreasing) over time of the density value in the input events is satisfied over a temporal window. This EPA emits a derived event if at least 5 input events show an increase in the density in a temporal window which is opened with the first input event that comes and is closed when either a Congestion or ClearCongestion is detected for the same location. • Calculations: they concern calculations on sensor readings (such as averages). They are emitted to be consumed by the decision making module. To cope with uncertainties inherent in the event rules, a Sigmoid function is used to calculate the confidence of the occurrence of a derived event. The idea is: whenever the number of events in the matching set of the TREND pattern in the PredictedCongestion EPA is high enough, the certainty of the derived event is close to one. 4 Decision making In the previous section, we have described how to derive smart rules to recognize and/or predict a congestion. Now, we will describe a smart way to manage or to avoid congestion. A cause of congestion is related to an excess of demand of using the road infrastructure. Such a demand can be managed by means of ramp metering. Given a set of equipped on-ramps, the objective is to regulate the entering flow in a smart way while avoiding congestion to spill back to the arterial network. We adopt a hierarchical approach, which decomposes the controller into distributed, local feedback loops, and a high-level coordination scheme based on events (see Fig. 3). Existing solutions are used for the local feedback laws but a new coordination scheme is proposed to deal with non-monotonic effects in traffic dynamics. In other words, for monotonic traffic, local feedback laws are enough but the coordination scheme is necessary when non-monotonic effects occur. The non-monotonic behavior makes the design of optimal controllers difficult, as non-convex problems arise. The main innovation in our approach lies in the usage of a model-free, data- and event-driven solution to the problem of ramp coordination. 4.1 Data-driven System Identification To understand how non-monotonic effects affect the ramp metering problem, it is necessary to briefly review road traffic dynamics. Freeway traffic conditions at some location can be described by the traffic density ρ(t), measured in number of vehicles per kilometer, and the (mainline) traffic flow φ(t). First-order traffic model Lighthill-Whitham-Richards (LWR) [20] postulates a static flow-density relationship, which is called the fundamental diagram. It is usual to associate a piecewise-affine fundamental diagram to the LWR model, a shape confirmed with real data but with significant levels of variance (see Fig. 4). This spread is 6 Complex Event Processing all measurements High-Level Coordination High-Level Coordination Sets traffic light 4488 State Estimator, SysId Metered Onramp Metered Onramp 4132 4134 1675 4355 3810 1679 3811 3812 1683 4085 4489 4488 4061 1670 State Estimator, SysId Uses measurements from 1683, 1679, 3811, 3812, 4132 Metered Onramp 4381 Low-Level Controller Low-Level Controller State Estimator, SysId 1666 High-Level Coordination Coordinates with traffic lights 4489, 4487, .... Low-Level Controller 4487 User Interface 1687 3813 1703 4244 4804 1708 4087 1691 Figure 3: Hierarchical control approach for ramp metering. most notable at and above the critical density (density value corresponding to the maximal flow) and it might partially be caused by a dependency of the flow on further variables. Figure 4: Fundamental diagram: theoretical (left) and reconstructed from real data using GP regression with mean and 90% confidence interval. Considering a subdivision of the road in cells, the density of cell k evolves as ρk (t + 1) = ρk (t) + T (φk−1 (t) − φk (t)) Lk (1) where T and Lk denote the sampling time and the cell length respectively, whereas the flow φk (t) = min {dk (ρk (t)), sk+1 (ρk+1 (t))} between to adjacent locations k and k + 1 is computed as the minimum of the upstream demand dk (ρk (t)) of vehicles that seek to travel downstream and the downstream supply sk+1 (ρk+1 (t)) of free space. This model is called Cell Transmission Model (CTM) [8]. In the standard CTM, the flow is non-decreasing in the upstream density and non-increasing in the downstream density. However, there is empirical evidence of a capacity drop at a congested bottleneck, that is, the demand function dk (·) slightly decreases as the upstream density exceeds the critical density. To deal with such 7 capacity drop at critical density, we resort to a 2D representation of the fundamental diagram (see Fig. 5). We propose to estimate the capacity drop for bottleneck locations offline, using model-free Gaussian Process (GP) regressions [28] to obtain a data driven estimate of the two-dimensional fundamental diagram. Figure 5: GP regression for two-dimensional fundamental diagram where ρds (resp. ρus ) stands for downstream density (resp. upstream density). 4.2 Low-level Control The main objective of the low-level control is to maximize local traffic flows by shifting the local traffic density towards the critical density, which is sufficient for close-to-optimal performance for a monotonic freeway. It can be achieved with the successful ALINEA algorithm [24], an integral feedback law in which the ideal metering rate is given as r̃k (t) := r̂k (t − 1) + KI · (ρck − ρk (t)), where, KI is the integral gain chosen as in [24] and r̂k (t − 1) is the on-ramp flow measured during the last sampling period. The only road parameter used by the feedback law is the critical density ρck , which is estimated online from data, as outlined before. However, the actual metering rate is subject to certain constraints. Obviously, it is non-negative and upper-bounded by some constant maximal on-ramp flow r̄k . We also allow for a userdefined (see Section 5) lower bound rk , which can be used to limit the maximal waiting time of drivers on the on-ramp. In addition, the space on the on-ramp is finite and it is paramount that the queue length qk (t) (in number of vehicles) does not exceed the maximal capacity q̄k to avoid spill-back of the queue into adjacent arterial roads. Conversely, sometimes it may be required to hold back a certain amount of vehicles on the on-ramp to ease the traffic situation downstream, even if no congestion is imminent right at the on-ramp. To this end, we define a desired queue length 0 < qk∗ (t) ≤ q̄k , which will be chosen by the coordination algorithm as described in the following section. Thus, the actual metering rate rk (t) is saturated to the interval     1 1 max rk , (qk (t) − q̄k ) + dˆk (t) ≤ rk (t) ≤ min r̄k , (qk (t) − qk∗ (t)) + dˆk (t) . ∆t ∆t Here, dˆk (t) is the prediction of the traffic demand arriving at the on-ramp in the next time interval and ∆t is the sampling time. The states ρk (t) and qk (t) are estimated from measurement streams using a standard Kalman filter [17]. 8 4.3 Ramp Coordination The aim of coordinated ramp metering is to target inefficiencies that result from limited space on the on-ramps in conjunction with the non-monotonic behavior of a congested bottleneck. In the spirit of the proactive approach of the proposed platform, it is necessary to predict congestion. As described in Section 3, we predict congestion by learning patterns from historic, large data sets. Then, efficiency of the coordinated ramp metering scheme hinges mainly on the accuracy of the predictions made by CEP, while the coordination algorithm can be described as a simple finite state machine that reacts accordingly. As control and control active inactive inactive (a) State diagram to determine the ac- (b) Activation of upstream tive local control algorithm. coordination. Figure 6: State diagrams of the coordination algorithm. The symbols and abbreviations are explained in the text. depicted in Fig. 6a, the local feedback law described in Section 4.2 either controls the local density ρ or both the local density and the on-ramp queue length q. In general, control of the density is activated if a congestion is detected and the queue length is controlled only if an upstream ramp requests coordination via the Ramp Coordination (RC) event. If coordination is active between two ramps, we seek to balance the occupancies on both the ∗ ds upstream (us) and downstream (ds) on-ramp, that is, qds (t) = q̄q̄us ·qus (t) [26]. Fig. 6b shows when a downstream ramp will request coordination from an upstream ramp. RC events are periodically sent if upstream coordination is active. Here, condition (?) is shorthand notation for (?) := ((TOPC ∨ TOPR ∨ C) ∧ CA) ∨ (q ≥ γ4 · q̄), where the relevant events are Predicted Congestion (PC), Predicted Ramp Overflow (PR) and Congestion (C). The Boolean variable CA is true if the local control algorithm is active, that is, it controls ρ, or ρ and q and the Boolean variables TOP C/P R are used to describe a trade-off with respect to the total expected travel time as described below. The remaining events Clear Congestion (CC) and Clear Ramp Coordination 4 are used to determine when control can safely be deactivated. In both state diagrams in Fig. 6, conditions in bold can be interpreted as the “default” conditions. If these are comprised of events that might rarely not be predicted/ detected correctly, alternative conditions are also provided as a fall-back solution. The parameters γ1 = 0.8, γ2 = 0.7, γ3 = 0.7 and γ4 = 0.8 are tuning parameters for defining thresholds for transitions. Note that using multiple ramps comes at a cost. More cars are held back on the onramps, resulting in time lost for the drivers if it turns out that congestions would have been avoided without the use of coordination. Recall that the CEP engine also estimates 4 This event is implemented as a Ramp Coordination event with particular attribute values. 9 the probability P[E] of a predicted event happening within some time horizon T . It is used to perform a trade-off between the (potential) benefits of preventing a congestion and the possibility of wasting driver’s time on the on-ramps. To do so, we compare the additional waiting time ∆Tramp on the upstream on-ramp to the time potentially wasted in congestion on the mainline ∆Tml  and define the Boolean trade-off variable TOE := 0 0 P[E] · ∆Tml > (1 − P[E]) · ∆Tramp . Here, the event E is either PC or PR, as both affect condition (?) in the same way. For a pair of ramps, the additional waiting time can be bounded by T /∆t ∆Tramp = ∆t · X qus (t) ≤ T · t=0 q̄ds 0 q̄us =: ∆Tramp , q̄ds + q̄us for a situation in which coordinated ramp metering was ultimately unnecessary and therefore, the total amount of cars stored on both ramps is less than the space available on the downstream ramp qus (t) + qds (t) ≤ q̄ds , for all t ∈ [t, t + T ]. Conversely, if a congestion does arise within a time horizon T , the average, surplus demand is equal to at least ∆d ≥ (l · (ρcds − ρds (t)) + q̄ds − qds (t))/T . If coordination is used, the surplus demand can us . Therefore, also be stored on the upstream on-ramp, delaying the congestion by ∆T = q̄∆d the additional time spent in congestion can be bounded by ∆Tml ≥ ∆T · ∆φ · Tcon = q̄us · T 0 · ∆φ · Tcon := ∆Tml . l · (ρcds − ρds (t)) + q̄ds − qds (t) with Tcon the expected duration of the congestion and ∆φ the bottleneck capacity drop, which have to be estimated from historic data. Note that the inequality used in the tradeoff provides a sufficient, but not a necessary condition for efficiency of coordination because 0 0 can be computed. This is less restrictive than it might only the bound ∆Tml and ∆Tramp seem at first, since CEP will continue to produce updated predictions as traffic conditions evolve. Therefore, adopting a conservative approach at worst delays the usage of coordination slightly, until congestion can be predicted with sufficient accuracy. 5 Dashboard design While the automated event forecasting and decision making can address challenges relating to congestion and ramp metering, operators in the Road Traffic Control room, such as Grenoble’s DIR CE are required to monitor and manage many other aspects of the road network. Consequently, it was essential to integrate the output from the SPEEDD system into a visualisation which supported these other aspects of their work. The goals of the Road Traffic Control room is to: maximize the available capacity of the road system, minimize the impact of incidents, manage demand regulation and congestion, assist in emergency service response, maintain public confidence in messages displayed on the VMS, and maintain a record of actions and events on the road system. Design of the dashboard for SPEEDD began with visits to DIR CE in which we spoke with and observed operators at work. In addition to such observations, we were able to conduct eye-tracking studies in order to explore which information sources were most useful to the operators and what their information handling strategies were [33, 5]. Combining the material collected during field studies, we developed a set of Cognitive Work Analysis [35] descriptions which provided different views on the operators’ activity. A dashboard which was implemented in the SPEEDD architecture and which resulted directly from our understanding of operators’ decision making, information use and communications was produced 10 as the first version of the dashboard. This was presented to operators and its usability explored. From this evaluation, a revised dashboard, depicted in Fig. 7, was developed. A detailed description of the design process and decisions made in the development process of the design can be found in [2]. Figure 7: Developed traffic monitoring dashboard. Fig. 7 consists of three main areas. In the top right of the screen, an event list provides a time-ordered set of outputs from the SPEEDD congestion prediction algorithm. This highlights to the operators event which need to be managed. Some of the events will be automatically handled by the ramp-metering and, as such, need not be brought to the operators’ attention. When ramp-metering is implemented, the status of the ramp is changed in the bar charts associated with each ramp on the map (on the left of the screen). The map shows the Grenoble South Ring and, through colour-coding of the discrete segments of the road, indicating the current level of congestion. The bar charts at each ramp also indicate the traffic flow through the ramp and the congestion adjacent to the ramp. In the centre of the map, one can see a small camera icon. This indicates the site of the CCTV camera which has produced the largest image in the CCTV panel (on the bottom right of the screen). The CCTV panel shows a collection of images from the CCTVs which the operators can use to diagnose the level and possible causes of congestion. The aim of the dashboard design was to produce a clear and simple overview of the road system, in order to allow operators to maintain a high level of situation awareness, and to allow them to see the decisions that the automated system was enacting (both in terms of the changes to ramps and display of congestion on the road, and in terms of those aspects of congestion which were not handled directly by ramp metering). For the events in the event list, the operator will indicate what action was taken, e.g., in terms of calling up VMS messages to alert drivers to congestion or to advise them to decrease their speed. The operator actions can be combined with the initial changes in ramp metering, e.g., ramp metering initiated at a given time, in order to produce a detailed log of operations in the control room. 11 6 Proactive Event-driven system architecture Fig. 8 shows the event-driven architecture run time represented as a group of loosely-coupled components interacting through events. The event bus serves as the communication and integration platform for the run time. In general, input from the operational systems (traffic Figure 8: Run time architecture of the SPEEDD system. sensor readings) are represented as events and injected into the system by posting a new event message to the event bus. These events are consumed by complex event processing (CEP). The derived events representing detected or forecasted situations that the CEP component outputs are posted to the event bus as well. The decision making module listens to these events so that the decision making procedure is triggered upon a new event representing a situation that requires a decision. The output of the decision making represents the action to be taken to mitigate or resolve the situation. These actions are posted as action events. The visualization component (dashboard) consumes events coming from two sources: the situations (detected as well as forecasted) and the corresponding actions suggested by the automatic decision components. The user can accept the suggested action as it is, modify the suggested action’s parameters, or reject it (and even decide upon a different action). In the case where an action is to be performed, the resulting action will be sent as a new event to the event bus so that the corresponding actuators are notified. The full description of the proposed proactive event-driven architecture can be found in [13]. 12 The proposed event-driven architecture can be run in an open, closed, or hybrid loop mode. In the current scenario, operators interact with the outputs of the prototype through a dashboard. The dashboard client communicates, via the dashboard server, with the modules of the architecture. Operators can accept, respond to, or make suggestions and control actions. Actions taken by operators via the dashboard are fed back into the run time as events, thus allowing for the seamless integration of expert knowledge and the outputs of complex algorithms. It is worth noting that the Machine Learning for event definitions is not part of the run time architecture described in Fig. 8. The automated construction of traffic congestion patterns (see Section 3) is performed at design time. 7 Evaluation In this section, we first evaluate our approach of learning traffic event definitions using Machine Learning techniques and then the different components of the proposed run time platform. 7.1 Learning Event Definitions We applied OSLα (see Section 3.1) to traffic management using real data from the magnetic sensors mounted on the Grenoble South Ring, consisting of approximately 3.3GiB of sensor readings (one month data). Annotations of traffic congestion are provided by human traffic controllers, but only very sparsely. To deal with this issue, we also used a synthetic dataset generated by the traffic micro-simulator of GTL (see Section 2). The synthetic dataset concerns the same location and consists of 6 simulations of one hour each (≈ 18.6MiB). A set of first-order logic functions is used to discretize the numerical data (speed, occupancy) and produce input events such as, for instance, HappensAt(fast Slt55(53708), 100), representing that the speed in the fast lane of location 53708 is less than 55 km/hour at time 100. The total length of the training sequence in the real data case consists of 172, 799 time-points, while in the synthetic data it consists of 238 time-points. The evaluation results were obtained using MAP inference [15] and are presented in terms of F1 score. In the real dataset, all reported statistics are micro-averaged over the instances of recognized CEs using 10-fold cross validation over the entire dataset, using varying batch sizes. At each fold, an interval of 17, 280 time-points was left out and used for testing. In the synthetic data, the reported statistics are micro-averaged using 6-fold cross validation over 6 simulations by leaving one out for testing. Fig. 9 presents the experimental results on the real dataset. We compare OSLα against the AdaGrad online weight learner [10] that optimizes the weights of a manually constructed traffic congestion definition. The predictive accuracy of the learned models, both for OSLα and AdaGrad, is low. This arises mainly from the largely incomplete supervision. In OSLα, the predictive accuracy increases (almost) monotonically as the learning steps increase. On the contrary, the accuracy of AdaGrad is more or less constant. OSLα outperforms AdaGrad in terms of accuracy. (OSLα achieves a 0.64 F1 score, while the best score of AdaGrad is 0.59.) This is a notable result. The absence of proper supervision penalizes the hand-crafted rules, compromising the accuracy of AdaGrad that uses them. OSLα is not penalized in this way, and is able to construct rules with a better fit in the data, given enough learning steps. For some locations of the highway, OSLα has constructed rules with different thresholds for speed and occupancy than those of the hand-crafted rules. With respect to efficiency (see the right diagrams of Fig. 9), unsurprisingly AdaGrad is faster and scales better to the 13 avg. batch processing (seconds) 0.65 0.6424 F 1 score 0.6 0.55 0.5281 0.5565 0.56 0.5 0.45 0.4 50 40 30 5 4 2.43 2 0 10 0.6714 1000 0.5986 0.5788 0.55 0.5 50 40 3000 30 10 1000 1000 batch size (#sensor events) 10 8 6 4 2 0 10 0.23 0.241 0.421 30 40 batch size (minutes) #batches 0.532 20 2000 20 2000 50 #batches 0.6 0.5844 4000 3000 batch size (minutes) avg. batch processing (seconds) 10 5000 20 30 0.65 F 1 score 8.84 6 40 2000 20 batch size (minutes) 8 3000 batch size (minutes) 0.5714 10 50 1000 2000 3000 4000 5000 batch size (#sensor events) Figure 9: Real dataset: F1 score (left) and average batch processing time (right) for OSLα (top), and AdaGrad operating on manually constructed traffic congestion rules (bottom). In the left figures, the number of batches (see the Y axes) refers to number of learning steps. 14 increase in the batch size. At the same time, OSLα processes data batches efficiently, much faster than their duration. For example, OSLα takes less than 9 sec to process a 50-minute batch including 4, 220 sensor readings. 0.9 0.88 0.9 0.8957 0.8938 0.88 0.86 0.8785 0.84 F 1 score F 1 score 0.886 0.8531 0.8269 0.82 0.8995 0.8979 0.8941 0.8903 0.8577 0.8747 0.86 0.84 0.82 0.8 30 20 10 batch size (minutes) 0 0 5 10 15 20 25 0.8 30 20 10 batch size (minutes) #batches 0 0 5 10 15 20 25 #batches Figure 10: Synthetic dataset: F1 score for OSLα (left) and AdaGrad operating on manually constructed traffic congestion rules (right). To test the behavior of OSLα under better supervision, we made use of a synthetic dataset produced by the traffic micro-simulator of GTL. Fig. 10 presents the experimental results. Not surprisingly, the predictive accuracy of the learned models in these experiments is much higher as compared to real dataset. Moreover, the accuracy of OSLα and AdaGrad is affected mostly by the batch size: accuracy increases as the batch size increases. The synthetic dataset is smaller than the real dataset and thus, as the batch size decreases, the number of learning steps is not large enough to improve accuracy. The best performance of OSLα and AdaGrad is almost the same (approximately 0.89). In other words, OSLα can match the performance of techniques taking advantage of rules crafted by human experts. This is another notable result. 7.2 Event forecasting In order to explore the quality of our CEP module, we ran a test comprising of 20 simulations generated by the traffic micro-simualtor of GTL along with annotations of congestions. The annotations of congestions include the location and the time the congestion is detected. First, we evaluated the quality of our Congestion pattern against the annotated data. We checked the proportion of detections by our EPA that were annotated in the data as congestions (precision) and second, the proportion of congestions we were able to detect out of all the annotated congestions (recall). In all our simulations our precision was 100%, while the average recall over all the simulations was 72%. This can be easily explained: the rule implemented has been given to us by the domain expert, who is the one to identify the congestions in the simulations, thus giving a perfect precision. However, when implementing the pattern we applied a “stricter” criterion for the rule than the one in the simulator: we took into account not just the average speed critical thresholds, but also density thresholds, therefore we have a less success rate in the recall of the results, i.e., there were annotations of congestion in the data that we “missed”. As a second step, we aimed at checking a more interesting question, that is, whether the inclusion of uncertainty aspects enables us to predict a congestion in the highway before it reaches critical thresholds, as opposed to detecting it once it happens. We addressed this question by having two EPNs, once including uncertainty aspects and the other one without uncertainty, i.e. deterministic; and running the tests twice, one time for each EPN (with and 15 without uncertainty). This is a common approach in CEP engines dealing with uncertainty (see for example in [7]). The deterministic case served as baseline, as we knew at this stage that all our congestions have been detected correctly. The precision of our results indicates the proportion of congestions we were able to predict (in other words, PredictedCongestion pointed out correctly to a congestion), whereas the recall indicates the proportion of congestions we were able to detect out of all the annotated congestions (in other words, PredictedCongestion pointed out correctly out of all congestions). We used a threshold of 0.6 in the certainty attribute to determine whether to consider PredictedCongestion as a congestion. In other words, only PredictedCongestion alerts with a certainty value larger than 0.6 were considered in our calculations of precision and recall. In these tests, the average precision was 91% and the average recall was 75%. Furthermore, PredictedCongestion event is emitted 3 to 4 minutes before a Congestion is detected, thus enabling the system to take proactive actions in order to alleviate these congestions. The recall average indicates that there are other situations that cause congestions which are not detected by our pattern. Further analysis shows that these situations are characterized by “jumping data”, meaning, the values of speed and density tend to jump thus not satisfying the increasing build-up which is required in our pattern. We are currently investigating these “jumping” cases to see if we can identify some common behavior/pattern. 7.3 Decision making We evaluated the decision making module by considering that the ramps with indices k ∈ {2, 6, 7, 8, 9} as depicted in Figure 1 are used for ramp metering. We assume that onramp queues are extended to provide storage space for up to 50 cars each. The simulation is conducted as described in [31] with non-monotonic demand functions. To quantify the benefits of ramp metering, we use the Total Time Spent (TTS), a standard metric defined as the sum of the travel times of all cars for a certain day. We perform three types of simulations. First, we simulate traffic without ramp metering to obtain a baseline performance, TTSol . Second, simulations using local ramp metering as described in Section 4.2 are performed, but no coordination between ramps is used. The corresponding travel time is denoted TTScl . Third, we employ coordinated ramp metering with the coordination along the lines of Section 4.3 and denote the corresponding total time spent as TTSco . The parameters of the coordination are chosen as γ3 = 0.1 and γ4 = 0.2. For the five-week period, we obtain relative savings of TTSol − TTScl = 9.9% TTSol and TTSol − TTSco = 13.6%. TTSol Benefits of coordination tend to increase as traffic demand increases, while conversely, no benefits are obtained on days with no or only light congestion for an uncontrolled freeway. However, TTS does not only quantify time wasted in congestion and in on-ramp queues, but vehicles traveling at free-flow velocity contribute significantly as well. Ramp metering cannot provide any benefits during times at which the uncontrolled freeway is not congested. Therefore, we define the Total-Free-flow-Time TFT as the travel time accumulated by all vehicles on a hypothetical freeway, that is always uncongested, i.e. all vehicles travel at free-flow velocity at all times. The relative savings in terms of time wasted in congestion and in on-ramp queues for all days amount to TTSol − TTScl = 25.2% and TTSol − TFT 16 TTSol − TTSco = 34.6%. TTSol − TFT 2 4 6 8 10 12 14 16 18 20 2 onramp index cell index The results are visualized in Figure 11 for one day that provides average savings5 . Note that these savings are larger than the ones reported in [31] and [14]. This is no surprise, since these papers use the monotonic CTM. In a monotonic setting, the only benefit of ramp metering is to avoid blocking off-ramps with spilled-back mainline congestion. It shall be noted however that both the time spent in congestion and the relative savings of coordination seem to be sensitive to the traffic demands. In a non-monotonic setting, small changes in demands may cause large differences in open- or closed-loop behavior. As stated earlier, coordination tends to provide larger relative savings for more severe congestion. 11 14 16 19 6:00 9:00 12:00 15:00 18:00 6:00 9:00 12:00 15:00 18:00 time time (a) Density for local control. (b) Queue occupancies for local control. 2 4 6 8 10 12 14 16 18 20 2 onramp index cell index 7 7 11 14 16 19 6:00 9:00 12:00 15:00 18:00 6:00 9:00 12:00 15:00 18:00 time time (c) Density for coordinated control. (d) Queue occupancies for coordinated control. Figure 11: Simulation results for traffic demands of April 19th , 2014. Coordination distributes vehicles among on-ramps, thereby reducing traffic on the mainline and increasing the bottleneck flows, in particular for cell 11 and 19. 7.4 Evaluation of dashboard design As part of the usability evaluation of the dashboard design, participants (N = 24) completed a series of tasks using the original dashboard and the revised version which was described in Section 5. Participants were asked to complete the Software Usability Scale (SUS) questionnaire [4] for each dashboard. The SUS questionnaire consists of 10 simple questions concerning the potential usefulness and benefit that users feel that the dashboard might provide them with. Each statement is rated on a scale of 0 to 4. The scoring of responses then involves subtracting 1 from odd-numbered questions and subtracting scores of evennumbered questions from 5. This is because the questions alternate between positive and negative connotations. Scores are then summed and multiplied by 2.5, to give a final score 5 April 19th , 2014: TTSol −TTScl TTSol TFT = 21.2%, TTSol −TTSco TTSol −TFT 17 = 33.8% out of 100. As a rule of thumb, scores in excess of 65 are deemed “acceptable”. Fig. 12 compares the evaluation of the dashboard described in section 5 with the original version: the median scores were 49 for the original version (indicating that the design was of lower than acceptable usability) and 69 for the revised version (indicating that participants felt the design to be acceptable). Figure 12: Comparison of the original dashboard (one) with the revised dashboard (two) in terms of subjective rating of usability. In addition to collecting subjective opinion of the usability of the two dashboard designs, an experiment was conducted in which 24 participants each completed 60 ramp metering and traffic congestion tasks (e.g. task involving decisions on whether to alter the ramp metering rate and whether level of congestion has changed on different sections of the road). The tasks were completed with each dashboard and under different levels of automation reliability (low = 20%; medium = 50% and high = 80%). This latter condition was introduced to explore how users might respond to recommendations which were based on noisy or incomplete data (hence resulting in erroneous advice). Analysis of decision time showed that responses were significantly faster with dashboard 2 (mean decision time approximately 14.25s for dashboard 1 and 10.5s for dashboard 2) and also varied with reliability (mean decision time approximately 13.0s for low; 12.75s for medium; 11.5s for high). In terms of decisions, users were able to match the reliability of the automation, i.e. when the reliability levels were low and medium, users would only respond to the “correct” answers and were able to compensate for the errors to some extent. However, decision accuracy for the low and medium reliability automation was ≤ 85%, and for the high reliability was around 92%. Thus, when the automation performed poorly, human decision making could be affected. 18 8 Conclusions We have presented an intelligent platform for traffic management which includes a new ramp metering coordination scheme in the decision making module, an efficient dashboard for interacting with human operators, machine learning tools for learning event definitions and complex event processing tools able to deal with uncertainties inherent to the traffic use case. It has been shown that the developed machine learning tool can match the performance of techniques taking advantage of rules crafted by human experts while complex event processing tools are able to predict congestion 3 to 4 minutes before Congestion happens even with uncertain and noisy data. The decision making module using coordinated ramp metering improves Total Spent Time compared to ramp metering without coordination using the current standard local feedback algorithm ALINEA. It is worth noting that even though the system is able to take proactive actions in order to alleviate congestions, the recall average indicates that there are other situations that cause congestions which are not detected by our patterns. Hence, there remains a need to ensure an integrated humanautomation decision system as we have implemented in SPEEDD. Future works also include analysis and definition of patterns exhibiting jumps rather than trends. Acknowledgments This work is part of the EU-funded SPEEDD project (FP7-ICT 619435). We would also thank Philippe Mansuy of DIR CE for giving us access to the Grenoble South Ring Control Room and valuable comments of traffic operators. References [1] A. Artikis, O. Etzion, Z. Feldman, and F. Fournier. Event Processing under Uncertainty. In DEBS 2012, 2012. [2] C. Baber, S. Starke, X. Chen, N. Morar, and A. Howes. The design of user interfaces for the speedd prototype,3rd report. Technical Report FP7-619435/SPEEDD-D5.3, EU, Scalable Data Analytics, Scalable Algorithms, Software Frameworks and Visualization ICT-2013 4.2.a, 2016. [3] P. Bovy and I. Salomon. Congestion in Europe: Measurements, patterns and policies. Travel behaviour: Spatial patterns, congestion and modelling, pages 143–179, 2002. [4] J. Brooke. SUS: a quick and dirty usability scale. In P.W. Jordan, B. Weerdmeester, B.A. Thomas, and I.L. McLelland, editors, Usability Evaluation in Industry, pages 189–194. Taylor and Francis, London, 1996. [5] C. Canudas de Wit, I. Bellicot, F. Garin, P. Grandinetti, A.Y. Kibangou, F. Morbidi, M. Schmitt, A. Hempel, C. Baber, and N Cooke. User requirements and scenario definition. Technical Report FP7-619435/SPEEDD-D8.1, EU, Scalable Data Analytics, Scalable Algorithms, Software Frameworks and Visualization ICT-2013 4.2.a, 2014. [6] C. Canudas de Wit, F. Morbidi, L. Leon Ojeda, A.Y. Kibangou, I. Bellicot, and P. Bellemain. Grenoble Traffic Lab: An experimental platform for advanced traffic monitoring and forecasting. IEEE Control Systems, 35(3):23–39, 2015. 19 [7] G. Cugola, A. Margara, M. Matteucci, and G. Tamburrelli. Introducing uncertainty in complex event processing: model, implementation, and validation. Computing, pages 1–42, 2014. [8] C.F. Daganzo. The cell transmission model: A dynamic representation of highway traffic consistent with the hydrodynamic theory. Transportation Research Part B: Methodological, 28(4):269–287, 1994. [9] A. Downs. Why Traffic Congestion is Here To Stay ... and Will Get Worse. ACCESS Magazine, 25(1), 2004. [10] J. Duchi, E. Hazan, and Y. Singer. Adaptive Subgradient Methods for Online Learning and Stochastic Optimization. Journal of Machine Learning Research, 12:2121–2159, July 2011. [11] Y. Engel, O. Etzion, and Z. Feldman. A Basic Model for Proactive Event-Driven Computing. In DEBS 2012, pages 107–118, 2012. [12] O. Etzion and P. Niblett. Event Processing in Action. Manning Publication, 2010. [13] F. Fournier, A. Kofman, I. Skarbovsky, and Skarlatidis A. Extending Event-Driven Architecture for Proactive Systems. In Proc. of Event Processing, Forecasting and Decision-Making in the Big Data Era (EPForDM), EDBT/ICDT Workshops., pages 104–110, 2015. [14] G. Gomes and R. Horowitz. Optimal freeway ramp metering using the asymmetric cell transmission model. Transportation Research Part C: Emerging Technologies, 14(4):244–262, 2006. [15] T.N. Huynh and R.J. Mooney. Max-Margin Weight Learning for Markov Logic Networks. In Proceedings of the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML PKDD), volume 5781 of Lecture Notes in Computer Science, pages 564–579. Springer, 2009. [16] T.N. Huynh and R.J. Mooney. Online Structure Learning for Markov Logic Networks. In Proceedings of the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML-PKDD 2011), volume 2, pages 81–96, September 2011. [17] R.E. Kalman. A new approach to linear filtering and prediction problems. Journal of Basic Engineering, 82(35), 1960. [18] M. Kojima, C. Nowakowski, and P. Green. Organization and structure of traffic management centers: Two case studies in Michigan. Technical report, University of Michigan, Ann Arbor, MI, USA, 1999. [19] R. Kowalski and M. Sergot. A Logic-based Calculus of Events. New Generation Computing, 4(1):67–95, 1986. [20] M.J. Lighthill and G.B. Whitham. On kinematic waves ii. a theory of traffic flow on long crowded roads. Proceedings of the Royal Society of London A: Mathematical, Physical and Engineering Sciences, 229(1178):317–345, 1955. [21] D.C. Luckham. Event Processing for Business: Organizing the Real-Time Enterprise. John Wiley and sons, Inc, New jersey, USA, 1st edition, 2012. 20 [22] E. Michelioudakis, A. Skarlatidis, G. Paliouras, and A. Artikis. Online Structure Learning using Background Knowledge Axiomatization. In Proceedings of the European Conference on Machine Learning and Principles and Practice of Knowledge Discovery in Databases (ECML-PKDD 2016), volume 1, pages 242–237, September 2016. [23] E.T. Mueller. Event Calculus. In Handbook of Knowledge Representation, volume 3 of Foundations of Artificial Intelligence, pages 671–708. Elsevier, 2008. [24] M. Papageorgiou, H. Hadj-Salem, and J.-M. Blosseville. Alinea: A local feedback control law for on-ramp metering. Transportation Research Record, (1320):58–64, 1991. [25] I. Papamichail, A. Kotsialos, I. Margonis, and M. Papageorgiou. Coordinated ramp metering for freeway networks–a model-predictive hierarchical control approach. Transportation Research Part C: Emerging Technologies, 18(3):311–331, 2010. [26] I. Papamichail, M. Papageorgiou, V. Vong, and J. Gaffney. Heuristic ramp-metering coordination strategy implemented at monash freeway, australia. Transportation Research Record: Journal of the Transportation Research Board, 2178(1):10–20, 2010. [27] D. Pisarski and C. Canudas de Wit. Optimal Balancing of Road Traffic Density Distributions for the Cell Transmission Model. In 51st IEEE Conference on Decision and Control (CDC 2012), Maui, Hawaii, United States, December 2012. [28] C.E. Rasmussen. Gaussian processes in machine learning. In Advanced lectures on machine learning, pages 63–71. Springer, 2004. [29] B.L. Richards and R.J. Mooney. Learning relations by pathfinding. In Proceedings of the Tenth National Conference on Artificial Intelligence, AAAI’92, pages 50–55. AAAI Press, 1992. [30] M. Richardson and P.M. Domingos. Markov logic networks. Machine Learning, 62(12):107–136, 2006. [31] M. Schmitt, C. Ramesh, and J. Lygeros. Sufficient optimality conditions for distributed, non-predictive ramp metering in the monotonic cell transmission model. submitted to Journal of Transportation Research, Part B: Methodological., 2016. [32] A. Skarlatidis, G. Paliouras, A. Artikis, and G.A. Vouros. Probabilistic Event Calculus for Event Recognition. ACM Transactions on Computational Logic, 16(2):11:1–11:37, February 2015. [33] S. Starke, N. Cooke, A. Howes, N. Morar, and C. Baber. Visual sampling in a road traffic control management control room. In International Conference on Ergonomics and Human Factors, pages 503–511. Taylor and Francis, 2015. [34] J.J. Thomas and K.A. Cook. Illuminiating the Path: the research and development agenda for visual analytics,. National Visualization and Analytics Center, Pacific Northwest National Laboratory, Richland, WA, 2005. [35] K.J. Vicente. Cognitive work analysis: Toward safe, productive, and healthy computerbased work. Lawrence Erlbaum Associates, New York, 1999. [36] S. Wasserkrug, A. Gal, O. Etzion, and Y. Turchin. Efficient processing of uncertain events in rule-based systems. IEEE Transactions on Knowledge and Data Engineering, 24(1):45–58, 2012. 21
3cs.SY
A framework for small but rich vehicle routing problems. Vladimir G. Deineko1 arXiv:1610.01876v1 [cs.DS] 5 Oct 2016 Warwick Business School, Coventry, United Kingdom Abstract. In this paper we consider a 2-vehicle routing problem which can be viewed as a building block for the varieties of the vehicle routing problems (VRPs). To approach this problem, we suggest a framework based on the Held and Karp dynamic programming algorithm for the classical travelling salesman problem. An algorithm based on this framework shows an exceptionally good performance on published test data. Our approach can be easily extended to a variety of constraints/attributes in the VRP, hence the wording “small but rich” in the title of our paper. Keywords. Combinatorial optimization; vehicle routing problem; dynamic programming; 2-period travelling salesman problem. 1 Introduction In the vehicle routing problem (VRP) a set of customers with certain requests are to be visited by vehicles. The vehicles are to be chosen from a fleet of heterogeneous vehicles, with various fixed and variable costs of usage. The objective is to find a minimum cost schedule for customer visits to deliver required services in the specified time and manner. The scheduling of visits may need to satisfy some additional constraints, e.g. with some visits demanded on particular days, or by particular vehicles, etc. It would not be an exaggeration to say that thousands of research papers devoted to the VRPs are published every year. As rightly mentioned by Michael Drexl [16], this “is certainly due to the intellectual challenge VRPs pose as well as to their relevance in logistics and transport”. The VRP can be viewed as a combination of the two well known combinatorial optimization problems - the travelling salesman problem (see e.g. [1]) and the bin packing/knapsack problem (see e.g. [22]). It is not surprising that the combination of these two problems creates new computational challenges for researchers and practitioners. For instance, the sizes of the TSP instances which are tractable by recently developed computational algorithms [1] are much bigger than the sizes of easy tractable VRP instances. In many practical applications the number of customers visited by a single vehicle are not very large. We mention here just a few contextual examples: teachers visiting special needs pupils, nurses attending patients at home, food delivery in rural areas (long distances - hence few customers to visit), bulk deliveries of industrial goods (large items - hence few customers). The task of allocation of customers to vehicles adds a lot of complexity to the VRP, especially due to the various additional constraints arising in practice. The VRPs with multiple practice related constraints are referred to in recent publications as rich VRPs (see surveys [5,16,27]), or multi-attribute VRPs [38,39]. In our study we decided to concentrate on the simplest possible version of the rich VRP - the VRP with many constraints/attributes but with only two vehicles, which we call the 2VRP. Further on, keeping in mind the practical applications mentioned above, we studied small (with not many customers) but rich VRPs (hence the title of the paper). We hope that better understanding of the 2VRP would allow researchers to develop new algorithms for the VRPs with many vehicles. A straightforward approach for the VRP with many vehicles could for instance be a heuristic which enumerates all possible pairs of vehicles and iteratively solves the 2VRPs. The approach described in this paper is based on the well known Held and Karp dynamic programming approach [20]. We are not the first who suggest using dynamic programming techniques for 2 Vladimir G. Deineko the VRPs (see e.g. [13,18,24,32,33,39]). The way we use dynamic programming is different though to what has been suggested so far. We suggest a framework which permits to easily incorporate additional constraints and vary the objective function to optimise (see [18,21,35,36,40] for frameworks suggested for various types of the VRPs). To address the curse of dimensionality in dynamic programming, an aggregation scheme is included in the framework. We tested our framework on the 2-period balanced travelling salesman problem [3]. The results of computational experiments are impressive: for 60 benchmark instances suggested in [3], better solutions have been found for 57 instances. 2 2.1 A framework for the 2VRP Notations and definitions In this section we introduce a model for a vehicle routing problem (VRP) with only two vehicles (2VRP). We describe objects involved in the model and attributes associated with each object. In what follows we use an approach which finds optimal solutions for small size problems. To reduce the size of an initial problem we suggest making use of various aggregation techniques. As an example of a possible aggregation, one can think of considering all customers on a street as one customer with the demand defined as the sum of demands for the customers on that street. There are two not homogeneous vehicles, vehicle 1 and vehicle 2, in the 2VRP. They have different capacities W1 and W2 and different costs of travelling. The vehicles will be used for delivering demanded goods to customers. We assume that each customer is located in an estate with only two entry points. A network of one-way roads within the estate connects these two points. So the travel costs within the estate are asymmetric costs. To distinguish between two entry points to the estate, we refer to one of the points as the left node and denote it by L(i). The other of the two points is referred to as the right node, and is denoted by R(i). We assume that customer i in our problem has a set of seven attributes 2 2 1 1 (i), w(i)} with the following meaning: (i), lR (i), lL (i), lR {L(i), R(i), lL – – – – – the left node L(i); the right node R(i); m cost of travelling from the left node to the right node lL (i), if travelled by vehicle m, m = 1, 2; m (i), if travelled by vehicle m, m = 1, 2; cost of travelling from the right node to the left node lR the demand w(i). So, given a set of n customers {1, 2, . . . , n}, with the demands w(i), they have to be visited by one of the two vehicles which delivers the demanded goods from depots to the customers. The total demand of all customers is less than the total capacity of the two vehicles, so only one route per vehicle is needed. The vehicles may travel from different depots and return to different depots. Assume that vehicle 1 travels from depot d1R and returns to depot d1L , and vehicle 2 travels from depot d2R and returns to depot d2L . The costs of travelling between the nodes are given by the two 2(n + 4) × 2(n + 4) cost matrices C 1 = (c1ij ) and C 2 = (c2ij ), where cm (i, j) is the cost of travelling by vehicle m from node i to node j. m m A visit of customer i adds to the travel costs either cost lL (i), or cost lR (i) depending on the way the customer is visited - from the left entry node, or from the right entry node. Our approach will utilise the well known dynamic programming algorithm for the travelling salesman problem. So we would like to view routes for the two vehicles as one route. To simplify further considerations, we introduce an auxiliary customer 0 with the set of attributes {d1L , d2R , 0, ∞, 0, ∞, 0}. The reason for introduction of the auxiliary customer 0 and placing it into the two-vehicle route is to A framework for the 2-VRP 3 separate points visited by the two different vehicles. Cost of travelling from d1L to d2R costs nothing, while travelling in opposite direction is forbidden (by the infinitely large cost). The two-vehicle route starts from the node d1R , visits all customers from the set U = {0} ∪ {1, 2, . . . , n}, and ends in the node d2L . Vehicle 1 is the first to start visiting customers in the route. Visiting customer 0 means that the mode of travelling is changed from travelling by vehicle 1 to travelling by vehicle 2. Vehicle 2 will travel from customer 0, i.e. from depots d2R , to depot d2L . The objective is to find a minimum cost route of delivering the requested demand to all customers. The total demand of customers visited by each vehicle should not exceed the corresponding vehicle’s capacity. 2.2 Dynamic programming recursions In this section, the well known Held & Karp [20] dynamic programming algorithm for the TSP is adapted for the case of the 2VRP formulated above. Let J be a subset of customers not containing i, so J ⊂ U , i ∈ / J. Denote as VL[i, J] the minimum cost of an optimal 2-vehicle route among all routes which start from a visit of customer i from the corresponding left node, then visit all the customers in set J, and stop in depot d2R . Similarly, define VR[i, J] to be the cost of the optimal route that starts visiting customer i from the corresponding right node, and visits then the customers in J. The optimal cost of a 2-vehicle tour can be calculated as V = mini∈U \{0} {c1d1 ,L(i) + VL[i, U \ {i}], c1d1 ,R(i) + VR[i, U \ {i}]}. R d1L +V L[j, J \ {j}] 1 lL (i) c1R(i)L(j) (1) R L(j) d2R customer 0 R(j) L(i) R(j) L(j) customer i c1R(i)R(j) Set of customers J \ {j} customer j +V R[j, J \ {j}] Set of customers J Fig. 1: Illustration of the calculation of length VL[i, J], the shortest route from customer i through all customers in set J (the case of 0 ∈ J.) 4 Vladimir G. Deineko We assume here that the total demand from customers is bigger than the capacity of each of the vehicles, so in the formula above 0 cannot be the first customer. Values VL[i, J] and VR[i, J] for all customers i and subsets J, J ⊂ {0} ∪ {1, 2, . . . , n}, are calculated as shown in the recursions below:  ( ) 1  lL (i) + c1R(i),L(j) + VL[j, J \ {j}]    minj∈J 1 if 0 ∈ J,   lL (i) + c1R(i),R(j) + VR[j, J \ {j}]     ( ) VL[i, J] = 2 2  l (i) + c + VL[j, J \ {j}]  L R(i),L(j)  minj∈J if 0 ∈ / J, w({i} ∪ J) ≤ W2   2  lL (i) + c2R(i),R(j) + VR[j, J \ {j}]    ∞ otherwise (2)  ( ) 1 1  l (i) + c + VL[j, J \ {j}]  L(i),L(j)   minj∈J R if 0 ∈ J,  1 1  l (i) + c + VR[j, J \ {j}]  R L(i),R(j)    ) ( VR[i, J] = 2  (i) + c2L(i),L(j) + VL[j, J \ {j}] lR   if 0 ∈ / J, w({i} ∪ J) ≤ W2 minj∈J 2    lR (i) + c2L(i),R(j) + VR[j, J \ {j}]    ∞ otherwise (3) VR[0, J] =    min   ( j∈J c2R(0),L(j) + VL[j, J \ {j} c2R(0),R(j) + VR[j, J \ {j} ∞ ) ( w(U \ ({i} ∪ J)) ≤ W1 , if and w({i} ∪ J) ≤ W2 (4) otherwise The boundary conditions are: 2 VL[i, ∅] = lR (i) + c2L(i),L(0) , 2 VR[i, ∅] = lL (i) + c2R(i),L(0) . (5) Recursions (1)-(5) extend Held & Karp recursions to the case of 2VRP: since there are only two vehicles, the capacity constraints are easily verified without any extra dimensions or complicated calculations. Notice that we use notation w(J) for the sum of demands of all items in set J. For instances with relatively small sizes, these days computers perform calculations (1)-(5) within seconds. However when the number of customers approaches 20, the computations on a standard laptop become more and more problematic. To make the dynamic programming approach practical, we suggest an aggregation strategy described in the next section. 2.3 Aggregation strategies and local search As was mentioned above, the dynamic programming approach can be used for small size problems but may become impractical in real life applications. In this section we describe an approach for data aggregation and reducing the size of the initial problem. We start with a feasible 2VRP solution with n customers. We “cut” this solution into a small number of sub-paths. One can think of various possible ways of cutting a 2-VRP solution into sub-paths. Each subpath is replaced then by a new customer. The way we describe the customers in the 2VRP in the previous section permits an easy replacement of any subpath by a new customer. A left node for the new customer is the first node in the subpath (i.e. either left or right node of the first customer); the right A framework for the 2-VRP 5 Fig. 2: Illustration of the “sliding subsets” heuristic: first step of disassembling; each subset contains 2 customers. node of the new customer is the last node in the subpath; the demand of the new customer is the sum of the demands of customers in the sub-path; the left/right lengths are calculated as the corresponding lengths of the subpath. Obviously, an exact solution obtained for a new small-size problem can be viewed only as an approximate solution for the initial 2-VRP. This approximate solution can be again “disassembled” into a small number of sub-paths, and the process of solving small size problems is repeated again, until all possible ways of disassembling and aggregating a solution have been enumerated and no further improvement was achieved. We suggest the following straightforward approach, which we call the sliding sub-sets method. Assume that we have an initial solution to the 2VRP: τ = hd1 , t11 , t12 , . . . , t1k1 , 0, t21 , t22 , . . . , t2k2 , d2 i. Here vehicle one’s route is τ = hd1 , t11 , t12 , . . . , t1k1 , 0i and vehicle two’s route is h0, t21 , t22 , . . . , t2k2 , d2 i. We disassemble this solution into a new set of customers for the new 2VRP according to the following procedure. First, define 0 as a customer in the new 2VRP and delete it from τ . Let s now be a small constant, a parameter of the algorithm. Choose two subsets of customers containing s items each so that the customers in each subset are picked from consecutive positions in τ . Subset S1 will always contain at least one customer from vehicle 1’s route, and S2 contains at least one customer from vehicle 2’s route. On the first disassembling step define the first subset as S1 = {t11 , . . . , t1s }, and the second subset as S2 = {t1k1 −s+2 , . . . , t1k1 , t21 }. Notice that subset S2 is chosen to ensure that at least one customer from vehicle 2’s route is included in the subset. Delete S1 and S2 from τ and add them to the set of customers in the new 2VRP. Consider d2 as a new customer, delete it from τ . Sub-paths which are left in τ are considered as aggregated customers and added to the new 2VRP. On the first step these are: depot d1 , sub-path ht1s+1 , . . . , t1k1 −s+1 i, and the sub-path ht22 , . . . , t2k2 i. So the new 2VRP contains 2s + 5 customers (depots are counted here as customers). Figure 2 illustrates the concept of sliding subsets. To simplify drawings the customers are depicted as points, however we treat them rather as segments, as described in the previous section. On the other 6 Vladimir G. Deineko hand, the nodes in the tour are not connected by straight lines, as one would expect. Recall that in our model we view customers as “paths”, therefore curves are chosen to illustrate the connections. If no better solution is found, we redefine subset S2 by deleting, say, l first elements and adding l new elements (l is a parameter, to which we refer as the step). So subset S2 slides along the tour. We repeat the process until we reach the end of the tour. Then we change (slide) set S1 (with the step l) and redefine set S2 to follow set S1 similar to the first step settings described above. If the solution of the 2VRP was improved, the process of disassembling is applied to the new solution. The process is stopped when all possible positions for subsets S1 and S2 are considered and no improvements found. Fig. 3: Illustrations of disassembling: (a) first step: S1 and S2 are separated by one sub-path only; (b) an example when S1 and S2 are separated by two sub-paths and a depot; (c) depot and the first subpath are considered as one customer; (d) modified first step: a subpath between S1 and S2 (case (a)) is partitioned into a sub-path and a single customer to keep the size of the new 2VRP fixed. Details of implementation. In the follow up computational experiments we used a modification of the approach described above. The parameters of the algorithm are the size of the subsets s and step l. To keep the size of the small 2VRP fixed and defined by only these two parameters, we implement the disassembling procedure as described below. We refer to Figure 3 in our explanations of various steps (and possibilities) for disassembling. Figure 3(a) illustrates the first step of the disassembling process as was described above (with parameter s = 2). Sets S1 and S2 are separated by one sub-path in this case. The size of the new small 2VRP is 2s + 5. In the illustrations we set step l = 2. Fig. 3(b)) illustrates the outcome of disassembling the tour on the second step. Notice that depot 0 was already removed from the tour, therefore setting l = 2 yields A framework for the 2-VRP 7 the position of S2 as shown in the figure. There are two sub-paths between sets S1 and S2 , and the size of the new 2VRP problem is 2s + 6. Consider the step when S1 and S2 are chosen as shown in Fig. 3(c). If the first sub-path did not contain the depot, the size of the problem would have been 2s + 7. On the implementation step, it was convenient to keep the size of the problem fixed at 2s + 6. Therefore it was decided to “glue” the first sub-path with the depot and have it as the depot in the new problem as shown in the figure. If subsets S1 and S2 are separated by a single path (for example, on the first step of disassembling), it was decided to consider the last node in the sub-path as a second sub-path: in this case the problem with 2s + 5 customers becomes the problem with 2s + 6 customers (compare Fig. 3(a) and Fig. 3(d)). We will use notation H(s, l) for a heuristic from the family of heuristics described above, where the size of the subsets is s: |S1 | = |S2 | = s, and the step for moving the subsets is l. 2.4 Varieties of the VRP covered by the framework. Below we illustrate the advantages of the suggested dynamic programming approach by listing some types of the VRPs that can be tackled by the approach proposed. – Arc routing. Our model made no difference between the classic capacitated VRP, where the customers are represented by one node in a road network, and the arc routing VRP, where the customers are the streets/arcs in the network (see [41,10]). – Heterogeneous fleet. The dynamic programming recursions take into account individual characteristics of the vehicles, so both homogeneous and heterogeneous fleets (see [2] and recent survey [23]) can be managed. – Multi-depot and open VRPs. Incorporation of the multi-depot feature into the model is straightforward. The reader is referred to recent papers [31,25] for the specifics of the multi-depot VRP. For the open VRP (see references in recent papers [28,29]), it is enough to introduce a dummy depot with zero distances to this depot from all customers. – Tight capacity constraint. For some instances of the VRP, the main difficulties lie in packing all goods into a bounded number of vehicles. Since the dynamic programming approach enumerates all possible subsets, the “bin packing”/loading part of the VRP is resolved at the same time as the routing part. See arguments in [11] for the benefits of integrating loading and routing. It is easy to see that the framework can incorporate more complicated packing constraints, e.g. twodimensional loading constraints [26], by solving the corresponding packing sub-problems on each step of calculations. – Fixed items in a vehicle. In some VRPs it is important to allocate customers to particular vehicle visits in advance. We refer to these customers as fixed items in a vehicle. This feature can easily be added to the dynamic programming recursions. Fixed items can be useful, e.g. with multiple visits of customers (see Section 3.1 in this paper). Another example is the so-called site-dependent VRP [2] - some customers can be served only by a specific type of vehicles (so-called docking constraints [7]). An interesting case study with fixed customers was described in [15]. An Austrian red cross considered introducing two tiers for a blood delivery service. Urgent delivery (with a higher price) is delivery within one day, and standard delivery (at a lower price) is delivery on the second day. Hospital customers for the current day are known, while the next day’s customers are unknown and only the probabilities of requests can be evaluated. So, on each day a dispatcher knows undelivered requests from yesterday, requests which arrived today, and probable requests for tomorrow. The requests from yesterday are urgent and have to be delivered today - hence a fixed allocation of these customers to today’s route (it is assumed here that the delivery is done by one vehicle). A sample of (probable) requests for tomorrow should be fixed for tomorrow’s delivery. Today’s requests are flexible and can be allocated to either vehicle, however they will be charged different prices. 8 Vladimir G. Deineko – Penalties for wrong day deliveries. In the previous paragraph we mentioned charges/costs for deliveries in different vehicles/days. Another example is given in [12], where penalties for wrong day deliveries were introduced. These can easily be incorporated into our model by changing left/right lengths of intervals (assuming that costs of travelling and penalties are measured in the same monetary units). – Cumulative VRPs. In the cumulative VRP the objective is to minimise the sum of arrival times to all customers; this problem is also known as the latency problem (see references in recent papers [8,30,34]). It is easy to see that the dynamic programming approach can be adapted for this type of objective function. – Weight or time dependent travel costs. There are some practical situations when the travel costs depend on the load of the vehicle (see [42,43] and references there) or on the time when the vehicle travels ([17,37]). It can easily be seen that the dynamic programming recursions above allow this type of calculation to be incorporated into the recursions. Fig. 4: Illustration of the definition of the balanced 2TSP; customers 1, 3, 5, and 8 are visited in two periods. 3 An application of the framework In this section we provide evidence of computational efficiency of the proposed framework. As a test problem we have chosen a 2-period balanced travelling salesman problem and a set of the benchmark test problems from Bassetto & Mason [3]. In their algorithms, Bassetto & Mason used powerful exact techniques and even used a visualisation and human interventions for improving solutions. We believe that we have chosen a strong competitor to test the potential of the suggested framework. 3.1 A 2-period travelling salesman problem Given m customers to be visited in each of the two periods and n customers to be visited once in either of the periods, and the distance matrix between the customers, the 2-period travelling salesman problem (2TSP) asks for tours for the two periods with the minimal total distance travelled. A framework for the 2-VRP 9 Butler, Williams, and Yarrow [4] considered a practical application of the 2TSP in milk collection in Ireland. They applied what they called a “man-machine method”, combining an integer programming technique with a human being intervention for identifying violated constraints. The 2TSP can be modelled as a special case of the 2VRP as follows. For each of the customers to be visited twice, an identical copy of the customer is created. The identical customers are allocated then to the different vehicles. This allocation to the vehicles is fixed. The 2VRP now has n + 2 × m customers: each vehicle has to serve m fixed customers, n customers to be served by only one of the two vehicles. In the balanced 2TSP (2VRP) an additional constraint demands that the number of customers visited in each period (each vehicle) differs by no more than 1. Bassetto and Mason [3] considered a balanced 2TSP in the Euclidean plane. In this variant of the problem the customers’ locations are points in the Euclidean plane, and the costs of travelling between the customers are standard Euclidean distances. Figure 4 illustrates a solution to the Euclidean balanced 2TSP with 10 customers. Four out of ten customers in the example are visited in 2 periods (the depot is considered as a customer here). A short summary of the approaches used in [3] is as follows. First a TSP tour on the set of all customers, called a general tour (GT), is constructed. The GT is used to obtain a partition of customers into two subsets visited in two periods. The initial partition is improved by applying decision rules motivated by geometry (e.g. removal of crossing edges). For each period an optimal TSP tour is constructed by applying an exact TSP algorithm (see [1], Chapter 16, and [9]). Three algorithms A1, A2, and A3 are suggested and tested on the benchmark instances. Since the test instances are defined by the Euclidean coordinates, a visualisation of solutions is an option. The authors used the visualisation and human intervention to improve some of the solutions. Columns labelled as “PC” in the tables in the Appendix refer to the best solutions found by algorithms A1 and A3 from [3]. Columns “PC+Manual” refer to the best solutions obtained after manual improvements (the exceptions are the results for instances I5 , I6 , and I10 the best solution for which were found by algorithm A2). 3.2 Computational experiments The set of benchmark instances from [3] contains 60 randomly generated instances with 48 customers. The set of these instances is divided into three subsets with a different number of customers to be visited in the two periods (8, 12, and 24 customers). We used the same set of instances in our computational experiments. However, we used only distance matrices, without using in our algorithms any knowledge on the sets of coordinates in the instances. We used the framework discussed in the previous sections in the following algorithmic setting: Algorithm for the 2VRP { repeat n(= 48) times: Generate a random allocation of n customers into two TSP tours; Insert into each tour the missing fixed customers to be visited by the two vehicles; Apply a tour improvement TSP heuristic of Carlier & Villon [6] to improve the tours; repeat Apply dynamic programming heuristic H(s, l) for improving the partition into the tours; Apply a tour improvement TSP heuristic of Carlier & Villon [6] to improve the tours; while (improvement found); } In our computational experiments we used three heuristics: H(3, 1), H(5, 2), and H(6, 3). So the dynamic programming recursions were used for sub-problems with no more than 18 customers. We found that the results are much better if a multi-start strategy is used, therefore we repeated our search starting with randomly generated initial solutions. The number of repetitions in our experiments was chosen as n = 48, however for some of the instances we tried 2n repetitions to improve the solutions (see 10 Vladimir G. Deineko 20 15 10 5 0 -8% -7% -6% -5% -4% -3% -2% -1% 0% Fig. 5: Histogram for the distribution of improvements achieved with H(6, 3) on all 60 instances. comments in the appendix). Surprisingly random partitions into tours in our experiments yield better solutions than partitions obtained from a “good” (general) TSP solution for all customers. We did not use an exact algorithm for finding TSP solutions. We used Carlier & Villon’s [6] TSP heuristic which is an O(n3 ) heuristic that finds an optimal TSP tour in an exponential neighbourhood of tours. (The use of this particular heuristic is rather a matter of author’s preferences. Notice that the neighbourhood searched by this heuristic contains at least 75% of tours that can be obtained from a tour by applying the well-known 3opt heuristic, as proved in Theorem 5 in [14]. For the experiments we used a desktop computer with Intel i7-3770 3.40 GHz CPU, 16 GB of RAM, and GNU C++ compiler. The length of the solutions found are represented in the tables in the Appendix. In this section we provide a summary of the results obtained. Figure 5 shows the improvement (measured in percent of achieved cost) that our technique yields using heuristic H(6, 3) for the dynamic programming search. Our results here are compared to the best solution found by algorithms A1 and A3 in [3]. It can be seen that all solutions have been improved, with the majority of improvements being 2% or better. By varying the size of the neighbourhoods searched in the dynamic programming heuristic, one can influence the computation time (and the accuracy). Tables 1-3 below summarise the outcomes of computational experiments for each of the settings used and for each type of instance. We compared our computational results with both the computer results (labelled as “PC”) and the results improved by manual intervention (labelled as “PC+Manual”) from [3]. Settings in [3] Mean % Best % Worst % Improved # H(3, 1), tmean = 27 sec PC PC+manual -2.22% -0.51% -7.19% -1.75% +0.46% +0.86% 19/20 13/20 H(5, 2), tmean = 172 sec PC PC+manual -2.54% -0.83% -6.92% -2.65% +0.28% +0.93% 19/20 17/20 H(6, 3), tmean = 415 sec PC PC+manual -2.63% -0.93% -7.31% -2.77% -0.12% -0.00% 20/20 20/20 Table 1: Summary of results for instances with 8 (out of 48) nodes visited in two periods. A framework for the 2-VRP Settings in [3] Mean % Best % Worst % Improved # H(3, 1), tmean = 23 sec PC PC+manual -1.76% -0.63% -3.81% -2.46% +0.30% +2.09% 19/20 17/20 H(5, 2), tmean = 172 sec PC PC+manual -2.14% -1.02% -3.93% -2.59% -0.53% +0.42% 20/20 18/20 11 H(6, 3), tmean = 415 sec PC PC+manual -2.17% -1.04% -3.93% -2.59% -0.53% +0.46% 20/20 19/20 Table 2: Summary of results for instances with 16 (out of 48) nodes visited in two periods. Settings in [3] Mean % Best % Worst % Improved # H(3, 1), tmean = 17 sec PC PC+manual -1.20% -0.58% -4.44% -1.50% -0.00% +0.24% 20/20 19/20 H(5, 2), tmean = 131 sec PC PC+manual -1.25% -0.64% -3.85% -1.52% -0.17% +0.24% 20/20 19/20 H(6, 3), tmean = 299 sec PC PC+manual -1.36% -0.75% -4.44% -2.17% -0.17% +0.16% 20/20 18/20 Table 3: Summary of results for instances with 24 (out of 48) nodes visited in two periods. 4 Summary In this paper we have presented a framework for small but rich VRPs. The framework can be used for a variety of VRP settings. The computational scheme which implements the framework permits an easy scaling, hence varying computational time and the accuracy of the solutions found. Computational experiments for the balanced 2-period TSP have shown an impressive performance from the framework. Our next step would be performing extensive computational experiments to test the potential of the framework for other VRP settings. Acknowledgements Vladimir Deineko acknowledges support by the Center for Discrete Mathematics and Its Applications, University of Warwick. The author also thanks Tatiana Bassetto and Francesco Mason for providing the benchmark problems, Douglas Miranda and Alex Taylor for useful comments on an early version of the paper. 12 A Vladimir G. Deineko Appendix Results for instances with 8 out of 48 nodes visited in two periods Solutions from [3] H(3, 1) H(5, 2) H(6, 3) Instance PC PC+manual time (sec) length time (sec) length time (sec) length I21 25217 24937 26 24517 185 24493 395 24517 I22 26996 26549 19 26413 141 26347 352 26347 I23 26476 26192 23 26222 168 26131 412 26050 I24 26802 26038 30 26091 169 26057 369 26002 I25 27728 27408 23 27053 150 26914 391 26914 I26 24348 24268 29 23894 186 23837 463 23837 I27 27335 26857 26 26435 181 26417 422 26417 I28 24679 24232 26 24006 162 23985 408 24143 I29 26890 26466 28 26466 180 26466 405 26466 I30 24978 24200 32 24407 212 23915 549 23915 I31 26266 26130 23 26130 147 26130 369 26130 I32 26360 26054 32 26067 196 26296 429 26032 I33 26418 26418 28 26540 174 26493 419 26387 I34 28733 27074 28 26666 166 26744 380 26633 I35 25043 24587 27 24587 172 24526 434 24517 I36 27103 26790 26 26321 179 26079 409 26079 I37 25662 25123 24 25072 153 25072 432 25101 I38 26459 25709 26 25816 161 25588 372 25588 I39 27209 26994 27 26553 186 26314 474 26247 I40 25416 24964 28 25081 170 24850 419 24824 Results for instances with 16 out of 48 nodes visited in two periods Solutions from [3] H(3, 1) H(5, 2) H(6, 3) Instance PC PC+manual time (sec) length time (sec) length time (sec) length I1 33804 32556 25 32566 154 32566 392 32556 I2 30929 30929 23 30716 150 30716 379 30716 I3 30596 30382 24 30280 157 29967 385 29954 I4 28563 28441 23 28274 139 28260 337 28223 I5 27323 27206 29 27177 184 27177 452 27177 I6 33065 32396 22 31971 152 31890 346 31890 I7 32854 31861 24 31615 153 31606 370 31637 I8 30850 30571 22 30215 120 30266 328 30266 I9 34709 34024 19 33951 124 33911 331 33911 I10 31451 30867 25 30844 154 30660 368 30660 I61 27158 26934 22 26799 146 26644 348 26644 I62 27774 27619 24 27325 168 27248 360 27248 I63 25308 24960 21 24345 142 24313 324 24313 I64 27875 27285* 19 27856 138 27399 377 27410 I65 27060 26888 20 27141 140 26872 373 26806 I66 27677 27624 26 27135 169 27188 429 27131 I67 30268 30203 21 29928 156 29841 340 29841 I68 28033 27923 24 27478 163 27425 393 27447 I69 27958 27638 22 27621 154 27143 383 27143 I70 28483 28427 22 27865 157 27799 350 27790 A framework for the 2-VRP 13 Solution for instance I64 was improved to 27236 by H(5, 2) with 2 × 48 random starts (in 280 seconds). Results for instances with 24 out of 48 nodes visited in two periods Solutions from [3] H(3, 1) H(5, 2) H(6, 3) Instance PC PC+manual time (sec) length time (sec) length time (sec) length I41 30253 30147 16 30100 117 30064 258 30064 I42 33008 32020 17 31544 124 31738 284 31544 I43 31500 31500 18 31200 140 31166 311 31194 I44 30313 30170 21 29812 156 29757 335 29757 I45 27986 27857 17 27780 128 27780 310 27780 I46 30073 30013 20 30013 148 30013 328 30013 I47 32106 32106 17 31704 133 31735 299 31728 I48 31004 30942 19 30478 149 30471 337 30471 I49 33663 33185 17 33173 130 33173 312 33197 I50 31266 31266 16 31266 117 31213 259 31213 I51 33722 33627 19 33358 146 33344 322 33358 I52 32353 32280 15 32251 113 32251 274 32200 I53 33287 33200 17 32943 118 32871 268 32726 I54 31973 31600 18 31368 149 31373 345 31368 I55 33837 33507* 16 33587 115 33587 292 33560 I56 29696 29476 16 29176 115 29156 266 28835 I57 31954 31640 18 31427 133 31427 299 31427 I58 30705 30246 18 30165 140 30178 345 30165 I59 31549 31549 19 31471 137 31223 296 31223 I60 32384 32317 15 32193 115 32137 244 32140 The best known value for instance I55 , which is 33507, can be achieved within 620 seconds by our algorithm as well, if we set parameters as s = 6 and l = 2. References 1. D. L. Applegate, R. E. Bixby, V. Chvatal, W. J. Cook, 2006. The traveling salesman problem. A computational study. Princeton University Press. 2. R.Baldacci, M. Battara, and D. Vigo, 2008. Routing a heterogeneous fleet of vehicles, in [19], 3–27. 3. T. Bassetto, F. Mason, 2011. Heuristic algorithms for the 2-period balanced travelling salesman problem in euclidean graphs. European Journal of Operational Research, 208(3): 253–262. 4. M. Butler, H.P. Williams, 1997. The two-period travelling salesman problem applied to milk collection in Ireland, Computational Optimization and Applications 7, 291–306. 5. J. Caceres-Cruz, P. Arias, D. Guimarans, D. Riera, and A. A. Juan, 2014. Rich vehicle routing problem: Survey. ACM Computing Surveys, 47, 2, Article 32. 6. J. Carlier, P. Villon, 1990. A new heuristic for the travelling salesman problem, RAIRO – Operations Research 24, 245–253. 7. V. N. Coelho, A. Grasas, H. Ramalhinho, I. M. Coelho, M. J. F. Souza, R. C. Cruz, 2016. An ILSbased algorithm to solve a large-scale real heterogeneous fleet VRP with multi-trip and docking constraints, European Journal of Operational Research, 250, 367–376. 8. S. Coene, F. C. R. Spieksma, G. J. Woeginger, 2011. Charlemagne’s challenge: the periodic latency problem, Operations Research, 59 (3), 674–683. 9. CONCORDE TSP SOLVER. http://www.tsp.gatech.edu/concorde. 10. A. Corberan, C. Prins, 2010. Recent results on arc routing problems: An annotated bibliography, Networks, 56(1), 50–69. 14 Vladimir G. Deineko 11. J-F. Côté, G. Guastaroba, M. G. Speranza, 2015. The value of integrating loading and routing, Working paper, CIRRELT-2015-31. 12. Y. Crama, M. Rezaei, T. Van Woensel, 2015. A branch-and-price algorithm for 2-period vehicle routing problems, Working paper,University of Liege, ORBi, http://hdl.handle.net/2268/175663. 13. J. Desrosiers, Y. Dumas, F. Soumis, 1986. A dynamic programming solution of the large-scale singlevehicle dial-a-ride problem with time windows, American Journal of Mathematical and Management Sciences, 6, 301–325. 14. V. G. Deineko, G. J. Woeginger, 2000. A study of exponential neighborhoods for the travelling salesman problem and for the quadratic assignment problem. Math. Program., 87, 519–542. 15. K.F. Doerner, W. J. Gutjahr, R. F. Hartl, and G. Lulli, 2008. Stochastic Local Search Procedures for the Probabilistic Two-Day Vehicle Routing Problem. A. Fink and F. Rothlauf (Eds.): Advances in Computational Intelligence, SCI 144, 153168. 16. M. Drexl, 2012. Rich vehicle routing in theory and practice, Logist. Res., 5, 47–63. 17. J. F. Ehmke, A. M. Campbell, B. W. Thomas, 2016. Vehicle routing to minimize time-dependent emission in urban areas, European Journal of Operational Research, 251, 478–494. 18. J. Gromicho, J. J. van Hoorn, A. L. Kok, J. M. J. Shutten, 2012. Restricted dynamic programming: A flexible framework for solving realistic VRPs. Computers & Operations Research, 39, 902–909. 19. B. Golden, S. Raghavan, E. Wasil (eds), 2008. The vehicle routing problem. Latest Advances and New Challenges, Springer Science + Business Media, LLC. 20. M. Held, R.M. Karp, 1962. A dynamic programming approach to sequencing problems. SIAM Journal of Applied Mathematics, 10, 196–210. 21. S. Irnich, 2008. A unified modeling and solution framework for vehicle routing and local search-based metaheuristics. SIAM Journal on Computing, 20, 2, 270–287. 22. H. Kellerer, U. Pferchy, D. Pisinger, 2004. Knapsack problems, Springer Verlag, Berlin. 23. Ç. Koç, T. Bektaş, O. Jabali, G. Laporte, 2016. Thirty years of heterogeneous vehicle routing, European Journal of Operational Research, 249, 1–21. 24. A. L. Kok, C. M. Meyer, H. Kopfer, J. M. J. Shutten, 2010. A dynamic programming heuristic for the vehicle routing problem with time windows and European community social legislation, Transportation Science, 44.4, 442–454. 25. D. Krushinsky, T. van Woensel, 2015. An approach to the asymmetric multi-depot capacitated arc routing problem, European Journal of Operational Research, 244, 100–109. 26. R. Lahyani, M. Khemakhem, F. Semet, 2015. Rich vehicle routing problems: From a taxonomy to a definition, European Journal of Operational Research, 241, 1–14. 27. S. C. H. Leung, Z. Zhang, D. Zhang, X. Hua, M. K. Lim, 2013. A meta-heuristic algorithm for heterogeneous fleet vehicle routing problems with two-dimensional loading constraints, European Journal of Operational Research, 225, 199–210. 28. R. Liu, Z. Jiang, 2012. The close-open mixed vehicle routing problem, European Journal of Operational Research, 220, 349–360. 29. A. D. López-Sánches, A. G. Hernández-Dı́az, D. Vigo, R. Caballero, J. Molina, 2014. A multistart algorithm for a balanced real-world open vehicle routing problem, European Journal of Operational Research, 238, 104–113. 30. J. Lysgaard, S. Wøhlk , 2014. A branch-and-cut-and-price algorithm for the cumulative capacitated vehicle routing problem, European Journal of Operational Research, 236, 800–810. 31. J. R. Montoya-Torres, J. L. Franco, S. N. Isaza, H. F. Jiménez, H. Herazo-Padilla, 2015. A literature review on the vehicle routing problem with multiple depots, Computers & Industrial Engineering, 79, 115–129. 32. H. N. Psaraftis, 1980. An exact algorithm for the single-vehicle, many-to-many, immediate request diala-ride problem, Transportation Science, 14, 130–154. 33. H. N. Psaraftis, 1983. A dynamic programming solution to the single-vehicle, many-to-many dial-a-ride problem with time windows, Transportation Science, 17, 351–357. 34. J. C. Rivera, H. M. Afsar, C. Prins, 2016. Mathematical formulations and exact algorithm for the multitrip cumulative capacitated single-vehicle routing problem, European Journal of Operational Research, 249, 893–104. A framework for the 2-VRP 15 35. K. Soonpracha, A. Mungwattana, G. K. Janssens, T. Manisri , 2014. Heterogeneous VRP review and conceptual framework, Proceedings of the International Multiconference of Engineers and Computer Scientists, IMECS 2014, Vol II, Hong Kong. 36. A. Subramanyam, C. E. Gounaris, 2016. A branch-and-cut framework for the consistent traveling salesman problem, European Journal of Operational Research, 248, 384–395. 37. D. Taş, M. Gendreau, O. Jabali, G. Laporte, 2016. The traveling salesman problem with timedependent service tomes, European Journal of Operational Research, 248, 372–383. 38. T. Vidal, T. G. Crainic, M. Gendreau, C. Prins, 2013. Heuristics for multi-attribute vehicle routing problems: A survey and synthesis, European Journal of Operational Research, 231, 1–21. 39. T. Vidal, T. G. Crainic, M. Gendreau, C. Prins, 2014. Implicit depot assignments and rotations in vehicle routing heuristics, European Journal of Operational Research, 237, 15–28. 40. T. Vidal, T. G. Crainic, M. Gendreau, C. Prins, 2014. A unified solution framework for multi-attribute vehicle routing problems, European Journal of Operational Research, 234, 658–673. 41. S. Wøhlk, 2008. A decade of capacitated arc routing, in [19], 29–48. 42. E. E. Zachariadis, C. D. Tarantilis, C. T. Kiranoudis, 2015. The load-dependent vehicle routing problem and its pick-up and delivery extension, Transportation Research Part B, 71, 158–181. 43. Z. Zhang, H. Qin, W. Zhu, A. Lim, 2012. The single vehicle routing problem with toll-by-weight scheme: A branch-and-bound approach, European Journal of Operational Research, 220, 295–304.
8cs.DS
arXiv:1511.04478v1 [cs.DS] 13 Nov 2015 A Backward/Forward Recovery Approach for the Preconditioned Conjugate Gradient Method Massimiliano Fasi, Julien Langou, Yves Robert, and Bora Uçar Abstract Several recent papers have introduced a periodic verification mechanism to detect silent errors in iterative solvers. Chen [PPoPP’13, pp. 167–176] has shown how to combine such a verification mechanism (a stability test checking the orthogonality of two vectors and recomputing the residual) with checkpointing: the idea is to verify every d iterations, and to checkpoint every c × d iterations. When a silent error is detected by the verification mechanism, one can rollback to and re-execute from the last checkpoint. In this paper, we also propose to combine checkpointing and verification, but we use algorithm-based fault tolerance (ABFT) rather than stability tests. ABFT can be used for error detection, but also for error detection and correction, allowing a forward recovery (and no rollback nor re-execution) when a single error is detected. We introduce an abstract performance model to compute the performance of all schemes, and we instantiate it using the preconditioned conjugate gradient algorithm. Finally, we validate our new approach through a set of simulations. 1 Introduction Silent errors (or silent data corruptions) have become a significant concern in HPC environments [1]. There are many sources of silent errors, from bit flips in cache caused by cosmic radiations, to wrong results produced by the arithmetic logic unit. The latter source becomes relevant when the computation is performed in the low voltage modeto reduce the energy consumption in large-scale computations. But the low levels of voltage dramatically reduces the dependability of the system. The key problem with silent errors is the detection latency: when a silent error strikes, the corrupted data is not identified immediately, but instead only when some numerical anomaly is detected in the application behavior. It is clear that this detection can occur with an arbitrary delay. As a consequence, the de facto standard method for resilience, namely checkpointing and recovery, cannot be used directly. Indeed, the method of checkpointing and recovery applies to fail-stop errors (e.g., hardware crashes): such errors are detected immediately, and one can safely recover from the last saved snapshot of the application state. 1 On the contrary, because of the detection latency induced by silent errors, it is often impossible to know when the error struck, and hence to determine which checkpoint (if any) is valid to safely restore the application state. Even if an unlimited number of checkpoints could be kept in memory, there would remain the problem of identifying a valid one. In the absence of a resilience method, the only known remedy to silent errors is to re-execute the application from scratch as soon as a silent error is detected. On large-scale systems, the silent error rate grows linearly with the number of components, and several silent errors are expected to strike during the execution of a typical large-scale HPC application [2, 3, 4, 5]. The cost of re-executing the application one or more times becomes prohibitive, and other approaches need to be considered. Several recent papers have proposed to introduce a verification mechanism to be applied periodically in order to detect silent errors. These papers mostly target iterative methods to solve sparse linear systems, which are natural candidates to periodic detection. If we apply the verification mechanism every, say, d iterations, then we have the opportunity to detect the error earlier, namely at most d − 1 iterations after the actual faulty iteration, thereby stopping the progress of a flawed execution much earlier than without detection. However, the cost of the verification may be non-negligible in front of the cost of one iteration of the application, hence the need to trade off for an adequate value of d. Verification can consist in testing the orthogonality of two vectors (cheap) or recomputing the residual (cost of a sparse matrix-vector product, more expensive). We survey several verification mechanisms in Section 2. Note that in all these approaches a selective reliability model is enforced, where the parts of the application that are not protected are assumed to execute in a reliable mode. While verification mechanisms speed up the detection of silent errors, they cannot provide correction, and thus they cannot avoid the re-execution of the application from scratch. A solution is to combine checkpointing with verification. If we apply the verification mechanism every d iterations, we can checkpoint every c × d iterations, thereby limiting the amount of re-execution considerably. A checkpoint is always valid because it is being preceded by a verification. If an error occurs, it will be detected by one of the c verifications performed before the next checkpoint. This is exactly the approach proposed by Chen [6] for a variety of methods based on Krylov subspaces, including the widely used conjugate Gradient (CG) algorithm. Chen [6] gives an equation for the overhead incurred by checkpointing and verification, and determines the best values of c and d by finding a numerical solution of the equation. In fact, computing the optimal verification and checkpoint intervals is a hard problem. In the case of pure periodic checkpointing, closed-form approximations of the optimal period have been given by Young [7] and Daly [8]. However, when combining checkpointing and verification, the complexity of the problem grows. To the best of our knowledge, there is no known closed-form formula, although a dynamic programming algorithm to compute the optimal repartition of checkpoints and verifications is available [9]. For linear algebra kernels, another widely used technique for silent error 2 detection is algorithm-based fault tolerance (ABFT). The pioneering paper of Huang and Abraham [10] describes an algorithm capable of detecting and correcting a single silent error striking a dense matrix-matrix multiplication by means of row and column checksums. ABFT protection has been successfully applied to dense LU [11], LU with partial pivoting [12], Cholesky [13] and QR [14] factorizations, and more recently to sparse kernels like SpMxV (matrix-vector product) and triangular solve [15]. The overhead induced by ABFT is usually small, which makes it a good candidate for error detection at each iteration of the CG algorithm. The beauty of ABFT is that it can correct errors in addition to detecting them. This comes at the price of an increased overhead, because several checksums are needed to detect and correct, while a single checksum is enough when just detection is required. Still, being able to correct a silent error on the fly allows for forward recovery. No rollback, recovery nor re-execution are needed when a single silent error is detected at some iteration, because ABFT can correct it, and the execution can be safely resumed from that very same iteration. Only when two or more silent errors strike within an iteration we do need to rollback to the last checkpoint. In many practical situations, it is reasonable to expect no more than one error per iteration, which means that most roll-back operations can be avoided. In turn, this leads to less frequent checkpoints, and hence less overhead. The major contributions of this paper are an ABFT framework to detect multiple errors striking the computation and a performance model that allows to compare methods that combine verification and checkpointing. The verification mechanism is capable of error detection, or of both error detection and correction. The model tries to determine the optimal intervals for verification and checkpointing, given the cost of an iteration, the overhead associated to verification, checkpoint and recovery, and the rate of silent errors. Our abstract model provides the optimal answer to this question, as a function of the cost of all application and resilience parameters. We instantiate the model using a CG kernel, preconditioned with a sparse approximate inverse [16], and compare the performance of two ABFT-based verification mechanisms. We call the first scheme, capable of error detection only, ABFT-Detection and the second scheme, which enhances the first one by providing single error correction as well, ABFT-Correction. Through numerical simulations, we compare the performance of both schemes with Online-Detection, the approach of Chen [6] (which we extend to recover from memory errors by checkpointing the sparse matrix in addition to the current iteration vectors). These simulations show that ABFT-Correction outperforms both OnlineDetection and ABFT-Detection for a wide range of fault rates, thereby demonstrating that combining checkpointing with ABFT correcting techniques is more efficient than pure checkpointing for most practical situations. Our discussion focuses on the sequential execution of iterative methods. Yet, all our techniques extend to parallel implementation based on the message passing paradigm (with using, e.g., MPI). In an implementation of SpMxV in such a setting, the processing elements (or processors) hold a part of the matrix and 3 the input vector, and hold a part of the output vector at the end. A recent exposition of different algorithms can be found elsewhere [17]. Typically, the processors perform scalar multiply operations on the local matrix and the input vector elements, when all required vector elements have been received from other processors. The implementations of the MPI standard guarantees correct message delivery, i.e., checksums are incorporated into the message so as to prevent transmission errors (the receives can be done in-place and hence are protected). However, the receiver will obviously get corrupted data if the sender sends corrupted data. Silent error can indeed strike at a given processor during local scalar multiply operations. Performing error detection and correction locally implies global error detection and correction for the SpMxV. Note that, in this case, the local matrix elements can form a matrix which cannot be assumed to be square in general (for some iterative solvers they can be). Furthermore, the mean time between failures (MTBF) reduces linearly with the number of processors. This is well-known for memoryless distributions of fault inter-arrival times and remains true for arbitrary continuous distributions of finite mean [18]. Therefore, resilient local matrix vector multiplies are required for resiliency in a parallel setting. The rest of the paper is organized as follows. Section 2 provides an overview of related work. Section 3 provides background on ABFT techniques for the PCG algorithm, and presents both the ABFT-Detection and ABFT-Correction approaches. Section 5 is devoted to the abstract performance model. Section 6 reports numerical simulations comparing the performance of ABFTDetection, ABFT-Correction and Online-Detection. Finally, we outline main conclusions and directions for future work in Section 7. 2 Related work We classify related work along the following topics: silent errors in general, verification mechanisms for iterative methods, and ABFT techniques. 2.1 Silent errors Considerable efforts have been directed at error-checking to reveal silent errors. Error detection is usually very costly. Hardware mechanisms, such as ECC memory, can detect and even correct a fraction of errors, but in practice they are complemented with software techniques. The simplest technique is triple modular redundancy and voting [19], which induces a costly verification. For high-performance scientific applications, process replication (each process is equipped with a replica, and messages are quadruplicated) is proposed in the RedMPI library [20]. Elliot et al. [21] combine partial redundancy and checkpointing, and confirm the benefit of dual and triple redundancy. The drawback is that twice the number of processing resources is required (for dual redundancy). A comprehensive list of general-purpose techniques and references is provided by Lu et al. [22]. 4 Application-specific information can be very useful to enable ad-hoc solutions, which dramatically decrease the cost of detection. Many techniques have been advocated. They include memory scrubbing [23] and ABFT techniques (see below). As already stated, most papers assume on a selective reliability setting [24, 25, 26, 27]. It essentially means that one can choose to perform any operation in reliable or unreliable mode, assuming the former to be error-free but energy consuming and the latter to be error-prone but preferable from an energy consumption point of view. 2.2 Iterative methods Iterative methods offer a wide range of ad-hoc approaches. For instance, instead of duplicating the computation, Benson et al. [28] suggest coupling a higher-order with a lower-order scheme for PDEs. Their method only detects an error but does not correct it. Self-stabilizing corrections after error detection in the CG method are investigated by Sao and Vuduc [27]. Heroux and Hoemmen [29] design a fault-tolerant GMRES capable of converging despite silent errors. Bronevetsky and de Supinski [30] provide a comparative study of detection costs for iterative methods. As already mentioned, a nice instantiation of the checkpoint and verification mechanism that we study in this paper is provided by Chen [6], who deals with sparse iterative solvers. For PCG, the verification amounts to checking the orthogonality of two vectors and to recomputing and checking the residual (see Section 3 for further details). As already mentioned, our abstract performance model is agnostic of the underlying error-detection technique and takes the cost of verification as an input parameter to the model. 2.3 ABFT The very first idea of algorithm-based fault tolerance for linear algebra kernels is given by Huang and Abraham [10]. They describe an algorithm capable of detecting and correcting a single silent error striking a matrix-matrix multiplication by means of row and column checksums. This germinal idea is then elaborated by Anfinson and Luk [31], who propose a method to detect and correct up to two errors in a matrix representation using just four column checksums. Despite its theoretical merit, the idea presented in their paper is actually applicable only to relatively small matrices, and is hence out of our scope. Bosilca et al. [32] and Du et al. [11] present two relatively recent survey. The problem of algorithm-based fault-tolerance for sparse matrices is investigated by Shantharam et al. [15], who suggest a way to detect a single error in an SpMxV at the cost of a few additional dot products. Sloan et al. [33] suggest that this approach can be relaxed using randomization schemes, and propose several checksumming techniques for sparse matrices. These techniques are less 5 effective than the previous ones, not being able to protect the computation from faults striking the memory, but provide an interesting theoretical insight. 3 CG-ABFT We streamline our discussion on the CG method, however, the techniques that we describe are applicable to any iterative solver that use sparse matrix vector multiplies and vector operations. This list includes many of the non-stationary iterative solvers such as CGNE, BiCG, BiCGstab where sparse matrix transpose vector multiply operations also take place. In particular, we consider a PCG variant where the application of the preconditioner reduces to the computation of two SpMxV with triangular matrices [16], which are a sparse factorization of an approximate inverse of the coefficient matrix. In fact, the model discussed in this paper can be profitably employed for any sparse inverse preconditioner that can be applied by means of one or more SpMxV. We first provide a background on the CG method and overview both Chen’s stability tests [6] and our ABFT protection schemes. Algorithm 1 The PCG algorithm. Input: A, M ∈ Rn×n , b, x0 ∈ Rn , ε ∈ R Output: x ∈ Rn : kAx − bk ≤ ε 1: r0 ← b − Ax0 ; 2: z0 ← M⊺ Mr0 ; 3: p0 ← z0 ; 4: i ← 0; 5: while kri k > ε (kAk · kr0 k + kbk) 6: q ← Api ; 7: αi ← kri k2 /p⊺i q; 8: xi+1 ← xi + α pi ; 9: ri+1 ← ri − α q; 10: zi+1 ← M⊺ Mri+1 ; 11: β ← kri+1 k2 / kri k2 ; 12: pi+1 ← zi+1 + β pi ; 13: i ← i + 1; 14: end while 15: return xi ; The code for the variant of the PCG method we use is shown in Algorithm 1. The main loop features three sparse matrix-vector multiply, two inner products (for p⊺i q and kri+1 k2 ), and three vector operations of the form axpy. Chen’s stability tests [6] amount to checking the orthogonality of vectors p⊺ q i+1 pi+1 and q, at the price of computing kpi+1 kkqi k , and to checking the residual at the price of an additional SpMxV operation Axi − b. The dominant cost of these verifications is the additional SpMxV operation. Our only modification to Chen’s original approach is that we also save the sparse matrix A in addition to the current iteration vectors. This is needed 6 when a silent error is detected: if this error comes for a corruption in data memory, we need to recover with a valid copy of the data matrix A. This holds for the three methods under study, Online-Detection, ABFT-Detection and ABFT-Correction, which have exactly the same checkpoint cost. We now give an overview of our own protection and verification mechanisms. We use ABFT techniques to protect the SpMxV, its computations (hence the vector q), the matrix A and the input vector pi . Since ABFT protection for vector operations is as costly as repeated computation, we use triple modular redundancy (TMR) for them for simplicity. Although theoretically possible, constructing ABFT mechanism to detect up to k errors is practically not feasible for k > 2. The same mechanism can be used to correct up to ⌊k/2⌋. Therefore, we focus on detecting up to two errors and correcting the error if there was only one. That is, we detect up to two errors in the computation q ← Api (two entries in q are faulty), or in pi , or in the sparse representation of the matrix A. With TMR, we assume that the errors in the computation are not overly frequent so that two out of three are correct (we assume errors do not strike the vector data here). Our fault-tolerant PCG versions thus have the following ingredients: ABFT to detect up to two errors in the SpMxV and correct the error, if there was only one; TMR for vector operations; and checkpoint and roll-back in case errors are not correctable. We assume the selective reliability model in which all checksums and checksum related operations are non-faulty, also the tests for the orthogonality checks are non-faulty. 4 ABFT-SpMxV Here, we discuss the proposed ABFT method for the SpMxV (combining ABFT with checkpointing is described later in Section 5.2). The proposed ABFT mechanisms are described for detecting single errors (Section 4.1), multiple errors (Section 4.2), and correcting a single error (Section 4.3). 4.1 Single error detection The overhead of the standard single error correcting ABFT technique is too high for the sparse matrix-vector product case. Shantharam et al. [15] propose a cheaper ABFT-SpMxV algorithm that guarantees the detection of a single error striking either the computation or the memory representation of the two input operands (matrix and vector). Because their results depend on the sparse storage format adopted, throughout the paper we will assume that sparse matrices are stored in the compressed storage format by rows (CSR), that is by means of three distinct arrays, namely Colid ∈ Nnnz(A) , Val ∈ Rnnz(A) and Rowidx ∈ Nn+1 [34, Sec. 3.4]). Here nnz(A) is the number of non-zero entries in A. Shantharam et al. can protect y ← Ax, where A ∈ Rn×n and x, y ∈ Rn . 7 To perform error detection, they rely on a column checksum vector c defined by cj = n X ai,j (1) i=0 and an auxiliary copy x′ of the x vector. After having the actual Pperformed n SpMxV, to validate the result, it suffices to compute i=1 yi , c⊺ x and c⊺ x′ , and to compare their values. It can be shown [15] that in case of no errors, these three quantities carry the same value, whereas if a single error strikes either the memory or the computation, one of them must differ from the other two. Nevertheless, this method requires A to be strictly diagonally dominant, a condition that seems to restrict too much the practical applicability of their method. Shantharam et al. need this condition to ensure detection of errors striking an entry of x corresponding to a zero checksum column of A. We further analyze that case and show how to overcome the issue without imposing any restriction on A. A nice way to characterize the problem is expressing it in geometrical terms. Consider the computation of a single entry of the checksum as (w A)j = ⊺ n X wi ai,j = w⊺ Aj , i=1 where w ∈ Rn denotes the weight vector and Aj the j-th column of A. Let us now interpret such an operation as the result of the scalar product h·, ·i : Rn × Rn → R defined by hu, vi 7→ u⊺ v. It is clear that a checksum entry is zero if and only if the corresponding column of the matrix is orthogonal to the weight vector. In (1), we have chosen w to be such that wi = 1 for 1 ≤ i ≤ n, in order to make the computation easier. Let us see now what happens without this restriction. The problem reduces to finding a vector w ∈ Rn that is not orthogonal to any vector out of a basis B = {b1 , . . . , bn } of Rn – the rows of the input matrix. Each of these n vectors is perpendicular to a hyperplane hi of Rn , and w does not verify the condition hw, bi i 6= 0, (2) for any i, if and only if it lies on hi . Since the Lebesgue measure in Rn of an hyperplane of Rn itself is zero, the union of these hyperplanes is measurable and has measure 0. Therefore, the probability that a vector w randomly picked in Rn does not satisfy condition (2) for any i is zero. Nevertheless, there are many reasons to consider zero checksum columns. First of all, when working with finite precision, the number of elements in Rn one can have is finite, and the probability of randomly picking a vector that is orthogonal to a given one could be larger than zero. Moreover, a coefficient matrix usually comes from the discretization of a physical problem, and the distribution of its columns cannot be considered as random. Finally, using a randomly chosen vector instead of (1, . . . , 1)⊺ increases the number of required 8 floating point operations, causing a growth of both the execution time and the number of rounding errors (see Section 6). Therefore, we would like to keep w = (1, . . . , 1)⊺ as the vector of choice, in which case we need to protect SpMxV with matrices having zero column sums. There are many matrices with this property, for example the Laplacian matrices of graphs [35, Ch. 1]. Algorithm 2 Shifting checksum algorithm. Input: A ∈ Rn×n , x ∈ Rn Output: y ∈ Rn such that y = Ax or the detection of a single error 1: x′ ← x; 2: [w, c, k, cr ] = computeChecksum(A); 3: return SpMxV(A, x, x′ , w, c, k, cr ); 4: function computeChecksum(A) 5: Generate w ∈ Rn+1 ; 6: w ← w1:n ; 7: c ← w⊺ A; 8: if min(| c |) = 0 ; 9: Find k that verifies (4); 10: c ← c + k; 11: 12: cr ← w⊺ Rowindex ; return w, c, k, cr ; 13: function SpMxV(A, x, x′ , w, c, k, cr ) 14: w ← w1:n ; 15: sr ← 0; 16: for i ← 1 to n 17: yi ← 0; 18: sr ← sr + Rowindex i ; 19: for j ← Rowindex i to Rowindex i+1 − 1 20: ind ← Colid j ; 21: yi ← yi + Val j · xind ; 22: 23: 24: 25: 26: 27: 28: 29: 30: yn+1 ← k w⊺ x′ ; cy ← w⊺ y; dx ← c⊺ x; dx′ ← c⊺ x′ ; dr ← cr − sr ; if dx = 0 ∧ dx′ = 0 ∧ dr = 0 return y1:n ; else error (“Soft error is detected”); In Algorithm 2, we propose an ABFT SpMxV method that uses weighted checksums and does not require the matrix to be strictly diagonally dominant. The idea is to compute the checksum vector and then shift it by adding to all entries a constant value chosen so that all elements of the new vector are different from zero. We give the generalized result in Theorem 1. 9 Theorem 1 (Correctness of Algorithm 2). Let A ∈ Rn×n be a square matrix, let x, y ∈ Rn be the input and output vector respectively, and let x′ = x. Let us assume that the algorithm performs the computation e x, e ← Ae y (3) e ∈ Rn×n and x e ∈ Rn are the possibly faulty representations of A and x where A e ∈ Rn is the possibly erroneous result of the sparse matrixrespectively, while y vector product. Let us also assume that the encoding scheme relies on 1. an auxiliary checksum vector # " n n X X ai,n + k , ai,1 + k, . . . , c= i=1 i=1 where k is such that cj = n X ai,j + k 6= 0, (4) i=1 for 1 ≤ j ≤ n, 2. an auxiliary checksum yn+1 = k Pn i=i x ei , 3. an auxiliary counter sr initialized to 0 and updated at runtime by adding the value of the hit element each time the Rowindex array is accessed (line 20 of Algorithm 2), P 4. an auxiliary checksum cr = ni=1 Rowindex i ∈ N. Then, a single error in the computation of the SpMxV causes one of the following conditions to fail: P e = n+1 i. c⊺ x ei , i=1 y P n+1 ii. c⊺ x′ = i=1 yei , iii. sr = cr . Proof. We will consider three possible cases, namely a. a faulty arithmetic operation during the computation of y, b. a bit flip in the sparse representation of A, c. a bit flip in an element of of x. Case a. Let us assume, without loss of generality, that the error has struck at the pth position of y, which implies yei = yi for 1 ≤ i ≤ n with i 6= p and 10 yep = yp +ε, where ε ∈ R \{0} represents the value of the error that has occurred. e gives Summing up the elements of y n+1 X i=1 yei = = = n X n X i=1 j=1 n X j=1 ⊺ ai,j x ej + k n X j=1 cj x ej + ε x ej + ε e + ε, c x that violates condition (i). Case b. A single error in the A matrix can strike one of the three vectors that constitute its sparse representation: • a fault in Val that alters the value of an element ai,j implies an error in the computation of yei , which leads to the violation of the safety condition (i) because of (a), • a variation in Colid can zero out an element in position ai,j shifting its value in position ai,j ′ , leading again to an erroneous computation of yei , • a transient fault in Rowindex entails an incorrect value of sr and hence a violation of condition (iii). Case c. Let us assume, without loss of generality, an error in position p of x. Hence we have that x ei = xi for 1 ≤ i ≤ n with i 6= p and x ep = xp + ε, for e gives some ε ∈ R \ {0}. Noting that x = x′ , the sum of the elements of y n+1 X i=1 yei = = n X n X i=1 j=1 n X n X ai,j x ej + k ai,j xj + k = cj xj + ε = c x +ε n X i=1 j=1 ⊺ ′ n X Pn i=1 x ej xj + ε ai,p + k ! ! n X ai,p + εk i=1 ai,p + k , i=1 that violates (ii) since j=1 n X j=1 i=1 j=1 n X n X ai,p + k 6= 0 by definition of k. Let us remark that computeChecksum in Algorithm 2 does not require the input vector x of SpMxV as an argument. Therefore, in the common scenario of many SpMxV with the same matrix, it is enough to invoke it once to protect several matrix-vector multiplications. This observation will be crucial when discussing the performance of these checksumming techniques. 11 Table 1: Overhead comparison for Algorithm 2 and Algorithm 3. Here n denotes the size of the matrix and n′ the number of null sum columns. Algorithm 2 Algorithm 3 n n 2n n - n n′ 2n + 2n′ n + n′ n′ 5n 4n + 5n′ initialization of y computation of yn+1 SpMxV overhead checksum check computation of cy and cyb b computation of y + y Total SpMxV overhead Shifting the sum checksum vector by an amount is probably the simplest deterministic approach to relax the strictly diagonal dominance hypothesis, but it is not the only one. An alternative solution is described in Algorithm 3, which basically exploits the distributive property of matrix multiplication over matrix addition. The idea is to split the original matrix A into two matrices of the b such that no column of either matrix has a zero checksum. same size, A and A, b ← Ab Two standard ABFT multiplications, namely y ← Ax and y x, are then performed. If no error occurs neither in the first nor in the second computation, b is computed in reliable mode and then returned. Let us the sum of y and y b to be much smaller than note that, as we expect the number of non-zeros of A b b vector. n, we store sparsely both the checksum vector of A and the y We do not write down an extended proof of the correctness of this algorithm, and limit ourselves to a short sketch. We consider the same three cases as in the proof of Theorem 1, without introducing any new idea. An error in b can be detected using the dot product between the the computation of y or y corresponding column checksum and the x error. An error in A can be detected b , as the matrix loop structure of the by either cr or an erroneous entry in y or y sparse multiplication algorithm has not been changed. Finally, an error in the b differ from pth component of x would make the sum of the entries of y and y c⊺ x′ and b c⊺ x′ , respectively. The evaluation of the performance of the two algorithms, though straightforward from the point of view of the computational cost, has to be carefully assessed in order to devise a valid and practical trade-off between Algorithm 2 and Algorithm 3. In both cases computeChecksum introduces an overhead of O (nnz(A)), but the shift version should in general be faster containing less assignments than its counterpart, and this changes the constant factor hidden by the asymptotic notation. Nevertheless, as we are interested in performing many SpMxV with a same matrix, this pre-processing overhead becomes negligible. The function SpMxV has to be invoked once for each multiplication, and hence more care is needed. Copying x and initializing y both require n operations, and the multiplication is performed in time O (nnz(A)), but the split version pays an n′ more to read the values of the sparse vector b. The cost 12 Algorithm 3 Splitting checksum algorithm. Input: A ∈ Rn×n , x ∈ Rn Output: y ∈ Rn such that y = Ax or the detection of a single error 1: [c, k, cr ] = computeChecksum(A); 2: return SpMxV(A, x, c, b c, b, cr ); 3: function computeChecksum(A) 4: c, m ← 0; 5: for i ← 1 to nnz(A) 6: ind ← Colid i ; 7: cind ← cind + Val i ; 8: mind ← i; 9: 10: 11: 12: 13: 14: 15: 16: k ← 0; for i ← 1 to n if ci = 0 ∧ mi 6= 0 bmi ← true; ci ← Val mi ; b ci ← ci − b ci ; P cr ← n Rowindex i; i=1 return c, b c, b, cr ; 17: function SpMxV(A, x, c, b c, b, cr ) 18: x′ ← x; 19: for i ← 1 to n 20: yi ← 0; 21: 22: 23: 24: 25: 26: 27: 28: 29: 30: 31: 32: 33: 34: 35: 36: 37: sr ← 0; for i ← 1 to n sr ← sr + Rowindex i ; for j ← Rowindex i to Rowindex i+1 − 1 ind ← Colid j ; if bj ybi ← ybi + Val j · xind ; else yi ← yi + Val j · xind ; P P cy ← n y ; cyb ← n bi ; i i=1 i=1 y dx ← c⊺ x − cy ; dxb ← b c⊺ x − cyb; c⊺ x′ − cyb; dx′ ← c⊺ x′ − cy ; dxb′ ← e dr ← cr − sr ; if dx = 0 ∧ dx′ = 0 ∧ dxe = 0 ∧ dxe′ = 0 ∧ dr = 0 b; return y + y else error (“Soft error is detected”); 13 of the verification step depends instead on the number of zeroes of the original checksum vector, that is also the number of non-zero elements of the sparse vector b c. Let us call this quantity n′ . Then the overhead is 4n for the shifting and 3n + 3n′ for the splitting, that requires also the sum of two sparse vectors to return the result. Hence, as summarized in Table 1, the two methods bring different overhead into the computation. Comparing them, it is immediate to see that the shifting method is cheaper when n′ > n , 5 while it has more operations to do when the opposite inequality holds. For the equality case, we can just choose to use the first method because of the cheaper preprocessing phase. In view of this observation, it is possible to devise a simple algorithm that exploits this trade-off to achieve better performance. It suffices to compute the checksum vector of the input matrix, count the number of non-zeros and choose which detection method to use accordingly. We also note that by splitting the matrix A into say ℓ pieces and checksumming each piece separately we can possibly protect A from up to ℓ errors, by protecting each piece against a single error (obviously the multiple errors should hit different pieces). 4.2 Multiple error detection With some effort, the shifting idea in Algorithm 2 can be extended to detect errors striking a single SpMxV. Let us consider the problem of detecting up to k errors in the computation of y ← Ax introducing an overhead of O (kn). Let k weight vectors w(1) , . . . , w(k) ∈ Rn be such that any sub-matrix of i h W = w(1) w(2) . . . w(k) has full rank. To build our ABFT scheme let us note that, if no error occurs, for each weight vector w(ℓ) it holds that " n # n X X (ℓ) (ℓ) (ℓ)⊺ w A= wi ai,n , wi ai,1 , . . . , i=1 i=1 and hence that w(ℓ) Ax ⊺ = n X (ℓ) wi ai,1 x1 + · · · + i=1 i=1 = n X n X n X (ℓ) wi ai,j xj . i=1 j=1 14 (ℓ) wi ai,n xn Similarly, the sum of the entries of y weighted with the same w(ℓ) is n X (ℓ) wi yi (ℓ) = w1 y1 + · · · + wn(ℓ) yn = w1 = j=1 n X n X i=1 (ℓ) n X a1,j xj + · · · + wn(ℓ) n X an,j xj j=1 (ℓ) wi ai,j xj , i=1 j=1 and we can conclude that n X i=1   ⊺ (ℓ) wi yi = w(ℓ) A x, (ℓ) for any w with 1 ≤ ℓ ≤ k. To convince ourself that with these checksums it is actually possible to detect up to k errors, let us suppose that k ′ errors, with k ′ ≤ k, occur in positions e the faulty vector where yepi = ypi + εpi for p1 , . . . , pk′ , and let us denote by y εpi ∈ R \ {0} and 1 ≤ i ≤ k ′ and yei = yi otherwise. Then for each weight vector we have k′ n n X X X (ℓ) (ℓ) εpj . wp(ℓ) wi yi = wi yei − j j=1 i=1 i=1 ′ Said otherwise, the occurrence of the k errors is not detected if and only if, for 1 ≤ ℓ ≤ k, all the εpi respect ′ k X εpj = 0 . wp(ℓ) j (5) j=1 ′ We claim that there cannot exist a vector (εp1 , . . . , εp′k )⊺ ∈ Rk \ {0} such that all the conditions in (5) are simultaneously verified. These conditions can be expressed in a more compact way as a linear system      (1) (1) 0 εp1 wp1 · · · wpk′  .  .  . ..  ..     . . .   ..  =  ..  .  . (k) wp1 ··· (k) wpk′ εpk′ 0 Denoting by W∗ the coefficient matrix of this system, it is clear that the errors cannot be detected if only if (εp1 , . . . εpk′ )⊺ ∈ ker(W∗ ) \ {0}. Because of the properties of W, we have that rk(W∗ ) = k. Moreover, it is clear that the rank of the augmented matrix   (1) (1) wp1 · · · wpk′ 0  . ..  .. ..   . . . . .  (k) (k) wp1 · · · wpk′ 0 15 is k as well. Hence, by means of the Rouché–Capelli theorem, the solution of the system is unique and the null space of W∗ is trivial. Therefore, this construction can detect the occurrence of k ′ errors during the computation of y by comparing the values of the weighted sums y⊺ w(ℓ) with the result of the ⊺ dot product (w(ℓ) A)x, for 1 ≤ ℓ ≤ k. However, to get a true extension of the algorithm described in the previous section, we also need to make it able to detect errors that strike the sparse representation of A and that of x. The first case is simple, as the k errors can e , or in Rowindex , strike the Val or Colid arrays, leading to at most k errors in y where they can be caught using k weighted checksums of the Rowindex vector. Detection in x is much trickier, since neither the algorithm just described nor a direct generalization of Algorithm 2 can manage this case. Nevertheless, a proper extension of the shifting technique is still possible. Let us note that there exists a matrix M ∈ Rk×n such that W⊺ A + M = W. The elements of such an M can be easily computed, once that the checksum e ∈ Rn be the faulty vector, defined by rows are known. Let x  1 ≤ i ≤ k′ ,  xi + εpi , x ei =  x otherwise. i e = Ae for some k ′ ≤ k, and let us define y x. Now, let us consider a checksum vector x′ ∈ Rn such that x′ = x and let assume that it cannot be modified by a transient error. For 1 ≤ ℓ ≤ k, it holds that n X i=1 (ℓ) wi yei + n X j=1 mℓ,j x ej = = n X n X + i=1 j=1 n n X X (ℓ) wi ai,j xj + = n X n X n X (ℓ) wi ai,j i=1 j=1 n X ε pi  n X j=1 (ℓ) wi ai,j ! xj +  (ℓ) wj aj,pi  k X i=1 n X + mℓ,j i=1 ε pi  ′ mℓ,j xj + j=1 !  ′ mℓ,j xj + j=1 n X j=1 k X i=1 j=1 i=1 =  ′ (ℓ) wi ai,j xj k X + n X ′ mℓ,j xj + j=1 n X j=1 (ℓ) ε pi w pi ′ xj + (ℓ) ε pi w pi i=1 ′ =w (ℓ)⊺ x+ k X (ℓ) ε pi w pi i=1 ′ ⊺ = w(ℓ) x′ + k X (ℓ) ε pi w pi . i=1 Therefore, an error is not detected if and only if the linear system      (1) (1) 0 εp1 wp1 · · · wpk′  .  .  . ..  ..     . . . .   .  =  ..   . (k) wp1 ··· (k) wpk′ 16 εpk′ 0 i=1 εpi ml,p  (ℓ) wj aj,pi + ml,p  i=1 k X k X i i has a non-trivial solution. But we have already seen that such a situation can never happen, and we can thus conclude that our method, whose pseudocode we give in Algorithm 4, can also detect up to k errors occurring in x. Therefore, we have proven the following theorem. Theorem 2 (Correctness of Algorithm 4). Let us consider the same notation as in Theorem 1. Let W ∈ Rn+1×n be a matrix such that any square submatrix is full rank, and let us denote by W ∈ Rn×n the matrix of its first n rows. Let us assume an encoding scheme that relies on ⊺ 1. an auxiliary checksum matrix C = (W⊺ A) , 2. an auxiliary checksum matrix M = W − C, 3. a vector of auxiliary counters sRowindex initialized to the null vector and updated at runtime as in lines 16 – 17 of Algorithm 4), 4. an auxiliary checksum vector cRowindex = W⊺ Rowindex . Then, up to k errors striking the computation of y or the memory locations that store A or x, cause one of the following conditions to fail: i. W⊺ y = C⊺ x, ii. W⊺ (x′ − y), iii. sRowindex = cRowindex . Let us note that we have just shown that our algorithm can detect up to k errors striking only A, or only x or only the computation. Nevertheless, this result holds even when the errors are distributed among the possible cases, as long as at most k errors rely on the same checkpoint. It is clear that the execution time of the algorithm depends on both nnz(A) and k. For the computeChecksum function, the cost is, assuming that the weight matrix W is already known, O (k nnz(A)) for the computation of C, and O (kn) for the computation of M and cRowindex . Hence the number of performed operations is O (k nnz(A)). The overhead added to the SpMxV depends instead on the computation of four checksum matrices that lead to a number of operations that grows asymptotically as kn. 4.3 Single error correction We now discuss single error correction, using Algorithm 4 as a reference. We describe how a single error striking either memory or computation can be not only detected but also corrected at line 27. We use only two checksum vectors, that is, we describe correction of single errors assuming that two errors cannot strike the same SpMxV. By the end of the section, we will generalize this approach and discuss how single error correction and double error detection can be performed concurrently by exploiting three linearly independent checksum vectors. 17 Algorithm 4 Shifting checksum algorithm for k errors detection. Input: A ∈ Rn×n , x ∈ Rn Output: y ∈ Rn such that y = Ax or the detection of up to k errors 1: x′ ← x c] = computeChecksums(A, k); 2: [W, C, M, e 3: return SpMxV(A, x, x′ , W, C, M, k, e c); 4: function computeChecksums(A, h i k) 5: 6: 7: 8: 9: 10: Generate W = w(1) . . . w(k) ∈ Rn+1×n ; W ← W1:n,∗ ∈ Rn×k C⊺ ← W⊺ A; M ← W − C; cRowindex ← W⊺ Rowindex ; return W, C, M, cRowindex ; c) 11: function SpMxV(A, x, x′ , W, C, M, k, e 12: W ← W1:n,∗ ∈ Rn×k e 13: s ← [0, . . . , 0]; 14: for i ← 1 to n 15: yi ← 0; 16: for j = 1 to k 17: sej ← sej + wij Rowindex i ; 18: 19: 20: 21: 22: 23: 24: 25: 26: 27: for j ← Rowindex i to Rowindex i+1 − 1 ind ← Colid j ; yi ← yi + Val j · xind ; ⊺ dx ← W y − C⊺ x; dx′ ← W⊺ (x′ − y) − M⊺ x; dr ← e c−e s; if dx = 0 ∧ dx′ = 0 ∧ dr = 0 return y; else error (“Soft errors are detected”); 18 Whenever a single error is detected, regardless of its location (computation or memory), it is corrected by means of a succession of various steps. When one or more errors are detected, the correction mechanism tries to determine their multiplicity and, in case of a single error, what memory locations have been corrupted or what computation has been miscarried. Errors are then corrected using the values of the checksums and, if need be, partial recomputations of the result are performed. As we did for multiple error detection, we require that any 2 × 2 submatrix of W ∈ Rn×2 has full rank. The simplest example of weight matrix having this property is probably   1 1 1 2      W = 1 3  .  .. ..  . .  1 n To detect errors striking Rowidx , we compute the ratio ρ of the second component of dr to the first one, and check whether its distance from an integer is smaller than a certain threshold parameter ε. If this distance is smaller, the algorithm concludes that the σth element, where σ = Round(ρ) is the nearest integer to ρ, of Rowidx is faulty, performs the correction by subtracting the first component of dr from Rowidx σ , and recomputes yσ and yσ−1 , if the error in Rowindexσ is a decrement; or yσ+1 if it was an increment. Otherwise, it just emits an error. The correction of errors striking Val, Colid and the computation of y are performed together. Let now ρ be the ratio of the second component of dx to the first one. If ρ is near enough to an integer σ, the algorithm computes the checksum matrix C′ = W⊺ A and considers the number zC e of non-zero columns e = |C − C′ |. At this stage, three cases are possible: of the difference matrix C • If zC e = 0, then the error is in the computation of yσ , and can be corrected by simply recomputing this value. • If zC e = 1, then the error has struck an element of Val . Let us call f the e The algorithm finds the element of index of the non-zero column of C. Val corresponding to the entry at row σ and column f of A and corrects it by using the column checksums much like as described for Rowidx . Afterwards, yd is recomputed to fix the result. • If zC e = 2, then the error concerns an element of Colid . Let us call f1 and f2 the index of the two non-zero columns and m1 , m2 the first and last elements of Colid corresponding to non-zeros in row σ. It is clear that there exists exactly one index m∗ between m1 and m2 such that either Colid m∗ = f1 or Colid m∗ = f2 . To correct the error it suffices to switch the current value of Colid m∗ , i.e., putting Colid m∗ = f2 in the former case and Colid m∗ = f1 in the latter. Again, yσ has to be recomputed. 19 • if zC e > 2, then errors can be detected but not corrected, and an error is emitted. To correct errors striking x, the algorithm computes ρ, that is the ratio of the second component of dx′ to the first one, and checks that the distance between d and the nearest integer σ is smaller than ε. Provided that Pnthis condition is verified, the algorithm computes the value of the error τ = i=1 xi − cxσ and corrects xσ = xσ − τ . The result is updated by subtracting from y the vector yτ = Axτ , where xτ ∈ Rn×n is such that xτσ = τ and xτi = 0 otherwise. Let us now investigate how detection and correction can be combined and let us give some details about the implementation of ABFT-Correction as defined in Section 3. Indeed, note that double errors could be shadowed when using Algorithm 2, although the probability of such an event is negligible. Let us restrict ourselves to an easy case, without considering errors in x. As usual, we compute the column checksums matrix ⊺ C = (W⊺ A) , and then compare the two entries of C⊺ x ∈ R2 with the weighted sums ye1c = and ye2c = n X i=1 n X yei ie yi i=1 e is the possibly faulty vector computed by the algorithm. It is clear where y e c − c = 0. that if no error occurs, the computation verifies the condition δ = y δ2 Furthermore, if exactly one error occurs, we have δ1 , δ2 6= 0 and δ1 ∈ N, and if two errors strike the vectors protected by the checksum c, the algorithm is able to detect them by verifying that δ 6= 0. At this point it is natural to ask whether this information is enough to build a working algorithm or some border cases can bias its behavior. In particular, when δδ12 = p ∈ N, it is not clear how to discern between single and double errors. Let ε1 , ε2 ∈ R \ {0} be the value of two errors occurring at position p1 e ∈ Rn be such that and p2 respectively, and let y  1 ≤ i ≤ n, i 6= p1 , p2  yi , yi + ε1 , i = p1 yei = .  yi + ε2 , i = p2 Then the conditions δ1 = ε1 + ε2 , (6) δ2 = p1 ε 1 + p2 ε 2 , (7) hold. Therefore, if ε1 and ε2 are such that p (ε1 + ε2 ) = p1 ε1 + p2 ε2 , 20 (8) it is not possible to distinguish these two errors from a single error of value ε1 + ε2 occurring in position p. This issue can be solved by introducing a new set of weights and hence a new row of column checksums. Let us consider a c ∈ Rn×3 that includes a quadratic weight vector weight matrix W   1 1 1 1 2 4     c = W 1 3 9  ,  .. .. ..  . . . 1 n n2 and the tridimensional vector   c ⊺A x − W c ⊺y e, δ̂ = W whose components can be expressed as δ1 δ2 = ε1 + ε2 = p1 ε 1 + p2 ε 2 δ2 = p21 ε1 + p22 ε2 . To be confused with a single error in position p, ε1 and ε2 have to be such that p (ε1 + ε2 ) = p1 ε1 + p2 ε2 and p2 (ε1 + ε2 ) = p21 ε1 + p22 ε2 hold simultaneously for some p ∈ N. In other words, possible values of the errors are the solution of the linear system      0 (p − p1 ) (p − p2 ) ε1 = . 0 (p2 − p21 ) (p2 − p22 ) ε2 It is easy to see that the determinant of the coefficient matrix is (p − p1 ) (p − p2 ) (p2 − p1 ) , which always differs from zero, as long as p, p1 and ps differ pairwise. Thus, the matrix is invertible, and the solution space of the linear system is the trivial c as weight matrix guarantees that it is kernel (ε1 , ε2 ) = (0, 0). Thus using W always possible to distinguish a single error from double errors. 5 Performance model In Section 5.1, we introduce the general performance model. Then in Section 5.2 we instantiate it for the three methods that we are considering, namely OnlineDetection, ABFT-Detection and ABFT-Correction. 21 5.1 General approach We introduce an abstract performance model to compute the best combination of checkpoints and verifications for iterative methods. We execute T time-units of work followed by a verification, which we call a chunk, and we repeat this scheme s times, i.e., we compute s chunks, before taking a checkpoint. We say that the s chunks constitute a frame. The whole execution is then partitioned into frames. We assume that checkpoint, recovery and verification are error-free operations. Let Tcp , Trec and Tverif be the respective cost of these operations. Finally, assume an exponential distribution of errors and let q be the probability of successful execution for each chunk: q = e−λT , where λ is the fault rate. The goal of this section is to compute the expected time E (s, T ) needed to execute a frame composed of s chunks of size T . We derive the best value of s as a function of T and of the resilience parameters Tcp , Trec , Tverif , and q, the success probability of a chunk. Each frame is preceded by a checkpoint, except maybe the first one (for which we recover by reading initial data again). Following earlier work [36], we derive the following recursive equation to compute the expected completion time of a single frame: E (s, T ) = q s (s(T + Tverif )) + Tcp ) + (1 − q s ) (E (Tlost ) + Trec + E (s, T )) . (9) Indeed, the execution is successful if all chunks are successful, which happens with probability q s , and in this case the execution time simply is the sum of the execution times of each chunk plus the final checkpoint. Otherwise, with probability 1 − q s , we have an error, which we detect after some time E (Tlost ), and that forces us to recover (in time Trec ) and restart the frame anew, hence in time E (s, T ). The difficult part is to compute E (Tlost ). For 1 ≤ i ≤ s, let fi be the following conditional probability: fi = P(error strikes at chunk i|there is an error in the frame) . (10) Given the success probability q of a chunk, we obtain that fi = q i−1 (1 − q) . 1 − qs Indeed, the first i − 1 chunks were successful (probability q i−1 ), the ith one had an error (probability 1 − q), and we condition by the probability of an error within the frame, namely 1 − q s . With probability fi , we detect the error at the end of the ith chunk, and we have lost the time spent executing the first i chunks. We derive that E (Tlost ) = s X fi (i(T + Tverif )) . i=1 22 Ps (1−q)h(q) where h(q) = 1 + 2q + 3q 2 + · · · + sq s−1 . If 1−qs s+1 ′ m(q) = q +q 2 +· · ·+q s = 1−q 1−q −1, we get by differentiation that m (q) = h(q), s s+1 + 1−q hence h(q) = −(s+1)q 1−q (1−q)2 and finally We have i=1 fi = E (Tlost ) = (T + Tverif ) sq s+1 − (s + 1)q s + 1 . (1 − q s )(1 − q) Plugging the expression of E (Tlost ) back into (9), we obtain E (s, T ) = s(T + Tverif )) + Tcp + (q −s − 1)Trec +T sq s+1 − (s + 1)q s + 1 , q s (1 − q) which simplifies into E (s, T ) = Tcp + (q −s − 1)Trec + (T + Tverif ) 1 − qs . q s (1 − q) We have to determine the value of s that minimizes the overhead of a frame:   E (s, T ) . (11) s = argmin sT s≥1 The minimization is complicated and should be conducted numerically (because T , the size of a chunk, is still unknown). Luckily, a dynamic programming algorithm to compute the optimal value of T and s is available [9]. 5.2 Instantiation to PCG For each of the three methods, Online-Detection, ABFT-Detection and ABFT-Correction, we instantiate the previous model and discuss how to solve (11). 5.2.1 Online-Detection For Chen’s method [6], we have chunks of d iterations, hence T = dTiter , where Titer is the raw cost of a PCG iteration without any resilience method. The verification time Tverif is the cost of the orthogonality check operations performed as described in Section 3. As for silent errors, the application is protected from arithmetic errors in the ALU, as in Chen’s original method, but also for corruption in data memory (because we also checkpoint the matrix A). Let λa be the rate of arithmetic errors, and λm be the rate of memory errors. For the latter, we have λm = M λword if the data memory consists of M words, each susceptible to be corrupted with rate λword . Altogether, since the two error sources are independent, they have a cumulative rate of λ = λa + λm , and the success probability for a chunk is q = e−λT . Plugging these values in (11) gives an optimization formula very similar to that of Chen [6, Sec. 5.2], the only difference being that we assume that the verification is error-free, which is needed for the correctness of the approach. 23 5.2.2 ABFT-Detection When using ABFT techniques, we detect possible errors every iteration, so a chunk is a single iteration, and T = Titer . For ABFT-Detection, Tverif is the overhead due to the checksums and redundant operations to detect a single error in the method. ABFT-Detection can protect the application from the same silent errors as Online-Detection, and just as before the success probability for a chunk (a single iteration here) is q = e−λT . 5.2.3 ABFT-Correction In addition to detection, we now correct single errors at every chunk. Just as for ABFT-Detection, a chunk is a single iteration, and T = Titer , but Tverif corresponds to a larger overhead, mainly due to the extra checksums needed to detect two errors and correct a single one. The main difference lies in the error rate. An iteration with ABFT-Correction is successful if zero or one error has struck during that iteration, so that the success probability is much higher than for Online-Detection and ABFTDetection. We compute that value of the success probability as follows. We have a Poisson process of rate λ, where λ = λa + λm as for Online-Detection and ABFT-Detection. The probability of exactly k errors in time T is (λT )k −λT [37], hence the probability of no error is e−λT and the probability of k! e exactly one error is λT e−λT , so that q = e−λT + λT e−λT . 6 6.1 Experiments Setup There are two different sources of advantages in combining ABFT and checkpointing. First, the error detection capability lets us perform a cheap validation of the partial result of each PCG step, recovering as soon as an error strikes. Second, being able to correct single errors makes each step more resilient and increases the expected number of consecutive valid iterations. We say an iteration is valid if it is non-faulty, or if it suffers from a single error that is corrected via ABFT. For our experiments, we use a set of positive definite matrices from the UFL Sparse Matrix Collection [38], with size between 17456 and 74752 and density lower than 10−2 . We perform the experiments under Matlab and use the factored approximate inverse preconditioners [16, 39] in the PCG. The application of these preconditioners requires two SpMxV, which are protected against error using the methods proposed in Section 4 (in all methods Online-Detection, ABFT-Detection, and ABFT-Correction). At each iteration of PCG, faults are injected during vector and matrix-vector operations but, since we are assuming selective reliability, all the checksums and checksum operations are considered non-faulty. Faults are modeled as bit flips 24 Table 2: Test matrices used in the experiments. Name and id are from the University of Florida Sparse Matrix Collection. name Boeing/bcsstk36 Mulvey/finan512 Andrews/Andrews GHS psdef/wathen100 GHS psdef/wathen120 GHS psdef/gridgena GHS psdef/jnlbrng1 UTEP/Dubcova2 JGD Trefethen/Trefethen 20000 id size density steps residual 341 752 924 1288 1289 1311 1312 1848 2213 23052 74752 60000 30401 36441 48962 40000 65025 20000 2.15e-03 1.07e-04 2.11e-04 5.10e-04 4.26e-04 2.14e-04 1.24e-04 2.44e-04 1.39e-03 50 25 20 50 50 50 50 50 10 6.41e-04 2.19e-14 1.59e-04 2.55e-13 9.16e-14 5.61e-05 5.83e-13 1.16e-05 6.00e-16 occurring independently at each step, under an exponential distribution of parameter λ, as detailed in Section 5.2. These bit flips can strike either the matrix (the elements of Val , Colid and Rowidx ), or any entry of the PCG vectors ri , zi , q, pi or xi . We chose not to inject errors during the computation explicitly, as they are just a special case of error we are considering. Moreover, to simplify the injection mechanism, Titer is normalized to be one, meaning that each memory location or operation is given the chance to fail just once per iteration [27]. Finally, to get data that are homogeneous among the test matrices, the fault rate λ is chosen to be inversely proportional to M (memory size) with a proportionality constant α ∈ (0, 1); this makes sense as larger the memory used by an application, larger is the chance to have an error. It follows that the expected number of PCG iterations between two distinct fault occurrences does not depend either on the size or on the sparsity ratio of the matrix. We compare the performance of three algorithms, namely Online-Detection, ABFT-Detection (single detection and rolling back as soon as an error is detected), and ABFT-Correction (correcting single errors during a given step and rolling back only if two errors strike a single operation). We instantiate them by limiting the maximum number of PCG steps to 50 (20 for #924, whose convergence is sublinear) and setting the tolerance parameter ǫ at line 5 of Algorithm 1 to 10−14 . The number of iterations for a non-faulty execution and the achieved accuracy are detailed in Table 2. Implementing the null checks in Algorithm 2, Algorithm 3 and Algorithm 4 poses a challenge. The comparison dr = 0 is between two integers, and can be correctly evaluated by any programming language using the equality check. However, the other two, having floating point operands, are problematic. Since the floating point operations are not associative and the distributive property does not hold, we need a tolerance parameter that takes into account the rounding operations that are performed by each floating point operation. Here, we give an upper bound on the difference between the two floating point checksums, 25 using the standard model [40, Sec. 2.2] to make sure that errors caught by our algorithms really are errors and not merely inaccuracies due to floating point operations (which is tolerable, as non-faulty executions can give rise to the same inaccuracy). Theorem 3 (Accuracy of the floating point weighted checksums). Let A ∈ Rn×n , x ∈ Rn , c ∈ Rn . If all of the sums involved into the matrix operations are performed using some flavor of recursive summation [40, Ch. 4], it holds that |f l ((c⊺ A) x) − f l (c⊺ (Ax)) | ≤ 2 γ2n |c⊺ | | A | | x | . (12) We refer the reader to the technical report for the proof [41, Theorem 2]. Let us note that if all of the entries of c are positive, as it is often the case in our setting, the absolute value of c in (12) can be safely replaced with c itself. It is also clear that these bounds are not computable, since c⊺ | A | | x | is not, in general, a floating point number. This problem can be alleviated by overestimating the bound by means of matrix and vector norms. Since we are interested in actually computing the bound at runtime, we consider a weaker bound. Recalling that [42, Sec. B.7] kAk1 = max 1≤j≤n n X |ai,j |. (13) i=1 we can upper bound the right hand side in so that |f l ((c⊺ A) x) − f l (c⊺ (Ax)) | ≤ 2 γ2n n kc⊺ k∞ kAk1 kxk∞ . (14) Though the right hand side of (14) is not exactly computable in floating point arithmetic, it requires an amount of operations dramatically smaller than (12); just a few sums for the norm of A. As this norm is usually computed using the identity in (13), any kind of summation yields a relative error of at most n′ u [40, Sec. 4.6], where n′ is the maximum number of nonzeros in a column of A, and u is the machine epsilon. Since we are dealing with sparse matrices, we expect n′ to be very small, and hence the computation of the norm to be accurate. Moreover, since the right hand side in (14) does not depend on x, it can be computed just once for a given matrix and weight vector. Clearly, using (14) as tolerance parameter guarantees no false positive (a computation without any error that is considered as faulty), but allows false negatives (an iteration during which an error occurs without being detected) when the perturbations of the result are small. Nonetheless, this solution works almost perfectly in practice, meaning that though the convergence rate can be slowed down, the algorithms still converges towards the “correct” answer. Though such an outcome could be surprising at first, Elliott et al. [43, 44] showed that bit flips that strike the less significant digits of the floating point representation of vector elements during a dot product create small perturbations of the results, and that the magnitude of this perturbation gets smaller as 26 Table 3: Experimental validation of the model. Here sei and s∗i represent the best checkpointing interval according to our model and to our simulations respectively, whereas Et (sei ) and Et (s∗i ) stand for the execution time of the algorithm using these checkpointing intervals. id se1 Et (se1 ) s∗1 Et (s∗1 ) l1 se2 Et (se2 ) s∗2 Et (s∗2 ) l2 341 752 924 1288 1289 1311 1312 1848 2213 4 30 23 22 16 4 25 4 19 305.42 13.81 49.82 11.12 16.56 216.70 14.41 321.70 2.31 1 24 30 19 13 1 22 1 12 293.22 13.34 47.53 10.82 16.38 207.97 13.86 309.28 2.19 4.16 3.57 4.82 2.72 1.07 4.19 3.97 4.01 5.58 4 24 23 22 23 4 23 4 24 305.45 12.17 44.52 11.32 13.49 220.20 12.30 366.03 2.33 1 23 26 19 23 1 22 1 23 293.16 11.93 42.42 11.03 13.49 208.19 12.06 314.20 2.20 4.19 2.01 4.96 2.58 0.00 5.77 1.96 16.49 5.94 the size of the vectors increases. Hence, we expect errors that are not detected by our tolerance threshold to be too small to impact the solution of the linear solver. 6.2 Simulations To validate the model, we perform the simulation whose results are illustrated in Table 3. For each matrix, we set λ = 161M and consider the average execution time of 100 repetitions of both ABFT-Detection (columns 5-8) and ABFTCorrection (columns 6-9). In the table we record the checkpointing interval s∗i which achieves the shortest execution time Et (s∗1 ), and the checkpointing interval sei which is the best stepsize according to our method, along with its execution time Et (sei ). Finally, we evaluate the performance of our guess by means of the quantity li = Et (sei ) − Et (s∗i ) · 100 , Et (s∗i ) that expresses the loss, in terms of execution time, of executing with the checkpointing interval given by our model with respect to the best possible choice. From the table, we clearly see that the values of sei and s∗i are close, since the time loss reaches just above 5% for l1 and just below 15% for l2 . This sometimes poor result depends just on the small number of repetitions we are considering, that leads to the presence of outliers, lucky runs in which a small number of errors occur and the computation is carried on in a much quicker way. Similar results hold for other values of λ. We also compare the execution time of the three algorithms to empirically asses how much their relative performance depend on the fault rate. The results on our test matrices are shown in Fig. 1, where the y-axis is the execution time 27 200 4 40 100 2 20 0 102 104 0 (a) Matrix #341 104 0 (b) Matrix #752 10 6 102 104 (c) Matrix #924 200 8 4 6 100 4 2 0 102 2 102 104 0 (d) Matrix #1288 102 104 0 (e) Matrix #1289 102 104 (f) Matrix #1311 8 1 6 100 4 2 0 0.5 50 102 104 (g) Matrix #1312 0 102 104 (h) Matrix #1848 0 102 104 (i) Matrix #2213 Figure 1: Execution time in seconds (y axis) of Online-Detection (dotted), ABFT-Detection (solid line) and ABFT-Correction (dashed) with respect to the normalized MTBF (x-axis). The matrix number is in the subcaption. 28 (in seconds), and the x-axis is the normalized mean time between failure (the reciprocal of α). Here, the larger x = α1 , the smaller the corresponding value α , hence the smaller the expected number of errors. For each value of of λ = M λ, we draw the average execution time of 50 runs of the three algorithms, using the best checkpointing interval predicted in Section 5.1 for ABFT-Detection and ABFT-Correction, and by Chen [6, Eq. 10] for Online-Detection. In terms of execution time, Chen’s method is comparable to ours for middle to high fault rates, since it clearly outperforms ABFT-Detection in five out of nine cases, being slightly faster than ABFT-Correction for lower fault rates. Intuitively, this behavior is not surprising. When λ is large, many errors occur but, since α is between zero and one, we always have, in expectation, less than one error per iteration. Thus ABFT-Correction requires fewer checkpoints than ABFT-Detection and almost no rollback, and this compensates for the slightly longer execution time of a single step. When the fault rate is very low, instead, the algorithms perform almost the same number of iterations, but ABFT-Correction takes slightly longer due to the additional dot products at each step. Altogether, the results show that ABFT-Correction outperforms both Online-Detection and ABFT-Detection for a wide range of fault rates, thereby demonstrating that combining checkpointing with ABFT correcting techniques is more efficient than pure checkpointing for most practical situations. 7 Conclusion We consider the problem of silent errors in iterative linear systems solvers. At first, we focus our attention on ABFT methods for SpMxV, developing algorithms able to detect and correct errors in both memory and computation using various checksumming techniques. Then, we combine ABFT with replication, in order to develop a resilient PCG kernel that can protect axpy’s and dot products as well. We also discuss how to take numerical issues into account when dealing with actual implementations. These methods are a worthy choice for a selective reliability model, since most of the operations can be performed in unreliable mode, whereas only checksum computations need to be performed reliably. In addition, we examine checkpointing techniques as a tool to improve the resilience of our ABFT PCG and develop a model to trade-off the checkpointing interval so to achieve the shortest execution time in expectation. We implement two of the possible combinations, namely an algorithm that relies on roll back as soon as an error is detected, and one that is able to correct a single error and recovers from a checkpoint just when two errors strike. We validate the model by means of simulations and finally compare our algorithms with Chen’s approach, empirically showing that ABFT overhead is usually smaller than Chen’s verification cost. We expect this combined approach to be interesting for other variants of 29 the preconditioned conjugate gradient algorithm [34]. Triangular preconditioners seem to be particularly attracting, in that it looks possible to treat them by adapting the techniques described in this paper (Shantharam et al. [15] addressed the triangular case). Acknowledgements Y. Robert and B. Uçar were partly supported by the French Research Agency (ANR) through the Rescue and SOLHAR (ANR MONU-13-0007) projects. Y. Robert is with Institut Universitaire de France. J. Langou was fully supported by NSF award CCF 1054864. References References [1] A. Moody, G. Bronevetsky, K. Mohror, B. de Supinski, Design, modeling, and evaluation of a scalable multi-level checkpointing system, in: High Performance Computing, Networking, Storage and Analysis (SC), 2010 International Conference for, 2010, pp. 1–11. [2] F. Cappello, Fault tolerance in petascale/ exascale systems: Current knowledge, challenges and research opportunities, International Journal of High Performance Computing Applications 23 (3) (2009) 212–226. [3] F. Cappello, A. Geist, B. Gropp, L. Kale, B. Kramer, M. Snir, Toward exascale resilience, International Journal of High Performance Computing Applications 23 (4) (2009) 374–388. [4] F. Cappello, A. Geist, W. Gropp, S. Kale, B. Kramer, M. Snir, Toward exascale resilience: 2014 update, Supercomputing frontiers and innovations 1 (1) [5] B. Schroeder, G. A. Gibson, Understanding failures in petascale computers, Journal of Physics: Conference Series 78 (012022). [6] Z. Chen, Online-ABFT: An Online Algorithm Based Fault Tolerance Scheme for Soft Error Detection in Iterative Methods, in: Proc. 18th ACM SIGPLAN Symposium on Principles and Practice of Parallel Programming, PPoPP ’13, ACM, 2013, pp. 167–176. [7] J. W. Young, A first order approximation to the optimum checkpoint interval, Comm. of the ACM 17 (9) (1974) 530–531. [8] J. T. Daly, A higher order estimate of the optimum checkpoint interval for restart dumps, FGCS 22 (3) (2004) 303–312. 30 [9] A. Benoit, A. Cavelan, Y. Robert, H. Sun, Assessing general-purpose algorithms to cope with fail-stop and silent errors, in: Workshop on Performance Modeling, Benchmarking and Simulation (PMBS), 2014, extended version available as INRIA Research Report RR-8599. [10] K.-H. Huang, J. A. Abraham, Algorithm-Based Fault Tolerance for Matrix Operations, Computers, IEEE Transactions on C–33 (6) (1984) 518–528. [11] P. Du, A. Bouteiller, G. Bosilca, T. Herault, J. Dongarra, Algorithm-based fault tolerance for dense matrix factorizations, in: PPoPP, ACM, 2012, pp. 225–234. [12] E. Yao, J. Zhang, M. Chen, G. Tan, N. Sun, Detection of soft errors in LU decomposition with partial pivoting using algorithm-based fault tolerance, International Journal of High Performance Computing Applications 29 (4) (2015) 422–436. [13] D. Hakkarinen, P. Wu, Z. Chen, Fail-stop failure algorithm-based fault tolerance for cholesky decomposition, Parallel and Distributed Systems, IEEE Transactions on 26 (5) (2015) 1323–1335. [14] P. Du, P. Luszczek, S. Tomov, J. Dongarra, Soft error resilient QR factorization for hybrid system with GPGPU, Journal of Computational Science 4 (6) (2013) 457 – 464, scalable Algorithms for Large-Scale Systems Workshop (ScalA2011), Supercomputing 2011. [15] M. Shantharam, S. Srinivasmurthy, P. Raghavan, Fault Tolerant Preconditioned Conjugate Gradient for Sparse Linear System Solution, in: Proceedings of the 26th ACM International Conference on Supercomputing, ICS ’12, ACM, 2012, pp. 69–78. [16] M. Benzi, M. Tuma, A sparse approximate inverse preconditioner for nonsymmetric linear systems, SIAM Journal on Scientific Computing 19 (3) (1998) 968–994. [17] K. Kaya, B. Uçar, U. V. Çatalyürek, Analysis of partitioning models and metrics in parallel sparse matrix-vector multiplication, in: Parallel Processing and Applied Mathematics (PPAM2014), Springer LNCS, Warsaw, Poland, 2014, pp. 174–184. [18] G. Aupy, Y. Robert, F. Vivien, D. Zaidouni, Checkpointing algorithms and fault prediction, Journal of Parallel and Distributed Computing 74 (2) (2014) 2048–2064. [19] R. E. Lyons, W. Vanderkulk, The use of triple-modular redundancy to improve computer reliability, IBM J. Res. Dev. 6 (2) (1962) 200–209. [20] D. Fiala, F. Mueller, C. Engelmann, R. Riesen, K. Ferreira, R. Brightwell, Detection and correction of silent data corruption for large-scale highperformance computing, in: Proc. of the ACM/IEEE SC Int. Conf., SC ’12, IEEE Computer Society Press, 2012. 31 [21] J. Elliott, K. Kharbas, D. Fiala, F. Mueller, K. Ferreira, C. Engelmann, Combining partial redundancy and checkpointing for HPC, in: Proc. ICDCS ’12, IEEE Computer Society, 2012. [22] G. Lu, Z. Zheng, A. A. Chien, When is multi-version checkpointing needed, in: 3rd Workshop for Fault-tolerance at Extreme Scale (FTXS), ACM Press, 2013. [23] A. A. Hwang, I. A. Stefanovici, B. Schroeder, Cosmic rays don’t strike twice: understanding the nature of dram errors and the implications for system design, SIGARCH Comput. Archit. News 40 (1) (2012) 111–122. [24] M. Hoemmen, M. A. Heroux, Fault-tolerant iterative methods via selective reliability, Tech. rep., Sandia Corporation (2011). [25] M. Hoemmen, M. A. Heroux, Fault-Tolerant Iterative Methods via Selective Reliability, in: Proceedings of the 2011 International Conference for High Performance Computing, Networking, Storage and Analysis (SC). IEEE Computer Society, Vol. 3, 2011, p. 9. [26] P. G. Bridges, K. B. Ferreira, M. A. Heroux, M. Hoemmen, Fault-tolerant linear solvers via selective reliability, preprint (2012). [27] P. Sao, R. Vuduc, Self-stabilizing iterative solvers, in: Proc. ScalA ’13, ACM, 2013. [28] A. R. Benson, S. Schmit, R. Schreiber, Silent error detection in numerical time-stepping schemes., CoRR abs/1312.2674. [29] M. Heroux, M. Hoemmen, Fault-tolerant iterative methods via selective reliability, Research report SAND2011-3915 C, Sandia National Laboratories (2011). [30] G. Bronevetsky, B. de Supinski, Soft error vulnerability of iterative linear algebra methods, in: Proc. 22nd Int. Conf. on Supercomputing, ICS ’08, ACM, 2008, pp. 155–164. [31] C. Anfinson, F. Luk, A Linear Algebraic Model of Algorithm-Based Fault Tolerance, IEEE Trans. Computers 37 (12) (1988) 1599–1604. [32] G. Bosilca, R. Delmas, J. Dongarra, J. Langou, Algorithm-based fault tolerance applied to high performance computing, J. Parallel and Distributed Computing 69 (4) (2009) 410 –416. [33] J. Sloan, R. Kumar, G. Bronevetsky, Algorithmic Approaches to Low Overhead Fault Detection for Sparse Linear Algebra, in: Dependable Systems and Networks (DSN), 2012 42nd Annual IEEE/IFIP International Conference on, 2012, pp. 1–12. [34] Y. Saad, Iterative Methods for Sparse Linear Systems, 2nd Edition, SIAM Press, 2003. 32 [35] F. R. K. Chung, Spectral Graph Theory, American Mathematical Society, 1997. [36] M. Bougeret, H. Casanova, M. Rabie, Y. Robert, F. Vivien, Checkpointing strategies for parallel jobs, in: SC’2011, IEEE, 2011, pp. 1–11. [37] M. Mitzenmacher, E. Upfal, Probability and Computing: Randomized Algorithms and Probabilistic Analysis, Cambridge University Press, 2005. [38] T. A. Davis, Y. Hu, The University of Florida Sparse Matrix Collection, ACM Trans. Math. Softw. 38 (1) (2011) 1:1–1:25. [39] M. Benzi, R. Kouhia, M. Tůma, Stabilized and block approximate inverse preconditioners for problems in solid and structural mechanics, Computer Methods in Applied Mechanics and Engineering 190 (49–50) (2001) 6533 – 6554. [40] N. J. Higham, Accuracy and Stability of Numerical Algorithms, 2nd Edition, SIAM Press, 2002. [41] M. Fasi, Y. Robert, B. Uçar, Combining Algorithm-based Fault Tolerance and Checkpointing for Iterative Solvers, Research Report RR-8675, INRIA (2015). [42] N. J. Higham, Functions of Matrices: Theory and Computation, SIAM Press, 2008. [43] J. Elliott, F. Mueller, M. Stoyanov, C. Webster, Quantifying the impact of single bit flips on floating point arithmetic, preprint (2013). [44] M. Stoyanov, C. Webster, Quantifying the impact of single bit flips on floating point arithmetic, Tech. rep., Oak Ridge National Laboratory (2013). 33
8cs.DS
LARGEST ACYLINDRICAL ACTIONS AND STABILITY IN HIERARCHICALLY HYPERBOLIC GROUPS arXiv:1705.06219v1 [math.GR] 17 May 2017 CAROLYN ABBOTT, JASON BEHRSTOCK, AND MATTHEW GENTRY DURHAM Abstract. We consider two manifestations of non-positive curvature: acylindrical actions (on hyperbolic spaces) and quasigeodesic stability. We study these properties for the class of hierarchically hyperbolic groups, which is a general framework for simultaneously studying many important families of groups, including mapping class groups, right-angled Coxeter groups, most 3–manifold groups, right-angled Artin groups, and many others. A group that admits an acylindrical action on a hyperbolic space may admit many such actions on different hyperbolic spaces. It is natural to try to develop an understanding of all such actions and to search for a “best” one. The set of all cobounded acylindrical actions on hyperbolic spaces admits a natural poset structure, and in this paper we prove that all hierarchically hyperbolic groups admit a unique action which is the largest in this poset. The action we construct is also universal in the sense that every element which acts loxodromically in some acylindrical action on a hyperbolic space does so in this one. Special cases of this result are themselves new and interesting. For instance, this is the first proof that right-angled Coxeter groups admit universal acylindrical actions. The notion of quasigeodesic stability of subgroups provides a natural analogue of quasiconvexity which can be considered outside the context of hyperbolic groups. In this paper, we provide a complete classification of stable subgroups of hierarchically hyperbolic groups, generalizing and extending results that are known in the context of mapping class groups and right-angled Artin groups. Along the way, we provide a characterization of contracting quasigeodesics; interestingly, in this generality the proof is much simpler than in the special cases where it was already known. Contents 1. Introduction 2. Background 3. Altering the hierarchically hyperbolic structure 4. Characterization of contracting geodesics 5. Universal and largest acylindrical actions 6. Characterizing stability 7. Almost hierarchically hyperbolic spaces References 1 5 9 13 15 18 21 24 1. Introduction Hierarchically hyperbolic groups were recently introduced by Behrstock, Hagen, and Sisto [BHS17b] to provide a uniform framework in which to study many important families of groups, including mapping class groups, right-angled Coxeter groups, most 3–manifold groups, right-angled Artin groups and many others. A hierarchically hyperbolic space consists of: a quasigeodesic space, X ; a set of domains, S, which index a collection of δ–hyperbolic spaces Date: May 18, 2017. 1 ACYLINDRICAL ACTIONS AND STABILITY IN HHG 2 to which X projects; and, some additional information about these projections, including, for instance, a partial order on the domains and a unique maximal element in that order. Largest acylindrical actions. The study of acylindrical actions on hyperbolic spaces, as initiated in its modern form by Osin [Osi16] following earlier work of [Sel97] and [Bow08], has proven to be a powerful tool for studying groups with some aspects of non-positive curvature. As established in [BHS17b], hierarchically hyperbolic groups admit non-elementary acylindrical actions when the δ–hyperbolic space associated to the maximal element in S has infinite diameter, a property which holds in all the above examples except for those that are direct products. Any given group with an acylindrical action may actually admit many acylindrical actions on many different spaces. A natural question is to try and find a “best” acylindrical action. There are different ways that one might try to optimize the acylindrical action. For instance, the notion of a universal acylindrical action, for a given group G, is an acylindrical action on a hyperbolic space X such that every element of G which acts loxodromically in some acylindrical action on some hyperbolic space, must act loxodromically in this action. As established by Abbott, there exist finitely generated groups which admit acylindrical actions, but no universal acylindrical action [Abb16]; we also note that universal actions need not be unique [ABO16]. In forthcoming work, Abbott, Balasubramanya, and Osin [ABO16], introduce a partial order on cobounded acylindrical actions; when there exist an element in this partial ordering which is comparable to and larger than all other elements it is called a largest action. By construction, any largest action is necessarily a universal action and unique. In this paper we prove that all hierarchically hyperbolic groups have largest actions. Special cases of this theorem recover some recent results of [ABO16], as well as a number of new cases. For instance, in the case of right-angled Coxeter groups (and more generally for cubulated groups), even the existence of a universal acylindrical action was unknown. Further, outside of the relatively hyperbolic setting, our result provides a single construction that simultaneously covers these new cases as well as all previously known largest and universal acylindrical actions of finitely presented groups. The following summarizes the main results of Section 5 (where there are also further details on the background and comparison with known results). Theorem A (HHG have actions that are largest and universal). Every hierarchically hyperbolic group admits a largest acylindrical action. In particular, the following admit acylindrical actions which are largest and universal: (1) Hyperbolic groups and their subgroups. (2) Mapping class groups. (3) Fundamental groups of three manifolds with no Nil or Sol in their prime decomposition. (4) Groups that act properly and cocompactly on a proper CAT(0) cube complex. This includes right angled-Artin groups and right-angled Coxeter groups. Stability in hierarchically hyperbolic groups. One of the key features of a Gromov hyperbolic space is that every geodesic is uniformly Morse, a property also known as (quasigeodesically) stable; that is, any uniform quasigeodesic beginning and ending on a geodesic must lie uniformly close to it. In fact, any geodesic metric space in which each geodesic is uniformly Morse is hyperbolic. In the context of geodesic metric spaces, the presence of Morse geodesics has important structural consequences for the space; for instance, any asymptotic cone of such a space has global cut points [DMS10]. Moreover, quasigeodesic stability in groups is quite prevalent, since any finitely generated acylindrically hyperbolic group contains Morse geodesics [Osi16, Sis16]. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 3 There has been much interest in developing alternative characterizations [DMS10, CS15, ACGH16, ADT16] and understanding this phenomenon in various important contexts [Min96, Beh06, DMS10, DT15, ADT16]. There is also a nascent theory of Morse boundaries, which encode all Morse geodesics of a group [CS15, Cor15, CH16, CD16, CM17]. In [DT15], Durham and Taylor generalized the notion of stability to subspaces and subgroups. A subset Y Ă X is said to have D–bounded projections when diampπU pYqq ă D for all nonmaximal U P S; when the constant doesn’t matter we simply say the subset has uniformly bounded projections. We prove a complete characterization of stability in hierarchically hyperbolic groups. Theorem B (Equivalent conditions for subgroup stability). Any hierarchically hyperbolic group G admits a hierarchically hyperbolic group structure pG, Sq such that for any finitely generated H ă G, the following are equivalent: (1) H is stable in G; (2) H is undistorted in G and has uniformly bounded projections; (3) Any orbit map H Ñ CS is a quasi-isometric embedding, where S is Ď–maximal in S. Theorem B generalizes some previously known results. In the case of mapping class groups: [DT15] proved equivalence of (1) and (3); equivalence of (2) and (3) follows from the distance formula; moreover, [KL08, Ham] yield that these conditions are also equivalent to convex cocompactness in the sense of [FM02]. The case of right-angled Artin groups was studied in [KMT14], where they prove equivalence of (1) and (3). Section 6 contains a more general version of Theorem B, as well as further applications, including Theorem 6.6 which concerns the Morse boundary of hierarchically hyperbolic groups, and proves that all hierarchically hyperbolic groups have finite stable asymptotic dimension. As a sample application of Theorem B and using work of Taylor–Tiozzo [TT16], we prove the following in Section 6.4. Theorem C (Random subgroups are stable). Let pX , Sq be a HHS for which CS has infinite diameter, where S is the Ď–maximal element, and consider G ă AutpX , Sq which acts properly and cocompactly on X . Then any k–generated random subgroup of G stably embeds in X . We note that one immediate consequence of this result is a new proof of a theorem of Maher–Sisto: any random subgroup of a hierarchically hyperbolic group which is not the direct product of two infinite groups is stable [MS17]. The mapping class group and rightangled Artin groups cases of this result were first established in [TT16]. On purely loxodromic subgroups. In the mapping class group setting [BBKL16] proved that the conditions in Theorem B are also equivalent to being undistorted and purely pseudoAnosov. Similarly, in the right-angled Artin group setting, it was proven in [KMT14] that (1) and (3) are each equivalent to being purely loxodromic. Subgroups of right-angled Coxeter groups all of whose elements act loxodromically on the contact graph were studied in the recent preprint [Tra, Theorem 1.4], who proved that property is equivalent to (3). Since there often exist elements in a right-angled Coxeter group which do not act loxodromically on the contact graph, his condition is not equivalent to (1); it is the ability to change the hierarchically hyperbolic structure as we do in Theorem 3.11, discussed below, which allows us to prove our more general result which characterizes all stable subgroups, not just the ones acting loxodromically on the contact graph. Mapping class groups and right-angled Artin groups have the property that in their standard hierarchically hyperbolic structure they admit a universal acylindrical action on CS where S is the Ď–maximal domain. On the other hand, right-angled Coxeter groups often ACYLINDRICAL ACTIONS AND STABILITY IN HHG 4 don’t admit universal acylindrical actions on CS in their standard structure. Accordingly, we believe the following questions are interesting. The first item would generalize the situation in the mapping class group as established in [BBKL16], and the second item would generalize what is known in right-angled Artin groups as proven in [KMT14], and partial results about right-angled Coxeter groups as in [Tra]. In the case of the mapping class group, if the second item was true this would resolve a question of Farb–Mosher [FM02]. See also [ADT16, Question 1]. Question D. Let pG, Sq be a hierarchically hyperbolic group which admits a universal acylindrical action on CS, where S is Ď–maximal in S. Let H be a finitely generated subgroup of G. Are the conditions in Theorem B also equivalent to: (1) . . . H is undistorted and acts purely loxodromically on CS? (2) . . . H acts purely loxodromically on CS? Note that in the context of Question D, an element acts loxodromically on CS if and only if it has positive translation length. This holds since the action is acylindrical and thus each element either acts elliptically or loxodromically. New hierarchically hyperbolic structures. In order to establish the above results, we provide some new structural theorems about hierarchically hyperbolic spaces. One of the key technical innovations in this paper is provided in Section 3. There we prove Theorem 3.11 which allows us to modify a given hierarchically hyperbolic structure pX , Sq by removing CU for some U P S and, in their place, enlarging the space CS where S is the Ď–maximal element of S. For instance, this is how we construct the space on which a hierarchically hyperbolic group has its largest acylindrical action. Another important tool is Theorem 4.4 which provides a simple characterization of contracting geodesics in a hierarchically hyperbolic space The following is a restatement of that result in the case of groups: Theorem E (Characterization of contracting quasigeodesics). Let G be a hierarchically hyperbolic group. For any D ą 0 and K ě 1 there exists a D 1 ą 0 depending only on D and G such that the following holds for every pK, Kq–quasigeodesic γ Ă X : the quasigeodesic γ has D–bounded projections if and only if γ is D 1 –contracting. Since the presence of a contracting geodesic implies the group has at least quadratic divergence, an immediate consequence of Theorem E is that any hierarchically hyperbolic group has quadratic divergence whenever X projects to an infinite diameter subset of CS. Finally, through much of this paper we impose a technical hypothesis on our hierarchically hyperbolic structures, called having clean containers. Although, in Proposition 3.5 this hypothesis is shown to hold for many groups, it does not hold in all cases. In Section 7 we introduce a technical trick which allows us to prove a weakened version of the results of Section 3 without this hypothesis. In turn, this allows us to remove this hypothesis from the remaining results in the paper, for instance allowing us in the case of groups to upgrade Theorem 5.1 to Theorem A and Theorem 4.4 to Theorem E. Acknowledgments. The authors thank Mark Hagen and Alessandro Sisto for lively conversations about hierarchical hyperbolicity. The authors were supported in part by NSF grant DMS-1440140 while at the Mathematical Sciences Research Institute in Berkeley during Fall 2016 program in Geometric Group Theory. Abbott was supported by the NSF RTG awards DMS-1502553 and Durham was supported by DMS-1045119. Behrstock thanks Chris Leininger for an interesting conversation which led to the formulation of Conjecture D. We thank Ivan Levcovitz and Jacob Russell for helpful feedback on an early version of this article. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 5 2. Background 2.1. Hierarchically hyperbolic spaces. In this section we recall the basic definitions and properties of hierarchically hyperbolic spaces as introduced in [BHS17b, BHS15]. Definition 2.1 (Hierarchically hyperbolic space). A q–quasigeodesic space pX , dX q is said to be hierarchically hyperbolic if there exists δ ě 0, an index set S, and a set tCW | W P Su of δ–hyperbolic spaces pCU, dU q, such that the following conditions are satisfied: (1) (Projections.) There is a set tπW : X Ñ 2CW | W P Su of projections sending points in X to sets of diameter bounded by some ξ ě 0 in the various CW P S. Moreover, there exists K so that each πW is pK, Kq–coarsely Lipschitz. (2) (Nesting.) S is equipped with a partial order Ď, and either S “ H or S contains a unique Ď–maximal element; when V Ď W , we say V is nested in W . We require that W Ď W for all W P S. For each W P S, we denote by SW the set of V P S such that V Ď W . Moreover, for all V, W P S with V Ĺ W there is a specified subset CV . ρVW Ă CW with diamCW pρVW q ď ξ. There is also a projection ρW V : CW Ñ 2 (3) (Orthogonality.) S has a symmetric and anti-reflexive relation called orthogonality: we write V KW when V, W are orthogonal. Also, whenever V Ď W and W KU , we require that V KU . Finally, we require that for each T P S and each U P ST for which tV P ST | V KU u ‰ H, there exists W P ST ´ tT u, so that whenever V KU and V Ď T , we have V Ď W ; we say W is a container associated with T P S and U P ST . Finally, if V KW , then V, W are not Ď–comparable. (4) (Transversality and consistency.) If V, W P S are not orthogonal and neither is nested in the other, then we say V, W are transverse, denoted V &W . There exists κ0 ě 0 such that if V &W , then there are sets ρVW Ď CW and ρW V Ď CV each of diameter at most ξ and satisfying: ( min dW pπW pxq, ρVW q, dV pπV pxq, ρW V q ď κ0 for all x P X . For V, W P S satisfying V Ď W and for all x P X , we have: ( min dW pπW pxq, ρVW q, diamCV pπV pxq Y ρW V pπW pxqqq ď κ0 . & V Finally, if U Ď V , then dW pρU W , ρW q ď κ0 whenever W P S satisfies either V Ĺ W or V &W and W U . (Finite complexity.) There exists n ě 0, the complexity of X (with respect to S), so that any set of pairwise–Ď–comparable elements has cardinality at most n. (Large links.) There exist λ ě 1 and E ě maxtξ, κ0 u such that the following holds. Let W P S and let x, x1 P X . Let N “ λdW pπW pxq, πW px1 qq ` λ. Then there exists tTi ui“1,...,tN u Ď SW ´ tW u such that for all T P SW ´ tW u, either T P STi for some i, or dT pπT pxq, πT px1 qq ă E. Also, dW pπW pxq, ρTWi q ď N for each i. (Bounded geodesic image.) For all W P S, all V P SW ´ tW u, and all geodesics V γ of CW , either diamCV pρW V pγqq ď E or γ X NE pρW q ‰ H. (Partial Realization.) There exists a constant α with the following property. Let tVj u be a family of pairwise orthogonal elements of S, and let pj P πVj pX q Ď CVj . Then there exists x P X so that: ‚ dVj px, pj q ď α for all j, (5) (6) (7) (8) V ‚ for each j and each V P S with Vj Ď V , we have dV px, ρVj q ď α, and V ‚ if W &Vj for some j, then dW px, ρWj q ď α. (9) (Uniqueness.) For each κ ě 0, there exists θu “ θu pκq such that if x, y P X and dpx, yq ě θu , then there exists V P S such that dV px, yq ě κ. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 6 Notation 2.2. Note that below we will often abuse notation by simply writing pX , Sq or S to refer to the entire package of an hierarchically hyperbolic structure, including all the associated spaces, projections, and relations given by the above definition. Notation 2.3. When writing distances in CU for some U P S, we often simplify the notation slightly by suppressing the projection map πU , i.e., given x, y P X and p P CU we write dU px, yq for dU pπU pxq, πU pyqq and dU px, pq for dU pπU pxq, pq. Note that when we measure distance between a pair of sets (typically both of bounded diameter) we are taking the minimum distance between the two sets. Given A Ă X and U P S we let πU pAq denote YaPA πU paq. It is often convenient to work with equivariant hierarchically hyperbolic structures, we now recall the relevant structures for doing so. For details see [BHS15]. Definition 2.4 (Hierarchically hyperbolic groups). Let pX , Sq be a hierarchically hyperbolic space. The automorphism group of pX , Sq is denoted AutpX , Sq and is defined as follows. An element of AutpX , Sq consists of a map g : X Ñ X , together with a bijection g♦ : S Ñ S and, for each U P S, an isometry g˚ pU q : CU Ñ Cpg♦ pU qq so that the following diagrams coarsely commute whenever the maps in question are defined (i.e., when U, V are not orthogonal): g X πU  CU and CU ρU V  CV // X 1 g ˚ pU q g ˚ pV q πg♦ pU q  g ˚ pU q // Cpg ♦ pU qq // Cpg ♦ pU qq  g ♦ pU q g ♦ pV q ρ // Cpg ♦ pV qq A finitely generated group G is said to be a hierarchically hyperbolic group (HHG) if there is a hierarchically hyperbolic space pX , Sq and an action G Ñ AutpX , Sq so that the induced uniform quasi-action of G on X is metrically proper, cobounded, and S contains finitely many G–orbits. Note that when G is a hyperbolic group then with respect to any word metric it inherits a hierarchically hyperbolic structure. An important consequence of being a hierarchically hyperbolic space is the following distance formula, which relates distances in X to distances in the hyperbolic spaces CU for U P S. The notation ttxuus means include x in the sum if and only if x ą s. Theorem 2.5 (Distance formula for HHS; [BHS15]). Let pX , Sq be a hierarchically hyperbolic space. Then there exists s0 such that for all s ě s0 , there exist C, K so that for all x, y P X , ÿ dpx, yq —K,C ttdU px, yquus . U PS We now recall an important construction of subspaces in a hierarchically hyperbolic space called standard product regions introduced in [BHS17b, Section 13] and studied further in [BHS15]. First we define the two factors in the product space. Definition 2.6 (Nested partial tuple (FU )). Recall SU “ tV P S | V Ď U u. Fix κ ě κ0 and let FU be the κ–consistent tuples (i.e., tuples satisfying the conditions of ś set of CV Definition 2.1.(4)) in V PSU 2 . Definition 2.7 (Orthogonal partial tuple (EU ) ). Let SK U “ tV P S | V KU u Y tAu, where A is a Ď–minimal elementśW such that V Ď W for all V KU . Fix κ ě κ0 , let EU be the set of κ–consistent tuples in V PSK ´tAu 2CV . U ACYLINDRICAL ACTIONS AND STABILITY IN HHG 7 Definition 2.8 (Product regions in X ). Given X and U P S, there are coarsely well-defined maps φĎ , φK : FU , EU Ñ X which extend to a coarsely well-defined map φU : FU ˆ EU Ñ X . Indeed, for each p~a, ~bq P FU ˆ EU , and each V P S, the coordinate pφU p~a, ~bqqV is defined as follows. If V Ď U , then pφU p~a, ~bqqV “ aV . If V KU , then pφU p~a, ~bqqV “ bV . If V &U , then pφU p~a, ~bqqV “ ρU a, ~bqqV “ ρU V . Finally, if U Ď V , and U ‰ V , let pφU p~ V . We refer to FU ˆ EU as a product region, which we denote PU . We often abuse notation slightly and use the notation EU , FU , and PU to refer to the image in X of the associated set. In [BHS15, Lemma 5.9] it is proven that these standard product regions have the property that they are “hierarchically quasiconvex subsets” of X . Here we leave out the definition of hierarchically quasiconvexity, because its only use here is that product regions have “gate maps,” as given by the following in [BHS15, Lemma 5.4]: Lemma 2.9 (Existence of coarse gates; [BHS15]). If Y Ď X is k–hierarchically quasiconvex and non-empty, then there exists a gate map for Y, i.e., for each x P X there exists y P Y such that for all V P S, the set πV pyq (uniformly) coarsely coincides with the projection of πV pxq to the kp0q–quasiconvex set πV pYq. Remark 2.10 (Surjectivity of projections). As one can always change the hierarchical structure so that the projection maps are coarsely surjective [BHS15, Remark 1.3], we will assume that S is such a structure. That is, for each U P S, if πU is not surjective, then we identify CU with πU pX q. We also need the notion of a hierarchy path, whose existence was proven in [BHS15, Theorem 5.4]: Definition 2.11. For R ě 1, a path γ in X is a R–hierarchy path if (1) γ is a pR, Rq–quasigeodesic, (2) for each W P S, πW ˝ γ is an unparametrized pR, Rq–quasigeodesic. An unbounded hierarchy path r0, 8q Ñ X is a hierarchy ray. 2.2. Acylindrical actions. We recall the basic definitions related to acylindrical actions; the canonical references are [Bow08] and [Osi16]. We also discuss a partial order on these actions which was recently introduced in [ABO16]. Definition 2.12 (Acylindrical). The action of a group G on a metric space X is acylindrical if for any ε ą 0 there exist R, N ě 0 such that for all x, y P X with dpx, yq ě R, |tg P G | dpx, gxq ď ε and dpy, gyq ď εu| ď N. Recall that given a group G acting on a hyperbolic metric space X, an element g P G is loxodromic if the map Z Ñ X defined by n ÞÑ gn x is a quasi-isometric embedding for some (equivalently any) x P X. However, an element of G may be loxodromic for some actions and not for others. Consider, for example, the free group on two generators acting on its Cayley graph and acting on the Bass-Serre tree associated to the splitting F2 » xxy ˚ xyy. In the former action, every non-trivial element is loxodromic, while in the latter action, no powers of x and y are loxodromic. Definition 2.13 (Generalized loxodromic). An element of a group G is called generalized loxodromic if it is loxodromic for some acylindrical action of G on a hyperbolic space. Remark 2.14. By [Osi16, Theorem 1.1], every acylindrical action of a group on a hyperbolic space either has bounded orbits or contains a loxodromic element. By [Osi16, Theorem 1.2.(L4)] and Sisto [Sis16, Theorem 1], every generalized loxodromic element is Morse. Therefore, if a group H does not contain any Morse elements, it does not contain any generalized loxodromics, and thus H must have bounded orbits in every acylindrical action on a hyperbolic space. This is the case when, for example, H is a non-trivial direct product. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 8 Definition 2.15 (Universal acylindrical action). An acylindrical action of a group on a hyperbolic space is a universal acylindrical action if every generalized loxodromic element is loxodromic. Notice that if every acylindrical action of a group G on a hyperbolic space has bounded orbits, then G does not contain any generalized loxodromic elements, and the action of G on a point (which is acylindrical) is a universal acylindrical action. The following notions are discussed in detail in [ABO16]. We give a brief overview here. Fix a group G. Given a (possibly infinite) generating set X of G, let | ¨ |X denote the word metric with respect to X. Given two generating sets X and Y , we say X is dominated by Y and write X ĺ Y if sup |y|X ă 8. yPY Note that when X ĺ Y , then the action G ñ ΓpG, Y q provides more information about the group than G ñ ΓpG, Xq, and so, in some sense, is a “larger" action. The two generating sets X and Y are equivalent if X ĺ Y and Y ĺ X; when this happens we write X „ Y . Let AHpGq be the set of equivalence classes of generating sets X of G such that ΓpG, Xq is hyperbolic and the action G ñ ΓpG, Xq is acylindrical, where ΓpG, Xq is the Cayley graph of Γ with respect to the generating set X. We denote the equivalence class of X by rXs. The preorder ĺ induces an order on AHpGq, which we also denote ĺ. Definition 2.16 (Largest). We say an equivalence class of generating sets is largest if it is the largest element in AHpGq under this ordering. Given a cobounded acylindrical action of G on a hyperbolic space S, a Milnor–Schwartz argument gives a (possibly infinite) generating set Y of G such that there is a G–equivariant quasi-isometry between G ñ S and G ñ ΓpG, Y q. By a slight abuse of language, we will say that a particular cobounded acylindrical action G ñ S on a hyperbolic space is largest, when, more precisely, it is the equivalence class of the generating set associated to this action through the above correspondence, rY s, that is the largest element in AHpGq. Remark 2.17. Notice that by definition, every largest acylindrical action is a universal acylindrical action. 2.3. Stability. Stability is strong coarse convexity property which generalizes quasiconvexity in hyperbolic spaces and convex cocompactness in mapping class groups [DT15]. In the general context of metric spaces, it is essentially the familiar Morse property generalized to subspaces, so we begin there. Definition 2.18 (Morse/stable quasigeodesic). Let X be a metric space. A quasigeodesic γ Ă X is called Morse (or stable) if there exists a function N : R2ě0 Ñ Rě0 such that if q is a pK, Cq–quasigeodesic in X with endpoints on γ, then q Ă NN pK,Cq pγq. We call N the stability gauge for γ and say γ is N –stable if we want to record the constants. We can now define a notion of stable embedding of one metric space in another which is equivalent to the one introduced by Durham and Taylor [DT15]: Definition 2.19 (Stable embedding). We say a quasi-isometric embedding f : X Ñ Y between quasigeodesic metric spaces is a stable embedding if there exists a stability gauge N such that for any quasigeodesic constants K, C and any pK, Cq–quasigeodesic γ Ă X, then f pγq is an N –stable quasigeodesic in Y . The following generalizes the notion of a Morse quasigeodesic to subgroups: ACYLINDRICAL ACTIONS AND STABILITY IN HHG 9 Definition 2.20 (Subgroup stability). Let H be subgroup of a finitely generated group G. We say H is a stable subgroup of G if some (equivalently, any) orbit map of H into some (any) Cayley graph (with respect to a finite generating set) of G is a stable embedding. If for some h P G, H “ xhy is stable, then we call h stable. Such elements are often called Morse elements. Stability of a subset is preserved under quasi-isometries. Note that stable subgroups are undistorted in their ambient groups and, moreover, they are quasiconvex with respect to any choice of finite generating set for the ambient group. 3. Altering the hierarchically hyperbolic structure The goal of this section is to prove that any hierarchically hyperbolic space satisfying two technical assumptions—the bounded domain dichotomy and the clean container property— admits a hierarchically hyperbolic structure with unbounded products, i.e., every non-trivial product region in the ambient space has unbounded factors; see Theorem 3.11 below. In particular, this establishes that most of the standard examples of hierarchically hyperbolic groups admit a hierarchically hyperbolic group structure with unbounded products. This is a key ingredient in our complete characterization of the contracting property in such spaces, which we establish in Section 4. 3.1. Unbounded products. Fix a hierarchically hyperbolic space pX , Sq. Let M ą 0 and let SM Ă S be the set of domains U P S such that there exists V P S and W P SK V satisfying: U Ď V , diampCV q ą M , and diampCW q ą M . Recall that a set of domains U Ă S is closed under nesting if whenever U P U and V Ď U , then V P U. Lemma 3.1. For any M ą 0, the set SM is closed under nesting. Proof. Let U P SM and V Ď U . By definition of U P SM , there exists Z P SM with U Ď Z and satisfying: diampCZq ą M and there exists W P SK Z such that diampCZq ą M . Since M V Ď Z, it follows that V P S , as desired. l Definition 3.2 (Bounded domain dichotomy). We say pX , Sq has the M –bounded domain dichotomy if there exists M ą 0 such that any U P S with diampCU q ą M satisfies diampCU q “ 8. If the value of M is not important, we simply refer to the bounded domain dichotomy. We note that any hierarchically hyperbolic group has the bounded domain dichotomy. (Also, note that this property implies the space is “asymphoric” as defined in [BHS17c].) Definition 3.3 (Unbounded products). We say that a hierarchically hyperbolic space pX , Sq has unbounded products if it has the bounded domain dichotomy and the property that if U P S has diampFU q “ 8, then diampEU q “ 8. 3.2. Clean containers. The clean container property is a technical assumption related to the orthogonality axiom. Definition 3.4 (Clean containers). A hierarchically hyperbolic space pX , Sq has clean containers if for each T P S and each U P ST with tV P ST | V K U u ‰ H, the associated container provided by the orthogonality axiom is orthogonal to U . We first describe some interesting examples with clean containers. Then we show that this property is preserved under some combination theorems for hierarchically hyperbolic spaces. We refer the reader to [BHS15, Sections 8 & 9] and [BHS17a, Section 6] for details on the structure in the new spaces. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 10 Proposition 3.5. The following spaces admit hierarchically hyperbolic structures with clean containers. (1) Hyperbolic groups (2) Mapping class groups (3) Cubical groups (4) π1 pM q, for M a 3–manifold with no Nil or Sol in its prime decomposition. Proof. Hierarchically hyperbolic structures for these spaces were constructed in [BHS17b] and [BHS15]. (1) The statement is immediate for hyperbolic groups, as they all admit hierarchically hyperbolic structure with no orthogonality, and thus the containers axiom is vacuous. (2) For mapping class groups, in the standard structure, a container for domains orthogonal to a given subsurface U is the complementary subsurface, which is orthogonal to U . (3) The statement follows immediately from [HS16, Corollary 3.7]. (4) Given a geometric 3–manifold M of the above form, π1 pM q is quasi-isometric to a (possibly degenerate) product of hyperbolic spaces, and so has clean containers by Lemma 3.6. Given an irreducible non-geometric graph manifold M , the hierarchically hyperbolic structure comes from considering π1 pM q as a tree of hierarchically hyperbolic spaces with clean containers and hence has clean containers by Lemma 3.8. Finally, the general case of a non-geometric 3–manifold M follows immediately from Lemma 3.7 and the fact that π1 pM q is hyperbolic relative to its maximal graph manifold subgroups. l Lemma 3.6. The product of two hierarchically hyperbolic spaces which both have clean containers has clean containers. Proof. Let pX0 , S0 q and pX1 , S1 q be hierarchically hyperbolic spaces with clean containers. In the hierarchically hyperbolic structure pX0 ˆ X1 , Sq given by [BHS15, Theorem 8.25] there are two types of containers, those that come from one of the original structures and those that do not. Containers of the first type are clean, as both original structures have clean containers. The second type of domain consists of new domains obtained as follows. Given a domain U P Si , a new domain VU is defined with the property that it contains under nesting any domain in Si which is orthogonal to U and also any domain in Si`1 . Thus, by construction VU is a container for everything orthogonal to U . As VU K U , the result follows. l Lemma 3.7. If G is hyperbolic relative to a collection of hierarchically hyperbolic spaces which all have clean containers, then G is a hierarchically hyperbolic space with clean containers. Proof. That G is a hierarchically hyperbolic space follows from [BHS15, Theorem 9.1]. In the hierarchically hyperbolic structure on G, no new orthogonality relations are introduced, and thus all containers are containers in the hierarchically hyperbolic structure of one of the peripheral subgroups. As each of these structures have clean containers, it follows that G does, as well. l Lemma 3.8. Let T be a tree of hierarchically hyperbolic spaces such that XpT q is hyperbolic. If for each v P T , the hierarchically hyperbolic space pXv , Sv q has clean containers, then so does XpT q. Proof. This follows immediately from the proof of [BHS15, Lemma 8.10] and the fact that edge-hieromorphisms are full and preserve orthogonality. In the notation from that result, ACYLINDRICAL ACTIONS AND STABILITY IN HHG 11 we note that, if Sv has clean containers for each v P T , then the domain Av P Sv described in the proof also has the property that Av K Uv . Therefore, as edge-hieromorphisms are full and preserve orthogonality, rAv s K rU s. l The following uses the notion of hyperbolically embedded subgroups introduced in [DGO17]. Lemma 3.9. Let pG, Sq be a hierarchically hyperbolic group with clean containers, and let H ãÑhh pG, Sq. Then there exists a finite set F Ă H ´ t1u such that for all N Ÿ H with F X N “ H and H{N is hyperbolic, then the group G{N̂ , obtained by quotienting by the normal closure, is a hierarchically hyperbolic group with clean containers. Proof. Recall that in the hierarchically hyperbolic structure pG{N̂ , SN q obtained in [BHS17a, Theorem 6.2] (and in the notation used there), two domains U, V P SN satisfy U Ď V (respectively U K V) if there exists a linked pair tU, V u with U P U and V P V such that U Ď V (respectively U K V ). Let T P SN and U P pSN qT with V “ tV P ST | V K Uu ‰ H. To prove the container axiom, we consider domains T, U, V P S such that T P T, U P U and V P V for all V P V, and such that any pair is a linked pair. Then the orthogonality axiom for pG, Sq provides a domain W such that W Ě V and W Ď T . As pG, Sq has clean W containers, we also have that W K U . This implies that ρU S and ρS are coarsely equal by [DHS15, Lemma 1.5], and so tU, W u is a linked pair. Therefore, W K U. l 3.3. A new hierarchically hyperbolic structure. In this section we describe a new hierarchically hyperbolic structure on hierarchically hyperbolic spaces with the bounded domain dichotomy and clean containers. We first describe the hyperbolic spaces that will be part of the new structure. Let pX , Sq be a hierarchically hyperbolic space with the M –bounded domain dichotomy. Let SM Ă S be the set of U P S such that there exists a V P S and W P SK V satisfying M diampCV q ą M and diampCW q ą M . For each U P S, define SU Ă SU similarly. Remark 3.10 (Factored spaces). As defined in [BHS17a], given pX , Sq and T Ă S the p T is the space obtained from X by coning-off all FV for V P T. Sometimes we factored space F abuse language slightly and refer to this as the factored space obtained from X by collapsing T. In particular, when S is the Ď–maximal element of S, then CS is identified with the space p SztSu , which is obtained from X by coning-off FU for all U P SztSu. F We often consider the case of a fixed pX , Sq and U P S and then applying this construction to the hierarchy hyperbolic structure pFU , SU q. For this application, note that πU pX q is p S ztU u , by [BHS17a, Corollary 2.9], and thus so is CU , by Remark 2.10. quasi-isometric to F U p SM . By Lemma 3.1, SM is closed under nesting and hence Consider the factored space F XpSM is a hierarchically hyperbolic space. Moreover, since this hierarchically hyperbolic space has the property that no pair of orthogonal domains both have diameter larger than M , by [BHS17c, Corollary 2.16] it is hyperbolic for some constant depending only on pX , Sq and M. For each U P SM , we similarly define TU to be the factored space obtained from FU by collapsing SM U . This setup again satisfies the assumptions in Lemma 3.1 and [BHS17c, Corollary 2.16], so we obtain that TU is δ–hyperbolic for some δ which we can take to be uniform by finite complexity of pX , Sq. The next result uses the above spaces to obtain a hierarchically hyperbolic structure with particularly nice properties from a given hierarchically hyperbolic structure. Theorem 3.11. Every hierarchically hyperbolic space with the bounded domain dichotomy and clean containers admits a hierarchically hyperbolic structure with unbounded products. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 12 Proof. Let pX , Sq be a hierarchically hyperbolic space. Let T Ă S which we define to include S as well as the set of domains U with both FU and EU unbounded. We begin to define our new hierarchically hyperbolic structure on X by taking T as the index set. We let TS “ XpSM be the hyperbolic space associated to the top level domain S, and let TU be the hyperbolic spaces associated to each U P T, as defined in the discussion before the theorem. Notice that for each U P T, the space TU is identical to the space CU if and only if for every W P S for which W Ď U satisfies W P T. Now, suppose TU ‰ CU (and hence that there exists at least one W P S with W Ď U satisfying W R T). As noted above, we can take FU , TU , and CU to have the same underlying space with different metrics. Even though the identity map on FU no longer induces an isometry ψU : TU Ñ CU , this map is still 1–Lipschitz. In fact, we now show that ψU is actually bi-Lipschitz for all U P TztSu. By definition of T, any W P S for which W R T either FW or EW is bounded. Since U ‰ S, EU is unbounded, and it follows that EW is unbounded. Since W R T, it follows that FW must be bounded; moreover, pX , Sq has the M –bounded domain dichotomy, so FW is uniformly bounded. Thus, by the distance formula in FU , for any pair of points in in FU , their distance in TU can be at most a uniformly bounded multiple of their distance in CU , and so ψU is a bi-Lipschitz map, with constant M . To avoid confusion, if U P T, we use the notation dU for distance in TU and the notation dCU for distance in CU . We take the associated projections πU to be the composition of the nearest point projection X Ñ FU and the factor map FU Ñ TU . If U, V P T, we take the relative projections ρVU to be the preimage under ψU of the corresponding relative projections in pX , Sq whenever U ‰ S. In the case that U “ S, we take ρVS to be the image of FV under the factor map X Ñ TS . We now check the axioms for pX , Tq. Projections: Since the metrics on our new spaces TU for U P T are not the same, we need to check that these new projections are still coarsely Lipschitz. This, however, is clear, as πU is the composition of a nearest point projection and a factor map, both of which are coarsely Lipschitz. Nesting: The partial order and projections are given by construction. The diameter bound in the case of nesting projections is immediate from the bound from pX , Sq and the fact that the maps ψU are bi-Lipschitz for all U P T. Orthogonality: This is essentially inherited from the hierarchically hyperbolic structure pX , Sq. The first and last statements are immediate. To prove the second statement, let T P T and let U P TT be such that tV P TT | V K U u ‰ H. Then as T Ď S, by the orthogonality axiom for pX , Sq there is a domain W P S such that W Ĺ T and whenever V Ď T and V K U , we have V Ď W . We will show that W P T. Indeed, FW is unbounded as there exists some V P T with V Ď W . Furthermore, as the hierarchically hyperbolic structure pX , Sq has clean containers, W K U . As U P T, it follows that EW is unbounded, as well. Transversality and consistency: For U, V P T Ď S with U &V , the relative projections V ρU V , ρU are well-defined and satisfy the required bounds using the constant M ¨ ξ, where ξ is the original constant from the hierarchically hyperbolic structure on pX , Sq. We now check the consistency conditions. For all U P T distances in TU can only increase from distances in CU by factor of M , so the consistency inequalities clearly hold by this fact and the consistency axiom from pX , Sq. Moreover, we may take the constant to be M ¨ κ0 , where κ0 is the original constant from pX , Sq. Partial realization: If tVj u is a family of pairwise orthogonal domains of T, then tVj u is a family of pairwise orthogonal domains of S. By the partial realization axiom for pX , Sq, there is a constant α and a point x P X such that the conclusion holds for all W P S. By ACYLINDRICAL ACTIONS AND STABILITY IN HHG 13 increasing the constant to M ¨ α, we also have a bound on the appropriate distances in TW , and the axiom holds. Finite complexity: This clearly holds by construction. Large link axiom: Let λ and E be the constants from the large link axiom for pX , Sq, let W P T, and let x, x1 P X . Consider the set tTi u Ă SW ´tW u provided by the large link axiom for pX , Sq. Since Ti Ď W , it follows that ETi is unbounded for each i. Let T P TW ´ tW u. If dT px, x1 q ą E ¨ M , it follows that FT is unbounded. Furthermore, dCT px, x1 q ą E, whence T Ď Ti for some i by the large link axiom for pX , Sq. Therefore FTi is unbounded, and so Ti P T. The result follows. Bounded geodesic image: For all domains in TztSu, we have increased distances in the corresponding hyperbolic spaces by no more than M . Hence this axiom holds with the original constants multiplied by M . Uniqueness: Let κ ą 0. We can take θu1 ą maxtθu pκq, M u, where θu pκq is the original constant from the uniqueness axiom for pX , Sq. Then if x, y P X with dpx, yq ą θu1 , then uniqueness for pX , Sq implies there exists U P S with dCU px, yq ą M . Either U P T or diampCU q “ 8 and EU is bounded. We are done in the first case. In the second case, by construction TU is uniformly quasi-isometrically embedded in TS , and hence dS px, yq is at least a uniform constant depending only on M and the quasi-isometry constants. l Corollary 3.12. If pG, Sq is a hierarchically hyperbolic group with clean containers, then pG, Tq is a hierarchically hyperbolic group with unbounded products. Proof. Recall that every hierarchically hyperbolic group has the bounded domain dichotomy. Thus by Theorem 3.11, pG, Tq is a hierarchically hyperbolic space with unbounded products. It remains only to show that is a hierarchically hyperbolic group structure. The action of G on itself is clearly metrically proper and cobounded, so it only remains to show that T contains finitely many G–orbits. If U P S but U R T, then either FU or EU must be bounded. Then for each g P G, the same will be true for FgU or EgU , which shows that gU R T. Thus G ¨ U Ć T. Since S has finitely many G–orbits, the result follows. l 4. Characterization of contracting geodesics For this section, fix a hierarchically hyperbolic space pX , Sq with the bounded domain dichotomy; denote the Ď–maximal element S P S. Definition 4.1 (Bounded projections). Let Y Ă X and D ą 0. We say that Y has D– bounded projections if for every U P SztSu, we have dU pYq ă D. Definition 4.2 (Contracting). A quasigeodesic γ in a metric space X is said to be D– contracting if there exist a map πγ : X Ñ γ and constants A, D ą 0 satisfying: (1) For any x P γ, we have diamX px, πγ pxqq ă D; (2) If x, y P X with dX px, yq ă 1, then diamX pπγ pxq, πγ pyqq ă D; (3) For all x P X, if we set R “ A ¨ dpx, γq, then diampπγ pBR pxqqq ď D. Sometimes authors refer to any quasigeodesic satisfying (3) as contracting. Nonetheless, for applications one also needs to assume the coarse idempotence and coarse Lipschitz properties given by (1) and (2), so for convenience we combine them all in one property. A useful well-known fact is stability of contracting quasigeodesics. Two different proofs of the following occur as special cases of the results [MM99, Lemma 6.1] and [Beh06, Lemma 6.2]; this explicit statement can also be found in [DT15, Section 4]. Lemma 4.3. If γ is a D–contracting pK, Kq–quasigeodesic in a metric space X, then γ is D 1 –stable for some D 1 depending only on D and K. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 14 The following result and argument both generalize and simplify the analogous result for mapping class groups in [Beh06]. Theorem 4.4. Let pX , Sq be a hierarchically hyperbolic space. For any D ą 0 and K ě 1 there exists a D 1 ą 0 depending only on D and pX , Sq such that the following holds for every pK, Kq–quasigeodesic γ Ă X . If γ has D–bounded projections, then γ is D 1 –contracting. Moreover, if pX , Sq has the bounded domain dichotomy and clean containers, then X admits a hierarchically hyperbolic structure pX , Tq with unbounded products where, additionally, we have that if γ is D–contracting, then γ has D 1 –bounded projections. Remark 4.5. In Section 7, we introduce a technical trick that allows us to remove the assumption that pX , Sq has clean containers. Thereby Theorem E follows from Theorem 4.4. Proof. First suppose that γ has D–bounded projections. It follows immediately from the definition that γ is a hierarchically quasiconvex subset of X . Hierarchical quasiconvexity is the hypothesis necessary to apply [BHS17a, Lemma 5.4], which then yields existence of a coarsely Lipschitz gate map g : X Ñ γ, i.e., for each x P X , the image gpxq P γ has the property that for all U P S the set πU pgpxqq is a uniformly bounded distance from the projection of πU pxq to πU pγq. We will use g as the map to prove γ is contracting. Gate maps satisfy condition (1) of Definition 4.2 by definition and condition (2) since they are coarsely Lipschitz. Hence it remains to prove that condition (3) of Lemma 4.3 holds. Fix a point x P X with dX px, γq ě B0 and let y P X be any point with dX px, yq ă B1 dX px, γq for constants B0 and B1 as determined below. Since g is a gate map and γ has D–bounded projections, for all U P S ´ tSu we have dU pgpxq, gpyqq ă D. Thus, by taking a threshold L for the distance formula (Theorem 2.5) larger than D, we have dX pgpxq, gpyqq —pK,Cq dS pgpxq, gpyqq, for uniform constants K, C. Thus it suffices to prove that dS pgpxq, gpyqq is bounded by some uniform constant B2 . We also choose L to be larger than the constants in Definition 2.1.(4). By Definition 2.1.(1), the maps πU are Lipschitz with a uniform constant. Taking B0 sufficiently large, it follows that there exists U P S so that dU px, gpxqq ą L. By choosing B1 to be sufficiently small, and applying the distance formula to the pairs px, yq and px, gpxqq, the fact that the projections πU are Lipschitz implies that the sum of the terms in the distance formula associated to px, gpxqq ř is much greater than of those associated to px, yq. ř the sum ř Having chosen B1 ă 21 , we have dU px, gpxqq ą 2 dU px, yq ą pdU px, yq`Lq. Thus, there exists W P S for which dW px, gpxqq ą dW px, yq ` L. If W “ S, then having dS px, gpxqq ą dS px, yq ` L (where we enlarge L if necessary) would already show that the CS–geodesic between x and y was disjoint from πS pγq and then hyperbolicity of CS would yield a uniform bound on the dS pgpxq, gpyqq. Otherwise, we may assume W ‰ S. By the triangle inequality, we have dW py, gpxqq ą L. Further, since, as noted above, the CW projections between gpxq and gpyq are uniformly bounded, by choosing B0 large enough and B1 small enough, we also have dW py, gpyqq ą L. By the bounded geodesic image axiom (Definition 2.1.(7)), any geodesic in CS either has bounded projection to CU or satisfies πS pγq X NE pρU S q ‰ H for any U P S ´ tSu. For any geodesic from πS pxq to πS pgpxqq (or from πS pyq to πS pgpyq), the above argument implies that the first condition doesn’t hold for W . Thus, in both cases, we know that any such geodesic must pass uniformly close to ρW S . Hence the hyperbolicity of CS implies γ is contracting, and the first implication holds. We prove the second implication by contradiction. By Theorem 3.11, we obtain a new structure pX , Tq which has unbounded products. For every U P TztSu we have that both ACYLINDRICAL ACTIONS AND STABILITY IN HHG 15 FU and EU are unbounded, hence every U P TztSu yields a non-trivial product region PU “ EU ˆ FU which is uniformly quasi-isometrically embedded in X . Suppose γ is contracting but doesn’t have D–bounded projections. Then we obtain a sequence tUi u P TztSu with diampπCUi pγqq Ñ 8. Thus there is a sequence of pairs of points xi , yi P γ, so that dUi pxi , yi q — Ki , with Ki Ñ 8. For each i, let qi be a R–hierarchy path between xi , yi . By [BHS15, Proposition 8.24], there exists ν ą 0 depending only on R and pX , Sq, such that diamUi pqi X Nν pPUi qq — Ki . Since γ is contracting, it is uniformly stable by Lemma 4.3. Since γ is uniformly stable and the qi are uniform quasigeodesics, it follows that each qi is contained in a uniform neighborhood of γ. Hence arbitrarily long segments of γ are uniformly close to the product regions PUi . This contradicts the assumption that γ is contracting and completes the proof. l 5. Universal and largest acylindrical actions The goal of this section is to show that for every hierarchically hyperbolic group pG, Sq with clean containers AHpGq has a largest element. Recall that the action associated to such an element is necessarily a universal acylindrical action. We prove the following stronger result which, in addition to providing new largest and universal acylindrical actions for cubulated groups, gives a single construction that recovers all previously known largest and universal acylindrical actions of finitely presented groups that are not relatively hyperbolic. Theorem 5.1. Every hierarchically hyperbolic group with clean containers admits a largest acylindrical action. Remark 5.2. In Section 7, we introduce a technical trick that allows us to remove the assumption that pX , Sq has clean containers. Whence Theorem 5.1 implies Theorem A. Before giving the proof, we record the following result which gives a sufficient condition for an action to be largest. This result follows directly from the proof of Theorem 6.3 in [ABO16]; we give a sketch of the argument here. Recall that an action H ñ S is elliptic if H has bounded orbits. Proposition 5.3 ([ABO16]). Let G be a group, tHŤ 1 , . . . , Hn u a finite collection of subgroups of G, and F be a finite subset of G such that F Y p ni“1 Hi q generates G. Assume that: Ť (1) ΓpG, F Y p ni“1 Hi qq is hyperbolic and acylindrical. (2) Each Hi is elliptic in every acylindrical action of G on a hyperbolic space. Ť Then rF Y p ni“1 Hi qs is the largest element in AHpGq. Ť Proof. First notice that by assumption (1), ΓpG, F Y p ni“1 Hi q is an element of AHpGq. Let G ñ S be a cobounded acylindrical action of G on a hyperbolic space, S,Ťand fix a basepoint s P S. Then there exists a bounded subspace B Ă S such that S Ď gPG g ¨ B. By assumption (2), the orbit Hi ¨ s is bounded for all i “ 1, . . . , n. Since |F | ă 8, we know diampF ¨ sq ă 8 and thus K “ maxtdiampBq, diampH1 ¨ sq, . . . , diampHn ¨ sq, diampF ¨ squ is finite. Let C “ ts1 P S | dps1 , sq ď 3Ku, and let Z “ tg P G | g ¨ C X C ‰ Hu. The standard Milnor-Schwartz Lemma argument shows that Z is an infinite generating set of G and there exists a G–equivariant quasi-isometry S Ñ ΓpG, Zq. It is clear that Z ACYLINDRICAL ACTIONS AND STABILITY IN HHG 16 Ť contains F , as well as Hi for all i “ 1, . . . , n and thus rZs ĺ rF Y p ni“1 Hi s. The result follows. l Proof of Theorem 5.1. Let pG, Sq be a hierarchically hyperbolic group with finite generating set F . By Corollary 3.12, there is a hierarchically hyperbolic group structure pG, Tq with unbounded products. Recall that S is the Ď–maximal element of T with associated hyperbolic space TS . The action on TS is acylindrical by [BHS17b, Theorem K]. Moreover, the action of G on TS is cobounded, so let B be a fundamental domain for G ñ TS and U “ tU P T | πS pFU q Ă B and U is Ď–maximal in TztSuu. Notice that U will contain exactly one representative from each G–orbit of domains, and so must be a finite set. Indeed, for a hierarchically hyperbolic group, this follows from the fact that the action of G on T is cofinite. Let Hi ď G be the stabilizer of FUi for each Ui P U . By a standard Milnor-Schwartz argument (see [ABO16] for details) there is a G–equivariant quasi-isometry between ΓpG, F Y Ť p ni“1 Hi qq and TS , where n “ |U |. Therefore condition (1) of Proposition 5.3 is satisfied. By definition, each Hi sits inside a non-trivial direct product in G, the product region PUi associated to each Ui P U . It follows that Hi must be elliptic in every acylindrical action of G on a hyperbolic space (see Remark 2.14), satisfying condition (2). Therefore, by Proposition 5.3, the action is largest. l Remark 5.4. The proof of Theorem 5.1 can be extended to treat a number of groups which are hierarchically hyperbolic spaces, but not hierarchically hyperbolic groups. For example, it was shown in [BHS15, Theorem 10.1] that every fundamental group of a 3–manifold with no Nil or Sol in its prime decomposition admits a hierarchically hyperbolic space structure, but as explained in [BHS15, Theorem 10.2] it is likely that these don’t all admit hierarchically hyperbolic group structures. Nonetheless, the proof of the above theorem works in this case by replacing the use of the fact that the action of G on T is cofinite, with the fact that for π1 pM q, U is precisely the set of Ď–maximal domains in the hierarchically hyperbolic structure on each of the Seifert-fibered components of the prime decomposition of M , and so is finite. Remark 5.5. There is an instructive direct proof of the universality of the above action using the characterization of contracting elements in Section 4, which we now give. Let g P G be an infinite order element and consider the geodesic xgy in ΓpG, F q. If xgy is contracting in ΓpG, F q, then by Theorem 4.4 all proper projections are bounded, and thus by the distance formula, g is loxodromic for the action on TS . If xgy is not contracting in ΓpG, F q, then there exists some U P T such that πU pxgyq is unbounded. Thus for any increasing sequence of constants pKi q with Ki Ñ 8, there are sequences of pairs of points xi , yi P xgy such that dpxi , yi q Ñ 8 as i Ñ 8 and dU pxi , yi q ě Ki . For each i, let γi be an R–hierarchy path between xi and yi . By definition, γi is a uniform quasigeodesic. Then by [BHS15, Proposition 8.24], there exists ν ą 0 depending only on R and pX , Tq such that diamU pγi X Nν pPU qq ě Ki . If g is a generalized loxodromic, then xgy is stable, by [Sis16], and so the subgeodesic rxi , yi s stays within a uniform bounded distance of γi . Thus arbitrarily long subgeodesics of xgy stay within a uniformly bounded distance of a product region, PU . This contradicts xgy being Morse, and therefore g is not a generalized loxodromic element. This remark directly implies that the action on TS is a universal acylindrical action. (The universality of the action can also be proven using the classification of elements of AutpSq described in [DHS15].) Another immediate consequence of the above remark is the following, which for hierarchically hyperbolic groups strengthens a result obtained by combining Osin [Osi16, Theorem ACYLINDRICAL ACTIONS AND STABILITY IN HHG 17 1.2.(L4)] and Sisto [Sis16, Theorem 1], which together prove that a generalized loxodromic element in an acylindrically hyperbolic group is quasi-geodesically stable. Corollary 5.6. Let pG, Sq be a hierarchically hyperbolic group. An element g P G is generalized loxodromic if and only if xgy is contracting in Γ. The next result provides information about the partial ordering of acylindrical actions. Of the groups listed below, the largest and universal acylindrical action of the class of CAT(0) cubical groups is new; the other cases were recently established to be largest in [ABO16]. Corollary 5.7. The following groups admit acylindrical actions that are largest (and therefore universal): (1) Hyperbolic groups and their subgroups (2) Mapping class groups (3) Fundamental groups of three manifolds with no Nil or Sol in their prime decomposition (4) Groups that act properly and cocompactly on a proper CAT(0) cube complex. This includes right angled-Artin groups and right-angled Coxeter groups. Proof. With the exception of p3q the above are all hierarchically hyperbolic groups [BHS17b, BHS15, HS16] and therefore have the bounded domain dichotomy. If G is the fundamental group of a three-manifold with no Nil or Sol in its prime decomposition, then while G is not always a hierarchically hyperbolic group, it has a hierarchically hyperbolic structure pX , Sq such that X is the Cayley graph of G and G ă AutpSq. Additionally, all of the associated hyperbolic spaces are infinite, and therefore pX , Sq has the bounded domain dichotomy. By Theorem 3.5, the above groups each have clean containers, so the result follows. l We give an explicit description of these actions for each hierarchically hyperbolic group in the corollary, in the sense that we describe the set W of domains which are removed from the standard hierarchical structure of the group. Recall that the space TS is constructed from X by coning off all elements of T “ SzW. (1) Hyperbolic groups (and their subgroups) have a canonical simplest hierarchically hyperbolic group structure given by taking S “ tSu, where CS is the Cayley graph of the group with respect to a finite generating set. For this structure, W “ H, and the action on the Cayley graph is clearly a universal acylindrical action. (2) For mapping class groups, the natural hierarchically hyperbolic group structure is S is the set of stabilizers of simple closed curves on the surface and a maximal element S, where CS is the curve complex. For this structure, W “ H, and the action on the curve complex is universal. Universality of this action was shown by Osin in [Osi16], and follows from results of Masur-Minsky and Bowditch [Bow08, MM99]. (3) If M is a 3–manifold with no Nil or Sol in its prime decomposition and G “ π1 M , then W is exactly the set of vertex groups in the prime decomposition that are fundamental groups of hyperbolic 3–manifolds (each of which has exactly one domain in its hierarchically hyperbolic structure). (4) If G is a group that acts properly and cocompactly on a CAT(0) cube complex X, then by [HS16], X has a G–equivariant factor system. This factor system gives a hierarchically hyperbolic group structure in which S is the closure under projection of the set of hyperplanes along with a maximal element S, where CS is the contact graph as defined in [Hag14]. In this structure, W is the set of indices whose stabilizer in G contains a power of a rank one element. In the particular case of right-angled Artin groups, no power of a rank one element will stabilize a hyperplane, so W “ H. In this case, the contact graph CS is quasi-isometric to the extension graph defined by [KK14]. That the action on the extension graph is a ACYLINDRICAL ACTIONS AND STABILITY IN HHG 18 universal acylindrical action follows from the work of [KK14] and the centralizer theorem for right-angled Artin groups. This action is also shown to be largest in [ABO16]. We give a concrete example of the situation in the case of a right-angled Coxeter group. Example 5.8. Let G be the right-angled Coxeter group whose defining graph is a pentagon. Then G “ xa, b, c, d, e | ra, bs, rb, cs, rc, ds, rd, es, ra, esy, and the Cayley graph of G is the tiling of the hyperbolic plane by pentagons. We consider the dual square complex to this tiling. To form the contact graph CS, we start with the square complex and cone off each hyperplane carrier, which is equivalent to coning off the hyperplane stabilizers in the Cayley graph. The result is a quasi-tree. Thus a fundamental domain for the hierarchically hyperbolic group structure of G is tUa , Ub , Uc , Ud , Ue , Su where Uv is associated to the stabilizer of the hyperplane labeled by v and S is associated to the contact graph described above. Consider the hyperplane Jb that is labeled by b. Then the stabilizer of Jb is the link of the vertex b, which contains the infinite order element ac. As G is a hyperbolic group, all infinite order elements are generalized loxodromic, but ac is not loxodromic for the action on the contact graph since its axis lies in a hyperplane stabilizer that has been coned-off. Thus the action on the contact graph is not universal. Let Ub P S be the element associated to StabpJb q. Then StabpJb q “ xa, b, c | ra, bs, rb, csy » D8 ˆ Z{2Z » FUb ˆ EUb is a product region, and the maximal orthogonal component EUb is bounded. Thus Ub P W, as is Uv , for each vertex v of the defining graph. The contact graph associated to pFUb , SUb q is a line, and the element ab is loxodromic for the action on this space. Note that once W has been removed from S, the resulting hierarchically hyperbolic structure is pG, tSuq, the canonical hierarchically hyperbolic structure for a hyperbolic group, in which CS “ ΓpG, ta, b, c, d, euq. 6. Characterizing stability In this section, we will give several characterizations of stability which hold in any hierarchically hyperbolic group. In fact, we will characterize stable embeddings of geodesic metric spaces into hierarchically hyperbolic spaces with unbounded products. One consequence of this will be a description of points in the Morse boundary of a proper geodesic hierarchically hyperbolic space with unbounded products as the subset of the hierarchically hyperbolic boundary consisting of points with bounded projections. 6.1. Stability. While it is well-known that contracting implies stability [Beh06, DMS10, MM99], the converse is not true in general. Nonetheless, in several important classes of spaces the converse holds, including in hyperbolic spaces, CAT(0) spaces, the mapping class group, and Teichmüller space [Sul14, Beh06, DT15, Min96]. We record the following relation between stability and contracting subsets which holds in a fairly general context: Corollary 6.1. If pX , Sq has unbounded products and Y Ă X , then Y is N –stable if and only if Y is D–contracting, where N and D determine each other. Proof. Lemma 4.3 shows that contracting implies stable (the assumption on unbounded products is not necessary for this implication). For the other direction, the fact that X has unbounded products implies that Y has bounded projections, since otherwise one could find large segments of quasigeodesics contained inside direct products, contradicting stability. The result now follows from Theorem 4.4. l The following provides a general characterization of stability: ACYLINDRICAL ACTIONS AND STABILITY IN HHG 19 Corollary 6.2. Let i : Y Ñ X be map from a metric space into a hierarchically hyperbolic space pX , Sq with unbounded products. The following are equivalent: (1) i is a stable embedding; (2) ipYq is undistorted and has uniformly bounded projections; (3) πS ˝ i : Y Ñ CS is a quasi-isometric embedding. Proof. Items (1) and (2) are equivalent via Corollary 6.1. Equivalence of (2) and (3) follows from the distance formula and the assumption that i is a quasi-isometric embedding. l 6.2. The Morse boundary. In the rest of this section, we turn to studying the Morse boundary and use this to give a bound on the stable asymptotic dimension of a hierarchically hyperbolic space. We begin by describing two notions of boundary. In [DHS15], Durham, Hagen, and Sisto introduced a boundary for any hierarchically hyperbolic space. We collect the relevant properties we need in the following theorem: Theorem 6.3 (Theorem 3.4 and Proposition 5.8 in [DHS15]). If pX , Sq is a proper hierarchically hyperbolic space, then there exists a topological space BX such that BX Y X “ X compactifies X , and the action of AutpX , Sq on X extends continuously to an action on X . Moreover, if Y is a hierarchically quasiconvex subspace of X , then, with respect to the induced hierarchically hyperbolic structure on Y, the limit set of ΛY of Y in BX is homeomorphic to BY and the inclusion map i : Y Ñ X extends continuously an embedding Bi : BY Ñ BX . Building on ideas in [CS15], Cordes introduced the Morse boundary of a proper geodesic metric space [Cor15], which was then refined further by Cordes–Hume in [CH16]. The Morse boundary is a stratified boundary which encodes the asymptotic classes of Morse geodesic rays based at a common point. Importantly, it is a quasi-isometry invariant and generalizes the Gromov boundary of a hyperbolic space [Cor15]. We briefly discuss the construction of the Morse boundary and refer the reader to [Cor15, CH16] for details. Consider a a proper geodesic metric space X with a basepoint e P X. Given a stability pN q gauge N : R2ě0 Ñ Rě0 , define a subset Xe Ă X to be the collection of points y P X pN q such that e and y can be connected by an N –stable geodesic in X. Each such Xe is δN – hyperbolic for some δN ą 0 depending on N and X [CH16, Proposition 3.2]; here, we use pN q the Gromov product definition of hyperbolicity, as Xe need not be connected. Moreover, pN q any stable subset of X embeds in Xe for some N [CH16, Theorem A.V]. The set of stability gauges admits a partial order: N1 ă N2 if and only if N1 pK, Cq ă pN q pN q N2 pK, Cq for all constants K, C. In particular, if N1 ă N2 , then Xe 1 Ă Xe 2 . pN q pN q Since each Xe is Gromov hyperbolic, each admits a Gromov boundary BXe . Take the direct limit with respect to this partial order to obtain a topological space Bs X called the Morse boundary of X. We fix pX , Sq, a hierarchically hyperbolic structure with unbounded products. Definition 6.4. We say λ P BX has bounded projections if for any e P X , there exists D ą 0 such that any R–hierarchy path re, λs has D–bounded projections. Let Bc X denote the set of points λ P BX with bounded projections. The boundary BX contains BCU for each U P S, by construction. The next lemma shows that the boundary points with bounded projections are contained in BCS, as a subset of BX , where S is the Ď–maximal element. In general, the set of cobounded boundary points may be a very small subset of BCS. For instance, in the boundary of the Teichmüller metric, these points are a proper subset of the uniquely ergodic ending laminations and have measure zero with respect to any hitting measure of a random walk on the mapping class group. ACYLINDRICAL ACTIONS AND STABILITY IN HHG 20 Lemma 6.5. The inclusion Bc X Ă BCS holds for any pX , Sq with unbounded products where S is the Ď–maximal element of S. Moreover, if X is also proper, then for any D ą 0 there exists D 1 ą 0 depending only on D and pX , Sq such that if pxn q Ă X is a sequence with xn Ñ λ P BX such that re, xn s has D–bounded projections for some e P X and each n, then re, λs has D 1 –bounded projections. Proof. Let λ P Bc X . If re, λs is an R–hierarchy path, then re, λs has an infinite diameter projection to some CU , see, e.g., [DHS15, Lemma 3.3]. As λ has bounded projections, we must have U “ S. Since πS pre, λsq Ă CS is a quasigeodesic ray, the first statement follows. Now suppose that X is also proper. For each n, let γn “ re, xn s be any R–hierarchy path between e and xn in X . The Arzela-Ascoli theorem implies that after passing to a subsequence, γn converges uniformly on compact sets to some R1 –hierarchy path γ with R1 depending only on R and pX , Sq. Hence γ has D 1 –bounded projections for some D 1 depending only on D and pX , Sq. Moreover, since xn Ñ λ in CS, it follows that πS pγq is asymptotic to λ in CS. If re, λs is any other R1 –hierarchy path, it follows from uniform hyperbolicity of the CU and the definition of hierarchy paths that dHaus pγ, re, λsq is uniformly bounded for all U P S. U Since γ has D 1 –bounded projections, the distance formula implies that re, λs has D 2 –bounded projections for some D 2 depending only on D and pX , Sq, as required. l 6.3. Bounds on stable asymptotic dimension. The asymptotic dimension of a metric space is a coarse notion of topological dimension which is invariant under quasi-isometry. Introduced by Cordes–Hume [CH16], the stable asymptotic dimension of a metric space X is the maximal asymptotic dimension a stable subspace of X. The stable asymptotic dimension of a metric space X is always bounded above by its asymptotic dimension. Behrstock, Hagen, and Sisto, [BHS17a] proved that all proper hierarchically hyperbolic spaces have finite asymptotic dimension (and thus have finite stable asymptotic dimension, as well). The bounds on asymptotic dimension obtained in [BHS17a] are functions of the asymptotic dimension of the top level curve graph. In the following theorem, we prove that a hierarchically hyperbolic space pX , Sq has finite stable asymptotic dimension under the assumption that asdimpCSq ă 8. Recall that asymptotic dimension is monotonic under taking subsets. Thus, if X is assumed to be proper, so that asdimpCSq ă 8, then X (and therefore the stable subsets) have finite asymptotic dimension by [BHS17a]. Here, using some geometry of stable subsets we obtain a sharper bound on asdims pX q than asdimpX q. Theorem 6.6. Let pX , Sq be a hierarchically hyperbolic space with unbounded products such that CS has finite asymptotic dimension. Then asdims pX q ď asdimpCSq. Moreover, if X is also proper and geodesic, then there exists a continuous bijection pi : Bs X Ñ Bc X . pN q Proof. By [CH16, Lemma 3.6], for any stability gauge N there exists N 1 such that Xe is pN q N 1 –stable. Hence, there exists D 1 ą 0 depending only on N 1 and pX , Sq such that Xe is pN q D 1 –cobounded. By Corollary 6.2, it follows that the projection πS : Xe Ñ CS is a quasiisometric embedding with constants depending only on D 1 and pX , Sq. Since every stable pN q subset of X embeds into some Xe [CH16, Theorem A.V], the first conclusion then follows from the definition of stable asymptotic dimension. Now suppose that X is proper. pN q Since each Xe is stable in X , these sets have bounded projections by Corollary 6.2; from pN q this it follows that Xe is hierarchically quasiconvex for each N . Hence by [DHS15, ProposipN q pN q tion 5.8], the canonical embedding ipN q : Xe ãÑ X extends to an embedding pipN q : BXe ãÑ BX . ACYLINDRICAL ACTIONS AND STABILITY IN HHG 21 ¯ ´ pN q Ă Bc X Ă BCS. Let pi : Bs X Ñ Bc X By Corollary 6.2 and Lemma 6.5, we have pipN q BXe be the direct limit of the pipN q . Since it is injective on each stratum, pi is injective. To prove surjectivity, let λ P Bc X . Let e P X and fix a hierarchy path re, λs. Since λ P Bc X , re, λs has D–bounded projections for some D ą 0. Let xn P re, λs be such that xn Ñ λ in X . If re, xn s is a sequence of geodesics between e and xn , then, by properness, the Arzela–Ascoli theorem, and passing to a subsequence if necessary, there exists a geodesic ray γ : r0, 8q Ñ X with γp0q “ e such that re, xn s converges on compact sets to γ. Since each re, xn s has D–bounded projections, it follows that γ has D 1 –bounded projections for some D 1 depending only on D and pX , Sq. Moreover, by hyperbolicity of CS and the construction of γ we have that dHaus CS pπS pγq, re, λsq is uniformly bounded and thus, by the distance formula, Haus so is dX pγ, re, λsq. Since rpxn qs “ rγs by construction, it follows that pipγq “ λ, as required. Continuity of pipN q for each N follows from [DHS15, Proposition 5.8], as above. This and the definition of the direct limit topology implies continuity of pi. l The following corollary is immediate: Corollary 6.7. If G is a hierarchically hyperbolic group with clean containers, then G has finite stable asymptotic dimension. 6.4. Random subgroups. Let G be any countable group and µ a probability measure on G whose support generates a non-elementary semigroup. A k–generated random subgroup of G, denoted Γpnq is defined to be the subgroup xwn1 , wn2 , . . . , wnk y Ă G generated by the nth step of k independent random walks on G, where k P N. For other recent results on the geometry of random subgroups of acylindrically hyperbolic groups, see [MS17]. Following Taylor-Tiozzo [TT16], we say a k–generated random of G has a property P if PrΓpnq has Ps Ñ 1 as n Ñ 8. Theorem 6.8. Let pX , Sq be a HHS for which the Ď–maximal element, S, has CS infinite diameter, and consider G ă AutpX , Sq which acts properly and cocompactly on X . Then any k–generated random subgroup of G stably embeds in X . Proof. By [BHS17b, Theorem K], G acts acylindrically on CS. Let Γpnq be generated by k–random independent walks as above. Now, [TT16, Theorem 1.2] implies that Γpnq a.a.s. quasi-isometrically embeds into CS, and hence any orbit of Γpnq in X has bounded projections. By Theorem 4.4, having bounded projections implies contracting; thus any orbit of Γpnq in X is a.a.s. contracting, which gives the conclusion. l In particular, one consequence is a new proof of the following result of Maher–Sisto. This result follows from the above, together with Rank Rigidity for HHG (i.e, [DHS15, Theorem 9.14]) which implies that a hierarchically hyperbolic group which is not a direct product of two infinite groups has CS infinite diameter. Corollary 6.9 (Maher–Sisto; [MS17]). If G is a hierarchically hyperbolic group which is not the direct product of two infinite groups, then any k–generated random subgroup of G is stable. 7. Almost hierarchically hyperbolic spaces While many hierarchically hyperbolic groups of interest have clean containers (see Proposition 3.5), groups exist that do not. In this section, we explain a trick which allows us to generalize the results of the previous sections to remove the clean containers hypothesis. In the case of a hierarchically hyperbolic group pG, Sq without clean containers, the construction in Theorem 3.11 yields a structure which is not a hierarchically hyperbolic space. However, the only aspect of the definition of a hierarchically hyperbolic space that may fail ACYLINDRICAL ACTIONS AND STABILITY IN HHG 22 to hold is part of the orthogonality axiom, Definition 2.1.(3). Indeed, given T P T and some U P TT for which tV P TT | V K U u ‰ H, the container W P ST ´ tT u provided by the structure pX , Sq may not be an element of T. In particular, it is possible that EW is bounded. We introduce the notion of an almost hierarchically hyperbolic space, and use it to show that such spaces satisfy many of the same properties as hierarchically hyperbolic spaces. The following is a weaker version of the orthogonality axiom: p31 q (Bounded pairwise orthogonality) T has a symmetric and anti-reflexive relation called orthogonality: we write V K W when V, W are orthogonal. Also, whenever V Ď W and W K U , we require that V K W . Moreover, if V K W , then V, W are not Ď–comparable. Finally, the cardinality of any collection of pairwise orthogonal domains is uniformly bounded by ξ. By [BHS15, Lemma 2.1], the orthogonality axiom (Definition 2.1, (3)) for an hierarchically hyperbolic structure implies axiom p31 q. However, the converse does not hold; that is, the last condition of p31 q does not imply the container statement in (3), and thus this is a strictly weaker assumption. However, it suffices for the applications in this paper. Definition 7.1 (Almost HHS). If pX , Sq satisfies all axioms of a hierarchically hyperbolic space except (3) and additionally satisfies axiom p31 q, then pX , Sq is an almost hierarchically hyperbolic space. Theorem 7.2. Given a hierarchically hyperbolic space pX , Sq with the bounded domain dichotomy, there exists an almost hierarchically hyperbolic structure pX , Tq on X with unbounded products satisfying the following properties: (1) (Distance formula) There exists s0 such that for all x ě x0 there exist constants K, C such that for all x, y P X , ÿ dX px, yq —pK,Cq ttdW px, yquus . W PT (2) (Acylindricity) Let G ď AutpX , Tq act properly and cocompactly on X and let S be the unique Ď–maximal element of T. Then G acts acylindrically on the hyperbolic space TS associated with S. (3) (Realization) For each κ ě 1 there exist θe , θu ě 0 such that the following holds. ś Let ~b P W PT 2TW be κ–consistent; for each W , let bW denote the TW –coordinate of ~b. Then there exists x P X such that dW pbw , πW pxqq ď θe for all W P T. Moreover, x is coarsely unique in the sense that the set of all x which satisfy dW pbW , πW pxqq ď θe in each W P T has diameter at most θu . (4) (Hierarchy paths) There exists D0 such that any x, y P X are joined by a D0 – hierarchy path. (5) (Gate maps) If Y Ď X is k–hierarchically quasiconvex and non-empty, then there exists a gate map for Y, i.e., for each x P X there exists y P Y such that for all W P T, the set πV pyq (uniformly) coarsely coincides with the projection of πV pxq to the kp0q–quasiconvex set πV pYq. (6) (Coarse median structure) The space X is coarse median of rank at most the complexity of pX , Tq. Remark 7.3. In fact, many of the above results hold for all almost hierarchically hyperbolic spaces and do not require the existence of an original hierarchically hyperbolic structure. However, to avoid complicated notation and proofs, we restrict ourselves to this situation. Proof. The new structure pX , Tq is as described in section 3.4.2. All of the axioms of Definition 2.1 except (3) hold as in the proof of Theorem 3.14. Finally, we now show axiom p31 q is ACYLINDRICAL ACTIONS AND STABILITY IN HHG 23 satisfied by this new structure. Indeed, the first three conditions are clear, since T Ď S. For the last condition, any collection of pairwise orthogonal domains in T is also a collections of pairwise orthogonal domains in S, and thus by [BHS15, Lemma 2.2] has uniformly bounded size. Therefore pX , Tq is an almost hierarchically hyperbolic space. That it has unbounded products is clear from the construction. We now prove the properties listed above. (1) The proof of the distance formula from [BHS15, Theorem 4.5] goes through almost verbatim. The only use of the container part of the orthogonality axiom throughout that entire paper is in that proof of [BHS15, Lemma 2.2] which proves that the cardinality of any collection of pairwise orthogonal domains is uniformly bounded by ξ. As we have adopted the conclusion of that result as part of p31 q, the result follows. (2) The original proof of acylindricity in [BHS17b, Theorem 14.3] does not use the orthogonality axiom, only the distance formula, and therefore goes through as written. (3) The proof of realization is more involved, and so we provide it in detail. First, let R “ tU P S | FU is boundedu, and let S1 “ SzR. As R is closed under nesting, by [BHS17a, Proposition 2.4] pX , S1 q is a hierarchically hyperbolic space. Notice that T Ď S1 . We follow the original proof of realization in [BHS15, Theorem 3.1]. Let tVj u be a family of pairwise orthogonal elements of T, all of level at most l. By the last clause of the new orthogonality axiom (Definition 7.1 (31 )), we have |tVj u| ď ξ. Thus, there exists some l1 such that tVj u is a family of pairwise orthogonal elements of S1 , all of level at most l1 . Then Claim 1 of the proof of [BHS15, Theorem 3.1] provides a constant θe “ θe pl1 , κq ą 100Eκα and a collection tUi u of pairwise orthogonal elements of S1 so that: (a) Each Ui is nested into some Vj , (b) For each Vj there exists some Ui nested into it, and (c) Any E–partial realization point x for tUi u satisfies dW pbW , xq ď θe for each W P S1 for which there exists j with W Ď Vj . As Ui P S1 for all i, FUi is unbounded. By (1), it follows that EUi is unbounded for all i, as well, and therefore Ui P T for all i. After possibly increasing the constant, condition (c) still holds for W P T. Therefore, Claim 1 holds for pX , Tq, as well. Now, applying Claim 1 when l “ lS , where S P T is the unique Ď–maximal element, along with the partial realization axiom, completes the proof of existence. If x, y both have the desired property, then dV px, yq ď 2θe ` κ for all V P T, whence the uniqueness axiom ensures that dpx, yq ď θu , for an appropriate θu . (4) The hierarchy paths in the new structure pX , Tq are the same as those in pX , Sq. As T Ă S, all the required properties hold. (5) The definition of a hierarchically quasiconvex subset passes through to the almost hierarchically hyperbolic setting without issue. The proof of the existence of gate maps to hierarchically quasiconvex subsets [BHS15, Lemma 5.4] uses only the existence of hierarchy paths, realization, and consistent centers [BHS15, Lemma 2.6]. The first two are shown to hold for almost hierarchically hyperbolic spaces above, and the proof of consistent centers does not use the orthogonality axiom. Therefore, the proof of the existence of gate maps goes through as written. (6) The proof of [BHS15, Theorem 7.3] relies only on consistent centers and realization, both of which hold in the present setting, as discussed above. l As all hierarchically hyperbolic groups satisfy the bounded domain dichotomy, the following is immediate: ACYLINDRICAL ACTIONS AND STABILITY IN HHG 24 Corollary 7.4. Every hierarchically hyperbolic group admits an almost hierarchically hyperbolic group structure with unbounded products. The results in this paper hold in the more general setting of almost hierarchically hyperbolic spaces, as the proofs only rely on axioms (1)-(2),(31 ),(4)-(9) of a hierarchically hyperbolic space and the consequences listed in Theorem 7.2. However, to avoid complicated statements and notation, we stated the results only in the more restricted context of hierarchically hyperbolic spaces. References [Abb16] [ABO16] [ACGH16] [ADT16] [BBKL16] [Beh06] [BHS15] [BHS17a] [BHS17b] [BHS17c] [Bow08] [CD16] [CH16] [CM17] [Cor15] [CS15] [DGO17] [DHS15] [DMS10] [DT15] [FM02] [Hag14] [Ham] [HS16] [KK14] Carolyn R. Abbott. Not all finitely generated groups have universal acylindrical actions. Proc. Amer. Math. Soc., 144(10):4151–4155, 2016. C. Abbott, S. Balasubramanya, and D. Osin. Hyperbolic structures on groups. 2016. Goulnara N Arzhantseva, Christopher H Cashen, Dominik Gruber, and David Hume. Characterizations of Morse quasi-geodesics via superlinear divergence and sublinear contraction. arXiv:1601.01897, 2016. Tarik Aougab, Matthew Gentry Durham, and Samuel J Taylor. Middle recurrence and pulling back stability. arXiv:1609.06698, 2016. M. Bestvina, K. Bromberg, R.P. Kent, and C.J. Leininger. Undistorted purely pseudo-anosov groups. arXiv:1608.01583, 2016. J. Behrstock. Asymptotic geometry of the mapping class group and Teichmüller space. Geometry & Topology, 10:2001–2056, 2006. Jason Behrstock, Mark F Hagen, and Alessandro Sisto. Hierarchically hyperbolic spaces II: combination theorems and the distance formula. arXiv:1509.00632v2, pages 1–53, 2015. J. Behrstock, M.F. Hagen, and A. Sisto. Asymptotic dimension and small-cancellation for hierarchically hyperbolic spaces and groups. Proc. London Math. Soc., 114(5):890–926, 2017. Jason Behrstock, Mark F Hagen, and Alessandro Sisto. Hierarchically hyperbolic spaces I: curve complexes for cubical groups. Geometry & Topology, 21:1731–1804, 2017. Jason Behrstock, Mark F Hagen, and Alessandro Sisto. Quasiflats in hierarchically hyperbolic spaces. arXiv:1704.04271, 2017. Brian H. Bowditch. Tight geodesics in the curve complex. Inventiones mathematicae, 171(2):281– 300, 2008. Matthew Cordes and Matthew Gentry Durham. Boundary convex cocompactness and stability of subgroups of finitely generated groups. arXiv:1607.08899, 2016. Matthew Cordes and David Hume. Stability and the Morse boundary. To appear in Groups, Geometry, and Dynamics, 2016. Christopher H Cashen and John M Mackay. A metrizable topology on the contracting boundary of a group. arXiv:1703.01482, 2017. Matthew Cordes. Morse boundaries of proper geodesic metric spaces. arXiv:1502.04376, 2015. Ruth Charney and Harold Sultan. Contracting boundaries of CATp0q spaces. J. Topol., 8(1):93– 117, 2015. F. Dahmani, V. Guirardel, and D. Osin. Hyperbolically embedded subgroups and rotating families in groups acting on hyperbolic spaces. Mem. Amer. Math. Soc., 245(1156):v+152, 2017. Matthew Gentry Durham, Mark F. Hagen, and Alessandro Sisto. Boundaries of hierarchically hyperbolic spaces. Geometry & Topology, 2015. To appear. Cornelia Druţu, Shahar Mozes, and Mark Sapir. Divergence in lattices in semisimple Lie groups and graphs of groups. Trans. Amer. Math. Soc., 362(5):2451–2505, 2010. Matthew Gentry Durham and Samuel J. Taylor. Convex cocompactness and stability in mapping class groups. Algebr. Geom. Topol., 15(5):2839–2859, 2015. Benson Farb and Lee Mosher. Convex cocompact subgroups of mapping class groups. Geom. Topol., 6:91–152 (electronic), 2002. Mark F. Hagen. Weak hyperbolicity of cube complexes and quasi-arboreal groups. J. Topol., 7(2):385–418, 2014. U. Hamenstädt. Word hyperbolic extensions of surface groups. Preprint, arXiv:0505244. M.F. Hagen and T. Susse. Hierarchical hyperbolicity of all cubical groups. arXiv:1609.01313, 2016. Sang-Hyun Kim and Thomas Koberda. The geometry of the curve graph of a right-angled Artin group. International Journal of Algebra and Computation, 24(02):121–169, 2014. ACYLINDRICAL ACTIONS AND STABILITY IN HHG [KL08] [KMT14] [Min96] [MM99] [MS17] [Osi16] [Sel97] [Sis16] [Sul14] [Tra] [TT16] 25 Richard P. Kent, IV and Christopher J. Leininger. Shadows of mapping class groups: capturing convex cocompactness. Geom. Funct. Anal., 18(4):1270–1325, 2008. Thomas Koberda, Johanna Mangahas, and Samuel J Taylor. The geometry of purely loxodromic subgroups of right-angled Artin groups. arXiv:1412.3663, 2014. Yair N. Minsky. Quasi-projections in Teichmüller space. J. Reine Angew. Math., 473:121–136, 1996. Howard A Masur and Yair N Minsky. Geometry of the complex of curves I: Hyperbolicity. Inventiones mathematicae, 138(1):103–149, 1999. Joseph Maher and Alessandro Sisto. Random subgroups of acylindrically hyperbolic groups and hyperbolic embeddings. arXiv:1701.00253, 2017. D. Osin. Acylindrically hyperbolic groups. Trans. Amer. Math. Soc., 368(2):851–888, 2016. Z. Sela. Acylindrical accessibility for groups. Invent. Math., 129(3):527–565, 1997. Alessandro Sisto. Quasiconvexity of hyperbolically embedded subgroups. Mathematische Zeitschrift, 283:649–658, 2016. Harold Sultan. Hyperbolic quasi-geodesics in CAT(0) spaces. Geom. Dedicata, 169:209–224, 2014. Hung Cong Tran. Purely loxodromic subgroups in right-angled Coxeter groups. arXiv:1703.09032. Samuel J. Taylor and Giulio Tiozzo. Random extensions of free groups and surface groups are hyperbolic. Int. Math. Res. Not. IMRN, (1):294–310, 2016. University of Wisconsin-Madison, Madison, Wisconsin, USA E-mail address: [email protected] Lehman College and The Graduate Center, CUNY, New York, New York, USA E-mail address: [email protected] University of Michigan, Ann Arbor, Michigan, USA E-mail address: [email protected]
4math.GR
CERTAIN CLASSES OF COHEN-MACAULAY MULTIPARTITE GRAPHS arXiv:1803.07880v1 [math.AC] 21 Mar 2018 RAJIV KUMAR AND AJAY KUMAR Abstract. The Cohen-Macaulay property of a graph arising from a poset has been studied by various authors. In this article, we study the Cohen-Macaulay property of a graph arising from a family of reflexive and antisymmetric relations on a set. We use this result to find classes of multipartite graphs which are Cohen-Macaulay. 1. Introduction Graphs and simplicial complexes play an important role in combinatorial commutative algebra. In order to see the relationship between commutative algebra and combinatorics, one can associate monomial ideals to graphs or simplicial complexes. Many authors have studied the connection between the algebraic properties of these ideals and the combinatorial properties of the corresponding combinatorial objects, see [4, Chapter 9]. In this article, our main focus is to study the edge ideal of a graph. A graph is called Cohen-Macaulay if the corresponding edge ideal is Cohen-Macaulay. The Cohen-Macaulay property of graphs has been well studied for various classes. HerzogHibi ([3]) prove that a bipartite graph is Cohen-Macaulay if and only if it is arising from a poset. For a finite poset and r, s ∈ N, Ene-Herzog-Mohammadi ([2]) associated a monomial ideal generated in degree s, to the set of all multichains of length r in a poset, and proved that this ideal is Cohen-Macaulay. Note that if s = 2, then these ideals are edge ideals of some r-partite graphs. Motivated by these results, we associate a monomial ideal to a family of posets, and find a class of Cohen-Macaulay r-partite graphs. Our main tool in this article is the following well known relationship between the StanleyReisner ideal and its Alexander dual: The Stanley-Reisner ideal is Cohen-Macaulay if and only if its Alexander dual has a linear resolution. For more details see [1, Theorem 3]. This paper has been organized in the following manner. In Section 2, we introduce the basic notions which are used throughout the article, more details can be found in [4]. In Section 3, we associate a monomial ideal Hr (P) to a family P of partial order relations on a finite set. In Lemma 3.3, we prove that monomial ideal Hr (P) has a linear resolution. This forces the Alexander dual of Hr (P) to be Cohen-Macaulay. Section 4 is devoted to finding the classes of Cohen-Macaulay r-partite graphs. In Theorem 4.4, we see that the Alexander dual of Hr (P) is an edge ideal of an r-partite graph associated to a family of reflexive and antisymmetric relations on a given set. Using this we find classes of Cohen-Macaulay graphs which are recorded in Theorems 4.7 and 4.10. 2. Preliminaries 2.1. Notation. The following notation is used throughout the article. Date: March 22, 2018. 2010 Mathematics Subject Classification. 05E40, 13C14, 13D02. Key words and phrases. Posets, Multipartite Graphs, Cohen-Macaulay Graphs, Linear Resolutions. 1 2 R. KUMAR AND A. KUMAR i) For n ∈ N, we denote [n] = {1, . . . , n}. ii) By Pa , we mean that the set P with partial relation ≤a . iii) Let S = k[X1 , . . . , Xn ] be a polynomial ring with deg(Xi ) = 1, where k is a field. Then by S(−j), we mean a graded free S-module of rank 1 with S(−j)n = Sn−j . iv) Let M and N be graded S-modules. Then a homomorphism φ : M −→ N is called a graded homomorphism if φ(Mn ) ⊂ Nn . 2.2. Graphs and Edge Ideals. Definition 2.1. i) A graph G = (V, E) is an ordered pair, where V is the set of vertices of G and E is a collection of subsets of V of cardinality 2. ii) An element of E is called an edge of G. For all i, j ∈ V , we say that i is adjacent to j if and only if {i, j} ∈ E. iii) For an integer r ≥ 2, a graph G is called an r-partite if there exists a partition of V = V1 ∪ · · · ∪ Vr such that for all 1 ≤ k ≤ r and i, j ∈ Vk implies that i is not adjacent to j. If r = 2, we say that G is a bipartite graph. A bipartite graph on vertex set V = V1 ∪ V2 is called a complete bipartite graph if i and j are adjacent for all i ∈ V1 and j ∈ V2 . iv) Let G be a graph on a vertex set V and W ⊂ V . Then a graph H is called a induced subgraph of G on W if for i, j ∈ W , i and j are adjacent in H if and only if so in G. v) Let S = k[X1 , . . . , Xn ] be a polynomial ring over k and G be a graph on a vertex set V = [n]. Then the monomial ideal I(G) = hXi Xj : {i, j} ∈ Ei is called the edge ideal of G. A graph G is called Cohen-Macaulay if S/I(G) is Cohen-Macaulay. 2.3. Simplicial Complexes. Definition 2.2. For fixed n ∈ N, let V = [n]. i) A simplicial complex on V , denoted by ∆ or ∆V , is a collection of subsets of V with the following properties: a) φ ∈ ∆ and {i} ∈ ∆ for all i ∈ V . b) If F ∈ ∆ and G ⊂ F , then G ∈ ∆. ii) An element of ∆ is called a face of ∆, and a maximal face with respect to inclusion is called a facet. iii) A subset F ⊂ V is called a nonface of ∆ if F ∈ / ∆, and it is called a minimal nonface if it is minimal with respect to inclusion. iv) The Alexander dual of ∆, denoted by ∆∨ , is defined as ∆∨ = {V \ F : F is a nonface of ∆}. v) Let ∆ be a simplicial complex on [n] and S = k[X1 , . . . , Xn ]. The Stanley-Reisner ideal of ∆ is the squarefree monomial ideal, denote as I∆ , is defined as follows: I∆ = hXi1 · · · Xir : {i1 , . . . , ir } is a minimal nonface of ∆i . Further, let ∆∨ be the Alexander dual of ∆. Then we say that I∆∨ is the Alexander dual ∨ of I∆ , and denote it by I∆ . CERTAIN CLASSES OF COHEN-MACAULAY MULTIPARTITE GRAPHS 3 2.4. Free Resolution. Let S = k[X1 , . . . , Xn ] and I be a homogeneous ideal of S. Then a free resolution of I over S is an exact sequence φn F• : · · · −→ Fn −→ Fn−1 −→ · · · −→ F0 −→ I −→ 0 such that for each i ≥ 0, Fi is a graded free S-module and φi is a graded homomorphism. Further, if I is generated in degree d and Fi ' S(−d − i)βi for some βi ∈ N and for all i, then we say that I has a linear resolution. 3. Linear Resolution In this section, we associate a monomial ideal Hr (P) to a family of posets P, and we show that this ideal has a linear resolution. Definition 3.1. Let (P, ≤) be a finite partial ordered set. A subset I ⊂ P is called a poset ideal if for all p ∈ I and q ∈ P with q ≤ p implies that q ∈ I. For a given set P = {p1 , . . . , pn } and an integer r ≥ 2, we consider a family of partial ordered relations P = {≤a : a ∈ [r − 1]} on P . For the sake of simplicity, we denote (P, ≤a ) by Pa . Let J(Pa ) denotes the set of poset ideals of Pa . Now corresponding to a family P, we define a set Kr (P) = {I = (I1 , I2 , . . . , Ir−1 ) : Ia ∈ J(Pa ) ∀ a ∈ [r − 1] and Ir−1 ⊂ · · · ⊂ I1 }, with a partial order ≺ given by J ≺ I if and only if Ja ⊂ Ia ∀ a. Let S = k[X1 , X2 , . . . , Xr ], where Xa = {Xa,1 , . . . , Xa,n } for all a ∈ [r]. For I ∈ Kr (P), we associate a squarefree monomial   Y Y Xa,i Xa+1,i  for all 1 ≤ a ≤ r − 1. uI = uI1 uI2 · · · uIr−1 , where uIa =  pi ∈Ia pi ∈Pa \Ia Let Hr (P) = {uI }I∈Kr (P) be the squarefree monomial ideal of the polynomial ring S, generated by monomials uI , where I ∈ Kr (P). Example 3.2. Let P = {p1 , p2 , p3 } and r = 3. Suppose we have the following partial order relations on P : p3 p2 p1 p2 p3 p1 (P, ≤1 ) (P, ≤2 ) Then the collection of poset ideals of P1 is J(P1 ) = {∅, {p1 }, {p2 }, {p1 , p2 }, {p2 , p3 }, P } and, of P2 is J(P2 ) = {∅, {p1 }, {p3 }, {p1 , p2 }, {p1 , p3 }, P }. Also, We see that    (φ, φ), ({p1 }, φ), ({p1 }, {p1 }), ({p2 }, φ), ({p1 , p2 }, φ),  ({p1 , p2 }, {p1 }), ({p1 , p2 }, {p1 , p2 }), ({p2 , p3 }, φ), ({p2 , p3 }, {p3 }), , K3 (P) =  (P, φ), (P, {p }), (P, {p }), (P, {p , p }), (P, {p , p }), (P, P )}  1 3 1 2 1 3 4 R. KUMAR AND A. KUMAR and hence H3 (P) is generated by the following set of squarefree monomials   X2,1 X2,2 X2,3 X3,1 X3,2 X3,3 , X1,1 X2,2 X2,3 X3,1 X3,2 X3,3 , X1,1 X2,1 X2,2 X2,3 X3,2 X3,3 ,     X1,2 X2,1 X2,3 X3,1 X3,2 , X3,3 , X1,1 X1,2 X2,3 X3,1 X3,2 X3,3 , X1,1 X1,2 X2,1 X2,3 X3,2 X3,3 , X1,1 X1,2 X2,1 X2,2 X2,3 X3,3 , X1,2 X1,3 X2,1 X3,1 X3,2 X3,3 , , X1,2 X1,3 X2,1 X2,3 X3,1 X3,2   X1,1 X1,2 X1,3 X3,1 X3,2 X3,3 , X1,1 X1,2 X1,3 X2,1 X3,2 X3,3 , X1,1 X1,2 X1,3 X2,3 X3,1 X3,2 ,    X X X X X X ,X X X X X X ,X X X X X X 1,1 1,2 1,3 2,1 2,2 3,3 1,1 1,2 1,3 2,1 2,3 3,2 1,1 1,2 1,3 2,1 2,2 2,3            in the polynomial ring k[Xa,i , 1 ≤ a, i ≤ 3]. Note that For r = 2, Herzog-Hibi ([3]) proved that the ideal H2 (P) has a linear resolution. In fact, if all partial order relations ≤a are same for a ∈ [r −1], then Ene-Herzog-Mohammadi ([2]) studied the ideal Hr (P), and proved that it has a linear resolution. More generally, in Proposition 3.4, we prove that Hr (P) has a linear resolution. Let G(Hr (P)) denotes the minimal set of monomial generators of the monomial ideal Hr (P). Define a partial order on G(Hr (P)) by uJ ≺ uI if J ≺ I. We fix a total order ≺0 on G(Hr (P)), which extends the partial order ≺. For more details see [5, Theorem 1.1]. In order to prove that Hr (P) has a linear resolution, we use the following remark. Remark 3.3. Let I be a monomial ideal with monomial generators u1 , . . . , um of I. Suppose for all j < i, there exists an integer k < i and an integer l such that uk uj = Xl and Xl divides . gcd(uk , ui ) gcd(uj , ui ) Then, by [4, Theorem 8.2.1 and Lemma 8.2.3] I has a linear resolution. Proposition 3.4. The squarefree monomial ideal Hr (P) has a linear resolution. Proof. Let J ≺0 I with J = (J1 , J2 , . . . , Jr−1 ) , I = (I1 , I2 , . . . , Ir−1 ) . For a ∈ [r − 1], define 0 ). Since Ja0 ⊂ Ia for a ∈ [r − 1], we have J0 ≺ I. Ja0 = Ja ∩ Ia and J0 = (J10 , . . . , Jr−1 Then take a = max{q : Jq0 ( Iq }. Since Ja0 ( Ia are poset ideals of Pa , there exists a pi ∈ Ia \ Ja0 such that pi is a maximal element in Ia . This forces that δa = Ia \ {pi } is a poset uI Xa+1,i u δa ideal of Pa . This gives us uδa = a . which implies that Xa+1,i = Xa,i gcd(uδa , uIa ) Our claim is K = (I1 , I2 , . . . , Ia−1 , δa , Ia+1 , . . . , Ir−1 ) ∈ Kr (P). Since δa ( Ia , to prove the 0 claim it is enough to prove that Ia+1 ⊂ δa . The fact that Ja+1 ⊂ Ja0 and pi ∈ / Ja0 implies that 0 0 pi ∈ / Ja+1 , and by choice of a, we know that Ja+1 = Ia+1 . The claim follows from the fact that δa = Ia \ pi . 0 Since we know that pi ∈ Ia and pi ∈ / Ja+1 = Ia+1 , we get Xa+1,i does not divide uI . Now, 0 pi ∈ / Ja and pi ∈ Ia and hence pi ∈ / Ja . This forces that Xa+1,i divides uJa , and hence we get uJ Xa+1,i divides . gcd(uJ , uI ) uK u δa Finally, from the definition of K, we get = = Xa+1,i , and hence gcd(uI , uK ) gcd(uIa , uδa ) the proof follows from Remark 3.3.  4. Cohen Macaulay Multipartite Graphs For a ∈ [r − 1] and P = {p1 , p2 , . . . , pn }, let ≤a be a partial order relation on P such that if pi ≤a pj , then we have i ≤ j. In this case, we prove that the Alexander dual of Hr (P) is the edge ideal of some r-partite graph. Using this we identify two classes of Cohen-Macaulay CERTAIN CLASSES OF COHEN-MACAULAY MULTIPARTITE GRAPHS 5 graphs. In order to find Hr (P)∨ , we define the following relation on P : For 1 ≤ a ≤ b ≤ r −1, we define a relation ≤[a,b] on P as follows: pi ≤[a,b] pj if there exists a non-decreasing sequence (t1 , t2 , . . . , tk ) such that pi ≤a pt1 ≤a+1 · · · ≤b−1 ptk ≤b pj . Example 4.1. Let ≤1 and ≤2 be partial order relations on a set P = {p1 , p2 , p3 } as defined in the Example 3.2. Then the relation ≤[1,2] on P is shown as in the following diagram. p2 p3 p1 p2 (P, ≤[1,2] ) For a simplicity, we denote P[a,b] = (P, ≤[a,b] ). Since ≤a is a reflexive relation on P for all a ∈ [r − 1], by definition of ≤[a,b] it follows that so is ≤[a,b] . Further, the relation ≤[a,b] on P is antisymmetric follows from the fact that if pi ≤a pj , then we have i ≤ j. In Example 4.1 observe that ≤[1,2] is not a transitive relation on P , and hence P[a,b] need not be a poset. Definition 4.2. i) Let u be a monomial in S. Then support of u, denoted by supp(u), is defined as supp(u) = {Xa,i : Xa,i divides u}. ii) Let V = r S Va , where Va = {Xa,1 , . . . , Xa,n }. For F ⊂ V , define FXa = {X1,i : Xa,i ∈ F } a=1 for a ≤ r. F , iii) For F ⊂ V , we set γrF = φ. For 2 ≤ a ≤ r, we define a poset ideal, denoted as γa−1 F F F generated by {pi : X1,i ∈ FXa } ∪ γa in Pa−1 . Note that γa+1 ⊂ γa for all a ∈ [r − 1], so F ) ∈ Kr (P). we denote γ F = (γ1F , . . . , γr−1 Lemma 4.3. Let pi ∈ γaF for some a ∈ [r − 1]. Then there exists pj such that X1,j ∈ FXb for some a + 1 ≤ b ≤ r with pi ≤[a,b−1] pj . Proof. Since pi ∈ γaF , there exists a maximal element pj ∈ γaF with pi ≤a pj . Now by F definition of γaF , it follows that either X1,j ∈ FXa+1 or pj ∈ γa+1 . If X1,j ∈ FXa+1 , then we F are through. Otherwise there exists a maximal element pk ∈ γa+1 with pj ≤a+1 pk . Again we F have either X1,k ∈ FXa+2 or pk ∈ γa+2 . Thus, we repeat this procedure till we get the desired result.  Theorem 4.4. The monomial ideal Hr (P)∨ is minimally generated by the squarefree monomials of type Xs,i Xt,j , 1 ≤ s < t ≤ r if and only if pi ≤[s,t−1] pj . Proof. Let V = r S Va be a vertex set and ∆P be a simplicial complex on V such that a=1 I∆P = Hr (P). Set w to be the product of all variables. By the definition of ∆∨P , facets of ∆∨P are given by supp(w/uI ), where I ∈ Kr (P). Now, by definition of uI , it follows that Xa,i divides uI if and only if pi ∈ / Ia−1 or pi ∈ Ia . Also, we know that (supp(w/uI ))Xa = {X1,i : Xa,i does not divide uI }, 6 R. KUMAR AND A. KUMAR and hence, we get (supp(w/uI ))Xa = {X1,i : pi ∈ Ia−1 \ Ia }. Let F ⊂ V be a face of ∆∨P . Since facets of ∆∨P are given by supp(w/uI ) for some I ∈ Kr (P), there exists I ∈ Kr (P) such that F ⊂ supp(w/uI ). In particular, for a ∈ [r], we have FXa ⊂ (supp(w/uI ))Xa . First, assume that pi ≤[a,b−1] pj , where 1 ≤ a < b ≤ r. Then our claim is that the set F = {Xa,i , Xb,j } is a minimal non-face of ∆∨P . Note that since |F | = 2, it is enough to prove that F is a non-face of ∆∨P . Let I ∈ Kr (P). If pj ∈ / Ib−1 \ Ib , then Xb,j divides uI , and hence Xb,j ∈ / supp(w/uI ). This forces that FXb 6⊂ (supp(w/uI ))Xb . Otherwise, we claim that FXa 6⊂ (supp(w/uI ))Xa , and hence by the claim F is a non-face. In order to prove the claim, it is enough to prove that pi ∈ Ia . Proof of claim: Since pi ≤[a,b−1] pj , there exist a non-decreasing sequence (t1 , t2 , . . . , tk ) such that pi ≤a pt1 ≤a+1 · · · ≤b−2 ptk ≤b−1 pj . The fact ptk ≤b−1 pj and Ib−1 is a poset ideal in Pb−1 implies that ptk ∈ Ib−1 . Using Ib−1 ⊂ Ib−2 , we get ptk ∈ Ib−2 . Now, again repeat the process, we get pi ∈ Ia . This proves the claim. Conversely, let F be a minimal nonface of ∆∨P . This gives us the following: for any I ∈ Kr (P ) ∃ a ∈ [r] such that FXa 6⊂ (supp(w/uI ))Xa . (4.1) Case 1 : Suppose FXa 6⊂ (supp(w/uγ F ))Xa for some 2 ≤ a ≤ r. Since we know that F \ γaF }, there exists some X1,i ∈ FXa such that either (supp(w/uγ F ))Xa = {X1,i : pi ∈ γa−1 F F F F , , we see that pi ∈ γa−1 pi ∈ / γa−1 or pi ∈ γa . Also, note that X1,i ∈ FXa , by definition of γa−1 F and hence pi ∈ γa . By Lemma 4.3, there exists a pj such that pi ≤[a,b−1] pj with X1,j ∈ FXb for some a + 1 ≤ b ≤ r. Since {Xa,i , Xb,j } is a minimal nonface of ∆∨P . By assumption F is a minimal nonface, and hence we get F = {Xa,i , Xb,j } with pi ≤[a,b−1] pj . Case 2 : FXa ⊂ (supp(w/uγ F ))Xa for 2 ≤ a ≤ r. Since γ F ∈ Kr (P), by Equation (4.1), we get FX1 6⊂ (supp(w/uγ F ))X1 . Thus, there exists pi ∈ γ1F such that X1,i ∈ FX1 . Since pi ∈ / γrF = φ, we can choose 2 ≤ b ≤ r such that b = min{j : pi ∈ / γjF }. Then, we F F F see that pi ∈ γb−1 \ γbF . Let pj ∈ γb−1 \ γbF such that pi ≤b−1 pj . Since pj ∈ γb−1 \ γbF , by Lemma 4.3, there exists some b ≤ c ≤ r such that pj ≤[b,c−1] pk with Xc,k ∈ F . Note that pi ≤[1,c−1] pk and {X1,i , Xc,k } ⊂ F . By assumption F is a minimal nonface of ∆∨P and we know {X1,i , Xc,k } ⊂ F is a nonface, and hence F = {X1,i , Xc,k } with pi ≤[1,c−1] pk .  Let F = {≤[a,b] : 1 ≤ a ≤ b ≤ r − 1} be a family of reflexive and antisymmetric relations on a given set P = {p1 , p2 , . . . , pn }. Now corresponding to F, we associate an r-partite graph r S on a vertex set V = Va such that Xa,i is adjacent to Xb,j if and only if pi ≤[a,b−1] pj . a=1 Example 4.5. Let P = {p1 , p2 , p3 } and F = {≤1 , ≤2 , ≤[1,2] }, where ≤1 , ≤2 , ≤[1,2] are given as in Examples 3.2 and 4.1. We associate a following graph on vertices set V = {Xa,i : a, i ∈ [3]}: CERTAIN CLASSES OF COHEN-MACAULAY MULTIPARTITE GRAPHS X1,1 X1,2 X1,3 X2,1 X2,2 X2,3 7 X3,1 X3,2 X3,3 G Note that by the following corollary G is Cohen-Macaulay. Corollary 4.6. Assume that the above family F have the following properties: i) For a ∈ [r − 1], P[a,a] = Pa is a poset. ii) For 1 ≤ a ≤ b ≤ r − 1, if pi ≤[a,b] pj , then i ≤ j. iii) For 1 ≤ a ≤ b ≤ r − 1, if pi ≤[a,b] pj , then there exists a non-decreasing sequence (t1 , t2 , . . . , tk ) such that pi ≤a pt1 ≤a+1 · · · ≤b−1 ptk ≤b pj . Then an r-partite graph associated to F is Cohen-Macaulay. Proof. We notice that the edge ideal of an r-partite graph associated to a family F is equals to Hr (P)∨ . Since, by Proposition 3.4, the ideal Hr (P) has a linear resolution, the result follows.  Theorem 4.7. Let G be an r-partite graph with partitions Va = {Xa,1 , . . . , Xa,n }, for all a ∈ [r] satisfying the following conditions: i) {Xa,i , Xb,i } is an edge for all i ∈ [n] and 1 ≤ a < b ≤ r; ii) if {Xa,i , Xb,j } is an edge with 1 ≤ a < b ≤ r, then i ≤ j; iii) {Xa,i , Xb,j } is an edge if and only if there exists a non-decreasing sequence (t1 , t2 , . . . , tk ) such that {Xa,i , Xa+1,t1 }, . . . , {Xb−1,tk , Xb,j } are edges of G for 1 ≤ a ≤ b ≤ r and i, j ∈ [n]. iv) if {Xa,i , Xa+1,j } and {Xa,j , Xa+1,k } are edges for a ∈ [r − 1], then {Xa,i , Xa+1,k } is an edge. Then G is Cohen-Macaulay. Proof. Let P = {p1 , p2 , . . . , pn }. Then for each 1 ≤ a < b ≤ r, we define a relation ≤[a,b−1] on P by pi ≤[a,b−1] pj if and only if {Xa,i , Xb,j } is an edge of G. Observe that for all 1 ≤ a < b ≤ r, P[a,b−1] satisfies the hypothesis of Corollary 4.6, and hence G is Cohen-Macaulay.  Definition 4.8. Let G be a bipartite graph on the vertex set V with partition of V = V1 ∪V2 , where V1 = {X1,1 , . . . , X1,m } and V2 = {X2,1 , . . . , X2,n }. Then we say that G satisfies HerzogHibi conditions if it satisfy the following: i) m = n. ii) For all i, we have {X1,i , X2,i } ∈ E. iii) If {X1,i , X2,j } ∈ E, then i ≤ j. iv) If {X1,i , X2,j } ∈ E and {X1,j , X2,k } ∈ E, then {X1,i , X2,k } ∈ E. Further, if for i ≤ j, we have {X1,i , X2,j } ∈ E, then we say G is a Herzog-Hibi complete graph. 8 R. KUMAR AND A. KUMAR Remark 4.9. Let V1 = {X1,1 , . . . , X1,m } and V2 = {X2,1 , . . . , X2,n }, and G be a bipartite graph on a vertex set V = V1 ∪ V2 . If G satisfy Herzog-Hibi conditions, then, by Theorem 4.7, we know that G is Cohen-Macaulay. In fact, Herzog-Hibi ([3], 2005) prove that G is Cohen-Macaulay if and only if G satisfy Herzog-Hibi conditions. In this case, further we have the following: i) Let G0 be induced subgraph on vertex set V \ {X1,1 , X2,1 }. Then note that G0 satisfy Herzog-Hibi conditions, and hence G0 is Cohen-Macaulay. ii) Let S = k[X1,1 , . . . , X1,n , X2,1 , . . . , X2,n ]. Since X2,1 is adjacent to   only X1,1 , we get S S hI(G), X1,1 i = hI(G0 ), X1,1 i and dim = dim = n, and hence by hI(G), X1,1 i I(G)   S = n. (i), we know that depth hI(G), X1,1 i S(−1) X1,1 S S iii) Consider the sequence 0 −→ −→ −→ −→ 0. This forces I(G) : X1,1  I(G)  hI(G), X1,1 i   S(−1) S(−1) S(−1) that dim is ≤ n and depth ≥ n, and hence I(G) : X1,1 I(G) : X1,1 I(G) : X1,1 Cohen-Macaulay of dimension n. Theorem 4.10. Let G be an r-partite graph with partition V1 , V2 , . . . , Vr which satisfy the following: i) |Va | = n for all 1 ≤ a ≤ r ii) for all 1 ≤ a, b ≤ r − 1, the induced graph on the vertices Va ∪ Vb is a complete bipartite graph, iii) for all 1 ≤ a ≤ r − 1, the induced graph on vertices Va ∪ Vr satisfies the Herzog-Hibi conditions. Then G is Cohen-Macaulay. Remark 4.11. Let G be a graph as in Theorem 4.10 and S = k[X1 , X2 , . . . , Xn ]. Suppose Va = {Xa,1 , . . . , Xa,n } for all a ∈ [r]. i) If n = 1, then G is a complete graph on r vertices, and hence G is Cohen-Macaulay. ii) For 1 ≤ a ≤ r, let Va0 = V \ {Xa,1 }, and let G0 be the induced subgraph of G on the vertex set V 0 = V10 ∪ · · · ∪ Vr0 . Then G0 also satisfies the hypothesis of Theorem 4.10 with |Va0 | = n − 1 for all a. iii) Let Ga be the induced subgraph on vertex set Va ∪ Vr for all a ∈ [r − 1]. Since, for all a, Ga is bipartite graph which satisfies Herzog-Hibi conditions, by Remark 4.9(i), Ga is S Cohen-Macaulay, and hence by 4.9(iii), we get is Cohen-Macaulay. I(Ga ) : Xa,1 iv) For a ∈ [r] and i ∈ [n], define st(Xa,i ) = {Xb,j ∈ V : Xb,j adjacent to Xa,i }. Since the induced graph on vertices Va ∪ Vb is a complete bipartite graph for all a, b ≤ r − 1, we get V1 ∪ · · · ∪ Va−1 ∪ Va+1 ∪ · · · ∪ Vr−1 ⊂ st(Xa,1 ) for all a ∈ [r − 1]. v) By (iv), we get I(G) : Xa,1 = hV1 ∪ · · · ∪ Va−1 ∪ Va+1 ∪ · · · ∪ Vr−1 , I(Ga ) : Xa,1 i. Since, by Remark 4.9(iii), S is Cohen-Macaulay, I(Ga ) : Xa,1 CERTAIN CLASSES OF COHEN-MACAULAY MULTIPARTITE GRAPHS 9 S is Cohen-Macaulay, and hence so is I(G) : Xa,1 S S k[Va , Vr ] . Note that ' , hI(G), X1,1 , . . . , Xa−1,1 i : Xa,1 hI(G), X1,1 , . . . , Xa−1,1 i : Xa,1 I(Ga ) : Xa,1  S and hence Remark 4.9(iii) forces that dim = n. hI(G), X1,1 , . . . , Xa−1,1 i : Xa,1 By Remark 4.9(iii), we know that Proof of Theorem 4.10. In order to prove the result, we use the induction on n. If n = 1, by Remark 4.11(i), we know G is Cohen-Macaulay. If n > 1, then take Va = {Xa,1 , Xa,2 , . . . , Xa,n }. Take the following short exact sequence 0 −→ S(−1) S S Xr−1,1 −→ −→ −→ 0. hI(G), X1,1 , . . . , Xr−2,1 i : Xr−1,1 hI(G), X1,1 , . . . , Xr−2,1 i hI(G), X1,1 , . . . , Xr−1,1 i For 1 ≤ a ≤ r, let Va0 = V \ {Xa,1 }, and let G0 be the induced subgraph of G on the vertex set V = V10 ∪· · ·∪Vr0 . Note that induce subgraph G0 also satisfies the hypothesis of the theorem hypothesis, G0 is Cohen-Macaulay, and with |Va0 | = n−1 < |Va | for all a. Hence, by induction   S S , and dim = n. By Remark hence so is 0 0 hI(G ), X1,1 , . . . , Xr−1,1 i hI(G ), X1,1 , . . . , Xr−1,1 i S is Cohen-Macaulay of dimension n, and 4.11(v), we know hI(G), X1,1 , . . . , Xr−2,1 i : Xr−1,1 S hence so . hI(G), X1,1 , . . . , Xr−2,1 i Similarly, using the following short exact sequence 0→ S(−1) hI(G), X1,1 , . . . , Xr−3,1 i : Xr−2,1 we get get Xr−2,1 → S S → → 0, hI(G), X1,1 , . . . , Xr−3,1 i hI(G), X1,1 , . . . , Xr−2,1 i S is Cohen-Macaulay. By repeating the above process, we hI(G), X1,1 , . . . , Xr−3,1 i S is Cohen-Macaulay. I(G)  Note that if G is Cohen-Macaulay, then G need not be one of the graph described in Theorems 4.7 and 4.10. For example, if G is cycle on 5 vertices, then G is Cohen-Macaulay. But G does not satisfy the hypothesis of Theorems 4.7 and 4.10. Remark 4.12. Let G be as in the above theorem such that for 1 ≤ a ≤ r − 1, the induced graph on vertices Va ∪Vr is a Herzog-Hibi complete graph. Since r−1 partitions are complete 2 bipartite and r − 1 partitions are Herzog-Hibi complete, we have the number of edges is       n+1 (r − 1)n + 1 2 r−1 n + (r − 1) = . 2 2 2 Since the height of edge ideal of a given graph in the above remark is (r − 1)n, by [6, Theorem 4.3.7], we have the following: Corollary 4.13. Let G be given as in the above remark and I be the edge ideal of G. Then S/I has a linear resolution. 10 R. KUMAR AND A. KUMAR References [1] Eagon, A., Reiner, V. (1998). Resolutions of Stanley-Reisner Rings and Alexander Duality. J. pure & Applied Algebra. 130, 265 - 275. [2] Ene, V., Herzog, J., Mohammadi F. (2011). Monomial Ideals and Toric Rings of Hibi Type Arising from a Finite Poset. European Journal of Combinatorics. 32, 404 - 421. [3] Herzog, J., Hibi, T. (2005). Distributive lattices, bipartite graphs and Alexander duality. J. Algebraic Combin. 22, no. 3, 289 – 302. [4] Herzog, J., Hibi, T. (2011). Monomial Ideals, Graduate Texts in Mathematics, Springer-Verlag London Ltd., London. [5] Szpilrajn, E. (1930). Sur lextension de lordre partiel. Fund. Math. 16, 386 - 389. [6] Villarreal, R. H. (2001). Monomial Algebras, Marcel Dekker. Indian Institute of Technology Bombay, India. E-mail address: [email protected] DAV University Jalandhar, India. E-mail address: [email protected]
0math.AC
Sparse covariance matrix estimation in high-dimensional deconvolution DENIS BELOMESTNY1,2 , MATHIAS TRABS3 and ALEXANDRE B. TSYBAKOV4 arXiv:1710.10870v2 [math.ST] 26 Mar 2018 1 Duisburg-Essen University, Faculty of Mathematics Thea-Leymann-Str. 9 D-45127 Essen, Germany 2 National Research University Higher School of Economics Shabolovka, 26, 119049 Moscow, Russia, E-mail: [email protected] 3 Universität Hamburg, Faculty of Mathematics Bundesstraße 55, 20146 Hamburg, Germany E-mail: [email protected] 4 CREST, ENSAE, Université Paris-Saclay 5, avenue Henry Le Chatelier, 91120 Palaiseau, France E-mail: [email protected] We study the estimation of the covariance matrix Σ of a p-dimensional normal random vector based on n independent observations corrupted by additive noise. Only a general nonparametric assumption is imposed on the distribution of the noise without any sparsity constraint on its covariance matrix. In this high-dimensional semiparametric deconvolution problem, we propose spectral thresholding estimators that are adaptive to the sparsity of Σ. We establish an oracle inequality for these estimators under model miss-specification and derive non-asymptotic minimax convergence rates that are shown to be logarithmic in n/ log p. We also discuss the estimation of low-rank matrices based on indirect observations as well as the generalization to elliptical distributions. The finite sample performance of the threshold estimators is illustrated in a numerical example. MSC 2010 subject classifications: Primary 62H12; secondary 62F12, 62G05. Keywords: Thresholding, minimax convergence rates, Fourier methods, severely ill-posed inverse problem. 1. Introduction One of the fundamental problems of multivariate data analysis is to estimate the covariance matrix Σ ∈ Rp×p of a random vector X ∈ Rp based on independent and identically distributed (i.i.d.) realizations X1 , . . . , Xn of X. An important feature of data sets in modern applications is high dimensionality. Since it is well known that classical procedures fail if the dimension p is large, various novel methods of high-dimensional matrix estimation have been developed in the last decade. However, an important question has not yet been settled: How can Σ be estimated in a high-dimensional regime if the observations are corrupted by noise? Let X1 , . . . , Xn be i.i.d. random variables with multivariate normal distribution N (0, Σ). The maximum likelihood estimator of Σ is the sample covariance estimator n Σ∗X := 1X Xj Xj> . n j=1 The estimation error of Σ∗X explodes for large p. To overcome this problem, sparsity assumptions can be imposed on Σ, reducing the effective number of parameters. The first rigorous studies of this idea go back to Bickel and Levina [3, 4] and El Karoui [21] who have assumed that most 1 2 D. Belomestny, M. Trabs and A.B. Tsybakov entries of Σ are zero or very small. This allows for the construction of banding, tapering and thresholding estimators based on Σ∗X , for which the dimension p can grow exponentially in n. Subsequently, a rich theory has been developed in this direction including Lam and Fan [34] who proposed a penalized pseudo-likelihood approach, Cai et al. [11] who studied minimax optimal rates, Cai and Zhou [12] studying the `1 loss as well as Rothman et al. [46] and Cai and Liu [8] for more general threshold procedures and adaptation, to mention only the papers most related to the present contribution. For current reviews on the theory of large covariance estimation, we refer to [9, 24]. Heading in a similar direction as noisy observations, covariance estimation in the presence of missing data has been recently investigated by Lounici [37] as well as Cai and Zhang [10]. Almost all estimators in the afore mentioned results build on the sample covariance estimator Σ∗X . In this paper, we assume that only the noisy observations Yj = Xj + εj , j = 1, . . . , n, are available, where the errors ε1 , . . . , εn are i.i.d. random vectors in Rp independent of X1 , . . . , Xn . Then the sample covariance estimator Σ∗Y is biased: n i h1 X Yi Yi> = Σ + Γ E[Σ∗Y ] = E n i=1 where Γ = E[ε1 ε> 1 ] is the covariance matrix of the errors. Assuming Γ known to correct the bias is not very realistic. Moreover, for heavy tailed the errors εj that do not have finite second moments, Γ is not defined and the argument based on Σ∗Y makes no sense. Several questions arising in this context will be addressed below: (i) How much information on the distribution of εj do we need to consistently estimate Σ? (ii) Do we need finite second moments of εj and/or sparsity restrictions on Γ to estimate Σ? (iii) What is the minimax optimal rate of estimating Σ based on noisy observations? If the covariance matrix Γ of the errors exists and is known, the problem does not differ from the direct observation case, since Γ can be simply subtracted from Σ∗Y . If Γ can be estimated, for instance from a separate sample of the error distribution or from repeated measurements, we can proceed similarly. However, in the latter case, we need to assume that Γ is sparse, since otherwise we cannot find a good estimator for large dimensions. Reducing our knowledge about εj further, we may only assume that the distribution of εj belongs to a given nonparametric class. This leads to a high-dimensional deconvolution model. The difference from standard deconvolution problems is that the density of Xj ’s is a parametric object known up to a high-dimensional matrix parameter Σ. A related model in the context of stochastic processes has been recently studied by Belomestny and Trabs [2]. Obviously, we need some assumption on the distribution of errors since otherwise Σ is not identifiable as, for example, in the case of normally distributed εj . It turns out that we do not need a sparse covariance structure for the error distribution and we can allow for heavy tailed errors without any moments. From the deconvolution point of view, it might seem surprising that Σ and thus the distribution of Xj can be estimated consistently without knowing or estimating the distribution of errors εj , but as we will show it is possible. The price to pay for this lack of information is in the convergence rates that turn out to be very slow - logarithmic in the sample size. In the pioneering works in one-dimensional case, Matias [40], Butucea and Matias [5] have constructed a variance estimator in deconvolution model with logarithmic convergence rate and a corresponding lower bound. In this paper, we provide a general multidimensional analysis of the minimax rates on the class of sparse covariance matrices. To replace the sample covariance matrix Σ∗Y by a deconvolution counterpart, we use some ideas from the literature on density deconvolution. Starting with Carroll and Hall [13] and Fan [22], the deconvolution problem have been extensively studied. In particular, unknown (but inferable) error distributions have been analysed by Neumann [42], Delaigle et al. [18], Johannes [31] and Delaigle Covariance estimation in high-dimensional deconvolution 3 and Hall [17] among others. For adaptive estimation with unknown error distribution we refer to Comte and Lacour [14], Kappus and Mabon [32], Dattner et al. [16] and references therein. Almost all contributions to the deconvolution literature are restricted to a univariate model. Hence, our study contributes to the deconvolution theory by treating the multivariate case; in particular, our techniques for the lower bounds might be of interest. To our knowledge, only Masry [39], Eckle et al. [20], and Lepski and Willer [35, 36] have studied the setting of multivariate deconvolution. They deal with a different problem, namely that of nonparametric estimation of the density of Xj or its geometric features when the distribution of εj is known. Applying a spectral approach, we construct an estimator for the covariance matrix assuming that Xj are normally distributed and that the characteristic function ψ of the distribution of εj decays slower than the Gaussian characteristic function. A similar idea in a one-dimensional deconvolution problem has been developed by Butucea et al. [6]. The assumption log |ψ(u)| = o(|u|2 ) as |u| → ∞ implies identifiability of Σ and allows us to construct an estimator Σ̂, which is consistent in the maximal entry norm. Based on Σ̂, we then construct hard and soft thresholding S estimators Σ̂H τ and Σ̂τ , respectively, for sparse matrices. The sparsity is described by an upper bound S on the `q -norm, q ∈ [0, 2), of entries of Σ. We establish sparsity oracle inequalities for S Σ̂H τ and Σ̂τ when the estimation error is measured in the Frobenius norm. This choice of the norm is naturally related to the distance between two multivariate normal distributions. The oracle bounds reveal that the thresholding estimators adapt to the unknown sparsity S. For the soft thresholding estimator we present an oracle inequality, which shows that the estimator adapts also to approximate sparsity. Assuming that the characteristic function ψ of εj satisfies log |ψ(u)| = O(|u|β ) for large u ∈ Rp and some β ∈ [0, 2), we prove the following upper bound on the estimation error in the Frobenius norm:  n −(1−β/2)(1−q/2) 1/2 (1) kΣ̂H log τ − Σk 6 CS log p for some constant C > 0 and with high probability. The dependence of this bound on the sparsity S is the same as found by Bickel and Levina [3] for the case direct observations; furthermore the well-known quotient n/ log p drives the rate. However, the severely ill-posed nature of the inverse problem causes the logarithmic dependence of the rate on n/ log p. We also see that the estimation problem is getting harder if β gets closer to 2 where it is more difficult to distinguish the signal from the noise. Furthermore, we establish a lower bound showing that the rate in (1) cannot be improved in a minimax sense for q = 0. Let us emphasise that our observations Yj are by definition not normally distributed. Therefore, the proof of the lower bound differs considerably from the usual lower bounds in high-dimensional statistics, which rely on Gaussian models. Covariance estimation is crucial in many applications where also observation errors appear. For instance, many portfolio optimization approaches rely on the covariance matrix of a possibly high number of assets where the financial data are typically perturbed due to bid-ask spreads, micro-structure noise etc. [23, 49]. While in a high-frequency regime the observation noise can be handled by local averages, in a low-frequency situation, as daily closing prices, the denoising is more difficult and our deconvolution approach can be applied, cf. [2]. Note that the dimension dependence in [2] can be improved with our analysis for low-rank matrices. As another application the spatial empirical covariance matrices of climate data and their eigenvectors, called empirical orthogonal functions, are important spatio-temporal statistics. Naturally recordings of climate data, e.g. sea surface temperatures, may suffer from measurement errors [15] and should be taken into account. Especially, sparse covariance structures appear in the problem of spatio-temporal wind speed forecasting taking into account the time series data of a target station and data of surrounding stations, see [47]. This paper is organized as follows. In Section 2 we construct and analyze the spectral covariance matrix estimator. In Section 3 the resulting thresholding procedures are defined and analyzed. In Section 4 we investigate upper and lower bounds on the estimation error. In Section 5 some extensions of our approach are discussed including the estimation of low-rank matrices based 4 D. Belomestny, M. Trabs and A.B. Tsybakov on indirect observations as well as the generalization to elliptical distributions. The numerical performance of the procedure is illustrated in Section 6. Longer and more technical proofs are postponed to Section 7 and to the appendix. Notation: For any x ∈ Rp and q ∈ (0, ∞], the `q -norm of x is denoted by |x|q and we write for brevity |x| := |x|2 . For x, y ∈ Rp the Euclidean scalar product is written as hx, yi. We denote by Ip the p × p identity matrix, and by 1{·} the indicator function. For two matrices A, B ∈ Rp×p thepFrobenius scalar product is given by hA, Bi := tr(A>√ B) inducing the Frobeninus norm Ai. The nuclear norm is denoted by kAk := tr( A> A) and the spectral norm by kAk := hA, 1 p kAk∞ := λmax (A> A), where λmax (·) stands for the maximal eigenvalue. For A ∈ Rp×p and q ∈ [0, ∞] we denote by |A|q the `q -norm of the entries of the matrix if q > 0 and the number of non-zero entries for q = 0. We write A > 0 or A > 0 if the matrix A ∈ Rp×p is positive definite or semi-definite. We denote by PΣ,ψ the joint distribution of Y1 , . . . , Yn when the covariance matrix of Xj is Σ and the characteristic function of the noise εj is ψ. We will write for brevity PΣ,ψ = P if there is no ambiguity. 2. Spectral covariance estimators Let ψ denote the characteristic function of error distribution:   ψ(u) = E eihu,ε1 i , u ∈ Rp . Then the characteristic function of Yj is given by    1 ϕ(u) := E eihu,Yj i = exp − hu, Σui + log ψ(u) , 2 u ∈ Rp . Here and throughout we assume that ψ(u) 6= 0 and we use the distinguished logarithm, cf. [48, Lemma 7.6]. This assumption is standard in the literature on deconvolution. Allowing for some zeros of ψ has been studied in [41, 19]. Note that our estimation procedure defined below does not rely on all u in Rd , but uses only u with a certain radius |u|. The canonical estimator for the characteristic function ϕ is the empirical characteristic function n ϕn (u) := 1 X ihu,Yj i e , n j=1 u ∈ Rp . √ Since ϕn (u) concentrates around ϕ(u) with rate n, we have p ϕn (u) 6= 0 with overwhelming probability for sufficiently large frequencies u ensuring |ϕ(u)| > C (log(ep))/n for some constant C > 1 (see Lemma 13 and Corollary 14). In this case log ϕn (u) is well defined. On the unlikely event {ϕn (u) = 0}, we may set log ϕn (u) := 0. Arguing similarly to Belomestny and Trabs [2], we consider the identity log ϕn (u) hu, Σui log ψ(u) log ϕn (u) − log ϕ(u) =− + + , |u|2 |u|2 |u|2 |u|2 u ∈ Rp \ {0}. (2) Both sides are normalized by |u|2 being the order of the leading term hu, Σui. While the lefthand side of (2) is a statistic based on the observations Y1 , . . . , Yn , the first term on the righthand side encodes the parameter of interest, namely the covariance matrix Σ. The second term is a deterministic error due to the unknown distribution of εj . If | log ψ(u)| = o(|u|2 ), i.e., the error distribution is less smooth than the normal distribution, the deterministic error vanishes as |u| → ∞. The third term in (2) is a stochastic error term. Using the first order approximation we get  ϕ (u) − ϕ(u)  ϕ (u) − ϕ(u) n n +1 ≈ . (3) log ϕn (u) − log ϕ(u) = log ϕ(u) ϕ(u) Covariance estimation in high-dimensional deconvolution 5 The latter expression resembles the estimation error in classical deconvolution problems. However, there is a difference since here in the denominator we have ϕ(u) rather than the characteristic function of the distribution of errors. A similar structure was detected in the statistical analysis of low-frequently observed Lévy processes by Belomestny and Reiß [1]. Following [1], one can call this type of problems auto-deconvolution problems. Since |ϕ(u)| = e−hu,Σui/2 |ψ(u)|, and we assume that | log ψ(u)| = o(|u|2 ), the stochastic error grows exponentially in |u|. Thus, the estimation problem is severely ill-posed even in one-dimensional case. These remarks lead us to the conclusion that Σ can be estimated consistently without any particular knowledge of the error distribution as soon as | log ψ(u)| = o(|u|2 ), and the spectral radius |u| in (2) is chosen to achieve a trade-off between the stochastic and deterministic errors. To specify more precisely the condition | log ψ(u)| = o(|u|2 ), it is convenient to consider, for any β ∈ (0, 2) and T > 0, the following nonparametric class of functions ψ:   Hβ (T ) := ψ characteristic function on Rp : log |ψ(u)| 6 T 1 + |u|ββ , u ∈ Rp . Note that log |ψ(u)| = log(1/|ψ(u)|) since |ψ(u)| 6 1. Therefore, the condition that determines  the class Hβ (T ) can be written as the lower bound |ψ(u)| > exp −T 1+|u|ββ . If the characteristic function of εj belongs to Hβ (T ), the decay |u|ββ for some β < 2 of the characteristic exponent allows for separating the normal distribution of Xj from error distribution for large |u|. The decay rate β determines the ill-posedness of the estimation problem. Noteworthy, we require neither sparsity restrictions on the joint distribution of (ε1 , . . . , εn ) nor moment conditions of these random variables. A typical representative in the class Hβ is a characteristic function of a vector of independent β-stable random variables. In the case of identically distributed marginals, it has the form ψ(u) = exp(−σ|u|ββ ), u ∈ Rp , for some parameter σ > 0. A related example with correlated coefficients is a p-dimensional stable distribution with characteristic function ψ(u) = exp(−σ|u|β2 ) (note that |u|β2 6 |u|ββ ). Recalling that stable distributions can be characterized as limit distributions of normalized sums of independent random variables and interpreting εj as accumulation of many small measurement errors, suggests that these examples are indeed quite natural. If ψ ∈ Hβ (T ), the deterministic error term in (2) is small for large values of |u|. We will choose u in (2) in the form U u(i,j) where U > 0 is large, and u(i,j) are p-dimensional unit vectors defined by  1 (4) u(i,i) := u(i) := (1{i=k} )k=1,...,p and u(i,j) := √ u(i) + u(j) for i 6= j. 2 Using the symmetry of Σ = (σi,j )i,j=1,...,p , we obtain hu(i) , Σu(i) i = σi,i and hu(i,j) , Σu(i,j) i = σi,j + σi,i + σj,j 2 for any i, j ∈ {1, . . . , p} with i 6= j. Motivated by (2) applied to U u(i,j) for some spectral radius U > 0, we introduce the spectral covariance estimator: (  − U12 Re log ϕn (U u(i) ) , if i = j,  Σ̂ = (σ̂i,j )i,j=1,...p with σ̂i,j := (5) − U12 Re log ϕn (U u(i,j) ) − 12 (σ̂i,i + σ̂j,j ), if i 6= j. Equivalently, we can write Re(log ϕn (u)) = log |ϕn (u)| for any u ∈ Rp with |ϕn (u)| 6= 0. Since ϕn (u) concentrates around ϕ(u), cf. Lemma 13, we have ϕn (u) 6= 0 with high probability if ϕ(u) 6= 0. The spectral covariance estimator Σ̂ can be viewed as a counterpart of the classical sample covariance matrix for the case of indirect observations. The entries σ̂i,j of Σ̂ enjoy the following concentration property. 6 D. Belomestny, M. Trabs and A.B. Tsybakov Theorem 1. Assume that |Σ|∞ 6 R, and ψ ∈ Hβ (T ) for some β, R, T > 0. Let γ > p 2 β U > 1 satisfy 8γ (log(ep))/n < e−RU −3T U . Set τ (U ) = 6γ eRU 2 +3T U β  log(ep) 1/2 U2 n + 3T U −2+β . √ 2 and (6) Then, for any τ > τ (U ),  2 PΣ,ψ |σ̂i,j − σi,j | < τ > 1 − 12(ep)−γ and  PΣ,ψ  2 max |σ̂i,j − σi,j | < τ > 1 − c∗ p2−γ i,j=1,...,p 2 where c∗ = 12e−γ . Proof. Set S(u) = Re(log ϕn (u) − log ϕ(u)). Using (2) we obtain, for all i, j = 1, . . . , p, |σ̂i,i − σi,j | 6 U −2 |S(U u(i,j) )| + U −2 log |ψ(U u(i,j) )| 6 U −2 |S(U u(i,j) )| + U −2 max log |ψ(U u(i,j) )| . i∈{1,...,p} For U > 1 the last summand in this display is bounded uniformly by 3T U −2+β on the class Hβ (T ). This remark and Corollary 14 in Section 7.1 imply that p   2 6γ log(ep) −2+β + 3T U 6 12(ep)−γ P |σ̂i,j − σi,j | > √ 2 (i,j) nU mini,j∈{1,...,p} |ϕ(U u )| p if the condition γ (log(ep))/n < |ϕ(U u(i,j) )|/8 is satisfied for all i, j. Note that for any i, j = 1, . . . , p, and any ψ ∈ Hβ (T ),  U 2 hu(i,j) , Σu(i,j) i  |ϕ(U u(i,j) )| = exp − + Re log ψ(U u(i,j) ) 2  2 > exp − U |Σ|∞ + 3T U β−2 . Therefore, for γ and U satisfying the conditions of the theorem, 2 β   2 eRU +3T U  log(ep) 1/2 −2+β P |σ̂i,j − σi,j | > 6γ + 3T U 6 12(ep)−γ . 2 U n A union bound concludes the proof. the familiar factor p The first term in τ (U ) is an upper bound for the stochastic error. We recover (log p)/n which is due to a sub-Gaussian bound on the maximum of the p2 entries (σ̂i,j ). The term exp(RU 2 + 3T U β ) is an upper bound for ϕ(u)−1 appearing in the linearization (3). Note that for β < 2 this bound can be written aspexp(RU 2 (1 + o(1))) for U → ∞. This suggests the choice of spectral radius in the form U∗ = c log(n/ log(ep)) for some sufficiently small constant c > 0. The second term in (6) bounds the deterministic error and determines the resulting rate U∗−2+β = O((log(n/ log(ep)))−1+β/2 ), cf. Theorem 5. 3. Thresholding Based on the spectral covariance estimator, we can now propose estimators of high-dimensional sparse covariance matrices. We consider the following sparsity classes of matrices: n o G0 (S, R) := Σ > 0 : Σ = Σ> , |Σ|0 6 S, |Σ|∞ 6 R and (7) n o Gq (S, R) := Σ > 0 : Σ = Σ> , |Σ|qq 6 S, |Σ|∞ 6 R for q ∈ (0, 2), Covariance estimation in high-dimensional deconvolution 7 where S > 0 denotes the sparsity parameter and R > 0 bounds the largest entry of Σ. We also consider larger classes Gq∗ (S, R) that differ from Gq (S, R) only in that the condition Σ > 0 is dropped. Note that S > p for the classes Gq (S, R), since otherwise the condition Σ > 0 does not hold. This restriction on S does not apply to the classes Gq∗ (S, R), for which the unknown effective dimension of Σ can be smaller than p. However, for the classes Gq∗ (S, R), the overall model remains, in general, p-dimensional since the distribution of the noise can be supported on the whole space Rp . The sparsity classes considered by Bickel and Levina [3] and in many subsequent papers are given by p n o X Uq (s, R) := Σ > 0 : Σ = Σ> , max |σi,j |q 6 s, max σi,i 6 R i i j=1 for s, R > 0, q ∈ (0, 1) and with the usual modification for q = 0. We have Uq (s, R) ⊆ Gq (sp, R), so that our results can be used to obtain upper bounds on the risk for the classes Uq (s, R). Based on the spectral covariance estimator, we define the spectral hard thresholding estimator for Σ as H Σ̂H τ : = (σ̂i,j )i,j=1,...,p with H σ̂i,j := σ̂i,j 1{|σ̂i,j |>τ } , (8) for some threshold value τ > 0. The following theorem gives an upper bound on the risk of this estimator in the Frobenius norm. Theorem 2. Let R, T, S > 0, β ∈ [0, 2), and q ∈ [0, 2). Let τ (U ) be defined in (6) with parameters p √ 2 β γ > 2 and U > 1 satisfying 8γ (log(ep))/n 6 e−RU −3T U . Then sup Σ∈Gq∗ (S,R),ψ∈Hβ (T ) 1/2 1−q/2 PΣ,ψ (kΣ̂H τ ) 6 c∗ p2−γ τ − Σk > 3S 2 2 provided that τ > τ (U ) for q = 0, and τ > 2τ (U ) for q ∈ (0, 2). Here, c∗ = 12e−γ . Proof. First, consider the case q = 0 and τ > τ (U ). In view of Theorem 1, the event A =  2 maxi,j=1,...,p |σ̂i,j − σi,j | < τ is of probability at least 1 − c∗ p2−γ for all τ > τ (U ). On A we   have the inclusion j : |σ̂i,j | > τ ⊆ j : σi,j 6= 0 , so that |Σ̂H |0 6 |Σ|0 . Therefore, on the event A, 2 H H 2 H 2 H 2 kΣ̂H τ − Σk 6 |Σ̂τ − Σ|0 |Σ̂τ − Σ|∞ 6 2|Σ|0 |Σ̂τ − Σ|∞ 6 2S|Σ̂τ − Σ|∞ . H Note that, again on A, we have |Σ̂H τ − Σ|∞ 6 |Σ̂τ − Σ̂|∞ + |Σ̂ − Σ|∞ 6 2τ . Combining this with the last display implies the assertion of the theorem for q = 0. Consider now the case q ∈ (0, 2) and τ > 2τ (U ). We use the following elementary fact: If |y − ϑ| 6 r for some y, ϑ ∈ R and r > 0, then |y 1{|y|>2r} − ϑ| 6 3 min{|ϑ|, r} (cf.[51]). Taking y = σ̂i,j , ϑ = σi,j , and r = τ /2, and using Theorem 1 we obtain that, on the event of probability 2 at least 1 − c∗ p2−γ , H |σ̂i,j − σi,j | 6 3 min{|σi,j |, τ /2}, i, j = 1, . . . , p. 2 Thus, for any q ∈ (0, 2), with probability at least 1 − c∗ p2−γ , X X 2 H 2 kΣ̂H (σ̂i,j − σi,j )2 6 9 min{σi,j , τ 2 /4} 6 9(τ /2)2−q |Σ|qq 6 9τ 2−q S. τ − Σk = i,j i,j Since all bounds hold uniform in Σ ∈ Gq∗ (S, R) and ψ ∈ Hβ (T ), the theorem is proven. In the direct observation case where εj = 0 we have ψ(u) = 1 for all u ∈ Rp , so that the deterministic error term in (6) disappears. In this case, U can be fixed and the threshold can be 8 D. Belomestny, M. Trabs and A.B. Tsybakov p chosen as a multiple of (log p)/n, analogously to [3]. Together with the embedding Uq (s, R) ⊆ Gq (sp, R), we recover Theorem 2 from Bickel and Levina [3]. In Section 4 we will discuss in detail the optimal choice of the spectral radius and the threshold in the presence of noise. The spectral soft thresholding estimator is defined as  S S Σ̂Sτ := (σ̂i,j )i,j=1,...,p with σ̂i,j := sign(σ̂i,j ) |σ̂i,j | − τ + with some threshold τ > 0. It is well known, cf., e.g. [51], that  Σ̂Sτ = arg min |A − Σ̂|22 + 2τ |A|1 . (9) A∈Rp×p Adapting the proof of Theorem 2 in Rigollet and Tsybakov [44], we obtain the following oracle inequality, which is sharp for q = 0 and looses a factor 2 otherwise. Theorem 3. Assume that |Σ|∞ 6 R, and ψ ∈ Hβ (T ) for some β, R, T > 0.pLet τ > τ (U ) √ where τ (U ) is defined in (6) with parameters γ > 2 and U > 1 such that 8γ (log(ep))/n 6 2 β e−RU −3T U . Then, n o √ 2 2 2 2) τ |A| kΣ̂Sτ − Σk2 6 min kA − Σk + (1 + (10) 0 p×p A∈R 2 2 with probability at least 1 − c∗ p2−γ where c∗ = 12e−γ . For any q ∈ (0, 2) we have, with probability 2 at least 1 − c∗ p2−γ , n o (11) kΣ̂Sτ − Σk2 6 min 2kA − Σk2 + c(q)τ 2−q |A|qq A∈Rp×p where c(q) > 0 is a constant depending only on q. Proof. Starting from the characterization (9), we use Theorem 2 by Koltchinskii et al. [33]. To this end, we write σ̂i,j = σi,j + ξi,j , i, j ∈ {1, . . . , p}, where ξi,j are random variables with exponential concentration around zero due to Theorem 1. Observing σ̂i,j is thus a sequence space model in > dimension p2 and a special case of the trace regression model Yj = tr(Zi,j A0 ) + ξi,j considered in [33]. Namely, A0 is the diagonal matrix with diagonal entries σi,j and Zi,j are diagonalisations of the canonical basis in Rp×p . In particular, Assumption 1 in [33] is satisfied for µ = p, i.e., kBk2L2 (Π) = p−2 |B|22 where we use the notation of [33]. Note also that the rank of a diagonal matrix B is equal to the number of its non-zero elements. Consequently, Theorem 2 in [33] yields with λ = 2τ p2 that o n √ 2 2 2 |Σ̂Sτ − Σ|22 6 min |A − Σ| + (1 + 2) τ |A| 0 2 p×p A∈R on the event that A = {maxi,j |σ̂i,j − σi,j | < τ }. To estimate the probability of A, we apply Theorem 1. Inequality (11) follows from (10) using the same argument as in Corollary 2 of [44]. This theorem shows that the soft thresholding estimator allows for estimating matrices that are a not exactly sparse but can be well approximated by a sparse matrix. Choosing A = Σ in the oracle inequalities (10) and (11) we obtain the following corollary analogous to Theorem 2. Corollary 4. Let R, T, S > 0, β ∈ (0, 2), and q ∈ [0, 2). Let τ > τ (U ) where τ (U ) is defined in p √ 2 β (6) with parameters γ > 2 and U > 1 such that 8γ (log(ep))/n 6 e−RU −3T U . Then sup Σ∈Gq∗ (S,R),ψ∈Hβ (T ) where C = 1 + √ PΣ,ψ (kΣ̂Sτ − Σk > CS 1/2 τ 1−q/2 ) 6 c∗ p2−γ 2 for q = 0, and C = p c(q) for q ∈ (0, 2). 2 Covariance estimation in high-dimensional deconvolution 9 4. Minimax optimality In this section, we study minimax optimal rates for the estimation of Σ on the class Gq (S, R) × Hβ (T ). We first state an upper bound on the rate of convergence of the hard thresholding estimator in this high-dimensional semiparametric problem. It is an immediate consequence of Theorem 2. Due to Corollary 4, the result directly carries over to the soft thresholding estimator. Theorem 5. Let R, T, S > 0, β ∈ (0, 2), and q ∈ [0, 2). For γ > s 1 n U∗ = log . 4R 64γ 2 log(ep) √ 2, set (12) 1/(2−β) Let n be large enough such that U∗ > ( 3T ∨(c̄/T )1/β ∨1 for some numerical constant c̄ > 0. R ) Then for any τ > τ (U∗ ) where τ (·) is defined in (6) we have   2−γ 2 sup PΣ,ψ kΣ̂H with τ − Σk > C̄1 r̄n,p 6 C̄0 p (Σ,ψ)∈Gq (S,R)×Hβ (T )   r̄n,p := S 1/2 R1−β/2 T log n −1+β/2 1−q/2 log(ep) (13) for some numerical constants C̄0 , C̄1 > 0. Proof. It follows from the assumption on U∗ that 3T U∗β 6 RU∗2 . This and the definition of U∗ p 2 β imply that 8γ (log(ep))/n 6 e−RU∗ −3T U∗ . Therefore, we can apply Theorem 2, which yields the result since 2 τ (U∗ ) 6 6γ  2c̄  e2RU∗  log(ep) 1/2 + 3T U∗−2+β 6 + 3 T U∗−2+β . 2 U∗ n 3 It is interesting to compare Theorem 5 with the result of Butucea and Matias [5] corresponding to p = 1, S = 1, and establishing a logarithmic rate for estimation of the variance in deconvolution model under exponential decay of the Fourier transform of εj . Butucea and Matias [5] have shown that, if log |ψ(u)| = O(|u|β ), their estimator achieves asymptotically a mean squared error of the order (log n)−1+β/2 . This coincides with the case p = 1 and q = 0 of the non-asymptotic bound in (13). A similar rate for p = 1 has been obtained by Matias [40] under the assumptions on the decay of the Laplace transform. We now turn to the lower bound matching (13) for q = 0. Intuitively, the slow rate comes from the fact that the error distribution can mimic the Gaussian distribution up to some frequency in the Fourier domain. A rigorous application of this observation to the construction of lower bounds goes back to Jacod and Reiß [30], though in quite a different setting. For the multidimensional case that we consider here the issue becomes particularly challenging. Theorem 6. Let β ∈ (0, 2) and assume that C1 p 6 S 6 C2 p, T (log n)−1+β/2 6 C3 Rβ/2 , T (log n)c∗ > 1 ∨ Rβ/2 for some constants C1 , C2 , C3 > 0, and c∗ > 0. Then, there are constants c1 , c2 > 0 such that  inf sup PΣ,ψ kΣ̃ − Σk > c1 rn,p > c2 with Σ̃ (Σ,ψ)∈G0 (S,R)×Hβ (T ) rn,p := S 1/2 R1−β/2 T log n where the infimum is taken over all estimators Σ̃. −1+β/2 10 D. Belomestny, M. Trabs and A.B. Tsybakov The proof of this theorem is postponed to Section 8. We use the method of reduction to testing of many hypotheses relying on a control of the χ2 -divergence between the corresponding distributions, cf. Theorem 2.6 in [50]. The present high-dimensional setting introduces some additional difficulties. When the dimension p of the sample space is growing, an increasing number of derivatives of the characteristic functions has to be taken into account for the χ2 -bound. Achieving bounds of the correct order in p causes difficulty when p is arbitrarily large. We have circumvented this problem by introducing a block structure to define the hypotheses. The construction of the family of covariance matrices of Xj used in the lower bounds relies on ideas from Rigollet and Tsybakov [44], while the error distributions are chosen as perturbed β-stable distributions. To bound the χ2 -divergence, we need a lower bound on the probability density of Yj . It is shown by Butucea and Tsybakov [7] that the tails of the density of a one-dimensional stable distribution are polynomially decreasing. We generalize this result to the multivariate case (cf. Lemma 15 below) using properties of infinitely divisible distributions. We now give some comments on the lower bound of Theorem 6. Assuming S of order p means that we consider quite a sparse regime. We always have S 6 p2 . Recall also that S > p as the diagonal of the covariance matrix is included in the definition of S for the class G0 (S, R). An alternative strategy pursued in the literature is to estimate a correlation matrix, i.e., to assume that all diagonal entries are known and equal to one. However, this seems not very natural in the present noisy observation scheme. On the other hand, Theorem 6 shows that even in the sparse regime S = O(p) the estimation error tends to ∞ as n → ∞ for dimensions p growing polynomially in n. The logarithmic in n rate reflects the fact that the present semiparametric problem is severely ill-posed. Comparing the lower bound rn,p with the upper bound r̄n,p from Theorem 5, we see that they coincide if the dimension satisfies p = O(exp(cnγ )) for some γ ∈ [0, 1) and some c > 0. Thus, we have established the minimax optimal rate under this condition. Note also that we only loose a factor of order log log p for very large p, for instance, if p = en/ log n . 5. Discussion and extensions 5.1. The adaptivity issue Since the threshold τ (U∗ ) in Theorem 5 depends on unknown parameters R, T , and β, a natural question is whether it is possible to construct an adaptive procedure independent of these parameters that achieves the same rate. One possibility to explore consists in selecting τ in a data-driven way. Another option would be to construct estimators corresponding to values of R, T , and β on a grid, and then to aggregate them. For direct observations an adaptive choice of the threshold, more precisely a cross-validation criterion, has been proposed by Bickel and Levina [3] and was further investigated by Cai and Liu [8]. For noisy observations that we consider here, the adaptation problem turns out to be more delicate since not only an optimal constant has to be selected but also the order of magnitude of τ (U ) depends on the unknown parameter β. Often an upper bound R on the maximal entry of Σ is known, so that one does not need considering adaptation to R. Ignoring the issue of unknown R, the choice of the spectral radius U∗ p of the order R−1 log(n/ log(ep)) is universal, which reflects the fact that the estimation problem is severely ill-posed with dominating bias. Indeed, U∗ in Theorem 5 corresponds to undersmoothing such that the deterministic estimation error dominates the stochastic error without deteriorating the convergence rates. To construct an adaptive counterpart of τ , we need either an estimator of the error of an optimal procedure for estimating Σ under the | · |∞ -loss or an estimator of the “regularity” β. Therefore, extrapolating the argument of Low [38] to our setting, it seems plausible that an adaptive choice of τ cannot, in general, lead to the optimal rate. This does not exclude that optimal adaptive estimators can be constructed by other type of procedure, such as aggregation of estimators on the grid as mentioned above. Covariance estimation in high-dimensional deconvolution 11 5.2. Low-rank covariance matrix Alternatively to the above setting where the covariance matrix Σ is sparse, we can consider a lowrank matrix Σ. This is of particular interest in the context of factor models where, as discussed by Fan et al. [25, 26], an additional observation error should be taken into account. While [25, 26] estimate the covariance matrix of the noisy observations assuming that the errors have a sparse covariance structure, a spectral approach analogous to the one developed above allows for estimating directly the low-rank covariance matrix of X without sparsity restrictions on the error distribution. Such an approach, which is at first sight quite natural, would be to use the spectral covariance estimator Σ̂ from (5) together with a nuclear norm penalization. The following oracle inequality is an easy consequence of Theorem 1 in Koltchinskii et al. [33]. Proposition 7. Assume that M ⊆ Rp×p is convex and let τ > 0. On the event {2kΣ̂−Σk∞ 6 τ }, 2 the estimator Σ̂R τ := arg minS∈M {kS − Σ̂k + τ kSk1 } satisfies √ o n 1 + 2 2 2 R 2 2 τ rank(S) . kΣ̂τ − Σk 6 inf kS − Σk + S∈M 2 To use this proposition, we need to find a bound on the spectral norm kΣ̂ − Σk∞ that hold with high probability. The techniques from Cai et al. [11] designed for the case of direct observations allow us to obtain an upper bound on this quantity of order p up to a logarithmic in n/ log(p) factor. Thus, the convergence rate of this estimator is rather slow. Let us show now that another estimator can be constructed based the approach from Belomestny and Trabs [2], which allows for a better dependence on p. To this end, we write − hu, Σui uu> = hΘ(u), Σi with design matrix Θ(u) := − 2 , 2 |u| |u| u ∈ Rp \ {0}. For a weight function w : Rp → R+ supported on the annulus {u ∈ Rp : 14 6 |u| 6 21 } and a spectral radius U > 1, we set wU (u) := U −p w(u/U ), u ∈ Rp . Motivated by (2), we define the weighted Lasso-type estimator n ˆ  Re log ϕ (u)1 2 o n {|ϕn (u)|>ι} Σ̃λ := arg min − hΘ(u), M i w (u)du + λkM k (14) U 1 |u|2 M ∈M Rp for a convex set M ⊆ {M ∈ Rp×p : M > 0} and with nuclear norm penalisation for some λ > 0. We have inserted a truncation function 1{|ϕn (u)|>ι} for some threshold ι > 0 which increases the stability of the estimator by cutting off frequencies with too small point estimates ϕn (u). Under √ the universal choice ι = 1/(2 n) this indicator function will be one with high probability. The estimator Σ̃λ is associated to the weighted scalar product which replaces the classical empirical scalar product: ˆ hA, BiU := hΘ(u), AihΘ(u), BiwU (u)du and kAk2U := hA, AiU , Rd for matrices A, B ∈ Rp×p . As in [2, Lemma 3.2] we have for any for any positive semi-definite matrix A ∈ Rp×p an isometry with respect to the Frobenius norm ˆ |v1 |4 w(v)dv, κ w := kwkL1 . κ w kAk2 6 kAk2U 6 κ w kAk2 with κ w := 4 Rp |v| Adapting slightly the proof of Theorem 1 in [33], we obtain the following oracle inequality. 12 Theorem 8. D. Belomestny, M. Trabs and A.B. Tsybakov Let M be convex. Define ˆ   Re log ϕn (u)1{|ϕn (u)|>ι} Rn := − hΘ(u), Σi Θ(u)wU (u)du. 2 |u| Rp The estimator Σ̃λ from (14) satisfies on the event {kRn k∞ 6 λ}  kΣ̃λ − Σk2U 6 inf kM − Σk2U + C∗2 λ2 rank(M ) M ∈M for the constant C∗ = (1 + √ 2)/(2κ w ) depending only w. We omit the proof of this theorem as it is analogous to Theorem 3.4 in [2]. In combination with the isometry property we obtain an oracle inequality with respect to the Frobenius norm:  kΣ̃λ − Σk2 6 inf C1∗ kM − Σk2 + C2∗ λ2 rank(M ) M ∈M √ with C1∗ = κ w /κ w and C2∗ = (1 + 2)2 /(4κ 3w ). The best leading constant in this oracle inequality can be obtained by minimizing C1∗ with respect to w. We do not detail it here. To apply Theorem 8, we need a sharp probabilistic bound for kRn k∞ . At first sight, this might look similar to bounding kΣ̂ − Σk∞ in Proposition 7. However, the dependence on the dimension is much better because the design matrix satisfies kΘ(u)k∞ = 1. Consider the error distributions in the subclass of Hβ (T ) defined as follows: n o  Hβ0 (T ) := ψ characteristic function : log |ψ(u)| 6 T 1 + |u|β2 , u ∈ Rp ⊆ Hβ (T ). Theorem 9. Let T > 0, β ∈ [0, 2) and ψ ∈ Hβ0 (T ) and choose ι = 2√1 n . Then there are constants Ci = Ci (w) > 0, i = 1, 2, depending only on w, such that for any γ > 1 and any U > 1 satisfying √ 2 β 2 ekΣk∞ U /8+2T U 6 n we have P(kRn k∞ > λ) 6 3e−γ if 2 λ > C1 γ 2 β ekΣk∞ U /4+4T U √ + C2 T U −2+β . U2 n (15) The proof√is given in the appendix. The right-hand side of (15) is similar to the threshold (6), but without log p. Hence, this upper bounds depends on the dimension p only via spectral norm kΣk∞ .pIn the well-specified case, Σ ∈ M and optimizing over the spectral radius yields U of the −1+β/2 order (log n)/kΣk∞ and the corresponding λ of the order (kΣk−1 . The error bound ∞ log n) takes the form p 1−β/2 kΣ̃λ − Σk 6 C rank(Σ) kΣk∞ (log n)−1+β/2 with high probability. Here, C > 0 is a constant depending only on w and T . Note that this bound for the estimation error improves a corresponding result in [2]. In the direct observation case, we p −1/2 can choose U = kΣk∞ and obtain kΣ̃λ − Σk 6 CkΣk∞ rank(Σ)/n with high probability. 5.3. Elliptical distributions Most of the literature on high-dimensional covariance estimation relies on a sub-Gaussian assumption on the distribution of Xj . To relax the moment assumption and allow for heavy-tailed distributions, the rich class of elliptical distributions has been studied, see the review paper by Fan et al. [24]. We refer to Fang et al. [27] for an introduction to the theory of elliptical distributions. We will now outline how our approach can be generalized to the case where Xj follow a centered elliptical distribution, that is the characteristic function of Xj is of the form E[eihu,Xj i ] = Φ(u> Σu), u ∈ Rp , Covariance estimation in high-dimensional deconvolution 13 for some scalar function Φ : R → R and some positive definite matrix Σ, which is proportional to the covariance matrix. The function Φ is called the characteristic generator. It is easy to see that E[Xj Xj> ] = −2Φ0 (0)Σ provided that Φ is differentiable. We impose the mild assumption that Φ(·) = exp(−η(·)) for some function η : R+ → R+ . Then, the characteristic function of the observations Yj has the form  ϕ(u) = exp − η(u> Σu) + log ψ(u) , u ∈ Rp . We recover the Gaussian case with η(x) = x2 . Other important examples are multivariate α-stable distributions where η(x) = xα/2 for α ∈ (0, 2] or normal mixtures. To adapt the estimation strategy from Section 2, we assume that | Re log ψ(u)| decays slower than η(u> Σu). If η is differentiable and strictly monotone with inverse function η −1 , a first order Taylor approximation and the fact that (η −1 )0 = 1/(η 0 ◦ η −1 ) yield    log |ψ(u)| . η −1 − log |ϕ(u)| = η −1 η u> Σu − log |ψ(u)| ≈ u> Σu − 0 > η (u Σu) If the last term is of smaller order than u> Σu = hu, Σui for |u| → ∞, we can use these heuristics to estimate Σ. The argument is made rigorous by the following lemma proved in the appendix. Lemma 10. Let E[eihu,Xj i ] = exp(−η(u> Σu)) for a positive-definite matrix Σ and a strictly monotone function η : R+ → R+ which is twice continuously differentiable outside a neighbourhood of the origin. Assume further that log |ψ(u)| 6 T (1 + |u|)β η 0 (hu, Σui) and |xη 00 (x)| 6 T |η 0 (x)|, for all u ∈ Rp , x ∈ R+ , for some β < 2 and T > 0. For all u ∈ Rp with |u| > (2β+1 T 2 /λmin )1/(2−β) ∨ 1 we then have  log |ψ(u)| 4T 2 η −1 − log |ϕ(u)| − hu, Σui − 0 6 |u|2β−2 , η (hu, Σui) λmin where λmin > 0 is the smallest eigenvalue of Σ.  A major consequence of this lemma for our purposes is that |u|−2 η −1 − log |ϕ(u)| = −2+β hu,Σui |u|2 Φ O(|u| ) as |u| → ∞. Thus, we can act as in Section 2. This leads to the estimator Σ̂ Φ (σ̂i,j )i,j=1,...p for Σ where + =  1 −1 η − Re log ϕn (U u(i) ) , U2 Φ Φ  σ̂i,i + σ̂j,j 1 Φ σ̂i,j := 2 η −1 − Re log ϕn (U u(i,j) ) − for i 6= j. U 2 Applying an argument as in Lemma 10 together with the linearization for log ϕn , we can bound the Φ stochastic error of the estimators σ̂i,j . We obtain the following proposition analogous to Theorem 1. The proof is again postponed to the appendix. √ Proposition 11. Let the assumptions ofpLemma 10 be satisfied. Let γ > 2 and suppose that U > (22+β T 2 /λmin )1/(2−β) ∨ 1 satisfies 8γ (log(ep))/n < ∆Σ,U for Φ σ̂i,i := ∆Σ,U := min η 0 (U 2 hu(i,j) , Σu(i,j) i)|ϕ(U u(i,j) )|. i,j Set 12γ τ (U ) = 2 U ∆Σ,U r log(ep) + 4(T + 1)U −2+β . n 2 Then, for c∗ = 12e−γ ,  PΣ,ψ  2 Φ max |σ̂i,j − σi,j | < τ (U ) > 1 − c∗ p2−γ . i,j=1,...,p 14 D. Belomestny, M. Trabs and A.B. Tsybakov Under more specific assumptions on η it is possible to derive a uniform bound for ∆Σ,U . Since |ϕ(u)| > exp(−c Re η(u> Σu)) for some constant c > 0, the stochastic error may not explode as fast as for normal distributions resulting in possibly faster convergence rates depending on η. Relying on Σ̂Φ , hard and soft thresholding estimators can be constructed with similar behaviour as for the Gaussian case. For the estimator Σ̂Φ , the function η is assumed to be known. It would be interesting to extend the approach of this section to the case where η belongs to a parametric family introducing an additional nuisance parameter. 6. Numerical example In this section we numerically analyse the performance of the soft thresholding estimator for the convolution model Y = X +ε, where X follows a p-dimensional normal distribution with zero mean and covariance matrix Σ and ε is independent of X and has an elliptical distribution. Specifically, we study the model d √ ε = W AZ, where Z ∼ N (0, Ip ) has a standard p-dimensional normal distribution, A is a p × p matrix and W is a nonnegative random variable with a Laplace transform L. As can be easily seen, the characteristic function of ε is given by  >    u AA> u ψ(u) = E eihu,εi = L . 2 Thus ε has indeed an elliptical distribution. We assume that W follows a Gamma distribution with the density pW (x) = Γ(ϑ)−1 xϑ−1 e−x , x ≥ 0, for some ϑ > 0. Then we have  −ϑ u> AA> u ψ(u) = 1 + . 2 Our aim is to compare several estimators of the covariance matrix Σ based on n independent copies Y1 , . . . , Yn of Y . In the direct observations case where ε = 0 we may apply the sample covariance matrix n 1X Σcov := Σ∗Y = Yj Yj> . (16) n j=1 Adapting to sparsity in a high-dimensional framework, a soft thresholding estimator based on Σcov is given by the solution of the optimisation problem, cf. Rothman et al. [46],  Σsτ := arg min |S − Σcov |22 + 2τ |S|1 , (17) S∈Rp×p with threshold parameter τ > 0. In some situations positive definiteness of the covariance matrix estimate is desirable when the covariance estimator is, for example, applied to supervised learning or if one needs to generate samples from the underlying normal distribution. In order to achieve positive definiteness, Rothman [45] proposed to use the following modification of (17):  Σpds := arg min |S − Σcov |22 + 2τ |S|1 − λ log |S| , (18) τ S∈Rp×p , S0 where |S| denotes the determinant of the matrix S and λ is a fixed small number. The logarithmic barrier term in (18) ensures the existence of a positive definite solution, since log |S| = Pp j=1 log(σj (S)), where σj (S) is the jth largest eigenvalue of S > 0. In order to solve (18), an algorithm similar to the graphical lasso algorithm can be applied, see Friedman et al. [28]. 15 0.1710 0.1695 0.1700 0.1705 Q(τ) 0.1715 0.1720 Covariance estimation in high-dimensional deconvolution 0.1 0.2 0.3 0.4 0.5 τ Figure 1. The objective function Q100 (τ ) for the choice of the tuning parameter τ Turning back to our deconvolution problem, we have already seen that the estimators (16), (17) and (18) fail to deliver a consistent estimator for Σ unless ε is zero. Hence, we finally introduce the positivity preserving version of the spectral soft thresholding estimator from (9):  Σsps arg min |S − Σ̂|22 + 2τ |S|1 − λ log |S| . (19) τ := S∈Rp×p , S0 The tuning parameter τ can be chosen using a method introduced in [3]. The data is randomly partitioned N times into a training set of size n1 and a validation set of size n2 with n2 = bn/ log(n)c and n1 = n − n2 . The tuning parameter is then selected as τb = arg minτ QN (τ ), where QN (τ ) = N X 1) kΣsps,(m,n − Σ̂(m,n2 ) k2 , τ m=1 sps,(m,n ) 1 where Στ is the estimator, with penalty parameter τ, computed with the training set of the mth split and Σ̂(m,n2 ) is the estimator (5) computed with the validation set of the mth split. First, we consider a tridiagonal model where the population covariance matrix Σ has entries σij = 0.4 · 1(|i − j| = 1) + 1(i = j), i, j ∈ {1, 2, . . . , p}. Using this covariance model with p = 20, we generate n = 50 realizations of independent normal random vectors with mean zero and the covariance matrix Σ. Adding an independent noise ε with the above elliptical distribution with A = Id , depending on the parameter ϑ, we compute three estimates Σcov , Σpds and Σsps τ τ . This procedure was repeated 500 times. The parameters of the algorithms are τ = 0.25, λ = 10−4 , where the parameter τ is selected as a minimum of the function Q100 (τ ) shown in Figure 1. The results are presented in Figure 2 for the case of direct observations and for three different noise specifications corresponding to the values ϑ ∈ {0.5, 1, 2}. The used values of the tuning parameter U are 1, 3, 3, respectively. While in the case of direct observations, the estimator Σsps τ has no advantages over Σcov and Σpds τ , it significantly outperforms these two estimators in the case of non-zero noise. We do not only observe a strong bias for Σcov and Σpds in the presence of τ noise, but also a much better concentration of the spectral estimator Σsps compared to the other τ two procedures. The higher is the variance of the noise, the stronger are these bias and variance effects. 16 D. Belomestny, M. Trabs and A.B. Tsybakov ϑ = 0.5 ● 0.40 0.18 Direct 0.35 0.16 ● ● ● ● ● ● ● ● 0.12 0.25 0.14 0.30 ● ● cov pds 0.20 ● 0.15 0.10 ● ● ● ● ● ● ● ● sps cov sps ϑ=2 0.30 0.5 0.35 0.6 0.40 0.7 0.45 0.8 0.50 ϑ=1 pds ● 0.15 0.2 0.20 0.3 0.25 0.4 ● ● cov pds sps cov pds sps Figure 2. Tridiagonal Σ : box plots of the estimation errors kΣoτ − Σk for o ∈ {cov, pds, sps} in the case of the d √ convolution model Y = X + ε with ε = W Z, where Z ∼ N20 (0, I20 ) and W ∼ Gamma(ϑ). Now, let us consider the case of normal noise. Note that this situation corresponds to β = 2 and is not covered (at least formally) by our theoretical study. Specifically we generate samples from the model Y = X + ε, where X follows a p-dimensional normal distribution with zero mean and covariance matrix Σ and ε is independent of X and has also normal distribution with zero mean and covariance matrix ρ2 I. We again consider tridiagonal model where the population covariance matrix Σ has entries σij = 0.4 · 1(|i − j| = 1) + 1(i = j), i, j ∈ {1, 2, . . . , p}. In Figure 3 the corresponding estimation errors for three methods are presented in the case of p = 20, τ = 0.4, n = 50 and ρ ∈ {0.1, 0.5}. As one can see, even in the case of misspecified models the spectral estimator continues to perform reasonably well. Finally, we study the situation where the matrix Σ is block diagonal with the elliptical error distribution from above. In particular, we generate positive definite matrix with randomly-signed, non-zero elements. A shift is added to the diagonal of the matrix so that its condition number equals p. Using this covariance model, we generated n = 100 realizations of independent 20dimensional normal random vectors with mean zero and covariance Σ. We then proceed as before considering the case of direct observations and ϑ ∈ {0.5, 1, 2}. The tuning parameter U was taken to be 3 for all three cases. The errors show a similar behaviour as in the first case, see Figure 4. Covariance estimation in high-dimensional deconvolution 17 0.20 0.18 0.18 0.20 0.22 ρ = 0.5 0.22 ρ = 0.1 ● 0.14 ● ● 0.12 0.12 0.14 ● 0.16 ● 0.16 ● cov pds sps cov pds sps Figure 3. Tridiagonal Σ : box plots of the estimation errors kΣoτ − Σk for o ∈ {cov, pds, sps} in the case of the d convolution model Y = X + ε with ε = Z, where Z ∼ N20 (0, ρI20 ). 7. Proofs 7.1. Concentration of the spectral estimator For the proof of Theorem 1, we need the following lemmas. Set S(u) = Re(log ϕn (u) − log ϕ(u)). Lemma 12. For any x ∈ (0, 1], and any u ∈ Rp such that ϕ(u) 6= 0,    x P |S(u)| > x 6 3P |ϕn (u) − ϕ(u)| > |ϕ(u)| . 2 Proof. We have S(u) = log  ϕ (u) − ϕ(u)  ϕn (u) ϕn (u) − ϕ(u) n 6 log +1 6 . ϕ(u) ϕ(u) ϕ(u) n   Thus, P S(u) > x 6 P |ϕn (u) − ϕ(u)| > x|ϕ(u)| for all x > 0. Next, on the event |ϕn (u) − o ϕ(u)| 6 12 |ϕ(u)| we have −S(u) = log  ϕ (u) − ϕ(u)   ϕ (u) − ϕ(u)  ϕ(u) ϕn (u) − ϕ(u) n n 6 log +1 6 log 2 +1 6 2 . ϕn (u) ϕn (u) ϕ(u) ϕ(u) Therefore, for any x > 0,      1 P − S(u) > x 6 P 2|ϕn (u) − ϕ(u)| > x|ϕ(u)| + P |ϕn (u) − ϕ(u)| > |ϕ(u)| . 2   Since x ∈ (0, 1], we obtain P − S(u) > x 6 2P |ϕn (u) − ϕ(u)| > (x/2)|ϕ(u)| and hence the lemma. Lemma 13. √ For any κ ∈ (0, n/8] we have  2 3κ  P |ϕn (u) − ϕ(u)| > √ 6 4e−κ . n 18 D. Belomestny, M. Trabs and A.B. Tsybakov ϑ = 0.5 0.60 0.65 ● 0.40 0.45 Direct ● ● ● ● 0.45 0.35 0.50 0.55 ● cov pds sps cov ϑ=1 pds sps ϑ=2 ● 1.0 0.8 1.2 0.9 ● ● ● 0.8 0.7 ● ● 0.6 ● ● 0.6 ● ● ● cov pds sps cov pds sps Figure 4. Block diagonal Σ : box plots of the estimation errors kΣoτ − Σk for o ∈ {cov, pds, sps} in the case of the d √ convolution model Y = X + ε with ε = W Z, where Z ∼ N20 (0, I20 ) and W ∼ Gamma(ϑ). Proof. We decompose ϕn − ϕ into real and imaginary part. Both can be estimated analogously, such that we consider only the real part. We write n  1X Re ϕn (u) − ϕ(u) = ξk (u) with n   ξk (u) := Re eihu,Yk i − Re ϕ(u). k=1 The independent and centred random variables ξk (u), k = 1, . . . , n, satisfy |ξk (u)| 62 and Var(ξk (u)) 6 1 − |ϕ(u)|2 6 1. √ Using the fact that κ ∈ (0, n/8] and then applying Bernstein’s inequality we find √    2 3κ  2κ 2κ2  6 2e−κ . P Re ϕn (u) − ϕ(u) > √ 6 P Re ϕn (u) − ϕ(u) > √ + 3n 2 n n Corollary 14. p For any γ > 0 and u ∈ Rp such that γ (log(ep))/n 6 |ϕ(u)|/8 we have p  2 6γ log(ep)  P |S(u)| > √ 6 12(ep)−γ . n|ϕ(u)| Covariance estimation in high-dimensional deconvolution 19 √ p 6γ log(ep) Proof. We use Lemma 12 with x = √n|ϕ(u)| and then Lemma 13 with κ = γ log(ep). To apply q q Lemma 12 we need 6γ lognep 6 |ϕ(u)|, while Lemma 13 requires 8γ lognep 6 1. Since |ϕ(u)| 6 1 both conditions are satisfied. 8. Proof of the lower bound: Theorem 6 Since C1 p 6 S 6 C2 p it is enough to assume that 2p 6 S (otherwise we consider a (C1 p/2)dimensional subspace). Furthermore, we will assume without loss of generality that S = p + 2k for some integer k > 1 corresponding to p non-zero diagonal entries and 2k non-zero off-diagonal entries of the covariance matrix. Note that under our assumptions, S, k and p are of the same order up to constants: S S−p S C2 p 6k= 6 6 . (20) 4 2 2 2 Let PΣ,ψ denote the distribution of Yj corresponding to the covariance matrix Σ ∈ Gq (S, R) and to the error distribution with characteristic function ψ ∈ Hβ (T ). Set   1 ϕΣ,ψ (u) := EΣ,ψ [eihu,Yj i ] = exp − hu, Σui + log ψ(u) . 2 Applying Theorem 2.6 in [50], it is sufficient to construct a finite number of pairs (Σi , ψi ) with Σ0 = RIp , ψ0 ∈ Hβ (T ) and (Σi , ψi ) ∈ Gq (p + 2k, R) × Hβ (T ) for i = 1, . . . , M , such that the following two conditions hold: −1+β/2 (i) kΣi − Σj k > CS 1/2 T R−1 log n for all 0 6 i < j 6 M and some constant C > 0, ⊗n ⊗n 2 (ii) χ (PΣj ,ψj , PΣ0 ,ψ0 ) 6 M/3 for all j = 1, . . . , M . Step 1: Constructing the pairs (Σi , ψi ). Without loss of generality, consider p that can be decomposed as p = Lb where b and L are integers. For a block size b ∈ N and L = p/b ∈ N let B ⊆ Rp×p denote the set of symmetric block diagonal matrices B = diag(A1 , . . . , AL ) satisfying: • B = (bij ) has exactly k non-zero over-diagonal entries, all equal to 1; • bii = 0 for i = 1, . . . , n; • Al ∈ Rb×b for l = 1, . . . , L. There are N := Lb(b − 1)/2 = p(b − 1)/2 positions over the diagonal of B where the entry 1 can possibly appear. Since k 6 C2 p/2, we have k < N for b > C2 + 1. In what follows, we select b > C2 + 1, which is a fixed integer independent of k and p. Lemma A.3 in Rigollet and Tsybakov [43] yields that there is a subset {B1 , . . . BM } ⊆ B such that for any i 6= j we have kBi − Bj k2 > (k + 1)/4 and for some constants C10 , c01 > 0,   eN  c0 bp  log M > C10 k log 1 + > C10 k log 1 + 1 . (21) 4k k We consider now the following family of matrices Σ0 = RIp , Σj = RIp + where  δn,p = R1/2 6 log ρT 2−β δ Bj , b n,p j = 1, . . . , M, −1/2 n , ρ0 log(1 + c01 bp/k) (22) and ρ, ρ0 > 0 are small enough constants to be chosen later. By construction and using (20) we have   −(1−β/2) T 2−β 1/2 T n kΣi − Σj k > ρ δn,p k > k 1/2 6R−1 log  0 c bp 2b 2b ρ0 log 1 + 1k −(1−β/2) > c02 T S 1/2 R−1 log n 20 D. Belomestny, M. Trabs and A.B. Tsybakov 2−β is where c02 > 0 is a constant. Moreover, since by assumption of the theorem, R−1 T b−1 δn,p uniformly bounded, the matrices Σi are diagonally dominant and thus positive semi-definite for sufficiently small ρ. We conclude that the Σi thus defined are covariance matrices satisfying the lower bound in (i) above. We now turn to the construction of characteristic functions ψj . To have an as small as possible L2 -distance between the characteristic functions, we choose ψj such that log ψj (u) − log ψ0 (u) mimics hu, (Σj − Σ0 )ui/2 for small frequencies, keeping the block structure. In what follows, we denote by F the Fourier transform operator. On each block of the matrix Bj = diag(Aj,1 , . . . , Aj,L ), for j = 1, . . . , M, l = 1, . . . , L, we define 2−β ρT δn,p hu, Aj,l uiFK(δn,p u) + log ψ0,l (u), ˆ 2b  T dx, log ψ0,l (u) := eihu,xi − ihu, xi1{β>1} − 1 ξb |x|β+b b R u ∈ Rb , log ψj,l (u) := u ∈ Rb , where ξb > 0 is a constant depending only on b, and K ∈ L1 (Rb ) ∩ C 2 (Rb ) is a function satisfying FK ∈ C ∞ (Rb ), and FK(u) = 1 for |u| 6 1, FK(u) = 0 for |u| > 2, and 0 6 FK(u) 6 1 ∀ u. Writing ul := (ub(l−1)+1 , . . . , ubl ) for 1 6 l 6 L and u ∈ Rp , we then set ψj (u) := L Y ψj,l (ul ), j = 0, . . . , M. l=1 Note that ψ0,l is the characteristic function of a b-dimensional symmetric stable distribution, cf. Sato [48, Thm. 14.3]. To check that ψ0 ∈ Hβ (T ) is satisfied, we use Theorem 14.10 in [48], which yields log |ψ0 (u)| 6 L X log |ψ0,l (u)| 6 L X l=1 l=1 Cβ T 2π b/2 l β T 2π b/2 |u | 6 Cβ |u|β , ξb Γ(b/2) ξb Γ(b/2) β where Cβ > 0 is a constant depending only on β and where (b − 1)-dimensional sphere. Thus, choosing ξb = c 2π b/2 Γ(b/2) is the surface area of the 2π b/2 Γ(b/2) (23) for some sufficiently large c > 0 guarantees that ψ0 ∈ Hβ (T ). Note that ξb is bounded uniformly in b. We also have ψj ∈ Hβ (T ) for sufficiently small ρ since maximal singular value kAj,l k∞ 6 b and L L 2−β X ρT δn,p ρkKkL1 T 2−β X hul , Aj,l ul iFK(δn,p ul ) 6 δn,p kAj,l k∞ |ul |2 1{|ul |62/δn,p } 2b 2b l=1 l=1 6 ρkKkL1 T 2−β δn,p 2b L X l=1 b 2 2−β l β |u | δn,p (24) 6 2ρkKkL1 T |u|ββ . It remains to verify that ψj,l , l = 1, . . . , L are indeed characteristic functions. Denoting Aj,l = (aj,l k,m )k,m=1,...,b and 1 X j,l νj,l := ak,m (∂k ∂m K), 2b k,m Covariance estimation in high-dimensional deconvolution 21 where ∂k stands for the derivative with respect to kth coordinate, we rewrite the characteristic exponent as b 2−β X ρT δn,p aj,l k,m uk ul FK(δn,p u) + log ψ0 (u) 2b k,l=1 h i −β−b −1 = −F ρT δn,p νj,l (δn,p ·) (u) + log ψ0 (u) ˆ   T −β−b − ρT δ ν (x/δ ) dx = eihu,xi − ihu, xi1{β>1} − 1 j,l n,p n,p ξb |x|β+b Rb ´ where in the last line we have used the relations Rb νj,l (x)dx = Fνj,l (0) = 0 and, if β > 1, ´ ihu, xiνj,l (x)dx = hu, ∇(Fνj,l )(0)i = 0 for any u ∈ Rb . Consequently, ψj,l is the characteristic Rb −β−b function of an infinitely divisible distribution with Lévy density T ξb−1 |x|−β−b −ρT δn,p νj,l (x/δn,p ) provided that the latter is non-negative. To check this, it is enough to verify the equivalent condition ρξb νj,l (x) 6 |x|−β−b for all x ∈ Rb \ {0} and some sufficiently small ρ. We have log ψj,l (u) = k|x|β+b νj,l (x)k∞ 6 kνj,l k∞ + k|x|2d(β+b)/2e νj,l (x)k∞ 6 kFνj,l kL1 + k∆d(β+b)/2e Fνj,l kL1 (25) where ∆ denotes the Laplace operator, dxe is the minimal integer greater than x, and k·kLq stands 1 hu, Aj,l uiFK(u), and thus for the Lq (Rb )-norm. By construction, Fνj,l (u) = 2b kFνj,l kL1 6 kAj,l k∞ |u|2 FK(u) 2b L1 6 1 |u|2 FK(u) 2 L1 where we have used the inequality kAj,l k∞ 6 b. Since the support of FK is compact the last expression is bounded. The second term in (25) admits an analogous bound. Step 2: Bounding the χ2 -divergence. Due to the block structure, for any pair (Σi , ψi ) we have L Y PΣi ,ψi = Pi,l l=1 for all i = 1, . . . , M , l = 1, . . . , L, where Pi,l is the convolution of the normal distribution N (0, RIb + ρT 2−β b b δn,p Ai,l ) on R with a distribution given by the characteristic function ψi,l . We also denote by P0 the convolution of N (0, RIb ) with the stable distribution given by ψ0,l . We have n ⊗n 2 χ2 (P⊗n −1 Σi ,ψi , PΣ0 ,ψ0 ) = 1 + χ (PΣi ,ψi , PΣ0 ,ψ0 ) = L Y 1 + χ2 (Pi,l , P0 ) n − 1. (26) l=1 Thus, to check condition (ii) stated at the beginning of this subsection, we need to bound from above the value 2 ˆ fi,l (x) − f0 (x) 2 dx (27) χ (Pi,l , P0 ) = f0 (x) f0 (x)>0 where fi,l and f0 are the densities of Pi,l and P0 , respectively. To this end, we first establish a lower bound for f0 , which is the density of the convolution of a normal distribution on Rb with zero mean and covariance matrix RIb and a stable distribution on Rb . If there is no Gaussian component, we write R = 0 referring to a convolution of the stable distribution with a Dirac measure in zero. Lemma 15. In the special case of a standard stable density f0 (R = 0, T = 1) and β ∈ (0, 2) we have f0 (x) > Cb (1 + |x|β+b )−1 for a constant Cb > 0 depending only on b. If R > 0 and T > 0 are such that T (log n)−c 6 CRβ/2 for some C, c > 0, we have the lower bound f0 (x) > Cb0 R−b/2 (log n)−cb/β 1 (1 + T −1−b/β |x|b+β ) 22 D. Belomestny, M. Trabs and A.B. Tsybakov for another constant Cb0 > 0. Proof. Step 1: We first consider the case R = 0, T = 1 and start with β ∈ (0, 1). We have f0 = hc ∗ hf where h 1 ˆ  i  1 − 1 dy (x), hc (x) :=F −1 exp eihu,yi − 1 ξb |y|61 |y|β+b h 1 ˆ i  1 hf (x) :=F −1 exp eihu,yi − 1 dy (x), x ∈ Rb , ξb Rb |y|β+b ∨ 1 are the densities of an infinitely divisible distribution with Lévy density νc (x) := ξ1b ( |x|1β+b − 1 , x ∈ Rb , 1)1{|x|61} and an infinitely divisible distribution with Lévy density νf (x) := ξb (|x|β+b ∨1) respectively. Since νf is integrable, hf is the density of a compound Poisson distribution which can be written as convolution exponential, cf. [48, Remark 27.3], hf = e −νf (Rb ) ∞ X νf∗j j=0 (28) j! where νf∗j denotes the j-fold convolution of νf , and νf∗0 := δ0 is the Dirac measure in zero. Therefore, ∗j ∞  b X hc ∗ νf b f0 = e−νf (R ) > e−νf (R ) hc ∗ νf , (29) j! j=0 where, with some abuse of notation, νf (Rb ) stands for the total mass of νf . Due to the compactness of the support of the Lévy measure corresponding to hc , the density ´ hc admits a finite exponential moment [48, Theorem 26.1], that is there exists α > 0 such that Rb eα|y| hc (y)dy < ∞. For any x 6= 0, we have ˆ  νf (x − y) − νf (x) hc (y)dy |hc ∗ νf (x) − νf (x)| = b R ˆ ˆ 6 νf (x − y) − νf (x) hc (y)dy + νf (x − y) − νf (x) hc (y)dy |y|6|x|/2 |y|>|x|/2 Rewriting νf (x) = µ(|x|) with µ(r) := ξb−1 (r−β−b ∧ 1), we see that the expression in the last display does not exceed ˆ ˆ 0 sup |µ (|v|)| |v|6|x| 6  |y|hc (y)dy + 2kνf k∞ e Rb sup |µ0 (|v|)| + 2kνf k∞ e−α|x|/2 |v|6|x| −α|x|/2 ˆ eα|y| hc (y)dy |y|>|x|/2 (|y| ∨ eα|y| )hc (y)dy. (30) Rb By the polynomial decay of µ we have |µ0 (|x|)| = o(νf (x)) as |x| → ∞ implying that |hc ∗ νf (x) − νf (x)| = νf (x)o(1) as |x| → ∞. Combining (29) and (30) yields f0 (x) > e−νf (R b )   b hc ∗ νf (x) = e−νf (R ) νf (x) 1 + o(1) > C , |x|β+b ∀|x| > r, (31) where C > 0 and r > 0 are constants depending only on b. From the representation (28) we see that f0 is strictly positive. By the decay of its characteristic function, f0 is also continuous. Together with (31), we conclude that f (x) > Cb (1 + |x|β+b )−1 for β ∈ (0, 1), R = 0, T = 1. Covariance estimation in high-dimensional deconvolution 23 In the case β ∈ [1, 2), R = 0, T = 1 the proof ´ is analogous with ´ the only difference that the convolution exponential hf is shifted by a := ( Rb x1 νf (x)dx, . . . , Rb xb νf (x)dx) ∈ Rb , i.e., b hf = e−νf (R ) δa ∗ ∞ X ν ∗j  f j=0 j! where δa is the Dirac distribution at a. Thus, we replace everywhere above gb ∗ hc by gb ∗ hc ∗ δa . Clearly, the argument remains valid with such a modification. Step 2. We now denote by f the density f0 from Step 1 corresponding to R = 0, T = 1. β Thus, f is a density with characteristic function e−C|u| for some C > 0. With this notation, for β R = 0, T > 0 we have f0 (x) = F −1 [e−CT |u| ](x) = T −b/β f (T −1/β x). We now turn to the case R > 0, T > 0. Denoting the density of the normal distribution N (0, Ib ) by g and using the lower bound from Step 1, we obtain    f0 (x) = T −b/β f (T −1/β ·) ∗ R−b/2 g(R−1/2 ·) (x) ˆ 2 T 2/β Cb e− 2R |y| dy > (2πR)−b/2 −1/β b+β x − y| Rb 1 + |T ˆ 2/β 1 1 − T2R |y|2 −b/2 e > Cb (2πR) dy (1 + 2b+β−1 T −1−b/β |x|b+β ) Rb 1 + 2β+b−1 |y|b+β ˆ T 2/β 2 rb−1 1 2π b/2 Cb (2πR)−b/2 e− 2R r dr, > b+β b+β −1−b/β b+β 4 Γ(b/2) (1 + T |x| ) R+ 1 + r where in the third line we have used the fact that b + β > 1 and the convexity of |x|b+β ). Using the assumption (log n)−c 6 CRβ/2 T −1 , we deduce that with some constants C̄b , Cb0 > 0 depending only on b, ˆ c 2/β 2 rb−1 1 −b/2 f0 (x) > C̄b R e−(C(log n) ) r /2 dr b+β −1−b/β b+β (1 + T |x| ) R+ 1 + r ˆ 2 rb−1 1 > C̄b R−b/2 (C(log n)c )−b/β e−r /2 dr −1−b/β b+β (1 + T |x| ) R+ 1 + (C(log n)c )−1−b/β rb+β ˆ 2 rb−1 e−r /2 1 > Cb0 R−b/2 (log n)−cb/β dr. (1 + T −1−b/β |x|b+β ) R+ 1 + rb+β Since the last integral is finite and positive we obtain the result of the lemma for R > 0, T > 0. Due to Lemma 15 and the assumption T (log n)−1+β/2 6 C3 Rβ/2 , the χ2 -divergence (27) satisfies ˆ 2 χ2 (Pj,l , P0 ) 6CRb/2 (log n)(1−β/2)b/β fj,l (x) − f0 (x) dx (32) Rb ˆ 2  1 + 1+b/β |x|β+b fj,l (x) − f0 (x) dx . T Rb We now bound separately the first and the second integral in (32). Using Plancherel’s identity, we rewrite the first integral as ˆ 2 1 2 fj,l (x) − f0 (x) dx = ϕj,l − ϕ0 L2 , (33) b (2π) b R where ϕj,l and ϕ0 are the characteristic functions corresponding to fj,l and f0 , respectively. We now consider the difference of the characteristic exponents  1 ηj (u) := log ϕj,l (u) − log ϕ0 (u) = − hu, Āj,l ui 1 − FK(δn,p u) , 2 24 D. Belomestny, M. Trabs and A.B. Tsybakov 2−β where Āj,l = (ρT δn,p /b)Aj,l . A first order Taylor expansion yields ˆ 1 etηj (u) dt ϕj,l (u) − ϕ0 (u) = ηj (u)ϕ0 (u) 0 = ηj (u)e−R|u| 2 ˆ /2 0 1  t 1−t t ψ0,l (u)ψj,l (u) exp − hu, Āj,l ui dt. 2 −1 Due to the property 1 − FK(δn,p u) = 0 for |u| 6 δn,p and the elementary inequality x2 e|x| 6 exp(3|x|), ∀x ∈ R, we obtain ˆ kϕj,l − ϕ0 k2L2 1  R  2 t ηj (u) exp − |u|2 − hu, Āj,l ui dt 2 2 L2 0 ˆ 1ˆ   1 6 |hu, Āj,l ui|2 exp − R|u|2 − thu, Āj,l ui du dt 4 0 |u|>1/δn,p ˆ   1 6 exp − R|u|2 + 3|hu, Āj,l ui| du 4 |u|>1/δn,p ˆ   1 2−β 6 exp − (R − 3ρT δn,p )|u|2 du, 4 |u|>1/δn,p 6 where we have used the bound kAj,l k∞ 6 b. Finally, we choose ρ > 0 sufficiently small to satisfy 2−β 3ρT δn,p 6 R/4. Then, kϕj,l − ϕ0 k2L2 2 1 6 e−R/(4δn,p ) 4 ˆ e−R|u| −1 |u|>δn,p 2 /2 du 6 2 1  2π b/2 −R/(4δn,p ) e . 4 R (34) To take into account the first factor in (32), we note that the definition of δn,p in (22) imply 2 Rb/2 (log n)(1−β/2)b/β R−b/2 e−R/(12δn,p ) 6 (log n)(1−β/2)b/β  ρ0 log(1 + c0 bp/k) 1/2 1 n , (35) where the last expression is uniformly bounded by a constant. Combining this remark with (33) and (34), we finally get that there is a constant C > 0 such that ˆ  2 R  Rb/2 (log n)(1−β/2)b/β fj,l (x) − f0 (x) dx 6 C exp − 2 . (36) 6δn,p Rb To bound the second integral in (32) we use the following proposition proved in the supplementary material in Appendix C. Proposition 16. There is a constant C > 0 depending only on the kernel K and on b such that, for all β ∈ (0, 2) and j = 1, . . . , M , l = 1, . . . , L, ˆ  2 R  (37) ξb |x|β+b fj,l (x) − f0 (x) dx 6 C(1 ∨ Rβ/2 ) exp − 2 . 5δn,p Rb This proposition and the assumption T (log n)c∗ > 1 ∨ Rβ/2 yield, via an argument analogous to (35), that (1−β/2)b/β (log n) Rb/2 T 1+b/β ˆ 2 |x|β+b fj,l (x) − f0 (x) dx Rb 6 C 0 (log n)(1−β/2)b/β   Rb/2 ∨ R(b+β)/2 R  R  exp − 6 C exp − 2 2 5δn,p 6δn,p T (b+β)/β (38) Covariance estimation in high-dimensional deconvolution 25 where C, C 0 > 0 are constants. Combining (32), (36) and (38) and using the definition of δn,p in (22), we find  ρ0 log(1 + c01 bp/k) Cρ0 log M ρ00 log M R  6C χ2 (Pj,l , P0 ) 6 C exp − 2 6 := , (39) 6δn,p n C10 kn kn where the last inequality follows from (21). Taking into account (26) and (39) we get    pρ00 log M  00 ⊗n 2 − 1 6 M 2ρ /b − 1, (40) χ2 (P⊗n Σj ,ψj , PΣ0 ,ψ0 ) 6 exp Ln max χ (Pj,l , P0 ) − 1 6 exp l bk where we have used that, by construction, L = p/b and p 6 2k. Finally, choose ρ0 (and thus 00 ρ00 ) small enough to guarantee that M 2ρ /b − 1 6 M/3. Hence, condition (ii) is verified, which concludes the proof of the theorem. Appendix A: Proof of Theorem 9 For the later reference we set ξU := inf |u|6U/2 |ϕ(u)| and introduce the events  Ω(u) := |ϕn (u) − ϕ(u)| 6 |ϕ(u)|/2 , u ∈ Rp . Due to the decomposition (2), we obtain the bound kRn k∞ where Sn(1) Sn(2) Dn S (1) + Sn(2) + Dn , (41) ˆn  kΘ(u)k∞ wU (u)du, := Re log ϕn (u)1{|ϕn (u)|>ι} − log ϕ(u) 1Ω(u) |u|2 p R ˆ kΘ(u)k∞ := log |ϕn (u)|1{|ϕn (u)|>ι} − log |ϕ(u)| 1Ω(u)c wU (u)du, |u|2 Rp ˆ kΘ(u)k∞ log |ψ(u)| wU (u)du. := |u|2 Rp 6 (i) Here, Sn are stochastic error terms and Dn is a deterministic error term. Using the decay of ψ ∈ Hβ0 (T ), the form of the support of wU and the fact that kΘ(u)k∞ = 1, we obtain ˆ w(v) Dn 6 16U −2 sup log |ψ(u)| dv 6 C(w)T U −(2−β) (42) 2 |u|6U/2 Rp |v| for a constant C(w) > 0 depending only on w. √ (1) To bound Sn in (41), we first note that we have on Ω(u) under the assumption ξU > 1/ n 1 |ϕn (u)| > |ϕ(u)| − |ϕn (n) − ϕ(u)| > |ϕ(u)|/2 > √ = ι, 2 n for all u in the support of wU . Thus, the indicator function 1{|ϕn (u)|>ι} in Sn can be omitted. Linearizing the logarithm yields  ϕ (u) − ϕ(u)  ϕ (u) − ϕ(u) n n log ϕn (u) − log ϕ(u) = log +1 = + rn (u) ϕ(u) ϕ(u) (1) with a residual rn satisfying on Ω(u) |rn (u)| 6 c̄ ϕn (u) − ϕ(u) ϕ(u) 2 (43) where c̄ > 0 is a constant. Hence, we have Sn(1) 6 Ln + Tn (44) 26 D. Belomestny, M. Trabs and A.B. Tsybakov where ˆ Ln := Rp |ϕn (u) − ϕ(u)| wU (u)du, |u|2 |ϕ(u)| ˆ Tn := Rp |rn (u)| 1Ω(u) wU (u)du. |u|2 Here, Ln is the linearized stochastic error and Tn is a remainder. By the Cauchy-Schwarz inequality ˆ 1/2 16 16κw Ln 6 2 |ϕn (u) − ϕ(u)|wU (u)du 6 2 Z (45) U ξU Rp U ξU with κ̄w = kwkL1 and Z = Z(Y1 , . . . , Yn ) = ˆ 1/2 |ϕn (u) − ϕ(u)|2 wU (u)du . Rp Similarly, we deduce from (43) Tn 6 16c̄ U2 ˆ Rp |ϕn (u) − ϕ(u)|2 16c̄ wU (u)du 6 2 2 Z 2 . 2 |ϕ(u)| U ξU (46) Note that Z satisfies the bounded difference condition ∀Yi , Yi0 ∈ Rp : 1/2 |Z(Y1 , . . . , Yi−1 , Yi0 , Yi+1 , . . . , Yn ) − Z(Y1 , . . . , Yn )| 6 2κ̄w /n 2 By the bounded difference inequality [29, Theorem 3.3.14] we get P(Z > E(Z) + t) 6 exp(− 4nt κ̄w ), 1/2 for all t > 0. Since E(Z) 6 (κ̄w /n) this implies 1/2   2 κ̄w P Z > √ (2γ + 1) 6 e−γ , n ∀γ > 0. Using (45),(46), and the assumption that γ > 1 we find that there exists a numerical constant c∗1 > 0 such that  2 c∗ κ̄w γ  γ  P Sn(1) > 21 √ 1 + √ 6 2e−γ . U ξU n ξU n Since ξU 6 1, this implies  2 2c∗ κ̄w γ 2  P Sn(1) > 21 2 √ 6 2e−γ . (47) U ξU n Using lower bounds ι and ξU for |ϕn (u)| and |ϕ(u)|, respectively, and applying the elementary (2) bound 1{a>1} < a for any a > 0, the term Sn in (41) is bounded as follows: ˆ  wU (u) Sn(2) 6 log ι−1 + log ξU−1 1Ω(u)c du |u|2 p ˆR  |ϕn (u) − ϕ(u)| wU (u) 62 log ι−1 + log ξU−1 du |ϕ(u)| |u|2 Rp √ ˆ 32(2 log ξU−1 + log 2) 32 κ̄w 6 |ϕ (u) − ϕ(u)|w (u)du 6 Z. n U U 2 ξU U 2 ξU2 Rp Hence, for some numerical constant c∗2 > 0 we have   2 c∗ κ̄w P Sn(2) > 22 2 √ γ 6 e−γ , U ξU n ∀γ > 0. (48) Combining (41), (42), (47) and (48) and using the fact that γ > 1 we obtain   2 (2c∗1 + c∗2 )κ̄w γ 2 −2+β √ P kRn k∞ > + C(w)T U 6 3e−γ . 2 2 U ξU n Finally, we use the bound ξU > exp(−kΣk∞ U 2 /8−2T U β ) that is shown similarly to the analogous bound in the proof of Theorem 1. Covariance estimation in high-dimensional deconvolution 27 Appendix B: Proofs for Section 5.3 Proof of Lemma 10. By Taylor’s formula we have for some ξ ∈ [0, 1] that  log |ψ|(u) R(u) :=η −1 − log |ϕ|(u) − hu, Σui − 0 η (hu, Σui)   (log |ψ|(u))2 −1 00 = (η ) η hu, Σui − ξ log |ψ|(u) 2 Since (η −1 )00 (x) = −η 00 (η −1 (x))/η 0 (η −1 (x))3 and thus |(η −1 )00 (x)| 6 T |η −1 (x)|−1 |η 0 (η −1 (x))|−2 we have |R(u)| 6 T | log |ψ|(u)|2  − ξ log |ψ|(u)))|2 2|g(u, ξ)||η 0 (η −1 (η(hu, Σui (49)  with g(u, ξ) := η −1 (η(hu, Σui − ξ log |ψ|(u)). Since η −1 is non-negative and monotone increasing and log |ψ(u)| 6 0, we have  |g(u, ξ)| = g(u, ξ) > η −1 η(hu, Σui) = hu, Σui. Another Taylor expansion for the second term in the denominator in (49) yields for some ξ 0 ∈ [0, 1]  η 0 (η −1 (η hu, Σui − ξ log |ψ|(u))  = η 0 (hu, Σui) − ξ(log |ψ(u)|) (η 0 ◦ η −1 )0 (η(hu, Σui − ξ 0 log |ψ|(u))  η 00 ◦ η −1   (η(hu, Σui − ξ 0 log |ψ|(u)) = η 0 (hu, Σui) + ξ(log |ψ(u)|) 0 −1 η ◦η > η 0 (hu, Σui) − T | log |ψ|(u)|/g(u, ξ 0 ) (50)  0 2 β > η (hu, Σui) 1 − T (1 + |u|) /hu, Σui . If |u| > (2β+1 T 2 /λmin )1/(2−β) , then we conclude |R(u)| 6 2| log |ψ|(u)|2 4T 2 6 |u|2β−2 . 0 2 hu, Σuiη (hu, Σui) λmin Proof of Proposition 11. Due to Lemma 10 and the mean value theorem, the estimation error can be bounded for any U > (2β+1 T 2 /λmin )1/(2−β) by   4T 2 −2+β  −2+β Φ |σ̂i,i − σi,i | 6 U −2 η −1 − log |ϕn (U u(i) )| − η −1 − log |ϕ(U u(i) )| + 2T + U U λmin  |S(U u(i) )| = 2 0 −1 + 2T + 2 U −2+β U η (η (− log |ϕ(U u(i) )| + ξS(U u(i) ))) for some ξ ∈ [0, 1] and S(u) = log |ϕn (u)| − log |ϕ(u)| from Lemma 12. As in (50) (for any u with g(u, ξ) > hu, Σui > 1), we deduce  η 0 η −1 (− log |ϕ(u)| + ξS(u)) > η 0 (hu, Σui) − T (| log |ψ|(u)| + S(u)|. On the event {| log |ψ|(u)| + S(u)| 6 η 0 (U 2 σii )/2}, we thus obtain Φ |σ̂i,i − σi,i | 6  2|S(U u(i) )| + 2T + 2 U −2+β . 2 0 2 U η (U σii ) From this line, the argument is analogous to the proof of Theorem 1. 28 D. Belomestny, M. Trabs and A.B. Tsybakov Appendix C: Supplementary material. Proof of Proposition 16 Our aim is to prove the bound (37). We fix l, and we will omit for brevity the index l throughout the proof. This will cause a slight change of notation as compared to the proof of Theorem 6 since, in what follows, ψj := ψj,l , while ψj was a product of ψj,l ’s in the proof of Theorem 6. In addition, we will use the notation Sj = RIb + Āj , S0 = RIb , j = 1, . . . , M . Throughout C > 0 will denote a generic constant whose value may change from line to line. By construction, the characteristic functions ϕj (u) and ϕ0 (u) coincide on {|u| 6 1/δn,p }. For 2−β sufficiently small ρ we have hu, Āj ui 6 ρT δn,p |u|2 6 R|u|2 /2 implying hu, Sj ui = R|u|2 + 2 hu, Āj ui > R|u| /2. Therefore, we can write ϕj (u) − ϕ0 (u) = ϕSj (u)ψj (u)1{|S 1/2 u|>(R/2)1/2 δ−1 } − ϕS0 (u)ψ0 (u)1{|S 1/2 u|>(R/2)1/2 δ−1 } n,p j  n,p 0 1{|u|>1/δn,p } with ϕSj denoting the characteristic function of N (0, Sj ). We have ˆ 2 ξb |x|β+b fj (x) − f0 (x) dx 6 2ξb (Tj + T0 ) Rb where (also for j = 0) ˆ    2 Tj = |x|β+b F −1 ϕSj 1{|S 1/2 ·|>(R/2)1/2 δ−1 } ∗ F −1 ψj 1{|·|>1/δn,p } (x)dx n,p j Rb     F −1 ϕSj 1{|S 1/2 ·|>(R/2)1/2 δ−1 } ∗ F −1 ψj 1{|·|>1/δn,p } = |x|(β+b)/2 n,p j    6 2β+b−1 |x|(β+b)/2 F −1 ϕSj 1{|S 1/2 ·|>(R/2)1/2 δ−1 } j   + F −1 ϕSj 1{|S 1/2 ·|>(R/2)1/2 δ−1 } n,p j 2 L1 2 L2  2  −1 F ψ j 1{|·|>1/δn,p } n,p L1 L2 2    |x|(β+b)/2 F −1 ψj 1{|·|>1/δn,p } , 2 L2 using Young’s inequality in the last estimate. Let us simplify this upper bound. We have the identity   −1/2   1 −1 F −1 ϕIb 1{|u|>(R/2)1/2 δn,p x) F −1 ϕSj (u)1{|S 1/2 u|>(R/2)1/2 δ−1 } (x) = p } (Sj n,p j det Sj such that   |x|(β+b)/2 F −1 ϕSj 1{|S 1/2 ·|>(R/2)1/2 δ−1 } n,p j 1 1/2 |Sj x|(β+b)/2 F =p det Sj (β+b)/2 6 and kSj k∞ p det Sj  −1 2 L2 −1 ϕIb 1{|·|>(R/2)1/2 δn,p }   −1 |x|(β+b)/2 F −1 ϕIb 1{|·|>(R/2)1/2 δn,p } 2  L2 2 L2 2 −1 ]k 1 . kF −1 [ϕSj 1{|S 1/2 ·|>(R/2)1/2 δ−1 } ]k2L1 = kF −1 [ϕIb 1{|·|>(R/2)1/2 δn,p } L j n,p Since ρδn,p is small, the construction of Sj as pertubation of RIb implies that kSj k∞ is of the (β+b)/2 order R and det Sj is of the order Rb . Hence, (det Sj )−1/2 kSj k∞ 6 CRβ/2 . We deduce    2   2 −1 −1 F −1 ψj 1{|·|>δn,p Tj 6 C2β+b Rβ/2 |x|(β+b)/2 F −1 ϕIb 1{|·|>(R/2)1/2 δn,p } } 2 L L1 2 2      (β+b)/2 −1 −1 + F −1 ϕIb 1{|·|>(R/2)1/2 δn,p |x| F ψ 1 . j {|·|>1/δn,p } } 1 2 L L Covariance estimation in high-dimensional deconvolution 29 By the Cauchy-Schwarz inequality we further estimate 2 −1 ]k 1 kF −1 [ϕIb 1{|·|>(R/2)1/2 δn,p } L 2 (1 L2 2 |x|(b+β)/2 )−1 L2 6 (1 + |x|(b+β)/2 )−1 −1 ] + |x|(b+β)/2 )F −1 [ϕIb 1{|·|>(R/2)1/2 δn,p } 2 L2 6 2 (1 +   2 (b+β)/2 −1 2 −1 ]k 2 + k|x| −1 ]k 2 . × kF −1 [ϕIb 1{|·|>(R/2)1/2 δn,p F [ϕ 1 1/2 I b L L } {|·|>(R/2) δn,p }  2  −1 An analogous estimate can be applied to kF −1 ψj 1{|·|>δn,p } kL1 . By a polar coordinate transformation we have ˆ ∞ ˆ ∞ −2 2π b/2 rb−1 2π b/2 2 (1 + |x|(b+β)/2 )−1 L2 = dr 6 1{r<1} + r(1+β)/2 dr (b+β)/2 2 Γ(b/2) 0 (1 + r Γ(b/2) 0 ) b/2 2π Recalling the definition of ξb = c Γ(b/2) , we conclude with Plancherel’s identity and the Laplace operator ∆ ˆ 2 ξb |x|β+b fj (x) − f0 (x) dx Rb   2 2 β+b β/2 (β+b)/2 −1 −1 ] −1 6C2 ξb F −1 [ϕIb 1{|·|>(R/2)1/2 δn,p + (1 ∨ R ) |x| F [ϕ 1 ] 1/2 I b {|·|>(R/2) } L2 δn,p } L2  X  2    2  −1 (β+b)/2 −1 × ξb F ψk 1{|·|>1/δn,p } L2 + |x| F ψk 1{|·|>1/δn,p } L2 k∈{0,j} ˆ ˆ 2  Cξb 2β+b  2 β/2 d(β+b)/4e ϕ 6 (u) du + (1 ∨ R ) ∆ ϕ (u) du I I b b −1 −1 (2π)b |u|>(R/2)1/2 δn,p |u|>(R/2)1/2 δn,p ˆ ˆ  X ξb  2 2 |ψ (u)| du + ∆d(β+b)/4e ψk (u) du . (51) × k b (2π) Rb Rb k∈{0,j} To bound these integrals, we apply the following proposition concerning tail integrals for stable distributions. Proposition 17. on α such that ˆ Let α, β ∈ (0, 2] and t > 0. Then there is a constant Cα > 0 depending only 2 α ∆d(b+β)/4e exp(−|x|α /α) dx 6 Cα Γ(b/2)(13π + 25πα)b/2 b8 e−t /α . |x|>t Proof. Set q = d(b + β)/4e. Verified p by induction, we have for any function g : R → R and for the radius r : Rb → R, x 7→ |x| = x21 + . . . + x2b the following identity for the Laplace operator applied to the radial function g ◦ r  2q−k q X  1 1 ∂ k 2q ∆ g(r) = ∆ r · g(r). 2k k! r ∂r q k=0 Since ∆(x21 + . . . + x2b )k = γb,k (x21 + . . . + x2b )k−1 with γb,k := 2k(b + 2(k − 1)), we get   k−1 Y ∆k r2q =  γb,q−j  r2(q−k) j=0 30 D. Belomestny, M. Trabs and A.B. Tsybakov and as a result  γb,q−j r2(q−k)  1 ∂ 2q−k ∆q g(r) = · g(r) 2k k! r ∂r k=0   2q−k  q   k−1 X q Y 1 ∂ 2(q−k)  = g(r). (b + 2(q − j − 1)) r · k r ∂r j=0 q X Q k−1 j=0 k=0 Since b 6 4q, we can estimate for all k 6 q k−1 Y k Y (b + 2(q − j − 1)) = 2k j=0 (b/2 + q − j) 6 2k j=1 k Y (3q − j) j=1 = 2k k Y 1+ j=1 k  q  Y (2q − j) 2q − j j=1 k 6 and thus 4 (2q)! (2q − k)!  2q−k q   k X q 4 (2q)! 2(q−k) 1 ∂ ∆ g(r) 6 r · g(r) k (2q − k)! r ∂r q (52) k=0 Let g(r) = exp(−rα /α) for α ∈ (0, 2). For any m ∈ N we define a polynomial Pm via Pm (r)g(r) :=  1 ∂ m g(r). r ∂r It is easy to see that Pk (r) = k X (−1)l λk,l rlα−2k , l=1 with coefficients λk,1 = − k−1 Y (α − 2j), λk,k = 1 j=1 λk,l = (lα − 2(k − 1))λk−1,l + λk−1,l−1 , for l = 2, . . . , k − 1. From this recursion formula, we obtain the upper bound |λk,l | 6 (1 + A−1 )k Al k−l Y (2j + l(2 − α) − 2) (53) j=1 for all k > 1, l = 1, . . . , k and any A > 0. Indeed, (53) is satisfied for λk,1 , λk,k for all k and we check inductively, given (53) holds true for λk−1,l , |λk,l | 6 |2(k − l) + l(2 − α) − 2| |λk−1,l | + |λk−1,l−1 | 6 (1 + A−1 )k−1 k−l Y (2j + l(2 − α) − 2) Al + Al−1 j=1 6 (1 + A−1 )k Al k−l Y j=1 (2j + l(2 − α) − 2).  Covariance estimation in high-dimensional deconvolution 31 From (53), we obtain the upper bound m m−l  1 ∂ m X Y α Al (2j + l(2 − α) − 2)rlα−2m g(r) 6 e−r /α (1 + A−1 )m r ∂r j=1 6 e−r α /α (2 + 2A l=1 m X −1 m ) l=1 m A l Y (j − lα/2)rlα−2m 2 j=l+1 m X α m! A l lα−2m 6 e−r /α (2 + 2A−1 )m r . l! 2 l=1 Therefore, we get from (52) q   X q 2q−k X (2q − k)! A l (2q)! k 2(q−k) −r α /α −1 2q−k |∆ g(r)| ≤ 4 r e (2 + 2A ) rlα−2(2q−k) k (2q − k)! l! 2 l=1 k=0   q 2q−k lα−2q X X α q k A l r = e−r /α (2q)! 4 (2 + 2A−1 )2q−k . k 2 l! k=0 l=1 | {z } q =:γ(k,l) Using b 6 4q, we find ˆ ˆ ∞ 2π b/2 2 |∆q g(|x|)|2 dr = rb−1 |∆q g(r)| dr Γ(b/2) t |x|>t ˆ q 2q−k q 2q−k 2π b/2 (2q)!2 X X X X γ(k, l)γ(k 0 , l0 ) ∞ p−1−4q+(l+l0 )α −2rα /α 6 r e dr Γ(b/2) l! l0 ! t 0 0 0 k=0 l=1 k =0 l =1 ˆ q 2q−k q 2q−k 2π (2q)! X X X X γ(k, l)γ(k 0 , l0 ) ∞ (l+l0 )α−1 −2rα /α r e dr. 6 Γ(b/2) l! l0 ! t 0 0 b/2 0 2 k=0 l=1 k =0 l =1 To bound the tail integrals, we apply the following: Substituting s = rα /α, we obtain for any m>0 ˆ ∞ ˆ ∞ α α α rmα−1 e−2r /α dr 6 e−t /α rmα−1 e−r /α dr t 0 ˆ ∞ α −tα /α m−1 =e α sm−1 e−s ds = e−t /α αm−1 Γ(m). (54) 0 Γ(l+l0 ) l! l0 ! Together with 6 l+l0 l  ˆ q 2 |∆ g(|x|)| dr 6 e 0 6 2l+l , we deduce from (54) 0 q 2q−k q 2q−k 0 0 Γ(l + l ) (2q)!2 X X X X γ(k, l)γ(k 0 , l0 )αl+l . Γ(b/2) l! l0 ! 0 0 −tα /α 2π |x|>t b/2 k=0 l=1 k =0 l =1 6e 0 q 2q−k q 2q−k 0 (2q)! X X X X γ(k, l)γ(k 0 , l0 )(2α)l+l Γ(b/2) 0 0 −tα /α 2π b/2 2 /α 2π b/2 q 2q−k 2X X k=0 l=1 k =0 l =1 α = e−t (2q)! Γ(b/2) γ(k, l)(2α)l 2 . k=0 l=1 The sum in the last bound is given by q 2q−k X X k=0 l=1 l γ(k, l)(2α) = q   X q k=0 k 4k (2 + 2A−1 )2q−k 2q−k X l=1 Aα l 32 D. Belomestny, M. Trabs and A.B. Tsybakov where for all A > α−1 2q−k X Aα l = l=1 (Aα)2q−k − 1 (Aα)2q−k 6 . 1 − 1/(Aα) 1 − 1/(Aα) Hence, ˆ |∆q g(|x|)|2 dr 6 |x|>t α q   2q−k 2 2e−t /α π b/2 (2q)!2  X q k 4 (2 + 2A−1 )2q−k Aα α − 1/A Γ(b/2) k k=0 −tα /α = b/2 2 2q π (2q)! 2e (2Aα + 2α)2q 4 + 2(A + 1)α α − 1/A Γ(b/2) Finally, we apply (2q)! = (b/2 + 3)! 6 (b/2 + 3)4 Γ(b/2), due to q 6 b/4 + 3/2, to conclude ˆ b/2 8 −tα /α b e |∆q g(|x|)|2 dr 6 Cα,A Γ(b/2)π b/2 (2Aα + 2α)b/2 4 + 2Aα + 2α |x|>t for some constant Cα,A depending only on α and A. Since α 6 2 there there is some A > α−1 such that (Aα + α)(4 + Aα + α) 6 13 + 25α we obtain the asserted upper bound ξb (2π)b = nents in (51) and using ˆ 2 ξb |x|β+b fj (x) − f0 (x) dx ´ 2 2 e−|u| du 6 ξb 2b/2−1 Γ(b/2)e−t /2 |u|>t c from (23), we obtain 2b π b/2 Γ(b/2) Applying Proposition 17 and to the Gaussian compo- Rb  −2 Cξb 2b  (1 ∨ Rβ/2 )Γ(b/2)(63π)b/2 b8 e−Rδn,p /4 b (2π) ˆ  X Cξb  ˆ 2 2 d(β+b)/4e |ψ (u)| du + ∆ ψ (u) du × k k (2π)b Rb Rb k∈{0,j} ˆ ˆ X 2  −2 C 2 d(β+b)/4e du + ∆ ψ (u) du . 6 C8b (1 ∨ Rβ/2 )e−Rδn,p /4 ψ (u) k k 2b π b/2 Γ(b/2) Rb Rb 6 k∈{0,j} We now use that ψj (u) coincides with ψ0 (u) for |u| > 2/δn,p and thus ˆ ˆ 2 2 d(β+b)/4e ∆ ψj (u) du + ∆d(β+b)/4e ψ0 (u) du b b R ˆR ˆ 2 2 2 d(β+b)/4e 62 ∆ ψ0 (u) du + ∆d(β+b)/4e ψj (u) + ∆d(β+b)/4e ψ0 (u) du. |u|>2/δn,p |u|62/δn,p Since ψ0 is the characteristic function of a stable distribution, the first integral can be estimated by Proposition 17. The multiplicative perturbation of ψ0 in the second integral is a smooth function which can be uniformly bounded by Db for some suitable constant D > 0. An analogous argument applies to the L2 -norms of ψk . Since the ball {u ∈ Rb : |u| 6 2/δn,p } has Lebesgue measure 2π b/2 (2/δn,p )b bΓ(b/2) , we get ˆ 2 ξb |x|β+b fj (x) − f0 (x) dx Rb  b/2  c b b/2 b b 2π Γ(b/2)8 π + D (2/δ ) n,p bΓ(b/2) 2b π b/2 Γ(b/2) b −b   2CD δ −2 n,p 6 C8b (1 ∨ Rβ/2 )e−Rδn,p /4 1 + C4b + . T bΓ(b/2)2  −2 6 C8b (1 ∨ Rβ/2 )e−Rδn,p /4 1 + The last term is uniformly bounded in b thus that we finally have ˆ 2 −2 ξb |x|β+b fj (x) − f0 (x) dx 6 C32b (1 ∨ Rβ/2 )e−Rδn,p /5 . Rb Covariance estimation in high-dimensional deconvolution 33 Acknowledgements D. Belomestny acknowledges the financial support from the Russian Academic Excellence Project “5-100” and from Deutsche Forschungsgemeinschaft (DFG) through the SFB 823 “Statistical modelling of nonlinear dynamic processes”. M. Trabs gratefully acknowledges the financial support by the DFG research fellowship TR 1349/1-1. The work of A.B. Tsybakov was supported by GENES and by the French National Research Agency (ANR) under the grants IPANEMA (ANR-13-BSH10004-02) and Labex Ecodec (ANR-11-LABEX-0047). This work has been started while M.T. was affiliated to the Université Paris-Dauphine. References [1] Belomestny, D. and Reiß, M. (2006). Spectral calibration of exponential Lévy models. Finance Stoch., 10(4):449–474. [2] Belomestny, D. and Trabs, M. (2017). Low-rank diffusion matrix estimation for highdimensional time-changed Lévy processes. Ann. Inst. Henri Poincaré Probab. Stat. To appear. ArXiv preprint arXiv:1510.04638. [3] Bickel, P. J. and Levina, E. (2008a). Covariance regularization by thresholding. Ann. Statist., 36(6):2577–2604. [4] Bickel, P. J. and Levina, E. (2008b). Regularized estimation of large covariance matrices. Ann. Statist., 36(1):199–227. [5] Butucea, C. and Matias, C. (2005). Minimax estimation of the noise level and of the deconvolution density in a semiparametric convolution model. Bernoulli, 11:309–340. [6] Butucea, C., Matias, C., and Pouet, C. (2008). Adaptivity in convolution models with partially known noise distribution. Electron. J. Stat., 2:897–915. [7] Butucea, C. and Tsybakov, A. B. (2008). Sharp optimality in density deconvolution with dominating bias. i. Theory Probab. Appl., 52(1):24–39. [8] Cai, T. and Liu, W. (2011). Adaptive thresholding for sparse covariance matrix estimation. J. Amer. Statist. Assoc., 106(494):672–684. [9] Cai, T. T., Ren, Z., and Zhou, H. H. (2016). Estimating structured high-dimensional covariance and precision matrices: optimal rates and adaptive estimation. Electron. J. Stat., 10(1):1–59. [10] Cai, T. T. and Zhang, A. (2016). Minimax rate-optimal estimation of high-dimensional covariance matrices with incomplete data. arXiv preprint arXiv:1605.04358. [11] Cai, T. T., Zhang, C.-H., and Zhou, H. H. (2010). Optimal rates of convergence for covariance matrix estimation. Ann. Statist., 38(4):2118–2144. [12] Cai, T. T. and Zhou, H. H. (2012). Minimax estimation of large covariance matrices under `1 -norm. Statist. Sinica, pages 1319–1349. [13] Carroll, R. J. and Hall, P. (1988). Optimal rates of convergence for deconvolving a density. J. Amer. Statist. Assoc., 83(404):1184–1186. [14] Comte, F. and Lacour, C. (2011). Data-driven density estimation in the presence of additive noise with unknown distribution. J. R. Stat. Soc. Ser. B Stat. Methodol., 73(4):601–627. [15] Cressie, N. and Wikle, C. K. (2011). Statistics for Spatio-Temporal Data. John Wiley & Sons. [16] Dattner, I., Reiß, M., and Trabs, M. (2016). Adaptive quantile estimation in deconvolution with unknown error distribution. Bernoulli, 22(1):143–192. [17] Delaigle, A. and Hall, P. (2016). Methodology for non-parametric deconvolution when the error distribution is unknown. J. R. Stat. Soc. Ser. B. Stat. Methodol., 78(1):231–252. [18] Delaigle, A., Hall, P., and Meister, A. (2008). On deconvolution with repeated measurements. Ann. Statist., 36(2):665–685. [19] Delaigle, A. and Meister, A. (2011). Nonparametric function estimation under Fourieroscillating noise. Statist. Sinica, 21(3):1065–1092. [20] Eckle, K., Bissantz, N., and Dette, H. (2016). Multiscale inference for multivariate deconvolution. arXiv preprint arXiv:1611.05201. 34 D. Belomestny, M. Trabs and A.B. Tsybakov [21] El Karoui, N. (2008). Operator norm consistent estimation of large-dimensional sparse covariance matrices. Ann. Statist., 36(6):2717–2756. [22] Fan, J. (1991). On the Optimal Rates of Convergence for Nonparametric Deconvolution Problems. Ann. Statist., 19(3):1257–1272. [23] Fan, J., Li, Y., and Yu, K. (2012). Vast volatility matrix estimation using high-frequency data for portfolio selection. J. Amer. Statist. Assoc., 107(497):412–428. [24] Fan, J., Liao, Y., and Liu, H. (2016). An overview of the estimation of large covariance and precision matrices. Econom. J., 19(1):C1–C32. [25] Fan, J., Liao, Y., and Mincheva, M. (2011). High-dimensional covariance matrix estimation in approximate factor models. Ann. Statist., 39(6):3320–3356. [26] Fan, J., Liao, Y., and Mincheva, M. (2013). Large covariance estimation by thresholding principal orthogonal complements. J. R. Stat. Soc. Ser. B. Stat. Methodol., 75(4):603–680. With 33 discussions by 57 authors and a reply by Fan, Liao and Mincheva. [27] Fang, K., Kotz, S., and Ng, K. W. (1990). Symmetric multivariate and related distributions, volume 36. Chapman & Hall/CRC. [28] Friedman, J., Hastie, T., and Tibshirani, R. (2008). Sparse inverse covariance estimation with the graphical lasso. Biostatistics, 9(3):432–441. [29] Gine, E. and Nickl, R. (2016). Mathematical Foundations of Infinite-Dimensional Statistical Models. Cambridge Univ. Press, Cambridge. [30] Jacod, J. and Reiß, M. (2014). A remark on the rates of convergence for integrated volatility estimation in the presence of jumps. Ann. Statist., 42(3):1131–1144. [31] Johannes, J. (2009). Deconvolution with unknown error distribution. Ann. Statist., 37(5A):2301–2323. [32] Kappus, J. and Mabon, G. (2014). Adaptive density estimation in deconvolution problems with unknown error distribution. Electron. J. Stat., 8(2):2879–2904. [33] Koltchinskii, V., Lounici, K., and Tsybakov, A. B. (2011). Nuclear-norm penalization and optimal rates for noisy low-rank matrix completion. Ann. Statist., 39(5):2302–2329. [34] Lam, C. and Fan, J. (2009). Sparsistency and rates of convergence in large covariance matrix estimation. Ann. Statist., 37(6B):4254–4278. [35] Lepski, O. and Willer, T. (2017a). Estimation in the convolution structure density model. Part I: oracle inequalities. arXiv preprint arXiv:1704.04418. [36] Lepski, O. and Willer, T. (2017b). Estimation in the convolution structure density model. Part II: adaptation over the scale of anisotropic classes. arXiv preprint arXiv:1704.04420. [37] Lounici, K. (2014). High-dimensional covariance matrix estimation with missing observations. Bernoulli, 20(3):1029–1058. [38] Low, M. G. (1997). On nonparametric confidence intervals. Ann. Statist., 25(6):2547–2554. [39] Masry, E. (1993). Strong consistency and rates for deconvolution of multivariate densities of stationary processes. Stochastic Process. Appl., 47(1):53–74. [40] Matias, C. (2002). Semiparametric deconvolution with unknown noise variance. ESAIM Probab. Stat, 6:271–292. [41] Meister, A. (2008). Deconvolution from Fourier-oscillating error densities under decay and smoothness restrictions. Inverse Problems, 24(1):015003, 14. [42] Neumann, M. H. (1997). On the effect of estimating the error density in nonparametric deconvolution. J. Nonparametr. Statist., 7(4):307–330. [43] Rigollet, P. and Tsybakov, A. (2011). Exponential screening and optimal rates of sparse estimation. Ann. Statist., 39(2):731–771. [44] Rigollet, P. and Tsybakov, A. B. (2012). Comment:" minimax estimation of large covariance matrices under `1 -norm”. Statist. Sinica, 22(4):1358–1367. [45] Rothman, A. J. (2012). Positive definite estimators of large covariance matrices. Biometrika, 99(3):733–740. [46] Rothman, A. J., Levina, E., and Zhu, J. (2009). Generalized thresholding of large covariance matrices. J. Amer. Statist. Assoc., 104(485):177–186. [47] Sanandaji, B. M., Tascikaraoglu, A., Poolla, K., and Varaiya, P. (2015). Low-dimensional models in spatio-temporal wind speed forecasting. In American Control Conference (ACC), Covariance estimation in high-dimensional deconvolution 35 2015, pages 4485–4490. IEEE. [48] Sato, K.-i. (2013). Lévy processes and infinitely divisible distributions, volume 68 of Cambridge Studies in Advanced Mathematics. Cambridge University Press, Cambridge. Translated from the 1990 Japanese original, Revised edition of the 1999 English translation. [49] Tao, M., Wang, Y., and Zhou, H. H. (2013). Optimal sparse volatility matrix estimation for high-dimensional Itô processes with measurement errors. Ann. Statist., 41(4):1816–1864. [50] Tsybakov, A. B. (2009). Introduction to nonparametric estimation. Springer Series in Statistics. Springer, New York. Revised and extended from the 2004 French original, Translated by Vladimir Zaiats. [51] Tsybakov, A. B. (2013). Aggregation and high-dimensional statistics. Saint Flour Lecture notes.
10math.ST
An Online Development Environment for Answer Set Programming Elias Marcopoulos1 and Christian Reotutar2 and Yuanlin Zhang3 1 Department of Computer Science, Tufts University, USA Department of Computer Science, Johns Hopkins University, USA 3 Texas Tech University, Lubbock, TX, USA [email protected], [email protected], [email protected] arXiv:1707.01865v1 [cs.OH] 20 Jun 2017 2 Abstract. Recent progress in logic programming (e.g., the development of the Answer Set Programming paradigm) has made it possible to teach it to general undergraduate and even high school students. Given the limited exposure of these students to computer science, the complexity of downloading, installing and using tools for writing logic programs could be a major barrier for logic programming to reach a much wider audience. We developed an online answer set programming environment with a self contained file system and a simple interface, allowing users to write logic programs and perform several tasks over the programs. 1 Introduction Answer Set Programming (ASP) [8] is becoming a dominating language in the knowledge representation community [15,12] because it has offered elegant and effective solutions not only to classical Artificial Intelligence problems but also to many challenging application problems. Thanks to its simplicity and clarity in both informal and formal semantics, Answer Set Programming provides a “natural” modeling of many problems. At the same time, the fully declarative nature of ASP also cleared a major barrier to teach logic programming, as the procedural features of classical logic programming systems such as PROLOG are taken as the source of misconceptions in students’ learning of Logic Programming [16]. ASP has been taught to undergraduate students, in the course of Artificial Intelligence, at Texas Tech for more than a decade. We believe ASP has become mature enough to be a language for us to introduce programming and problem solving to high school students. We have offered many sessions to students at New Deal High School and a three week long ASP course to high school students involved in the TexPREP program (http://www.math.ttu.edu/texprep/). In our teaching practice, we found that ASP is well accepted by the students and the students were able to focus on problem solving, instead of the language itself. The students were able to write programs to answer questions about the relationships (e.g., parent, ancestor) amongst family members and to find solutions for Sudoku problems. 2 Marcopoulos, Reotutar and Zhang However, we have some major issues while using existing tools: installation of the tools to computers at a lab or at home is complex, and the existing tools are sensitive to the local settings of a computer. As a result, the flow of teaching the class was often interrupted by the problems associated with the use of the tools. Strong technical support needed for the management and use of the tools is prohibitive for teaching ASP to general undergraduate students or K-12 students. During our teaching practice, we also found the need for a more vivid presentation of the results of a logic program (more than just querying the program or getting the answer sets of the program). We also noted observations in literature that multimedia and visualization play a positive role in promoting students’ learning [9,3]. To overcome the issues related to software tool management and use, we have designed and built an online development environment for Answer Set Programming. The environment provides an editor for users to edit their programs, an online file system for them to store and retrieve their program and a few simple buttons allows querying the program inside the editor or getting answer sets of the program. The environment uses SPARC [2] as the ASP language. SPARC is designed to further facilitate the teaching of logic programming by introducing sorts (or types) which simplify the difficult programming concept of domain variables in classical ASP systems such as Clingo [7] and help programmers to identify errors early thanks to sort information. Initial experiment of teaching SPARC to high school students is promising [18]. To promote students’ interests and learning, our environment also introduces predicates for students to present their solutions to problems in a more visually straightforward and exciting manner (instead of the answer sets which are simply a set of literals). The URL for the online environment is http://goo.gl/ukSZET. The rest of the paper is organized as follows. Section 2 recalls SPARC. The design and implementation of the online environment are presented in Section 3. The design and rendering of the drawing and animation predicates are presented in Section 4. The paper is concluded by Section 5. 2 Answer Set Programming Language – SPARC SPARC is an Answer Set Programming language which allows for the explicit representation of sorts. A SPARC program consists of three sections: sorts, predicates and rules. We will use the map coloring problem as an example to illustrate SPARC: can the USA map be colored using red, green and blue such that no two neighboring states have the same color? The first step is to identify the objects and their sorts in the problem. For example, the three colors are important and they form the sort of color for this problem. In SPARC syntax, we use #color = {red, green, blue} to represent the objects and their sort. The sorts section of the SPARC program is sorts % the keyword to start the sorts section An Online Development Environent 3 #color = {red,green,blue}. #state = {texas, colorado, newMexico, ......}. The next step is to identify relations in the problem and declare in the predicates section the sorts of the parameters of the predicates corresponding to the relations. The predicates section of the program is predicates % the keyword to start the predicates section % neighbor(X, Y) denotes that state X is a neighbor of state Y. neighbor(#state, #state). % ofColor(X, C) denotes that state X has color C ofColor(#state, #color). The last step is to identify the knowledge needed in the problem and translate it into rules. The rules section of a SPARC program consists of rules in the typical ASP syntax. The rules section of a SPARC program will include the following. rules % the keyword to start the rules section % Texas is a neighor of Colorado neighbor(texas, colorado). % The neighbor relation is symetric neighbor(S1, S2) :- neighbor(S2, S1). % Any state has one of the three colors: red, green and blue ofColor(S, red) | ofColor(S, green) | ofColor(S, blue). % No two neighbors have the same color :- ofColor(S1, C), ofColor(S2, C), neighbor(S1, S2), S1 != S2. 3 3.1 Online Development Environment Design and Implementation Environment Design The principle of the design is that the environment, with the simplest possible interface, should provide full support, from writing programming to getting the answer sets of the program, for teaching Answer Set Programming. The design of the interface is shown in Figure 1. It consists of 3 components: 1) the editor to edit a program, 2) the file navigation system and 3) the operations over the program. 4 Marcopoulos, Reotutar and Zhang Fig. 1. User Interface of the System (the red numbers indicate the areas/components in the interface) One can edit a SPARC program directly inside the editor which has syntax highlighting features (area 1). The file inside the editor can be saved by clicking the “Save” button (2.4). The files and folders are displayed in the area 2.1. The user can traverse them using the mouse like traversing a file system on a typical operating system. Files can be deleted and their names can be changed. To create a folder or a file, one clicks the “New” button (2.3). The panel showing files/folders can be toggled by clicking the “Directory” button (2.2) (so that users can have more space for the editing or result area (4)). To ask queries to the program inside the editor, one can type a query (a conjunction of literals) in the text box (3.1) and then press the “Submit” button (3.1). The answer to the query will be shown in area 4. For a ground query (i.e., a query without variables), the answer is yes if every literal in the query is in every answer set of the program, is no if the complement (p and ¬p, where p is an atom, are complements) of some literal is in every answer set of the program, and unknown otherwise. An answer to a query with variables is a set of ground terms for the variables in the query such that the answer to the query resulting from replacing the variables by the corresponding ground terms is yes. Formal definitions of queries and answers to queries can be found in Section 2.2 of [8]. To see the answer sets of a program, click the “Get Answer Sets” button (3.2). When “Execute” button (3.3) is clicked, the atoms with drawing and animation in the answer set of the program will be rendered in the display area (4). (For now, when there is more than one answer set, the environment displays an error.) A user can only access the full interface discussed above after login. The user will log out by clicking the “Logout” button (5). Without login, the interface is much simpler, with all the file navigation related functionalities invisible. Such an interface is convenient for testing or doing a quick demo of a SPARC program. 3.2 Implementation . The architecture of the online environment follows that of a typical web application. Is consists of a front end component and a back end component. The front end provides the user interface and sends users’ request to the back An Online Development Environent 5 end, and the back end fulfills the request and returns results, if needed, back to the front end. After getting the results from the back end, the front end will update the interface correspondingly (e.g., display query answers to the result area). Details about the components and their interactions are given below. Front End. The front end is implemented by HTML and JavaScript. The editor in our front end uses ACE which is an embeddable (to any web page) code editor written in JavaScript (https://ace.c9.io/). The panel for file/folder navigation is based on JavaScript code by Yuez.me. Back End and Interactions between the Front End and the Back End. The back end is mainly implemented using PHP and is hosted on the server side. It has three components: 1) file system management, 2) inference engine and 3) drawing/animation rendering. The file system management uses a database to manage the files and folders of all users of the environment. The ER diagram of the system is shown below: Fig. 2. The ER diagram for file/folder management. Most names have a straightforward meaning. The Folderurl and Fileurl above refer to the full path of the folder/file in the file system. The SPARC files are saved in the server file system, not in a database table. The sharing is managed by the sharing information in the relevant database tables. In our implementation, we use mySQL database system. 6 Marcopoulos, Reotutar and Zhang The file management system gets request such as creating a new file/folder, deleting a file, saving a file, getting the files and folders, etc, from the front end. It then updates the tables and local file system correspondingly and returns the needed results to the front end. After the front end gets the results, it will update the graphical user interface (e.g., display the program returned from the back end inside the editor) if needed. The inference engine gets the request of answering a query or obtaining all answer sets of a program. It calls the SPARC solver [2] to find all answer sets. Then in terms of these answer sets, it returns requested information to the front end. After the front end gets the response from the back end, it will show the result in the display area of the web page. Details of the design and implementation of drawing/animation rendering can be found in Section 4.2. 4 4.1 Drawing and Animation Design and Implementation Drawing and Animation Design To allow programmers to create drawings and animations using SPARC, we simply design two predicates, called display predicates: one for drawing and one for animation. The atoms using these predicates are called display atoms. To use these atoms in a SPARC program, a programmer needs to include sorts (e.g., sort of colors, fonts and numbers) and the corresponding predicate declaration which are predefined. In the following, we only focus on the atoms and their use for drawing and animation. Drawing. A drawing predicate is of the form: draw(c) where c is called a drawing command. Intuitively the atom containing this predicate draws texts and graphics as instructed by the command c. By drawing a picture, we mean a shape is drawn with a style. We define a shape as either text or a geometric line or curve. Also, a style specifies the physical visual properties of the shape it is applied to. For example, visual properties include color, thickness, and font. For modularity, we introduce style names, which are labels that can be associated with different styles so that the style may be reused without being redefined. A drawing is completed by associating this shape and style to a certain position in the canvas, which is simply the display board. Note, the origin of the coordinate system is at the top left corner of the canvas. Here is a an example of drawing a red line from point (0, 0) to (2, 2). First, we introduce a style name redline and associate it to the red color by the style command line color(redline, red). With this defined style we then draw the red line by the shape command draw line(redline, 0, 0, 2, 2). Style commands and shape commands form all drawing commands. The SPARC program rules to draw the given line are draw(line color(redline, red)). draw(draw line(redline, 0, 0, 2, 2)). An Online Development Environent 7 The style commands of our system include the following: linewidth(sn, t) specifies that lines drawn with style name sn should be drawn with a line thickness t. textfont(sn, fs, ff) specifies that text drawn with style name sn should be drawn with a font size fs and a font family ff. linecap(sn, c) specifies that lines drawn with style name sn should be drawn with a capping c, such as an arrowhead. textalign(sn, al) specifies that text drawn with style name sn should be drawn with an alignment on the page al. line color(sn, c) specifies that lines drawn with style name sn should be drawn with a color c. textcolor(sn, c) specifies that text drawn with style name sn should be drawn with a color c. The shape commands include the following: draw line(sn, xs, ys, xe, ye) draws a line from starting point (xs, ys) to ending point (xe, ye) with style name sn; draw quad curve(sn, xs, ys, bx, by, xe, ye) draws a quadratic Bezier curve, with style name sn, from the current point (xs, ys) to the end point (xe, ye) using the control point (bx, by); draw bezier curve(sn, xs, ys, b1x, b1y, b2x, b2y, xe, ye) draws a cubic Bezier curve, using style name sn, from the current point (xs, ys) to the end point (xe, ye) using the control points (b1x, b1y) and (b2x, b2y); draw arc curve(sn, xs, ys, r, sa, se) draws an arc using style name sn and the arc is centered at (x, y) with radius r starting at angle sa and ending at angle se going in the clockwise direction; draw text(sn, x, xs, ys) prints value of x as text to screen from point (xs, ys) using style name sn. Animation. A frame, a basic concept in animation, is defined as a drawing. When a sequence of frames, whose content is normally relevant, is shown on the screen in rapid succession (usually 24, 25, 30, or 60 frames per second), a fluid animation is seemingly created. To design an animation, a designer will specify the drawing for each frame. Given that the order of frames matters, we give a frame a value equal to its index in a sequence of frames. We introduce the animate predicate animate(c, i) which indicates a desire to draw a picture at the ith frame using drawing command c and i starts from 0. The frames will be shown on the screen at a rate of 60 frames per second, and the ith frame will be showed at time (i ∗ 1/60) (in a unit of second) from the start of the animation for a duration of 1/60 of a second. As an example, we would like to elaborate on an animation where a red box (with side length of 10 pixels) moves from the point (1, 70) to (200, 70). We will create 200 frames with the box (whose bottom left corner is) at point (i + 1, 70) in ith frame. Let the variable I be of a sort called frame, defined from 0 to some large number. In every frame I, we specify the drawing styling redline: animate(line color(redline, red), I). To make a box at the I th frame, we need to draw the box’s four sides using the style associated with style name redline. The following describes the four sides of a box at any frame: bottom - (I +1, 70) to (I +1+10, 70), left - (I +1, 70) to (I + 1, 60), top - (I + 1, 60) to (I + 1 + 10, 60) and right - (I + 1 + 10, 60) to (I + 1 + 10, 70). Hence we have the rules 8 Marcopoulos, Reotutar and Zhang animate(draw animate(draw animate(draw animate(draw line(redline,I+1,70,I+11,70),I). line(redline,I+1,70,I+1,60),I). line(redline,I+1,60,I+11,60),I). line(redline,I+11,60,I+11,70),I). Note that the drawing predicate produces the intended drawing throughout all the frames creating a static drawing. On the other hand, the animate predicate produces a drawing only for a specific frame. 4.2 Algorithm and Implementation We first define our input and output: The input to the main algorithm is a SPARC program P . The output is an HTML5 program segment containing a canvas element which will be rendered by an Internet browser. A key part of our algorithm is to render the display atoms (specified in the answer set of P ) using canvas methods. HTML5 canvas element is used to draw graphics via scripting using JavaScript. In the following, we will use an example to demonstrate how a drawing command is implemented by JavaScript code using canvas methods. Consider again draw(line color(redline, red)). draw(draw line(redline, 0, 0, 2, 2)). When we render the shape command draw line, we need to know the meaning of the redline style. From the style command line color, we know it means red. We first create an object ctx for a given canvas (simply identified by a name) where we would like to render the display atoms. The object offers methods to render the graphics in the canvas. We then use the following JavaScript code to implement the shape command to draw a line from (0,0) to (2,2): ctx.beginPath(); ctx.moveTo(0,0); ctx.lineTo(2,2); ctx.stroke(); To make the line in red color, we have to insert the following JavaScript statement before the ctx.stroke() in the code above: ctx.strokeStyle="red"; The meaning of the canvas methods in the code above is straightforward. We don’t explain them further. Now we are in a position to present the algorithm. Algorithm: – Input: a SPARC program P with display predicates. – Output: a HTML program segment which allows the rendering of the display atoms in the answer set of P in an Internet Browser. – Steps: 1. Call SPARC solver to obtain an answer set S of P . 2. Let script be an array of empty strings. script[i] will hold the JavaScript statements to render the graphics for ith frame. 3. For each display atom a in S, An Online Development Environent 9 • If any error is found in the display atoms, present an error to the user detailing the incorrect usage of the atoms. • If a contains a shape command, let its style name be sn, find all style commands defining sn. For each style command, translate it into the corresponding JavaScript code Ps on modifying the styling of the canvas pen. Then translate the shape command into JavaScript code Pr that renders that command. Let Pd be the proper combination of Ps and Pr to render a. ∗ if a is an drawing atom, append Pd to script[i] for every frame i of the animation. ∗ if a is an animation atom, let i be the frame referred to in a. Append Pd to script[i]. 4. Formulate the output program P as follows: • add, to P , the canvas element <canvas id="myCanvas" width="500" height="500"> </canvas>. • add, to P , the script element <script> </script> whose content includes ∗ the JavaScript code to associate the drawings in this script element with the canvas element above. ∗ an array drawings initialized by the content of script array. ∗ Javascript code executing the statements in drawings[i] when the time to show frame i starts. End of algorithm. Implementation. The “Execute” button in the webpage (front end) of the online SPARC environment is for programmers to render the display atoms in the answer set of their programs. The Java program implementing our algorithm above is at the server side. When the “Execute” button is clicked, the programmer’s SPARC program will be sent to the server side and the algorithm will be invoked with the program. The output (i.e., the canvas and script elements) of the algorithm will be sent back to the front end and the JavaScript in the front end will catch the output and insert it into the result display area of the front web page (See Figure 1). The Internet browser will then automatically render the updated web page and the drawing or animation will be rendered as a result. Example SPARC programs with drawing and animation can be found at https://goo.gl/nLD4LD. 5 Discussion and Related Work As ASP has been applied to more and more problems, the importance of ASP software development tools has been realized by the community. Some integrated development environment (IDE) tools, e.g., APE [19], ASPIDE[6], iGROM[10] and SeaLion [17] have previously been developed. They provide a graphical user interface for users to carry out a sequence of tasks from editing an ASP program to debugging that program, easing the use of ASP significantly. However, the 10 Marcopoulos, Reotutar and Zhang target audience of these tools is experienced software developers. Compared with the existing environments, our environment is online, self contained (i.e., fully independent of the users’ local computers) and provides a very simple interface, focusing on teaching only. The interface is operable by any person who is able to use a typical web site and traverse a local file system. As for drawing and animation, our work is based on the work of Cliffe et al. [4]. They are the first to introduce, to ASP, a design of display predicates and to render drawings and animations using the program ASPviz. Our drawing commands are similar to theirs. The syntax of their animation atoms is not clear from their paper. It seems (from examples on github at goo.gl/kgUzJK accessed on 4/30/2017) that multiple answer sets may be needed to produce an animation. In our work we use a design where the programmers are allowed to draw at any frame (specifying a range of the frames) and the real time difference between two neighboring frames is 1/60 second. Another clear difference is that our implementation is online while theirs is a standalone software. A more recent system, Kara, a standalone software by Kloimullner et al. [11], deals with drawing only. Another system ARVis [1] offers method to visualize the relations between answer sets of a given program. We also note an online environment for IDP (which is a knowledge representation paradigm close to ASP) by Dasseville and Janssens [5]. It also utilizes a very simple interface for the IDP system and allows drawing and animation using IDP through IDPD3 (a library to visualize models of logic theories) by Lapauw et al. [14]. In addition to drawing and animation, IDPD3 allows users’ interaction with the IDP program (although in a limited manner in its current implementation), which is absent from most other systems including ours. Our environment is also different from the online IDP environment in that ours targets ASP and offers an online file system. Both DLV and Clingo offer online environments (http://asptut.gibbi.com/ and http://potassco.sourceforge.net/clingo.html respectively) which provide an editor and a window to show the output of the execution of dlv and clingo command, but provide no other functionalities. We also noted the SWISH (http://lpsdemo.interprolog.com) which offers an online environment for Prolog and a more recent computer language Logic-based Production Systems [13]. A unique functionality of our online environment is to query a program. It allows to teach (particular to general students) basics of Logic Programming without first touching the full concept of answer sets. When we outreached to a local high school before, we needed an experienced student to communicate with the school lab several times before the final installation of the software on their computers could be completed. A carefully drafted document is prepared for students to install the software on their computers. There are still unexpected issues during lab or when students use/install the software at home. These difficulties made it almost impossible to outreach to the high school with success. With the availability of our online environment, we only need to focus on the teaching content of ASP without worrying about the technical support. We hope our environment, and other online environments, for knowledge representation systems will expand the teaching of knowledge repre- An Online Development Environent 11 sentation to a much wider audience in the future. The drawing and animation are new features of the online environment and was not tested in high school teaching. We have used the drawing and animation in a senior year course – special topics in AI – in spring 2017. Students demonstrated interests in drawing and animation and they were able to produce interesting animation. We also noted that it can be very slow for ASP solvers to produce the answer set of an animation program when the ground program is big. In the future, it will be interesting to have a more rigorous evaluation of the online environment. 6 Acknowledgments The authors were partially supported by National Science Foundation (grant# CNS-1359359). We thank Evgenii Balai, Mbathio Diagne, Michael Degraw, Peter Lee, Maede Rayatidamavandi, Crisel Suarez, Edward Wertz and Shao-Lon Yeh for their contribution to the implementation of the environment. We thank Michael Gelfond and Yinan Zhang for their input and help. References 1. Ambroz, T., Charwat, G., Jusits, A., Wallner, J.P., Woltran, S.: Arvis: visualizing relations between answer sets. In: International Conference on Logic Programming and Nonmonotonic Reasoning. pp. 73–78. Springer (2013) 2. Balai, E., Gelfond, M., Zhang, Y.: Towards answer set programming with sorts. In: Logic Programming and Nonmonotonic Reasoning, 12th International Conference, LPNMR 2013, Corunna, Spain, September 15-19, 2013. Proceedings. pp. 135–147 (2013), http://dx.doi.org/10.1007/978-3-642-40564-8 14 3. Clark, D., Nelson, B., Sengupta, P., DAngelo, C.: Rethinking science learning through digital games and simulations: Genres, examples, and evidence. In: Learning science: Computer games, simulations, and education workshop sponsored by the National Academy of Sciences, Washington, DC (2009) 4. Cliffe, O., De Vos, M., Brain, M., Padget, J.: Aspviz: Declarative visualisation and animation using answer set programming. In: International Conference on Logic Programming. pp. 724–728. Springer (2008) 5. Dasseville, I., Janssens, G.: A web-based ide for idp. arXiv preprint arXiv:1511.00920 (2015) 6. Febbraro, O., Reale, K., Ricca, F.: ASPIDE: integrated development environment for answer set programming. In: Logic Programming and Nonmonotonic Reasoning - 11th International Conference, LPNMR 2011, Vancouver, Canada, May 16-19, 2011. Proceedings. pp. 317–330 (2011), http://dx.doi.org/10.1007/ 978-3-642-20895-9 37 7. Gebser, M., Kaufmann, B., Kaminski, R., Ostrowski, M., Schaub, T., Schneider, M.: Potassco: The potsdam answer set solving collection. Ai Communications 24(2), 107–124 (2011) 8. Gelfond, M., Kahl, Y.: Knowledge Representation, Reasoning, and the Design of Intelligent Agents. Cambridge University Press (2014) 12 Marcopoulos, Reotutar and Zhang 9. Guzdial, M.: Use of collaborative multimedia in computer science classes. ACM SIGCSE Bulletin 33(3), 17–20 (2001) 10. iGROM: http://igrom.sourceforge.net/ 11. Kloimüllner, C., Oetsch, J., Pührer, J., Tompits, H.: Kara: A system for visualising and visual editing of interpretations for answer-set programs. In: Applications of Declarative Programming and Knowledge Management, pp. 325–344. Springer (2013) 12. Kowalski, R.: Logic programming. Computational Logic, Volume 9 (Handbook of the History of Logic) (2014) 13. Kowalski, R., Sadri, F.: Programming in logic without logic programming. Theory and Practice of Logic Programming 16(03), 269–295 (2016) 14. Lapauw, R., Dasseville, I., Denecker, M.: Visualising interactive inferences with idpd3. arXiv preprint arXiv:1511.00928 (2015) 15. McIlraith, S.: What’s hot in knowledge representation and reasoning. Talk in the AAAI-12 SUBAREA SPOTLIGHTS TRACK on Knowledge Representation (2011) 16. Mendelsohn, P., Green, T., Brna, P.: Programming languages in education: The search for an easy start. Psychology of programming pp. 175–200 (1990) 17. Oetsch, J., Pührer, J., Tompits, H.: The sealion has landed: An ide for answer-set programmingpreliminary report. In: Applications of Declarative Programming and Knowledge Management, pp. 305–324. Springer (2013) 18. Reyes, M., Perez, C., Upchurch, R., Yuen, T., Zhang, Y.: Using declarative programming in an introductory computer science course for high school students. In: Thirtieth AAAI Conference on Artificial Intelligence (2016) 19. Sureshkumar, A., De Vos, M., Brain, M., Fitch, J.: APE: an ansprolog* environment. Proc. SEA 7, 101–115 (2007)
2cs.AI
Evolving the Incremental λ Calculus into a Model of Forward AD∗ Robert Kelly† Barak A. Pearlmutter‡ Jeffrey Mark Siskind§ April 2016 arXiv:1611.03429v1 [cs.PL] 10 Nov 2016 Introduction Formal transformations somehow resembling the usual derivative are surprisingly common in computer science, with two notable examples being derivatives of regular expressions [1] and derivatives of types [2, 3]. A newcomer to this list is the incremental λ-calculus, or ILC, a “theory of changes” that deploys a formal apparatus allowing the automatic generation of efficient update functions which perform incremental computation [4]. An example of this would be using the ILC derivative-like operator D to alter a function f : B → B, which performs some major reorganization on a database (of type B), into the update function D f : B → ∆B → ∆B. Here ∆B is the type of changes to B. So D f , given an initial database, maps a change to that input database to a change to the output database. This in principle, and as shown in their work also in practice, allows enormous savings when the change to the input is small compared to the size of the input itself. Resemblance to the standard derivative can be exhibited by a simple example D (λ x . f (g x)) (λ x x′ . D f (g x) (D g x x′ )) (1a) D f (g x) ◦ D g x (1b) or D (f ◦ g) x which seems suspiciously similar to the familiar Calculus 101 chain rule. The ILC is not only defined, but given a formal machine-understandable definition—accompanied by mechanically verifiable proofs of various properties, including in particular correctness of various sorts. Here, we show how the ILC can be mutated into propagating tangents, thus serving as a model of Forward Accumulation Mode Automatic Differentiation.1 This mutation is done in several steps. These steps can also be applied to the proofs, resulting in machine-checked proofs of the correctness of this model of forward AD. The Mutagenic Steps There are two differences between the incremental λ calculus and forward AD. First, changes rather than tangents are propagated. These changes are elements of change sets, and constitute finite (i.e., not infinitesimal) modifications. (For example, a change to a list might consist of swapping the first two elements, and a change to a number might consist of increasing its value by 5.) In numerics, these would be “differences” rather than “differentials”, and ∆ rather than ∂. Second, the changes are passed as additional arguments instead of being bundled together with primal values. Passing changes in additional arguments makes great sense in the domain of incremental computation, where the whole point of the construction is to partially evaluate a function D f : α → ∆α → ∆β with respect to f ’s original input, yielding a mapping of changes to changes: ∆α → ∆β. But in the context of forward AD, we wish to propagate tangent values in parallel with primal values, which necessitates both bundling the “new” values with the original ones, and including the original output in the output of the transformed function. We proceed to eliminate these two differences. This is done in two stages. First, considering only power series change sets to the base type R. And second, uncurrying the outputs of the derivative operator and causing it to propagate change sets and primal values bundled together all the way through to its output. Truncating the power series changes them into Dual Numbers [7], yielding the familiar Forward AD. A commutative diagram of these steps ∗ Extended abstract presented at the AD 2016 Conference, Sep 2016, Oxford UK. Author, Dept of Computer Science, National University of Ireland Maynooth, funded by the Irish Research Council, [email protected] ‡ Dept of Computer Science, National University of Ireland Maynooth, [email protected] § School of Electrical and Computer Engineering, Purdue University, [email protected] 1 The approach detailed here stands in contrast to the Simply Typed λ-Calculus of Forward Automatic Differentiation [5]. Aside from some issues with confluence, that work folded together levels of the hierarchy by not distinguishing numeric basis functions which operate on R from those which are lifted to operate on Dual numbers, while here these are distinguished. Moreover, here we have a framework for machine-readable machine-verified proofs of various correctness and efficiency properties. This approach differs from the Differential Lambda-Calculus [6] in analogous ways: complexity, machine-checked proofs, and explicit segregation of levels of differentiation. † Corresponding ∆R = R[ε] Incremental λ-Calculus Power Series Dual Numbers ∆R = R[ε] Higher-Order Forward AD uncurry uncurry uncurry Bundled ILC ∆R = R[ε]/ε2 ∆R = R[ε]/ε2 Forward AD Figure 1: Mutating the Incremental λ-Calculus (ILC) into Forward-Mode Automatic Differentiation (Forward AD). is shown in Figure 1. The original ILC is in the top left, with relevant changes indicated with transitions to new states or nodes. Each of these edges leads to a different combination of forward AD in the ILC. The power series and uncurry steps can be taken in either order, so the diagram should commute. Let us describe these two steps in a bit more detail. Step One: Power Series To see how power series change sets are introduced, we note that the ILC allows change sets to be defined for any base type τ . These change sets need only obey a particular set of axioms, which in our context amounts to associativity of addition of real numbers. We constrain ourselves to consider only change sets to reals: the base type R. We then represent these change sets not as differences, but instead as power series (in some variable ε) with a zero constant term. This means that the change set of x : R is a term of the form hzpsε i, where hzpsε i ::= 0 | ε ∗ hpsε i hpsε i ::= R | R + hzpsε i (2a) (2b) ∆R ≡ hzpsε i (2c) For a specific value of ε (possibly subject to conditions of convergence) this would take on a particular numeric value. We further define an operator coeff which takes a nonnegative integer index and a power series in ε wrapped in a λ expression, i.e., (λε . hpsε i), and yields the requested coefficient of the given power series. coeff 0 (λε . r) coeff 0 (λε . r + ε ∗ e) r r coeff 0 (λε . ε ∗ e) 0 coeff i (λε . r + ε ∗ e) coeff i (λε . ε ∗ e) (where ε 6∈ FV(r)) (where ε ∈ 6 FV(r)) (3a) (3b) (3c) coeff (i − 1) (λε . e) coeff (i − 1) (λε . e) (where i > 0 and ε 6∈ FV(r)) (where i > 0) (3d) (3e) For instance, coeff 2 (λε . 0.1 + ε ∗ (0.2 + ε ∗ (0.3 + ε ∗ (0.4 + ε ∗ (0.5 + · · · ))))) 0.3 Useful properties of such a change set are straightforward to establish: closure under the derivatives of the numeric basis functions, and dependence during such operators of coefficients only on coefficients of the same or lower order. The first property is necessary for consistency, while the second allows these power series to be truncated at ε2 , thus yielding the tangents of standard forward AD. With this machinery, we could define the familiar derivative diff : (R → R) → (R → R), for instance diff sin = cos, as diff f x ≡ coeff 1 (λε . (D f x (ε ∗ 1))) (4) By defining coeff to distribute over algebraic datatypes coeff i (λε . Constructor e1 · · · en ) Constructor (coeff i (λε . e1 )) · · · (coeff i (λε . en )) (5a) and post-compose over functions coeff i (λε . (λx . e)) (λx . coeff i (λε . e)) (where x 6= ε) (5b) this machinery can find directional derivatives of functions with non-scalar output, including Church-encoded output. In this formulation, the tagging necessary to distinguish distinct nested invocations of derivative-taking operators [8, 9] is handled by the standard λ-calculus mechanisms for avoiding variable capture during β-substitution, e.g., α-renaming. Step Two: Uncurrying and Bundling The second step is uncurrying arguments, and bundling the output. We need to change the type of the derivative operator from D : (t1 → t2 → · · · → tn → u) → (t1 → ∆t1 → t2 → ∆t2 → · · · → tn → ∆tn → ∆u) (6) D̂ : (t1 → t2 → · · · → tn → u) → (F t1 → F t2 → · · · → F tn → F u) (7) to where F t is isomorphic to t × ∆t, a primal value bundled with its change set. If we define F (t1 → t2 ) = F t1 → F t2 then this yields a simpler type signature, D̂ : t → F t (8) The mechanics of this change are straightforward, requiring that the ILC reductions be modified to take the new shape. Note that, thus uncurried and carrying primal and change set values in tandem, the chain rules of Equation 1 are simplified: D̂ (f ◦ g) D̂ f ◦ D̂ g. Acknowledgments This work was supported, in part, by Science Foundation Ireland grant 09/IN.1/I2637 and by NSF grant 1522954-IIS. Any opinions, findings, and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect the views of the sponsors. References [1] Janusz A. Brzozowski. Derivatives of regular expressions. Journal of the ACM (JACM), 11(4):481, 1964. [2] Conor McBride. The derivative of a regular type is its type of one-hole contexts, 2001. URL http://strictlypositive.org/diff.pdf. Available online. [3] Michael Abbott, Neil Ghani, Thorsten Altenkirch, and Conor Mcbride. ∂ for data: Differentiating data structures. Fundamenta Informaticae, 65(1-2):1–28, August 2004. URL http://strictlypositive.org/dfordata.pdf. [4] Yufei Cai, Paolo G. Giarrusso, Tillmann Rendel, and Klaus Ostermann. A theory of changes for higher-order languages: Incrementalizing λ-calculi by static differentiation. In Proceedings of the 35th ACM SIGPLAN Conference on Programming Language Design and Implementation, pages 145–55, 2014. doi: 10.1145/2594291.2594304. URL https://inc-lc.github.io/resources/pldi14-ilc-author-final.pdf. See arXiv:1312.0658. [5] Oleksandr Manzyuk. A simply typed λ-calculus of forward automatic differentiation. In Mathematical Foundations of Programming Semantics Twenty-eighth Annual Conference, pages 259–73, Bath, UK, June 6–9 2012. URL http://dauns.math.tulane.edu/~ mfps/mfps28proc.pdf. [6] Thomas Ehrhard and Laurent Regnier. The differential lambda-calculus. Theoretical Computer Science, 309(1-3):1–41, December 2003. [7] William Kingdon Clifford. Preliminary sketch of bi-quaternions. Proceedings of the London Mathematical Society, 4:381–95, 1873. [8] Jeffrey Mark Siskind and Barak A. Pearlmutter. Nesting forward-mode AD in a functional framework. Higher-Order and Symbolic Computation, 21(4):361–76, 2008. doi: 10.1007/s10990-008-9037-1. [9] Oleksandr Manzyuk, Barak A. Pearlmutter, Alexey Andreyevich Radul, David R. Rush, and Jeffrey Mark Siskind. Confusion of tagged perturbations in forward automatic differentiation of higher-order functions. Higher-Order and Symbolic Computation, 2015. To appear. See also arXiv:1211.4892.
2cs.AI
Computational impact of hydrophobicity in protein stability Geetika S. Pandey¹ Dr. R.C Jain² Research Scholar, CSE dept., RGPV, Bhopal (M.P), India [email protected] Director, SATI(D), Vidisha(M.P), India [email protected] Abstract- Among the various features of amino acids, the hydrophobic property has most visible impact on stability of a sequence folding. This is mentioned in many protein folding related work, in this paper we more elaborately discuss the computational impact of the well defined ‘hydrophobic aspect in determining stability’, approach with the help of a developed ‘free energy computing algorithm’ covering various aspects - preprocessing of an amino acid sequence, generating the folding and calculating free energy. Later discussing its use in protein structure related research work. proteins are categorized as extracellular and intracellular. So basically through the various studies [2] could conclude that the core of protein contains hydrophobic amino acids forming certain bonds and thus structures. the stability of the structures is determined by the free energy change , as mentioned by Zhang et. al [3] i.e. Keywords- amino acids, energy, protein stability. hydrophobicity, ΔG(folding)=G(folded)-G(unfolded) [3] Later in this paper various aspects of folding and stability are discussed in detail. free II. BACKGROUND A. Features I. Shaolei Teng et.al.[4] mentioned twenty amino acid features which they used to code each amino acid residue in a data instance. They obtained these features from Protscale (http://expasy.org/tools/protscale.html) [5] and AAindex (http://www.genome.jp/aaindex/) [6]. They further mentioned these features into four categories - INTRODUCTION Since the earliest of proteomics researches, it has been clear that the positioning and properties of amino acids are key to structural analysis [1]. According to Betts et.al. in the protein environment a feature of key importance is cellular location. Different parts of cells have very different chemical environments with the consequence that many amino acids behave differently. The biggest difference as mentioned by Betts et.al. is between soluble proteins and membrane proteins. The soluble proteins tend to be surrounded by water molecules i.e have polar or hydrophilic residues on their surface whereas membrane proteins are surrounded by lipids i.e they tend to have hydrophobic residues on the surface that interact with the membrane. Further the soluble Biochemical features – includes M, molecular weight, this is related to volume of space that a residue occupies in protein structure. K, side chain pka value, which is related to the ionization state of a residue and thus plays a key role in pH dependent protein stability. H, hydrophobicity index, which is important for amino acid side chain packing and protein folding. The hydrophobic interactions make non-polar side chains to pack together inside proteins 1 and disruption of these interactions may cause protein destabilization. P, polarity, which is the dipole-dipole intermolecular interactions between the positively and negatively charged residues. Co, overall amino acid composition, which is related to the evolution and stability of small proteins.  Structural features- this includes A, alpha-helix. B, beta-sheet. C, coil. Aa, average area buried on transfer from standard state to folded protein. Bu, bulkiness, the ratio of the side chain volume to the length of the amino acid.    Empirical Features- this includes, S1, protein stability scale based on atom atom potential of mean force based on Distance Scaled Finite Ideal-gas Reference (DFIRE). S2, relative protein stability scale derived from mutation experiments. S3, side-chain contribution to protein stability based on data from protein denaturation experiments.   Other biological features- F, average flexibility index. Mc, mobility of an amino acid on chromatography paper. No, number of codons for an amino acid. R, refractivity, protein density and folding characteristics. Rf, recognition factor, average of stabilization energy for an amino acid. Rm, relative mutability of an amino acid. Relative mutability indicates the probability that a given amino acid can be changed to others during evolution. Tt, transmembrane tendency scale. F, average flexibility index of an amino acid derived from structures of globular proteins.  C. Factors affecting protein stability Protein stability is the net balance of forces which determine whether a protein will be in its native folded conformation or a denatured state. Negative enthalpy change and positive entropy change give negative i.e. stabilizing, contributions to the free energy of protein folding, i.e. the lower the ∆G, the more stable the protein structure is [7]. Any situation that minimizes the area of contact between H₂O and non-polar, i.e hydrocarbon, regions of the protein results in an increase in entropy [9]. B. Protein folding Protein folding has been considered as one of the most important process in biology. under the various physical and chemical conditions the protein sequences fold forming bonds , when these conditions are favourable the folding leads to proper biological functionality. But some conditions could lead to denaturation of the structures thus giving unfolded structures. protein denaturants could be [7] –   Heavy metals(e.g. lead, cadmium etc), highly toxic, efficiently induce the ‘stress response’. Proteotoxic agents(e.g. alcoholc, crosslinking agents etc.) Oxygen radicals, ionizing radiation- can cause permanent protein damage. Chaotropes (urea, guandine hydrochloride etc.), highly potent at denaturing proteins, often used in protein folding studies. Protein folding considers the question of how the process of protein folding occurs, i.e how the unfolded protein adopts the native state. Very often this problem has been described as the second half of the genetic code. Studies till date conclude the following steps as the solution for this problem [8] – 3D structure prediction from primary sequence. Avoiding misfolding related to human diseases. Designing proteins with novel functions. ∆G = ∆H - T∆S  High temperatures, can cause protein unfolding, aggregation. Low temperatures, some proteins are sensitive to cold denaturation. 2 Following are the factors affecting protein stability [8]: pH : proteins are most stable in the vicinity of their isoelectric point, pI. In general, with some exceptions, electrostatic interactions are believed to contribute to a small amount of the stability of the native state.    The data in this case is a protein sequence loaded from protein data bank with pdb id 5CYT, heme protein, using Matlab 7. Ligand binding: binding ligands like inhibitors to enzymes, increases the stability of the protein. Disulphide bonds: it has been observed that many extracellular proteins contained disulphide bonds, whereas intracellular proteins usually did not exhibit disulphide bonds. Disulphide bonds are believed to increase the stability of the native state by decreasing the conformational entropy of the unfolded state due to the conformational constraints imposed by cross linking (i.e decreasing the entropy of the unfolded state). Dissimilar properties of residues: not all residues make equal contributions to protein stability. Infact, studies say that the interior ones, inaccessible to the solvent in the native state make a much greater contribution than those on the surface. III. Pro= 'XGDVAKGKKTFVQKCAQCHTVENGGKHKVG PNLWGLFGRKTGQAEGYSYTDANKSKGIVWN NDTLMEYLENPKKYIPGTKMIFAGIKKKGERQ DLVAYLKSATS' C. Methods In brief the steps are as follows: 1) Preprocessing of the input primary protein sequence using the hydrophobicity scale developed by Kyte & Doolittle [9], i.e. developing a vector with hydrophobic amino acids represented by 1 and hydrophilic by 0. 2) Calculating the free energy of this initial sequence 3) Now generating various foldings through iteration, using complex number ‘i’. 4) Calculating the free energy for all these foldings. 5) Now further these free energy values could be used to check the stable structures. EXPERIMENTAL PROCEDURE A. Approach As per the amino acid features mentioned previously, the hydrophobic property is most responsible for the folding, as well as stability related issues. Hence in the algorithm mentioned later this property is taken as the key in preprocessing of the input sequence, i.e. the binary representation where ‘1’ denotes the hydrophobic amino acids and others as ‘0’, as per the hydrophobicity scales proposed by Kyle et. al [9]. Then using the complex plane the folding configurations are formed and their combinations denote various turns [10]. The cumulative sum of the configuration is calculated which gives the direction of each fold. Later the free energy of each folding is calculated using Euclidean distance between the hydrophobic amino acids i.e. all 1s and as per the study the folding having lower free energy value would be stable hence the stable structures could be obtained. D. Algorithm Input – an amino acid sequence, Pro. Output- an array of free energy of each structure predicted, E. 1) Preprocessing of the input protein sequence a) N ← length(Pro) b) bin ← Pro c) for idx ← 1:N d) if Pro(idx)= hydrophobic e) then bin(idx)← 1 f) else bin(idx) ← 0 g) end h) end 2) folding formation a) conf ← ones(length(bin)-1,1) b) e ← Free_energy(conf) c) for k ← 2:length(conf) d) f(1:k) ← i e) f(k+1:end)←1 B. Data 3 f) conf ← conf*f g) F(:,count) ← conf h) count = count+1 i) end 3) free energy of all the structures in F(m,n) a) for j ← 1:n b) q ← F(:,j) c) p ← Cumulative_sum(q) d) E(j) ← Free_Energy(p) e) End 4) Algorithm for Cumulative Sum Cumulative_sum (a) a) for x ← 1 : length(a) b) sum ← sum + a(x) c) end 5) Algorithm for Free energy Free_Energy(a) a) a ← a * (bin with only hydrophobic elements) b) for x ← 1 : length(a) c) d ← abs( a(x) –a(x+1)) d) sum ← sum + d e) end f) energy ← sum IV. hydrophobicity could be coupled with any other amino acid feature. REFERENCES [1] Matthew J. Betts and Robert B. Russell , Amino Acid Properties and Consequences of substitutions, Chap. 14, ‘Bioinformatics for Geneticists’, 2003. [2] Cuff JA. Barton G.J. “Evaluation and Improvement of Multiple Sequence Methods for Protein Secondary Structure Prediction, PROTEINS: Structure, Function, and Genetics, 1999; 34: 508-19, Available from: httop://binf.gmu.edu/vaisman/csi731/pr99-cuff.pdf. [3] Zhe Zhang, Lin Wang, Daquan Gao, Jie Zhang, Maxim Zhenirovskyy and Emil Alexov, “Predicting folding free energy changes upon single point mutations”. Bioinformatics Advance Access published, Jan. 2012. [4] Shaolei Teng, Anand K. Srivastava, and Liangjiang Wang, “Biological Features for Sequence-Based Prediction of Protein Stability Changes upon Amino Acid Substitutions”. International Joint Conference on Bioinformatics, Systems Biology and Intelligent Computing, 2009. [5] H.C. Gasteiger E., Gattiker A., Duvaud S., Wilkins M.R., Appel R.D. and Bairoch A. , The Proteomics Protocols Handbook, Humana Press, 2005. [6] S. Kawashima and M. Kanehisa, "AAindex: amino acid index database," Nucleic Acids Res, vol. 28, Jan 1. 2000, pp. 374. [7] Lecture 2, Proteins: structure, translation, http://www.sfu.ca/~leroux/class_L02.ppt. [8] Protein stability, Protein Folding, misfolding – chemistry, http://www.chemistry.gsu.edu/faculty/.../Protein /lecture6_foldingprotein_stability.ppt [9] 76-456/731 Biophysical Methods- Protein structure component, Lecture 2: Protein interactions leading to folding http://www.chembio.ugo. [10] Jack Kyte and Russell F. Doolittle,’ A simple method for displaying the hydropathic character of a protein ‘, J. Mol. Biol. 157, 105-132, 1982. [11] www.mathworks.in/matlabcentral/contest/contests/11/r ules. Results The length of the sequence in this case was 104, hence as the algorithm total number of folding created is 103, each column of matrix F (fig. 1) shows a folding. And each row of array E (fig. 2) shows the free energy for each folding. Here the free energy of the unfolded structure is ‘e= 45194’. V. Discussion and futurework The result from this approach provides the practical aspect of the impact of hydrophobicity on stability, the various outcomes could be used for further research or with some modifications could lead the ultimate solution. With the help of this method the folding could be generated at any structure level, these folding could be used for further research work like in machine learning or neural networks. The free energy calculated could be further used for clustering or classification purposes, thus could enhance the study of the stability factors. In the future work 4 AUTHORS PROFILE R. C. Jain, M.Sc., M. Tech., Ph. D., is a Director of S.A.T.I. (Engg. College) Vidisha (M. P.) India. He has 37 years of teaching experience. He is actively involved in Research with area of interest as Soft Computing, Fuzzy Systems, DIP, Mobile Computing, Data Mining and Adhoc Networks. He has published more than 125 research papers, produced 7 Ph. Ds. and 10 Ph. Ds are under progress. Geetika S. Pandey obtained her B.E degree in Computer Science and Engineering from University Institute of Technology, B.U, Bhopal in 2006. She obtained Mtech degree in Computer Science from Banasthali Vidyapith, Rajasthan in 2008. She worked as Assistant Professor in Computer Science and Engineering Department in Samrat Ashok Technological Institute, Vidisha (M.P). She is currently pursuing Ph.D. under the supervision of Dr. R.C Jain, Director, SATI, Vidisha. Her research is centered on efficient prognostication and augmentation of protein structure using soft computing techniques. 5 Appendix Fig. 1, F(103x103) , various folding of sequence pro. Fig. 2, E(103x1), free energy of each folding. 6
5cs.CE
Object-oriented solutions † V.E.Wolfengagen‡ arXiv:cs/0106021v1 [cs.LO] 11 Jun 2001 Vorotnikovsky per., 7, bld. 4 Institute for Contemporary Education “JurInfoR-MSU” Moscow, 103006, Russia [email protected] Abstract The resulting model seems to be a kind of object evaluator. The object evaluator feature is to incorporate the schematic elements which are subdivided into individuals and individual concepts. Both of the entities are based on the notion of the variable domain. This is a schematic construction and is equipped with both the cloning and transactional means to capture dynamics. All the parts of object evaluator share the same functor model with the parameterized types and assignments. The logical part has been supplied with both the atomic and non-atomic formulae with the variables ranging over the variable domains. The categorical part assists the evaluation to enable the extraction of a substitutional part. The applicative part is capable of separating the computation paths for function and its argument. In this paper are briefly outlined the motivations, mathematical ideas in use, pre-formalization and assumptions, object-as-functor construction, ‘soft’ types and concept constructions, case study for concepts based on variable domains, extracting a computational background, and examples of evaluations. In this paper are briefly outlined the motivations, mathematical ideas in use, pre-formalization and assumptions, object-as-functor construction, ‘soft’ types and concept constructions, case study for concepts based on variable domains, extracting a computational background, and examples of evaluations. 1 Introduction An early incite in a theory of computations was to incorporate objects for a variety of purposes. They were assumed to represent the existent - actual, possible or virtual objects in a problem domain. The nature of existence was also under the concentrated study. The recent years have generated a lot of object assumptions and discussions. Nevertheless, the initial notion of an object became overloaded by the mismeaning and not significant features. Every new research in the area added the excessive troubles to understand the clear sense and meaning of the object paradigm. An attempt to rearrange the useful ideas will be done here. The main attention is paid to establishing the parallelism between a theory of computations and the object-oriented notions. 1.1 1.2 Motivation for object evaluator Object can be represented by embedding in a host computational environment. An embedded object is accessed by the laws of the host system. A pre-embedded object is observed as the decomposition into substitutional part and access function part which are generated during the object evaluation. They assist to easy extract of the result. Subsumption is an usual theory-of-computation technique. Counterparts of the entire method – logic, functor category, and applicative computations, – are attached to generate an intermediate computational framework. This intermediate representation is indirectly based on the categorical combinatory logic. The needed optimizations may be obtained equationally. † This research is supported by the Russian Foundation for Basic Research (project 93-012-943) ‡ also: Kashirskoe Avenue, 31, Cybernetics Department, Moscow Engineering Physical Institute, Moscow, 115409, Russia Proceedings of the 2nd International Workshop on Advances in Databases and Information Systems (ADBIS’95). Vol. 1: Regular papers. Moscow, June 27–30, 1995. c 1995–2001 V.E. Wolfenagegen. 235 Evolution of the ideas A technical intuition for an object is approximately as follows: object is proclaimed to be an entity (by default) with the strictly attached attributes – ‘internal state’ and ‘behavior’ [EGS93]. Some of the objects are called the ‘dynamic objects’, that communicate with each other (note that communication is presupposed of great importance). Next step is to classify objects by their type, to collect objects into classes, to superimpose the various inheritances, to compose for generating complex objects. Note that computational intuition tends to establish object as a mathematical process. 1.2.1 Logic to incorporate objects An approach to apply logic to a phenomena of object seems to be clear and natural (e.g., [HC89], [Jac92] [Gab93]). Nevertheless, adoption of more or less traditional approach of logic is distant of the essence of the initial task to be solved. When the researcher was to pick this kind of science it would combine some significant elements. 1. The conditions of reasoning that transcend not only logic, but both the mathematics and the theory of computation(s). 2. The traditions of observation and insight that led into the foundations of these sciences. The semantics of traditional logics is often used but this argument is not sound. The most important for the notation is to be usable by the computational tool that applies it to the environment to produce the results. To share the concern for the rigorous theory it is not necessary to adopt all the amount of any particular formalism. The more 1.2.5 prominent approach seems to be based more on the constraints that can be superimposed by the problem. If the existing formalism turns off to match these conditions then that means a perspective to find out for meaningful thing. If to confine the search for the theory of objects to areas were formalism has already succeed in the answer may to be missed. A necessary theory is likely to be found where the logic meets the incompleteness, troubles of intensions etc. As a rule, the traditional logical machinery seems to be well applied to pre-formalized reality and is not suitable equipped with the means for more dynamic occasions. When we go back to the generic principal ideas we have more possibilities to expand the predefined tools to deal with the problem as it is arose and used by the computational devices. 1.2.2 A ‘phenomena’ of object was discussed many times with a lot of attitudes. Some selected and superimposed questions seem to be as follows: how new individuals come into existence and go away as situation changed; how concepts get their semantics in realistic conditions e.g., with a tremendous set of possible worlds; traditional (logical) machineries are usable to prove the existence of an individual (under some properties) but give no equipment to name that, possibly generated, individual and refer to it by name in further consideration; Manifesting a category theory An early trouble was the suitability of a theory for the working researcher. The same is for a category theory. The theoretician position (see [Law75], [Gog89], [EGS91]) seems to have embraced category theory as the pre-eminent universal science, to adopt its more or less traditional approach with a possible missing the significant initial features. The term ‘arrow thinking’ as it is used in a category theory refers to the standardized notion – within this theory, – that prescribes a mapping of the terms and expressions of the initial system into a world of abstract functions. But it is only one element of categorical philosophy. In most significant applications of category theory such a thinking does not map symbolic expressions into real objects with the substantial properties, and such models become only imaginable. For some systems of logic model is described by the theory, e.g. in the form of cartesian closed category (c.c.c.). The need is to manipulate the elements. A domain T is said to have an element if there is a map h : I → T (here: I is a domain of assignments). If f is a constant function f : T → S, then f ◦ h : I → S. Thus, maps in c.c.c. can behave as functions on elements. 1.2.3 first-order logic provides a tool to support the necessary truths and their consequences. It provides no machinery to deal with the relationships with the creation or destruction of individuals; what is the machinery to characterize the way individuals change over time; what is an ability to reify the notion of the state (in different contexts); how to talk about both the direct and side effects of the actions; ... All of this place the state-of-things in the proper perspective. All of this clearly indicate that the long term hoped-for unified logic, categorical framework, or computational system is not yet reached. The variety of logics, theories, models, and approaches tends to more growth. 2 Applicative computational systems Restricting the topic: pre-formalization Some efforts to encircle the task will be needed. Both direct and indirect solutions are substantially based on putting the ideas in a certain order. Subsumption is a common technique shared by distinct ‘dimensions’ – logical, categorical, and computational ([Wol93]). A lot of theories (not necessary logic or category theory) have the ultimate goal to develop a notion or construction which suits for the interpretation of abstract objects. For instance, λ−calculus and combinatory logic contain in their foundation a concept of object to suit the computational needs ([Sco80]). Moreover, an isomorphism between intuitionist logics and typed λ−calculi was established. An original Curry’s theory of functions generated formula-as-type notion under which a proof of a statement ∃xB is a pair < a, b > consisting of an object a and a proof B[a]. In practice, a type is regarded as an abstract object whereas a formula is the name of a type. All of this is in harmony with a principal feature of the applicative computations, namely: (1) the symbols of function and its argument are treated separately as the distinct objects; (2) the first object is applied to the second under an application metaoperator. The advantages of this approach are not yet entirely observed. 1.2.4 Introducing abstract objects 2.1 The starting assumptions Most of the approaches start with the notion of a problem domain. The problem domain is viewed as a part of physical or imaginable (perceptual) reality, or external world. This is a natural starting point. As a result the observer is to operate with a representation. The represented domain is inhabited by the (atomic) entities, or individuals. A safety reason is to set up individual as a primary concept that is not assumed to be definable. In fact, the observer operates with the constructs that represent the individuals. Important: The possibility does exist to gather the individuals into a single domain D, and this D is given from the beginning. Intermediate theoretical framework All of the theories above seem to have an universality. The method is to add the restrictions to enrich the pure theory by the needed sensitivity. For instance, the connection between λ−calculus and c.c.c. ([CCM85]) has generated the variants of categorical combinatory logic. A basic concept for the approach was given by the set of abstract objects, namely, categorical combinators. This kind of objects is within both a category and computational system. They share the clear advantages of the distinct subsystems. The advanced studies in a theory of computations prescribe D as a domain of potential (or: schematic) individuals. To the contrast the recent object-oriented studies almost ignore this fact. This ignorance does omit namely the feature of potentiality, or possibility of individual. The individual is possible with respect to some theory (of individuals). Advance: The individual may be relativized and gives a family of object-oriented strategies. 236 Filling in the gap: The gap between the observer (and his language) on the one hand and the individuals on the other hand does exist in object-oriented modelling. E.g., ‘this theory of objects is similar to usual’. The individuals (theories) enter the domain and leave it cancelling their own existence. The ‘flow of events’ in the example may be based on a time flow. Any two theories are to be compared in spite of their existence in different ‘moments’. The theories are not necessary fixed, thus all amount of the possible individuals is involved. An abridgement is given by the evaluation map: k·k· : Further advance: The individuals are separated, at least, into possible and virtual.  descriptions λ − expressions × assignments → individuals. (Here: an assignment is temporary viewed as an index ranging the families.) The abridged concepts are an attribute a and property Φ(·) (via the description): Only the virtual individuals are completely ideal objects. So the regularity of the observer’s language is increased. In mathematical practice to be a possible individual means to be described, but the virtual individual (objects) does need the axioms. a =k Ix.Φ(x) ki for i ∈ I Effect: The virtual objects increase the structure regularity of the (initial) domain D. (Attr) An attribute thus defined indicates the set of individuals with a property Φ(·). In usual terms the functional representation of attribute is established (attribute is a mapping from a set of things and a set of ‘observation points’ into a set of values). Note that a ‘thing’ is represented by the ‘description’. As a result, clear distinction between actual, possible and virtual individuals induces the inclusion: A ⊆ D ⊆ V, Principle adopted: The attribute is defined by (Attr). The addition of the uniqueness where A is a set of actual individuals, D is a set of possible individuals, and V is a set of virtual individuals. ¯ i = true} (Singleton) {a} = {d ∈ D | kΦ(d)k Advance: The central computational proposal is to generate actual individuals as the different families of D, as necessary and sufficient condition kIx.Φ(x)ki = a ⇔ ¯ i = true} (Unique) ⇔ {a} = {d ∈ D | kΦ(d)k Ai ⊆ D for i ∈ I. enforces the observer to conclude: fixing the family i ∈ I and ¯ i relatively to every d ∈ D, he verifies the evaluating kΦ(d)k uniqueness of d. Trouble: The object-oriented approaches propose to operate a fuzzy notion of a thing and property ignoring the distinctions between generic and derived concepts. The language of the observer is likely mixed with the domain D. Thus, the meaning of an individual is violated. 2.2  Here the individual is called as a and is adopted as an evaluation of the description relatively to i. Other generic notions 2.3 Starting with things and properties the observer builds the composite things and establishes for his objects the attributes (is there any object without attribute ?). Thus, an observer actually needs a (logical) language, even overcoming his own initial desire. The obvious approach is getting started with a choice of logics. Functional scheme A general solution for attributes attracts the set of attribute functions (Attr) that is called as a functional scheme. Advance: Equation (Attr) is to be revised as follows: Ix.Φ(x) = h̄ kh̄k = h Trouble: The logics is not homogeneous. Its branches, especially for a theory of computations contain the suitable advances. They do not suit the amorphous idea of a thing and property. h(i) = a Instead of overcoming this barrier theory of computations enables the regular and working logics of the descriptions. The descriptions directly illustrate the difficulties and tend to general operators. Operating with things and properties gives a specific property - law. The law is essentially the constraint superimposing to the properties of a thing. Recall that in application the observer assigns attributes to things (they are not the intrinsic to things in contrast to properties). in a language of observer is an individual concept in a domain is an individual in a domain Further advance: Previously given scheme has a universe of discourse as ‘concept-individual’. An undevoted observer if needed may prefer the ‘individual-state’ universe. Thus, if h is an individual, then a is its state under the forcing condition i. Advantage: The generalized individuals (or: concepts) are schematic: h : I → C, Important: Both the logical formula Φ(x) and λ−expression λx.Φ(x) give the property, but the direct assignment of the property Φ(·) to the individual x is given by the description: where h is a mapping from the ‘observation points’ into the (subset of) attribute C. The latter undoubtedly is the set of individuals. Ix.Φ(x), with a sense ‘the (unique) x that Φ(x)’ (compare with λx.Φ(x), ‘those x that Φ(x)’). There is a clear reason to call h as a concept. Thus a concept really represent the functional scheme. 237 2.5 Effect: The (individual) functional schemes are to be gathered into a greater stock: Dynamics via evolvent The more dynamics may be added to an object. The task under solution is a behavior of a thing (= state evolution ‘in a time’). Note that the state will change due to both the external and internal events. {h | h : I → C} = HC (I) (VDom). Certainly, HC (I) is and idealized object. Important: The evolvent of stages is needed: Important: The object HC (I) is a representation, and what is specific the feature of a variable domain is captured. f : B → I, The possibilities and the advantages of a notion of variable domain are applied mostly to the dynamics. 2.4 where stages are evolved from I to B (note the reversed order, so B is later than I). Computationally are given: Hg : HC → HE for g : C → E (C, E are the attributes) and f : B → I for stages I, B. The combined transformation is generated both by f and g: Dynamics of objects The state in an object-oriented approach is viewed as the value of the functions in the functional scheme at a given point among the ‘observation points’. This agrees with the computational framework. h ∈ HC (I) {h(i)} ⊆ C Important: Computationally a set of individuals is generated by: HC ({i}) ⊆ C for i ∈ I. f g 2.6 Computationally, an object has: (1) attributes C, E, . . .; (2) transformations g : C → E, . . .; and (3) composable transformations (possibly, they are closed under composition). In particular, objects with exclusively interface attributes are viewed as the static objects. This can be modelled by g = 1C : C → C, f = 1I : I → I etc. Composition: As usually, the composite object is assumed to be combined from the other objects. To cover the possible effects the natural transformations Hg : HC → HE are added. The element-wise consideration gives: 7→ 7→ Object characteristics Encapsulation: An object contains: (1) state, (2) capability of transitions (state changes; actions; services), and (3) interface. Generalization: The notion of a variable domain gives the natural observation of the dynamics in an object-oriented approach. Even more, it gives a suitable metatheoretic framework. : h ∈ HC (I) : {h(i)} ⊆ C = 1I : I → I, = 1C : C → C. The commonly used in object studies are encapsulation, composition, classification, and communication/transaction. = {h(i)} ⊆ C = {h(i)} ⊆ E ... Transformations g : s1 7→ s2 are the counterparts of the events (they are triples): < s1 , s2 ; g > . Hg (I) Hg ({i}) g ◦ h ◦ f ∈ HE (B), ((g ◦ h) ◦ f )(b) ⊆ E. for b ∈ B. In particular, a stable state is generated by: This set is a state of a variable domain HC (I), where C gives the local universe of possible individuals. The pointer i marks the family of individuals that is ‘observed’ from i. The states s1 , s2 , . . . of a functional scheme have a representation by the stages of the variable domain: HC ({i}) HE ({i}) ... 7→ 7→ This means the following: (1) logics (of the properties) is attached, (2) composition (possibly, in a category) is added etc. All of this is in a full harmony with the theory of computations. g ◦ h ∈ HE (I), (g ◦ h)(i) ⊆ E. Important: The set of transformations gives the laws of things in object-oriented reasoning. Classification: Traditionally, the objects with the same set of properties (attributes, actions) are gathered into a class. The immediate result gives a clear understanding of interaction of things (via state variable common to interacting things). Thus, the set of natural transformations is a representation of the laws of . . . . And here is a short diagram of what of: The computational generalization attracts the concept of a variable domain HC (I) = {h | h : I → C} that is defined over the schematic objects. Communication/interaction: Ordinarily communication mainly implies the changes of the object attributes (change is the same as a request). A request may cause a state transition (change of the non-interface attributes; change the state of the receiver/sender via interface attributes). {h(i)} ⊆ C x1 ∈ {h(i)}; x2 ∈ {h(i)} . . . Φ(x1 )&Ψ(x2 )&x1 = x2 (= z) . . . , where z is a common variable (joint state variable). 238 3 3.1.3 Construction of object Functorial properties op Let functor HT in S C be treated as a variable domain: (1) for every I ∈ C an associated domain HT (I) is the set; (2) the maps f : B → I in C give transitions from stage I to stage B. Every transition clones elements in HT (I) into elements in HT (B) along the map f . The verification of functorial properties of HT is straightforward. The properties of the restriction come down to the following: A point of importance to determine an object is the notion of type. The known results either illustrate the analogy between typed and type-free models, or establish their real connection. In particular, untyped models contain object-as-types via embedding. The computation, e.g., in type-free λ-calculus has a goal to derive an object with the pre-defined properties (dynamic typing). To the contrary, the same computation in a typed λ-calculus has to obtain the derived type by the rules (static typing). To conform types with dynamics they are to be fitted the dynamical considerations. The initial set of ‘hard’ types is usually predefined. To the contrary the ‘soft’ types are derived from the generic to give rise to a more flexible ground. Untyped models naturally combine type and its implementation (embedded objects). Sometimes the researcher may prefer to separate them. As a working hypothesis the thesis ‘to represent means to classify properly ’ meets the opposition from the alternative approach. This second way tends to the ‘slight’ variations of the initially formed objects. 3.1 h⌉1I (h⌉f )⌉g 4 Fragment of a theory of types Many possible theories of types are known, and the need is of getting down to some details of object-as-functor for types. The domains A of C are associated to the type symbols, and they are basic types. The derived types are generated by constructions: 1 (empty product), T × S (cartesian product), T → S (functional space), [T ] (power type). In the functor category an arbitrary type T is indicated as HT , and an evaluation mapping k · k needs an additional parameter, so that k·k·. And this is an important stage to treat the functor category as an interpretation for a higher order theory. Embedding objects into functor category 4.1 Dynamics: further understanding via logic The construction of a logical framework reflects the adopted object solutions. Object-as-functor 4.1.1 Let a mapping F : C → S be the association to arbitrary domain I of C a set F (I) of S and to every map f : B → I of C a function F (f ) : F (I) → F (B) so that: Logical language A language contains a supply of variables for every type. Atomic formulae are the equations: x = y, where x, y are of the same type; F (1I ) = 1F (I) , andF (f ◦ g) = F (g) ◦ F (f ), y = gx, where g is a constant g : T → S of C, x and y have the types T and S respectively; provided f : B → I and g : C → B in C. So defined functor F determines the family of objects parameterized by I. 3.1.2 (HT (1I ))(h) h ◦ 1I h, h⌉(f ◦ g), where h⌉f = (HT (f ))(h) = h ◦ f is an abbreviation. Give a construction to accumulate the intuitive reasons above. Let to consider more than one category. At first, given category C is a set and is assumed as c.c.c. Let S be the category of all sets and arbitrary functions, a c.c.c. Construction of the functor category (it op is a c.c.c.) S C give all the (contravariant) functors from C into S. The known result is that the functor category is a model for higher order logic. 3.1.1 = = = = z = [x, y], where x, y of types T, S respectively, z of type T × S; z = x(y), where x has type T → S, y type T , z type S; Object-as-domain y ∈ x, where y is of type T , x of type [T ]. To construe an object that models the meaning of the variable domain an example of functor category is used. For every T of C let Formulae Φ are generated as usually by the connectives and quantifiers. 4.1.2 HT (I) = {h|h : I → T } Interpretation Assume the following: A is a domain of C, Φ is a formula, k · k is an evaluation of the non-bound variables of Φ. An evaluation of the variable makes k·k relative to the domains of C (e.g., to A) and needs the explanation. Visible objects are percepted by the observer via his machinery in spite of the doctrine of the predefined objects. The events evolve from A to B. The inhabitants of the world A evolve, so they inhabit the world B. The world B contains the clones of A-inhabitants, and also some other inhabitants, if any. and if f : B → I in C, let HT (f ) be the map taking h ∈ HT (I) into h ◦ f ∈ HT (B). It is easy to verify HT is a contravariant functor. Transactions. Let g : T → S in C. There is a natural transformation Hg : HT → HS . Every h ∈ HT (I) can be mapped to g ◦ h ∈ HS (I). So defined mapping g determines a rectified idea of transaction. Clones. The composite map for f : B → I takes h ∈ HT (I) into g ◦ h ◦ f ∈ HS (B). Thus, the individuals from HT (I) are f -cloned into HS (B). op It is easy to verify H : C → S C is a covariant functor, and C may be assumed to be c.c.c. A f ←−−−− H(f ) B ⊆ kx̄kA ∈HT (A) −−−−→ (HT )f −−−−→ HT (B)∋ kȳkB 239 f A kx̄kA = kȳkB = kx̄kf B HC (f ) HC (A) −−−−→ HC (B) non-cloned, g-transacted: Hg : HC (A) ∋ h 7→ g ◦ h ∈ HD (A) A C A C   gy D C   gy D The ‘transaction-clone’ notion having been applied to the functor op category H : C → S C has a benefit of explicate arrow-thinking. In the following family of diagrams the mapping f : B → A clones the individual from A into B. Besides that, the mapping g : C → D represents the transition (an explanatory system is of free choice): HC (f ) HD (f ) B C HC (f )   Hg (A)y ⊆ HD (f )  H (B) y g HD (A) −−−−→ HD (B) : HC (A) ∋ h 7→ h ◦ f ∈ HC (B) : HD (A) ∋ h 7→ h ◦ f ∈ HD (B) HC (A) ⊆ HT (A) −−−−→ (HT )f −−−−→ HT (B) HT (f ) B HC (A) −−−−→ HC (B) A HT (f ) f ←−−−− f -cloned, non-transacted: general diagram:   Hg (A)y HD (1A )  H (A) y g HD (A) −−−−−→ HD (A) A Case study for variable domains T HC (1A )   Hg (A)y HD (f ) ◦ Hg : HC (A) ∋ h 7→ g ◦ h ◦ f ∈ HD (B) (here: C1A = C(A); Cf ⊆ C(B); C = HT )   gy A f -cloned, g-transacted: C(A) −−−−→ Cf −−−−→ C(B) f 1 A ←−− −− HC (A) −−−−−→ HC (A) ⊆ ←−−−− HD (A) HD (1A ) ◦ Hg : HC (A) ∋ h 7→ g ◦ h ◦ 1A ∈ HD (A) f A   y 1A -cloned, g-transacted: ←−−−− B C(f ) T Hg (A) D The notion of a ‘concept’ depends on a set of conditions and was studied under the various assumptions. The following matches an intuition for a ‘variable domain’. A notational remark. In the below k · k(t/y) means the fixed evaluation where t matches y of the same type. The evaluation k · k(t/y) ⌉f = k · kf matches kykf with every relevant variable y. Any case the restriction ⌉ is superimposed to the functor HT with T is the type of y. Let concepts C(A), C(B), and Cf be the different restrictions of the HT : C(A) = {t ∈ HT (A) | kΦ(y)k1A (t/y) A} (Conc(A)) C(B) = {t ∈ HT (B) | kΦ(y)k1B (t/y) B} (Conc(B)) Cf = {t ∈ HT (B) | kΦ(y)kf (t/y) B} (Concf ) Their relationships correspond to the diagram: 4.2 HC (A)   gy Construction of concept A B (1) The evaluation of the atomic formulae is getting down to the case study (are given for atomic case). Variables. kx = ykA ⇐⇒ kxkA = kykA (Var) Constant function. ky = gxkA ⇐⇒ kykA = g ◦ kxkA (CFun) Ordered pair. kz = [x, y]kA ⇐⇒ kzkA = [kxkA, kykA] (DPair) Application (variable function). (ε) kz = x(y)kA ⇐⇒ kzkA = kxk1A A(kykA) Powerset. (PSet(A)) ky ∈ xkA ⇐⇒ kykA ∈ kxk1A A (PSet(B)) ky ∈ xkB ⇐⇒ kykB ∈ kxk1B B ky ∈ xkf ⇐⇒ kykB ∈ kxkf B ( PSetf ) 4.1.3 ←−−−− D  H (B) y g f ←−−−− B HC (f ) −−−−→ HC (B) HD (f ) HD (AD (A) −−−−→ HD (B) The functorial properties of HT come down to the case study given above. HT (A) −−−−→ (HT )f −−−−→ HT (B) singular: 4.3 HC (A) = {h | h : A → [C]} HC (A) Evaluation mapping The functor category in use may enrich the intuition concerning an evaluation mapping. In particular, the diagram given below reflects f -cloned: f -cloned evaluation mapping: HC (f ) : HC (A) ∋ h 7→ h ◦ f ∈ HC (B) 240 Applicator A f ←−−−− εBC : (B → C) × B → C B kΦkf which applies function f to its argument x: εBC : [f, x] 7→ f (x). Currying ⊆ kΦkA −−−−→ kΦkf −−−−→ kΦkB ΛABC : (A × B → C) → (A → (B → C)) {y} HT (f ) −−−−→ {y ◦ f }   ∈y t   ∈y HT (f ) which shifts variables. More exactly, if h : A × B → C, then ΛABC h : A → (B → C). For k : A → (B → C) and h : A × B → C mapping Λ gives a correspondence. Equationally, it means   ∈y ⊆ HT (A) −−−−→ (HT )f −−−−→ HT (B) ε◦ < (Λh) ◦ F st, Snd > = Λ(ε◦ < k ◦ F st, Snd >) = Similarly, g-transacted, f -cloned evaluation mappings shown in Fig. 1. (N.B. Possibly, Ψ may be equal to Φ; y = u, and t = v.) The interpretation of previous diagram depends on the evailable engineering machinery. An advance in the representation may be achieved with the concepts C1 , C2 corresponding to Φ, Ψ respectively. The previous diagram is comprehenced to: A {y} C   gy D   ∈y f ←−−−− C1 (f ) C1 (A) −−−−→   Hg (A)y C2 (f ) C2 (A) −−−−→ x  ∈ {u} C2 (f ) F st : A × B → A, Snd : A × B → B. Note, that the equation (ε) may be rewritten: kzk = ε◦ < kxk1A , kyk > Next step will be done to determine the meaning of an expression. −−−−→ {y ◦ f } C1 (f ) for the first projection F st and second projection Snd: B   ∈y C1f C2f 5.1 t   ∈y ⊆ −−−−→ C1 (B)  H (B) y g ⊆ −−−−→ C2 (B) x  ∈ x   ∈ −−−−→ {u ◦ f } f ←−−−− C1 (f ) C1 (A) −−−−→ C   gy D   ⊆y v 5.1.1 HC (f ) B Env = (E × Dy ) × Dx C1f   ⊆y HD (f ) 5.1.2 C1 (B)   ⊆y ⊆ kyk : Env → Dy ,  H (B) y g ⊆ x   ⊆ C2 (f ) C2 (A) −−−−→ x   C2f ⊆ Case study Atomic parts. An object λx.yx contains atoms y, x, and nonatomic part yx: kxk : Env → Dx . Non-atomic parts. A non-atomic part yx is evaluated as follows: HD (A) −−−−→ (HD )f −−−−→ HD (B) ⊆ Building an access The values of the variables are available via access functions from an environment. The representation of an environment is given by the domains Dy , Dx , . . . which are the ranges of possible values of y, x, . . .. The domains Dy , Dx give the explicit part of an environment Env, and its implicit rest (not be detailed for the current consideration) is denoted by E: HC (A) −−−−→ (HC )f −−−−→ HC (B)   Hg (A)y Meaning of expression The goal is to determine the meaning of an expression F (x), or F x where F is the description of a function and x is a formal parameter. Thus, x is bound, or substitutional variable. A treatment may be simplified with the λ-notations. The expression above is to be denoted as λx.yx where the description of a function F is associated to a variable y. The meaning of a function depends on the meanings of its subparts y, x, yx. Those components, in turn, depend on the value of y. The only ‘transaction-clone’ dependencies are visible, so an explicit object is extracted. Note in addition, that the concept-image of g-transacted, f cloned evaluation mapping: A h, and k the pair < kyk, kxk > is composed, and x   < kyk, kxk >: Env → Dy × Dx ; C2 (B) the metaoperator ε is applied to the pair: ε◦ < kyk, kxk > . is in a harmony with the “logical” diagram in Fig. 1. D 5 To exemplify let Dy = (Dx → Dy′ ); thus, ε : (Dy′ ) x × Dx → Dy′ is determined by ε[u, v] = u(v) = uv, and Dy′ is the range for kyxk, i.e. Extracting a computational background In applications a theory of functions is based on some additional objects. kyxk = ε◦ < kyk, kxk >: Env → Dy′ 241 A f ←−−−− kΦkf kΦkA −−−−→ {y} C   gy D   ∈y HC (f ) −−−−→ HC (f ) HC (A) −−−−→   Hg (A)y HD (f ) HD (A) −−−−→ x  ∈ B ⊆ kΦkf −−−−→ kΦkB {y ◦ f } t   ∈y   ∈y −−−−→ HC (B) (HD )f −−−−→ HD (B) ⊆ (HC )f  H (B) y g ⊆ x  ∈ HD (f ) ∈ {g ◦ y} −−−−→ {(g ◦ y) ◦ f } k k {u} {u ◦ f } kΨkf kΨkA −−−−→ x   v k v ⊆ kΨkf −−−−→ kΨkB Figure 1: g-transacted, f -cloned evaluation mapping g 5.1.3 ✲ ✯ ✟ ✟✟ ✟ ✟ ε ✟✟ ✟ ❄ ✟✟ ✟ D Env × Dx Substitution The expression λx.yx contains y (free variable) and does not contain x (bound, or substitutional variable; x may be renamed, if needed). To take into account this reason the modified environment Env × Dx is temporary generated to support the substitution Substx : Substx : Env × Dx → Env, ĝ × idDx (Dy′ ) where for i ∈ Env, h′ ∈ Dx the result is x Dy′ × Dx Figure 2: Commutative diagram for kyxk ◦ Substx = g Substx [i, h′ ] = i(h′ /x) . 5.2 It means that substitution Substx for every ordered pair [i, h′ ] gives a correspondent environment i(h′ /x) which differs from i exclusively in a point x (x is substituted by h′ ). An access function for Substx is generated by the equation: Let kyxk ◦ Substx = g, and g([i, h′ ]) ∈ Dy′ for g : Env × Dx → Dy′ . For i ∈ Env and every h′ ∈ Dx the function g is determined by gi (h′ ) = g([i, h′ ]). Now the function ĝ is defined by the equation ĝ(i) = gi for h′ ∈ Dx . For arbitrary pair [i, h′ ] ∈ Env × Dx the equation Substx =< F st ◦ F st, Snd > 5.1.4 Correspondence of the meanings Composition An observation is as follows: the function kyxk and Substx are composed: ε[ĝ(i), h′ ] = gi (h′ ) = g([i, h′ ]) is valid. Note, that an operation ˆ· generates the additional metaoperator Λ of currying: (Λ(g)(i))(h′ ) = g([i, h′ ]) Hence, a curried version of g = kyxk ◦ Substx is exactly kλx.yxk, and finally the needed equation is obtained: kyxk ◦ Substx : Env × Dx → Dy′ The meaning of λx.yx depends on Env for y (y has a free occurrence in λx.yx, and x is bound). Thus, kλx.yxk is a function that associate to y the function associating yx to x. A type consideration gives: D kλx.yxk : Env → (Dy′ ) x kλx.yxk = Λ(kyxk ◦ Substx ) Let to summarize the above reasons in Fig. 2. In this figure the following notations are used: To the contrast kyxk is a function from (E × Dy ) and Dx : kyxk : (E × Dy ) × Dx → Dy′ g : Env × Dx → Dy′ , i ∈ Env, h′ ∈ Dx gi : Dx → Dy′ , gi (h′ ) = g([i, h′ ]), ĝ(i) = gi [i, h′ ] ∈ Env × Dx ε([ĝ(i), h′ ]) = gi (h′ ) = g([i, h′ ]) Some difficulties exist to establish the correspondence between meanings kλx.yxk, kyxk, Substx . 242 kλx.yxk = Λ((ε◦ < Snd ◦ F st, Snd >)◦ < F st ◦ F st, Snd >) ΛkΦk · ×idT It is easy to verify an optimized version of the access function: kλx.yxk = Λ(ε◦ < Snd ◦ F st ◦ F st, Snd >) kΦk[·, ·] ✲ [] ✯ ✟ ✟ ✟✟ ✟✟ ε ✟ ✟ ✟✟ ❄✟✟ I×T At last, an access function for kλx.yxk is generated in accordance with the equation: [T ] × T from the properties of pairs < ·, · > and composition. 5.3 Figure 3: Evaluation in c.c.c. Examples Some examples of computation are briefly given below. Constant c. 1 2 3 4 kcki = = k0!k[i, c′ ] = Snd[i, c′ ] = c′ (= c) = ε[kf k[i, h′ ], h′ ] i ∈ Env, c′ ∈ {c} for singleton {c} k0!k – a.f. to {c} in Env = ε[(S ◦ F )(i), h′ ] = f ′ h′ 3 = Λ(kf xk ◦ Substx )ih′ Replace by a.f. 4 = Λ((ε◦ < S ◦ F, S >)◦ < F ◦ F, S >)ih′ (for Substx =< F ◦ F, S >, Substx : Env × Dx → Env) 5 = (ε◦ < S ◦ F, S > ◦ < F ◦ F, S >)[i, h′ ] (for [i, h′ ] ∈ Env × Dx ) 6 = (ε◦ < S ◦ F, S >)(< F ◦ F, S > [i, h′ ]) (Substitution) 7 = (ε◦ < S ◦ F, S >)[F (i), h′ ] (for F (i) ∈ E × Df , h′ ∈ Dx ) 8 = ε[< S ◦ F, S > [F (i), h′a.f. ]] 9 = ε[(S ◦ F )(i), h′ ] ε; ((S ◦ F )(i) extracts value of Df ) 10 = ε[f ′ , h′ ] 11 = f ′ h′ Variable x. The evaluation of a variable gives one of the possible atomic cases. The abbreviations F for F st and S for Snd are used. 1 kxki = Generation of a.f. : = k0!ki(h′ /x) 2 = k0!k[i, h′ ] = S[i, h′ ] = h′ = (kxk ◦ Substx )[i, h′ ] 3 4 5 6 = (S◦ < F ◦ F, S >)[i, h′ ] = S(< F ◦ F, S > [i, h′ ]) = S[F (i), h′ ] = h′ i ∈ Env h′ ∈ Dx ; k0!k – a.f. to Dx in Env Env = E × Dx Substx : Env × Dx → Env Substx =< F ◦ F, S > Replace by a.f. Substitution a.f. h′ ∈ Dx 5.4 3 4 5 6 7 8 kΦk[i, hi] ΛkΦki(hi) k(λx.x)hki= i ∈ Env = kλx.xkih′ h′ ∈ Dx Generation of direct access: = Λk0!kih′ k0!k – a.f. to Dx in Env, x – bound variable, Env = E × Dx = S[i, h′ ] [i, h′ ] ∈ Env × Dx ′ =h = Λ(kxk ◦ Substx )ih′ Using a.f. = Λ(S◦ < F ◦ F, S >)ih′ Substx : Env × Dx → Env Substx =< F ◦ F, S > = (S◦ < F ◦ F, S >)[i, h′ ] [i, h′ ] ∈ Env × Dx = S(< F ◦ F, S > [i, h′ ]) Substitution = S[F (i), h′ ] a.f. h′ kΦk = ΛkΦk(F st[i, hi])(Snd[i, hi]) = ΛkΦk(F st[i, hi])(Snd[i, hi]) = ε[ΛkΦk(F st[i, hi]), (Snd[i, hi])] = (ε◦ < ΛkΦk ◦ F st, id ◦ Snd >)[i, hi] = kΦk[i, hi] = ε◦ < ΛkΦk ◦ F st, id ◦ Snd > An abbreviation kΦk = kΦ(x)k ◦ Substx is used if there is no ambiguity. Hereafter T is a type of substitutional variable x, and environment Env is renamed by I. Evaluation in c.c.c. The diagram in Fig. 3 illustrates an idea. • ΛkΦk : I → [T ]; • kΦk : I × T → [ ]; Compound evaluation. 1 2 Advanced examples The additional examples of generalized nature involve more complicated objects. Evaluation of formula. This kind of object has the following equations: Identity transformation. The evaluation of an identity transformation gives a clear separation of access functions (a.f.) and substitution. 1 2 kf k – a.f. to Df in Env × Dx , i.e. kf k = S ◦ F ◦ F (S ◦ F )(i) ∈ Df • For i ∈ I and hi ∈ T an evaluation ε[ΛkΦki, idT (hi)] generates the truth values from [ ]. k(λx.f x)hki = i ∈ Env = k(λx.f x)kih′ h′ ∈ Dx Generation of access: = Λkf 0!kih′ k0!k – a.f. to Dx in Env Env = (E × Df ) × Dx = kf 0!k[i, h′ ] [i, h′ ] ∈ Env × Dx ′ = (ε◦ < kf k, S >)[i, h ] S(i) ∈ Dx Individuals in c.c.c. A correspondence of the distinct forms of individuals shows their similarities. R ❀ hR . Given the relation R ⊆ I × T a function hR : I → [T ] is determined by the equality hR (i) = {h′ | h′ ∈ T ∧ iRh′ }. In fact, this defines the correspondence R ❀ hR . 243 ✄ ✂ R ✲ I×T Λ(Snd) · ×idT g hR × idT ❄✄ ✂ ❄ ✲ ∈T Snd ✲ ✯ ✟✟ ✟ ✟ ε ✟✟ ✟ ✟ ❄ ✟✟ ✟ I×T T TT × T [T ] × T Figure 7: Free variable Figure 4: Variants of individuals R ✄ ✂ ✲ I×T ΛkΦk · ×idT C · ×idT ❄✄ ✂ ✲ ∈T kΦk[·, ·] ε ✚ ✚ ❄✚ ✲ ❃ ✚ ✚ ✚ ✚ ✚ [ ] right-part computations are to be started at the same ‘moment’. An additional mappings canT of canonical embedding of the constants are also used. The more exact correspondences are as follow: R ΛkΦki ΛkΦk C({i}) C(I) [T ] × T Figure 5: Computational properties Λ(f ◦ Snd) · ×idT Snd ✲ T S 6 Important: The notion of a variable domain gives a sound ground of the communication analysis (see, e.g.: [WW94], [Jac92]). As may be shown they generate the specific diagrams to consider the variety of transition effects. Figure 6: Built-in function f Open discussion: The questions arise: 1. Is the language of categories adequate to database dynamics even though the object-oriented approach successively applied? h ❀ Rh . Given the sets I, T the bijection between functions from I into [T ] and the relations from I to T is defined as follows. The function h : I → [T ] determines the relation Rh ⊆ I × T by the biconditional iRh h′′ ⇐⇒ h′′ ∈ h(i) for i ∈ I and h′′ ∈ T . ∈T . The domain ∈T = {< U, h′ >| U ⊆ T, h′ ∈ T ∧ h′ ∈ U } is the relation containing all the necessary information concerning element-subset inclusions. The following biconditionals are valid: ′ Conclusions A common object technique shared by distinct ‘dimensions’ – logical, categorical, and computational is outlined. ST × T ′ {[i, h′ ] | kΦk[i, h′ ] = 1} [T ] I → [T ] {h(i) | ΛkΦki(hi) = 1} {h | kΦ(x)k[h/x] : I → [T ]} (here: x, h : I → [T ], so h(i) ⊆ T ; x is a free variable.) f ✲ ✯ ✟✟ ✟ ✟ ε ✟✟ ✟✟ ❄ ✟✟ ✟ I×T = ∈ : = = References [Bro94] M. L. Brodie. Interoperable information systems: Motivations, challenges, approaches, and status. In Second International Conference on Cooperative Information Systems, CoopIS-94, Tutorial Notes. May 17–20, 1994, Toronto, Ontario, Canada, May 1994. [Bro95] M.L. Brodie. Interoperable Information Systems: Motivations, Challenges, Approaches, and Status. Russian Basic Research Foundation, Moscow, Russia, April, 67, 1995. ′ [i, h ] ∈ R ⇐⇒ h ∈ hR (i) ⇐⇒ [hR (i), h ] ∈ ∈T Hence, R is a domain and ∈T is a range for mapping hR × 1T where hR × 1T : [i, h′ ] 7→ [hR (i), h′ ]. The diagram in Fig. 4 reflects the ideas given above. Here: g is an R-restricted version of hR × idT . Note that all of this is quite elementary. Computational properties of the individuals. The combined diagram in Fig. 5 establishes not so evident correspondences. What is important that the functor C · ×idT includes as a left counterpart the mapping C· : I → [T ]. This mapping is relative to relation R and this relation is induced by the evaluation of the restriction Φ. In particular, a built-in function for the given (and evaluated) argument in a category results in the diagram in Fig. 6. A free variable is evaluated according to the diagram in Fig. 7. A simplified example of computation (note that both the operands are to be embedded into the computational environment) like +[[2/x1 ]x1 , [3/x2 ]x2 ] is in Fig. 8. The entry points for the computations of the distinct operands are, in general, independent. Thus, both the left-part and 244 [CCM85] G. Cousineau, P.-L. Curien, and M. Mauny. The categorical abstract machine. In Functional programming languages computer architecture, volume 201 of Lecture Notes in Computer Science, pages 50–64. Heidelberg, Springer-Verlag, 1985. This is a detaled paper on programming in a category-style. [EGS91] H.-D. Ehrich, M. Gogola, and A. Sernadas. A categorial theory of objects as observed processes. In J.W. deBakker et. al., editor, Proceedings of the REX/FOOL School/Workshop, volume 489 of Lecture Notes in Computer Science, pages 203–228. Berlin, Heidelberg, New York, Springer Verlag, 1991. entry point 1 [i, 3] I×T I×T entry point 2 ❍ ❍❍Snd ❍❍ ❥ ❍ ✟ Snd ✟ ✟ ✟ ✙✟ ✟ 2 ✟✟ ✟ ✟ ✟ ✙ ✟ ✛ [i, 2] T canT 2 T 3 T Λ(canT ◦ Snd) · ×idT ε Λ(canT ◦ Snd) · ×idT ❄ ❄ TT × T TT × T ❍❍ canT ❍❍ ❍❍ ❥ ε ✲ 3 T ✿ ❳ ② ✘✘ ❳❳ ✘✘ ❳❳❳ ✘ ✘ ❳❳ F st Snd ✘✘✘ ❳❳❳ ✘✘ ✘ ❳❳❳ ✘ [2, 3] 5 ✘ ❳❳ ✘✘ + Snd ✲ T ×T ✲ T I × (T × T ) ✶ ✏✏ ✏✏ ✏ ✏ ✏✏ ✏ ✏ ε ✏ Λ(+ ◦ Snd) · ×idT ×T ✏✏ ✏ ✏✏ ❄ ✏✏✏ ✏ T T ×T × (T × T ) Figure 8: An example of computation +[2, 3] [EGS93] H.-D. Ehrich, M. Gogola, and A. Sernadas. Objects and their specification. In M. Bidoit and C. Choppy, editors, Recent Trends in Data Type Specification. 8th Workshop on Specification of Abstract Data Types joint with the 3rd COMPASS Workshop, Dourdan, France, August 26–30, 1991, Selected Papers, volume 655 of Lecture Notes in Computer Science, pages 40–65. Berlin, Heidelberg, New York, Springer Verlag, 1993. [Gab93] and Information Systems, ADBIS’95, page this volume. Russian Academy of Sciences, Institute for Problems of Informatics, 1995. P. Gabriel. The object-based specification language Π: Concepts, syntax, and semantics. In M. Bidoit and C. Choppy, editors, Recent Trends in Data Type Specification. 8th Workshop on Specification of Abstract Data Types joint with the 3rd COMPASS Workshop, Dourdan, France, August 26–30, 1991, Selected Papers, volume 655 of Lecture Notes in Computer Science, pages 254–270. Berlin, Heidelberg, New York, Springer Verlag, 1993. [Gog89] J. Goguen. A categorical manifesto. Technical report PRG-72, Programming Research Group, Oxrofd University, March 1989. [HC89] F. Heyes and D. Coleman. Objects and inheritance: an algebraic view. Technical Memo, HP labs, Information Management Lab, Bristol, 1989. [Jac92] I. Jacobson. Object-Oriented Software Engineering: A Use-Case Driven Approach. Addison-Wesley, Reading, Massachusetts, 1992. D.S. Scott. Relating theories of the λ-calculus. In J. Hinhley and J. Seldin, editors, To H.B. Curry: Essays on combinatory logic, lambda calculus and formalism, pages 403–450. New York and London, Academic Press, 1980. [Wol93] V.E. Wolfengagen. Computational aspects of data objects. In Proceedings of the workshop on Advances in DataBase and Information Systems, ADBIS’93, May 1114, Moscow, 1993, Moscow, May 1993. [WW94] Y. Wand and C. C. Woo. Object oriented analysis of organizational activities: A CoopIS tutorial. In Second International Conference on Cooperative Information Systems, CoopIS-94, Tutorial Notes. May 17–20, 1994, Toronto, Ontario, Canada, May 1994. [Law75] F.W. Lawvere. Continuously variable sets: algebraic geometry = geometric logic. In H.E. Rose and J.C. Shepherdson, editors, Logic Colloquium ’73, pages 135–156. North Holland, Amsterdam, 1975. [NR95] [Sco80] D.A. Nelson and B.N. Rossiter. Prototyping a categorical database in P/FDM. In L.A. Kalinichenko, editor, Proceedings of the workshop on Advances in DataBases 245
6cs.PL
Automatic Test Data Generation and Model Checking with CHR Ralf Gerlich BSSE, Auf dem Ruhbuehl 181, D-88090 Immenstaad, Germany, [email protected] arXiv:1406.2122v1 [cs.SE] 9 Jun 2014 Abstract. We present an example for application of Constraint Handling Rules to automated test data generation and model checking in verification of mission critical software for satellite control. 1 Overview Verification and validation of software takes up a large proportion of project effort and cost, especially in the area of mission and safety critical software. This is one of the driving forces for automation of these aspects of software engineering, besides the reduction of the potential for errors due to manual labor. Automation of software testing requires among others the automatic generation of test data. Some options for this are random test data generation [3,8,9,15] or constraint-based test-data generation (CBDTG) [4,6,10,12,14,16,19]. We have designed and implemented a toolchain for CBTDG using Constraint Handling Rules (CHR), which we have already presented in the past [10].(in [13] and [4] the two examples of the paper are noted using typica In a recent case-study on the effectiveness of source-code-based random testing [11], we have also seen that the basic elements of this toolchain can be used for support in manual verification of defects in mission critical satellite control software and that a use for model checking seems plausible. 2 Introduction Constraint-based test data generation is concerned with the generation of program inputs for use in software test using constraint programming techniques. The goal is to find program inputs which fulfill specific criteria, typically from structural coverage goals such as executing a specific portion of the program under test. In a first step, in our approach – similar to that of others – the control flow graph of the function under test is used to construct a path that fulfills the request. For each path an associated path constraint can be constructed, which is actually a set of constraints. An example control-flow graph for an implementation of Euclid’s algorithm for determination of the greatest common divisor of two positive integers is given in Fig. 1. Execution starts at node 1 and continues along the edges until node 6 is reached. Nodes and edges are annotated by statements and conditions, respectively. An edge may be traversed only if the condition attached to it is fulfilled. The path constraint is a constraint over the input variables of the function, and its solutions are the inputs that fulfill the given criteria. Thus, in a second step, a solution to the path constraint is sought. There are paths in the control flow graph which are associated with a path constraint without solution. These paths are called infeasible and – unfortunately – may represent a large portion of all paths, so that a simple trial-and-error-approach to path construction is insufficient. Proceedings of 11th Workshop on Constraint Handling Rules (CHR 2014), paper CHR/2014/1. 1 a=b 6 2 a<b a>b 3 4 a:=a-b b:=b-a 5 Fig. 1. Control Flow Graph Instead, infeasible paths should be detected early in the path construction phase. This requires both a useful strategy of path construction and a constraint solver which is efficient at detecting inconsistencies. The criteria applied to the desired input can also be described in the form of constraints, allowing integration of the structural goals for the test input with, e.g., arithmetic constraints on the state of program variables at specific stations during execution. This combination also makes the use of the same approach for static verification using symbolic enumeration of the state space possible, as will become apparent from our example. This paper is structured as follows: In Section 3 we detail the constraint solver used and the diverse requirements it must fulfill. This is followed by a short discussion on the reasons for applying CHR for implementation in Section 4 and the presentation of open problems in Section 5. Finally, we present an example of use in Section 6 and briefly conclude in Section 7. 3 Constraint Solver Approach There are three constraint-based functional aspects of our approach, all of which we implemented using CHR [1,7], based on the CHR-compiler included in SWI-Prolog: – path construction, – satisfiability checking, and – constraint solving. Due to the issue of infeasible paths, at least path construction and satisfiability checking need to be combined in order to facilitate detection of infeasible paths early during path construction. However, the coupling can be loose in that the path construction phase may be implemented as a separate CHR solver in which the constraints handled by the satisfiability checker are modelled as builtin constraints. The constraints to be handled represent all relevant expressions and conditions from the underlying language, also covering the different arithmetic types, typically consisting of bounded integer and floating point types. Information has to be propagated bidirectionally across the borders of these arithmetic theories, for example, when integer values are converted to floating point values or vice versa. Control-flow is completely represented in the structure of the control-flow graph. As such, control-flow is current only considered in the path construction module, but not in any of the other constraint solving modules. The same is true for boolean operations such as conjunction, disjunction and negation. Most if not all practically relevant programming languages define the evaluation of boolean constructs such that whenever the value of the first operand 2 of a boolean operator completely determines the result, the second operand is not evaluated. For example, in the expression A && B, the second operand B is not evaluated if the first, A evaluates to false, as in this case the result of the whole expression is already determined to be false. In code generation, this is achieved by so-called short-circuit code, which is also applied in our test-data generator. Because interaction between arithmetic domains may be necessary in presence of type conversions, all arithmetic constraints are handled by a combined constraint handler. Currently, floating-point constraints are handled by interval filtering [2,17]. 3.1 Path Construction Our approach to path construction has been previously described in detail [10] and shall be only briefly revisited here. The path construction approach is centered around a constraint of the form path(In,A,B,Out), meaning: There is a path from node A to B transforming memory state In to memory state Out. The constraint is limited in that A and B must be ground. Construction may proceed in one of several ways: – forward construction: Construct the path edge-by-edge in the normal direction of execution, starting at A. – backward construction: Construct the path edge-by-edge in reverse direction, starting at B. – splitting: Given a node C that is (topologically) reachable from A and from which B can be reached, split up the path from A to B into two paths, one from A to C and one from C to B. All of the three strategies can be described in terms of CHR simplification rules. However, non-determinism is present in that there may be more than one candidate for the successor, predecessor or intermediate node, respectively. In absence of any further information indicating paths which may be more likely to help detecting coding defects, bias must be avoided. To achieve this, alternatives are selected randomly, but not necessarily according to a uniform distribution to achieve appropriate distribution, e.g., of loop iteration counts and total length of the constructed path. Experience so far indicates that backward construction is most effective in terms of expected time to a feasible path. 3.2 Linear Integer Constraints Linear integer arithmetic is expressed in equations and inequations Pn of the form e = 0 and e ≥ 0, where e is a Presburger expression of the form c0 + i=1 ci vi with integer constants ci and logical variables vi . For example, the assignment a = 2b + c is represented as a − 2b − c = 0 or −a + 2b + c = 0. Similarly, 2a + b > 3c is represented as −1 + 2a + b − 3c ≥ 0. Over the reals, constraint systems of this form could be solved by a combination of Gaussian elimination for the equations and Fourier-Motzkin-elimination for the inequations. However, Gaussian elimination requires the existence of the multiplicative inverse and Fourier-Motzkin-elimination requires the compactness of the underlying number set, both of which are not given for the integers. 3 We therefore use an algorithm known as the Omega Test [18]. In this algorithm first the equations are simplified using suitable parameter substitutions. For example, the equation a − 2b = 0 is trivially processed by substituting a = 2b in all other constraints. Equations which cannot be transformed trivially this way are modified by introducing suitable parameter substitions. For example, the equation 3a − 2b = 0 is equivalent to a − 2α = 0 ∧ b = 3α, with α ∈ Z. This can be further simplified by substiting a = 2α, leading to the properly parameterised solution a = 2α ∧ b = 3α. Inequations are simplified using variable elimination very similar to FourierMotzkin-elimination. There, a variable w can be eliminated from a pair of inequaP P tions of the form c0 + i=1 ci vi < aw P and bw < d0 + j=1 Pdj vj – with a, b > 0 – by introducing a new inequation bc0 + i=1 bci vi < ad0 + j=1 adj vj . Processing all such pairings in this way, all occurrences of w can be eliminated, and the new set of inequations is equivalent to the original set in terms of satisfiability. Repeating this process for all variables except for one, the original problem is reduced to two inequations of the form xl < x < xu . Selecting a value for x from this range and substituting it back into all inequations eliminates the inequations over x and leaves two inequations yl < y < yu with y being the variable eliminated secondto-last. A solution for the original set of inequations can be found by repeating this process of selection and substition until all free variables are bound. Unfortunately, this only works for compact number sets, i.e. sets where for any α < γ there is a β with α < β < γ. This is not the case for the integers. As a consequence, neither the equivalence regarding satisfiability nor the process for labelling applies when using Fourier-Motzkin-elimination in its usual form. It is therefore possible that the range for the last variable x is found to be non-empty, but none of the values from this range are part of a solution. The Omega-Test [18] therefore uses a modification of Fourier-Motzkin, underapproximating the set of solutions on each elimination step. Now any solution of the new set of inequations can be extended to a solution of the original set of inequations. However, satisfiability of the original set of inequations does not generally imply satisfiability of the inequations after elimination: As the approximation step may exclude some solutions, these have to be considered separately and in addition to the usual elimination approach. Depending on the value of the coefficients a and b, this set of solutions removed by approximation may grow arbitrarily large. However, by carefully selecting the order in which the variables are eliminated, the number of solutions to be considered in addition can be reduced significantly. The algorithm processing equality constraints can be implemented as an onlinesolver, processing each constraint when it is added to the goal store. This is of advantage for path construction, where each new step in the program introduces new constraints and requires a new satisfiability check. Because the quality of elimination results for inequations depends on the order in which variables are eliminated, this process is at best difficult to implement for online processing. New constraints – both equations and inequations – may impact the order in which variables need to be eliminated to reduce the impact of the approximation. Ad-hoc reordering may thus be necessary. 3.3 Non-Linear Integer Constraints Non-linear integer constraints are handled by a combination of interval filtering and dynamic linear relaxations [5]. 4 Linear relaxations are approximations of non-linear constraints. For example, the intervals x ∈ [xl ; xu ] and y ∈ [yl ; yu ] imply that the inequation (x − xl ) (y − yl ) ≥ 0 is fulfilled. Expanding the expression on the left hand side and using the relationship z = xy, this can be transformed to z−xl y−xyl +xl yl ≥ 0, which is a linear inequation in x, y and z. In a similar manner, the constraints −z + xyl + xu y − xu yl ≥ 0, −z + xyu + xl y − xl yu ≥ 0 and z − xyu − xu y + xu yu ≥ 0 can be derived. These constraints overapproximate the set of solutions for x ∈ [xl ; xu ] ∧ y ∈ [yl ; yu ] ∧ z = xy, but they contain more information about the relationship between x, y and z than the simple interval constraint z ∈ [zl ; zu ], where zl and zu are derived from xl , xu , yl and yu . Dynamic linear relaxations are updated whenever the source information – in this case the intervals of x and y – change. 4 Application of CHR As has been discussed in previous sections, the constraint solver required for a constraint-based test data generator has to handle a variety of constraint types from different constraint theories normally considered in isolation. Also, different handling strategies are required at different stages of the test data generation process: During path construction, the focus is on satisfiability checking. As soon as a path which is expected to be feasible with sufficient probability is identified, the focus shifts to selection of an actual solution. Due to the loose coupling possible by way of a rule-based specification concept, CHR allows almost straight-forward integration of the different constraint handlers and of different approaches for solving constraints from the same theory. One example is the integration of dedicated solution strategies for linear integer constraints besides the more general domain filtering approach for non-linear integer constraints. This advantage, however, can only be realised for mostly local propagation and simplification strategies, such as the approach to solving linear equations over the integers or domain filtering. Other strategies such as the elimination procedure of the Omega-Test for linear integer inequations are highly sequential in nature. Naturally, for implementation of these strategies, imperative languages – which CHR is not – are more suited. 5 Open Problems So far the approach has not yet been used for test data generation on industrialgrade software due to several open issues, mainly lack of scalability of the constraint solvers and missing support for arithmetic constraints over floating point numbers. Industrial software may be large and contain many interactions between different functions, leading to a large number of constraints being generated for a single testdata generation run. The constraints may be highly coupled, because many of them refer to a small set of variables, namely those variables representing the input values to the function. Therefore, the issue of scalability is inherent in the problem itself. Floating point arithmetic plays an increasing role also in embedded software systems in general and in space control software in particular, as more and more embedded hardware platforms have builtin floating point units, thereby gradually replacing the old fixed-point arithmetic implementations. The theory of constraints over the floats is strictly separate from the theory of constraints over the reals. This becomes obvious when comparing the magnitude of the underlying sets of numbers: While the reals are non-countable infinite, the floats 5 are countable and even finite. This means that a constraint system over the reals may have a solution while the same system is inconsistent when expressed over the floats, and vice versa. Also, due to the significand-exponent-representation, all operations are nonlinear. In addition, only elementary arithmetic, remainder and square-root have standardised results. Others, such as the trigonometric functions, are not standardised, the Table Maker’s Dilemma being among the reasons [13]. Some exact domain-filtering approaches to the solution of floating point constraints exist [2,17], but their filtering efficiency is insufficient in many situations. It is quite conceivable that from a theoretical point of view, these problems do not have efficient solutions or any solution at all. After all, the problem of analytical test-data generation itself cannot be solved in general, as it can be reduced to the halting problem. However, in practice not the whole set of theoretically applicable operations and p their combinations is used. For example, inequations such as x2 + y 2 < 10−7 may be expected to occur much more often in a practical context than x = x + y ∧ y 6= 0 – which, due to rounding, has a floating point solution, but requires much more computation time to solve than the latter with current filtering approaches. As another example, the issue of missing scalability is inherent in the problem, but only when purely focusing on the theoretical description of the problem. It is likely that in practice the path taken is not influenced by all arithmetic operations performed. Thus, lazy evaluation – i.e. introduction of constraints only if they are part of conditions or one or more of their variables are used directly or indirectly in a condition – may allow for a considerable reduction of complexity in practice, although clearly it would not directly solve the scalability issue once and for all. Unfortunately, it is quite difficult to define the actual domain of constraint systems to be expected in practice. 6 Example of Use The approach has not yet been applied for test data generation in practice on industry-grade source-code, mostly due to the open problems stated in Section 5. However, its basic elements were used in the context of a study on the effectiveness of sourcecode-based random test data generation [11]. In the course of this study, random test inputs were injected into functions found in the sourcecode of the control software of an earth observation satellite using the tool DCRTT (Dynamic C Random Test Tool) developed and maintained in-house at BSSE. Notably, that control software had previously gone through the rigorous testing and validation stages typical for mission-critical systems, i.e. systems the failure of which could lead to a loss of the satellite of the complete loss of its functionality. The code was instrumented by the random test tool to monitor for non-specific indications of failures, such as memory access violations, time outs and similar. Such indications were seen as hints at faults, each of which had to be verified manually to determine whether there was an actual defect or whether the indication was actually a false positive. In one case, a memory access failure hinted at a critical defect in code related to the installation of in-flight software updates. A much simplified and anonymised excerpt of the code is given in Listing 1. The goal of the function is to store data of a given length in a contiguous block at the next free position in the buffer. If the data block does not fit anymore at the end of the buffer, it shall be stored at the beginning. This code seems short and simple enough to analyse. However, the defect is non-obvious and the presence of the remainder-operation in combination with a 6 #define MAX_BUFFER_SIZE ... char buffer[MAX_BUFFER_SIZE]; void store_into_buffer(char* data, unsigned int length) { const unsigned int last_entry_start = ..., last_entry_length = ...; unsigned int next_entry_start = last_entry_start+last_entry_length; unsigned int space_available; if ((MAX_BUFFER_SIZE - (length-1u)) < next_entry_start) next_entry_start = 0; space_available = (last_entry_start - next_entry_start) % MAX_BUFFER_SIZE; if (space_available >= length) memcpy(&buffer[next_entry_start],data,length); ... } Listing 1: Relevant portions of the faulty function set of choices introduces complexity. Manual analysis had led to a suspicion for overflowing the buffer in the call to memcpy, but was inconclusive both regarding the validity of the suspicion and the possible extent of the overflow. Due to the complexity, it was not clear whether the results of the analysis were to be trusted. The matter was settled by providing the path construction part of the test data generator with the goal to reach the call to memcpy, adding the constraint next_entry_start+length>MAX_BUFFER_SIZE. Within a second, a descriptive solution was provided, and that solution indicated the potential for a buffer overflow by one byte, namely when next_entry-start==MAX_BUFFER_SIZE-length+1, last_entry_start>0 and last_entry_start<length-1. In this case, there is not sufficient space at the end of the buffer, but the condition (MAX_BUFFER_SIZE-(length-1u))<next_entry_start is false. Therefore the algorithm fails to reset next_entry_start to the start of the buffer, and the call to memcpy leads to a buffer overflow by exactly one byte. Further manual analysis led to the conclusion that the one-byte buffer overflow could lead to corruption of volatile data and non-volatile program memory. Although there was fallback software present for this case – the so-called safe-mode software – the satellite could have unexpectedly become unresponsive for at least some significant time frame. We know that in the same project, static verification tools using abstract interpretation have been used to verify the code. In principle, these tools should have detected the defect by themselves. It is still not clear whether the tools failed to flag that defect or whether the message got lost in a large number of messages of possible false positives and was therefore not considered. As a consequence of our report, the defect was fixed. Also, the instrumentation of the random testing tool was extended to check for such cases, which has led to detection of further defects of the same kind. 7 Conclusion The experience so far has shown that CHR is well-suited for developing complex constraint solvers based on local solution strategies, as detailed in Section 4. The correspondence between declarative and operational semantics is helpful in verification of the constraint solver itself. However, that correspondence often has to be broken in workarounds whenever global strategies need to be implemented, as is the case for the Omega Test. 7 Further research is required for solving the open problems regarding scalability and handling of floating point constraints. 8 Acknowledgements BSSE is currently performing research on open aspects of industrial-grade CBTDG, supported by a grant by the German federal government under the grant number 50RA1339. References 1. Abdennadher, S., Schütz, H.: CHR∨ : A flexible query language. In: Proceedings of Third International Conference on Flexible Query Answering Systems. Lecture Notes in Artificial Intelligence, vol. 1495. Springer Verlag (May 1998) 2. Botella, B., Gotlieb, A., Michel, C.: Symbolic execution of floating-point computations. Softw. Test. Verif. Reliab. 16(2), 97–121 (2006) 3. Chen, T.Y., Huang, D.H., Kuo, F.C.: Adaptive random testing by balancing. In: RT ’07: Proceedings of the 2nd international workshop on Random testing. pp. 2–9. ACM (2007) 4. Denise, A., Gaudel, M.C., Gouraud, S.D.: A generic method for statistical testing. In: Proceedings of the 15th IEEE International Symposium on Software Reliability Engineering (ISSRE). pp. 25–34. IEEE (2004) 5. Denmat, T., Gotlieb, A., Ducassé, M.: Improving constraint-based testing with dynamic linear relaxations. In: Proceedings of the The 18th IEEE International Symposium on Software Reliability. pp. 181–190. ISSRE ’07, IEEE Computer Society, Washington, DC, USA (2007) 6. Ferguson, R., Korel, B.: The chaining approach for software test data generation. ACM Trans. Softw. Eng. Methodol. 5(1), 63–86 (1996) 7. Fruehwirth, T.: Constraint Handling Rules. Cambridge University Press, 1st edn. (2009) 8. Gerlich, R., Fercher, G.: A random-testing environment for Ada programs. In: Eurospace Symposium ”Ada in Aerospace” (1993) 9. Gerlich, R.: Size-optimising automatic random testcase generation for non-formal conditions. Diploma thesis, Universität Ulm (2005) 10. Gerlich, R.: Generic and extensible automatic test data generation for safety critical software in CHR. In: Van Weert, P., De Koninck, L. (eds.) CHR’10: Proceedings of the 7th Workshop on Constraint Handling Rules. K.U. Leuven (July 2010) 11. Gerlich, R., Gerlich, R., Kvinnesland, K., Johansen, B.S., Prochazka, M.: A case study on automated source-code-based testing methods. In: Proceedings of DASIA 2013 DAta Systems in Aerospace (2013) 12. Godefroid, P., Klarlund, N., Sen, K.: DART: directed automated random testing. In: PLDI ’05: Proceedings of the 2005 ACM SIGPLAN conference on Programming language design and implementation. pp. 213–223. ACM (2005) 13. Goldberg, D.: What every computer scientist should know about floating-point arithmetic. ACM Comput. Surv. 23(1), 5–48 (1991) 14. Gotlieb, A., Botella, B., Rueher, M.: Automatic test data generation using constraint solving techniques. SIGSOFT Softw. Eng. Notes 23(2), 53–62 (1998) 15. Hamlet, R.: Random testing. In: Marciniak, J. (ed.) Encyclopedia of Software Engineering, pp. 970–978. Wiley (1994) 16. Korel, B.: Automated software test data generation. IEEE Trans. Softw. Eng. 16(8), 870–879 (1990) 17. Michel, C.: Exact projection functions for floating point number constraints. In: Proceedings of seventh AIMA Symposium (2002) 18. Pugh, W.: The Omega Test: a fast and practical integer programming algorithm for dependence analysis. Communication of the ACM 8, 102–114 (August 1992) 19. Sy, N.T., Deville, Y.: Automatic test data generation for programs with integer and float variables. In: Proceedings of the 16th IEEE International Conference on Automated Software Engineering (ASE). pp. 13–21. IEEE (2001) 8
6cs.PL
Analytical solution of transient scalar wave and diffusion problems of arbitrary dimensionality and geometry by RBF wavelet series W. Chen* Department of Informatics, University of Oslo, P.O.Box 1080, Blindern, 0316 Oslo, Norway Email: [email protected] Summary This study applies the RBF wavelet series to the evaluation of analytical solutions of linear time-dependent wave and diffusion problems of any dimensionality and geometry. To the best of the author’s knowledge, such analytical solutions have never been achieved before. The RBF wavelets can be understood an alternative for multidimensional problems to the standard Fourier series via fundamental and general solutions of partial differential equation. The present RBF wavelets are infinitely differential, compactly supported, orthogonal over different scales and very simple. The rigorous mathematical proof of completeness and convergence is still missing in this study. The present work may open a new window to numerical solution and theoretical analysis of many other high-dimensional time-dependent PDE problems under arbitrary geometry. Key words: RBF wavelet series, Helmholtz equation, Fourier series, Gibbs phenomenon, time-dependent problem, high-dimensional problems, geometric complexity. * This research is supported by Norwegian Research Council. Contents 1. Fourier series, a historic retrospect…………………………………………..1 2. Radial basis function and wavelets…………………………………………..3 3. Analytical solution of transient wave problem with RBF wavelet series……7 3.1. Helmholtz eigenvalues and eigenfunctions with RBF…………………….…8 3.2. Analytical solution with RBF wavelet series………………………….……10 4. Applications to inhomogeneous problems…………………………………..13 5. Extension to other time-dependent equations……………………………….14 6. Generalized RBF wavelet series and transforms……………………………14 7. Promises and open problems………………………………………………..16 References……………………………………………………………………...18 1. Fourier series, a historic retrospect Many of the important concepts of analysis and computation have their origins in the study of physical problems leading to the partial differential equation (PDE) systems [1]. The currently ubiquitous Fourier series and transform came from Fourier’s original exploration of the solution of a bar heat transmission problem in the early 1800s. What Fourier proposed due to this quest is that an arbitrary 1D function f(x) over a bounded interval, even if not differentiable, can be represented by an infinite sum of sinusoids ∞ f ( x ) = ∑ c k sin k =1 kπ x, a (1) where sinusoids are the eigenfunctions of this PDE problem. Despite a lack of rigorous proof, Fourier was quite confident of the basic truth of his assertion for obvious physical and geometric grounds. Nevertheless, the implications of this discovery go well beyond Fourier’s wildest imaginations. The unanswered mathematical points forcefully gave birth to many more new problems and consequently motivated the development of many important mathematic concepts and techniques such as Riemann integration, Sturm- 1 Liouville eigenvalue problem, set theory, Laplace transform, Lebesgue integration, Green’s function and distribution theory, functional analysis, and most recently, wavelets theory [1] as well as enormous applications in numerous ramifications of science and engineering. Despite the widespread applicability [1-3], the Fourier analysis approach suffers some drawbacks. Most noticeably, for more than one-dimension problems, the direct use of the Fourier series becomes very mathematically complicated and is only feasible for such regular geometry as rectangular, circle, sphere, cylindrical domains, etc., where we can separate the space variables (in Cartesian, polar, or some other coordinate systems [4]). Otherwise the tensor product approach, very costly in high dimensions, must be applied. However, when the scattered data are involved, the tensor product Fourier analysis also immediately fails. Because of the great success of the polynomials, splines, and tensor product methods, mathematician and engineers alike grow accustomed to expressing a function in terms of coordinate variables. To majority of scientific and engineering community, the radial basis function (RBF), which uses the one-dimensional distance variable irrespective of dimensionality, is a quite brand-new and exotic concept. In high dimensional scattered data cases, the RBF approach, however, is the method of the choice [5]. It is also found that the RBF is very efficient in handling lower-dimensional problems [5-7]. In the following sections, we will try to clarify an underlying connection between the RBF and PDE problem, which unveils that the RBF approach, just like Fourier series, is no more than a natural technique originating from the solution of PDE problems. Another notorious drawback of the Fourier approach is to lack efficient localization in both time and frequency or scale, where the promise of wavelets technique comes into play. In recent decade fast development and widespread applications of the wavelets have been one of the most significant achievements in mathematics and many physical areas [8]. Unlike the most traditional expansion systems such as Fourier one [9], the basis functions of the wavelet analysis, however, are not solutions of differential equation. This 2 comes without a surprise since the wavelets have mainly been developed in signal processing area, where the PDE system is rarely involved. By means of the fundamental solution and general solution of partial differential equation, the next section concerns a convergence of the RBF and wavelets while attainting the compactness and infinite smoothness. 2. Radial basis function and wavelets Since pioneer works of Frankle [10], Michaelli [11] and Kansa [7], the research into the RBF theory and applications becomes very active. In parallel, Daubechies’ breakthrough orthogonal compact wavelets [12] lead revolutionary advances in multiscale analysis. The RBF is well known for its striking effectiveness in multivariate scattered data approximation [5]. However, in general the RBFs available now lack critical multiscale analysis capability. To handle high-dimensional multiscale scattered data and PDE systems, the RBF wavelets are mostly wanted to combine the strengths of both. In last decade much effort has been devoted to various non-orthogonal prewavelets RBF theory and applications by using some constructive approximation strategies [13-17]. Very recently Chen [18] could develop the orthogonal RBF wavelet series and transform by using the fundamental solution and general solution of some typical PDE’s. The work given in [18], however, is more conjecture and speculation than a complete theory with some evident errors. Next is summarized the discrete orthogonal RBF wavelet series versus the Fourier series. Some corrections to ref. 18 are also given. v Consider a real-value Riemann-integral multidimensional function f( x ) on the ndimension spherical domain Ω of radius R, ∞ ∞ v v v f ( x ) = a 0 2 + ∑∑ α jk ϕ n (η j x − x k j =1 k =1 3 ) (2) is called its RBF-based wavelet expansion series, where ϕn represents the wavelet basis v v function, x − x k means Euclidean distance; and αjk are the expansion coefficients. The reason why α0 is multiplied by ½ is technical as in the Fourier series and will be explained below. To discrete harmonic analysis, we choose the nonsingular general solutions of n-dimension Helmholtz equation ϕ n (rk ) = 1 , ϕ1 (η j rk ) = 1 ηj ϕ n (η j rk ) =  4  2πrk    ( n 2 )−1 η = 0, (3a) 1 sin (η j rk ) , 2η j η≠0, J (n 2 )−1 (η j rk ) , n≥2, (3b) η≠0 (3c) v v as wavelet basis function, where rk = x − x k , J(n/2)-1() is the (n/2-1)th order Bessel function of the first kind; and ηj are the zeros of ϕn(Rr). The eigenfunctions (3) form an orthonormal set of basis functions over different scales. In 3D case, the present RBF is the renowned Sinc function. Despite mathematical beauty and simplicity of the RBF expansion (2), a theoretical proof of convergence and completeness under certain conditions is missing in [18]. Levesley et al [19] provides an important clue to integrate the RBF wavelet approach with convolution operator theory. Considering the fundamental solution in the distribution theory, the general solution of n-dimensional Helmholtz equation may (may not) establish ∫ Ω∞ ϕ n ( x − x k )dΩ k ≠ 0 p ∞ , v v and then for a radially symmetric domain 4 (4) ∫ ∞ 0 r n −1ϕ n (r )dr p ∞ . (5) v Note that the above condition is very stringent. Thus, for f ( x ) ∈ R n we have lim c j ∫Ω ϕ n ( j x − x k ) f (x )dΩ k = f (x ) , v v v (6) j →∞ where cj are the coefficients depending on the RBF ϕn. After a numerical discretization of the integral in Eq. (6), we get RBF approximate expression (2). Its convergence is therefore guaranteed uniform and compact [19]. The condition (4) is satisfied by RBF wavelet transform using singular fundamental solution given in later section 6. Like the Fourier expansion, the function expressible in RBF wavelet series (2) should subject to some conditions, especially if ϕn does not satisfy the condition (4). For now, we do not have an explicit answer for this. A more loose condition on convergence of the Helmholtz RBF wavelet series may exist. On the other hand, very recently the present author became aware of a relevant important paper by Mourou and Trimeche [20], which originally introduces the so-called generalized wavelet transform using the solution of the Bessel operator. Although Mourou and Trimeche [20] use the term of the radial function, the generalized wavelet transform given there is in fact based on 1D coordinate variable rather than Euclidean distance variable and therefore is in fact not a RBF wavelet, which can only handle onedimensional cases if without tensor product approach. Noteworthily, the admissibility condition of their generalized wavelet transform is also applicable to the present RBF wavelet series due to the underlying connection between Helmholtz equation and Bessel operator. Namely, we have ∞ 0 p C g = ∫ h(ϕ n )(λ ) 0 5 2 dλ λ p ∞, (7) where h(ϕ n ) is the Fourier transform of general solution or fundamental solution ϕn of Helmholtz equation. Another important issue is how to calculate the expansion coefficients. It is known that the Bessel function possesses the orthogonality: ∫ R 0 0 η≠µ  rJ v (ηr )J v (µr )dr =  2 2  R J v +1 (Rη ) 2 η = µ (8) where Jv(Rη)=Jv(Rµ)=0. However, the present RBF wavelet series is not necessary orthogonal over translation of the same scale. Ref. [18] made wrong assumption that the present RBF wavelets are orthogonal over both scale and translation. In this regard the Gram-Schmidt orthogonality method may enforce the present RBF wavelets orthogonal over translation. Thus we can directly determine the expansion coefficients. In the 1D case, the coefficient formulas are quite similar to those of the corresponding Fourier series: α0 = α jk = 2 jπ R2 2 f (ζ )dΩ ζ , R ∫Ω R  jπ  ∫ f (ζ )sin R r ζ dζ , R k −R (9a) (9b) j = 1,2,K , k = 1,2, K For multidimensional problems, we have α0 = 2 Vn ∫ ΩR f (ζ )dΩ ζ , 6 (10a) α jk = 8 S n J n 2 (η j ) 2 ηj   2π    1− n 2 ∫ Ωζ rk1ζ−n 2 f (ζ )J (n 2 )−1 (η j rkζ )dΩ ζ , (10b) j = 1,2, K , k = 1,2, K , n≥2, v v where rkζ = x k − xζ , R is the radius of the spherical domain centering node k, and Sn represents the surface parameter; Vn is the volume of n-dimensional sphere. The reason for the coefficient ½ in (2) is that this will facilitate to streamline formulas (9a) and (9b) or (10a) and (10b) if we choose proper constant in Eq. (3a). 3. Analytical solution of transient wave problem with RBF wavelets The following n-dimension homogeneous wave problem with homogeneous boundary conditions serves as an illustrative example of the present strategy: ∇ 2u = 1 ∂ 2u , c 2 ∂t 2 v  u ( x , t ) = 0,  v  ∂u ( x , t ) = 0,  ∂n v v  u ( x ,0 ) = φ ( x ),  v u t (x ,0 ) = ψ ( x ) x∈Ω, v x ⊂ Su , t ≥ 0, v x ⊂ ST , v x ⊂ S, v x ⊂ S, (11) (12) (13) v where x means multi-dimensional independent variable, and n is the unit outward normal. S = S u U S Γ , The separation of the time variable yields v v u ( x , t ) = T (t )v( x ) 7 (14) Substitution into the wave equation (11) allows the separation of the time part ∇ 2 v + λ2 v = 0 , (15) d 2T + λ2T = 0 . dt 2 (16) Here λ is the separation constant and actually eigenvalue of the system. The problem has only nonnegative eigenvalues λj [22, pp. 248] and the solutions of the wave equation are [ ( ) ( )] ∞ 1 1 v v u ( x , t ) = A0 + B0 t + ∑ A j cos ct λ j + B j sin ct λ j v j (x ) , 2 2 j =1 (17) v where vj( x ) is the corresponding eigenfunctions. For the Robin (radiation) boundary condition ( ∂u ∂n + au = 0 ), the nonnegative eigenvalues holds provided that a≥0 [22]. 3.1. Helmholtz eigenvalues and eigenfunctions with RBF The challenging issues are to evaluate the spatial eigenvalues and eigenfunctions from the Helmholtz equation (15). The standard approaches based on the coordinate variables do not work in each case of irregular geometry, scattered data and high dimensions. So we have to resort the radial basis function methodology. In the case of the n-dimensional Helmholtz problem with eigenvalues λj, the complete RBF solution contains a complex argument [23]: 1 λ  u (r ) =   4  2πr  n 2 −1 * [Y (λr ) − iJ (λr )], n 2 −1 n 2 −1 n≥2, (18) where rk = x − x k , J(n/2)-1 and Y(n/2)-1 are respectively the (n/2-1)th order Bessel function of the first and second kinds. The Bessel function of the first kind is C∞ smooth while the 8 Bessel function of the second kind encounters a singularity at the origin. Thus, the nonsingular general solution (regular distribution) is the imaginary part of the above complex RBF solution (18) and is seen as the eigenfunctions. Namely, we have RBF eigenfunctions as follows ϕ n (rk ) = 1 , ϕ1 (λ j rk ) = 1 sin (λ j rk ), 2λ j 1  λj ϕ n (λ j rk ) =  4  2πrk    ( n 2 )−1 η = 0, (19a) n=1, λ ≠ 0 , (19b) J (n 2 )−1 (λ j rk ), n≥2, λ≠0, (19c) Since the eigenfunctions must be finite at the origin, scraping the singular part of the RBF solution (18) does not raise the completeness issue in general. Note that the general solution is independent of geometry. In other words, the general solution satisfies the Helmholtz equation (15) irrespective of the boundary shape of interests, which is validated by the computer software “Maple” in terms of 2D and 3D Cartesian coordinates. The next issue is to calculate the eigenvalues. We present the two boundary knot method (BKM) [24,25] schemes for this task. The first scheme is to employ the BKM discretization of the Helmholtz equation (15). The approximate representation of the symmetric BKM is LD LD + L N s =1 s = LD +1 v( x ) = ∑ β sϕ n (rs ) − ∑ βs ∂ϕ n (rs ) , ∂n (20) where k is the index of source points on boundary, βk are the desired coefficients; n is the 9 unit outward normal as in boundary condition (12), and LD and LN are respectively the numbers of knots on the Dirichlet and Neumann boundary surfaces. The minus sign associated with the second term is due to the fact that the Neumann condition of the first order derivative is not self-adjoint. In terms of representation (20), we have the homogeneous collocation analogue Hv=0 of boundary condition equations (12), where H is the symmetric BKM interpolation matrix. And then, just as in the traditional Fourier solution of 1D wave problem, the determinant of interpolation matrix has to be zero to attain the nontrivial solution, namely, det (H ) = 0 . (21) The infinitely many roots of the above algebraic equation are the eigenvalues of the Helmholtz equation (15). Note that since we use the symmetric BKM [25], all the solutions of eigenvalues will be real valued. The solution of transcendental equation (21) is often a daunting job and hence less attractive in practical use. So we develop the second strategy of the BKM for this task. The Helmholtz equation (15) can be rewritten as ( ) ∇ 2v + δ 2v = − λ2 + δ 2 v , (22) where δ is a small artificial real parameter (around 0.1) and insensitive to the boundary shape and dimensionality [25]. In terms of the symmetric BKM expression (20), the above equation (22) can be discretized into the standard algebraic eigenvalue problem ( ) Κv = − λ 2 + δ 2 v , (23) where the interpolation matrix K is symmetric irrespective of the boundary conditions. Many algorithm packages are readily available to calculate this standard eigenvalue 10 problem. Unlike the previous first strategy, the second scheme, however, requires using some inner nodes to guarantee the stability and accuracy of the BKM solution [25]. 3.2. Analytical solution with RBF wavelet series In terms of solution (17), the resulting analytical solution of wave equations (1,2,3) can be expressed as [ ( ) ( )] ∞ ∞ 1 1 v v v u ( x , t ) = A0 + B0 t + ∑∑ A jk cos ct λ j + B jk sin ct λ j ϕ n (λ j x − x k ) . 2 2 j =1 k =1 (24) The RBF series solution (24) is valid for any dimensionality and geometry since the RBF approach is independent of dimensionality and geometry. Note that this solution is an inseparable wavelet series, where eigenvalue λj is understood scale parameter (dilation) v and source node x k are seen as location parameter (shift) in wavelet terminology. In terms of initial conditions (13), we have v ∞ ∞ 1 v v v v u ( x ,0 ) = A0 + ∑∑ A jk ϕ n (λ j x − x k ) = φ ( x ) , 2 j =1 k =1 (25a) ∞ ∞ 1 v v v v u t (x ,0 ) = B0 + ∑ B jk c λ j ∑ ϕ n (λ j x − x k ) = ψ ( x ) . 2 j =1 k =1 (25b) v φ ( x ) and ψ ( x ) are expressible in the RBF wavelet series (2) of Helmholtz general solution provided that in this case they have the first order differential continuity and equal zero at boundary. Like the Fourier series approach, the coefficients Aj and Bj can most efficiently calculated via orthogonality. Applying the divergence theorem and Green’s second identity, it is proved [22, pp. 246] that for Helmholtz equation (15), the real eigenfunctions corresponding to distinct real eigenvalues are necessarily orthogonal. Concerning the eigenfunctions (19), the orthogonality over scale is 11 ∫ Ω for s ≠ t , X sp X tq dΩ = 0 , (26) where s and t denote scales, p and q are the translation locations. It is noted that the RBF wavelet series is not necessarily orthogonal over the translation. By the Gram-Schmidt orthogonality method, we can enforce orthogonization of general solution eigenfunctions of the same scale. Otherwise, we have to solve the simultaneous equations for coefficients Aj and Bj. In [22, pp. 254-256] the method of separation of variables is used to solve vibrations of a regular drumhead, where the eigenfunctions using coordinate variable is a general Fourier series combining Bessel function and trigonometric functions. Due to the orthogonality, all expansion coefficients, the number of which is equal to that of the present RBF wavelet coefficients, are calculated directly. By analogy with this strategy, the following formulas are given without rigorous proof under translation-orthogonal assumption and just for reference. A relevant Gram-Schmidt procedure should be developed in the future. A0 = B0 = A jk = B jk = 2 S n J n 2 (λ j ) 2 2 Vn ∫ φ (ζ )dΩζ , ΩR 2 ∫ Vn c λ j  λj   2π 8 c λ j S n J n 2 (λ j ) 2    ∫ Ωζ  λj   2π ψ (ζ )dΩ ζ , (28) rk1ζ− n 2φ (ζ )J (n 2 )−1 (λ j rkζ )dΩ ζ , (29) ΩR 1− n 2    1− n 2 ∫ Ωζ rk1ζ− n 2ψ (ζ )J (n 2 )−1 (λ j rkζ )dΩ ζ , j = 1,2, K , k = 1,2, K 12 (27) (30) It is very interesting to note that the 1D nonsingular general solution (19b) is the same sinusoids as in the 1D Fourier series solution (1). The distinctness of the RBF wavelet and Fourier series solutions is that when applied to practical problems with a truncated finite series, the former can locally adjust the scale parameter to avoid the Gibbs phenomena. Therefore, the RBF wavelet series solution are much more robust than the Fourier one. It is worth pointing out that the present RBF wavelets using the general solution of Helmholtz equation have periodic (harmonic) property and are much natural than those periodic RBF developed by [26,27], where the sine and cosine functions are employed as the RBF basis without considering dimensional affect and PDE eigensolution. 4. Applications to inhomogeneous problems In practical engineering, the governing equation [11] and boundary conditions [12] are often not homogeneous. For instance, ∇ 2u = 1 ∂ 2u v + f (x ) , 2 2 c ∂t v v  u ( x ) = D( x ),  v  ∂u ( x ) = R( xv ),  ∂n v x ⊂ Su , v x ⊂ ST , v v  u ( x ,0 ) = φ ( x ),  v u t (x ,0 ) = ψ ( x ) v x ⊂ S, v x ⊂ S, x∈Ω (31) t ≥ 0, (32) (33) v where f ( x ) is outside forcing function. Just like the Fourier solution of inhomogeneous PDE’s, we have two strategies to apply the method of the separation of variables [22, pp. 13 140-143] with RBF wavelet series. The method of shifting the data makes the inhomogeneous boundary conditions homogeneous by subtracting any known function that satisfies them, while the expansion method expand everything in the eigenfunctions of the corresponding homogeneous problems and then we can get a set of ordinary differential equations which is very easy to solve. 5. Applications to other problems Besides the wave equation considered previously, the following equations also frequently appear in electrical, magnetic, thermal, gravitational, vibration, hydrodynamics and acoustics problems [4]: 1. The diffusion equation ∇ 2u = 1 ∂u , h 2 ∂t (34) ∇ 2u = ∂u 1 ∂ 2u +R , 2 2 ∂t c ∂t (35) ∇ 2u = ∂u 1 ∂ 2u +R + Su , 2 2 ∂t c ∂t (36) 2. The damped wave equation 3. Transmission line equation The solution of all these equations can be reduced to solutions of the scalar Helmholtz equation (15) and the corresponding very simple ordinary differential equation in time. Thus, the extension of the present RBF wavelet series solution to these equations is very straightforward and omitted here for brevity. 14 6. Generalized RBF wavelet series and transforms In the foregoing sections, we only consider the RBF wavelet series using the general solution of Helmholtz equation. Those RBF wavelets describe periodic behaviors of physical systems as the trigonometric Fourier series. The higher order fundamental solutions of Laplace operator can construct the RBF wavelet series corresponding to the common polynomial interpolation and approximation, where the order of fundamental solution corresponds to the scale or polynomial order. Moreover, they are orthogonal over scales since the lower-order fundamental solutions satisfy the higher-order operator. The drawbacks of the Laplacian RBF wavelets are limited smoothness. On the other hand, we can create continuous RBF wavelet transform using the fundamental solution (irregular distribution) of PDE’s. For example, f (ζ )g n (λrξζ )dΩ ζ , F (λ , ξ ) = ∫ Ω∞ (37) and +∞ v f ( x ) = C g−1 ∫ ∫ F (λ , ξ )g n (λrxξ )λ2 n −1 dΩ ξ dλ , 0 Ω∞ (38) where Cg is decided by formula (7), 1 g n (λrk ) = 2π  − iλ   2πrk     λ   2πrk    ( n 2 )−1 K (n 2 )−1 (− iλrk ) (39) K (n 2 )−1 (λrk ) (40) for Helmholtz harmonic wavelets and 1 g n (λrk ) = 2π ( n 2 )−1 for modified Helmholtz wavelets, K is the modified Bessel function of the first kind. The 15 corresponding dual wavelet basis function is its conjugate function g n (λrk ) , which satisfies the condition (4). The modified Helmholtz wavelets are the counterpart of the Laplace transform. Note that here we correct some errors of Eqs. (15) and (16) in ref. 18 without using rn-1 weight. For more details see refs. [18,21]. The harmonic RBF wavelet transform enjoys a nice feature of Fourier transform: ∇ 2 F (λ , ξ ) = −λ2 F (λ , ξ ) . (41) It is also highly likely to develop the RBF wavelets transforms based on the general and fundamental solutions of the other typical partial differential equation such as convectiondiffusion equation [18]. 7. Promises and open problems Promises: 1. Since the present series solution is wavelets, the Gibbs phenomenon long bothering the Fourier series is eliminated. By adapting the arbitrarily scaling parameter (dilations) rather than the dyadic multiresolution analysis, we get locally supported RBF basis both in scale and location. Compactly-supported wavelets using spline, especially orthogonal such as the popular Daubechies wavelets [12], have a limited degree of smoothness in compromise to the compactness. In contrast, the RBF wavelets are not only orthogonal over scale but also infinitely differentiable. 2. Due to the use of the RBF, we avoid using the tensor-product approach for high dimensional problems with irregular geometry. In addition, the present method is meshfree and feasible to handle scattered data problems. 3. The strategy presented here is expected feasible to other type of problems such as data processing and edge detection etc., where an efficient description of multidimensional multiscale scattered data is crucial. In addition, the present 16 method may be employed to evaluate the fractional differential equation corresponding to fractal geometry by using fractional dimensionality. Problems: The present form of the RBF wavelets, resembling the immature status of Fourier’s early work, which used concepts and theories as yet undeveloped or underdeveloped [1], may provide some of the refresh impulse on new advances in applied and basic analysis. Some worrisome points of this study are stated below (the distribution theory may be useful to research them). 1. In terms of Fourier series, there are three kinds of convergence: pointwise, uniform and L2 convergences. This study will not go further into the convergence issue of the RBF wavelet series solution of transient PDE’s. Ref. [22] defines that an orthogonal system is called complete if and only if it is not a proper subset of another orthogonal system. The present general solution eigenfunctions satisfy this condition. In addition, the key issue is if it satisfies Parseval’s identity. Section 2 provides some proof of the convergence and completeness of the RBF wavelet series via convolution operator theory and admissibility condition of wavelets. The proof of completeness and convergence of RBF series solution of PDE’s, however, is still lacking now. Chen and Tanaka [17] and Hon and Chen [28] also physically discussed the completeness issue of the general solution expansion series within the framework of the boundary knot method. 2. It is unknown now if the RBF wavelet transform given in section 6 [18] can be employed to get the analytical solution of time-dependent problems in the integral form. If OK, this integral solution should be equal to the limit of the present RBF wavelet series solution. 3. The computing formulas (9), (10) and (27-30) of expansion coefficients based on orthogonality may be error prone. 17 References 1. E.A. Gonzalez-Velasco, Fourier Analysis and Boundary Value Problems, Academic Press, 1995. 2. O. Erosy, Fourier-Related Transforms, Fast Algorithms and Applications, PrenticeHall, 1997. 3. D.G. Duffy, Transform Methods for Solving Partial Differential Equations, CRC Press, Florida, 1994. 4. P. Moon and D.E. Spencer, Field Theory Handbook, Springer, 1961. 5. M.D. Buhmann, Radial basis function, Acta Numerica, 1-38, 2000. 6. R.L. Hardy, Theory and applications of the multiquadric-biharmonic method: 20 years of discovery, Comput. Math. Appl. 19, 163-208, 1990. 7. E.J. Kansa, Multiquadrics: A scattered data approximation scheme with applications to computational fluid-dynamics, Comput. Math. Appl. 19,147-161, 1990. 8. C.K. Chui, Wavelets: A Mathematical Tool for Signal Analysis. SIAM, Philadelphia, 1997. 9. C.S. Burrus, R.A. Gopinath and H. Guo, Introduction to Wavelets and Wavelet Transforms, Prentice Hall, 1998. 10. R. Franke, Scattered data interpolation: tests of some methods, Math. Comp. 38, 181199, 1982. 11. C.A. Micchelli, Interpolation of scattered data: distance matrices and conditionally positive definite functions, Constr. Approx. 1, 11-22, 1986. 12. I. Daubechies, Orthonormal bases of compactly supported wavelets, Comm. Pure Appl. Math., XLI(7), 909-996, 1988 13. M.D. Buhmann, Multiquadric prewavelets on nonequally spaced knots in one dimension, Math. Comp., 64, 1611-1625, 1995. 14. C.K. Chui, J. Stockler and J.D. Ward, Analytical wavelets generated by radial functions, Adv. Comp. Math., 5, 95-123, 1996. 15. C.A. Michaelli, C. Rabut, and F.L. Utreras, Using the refinement equation for the construction of pre-wavelets III: elliptic splines, Numer. Algorithms, 1, 331-352, 1991. 18 16. C. Li and N. Zheng, A theory of constructing locally supported radial wavelet frame and its application, Science in China (Series E), 42(6), 584-594, 1999. 17. W. Chen and M. Tanaka, Relationship between boundary integral equation and radial basis function. In the 52th Symposium of Japan Society for Computational Methods in Engineering (JASCOME) on BEM, Tokyo, Sept. 2000. 18. W. Chen, Orthonormal RBF wavelet and ridgelet-like series and transforms for highdimensional problems, Int. J. Nonlinear Sci. Numer. Simulation, 2, 163-168, 2001. 19. J. Levesley, Y. Xu, W. Light and W. Cheney, Convolution operators for radial basis approximation, SIAM J. Math. Anal., 27(1), 286-304, 1996. 20. M.A. Mourou and K. Trimeche, Inversion of the Weyl integral transform and the radon transform on Rn using generalized wavelets, C.R. Math. Rep. Acad. Sci. Canada, XVIII(2-3), 80-84, 1996. 21. W. Chen, Errata and supplements to: Orthonormal RBF Wavelet and Ridgelet-like Series and Transforms for High-Dimensional Problems, CoRR preprint: http://xxx.lanl.gov/abs/cs.NA/0105014, April, 2001. 22. W.A. Strauss, Partial Differential Equations, an Introduction, John Wiely & Sons, 1992. 23. P.K. Kythe, Fundamental Solutions for Differential Operators and Applications, Birkhauser, Boston, 1996. 24. W. Chen and M. Tanaka, New Insights into Boundary-only and Domain-type RBF Methods, Int. J. Nonlinear Sci. & Numer. Simulation, 1(3), 145-151, 2000. 25. W. Chen, Boundary knot method for Laplace and biharmonic problems, Proc. of the 14th Nordic Seminar on Comp. Mech., Lund, Sweden, (L. Beldie, O. Dahlblom, A. Olsson, N.S. Ottosen and G. Sandberg eds.), pp. 117-120, 2001. 26. Y. Xu and E.W. Cheney, Interpolation by periodic radial functions, Comput. Meth. Appl., 24(2), 201-215, 1992. 27. W.A. Light and E.W. Cheney, Interpolation by periodic radial basis functions, J. Math. Anal. Appl., 168, 111-130, 1992. 28. Y.C. Hon and W. Chen, Boundary knot method for 2D and 3D Helmholtz and convection-diffusion problems under complicated geometry, Int. J. Numer. Methd. Engng., (submitted), 2001. 19
5cs.CE
Uniqueness Trees: A Possible Polynomial Approach to the Graph Isomorphism Problem Jonathan Gorard arXiv:1606.06399v1 [cs.DM] 21 Jun 2016 Department of Mathematics, King’s College London, Strand, London, WC2R 2LS Abstract This paper presents the novel ‘uniqueness tree’ algorithm, as one possible method for determining whether two finite, undirected graphs are isomorphic. We prove that the algorithm has polynomial time complexity in the worst case, and that it will always detect the presence of an isomorphism whenever one exists. We also propose that the algorithm will equivalently discern the lack of an isomorphism whenever one does not exist, and some initial justifications are given for this proposition, although it cannot yet be rigorously proven. Finally, we present experimental evidence for both the effectiveness and efficiency of the uniqueness tree method, using data gathered from a practical implementation of the algorithm. Some consequences and directions for further research are discussed. Keywords: graph isomorphism, computational complexity, canonical labelling 1. Introduction 1.1. Background The graph isomorphism problem is the decision problem of determining whether two finite graphs, G = (V, E) and H = (U, F ) are isomorphic, denoted G ∼ = H. The graphs are isomorphic if and only if there exists a bijection f between the two sets of vertices V and U such that, for every pair of vertices (u, v) in V , the edge f (u)f (v) exists in F if and only if the corresponding edge uv exists in E.[1] Formally: G∼ = H ⇐⇒ ∃f : V → U | ∀(u, v) ∈ V, f (u)f (v) ∈ F ⇐⇒ uv ∈ E (1) The graph isomorphism problem is of particular interest in the field of computational complexity theory, since it is one of only a few problems whose complexity class is not solidly classified: it is not known to be solvable in polynomial time, yet neither has it been shown to be NP-complete. Thus, it is often placed in the theoretical complexity class of ‘N P intermediate’[2] (which, by Ladner’s theorem, exists if and only if P 6= N P [3]). In addition, efficient algorithms for detecting graph isomorphism are of great practical importance across a variety of fields, including network analysis, organic chemistry, condensed matter physics, chemical engineering, electronic engineering, computational biology, and others.[5][4][6] Preprint submitted to Journal of Discrete Algorithms February 26, 2018 There exist many algorithms which run in polynomial (or even sub-polynomial) time in all practical cases, but which degenerate to exponential time in the worst-case[7], making them unsatisfactory from a complexity-theoretic point of view. We provide a brief outline of one such algorithm (McKay’s NAUTY), for the purpose of demonstrating how its approach, and the approach adopted by many similar state-of-the-art algorithms, differs from the uniqueness tree method proposed in this paper. We then provide both a formal and an informal statement of the uniqueness tree algorithm itself, along with an illustrative example of its application to a pair of non-isomorphic graphs. Next, we give a formal proof that the algorithm runs in septic polynomial (O(n7 )) time in the worst case, and that the algorithm will always correctly detect the presence of an isomorphism between two graphs, whenever one exists. We propose that the converse statement is also true (i.e. that the algorithm will correctly discern the lack of an isomorphism, whenever one does not exist), and give a brief sketch of a possible proof method, though this statement remains a conjecture. Finally, we supply experimental evidence of both the algorithm’s effectiveness in determining isomorphism/non-isomorphism between random graphs, and its polynomial efficiency. For the purposes of this paper, we will consider only simple graphs (i.e. unweighted, undirected graphs containing no loops or multiple edges). However, it is possible to generalise these methods to directed graphs, as well as to graphs in which multiple edges and loops are permitted, as will be shown in a future work. 1.2. NAUTY Most practical graph isomorphism algorithms work by reducing graphs to a so-called ‘canonical form’ - an object whose structure is independent of the particular ordering of the vertices, but dependent upon all other properties of the graph.[8] Thus, if the canonical forms for two graphs are equivalent, then the graphs must be isomorphic; conversely, if the canonical forms differ, then the graphs must be non-isomorphic. NAUTY, as with most similar algorithms, operates by producing a so-called ‘search tree’ as its canonical graph form, which is a rooted tree in which each vertex corresponds to a distinct ‘partition’ (colouring) of the graph’s vertices. Loosely, the process of partition refinement is as follows:[9] Figure 1: A partition π. Figure 2: A refined partition π1 . 2 1. The root of the tree is an initial (uniform) colouring of the graph. 2. If two vertices share the same colour in a particular partition, but have neighbourhoods with different colourings, then ‘refine’ the partition by assigning each vertex a new colour. This refined partition is a child vertex of the original partition. 3. If a particular partition cannot be refined further, then that vertex of the tree becomes a leaf, with no children. However, the uniqueness tree algorithm does not produce a single search tree to represent a graph. Rather, it produces a set of ‘uniqueness trees’: one for each vertex of the graph. In turn, each vertex of a uniqueness tree represents a single vertex of the graph, as opposed to the richer structure of an entire vertex partition. This paper conjectures that the set of uniqueness trees is a canonical graph form, and provides some initial justification for that assertion. 2. The Uniqueness Tree Algorithm 2.1. Brief Outline For two finite, simple graphs G = (V, E) and H = (U, F ), the uniqueness tree algorithm associates a rooted tree T (v) with every vertex v ∈ V , and T (u) with every vertex u ∈ U . This paper proposes that, if every tree associated with a vertex of G is uniquely isomorphic to a tree associated with a vertex of H, then G and H are isomorphic: G∼ = H ⇐⇒ ∀v ∈ V, ∃!u ∈ U | T (v) ∼ = T (u) (2) Checking this criterion is an efficient process, since an isomorphism between two rooted trees may be computed in linear (O(n)) time, where n is the number of vertices in each tree.[10] The process for generating the uniqueness tree for a vertex v is as follows: 1. The root of the tree is the vertex v itself. 2. Every vertex in the current level of the tree which is not ‘unique’ (i.e. every vertex which appears in the current level more than once) becomes a leaf, producing no children. 3. Every unique vertex in the current level of the tree produces 1 child for every adjacent vertex in the graph. 4. This process continues until either the tree self-terminates (i.e. there are no more unique vertices on the current level), or the height of the tree reaches n (the size of the graph). 3 2.2. An Example Case As an illustrative example, we shall test for isomorphism between the following pair of graphs: Figure 3: A graph, G = (V, E). Figure 4: Another graph, H = (U, F ). Clearly, G and H are not isomorphic (G is planar and H is not). However, they are equivalent in every other respect, since H is simply an embedding of G from a plane onto a Möbius strip. In the interests of brevity, we shall not apply the entire algorithm, since to do so would require generating 16 uniqueness trees, and then making up to 36 comparisons between them. Rather, we shall simply show that vertex A in G cannot be equivalent to vertex A in H, and the non-isomorphism of G and H follows trivially. For graph G, the first level of A’s uniqueness tree contains A’s immediate adjacencies: B, C and G (all of which are unique). Figure 5: The first level of A’s uniqueness tree for graph G. Similarly, B’s children on the second level of the tree are A, D and H (B’s immediate adjacencies), C’s children are A, D and E, and G’s children are A, E and H. Since A, D, E and H all appear multiple times on the second level, all of the vertices becomes leaves and the tree terminates. 4 Figure 6: The complete uniqueness tree for vertex A in graph G. On the other hand, the first level of A’s uniqueness tree for graph H contains the adjacent vertices B, C and H, which are, again, unique. Figure 7: The first level of A’s uniqueness tree for graph H. B’s children on the second level of the tree are then A, D and G, C’s children are A, D and E, and H’s children are A, F and G. Vertices A, D and G become leaves, since they are not unique at this level. Figure 8: The second level of A’s uniqueness tree for graph H. Since vertices E and F are both unique on the second level, their adjacencies (C, F and G for vertex E, and D, E and H for vertex F ) are carried to the third level of the tree. Since C, D, E, F , G and H are all unique on the third level, their adjacencies will, in turn, be carried up to the fourth level, and so on. 5 Figure 9: The third level of A’s uniqueness tree for graph H. Already, we can see that the two uniqueness trees cannot possibly be isomorphic (since the first tree has only two levels, whilst the second has at least four), and so vertex A in graph G cannot be equivalent to vertex A in graph H. 2.3. Formal Statement The uniqueness tree algorithm may be divided into two distinct stages: the tree generation stage, and the tree comparison stage. Algorithm 1 Uniqueness tree generation 1: for each graph G = (V, E) do 2: for each vertex v ∈ V do 3: create a new tree T (v), with v as its root 4: while ∃ u, a vertex which appears only once in the current level of T (v), and height(T (v)) < n do 5: for each w ∈ neighbourhood(u) do 6: add w to the next level of the uniqueness tree. 7: end for 8: end while 9: end for 10: end for Then, for two graphs G = (V, E) and H = (U, F ): 6 Algorithm 2 Uniqueness tree comparison 1: for each unmapped vertex v ∈ V do 2: for each unmapped vertex u ∈ U do 3: if height(T (v)) 6= height(T (u)) then 4: v and u are not equivalent 5: end if 6: for each level of T (v) do 7: if width(currentlevel(T (v))) 6= width(currentlevel(T (u))) then 8: v and u are not equivalent 9: end if 10: for i ← 1, (n − 1) do 11: if vertices with i children in currentlevel(T (v)) 6= vertices with i children in currentlevel(T (u)) then 12: v and u are not equivalent 13: end if 14: end for 15: end for 16: if v and u are equivalent then 17: map v onto u 18: end if 19: end for 20: end for 21: if all vertices v ∈ V and u ∈ U have been mapped then 22: G∼ =H 23: else 24: GH 25: end if 3. Rigorous Results 3.1. Proof of Polynomial Time Complexity Theorem 3.1. For two finite, simple graphs G = (V, E) and H = (U, F ), each of size n, the uniqueness tree algorithm runs in septic polynomial time (O(n7 )) in the worst case. Since the uniqueness tree algorithm can be divided into two sequential stages (tree generation and tree comparison), we shall analyse the time complexity of each stage separately, and then add the two complexities together. Lemma 3.1.1. The tree generation algorithm runs in sextic polynomial time (O(n6 )) in the worst case. Proof 3.1.1. 7 1. The total number of uniqueness trees which must be generated is 2n = O(n). 2. The maximum width of a single uniqueness tree is O(n2 ) (since the maximum number of unique vertices which can appear in a single level is n, and each vertex can have a maximum of (n − 1) adjacencies, giving a maximum of (n2 − n) children on the next level, all of which would be leaves). 3. ∴ The maximum number of vertices in each uniqueness tree is O(n3 ) (since the maximum width is O(n2 ), and the maximum height is O(n)). 4. The maximum number of operations required to generate each vertex in the tree is O(n2 ) (i.e. a maximum of (n − 1) comparisons with other vertices in the graph, plus a maximum of (n2 − n) comparisons with other vertices in the current level of the tree, in order to test uniqueness). 5. ∴ The worst case time complexity of the tree generation algorithm is O(n) ∗ O(n3 ) ∗ O(n2 ) = O(n6 ).  Lemma 3.1.2. The tree comparison algorithm runs in septic polynomial time O(n7 ) in the worst case. Proof 3.1.2. 1. The first tree of graph G must be compared with a maximum of n trees from graph H, the second with (n − 1) trees, and so on. n X ∴ The maximum number of tree comparisons which must be made is i = O(n2 ). i=1 2. Determining an isomorphism between the two rooted trees requires comparing the heights of both trees, comparing the total number of vertices in each level of each tree, and comparing the total number of children possessed by each vertex in each level of each tree. 3. Comparing the heights of two rooted trees requires O(1) operation. 4. Comparing the total number of vertices in each level of two rooted trees requires O(n) operations in the worst case (since each tree may hold a maximum of n levels). 5. Each level may contain a maximum of (n2 − n) vertices, each of which must be compared with a maximum of (n2 − n) vertices in the corresponding level of the other tree, for each of a possible n levels of the tree. ∴ Comparing the total number of children possessed by each vertex in each level of each tree requires O(n2 ) ∗ O(n2 ) ∗ O(n) = O(n5 ) operations in the worst-case. 8 6. ∴ The worst case time complexity for detecting an isomorphism between the two rooted trees is O(n5 ) + O(n) + O(1) = O(n5 ). 7. ∴ The worst case time complexity of the tree comparison algorithm is O(n2 ) ∗ O(n5 ) = O(n7 ).  Since O(n7 ) + O(n6 ) = O(n7 ), the desired theorem follows directly from these two lemmas. 3.2. Proof of Effectiveness (Positive Case) Theorem 3.2. If two graphs G = (V, E) and H = (U, F ) are isomorphic, then the uniqueness tree algorithm will correctly determine that G ∼ = H. Proof 3.2.1. The key point is that the uniqueness tree algorithm is based entirely around vertex adjacencies (which are graph-invariant), and does not depend at all upon vertex ordering. Suppose that uv ∈ E and f (u)f (v) ∈ F . Figure 10: A section of a uniqueness tree for graph G. Figure 11: A section of the equivalent uniqueness tree for graph H. 1. If a vertex u is not unique to a particular level of a particular uniqueness tree for graph G, then the vertex f (u) will be also non-unique to the equivalent level of the equivalent vertex tree for graph H. 2. Conversely, if vertex u is unique to that level, then vertex v in the next level of G’s tree will have the same uniqueness property as vertex f (v) in H’s tree, and so on. 3. Thus, it follows that if f (u)f (v) ∈ F ⇐⇒ uv ∈ E, then graphs G and H will produce an equivalent set of uniqueness trees. 4. Since an isomorphism is defined as a bijection f between the sets V and U which satisfies the above property, the desired theorem follows naturally.  9 3.3. Proposition of Effectiveness (Negative Case) Proposition 3.2.1. If two graphs G = (V, E) and H = (U, F ) are not isomorphic, then the uniqueness tree algorithm will correctly determine that G  H. Justification 3.2.1. One possible approach to proving this proposition may be an analogy to the positive case, as in the following informal sketch: 1. If G  H, then (without loss of generality) there must exist at least one f (u)f (v) ∈ F , such that uv ∈ / E (by negation of the definition of isomorphism). 2. If vertex u (in a particular level of a particular uniqueness tree for graph G) has a different uniqueness property to vertex f (u) (in the equivalent level of the equivalent uniqueness tree for graph H), then the uniqueness trees produced will be non-isomorphic, since one vertex will become a leaf, whilst the other will not. 3. Conversely, if vertices u and f (u) are both unique, then there will be an instance of the vertex f (v) in the next level of H’s tree, without a corresponding instance of the vertex v in G’s. Thus, the uniqueness trees produced will be non-isomorphic, since the vertices in the next level will have different uniqueness properties as a result. 4. Additionally, if vertices u and f (u) are both non-unique, then the non-uniqueness of vertex f (u) may be the result of having f (v) as its parent vertex in H’s tree, whilst v cannot be a parent vertex of u in G’s tree. If this is the case, then the uniqueness trees produced will, again, be non-isomorphic. Clearly, further work will be required to either formalise a proof of this proposition, or to demonstrate why it is incorrect. 4. Practical Implementation For the purposes of experimentally verifying both the effectiveness and efficiency of the uniqueness tree method, we present a practical implementation of the algorithm in Java; the complete source code for this algorithm, along with all of the tests described in this section, may be found in the Appendix. Independent verification of these experimental findings is strongly encouraged. 4.1. Experimental Verification of Effectiveness (Positive Case) The algorithm was tested on 10,000 pairs of random graphs, ranging in size from 1 to 100 (100 pairs of each). The graph pairs were known to be isomorphic, since the second graph was generated by randomly permuting the vertices of the first. The presence of an isomorphism was correctly detected in all 10,000 cases. 10 4.2. Experimental Verification of Effectiveness (Negative Case) When testing proposed algorithms for graph isomorphism, generating pairs of graphs which are known to be non-isomorphic is a fundamentally difficult problem, since doing so pre-supposes an effective criterion for detecting isomorphisms in the first place. It is trivial to generate pairs of graphs with differing graph invariant properties, but then one is simply testing the capability of the algorithm to discern those particular graph invariants, rather than its ability to detect non-isomorphism in general. For the purpose of the present experimental test, we will attempt to generate a pair of similar but non-isomorphic graphs, by creating a second graph that is a vertex-permutation of the first (as above), but with one edge randomly replaced. Clearly, there is a small probability of inadvertently creating an isomorphic pair, particularly when the graphs involved are small. Indeed, when tested on the first 900 pairs of graphs with n < 10, some apparent false-positives were produced. However, when these possible exceptions were tested (either by hand, or by cross-checking with NAUTY), it was determined that all of the problematic graphs had been, by chance, isomorphic. For the remaining 9,100 pairs of graphs with n ≥ 10, there were no false positives. 4.3. Experimental Verification of Efficiency The total computation time required for the algorithm to test for isomorphism between 10,000 pairs of random isomorphic test graphs (100 pairs of each size n, with n ranging from 1 to 100) was recorded, and then plotted as a function of n. The equivalent process was repeated for 10,000 pairs of random non-isomorphic test graphs, also: Figure 12: The computation time required to test for isomorphism between 100 pairs of known isomorphic graphs, as a function of the number of vertices. Figure 13: The computation time required to test for isomorphism between 100 pairs of known nonisomorphic graphs, as a function of the number of vertices. 11 For large n, taking the natural logarithm of both axes produces a straight line, demonstrating the asymptotically polynomial efficiency of the algorithm (since if y = xk , then ln(y) = kln(x), with the gradient of the line thus representing the degree of the polynomial): Figure 14: The natural logarithm of the computation time required to test for isomorphism between 100 pairs of isomorphic graphs, as a function of the natural logarithm of the number of vertices. The plot fits a straight line of gradient 4.174996, with R2 = 0.968827. Figure 15: The natural logarithm of the computation time required to test for isomorphism between 100 pairs of non-isomorphic graphs, as a function of the natural logarithm of the number of vertices. The plot fits a straight line of gradient 4.187919, with R2 = 0.966003. The seemingly anomalous points observed for low values of n are due to intrinsic computational overheads, which naturally smooth out for larger graphs. Thus, removing the results for the first 2,000 graph pairs from each plot (i.e. the values 1 ≤ n ≤ 20) produces a much better linear fit in both cases: 12 Figure 16: The same as the plot above, but with the results for the smallest 2,000 isomorphic graph pairs removed. The plot now fits a straight line of gradient 5.124289, with R2 = 0.995931. Figure 17: The same as the plot above, but with the results for the smallest 2,000 non-isomorphic graph pairs removed. The plot now fits a straight line of gradient 5.202082, with R2 = 0.996664. These plots suggest that the uniqueness tree algorithm runs in approximately quintic polynomial time (O(n5 )) on average for random graphs, which is consistent with our proof that the time complexity should never exceed O(n7 ). 5. Concluding Remarks This paper has presented the polynomial time ‘uniqueness tree’ algorithm, and used a combination of rigorous results and heuristic verification to propose that it may represent an effective approach to tackling the graph isomorphism problem. The importance placed upon the graph isomorphism problem within computational complexity theory is primarily due to its present status as a prime candidate for an ‘N P intermediate’ problem[2] (a problem that is neither in the complexity class P , nor N P complete), and many other proposed N P -intermediate problems are known to be reducible to GI.[11] Thus, if the graph isomorphism problem could be shown to be solvable in polynomial time, it would constitute evidence against the existence of the N P -intermediate set (and therefore, by Ladner’s theorem, evidence that P = N P [3]). As such, any indication of the possibility of a polynomial time solution for GI would have significant implications for the entire field. Further research into the effectiveness of the uniqueness tree algorithm will centre around attempting to either prove or disprove the proposition that it is able to correctly discern the lack of an isomorphism in all relevant cases. Extensions of the methods described in this paper to non-simple and directed graphs will appear in a future work, along with possible generalisations of the uniqueness tree approach to related problems in graph theory (including graph automorphism, subgraph homeomorphism, etc.). 13 6. Acknowledgements The author is grateful to Richard Bridges, for many helpful suggestions and clarifications during the early stages of this research. 7. References References [1] A. Prolubnikov, Reduction of the graph isomorphism problem to equality checking of n-variables polynomials and the algorithms that use the reduction, http://arxiv.org/ pdf/1512.03139v4.pdf (2016) 1 [2] A. Dawar, Report on The Graph Isomorphism Problem, Dagstuhl Seminar 15511 on the Graph Isomorphism Problem (2015) 1-2 [3] M. Bodirsky, M. Grohe, Non-dichotomies in Constraint Satisfaction Complexity, Automata, Languages and Programming LNCS 5126 (2008) 184 [4] W. Fan, Graph pattern matching revised for social network analysis, Proceedings of the 15th International Conference on Database Theory (2012) 8 [5] T. Akutsu, H. Nagamochi, Comparison and Enumeration of Chemical Graphs, Computational and Structural Biotechnology Journal 5 (6) (2013) 2 [6] J. Whitham, A Graph Matching Search Algorithm for an Electronic Circuit Repository, MEng Thesis, University of York (2004) 5 [7] P. Foggia, C. Sansone, M. Vento, A performance comparison of five algorithms for graph isomorphism, Proceedings of the 3rd IAPT TC-15 Workshop on Graph-based Representations in Pattern Recognition (2001) 2 [8] B. D. McKay, A. Piperno, Practical graph isomorphism, II, https://arxiv.org/pdf/ 1301.1493.pdf (2013) 2 [9] B. D. McKay, Practical graph isomorphism, Congressus Numerantium 30 (1981) 54 [10] S. R. Buss, Alogtime algorithms for tree isomorphism, comparison, and canonization, Computational Logic and Proof Theory 1289 (2005) 19 [11] G. L. Miller, Graph isomorphism, general remarks, Journal of Computer and System Sciences 18 (2) (1979) 129 14 Appendix: Source Code import java . util . Random ; import java . io .*; public class Main { private static Random rnd ; private static FileWriter fileWriter ; private static BufferedWriter bufferedWriter ; private static int [] vertexCount ; private static int [][] vertexDegree ; private static int [][][] vertexAdjacency ; private static int [] vertexMap ; private private private private static static static static int [][] u n i q u e n e s s T r e e H e i g h t ; int [][][] u ni q u en e s sT r e eW i d th ; int [][][][] u n i q u e n e s s T r e e V e r t i c e s ; int [][][][] u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t ; private static int [][][][] u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t O c c u r r e n c e ; private static boolean [][] vertexMapped ; public static void initialise ( int n ) { rnd = new Random () ; vertexCount = new int [2]; vertexDegree = new int [2][ n ]; vertexAdjacency = new int [2][ n ][ n ]; vertexMap = new int [100]; u n i q u e n e s s T r e e H e i g h t = new int [2][ n ]; u ni q u en e s sT r e eW i d t h = new int [2][ n ][ n ]; u n i q u e n e s s T r e e V e r t i c e s = new int [2][ n ][ n ][ n * n ]; u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t = new int [2][ n ][ n ][ n * n ]; u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t O c c u r r e n c e = new int [2][ n ][ n ][ n ]; vertexMapped = new boolean [2][ n ]; } public static void g en e r at e R an d o mG r a ph ( int size ) { vertexCount [0] = size ; for ( int i = 0; i < size ; i ++) { for ( int j = 0; j < size ; j ++) { if ( i != j && rnd . nextDouble () <= 0.5) { boolean verticesAdjacent = false ; 15 for ( int k = 0; k < vertexDegree [0][ i ]; k ++) { if ( vertexAdjacency [0][ i ][ k ] == j ) { verticesAdjacent = true ; } } if (! verticesAdjacent ) { vertexAdjacency [0][ i ][ vertexDegree [0][ i ]] = j ; vertexAdjacency [0][ j ][ vertexDegree [0][ j ]] = i ; vertexDegree [0][ i ] += 1; vertexDegree [0][ j ] += 1; } } } } } public static void g e n e r a t e I s o m o r p h i c G r a p h () { vertexCount [1] = vertexCount [0]; for ( int i = 0; i < vertexCount [0]; i ++) { vertexMap [ i ] = i ; } for ( int i = 0; i < vertexCount [0]; i ++) { int swap = rnd . nextInt ( vertexCount [0]) ; int temp = vertexMap [ i ]; vertexMap [ i ] = vertexMap [ swap ]; vertexMap [ swap ] = temp ; } for ( int i = 0; i < vertexCount [0]; i ++) { vertexDegree [1][ vertexMap [ i ]] = vertexDegree [0][ i ]; for ( int j = 0; j < vertexDegree [0][ i ]; j ++) { vertexAdjacency [1][ vertexMap [ i ]][ j ] = vertexMap [ vertexAdjacency [0][ i ][ j ]]; } } } public static void g e n e r a t e N o n I s o m o r p h i c G r a p h () { g e n e r a t e I s o m o r p h i c G r a p h () ; for ( int i = 0; i < vertexCount [1]; i ++) { if ( vertexDegree [1][ i ] > 0) { vertexDegree [1][ i ] -= 1; vertexDegree [1][ vertexAdjacency [1][ i ][ vertexDegree [1][ i ]]] -= 1; for ( int j = 0; j < vertexCount [1]; j ++) { if ( i != j && j != vertexAdjacency [1][ i ][ vertexDegree [1][ i ]]) { boolean verticesAdjacent = false ; 16 for ( int k = 0; k < vertexDegree [1][ j ]; k ++) { if ( vertexAdjacency [1][ j ][ k ] == i ) { verticesAdjacent = true ; } } if (! verticesAdjacent ) { vertexAdjacency [1][ i ][ vertexDegree [1][ i ]] = j ; vertexAdjacency [1][ j ][ vertexDegree [1][ j ]] = i ; vertexDegree [1][ i ] += 1; vertexDegree [1][ j ] += 1; j = vertexCount [1]; i = vertexCount [1]; } } } } } } public static void g e n e r a t e U n i q u e n e s s T r e e s () { for ( int i = 0; i < 2; i ++) { for ( int j = 0 ; j < vertexCount [ i ]; j ++) { u n i q u e n e s s T r e e V e r t i c e s [ i ][ j ][0][0] = j ; u n iq u e ne s s Tr e e Wi d t h [ i ][ j ][0] = 1; int u niqueV ertexC ount = 1; while ( uniqu eVerte xCount > 0 && u n i q u e n e s s T r e e H e i g h t [ i ][ j ] < ( vertexCount [ i ] - 1) ) { u n i q u e n e s s T r e e H e i g h t [ i ][ j ] += 1; uniq ueVert exCoun t = 0; for ( int k = 0; k < u n iq u e ne s s Tr e e Wi d t h [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ] - 1]; k ++) { boolean vertexUnique = true ; for ( int l = 0; l < u n iq u e ne s s Tr e e Wi d t h [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ] - 1]; l ++) { if ( k != l && u n i q u e n e s s T r e e V e r t i c e s [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ] - 1][ k ] == u n i q u e n e s s T r e e V e r t i c e s [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ] 1][ l ]) { vertexUnique = false ; } } if ( vertexUnique ) { uni queVer texCou nt += 1; 17 for ( int l = 0; l < vertexDegree [ i ][ u n i q u e n e s s T r e e V e r t i c e s [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ] - 1][ k ]]; l ++) { u n i q u e n e s s T r e e V e r t i c e s [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ]][ u n iq u e ne s s Tr e e Wi d t h [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ]]] = vertexAdjacency [ i ][ u n i q u e n e s s T r e e V e r t i c e s [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ] - 1][ k ]][ l ]; u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ] - 1][ k ] += 1; u n iq u e ne s s Tr e e Wi d t h [ i ][ j ][ u n i q u e n e s s T r e e H e i g h t [ i ][ j ]] += 1; } } } } } } } public static boolean c om pu te Is om or ph is m () { for ( int i = 0; i < 2; i ++) { for ( int j = 0; j < vertexCount [ i ]; j ++) { for ( int k = 0; k < u n i q u e n e s s T r e e H e i g h t [ i ][ j ]; k ++) { for ( int l = 0; l < u n iq u e ne s s Tr e e Wi d t h [ i ][ j ][ k ]; l ++) { u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t O c c u r r e n c e [ i ][ j ][ k ][ u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t [ i ][ j ][ k ][ l ]] += 1; } } } } for ( int i = 0; i < vertexCount [0]; i ++) { for ( int j = 0; j < vertexCount [1]; j ++) { if (! vertexMapped [0][ i ] && ! vertexMapped [1][ j ]) { boolean ve rt ice sE qu iv al en t = true ; if ( u n i q u e n e s s T r e e H e i g h t [0][ i ] != u n i q u e n e s s T r e e H e i g h t [1][ j ]) { v ert ic es Eq ui va le nt = false ; } for ( int k = 0; k < u n i q u e n e s s T r e e H e i g h t [0][ i ]; k ++) { if ( un i q u en e s sT r e eW i d th [0][ i ][ k ] != u ni q u en e s sT r e eW i d th [1][ j ][ k ]) { v ert ic es Eq ui va le nt = false ; } for ( int l = 0; l < vertexCount [0]; l ++) { if ( u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t O c c u r r e n c e [0][ i ][ k ][ l ] != u n i q u e n e s s T r e e V e r t e x C h i l d C o u n t O c c u r r e n c e [1][ j ][ k ][ l ]) { v ert ic es Eq ui va le nt = false ; 18 } } } if ( v er ti ce sE qu iv al en t ) { vertexMapped [0][ i ] = true ; vertexMapped [1][ j ] = true ; } } } } boolean graphsIsomorphic = true ; for ( int i = 0; i < vertexCount [0]; i ++) { if (! vertexMapped [0][ i ]) { graphsIsomorphic = false ; } } return graphsIsomorphic ; } public static void main ( String [] args ) { int falseResults = 0; for ( int i = 1; i < 100; i ++) { System . out . println ( i ) ; long startTime = System . cu rrentT imeMil lis () ; for ( int j = 1; j < 100; j ++) { initialise ( i ) ; g e ne r a te R a nd o m Gr a p h ( i ) ; g e n e r a t e I s o m o r p h i c G r a p h () ; // g e n e r a t e N o n I s o m o r p h i c G r a p h () ; g e n e r a t e U n i q u e n e s s T r e e s () ; if (! c om pu te Is om or ph is m () ) { // if ( c om pu te Is om or ph is m () && i > 9) { falseResults += 1; System . out . println (" False result ! " + falseResults ) ; } } try { fileWriter = new FileWriter (" output . csv " , true ) ; bufferedWriter = new BufferedWriter ( fileWriter ) ; bufferedWriter . write ( Integer . toString ( i ) + " , " + Integer . toString (( int ) ( System . cu rrentT imeMil lis () - startTime ) ) ) ; bufferedWriter . newLine () ; bufferedWriter . close () ; 19 } catch ( IOException ex ) { System . out . println (" Error writing to output file .") ; } } } } 20
8cs.DS
Maximal PSL2 subgroups of exceptional groups of Lie type David A. Craven arXiv:1610.07469v1 [math.GR] 24 Oct 2016 December 19, 2017 Abstract In this article we study embeddings of PSL2 (q0 ) into exceptional groups G(q) for G = F4 , E6 , E7 , and q0 and q powers of the same prime p. With a few possible exceptions, we prove that there are no maximal subgroups with socle such a simple group inside an almost simple group with socle G(q), except for those that arise as fixed points of a maximal positive-dimensional subgroup of the corresponding algebraic group. In the few remaining cases we provide considerable information about a potential maximal subgroup. Contents 1 Introduction 2 2 Notation and preliminaries 5 3 Maximal subgroups 9 4 Unipotent and semisimple elements 14 4.1 Actions of unipotent elements . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 14 4.2 Blueprints and element orders . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 4.3 Blueprints inside A1 s . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 18 a 4.4 Traces for modules of PGL2 (p ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 19 4.5 The graph automorphism of F4 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 20 4.6 sl2 -subalgebras of L(G) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 5 Modules for SL2 (pa ) 5.1 25 a 25 a Modules for SL2 (2 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5.2 Modules for SL2 (3 ) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 29 5.3 Modules for SL2 (p) . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 5.4 a Modules for SL2 (p ) for p > 5 and a > 1 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35 6 Some PSL2 s inside E6 in characteristic 3 39 7 Proof of the theorems: strategy 41 1 8 F4 43 8.1 Characteristic 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 43 8.2 Characteristic 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 46 8.3 Characteristic at least 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 49 9 E6 51 9.1 Characteristic 2 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 9.2 Characteristic 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 9.3 Characteristic at least 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 52 10 E7 in characteristic 2 57 11 E7 in odd characteristic: PSL2 embedding 74 11.1 Characteristic 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 11.2 Characteristic at least 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 75 12 E7 in odd characteristic: SL2 embedding 82 12.1 Characteristic 3 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 82 12.2 Characteristic at least 5 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 86 A Actions of maximal positive-dimensional subgroups on minimal and adjoint modules 1 101 Introduction Classifying the maximal subgroups of a finite group is one of the most fundamental problems in the field of finite group theory. Michael Aschbacher and Len Scott [5] reduced the problem for all finite groups to understanding H 1 (G, M ) for all simple modules M for all finite simple groups G, and classifying all maximal subgroups of almost simple groups. This paper is a contribution towards the latter, ambitious goal. For alternating and classical groups there is in some sense no complete answer, since the dimensions of the classical groups (and degrees of the alternating groups) tend to infinity, although there is substantial work in this direction. However, for sporadic and exceptional groups there is a possibility of a complete answer being known. For sporadic groups, a complete answer is known for all groups but the Monster, and here we concentrate on exceptional groups of Lie type. There is a classification of maximal subgroups for exceptional groups G = G(q) for G not of type F4 , E6 , 2E6 , E7 and E8 already, and so we focus on these cases. What is known in the literature so far is summarized in Section 3, but broadly speaking, all maximal subgroups are known in these groups apart possibly from various almost simple maximal subgroups, and these are either a small list of simple groups that are not Lie type in defining characteristic, and if the potential maximal is Lie type in defining characteristic then what is left are groups of small rank and small field size, together with a large collection of possible subgroups PSL2 (pa ), the focus of this paper. We prove the following theorems, for any almost simple group of the appropriate type. Theorem 1.1 Let p be a prime, a > 1 be an integer, and let q be a power of p. Let G be an almost simple group with socle F4 (q), and suppose that H is an almost simple group with F ∗ (H) = PSL2 (pa ). If H is maximal in G then one of the following holds: 2 (i) pa = 9; (ii) pa = 13, H = PSL2 (13) and is a Serre embedding; (iii) q = pa , p > 13, F ∗ (H) = PSL2 (q), and H is the intersection of G with a maximal algebraic A1 subgroup of the algebraic group F4 . The definition of a Serre embedding is given formally in Definition 4.7, but informally it is a copy of PSL2 (h + 1) where h is the Coxeter number of G and this subgroup contains a regular unipotent element. (This subgroup is named after Serre as he constructed copies of PSL2 (h + 1) (if h + 1 is a prime) over all fields in [27].) In recent work of Tim Burness and Donna Testerman, this case has been solved, and proved to be a subcase of (iii) above, so pa = 9 is the only outstanding case. It seems difficult to remove the first possibility, although it might be possible using more advanced geometric techniques than employed here; of course no such maximal subgroup is known. In Section 8.2 we give more information about the case pa = 9, where we give the action of a potential maximal subgroup on the minimal module; such a subgroup does exist, but is contained inside a positive-dimensional subgroup, and representation-theoretic techniques do not seem able to prove uniqueness. Kay Magaard [24] proved Theorem 1.1 for p > 5 in his PhD thesis, with the extra condition that q = 13 in (ii). For E6 we have a complete theorem, as the Serre embedding can be shown to lie in F4 . Theorem 1.2 Let p be a prime, a > 1 be an integer, let q be a power of p, and let G be an almost simple group with socle either E6 (q) or 2E6 (q). There does not exist an almost simple maximal subgroup H of G with F ∗ (H) = PSL2 (pa ). Almost all of this theorem was obtained by Aschbacher [4] using geometric techniques, where only the case q = pa = 11 and H contains a semiregular unipotent element, from class E6 (a1 ), is left open; here we remove it using the Lie algebra structure of the adjoint module L(G). For E7 , here we again have some potential exceptions, but not the case pa = 9, which was completed in [9]. This time the difficult cases are the Serre embedding and pa = 7, 8, 25. Theorem 1.3 Let p be a prime, a > 1 be an integer and let q be a power of p. Let G be an almost simple group with socle E7 (q), and suppose that H is an almost simple subgroup with F ∗ (H) = PSL2 (pa ). If H is maximal in G then one of the following holds: (i) pa = 7, pa = 8 or pa = 25; (ii) pa = 19, H = PSL2 (pa ) and is a Serre embedding; (iii) q = pa , p > 17, F ∗ (H) = PSL2 (q), and H is the intersection of G with a maximal algebraic A1 subgroup of the algebraic group E7 . Again, Burness and Testerman have showed that (ii) is a subcase of (iii). In the case (i) where pa = 8, we can give the composition factors of H on the minimal module, and can give the precise module structure as well whenever 8 | q. For pa = 7, there are unresolved cases of potential copies of PSL2 (7) where the preimage of the subgroup in the simply connected version of E7 is both 2 × PSL2 (7) and SL2 (7). In both cases the module structures on the minimal module can be given precisely, but it seems difficult to progress 3 further using these techniques. In the case of pa = 25, this is a copy of SL2 (25) inside the simply connected version of E7 with centres coinciding, and we have complete information about the module structures on both the minimal and adjoint modules. If it exists then it is a maximal subgroup of E7 (q) for the smallest q into which the group embeds. We do not deal with maximal subgroups of E8 here, and only consider it for certain lemmas, which will be useful in a later treatment of this case. A rough estimate is that, with current techniques, attempting E8 here would result in many unresolved cases and double the length of this work. For exceptional groups other than E8 , the minimal module has dimension much smaller than the dimension of the group (as an algebraic group) and we can use representation theory to analyse this module. We can still do things with the Lie algebra for E8 , as we did in [9], The strategy for the proofs of these theorems is given in Section 7, and relies heavily on computer calculations in three ways: (i) The first is to compute the traces of semisimple elements of large order on various modules for exceptional groups. Tables of these traces are available for elements of small order, but we need them for very large orders, sometimes in the hundreds. For this we can use the program that Litterick produced in his PhD thesis [22], or construct the normalizer of a torus explicitly in Magma and take the conjugacy classes, then compute their eigenvalues. (Litterick has produced a much faster algorithm for computing traces of elements on fundamental modules, but we do not need this for our cases.) (ii) The second is to do large linear algebra problems. To find all sets of composition factors that could arise as the composition factors of the restriction of a G-module to a subgroup H involves checking many possible combinations against these large lists of possible sets of composition factors. This is done to reduce the possible module structures for the subgroup on the minimal and adjoint modules, and was also used in [22]. (iii) The third is to construct explicit modules for finite groups, and show that certain module structures cannot exist. This would be possible by hand, at least in some cases, but incredibly complicated and prone to mistakes. In each case, a clear recipe is given for how to reproduce the module we construct to ease verifiability. With these three uses of a computer in mind, the rest of the argument is done by hand, in Sections 8 to 12. The structure of this article is as follows: in the next section we give notation and some preliminary results. In Section 3 we give information about maximal subgroups of finite and algebraic exceptional groups, and in the following section we give lots of information about unipotent and semisimple elements of exceptional groups, together with information about sl2 -subalgebras of exceptional Lie algebras. Section 5 gives information about modules for SL2 (pa ), and the section after gives some constructions of PSL2 s inside E6 in characteristic 3. We then launch into the proof proper, with Section 7 giving an outline of the strategy of the proof, Sections 8 and 9 proving the results for F4 and E6 , and then the three sections after doing E7 in characteristic 2, and then E7 in odd characteristic, split into two sections according as the embedding into the simply connected group is 2 × PSL2 (pa ) and SL2 (pa ). The appendix gives some information about the composition factors of the reductive and parabolic maximal subgroups of F4 , E6 and E7 on the minimal and adjoint modules, information that is well known but given here for ease of reference. 4 2 Notation and preliminaries In this section we give the notation that we need, both for groups and for modules, and give a few preliminary results. Throughout this paper, G = G(k) will denote an exceptional finite group of Lie type defined over k, a field of characteristic p > 2. More specifically, let G be a simple, simply connected algebraic group of ¯ exceptional type, equipped with a Frobenius endomorphism σ and set G = Gσ . The precise types of G that ¯ we are interested in are those exceptional groups whose maximal subgroups are not yet known, i.e., F4 (q), E6 (q), 2E6 (q), E7 (q) and E8 (q), although we do not do much in the case of E8 (q), and often will exclude it from consideration. Notice that we consider the simply connected version of G, so E7 (k) possesses a centre when p is odd. We want the simply connected versions in order to work with the minimal module and the adjoint module simultaneously. Where this is particularly important we will remind the reader, for example when considering PSL2 (pa ) embedded in the simple group of type E7 , where in E7 (k) we can embed either SL2 (pa ) in E7 (k) with the centres coinciding or 2 × PSL2 (pa ) into E7 (k) with the centres coinciding, representing the two possible preimages of a copy of PSL2 (pa ) in the simple group. If G possesses a graph automorphism of order 2, denote this by τ ; we will remind the reader of this notation when we use it. We let Ḡ be an almost simple group with socle G/Z(G). The maximal subgroups M of Ḡ split into three categories: M ∩ G is a maximal subgroup of G, M ∩ G is not a maximal subgroup of G, and G 6 M . The third collection are easily computed, and the first can be deduced from a list of maximal subgroups of G. However, the second, called novelty maximal subgroups, cannot easily be seen from the maximal subgroups of G. They arise in the following manner: let H be a subgroup that is not maximal in a simple group X, but H is normalized by a group of outer automorphisms A of X while every proper subgroup of X properly containing H is not normalized by it. In this case, H.A is a maximal subgroup of X.A. However, it is of course very difficult to understand these if one is simply given a list of maximal subgroups of X, so we will prove more than simply that a given subgroup is not maximal in the simple group, but that it is contained in stabilizers of various subspaces of a given module, enough that we can see that it does not form a novelty maximal subgroup. The modules that we normally consider are the two smallest non-trivial ones. Write Vmin for one of the minimal modules for G, namely L(λ4 ) for F4 , either L(λ1 ) or L(λ6 ) for E6 and 2E6 , L(λ7 ) for E7 and not defined for E8 . We write L(G) for the Lie algebra or adjoint module, which is L(λ1 ), L(λ2 ), L(λ1 ) and L(λ1 ) respectively. If L(G) has a trivial composition factor so is not irreducible, which occurs in E7 in characteristic 2 and E6 in characteristic 3, let L(G)′ denote the other simple factor, and in other cases let L(G)′ = L(G). These two modules have the following dimensions: Group dim(Vmin ) dim(L(G)′ ) F4 26 − δp,3 52 E6 27 78 − δp,3 E7 56 133 − δp,2 E8 248 248 τ If G = F4 in characteristic 2, L(G) has factors Vmin and Vmin , where τ denotes the graph automorphism of G, so in this case we will not consider L(G) at all but these two modules. In all other cases, L(G)′ is irreducible. We now introduce some notation for modules. All modules will be finite dimensional and will normally 5 be defined over k, the field over which G is defined. If H is a group, let Irr(H) denote the set of irreducible modules over the field, which is always k unless otherwise stated. As usual write ‘⊕’ and ‘⊗’ for the direct sum and tensor product of two modules. Let Λi and S i denote the exterior and symmetric powers. We write M ↓H for the restriction of M to H, and write soci (M ) for the ith socle layer and radi (M ) for the ith radical layer of M . Write top(M ) for the top of M , i.e., M/ rad(M ), and cf(M ) for the composition factors of M as a multiset. Let H 1 (H, M ) denote the 1-cohomology group of M , and in general Ext1 (M, M ′ ) denote the group of extensions with submodule M ′ and quotient M . The projective cover of a module M will be denoted by P (M ). We will often have to talk about the structures of modules, as in their socle layers. If M is a module with socle A and second socle B then we can write B A for this structure; however, this is often too space-consuming when we have many socle layers, and so we also write B/A for this module. We also introduce the concepts of radical and residual. If I is a subset of Irr(H), then the I-radical of M is the largest submodule of M whose composition factors lie in I, and let I ′ = Irr(H) \ I. The I-residual of M is the smallest submodule whose quotient has composition factors in I. One lemma that we occasionally use, that can be quite powerful, relates the minimal and adjoint modules for exceptional groups. We place it here because there seems no more appropriate place. Lemma 2.1 Let G be one of F4 , E6 and E7 . (i) Let G = F4 . If p = 3 then L(G) is a submodule of Λ2 (Vmin ). If p > 5 then L(G) is a summand of Λ2 (Vmin ). ∗ ∗ (ii) Let G = E6 . If p = 2 then L(G) is a submodule of Vmin ⊗ Vmin . If p = 3 then the socle of Vmin ⊗ Vmin is 1-dimensional, and quotienting out by this, L(G)′ is a submodule. If p > 5 then L(G) is a summand ∗ of Vmin ⊗ Vmin . (iii) Let G = E7 . If p = 2 then the socle of Λ2 (Vmin ) is 1-dimensional, and quotienting out by this, L(G)′ is a submodule. If p = 3 then L(G) is a submodule of S 2 (Vmin ). If p > 5 then L(G) is a summand of S 2 (Vmin ). In many cases we want to prove that a module has a particular composition factor as a submodule or quotient, often the trivial module. Thus we need a method of proving that a particular composition factor is always a submodule or quotient in any module with those factors. This is the idea of pressure. Suppose that H is a finite group such that Op (H) = H, and such that for all simple modules M over a field k, H 1 (H, M ) = H 1 (H, M ∗ ). The pressure of a module V for H is the quantity X dim H 1 (H, M ) − δM,k . M∈cf(V ) Results on pressure have occurred in the literature before, with the most general being in [9]. Another generalization of this allows us to understand the situation of forcing a module from a collection M of simple modules to be a submodule of a given module V . If M is a collection of simple modules for a group 6 H, with Ext1 (M, M ′ ) = 0 for all M, M ′ ∈ M, and such that Ext1 (A, M ) = Ext1 (M, A) for all simple modules A and M with M ∈ M, then the M-pressure of a module V is the quantity X X Ext1 (M, M ′ ) − δM,M ′ . M ′ ∈cf(V ) M∈M The lemma from [9] directly generalizes to M-pressure, with the exact same proof, and we give it now. Lemma 2.2 Suppose that H is a finite group, and let M be a set of simple modules for H such that Ext1 (M, M ′ ) = 0 for all M, M ′ ∈ M, and Ext1 (M, A) = Ext1 (A, M ) for all M ∈ M and all simple modules A. Let V be a module for H of M-pressure n. (i) If n < 0 then Hom(M, V ) 6= 0 for some M ∈ M, i.e., V has a simple submodule isomorphic to some M ∈ M. If n = 0 then either Hom(M, V ) 6= 0 or Hom(V, M ) 6= 0, i.e., V has either a simple submodule or quotient isomorphic to some member of M. (ii) More generally, if a composition factor of V has M-pressure greater than n, then either Hom(M, V ) 6= 0 or Hom(V, M ) 6= 0 for some M ∈ M. (iii) If Hom(M, V ) = Hom(V, M ) = 0 for all M ∈ M, then any subquotient W of V has M-pressure between −n and n. The concept of pressure can be used to prove that either Vmin or L(G) possesses a trivial submodule or quotient when restricted to H. We therefore would like to know whether that is enough in some circumstances to conclude that H is contained within a σ-stable, positive-dimensional subgroup of G. Lemma 2.3 [[9, Lemma 1.4]] Let G = Gσ be one of F4 , E6 , 2E6 , E7 or E8 . Let H 6 Gσ , acting on a module ¯ V defined over k, where V is either Vmin or L(G)′ and k is the underlying field of G. If one of the following holds, then H is contained in a σ-stable, positive-dimensional subgroup of G: (i) H fixes a 1-space or hyperplane of Vmin or L(G); (ii) G = F4 , E6 , 2E6 or E7 , and H fixes a 2-space or a space of codimension 2 in Vmin ; (iii) G = E6 or 2E6 , and H fixes a 3-space or a 24-space of Vmin . In the next section we consider the set of maximal positive-dimensional subgroups, and this lemma will more or less translate across to the almost simple group Ḡ. We end with giving the line stabilizers for the minimal modules for the finite groups E6 (k) and E7 (k). These have appeared in the literature before, and we take these from [15, Lemmas 5.4 and 4.3]. Lemma 2.4 Let G = E6 (q). There are three orbits of lines of the action of G on Vmin , with line stabilizers as follows: (i) F4 (q) acting on Vmin as L(λ4 ) ⊕ L(0); (ii) a D5 -parabolic subgroup; q 16 D5 (q).(q − 1), acting uniserially as L(λ1 )/L(λ4 )/L(0). (iii) a subgroup q 16 .B4 (q).(q − 1) acting indecomposably as L(0), L(λ1 )/L(λ4 )/L(0). Lemma 2.5 Let G = E7 (q). There are five orbits of lines of the action of G on Vmin , with line stabilizers as follows: 7 (i) E6 (q).2 (the graph automorphism) acting semisimply with composition factors of dimensions 54, 1, 1; (ii) 2E6 (q).2 (the graph automorphism) acting semisimply with composition factors of dimensions 54, 1, 1; (iii) an E6 -parabolic subgroup q 27 .E6 (q).(q − 1) acting uniserially as L(0)/L(λ1 )/L(λ6 )/L(0); (iv) a subgroup q 1+32 .B5 (q).(q − 1) acting uniserially as L(0)/L(λ1 )/L(λ5 )/L(λ1 )/L(0); (v) a subgroup q 26 .F4 (q).(q − 1) acting indecomposably as L(0), L(0)/L(λ4 )/L(λ4 )/L(0), L(0). 8 3 Maximal subgroups This section summarizes what is known about the maximal subgroups of the finite groups G and Ḡ, and also the algebraic group G, about which complete information on positive-dimensional maximal subgroups ¯ is known. The maximal subgroups of positive dimension in G are given in [20], and given G we denote by X this ¯ ¯ collection; write X σ for the fixed-point sets Xσ for X ∈ X being σ-stable. Note that we also include in ¯ ¯ X σ the fixed points of G under a field, graph, or field-graph automorphism of prime order (so, for example, 2 E6 (p2 ) and E6 (p) inside E6 (p2 )). If Ḡ is almost simple rather than merely simple, the set X σ shall be taken to mean the normalizers in Ḡ of the elements of X σ for F ∗ (Ḡ). While the maximal subgroups of G are known, the maximal subgroups of G and Ḡ are of course not. We ¯ start with a broad characterization of the maximal subgroups of Ḡ, given in [7] and [17, Theorem 2]. Theorem 3.1 Let M be a maximal subgroup of Ḡ not containing F ∗ (Ḡ). One of the following holds: (i) M is a member of X σ ; (ii) M is the normalizer of an elementary abelian r-group for some r 6= p; (iii) M = (Alt(5) × Sym(6)) · 2 and G = E8 with p > 5; (iv) M is almost simple. The algebraic groups containing the subgroups in (i) are known and are the fixed points of those in [20]; the subgroups in (ii) are known and given in [8]; the subgroup (iii) was discovered by Borovik and is unique up to conjugacy. The potential subgroups in (iv) have been steadily reduced over the last two decades. We start with those almost simple groups that are not Lie type in defining characteristic. Here the list is fairly short and given in [19], but note that a fair number of these have been eliminated in a variety of papers, too numerous to list here, but we mention the papers [23] and [9] for all Lie type groups, and with F4 and E6 having almost all possibilities for M removed by Magaard and Aschbacher in [24] and [4] respectively. The author has also made progress on eliminating still more of this list and proving uniqueness of various maximal subgroups, with details appearing elsewhere. For M a group of Lie type in defining characteristic, define t(G) and v(G) to be the following integers: t(G2 ) = 12, t(F4 ) = 68, t(E6 ) = 124, t(E7 ) = 388, v(G2 ) = 4, v(F4 ) = 18, v(E6 ) = 18, v(E7 ) = 75, t(E8 ) = 1312. v(E8 ) = 1312. The rank of M is at most half the rank of G by [16] and [21]. Furthermore, for those groups we have the following possibilities by [18]: (i) M (q) has semisimple rank at most half that of G, q 6 9, and M (q) is not one of PSL2 (q), 2B2 (q) and 2 B2 (q); (ii) PSL3 (16) and PSU3 (16); (iii) PSL2 (q), 2B2 (q) and 2 G2 (q) for q 6 gcd(2, q − 1) · t(G). 9 The paper [10] allows us to replace t(G) by v(G) in (iii). For (ii), note that PSL3 (16) has elements of order 9, and PSU3 (16) has elements of order 255, so neither case can occur for G 6= E8 by [10, Theorem 1.1]. The author, Kay Magaard and Chris Parker have removed almost all of (i) for G 6= E8 in work in preparation, as well as the Suzuki and Ree groups from (iii), leaving just PSL2 (pa ), which we consider in this paper. We can therefore assume, from now on, that pa 6 gcd(2, p − 1) · v(G). We remind the reader at the start of each section the value of v(G). We wish to end this section with a result that states that if H is a copy of PSL2 (pa ) inside an exceptional group of Lie type (other than E8 ), then NḠ (H) is either an almost simple maximal subgroup or is inside a member of X σ . The rest of this paper will be spent proving that the latter case holds rather than the former, but for this section we will need to have some exceptions. One source of possible exceptions is that NḠ (H) is contained inside another maximal subgroup of Ḡ other than those in X σ , for example a copy of PSp6 (p), which contains PSL2 (p3 ). The statement of the next result, and the proofs of the next two results, use ideas, definitions and techniques that will be introduced throughout this paper, but logically the results should be in this section. As such, the author recommends that the reader does not read the proofs of these results until after they have read the next few sections. In order to reduce the list of exceptions that arise, we will remove some of the Lie type groups of medium rank appearing in (i) above. We start with a table giving the largest possible order of semisimple elements of various groups of Lie type. The group type appears on the left and the field size on the top. In each entry, there is a number which is the largest order of a semisimple element in the simple group, and if this is even we include the largest element of odd order in brackets, then for groups for which not all semisimple elements are real (type A only) we place after that the largest order of a real semisimple element. Group 2 3 4 5 7 8 9 PSL3 7, 3 13, 4 7, 5 31, 6 19, 8 73, 9 91, 10 PSL4 15, 5 20 (13), 10 85, 17 39, 13 200 (171), 50 585, 65 205, 41 PSU3 - 8 (7), 4 15, 5 8 (7), 6 48 (43), 8 21, 9 80 (73), 10 PSU4 9, 5 8 (7), 8 65, 17 63, 26 86 (75), 25 513, 65 365, 82 PSp4 5 5 17 13 25 65 41 PSp6 15 20 (13) 85 78 (63) 200 (171) 585 410 (365) PΩ7 15 20 (13) 85 78 (63) 200 (171) 585 410 (365) G2 7 13 21 31 57 73 91 (We omit PSU3 (2), which is not simple, and consider the derived subgroup when the group is not simple, i.e., PSp4 (2)′ and G2 (2)′ .) We now compare these numbers to v(G): for F4 if the first number is greater than 18 then the subgroup is a blueprint for Vmin ; for E6 if the number in brackets is greater than 75 or the second number is greater than 18 then the subgroup is a blueprint for Vmin ; for E7 the number in brackets needs to be greater than 75 for this. For example, subgroups isomorphic with G2 (9) and PSp6 (8) are always blueprints for Vmin when inside F4 , E6 and E7 , whereas PSU4 (7) is always a blueprint for Vmin for F4 and E6 , but not necessarily for E7 . We prove an intermediate proposition that will help in our stated goal of producing the result we mentioned about NḠ (H) being either almost simple or in a member of X σ when H is PSL2 (pa ). Proposition 3.2 Let G be one of F4 , E6 and E7 . 10 (i) For p = 5, 7, any copy of H = PSp4 (p) in G, or H = Sp4 (p) in G = E7 (k) with Z(H) = Z(G), is a blueprint for Vmin . (ii) For p = 5, 7, any copy of H = PSL4 (p) or PSU4 (p) in G, or H = 2 · PSL4 (p) or H = 2 · PSU4 (p) in G = E7 (k) with Z(H) = Z(G), is a blueprint for Vmin . (iii) Let p be an odd prime and a > 1. Any copy of H = PSp6 (pa ) in G, or H = Sp6 (pa ) in G = E7 (k) with Z(H) = Z(G), is a blueprint for Vmin . (iv) Let p be an odd prime and a > 1. Any copy of H = Ω7 (pa ) in G, or H = Spin7 (pa ) in G = E7 (k) with Z(H) = Z(G), is a blueprint for Vmin . Proof: We prove (i) and (ii) for p = 5 first. For the first part, we first compute the conspicuous set of composition factors for Vmin ↓H in the case of G = E7 . The simple modules of dimension at most 56 are 1, 5, 10, 13, 30, 351 , 352 and 55. The only conspicuous set of composition factors is 102 , 56 , 16 , and since these composition factors have no extensions with each other, Vmin ↓H is semisimple, thus a unipotent element u from the conjugacy class of H with the largest centralizer acts on Vmin as 32 , 216 , 118 , a generic class. This proves the result since generic classes are blueprints for Vmin . Of course, since the minimal modules for F4 and E7 are submodules of Vmin , the result holds for F4 and E6 as well. If H = Sp4 (5) 6 E7 (k) with centres coinciding, then the involutions in H act on faithful modules with trace 0, not allowed since the trace of an involution in E7 is ±8. This proves (i). As SL4 (5) and SU4 (5) contain Sp4 (5), and the centres of SL4 (5) and SU4 (5) contain the centre of Sp4 (5), we have that PSp4 (5) 6 PSL4 (5), PSU4 (5), and therefore (ii) holds as subgroups that contain blueprints are themselves blueprints. For p = 7 the exact same proof holds, except that the dimensions of the simple modules are now 1, 5, 10, 14, 25, 351 , 352 and 54. We now prove (iii). For pa 6= 3, 5, the largest semisimple element of odd order has order greater than 75, so these are already blueprints for Vmin . If H = PSp6 (3) then there are only three simple modules of dimension at most 56, with dimensions 1, 14 and 21. The traces of elements of orders 5 and 7 are enough to prove that H does not embed in G = E7 , and hence not in its subgroups. If H = Sp6 (3) then the appropriate simple modules have dimensions 6, 14 and 50, and traces of elements of order 5 are enough to prove that the only conspicuous set of composition factors for Vmin ↓H is 14, 67 . There are no extensions between composition factors, so this is semisimple, and the action of a unipotent element with largest centralizer in H is 212 , 132 , a generic class. We conclude that H is a blueprint for Vmin and therefore so is any subgroup containing H, as needed. For p = 5 all of the same statements hold except we only need traces of elements of order 3 to prove that PSp6 (5) does not embed, and for Sp6 (5) elements of orders 2 and 3 suffice. Finally, we consider (iv). Since the semisimple elements have the same orders in Ω7 (pa ) as PSp6 (pa ), we again need only consider pa = 3, 5. For pa = 3, the simple modules for H = Ω7 (3) of dimension at most 56 are 1, 7, 27 and 35. The traces of elements of orders 2 and 4 are enough to find the unique conspicuous set of composition factors, 212 , 72 . and since there are no extensions between these modules Vmin ↓H is semisimple. A unipotent element H with maximal centralizer size acts on this module with blocks 32 , 216 , 118 , which is generic by [13, Table 7], so that H is a blueprint for Vmin . In the other case of H = Spin7 (3), a non-central involution in H has trace 0 on all faithful modules, and so since an involution in E7 has trace ±8, we cannot get this case. 11 The exact same proof works for p = 5 except we use traces of elements of orders 2 and 3 to eliminate all but one set of composition factors. From this we can see that if H is a potential maximal subgroup, and we prove that H is contained inside a larger subgroup that is not G, then for almost all possibilities for H, either H must lie inside another almost simple group or it lies inside a member of X σ . This is made formal with the following proposition. Proposition 3.3 Let H = PSL2 (pa ), let G = G(k) be an exceptional group of Lie type in characteristic p other than E8 , and let Ḡ be an almost simple group with socle G. If H 6 G then one of the following holds: (i) NḠ (H) is contained in a member of X σ ; (ii) NḠ (H) is an almost simple maximal subgroup of Ḡ with socle H; (iii) one of the following holds: (a) G = G2 , pa = 4, 7; (b) G = F4 , pa = 4, 5, 7, 8, 9, 11; (c) G = E6 , pa = 4, 5, 7, 8, 9, 11, 16, 25 (for pa = 25, H 6 2F4 (2)′ ); (d) G = E7 , pa = 4, 5, 7, 8, 9, 11, 16, 25, 64 (for pa = 25, H 6 Ru). Proof: As we wrote above, the classification-so-far of maximal subgroups of G (not equal to E8 ) states that if M is a maximal subgroup then one of the following holds: (1) M is a member of X σ ; (2) M is an exotic local subgroup; (3) F ∗ (M ) is PSL2 (pa ) for pa 6 gcd(2, p − 1) · v(G); (4) F ∗ (M ) is 2B2 (pa ) for pa 6 32 or 2 G2 (pa ) for pa 6 27; (5) F ∗ (M ) is a simple group of Lie type in characteristic p, whose untwisted rank is at most half of that of G, and whose field of definition is at most 9; (6) F ∗ (M ) is a simple group not of Lie type in defining characteristic, and is one of the groups in [19, Section 10]. If we assume, in the proposition, that neither (i) nor (ii) holds, then there must be a maximal subgroup, M , containing H, and such that M arises in (2), (3), (4), (5) or (6). The Suzuki and small Ree groups cannot contain H and so we can exclude (4), and (3) is dealt with as we get (i). For (5) we have the restrictions imposed above, and from (6) we can exclude all alternating groups other than Alt(6) and Alt(7) by [9]. The exotic local subgroups for G 6= E8 have composition factors either cyclic groups, or SL3 (2) (G2 and above), SL3 (3) (F4 and above) and SL3 (5) (E6 and above); the first two are minimal simple groups anyway, and the third contains only SL2 (4), so we get pa = 4 for E6 , which is also contained in Alt(6), for example, so we can exclude (2). For G = G2 , the possible M that are not minimal simple are PSU3 (3) which contains PSL2 (7), J1 in characteristic 11, which contains PSL2 (11), and J2 in characteristic 2, which contains SL2 (4), which completes the proof for this case. (We exclude pa = 11 > 2 · v(G2 ).) 12 For F4 , Alt(6) contains PSL2 (5) = SL2 (4), and from Lie type in defining characteristic we can place PSL2 (pa ) inside another Lie type group in characteristic p, say PSL3 (pa ), for pa 6 9. All other possibilities for M cannot include PSL2 (pa ) for pa 6= 4, 5, 7, 8, 9, 11. For E6 and E7 , from (5) we get Sp4 (8), which contains SL2 (64) (but this fails v(E6 )), and Sp4 (4) which contains SL2 (16). From (6), note that PSL2 (25) lies inside 2F4 (2)′ and the sporadic group Ru. The former of these must act irreducibly on the minimal module for E6 , and with factors 272 , 12 on the minimal module for E7 , thus lies inside a E6 -parabolic and is indeed a blueprint for Vmin in this case (see the table in [23]). The latter only embeds in E7 , and as 28 ⊕ 28∗ . 13 4 Unipotent and semisimple elements This section collects together a variety of facts about unipotent and semisimple elements in groups of Lie type. We consider criteria for semisimple elements that are blueprints (see Definition 4.5 below), summarizing results of [10] and providing one more example of the calculations performed there. We then move on to considering modules for SL2 , and how the weight spaces of the module and the eigenvalues of elements of SL2 interact, with the aim of finding blueprint elements and subgroups of SL2 . 4.1 Actions of unipotent elements Let G be a simple algebraic group in characteristic p. The Bala–Carter–Pommerening labelling system for the unipotent classes, as used in a slightly modified form (to deal with interpolation of extra classes in certain bad characteristics) in our main reference [13] for unipotent classes of exceptional groups, gives us a way to discuss unipotent classes that is independent of the characteristic p of G. We may therefore compare the action of a unipotent class on a fixed simple module for different primes. As is well known, any matrix of order a power of a prime p defined over a field of characteristic p can be written in Jordan normal form, with the conjugacy class in the general linear group being determined by the sizes of the Jordan blocks. Thus, if u is a unipotent element of an algebraic group G then for every module for G of dimension n we can associate a partition of n, the sizes of the various Jordan blocks in the action of u on the module. We use the notation for this, and unipotent classes, from [13], which determines the Jordan block structure of the action of all unipotent classes of exceptional groups on the minimal and adjoint modules. The only cases we will need that are not covered in [13] are when the minimal or adjoint module is not simple, e.g., F4 in characteristic 3. The next lemma gives the actions of the unipotent classes on the 25-dimensional simple module, on the 26-dimensional module 25/1, which is the ‘minimal module’ for other characteristics, and on the 27-dimensional minimal module for E6 , which has structure 1/25/1. Lemma 4.1 Let u be a unipotent element in F4 (3n ). The Jordan blocks of the action of u on the 25dimensional minimal module, together with the extension 25/1 and the minimal module for E6 is one of those given in Table 4.1. Proof: The actions of the unipotent elements on the 26-dimensional module are given in [13, Table 3], and using a computer, a representative of each of the classes was constructed in F4 (3). The actions on the 25dimensional composition factors were then computed, and are as above. The classes on the 25/1 are exactly those in [13, Table 3], and the corresponding classes for E6 are in [13, Table 5]. Using a computer and constructing classes manually is the method by which we prove the next two lemmas, which we include for completeness. Lemma 4.2 Let u be a unipotent element in E6 (3n ). The Jordan blocks of the action of u on the 77dimensional Lie algebra module L(G)′ are obtained from the action on L(G) by removing a Jordan block of size 1, except in the cases listed in Table 4.2. Lemma 4.3 Let u be a unipotent element in E7 (2n ). The Jordan blocks of the action of u on the 132dimensional Lie algebra module L(G)′ are obtained from the action on L(G) by removing a Jordan block of size 1, for every unipotent class. 14 Class in F4 Action on 25 6 Action on 25/1 13 6 2 ,1 Action on 1/25/1 14 26 , 115 A1 2 ,1 Ã1 3, 28 , 16 3, 28 , 17 3, 28 , 18 A1 + Ã1 33 , 26 , 14 33 , 26 , 15 33 , 26 , 16 A2 36 , 17 36 , 18 36 , 19 A2 + Ã1 37 , 22 37 , 22 , 1 37 , 22 , 12 Ã2 and Ã2 + A1 38 , 1 38 , 2 39 B2 5, 44 , 14 C3 (a1 ) 2 5 , 4 , 3, 2 F4 (a3 ) C3 , F4 (a2 ) 5, 44 , 15 5 , 42 , 3, 22 , 12 53 , 33 , 1 53 , 33 , 12 53 , 33 , 13 73 , 14 73 , 15 73 , 16 9, 62 , 3, 1 9, 62 , 3, 2 9, 62 , 32 92 , 7 92 , 7, 1 92 , 7, 12 15, 9, 1 15, 9, 2 15, 9, 3 F4 (a1 ) F4 2 2 2 5, 44 , 16 5 , 4 , 3, 2 , 1 B3 2 2 2 Table 4.1: Actions of unipotent elements on Vmin and its extensions for F4 in characteristic 3 Class in E6 2A2 Action on L(G)′ 23 3 ,1 8 Action on L(G) 323 , 2, 17 324 , 22 , 1 324 , 23 93 , 82 , 64 , 32 , 14 93 , 82 , 64 , 32 , 2, 13 E6 (a3 ) 94 , 7, 64 , 33 , 1 94 , 7, 64 , 33 , 2 E6 (a1 ) 98 , 5 98 , 6 19, 152, 93 , 1 19, 152 , 93 , 2 2A2 + A1 A5 E6 Table 4.2: Actions of unipotent elements on L(G)′ and L(G) for E6 in characteristic 3, where one does not obtain the former from the latter by removing a trivial Jordan block 15 We can see from the tables in [13] that for every unipotent class there is a set of primes P such that, for any prime p 6∈ P the partition describing the Jordan block structure is the same. Definition 4.4 Let G be an algebraic group and let M be a highest weight module for G. Let u be a unipotent element of G. If the Jordan block structure of u on M is the same as for cofinitely many primes, then u is said to be generic on M . Thus, informally, the non-generic classes are those where the prime is in the set P described above, where the partition differs from the ‘usual’ one. The reason that generic unipotent classes are interesting is that we can find ‘nice’ A1 subgroups containing them, at least if the class has order p. To pin down the concept of ‘nice’, we introduce the following definition. Definition 4.5 Let G be an algebraic group and let M be a module for G. A subgroup H of G is a blueprint for M if there exists a positive-dimensional subgroup X of G such that X and H stabilize the same subspaces of M . An element x is a blueprint for M if hxi is. We may now state the lemma from [9] that defines ‘nice’. Lemma 4.6 ([9, Lemma 1.2]) Suppose that G = F4 , E6 , E7 , and if G = F4 then p is odd. If H is a finite ∗ subgroup of Ḡ and H contains a non-trivial unipotent element whose action on Vmin , Vmin ⊕ Vmin if G = E6 , ∗ or L(G) is generic, then u and therefore H are blueprints for Vmin , Vmin ⊕ Vmin , or L(G) respectively, and in particular H is contained in a member of X σ . Thus, if any subgroup H of an exceptional algebraic group G contains a unipotent element of order p that is generic for either the minimal or adjoint module, then H is contained inside an element of X and indeed X σ if H is inside G = Gσ . ¯ For large primes, we will often prove that H stabilizes a unique 3-dimensional submodule of L(G), which must be a subalgebra of the Lie algebra. If this 3-dimensional submodule of L(G) ↓H is a summand then we may apply Proposition 4.17, but if the 3-dimensional submodule is not a summand then we cannot easily prove that it is an sl2 , as it need not be simple. There is one case in particular where this occurs, which we refer to as a Serre embedding. These are embeddings of PSL2 (h + 1) into an algebraic group, where h is the Coxeter number of the group. Definition 4.7 Let G be an exceptional algebraic group with Coxeter number h, and let p = h + 1. A subgroup H = PSL2 (p) is a Serre embedding if the following conditions hold: (i) on L(G), H stabilizes a unique 3-dimensional subspace; (ii) H contains a regular unipotent element. In Section 4.6 we discuss subalgebras of L(G). 4.2 Blueprints and element orders Here we give a brief account of [10]; the result from it that we will use is the following theorem. Theorem 4.8 Let x be a semisimple element of the simply connected form of an exceptional group of Lie type G. If one of the following holds then x is a blueprint for Vmin : 16 (i) G = F4 and o(x) > 18; (ii) G = E6 , x is real, and o(x) > 18; (iii) G = E7 , o(x) is odd and greater than 75. Write v(G) for these bounds, so v(F4 ) = v(E6 ) = 18, v(E7 ) = 75. If Vmin extends to a module for Ḡ, i.e., if Ḡ doesn’t induce a graph automorphism on G, then the same statements hold for Ḡ, and so any subgroup of Ḡ containing an element of the appropriate order is a blueprint for Vmin . If Ḡ does induce τ a graph automorphism on Vmin then we need to consider either L(G) or Vmin ⊕ Vmin , where τ is a graph automorphism, and whether x is a blueprint on one of these modules. In [10] it is shown that for G = E6 and τ x real (so every semisimple element in SL2 (pa )), x is a blueprint for Vmin ⊕ Vmin whenever it is a blueprint for Vmin . For F4 in characteristic 2, [10] proves that there is no almost simple maximal subgroup with socle SL2 (2a ) for a > 5 in Ḡ even if Ḡ induces a graph automorphism on G, so this case has also been dealt with. We can push being a blueprint for the minimal module of F4 up into E6 and E7 . Lemma 4.9 Let G be E6 or E7 , and let x be a semisimple element of G that lies in F4 . If x is a blueprint for the minimal module for F4 , then x is a blueprint for the minimal modules of E6 and E7 , and also the ∗ module Vmin ⊕ Vmin for E6 . Proof: The restrictions of the modules in question to F4 are a sum of minimal modules and trivial modules. Since 1 is always an eigenvalue of any semisimple element of F4 on its minimal module, any element of F4 with the same eigenspaces on the minimal module for F4 as x also has the same eigenvalues on the three modules mentioned for E6 and E7 . This completes the proof. If G = E7 then v(G) = 75 is fairly large, and in certain circumstances we can bring this down. Here is one such circumstance. Proposition 4.10 Let G be the simply connected form of E7 , and let x be a semisimple element of G. If the 1-eigenspace of x on Vmin has dimension at least 6 then x lies inside a conjugate of either an F4 or A4 subgroup. If in addition o(x) > 30 then x is a blueprint for Vmin . Proof: Since the 1-eigenspace is positive dimensional, x fixes a line on Vmin and so lies inside E6 or B5 . If x lies inside E6 then it must fix a line on its minimal module again, and so lies inside F4 , as claimed, or D5 . However, D5 centralizes only a 4-space on Vmin , and so x fixes a line on either the natural or 16-dimensional spin module. If x fixes a line on the 10-dimensional module then x lies inside B4 6 F4 , and if x fixes a line on the 16-dimensional module then x lies inside A4 , as needed. Thus we may assume that x lies inside B5 , whence again it fixes a line on either the 11-dimensional natural module or the 32-dimensional spin module: the first puts x inside D5 and we are done, and the second puts x inside A4 again. Thus x lies inside either F4 or A4 . If x ∈ F4 and o(x) > 30 then x is a blueprint for Vmin since x is a blueprint for the minimal module for F4 by Lemma 4.9. On the other hand, if x ∈ A4 then one uses the proof of the results from [10], noting that the composition factors of A4 on Vmin are, up to multiplicity, 0000, 1000, 0100, 0010 and 0001. A computer program running the algorithm in [10] yields the answer 30. Suppose we want to find the eigenvalues on Vmin of semisimple elements of order 63 inside E7 , which we will need to do when considering SL2 (64). There are too many to construct them all and store them all effectively, but we can take an element x of order 21 and consider all 37 = 2187 preimages x̂ of x in a 17 torus. Since we have the eigenvalues of all elements of order 21, given a potential multiset of eigenvalues for an element x of order 63 in E7 , we take the eigenvalues of x3 , find all semisimple classes of elements of order 21 with those eigenvalues, then consider all preimages of representatives of each of those classes. The eigenvalues of x are valid for coming from E7 if and only if one of those elements of order 21 has a preimage with those values. This idea to get the eigenvalues of elements of large composite order will be called the preimage trick in the rest of this paper. Blueprints inside A1 s 4.3 We now prove that certain semisimple elements, and subgroups of the form SL2 (pa ) and PSL2 (pa ) of exceptional groups, are blueprints for a given module by examining the constituents of the restriction of the module to an A1 subgroup containing the element or subgroup. The first lemma deals with modules for the algebraic group SL2 , and when the eigenspaces of semisimple elements match the weight spaces. Lemma 4.11 Let M be a module for SL2 with composition factors highest weight modules L(λ1 ), . . . , L(λr ), arranged so that λi 6 λi+1 . Let T be a maximal torus of SL2 , and let x ∈ T be a semisimple element of order n. If λi < n/2 then the eigenvalues of x on M are the same as the weight spaces of T . In particular, x is a blueprint for M . Proof: Since all maximal tori are conjugate, we may assume that x is the matrix ! ζ 0 , 0 ζ −1 where ζ is a primitive nth root of 1. The eigenvalues of x on L(1) are ζ, ζ −1 , and the eigenvalues of x on L(λi ) are roots of unity ζ ±j for 0 6 j 6 λi . If λi < n/2 for all i then the eigenspaces of x are simply the weight spaces of the L(λi ), and so x and T stabilize the same subspaces of M , thus x is a blueprint for M . We will apply this lemma to A1 subgroups of algebraic groups. We often will end up with composition factors that do not precisely satisfy the hypotheses of this lemma though: if one composition factor has slightly larger highest weight, then although the eigenspaces do not correspond to weight spaces, with some weight spaces being merged, these all take place within one composition factor of the module, and so the finite subgroup A1 (q) of the A1 is still a blueprint for the module in question, even if the element of order n is not. Lemma 4.12 Let G be the simply connected form of an exceptional algebraic group of Lie type, and let X be a positive-dimensional subgroup of G of type A1 . Let x be a semisimple element of X of order n. Let V be a module for G. (i) If the composition factors of X on V are (n/2 − 1)-restricted then x and a maximal torus T containing x stabilize the same subspaces of V , so that x is a blueprint for V . (ii) Suppose that the highest weights of X on V are λ1 , . . . , λr , with λi 6 λi+1 , and let H = A1 (q) be a finite subgroup of X containing x. If λr−1 + λr < n then H and X stabilize the same subspaces of V , so that H is a blueprint for V . 18 Proof: The first part follows immediately from Lemma 4.11, so we concentrate on the second statement. Letting T be a maximal torus of X containing x, if λ and mu are two weights of T on V that are equal when taken modulo n (i.e., yield the same eigenvalue for the action of x), then λ and µ differ by a multiple of n. By assumption on the λi , since λ − µ > n, both λ and µ must be weights for the composition factor L(λr ), since if λ is a weight for one of the other L(λi ) then it lies between −λi and +λi , and cannot differ by n from any other weight for any other λj . Let W be any H-submodule of V . If W does not contain the factor L(λr ) then the eigenvectors of x on W all come from weight vectors for T , by the previous paragraph, and so T stabilizes W . If W contains L(λr ), then T also stabilizes W by taking duals, as T stabilizes the dual (V /W )∗ of V ∗ . Thus T stabilizes every H-submodule of V , and so hT, Hi = X and H stabilize the same subspaces of V , as claimed. 4.4 Traces for modules of PGL2 (pa ) Here we produce a specialized result about extending simple modules for PSL2 (pa ) to PGL2 (pa ), and the traces and eigenvalues of the elements on such an extension. There are two extensions of any simple module for PSL2 (pa ) to PGL2 (pa ). We will give a way of telling these apart if the dimension of the simple module is odd, which is all that we need in what follows. If L(i) is a simple module for PSL2 (pa ) of odd dimension, then of the two extensions of L(i) to PGL2 (pa ), for one all defining matrices have determinant 1 and for the other half have determinant −1: to see this, note that all elements in PSL2 (pa ) act with determinant 1, and the non-trivial 1-dimensional representation acts like −1 for elements outside of PSL2 (pa ), so a given extension and its product with this 1-dimensional representation give us the two cases. Write L(i)+ for the module for PGL2 (pa ) for which all matrices have determinant +1, and L(i)− for the other extension. This notation will be used in the proof of the next lemma. Lemma 4.13 Let p be an odd prime and a > 1 an integer. Let M be a simple module for H = PGL2 (pa ) with Brauer character φ, and let g be an element of order pa ± 1. Let t be an involution in PSL2 (pa ), and let h be the involution in hgi. (i) There are two conjugacy classes of involutions in G. If o(g) is twice an odd number then t and h are representatives of these two classes, and otherwise t and h are conjugate. (ii) If dim(M ) is even then φ(t) = φ(h) = 0. (iii) If dim(M ) is odd, then the dimensions of the +1-eigenspace and (−1)-eigenspace differ by 1. (iv) If dim(M ) is odd, then φ(t) = ±φ(h). If M has only one of ±1 as an eigenvalue, then φ(t) = φ(h) if and only if either t and h are conjugate, or g has eigenvalue 1 on M . Proof: (i) That H has two classes of involutions is well known, and one is a class of complements, the other is in PSL2 (pa ). Thus the second statement follows easily. (ii) We use Steinberg’s tensor product theorem, lifting all modules to GL2 (pa ): M has even dimension if and only if, as a tensor product, one of the factors has even dimension, and the Brauer character is 0 for a given element if and only if one of the factors has Brauer character 0 for the same element. Thus we need to check this for the symmetric powers of the natural module S i (M ′ ) for 0 6 i 6 p − 1, where it is trivial to see that the trace of an involution is 0 on even-dimensional modules and ±1 on modules of odd dimension. 19 (iii) Since dim(M ) is odd and M is self-dual, of course one of ±1 is an eigenvalue for the action of g. It is an easy exercise to compute the eigenvalues of g on the Steinberg module for PGL2 (pa ), and we see that these are all distinct if g has order pa + 1, and if g has order pa − 1 then ±1 appears twice and ∓1 appears once. For other modules, from the definition of the Steinberg module as a tensor product of twists of the fundamental module L(p − 1), and the fact that the eigenvalues of g on L(i) all appear in L(p − 1), we see that the eigenvalues of g on any simple module appear in the eigenvalues of g on the Steinberg. Thus the result holds since the sum of the dimensions of the (+1)- and (−1)-eigenspaces must be odd. (iv) Return to PGL2 (pa ), and suppose that t and h are not conjugate, so that g has twice odd order. As we saw above, for a fundamental module L(i)± for 0 6 i 6 p − 1 an even integer, the Brauer character values of L(i)+ on t and h have the same sign, and the Brauer character values of L(i)− on t and h have opposite signs. Notice that +1 is an eigenvalue of M if and only if there are an even number of minus-type modules in the tensor decomposition, and this happens if and only if φ(t) = φ(h), as needed. Using this, the following result is now clear. Corollary 4.14 Let p be an odd prime and a > 1 an integer. Let G be the simply connected form of E7 , and let H be a copy of SL2 (pa ) in G with Z(G) = Z(H). Suppose that g is an element of G such that o(g) = pa ± 1 is twice an odd number, and −1 is not an eigenvalue for the action of g on L(G). Then the group H̄ = hH, gi does not satisfy H̄/Z(H) = PGL2 (pa ). Proof: Suppose that H̄/Z(H) = PGL2 (pa ). Let t be an element of H that is an involution in H/Z(H), so o(t) = 4. The trace of t on L(G) is −7 or 25, depending on the class of t in G. The involution h in hgi has trace 5 on L(G), since it is an involution in G rather than G/Z(G). We now show that h and t must in fact have the same trace, a contradiction. By Lemma 4.13, any even-dimensional composition factors of L(G) ↓H yield trace 0 for both t and h, and they have the same trace on odd-dimensional composition factors since −1 is not an eigenvalue of g on L(G). Thus the trace of t and h on L(G) is the same, but this is a contradiction. 4.5 The graph automorphism of F4 In this short section we describe how semisimple elements of odd order in F4 react to the graph automorphism in characteristic 2. Since the graph automorphism τ does not fix the minimal module Vmin , and L(G) has τ composition factors Vmin and Vmin , we can see the effect of the graph automorphism on semisimple classes by taking the eigenvalues of an element on x on L(G) and removing those from Vmin . Since the graph automorphism squares to a field automorphism, however, it is slightly more complicated to understand those classes that are left invariant under an outer graph automorphism, since we need to check whether xτ = xi for some i, rather than whether the eigenvalues of x and xτ match. This is still not difficult using a computer, however; we give two special cases, where a conjugacy class is stable under the graph automorphism (up to powers) and where the classes have integral traces. Lemma 4.15 Let k be a field of characteristic 2. Let x be a semisimple element in G = F4 (k) such that xτ is conjugate to a power of x. If x has order at most 9, then a power of x has trace on Vmin given below. 20 o(x) Possible traces on Vmin 3 −1 5 7 1 4(ζ7 + ζ7−1 ) + 3(ζ72 + ζ7−2 ) + 5, −(ζ7 + ζ7−1 ) 2 − 3(ζ9 + ζ9−1 ) 9 Lemma 4.16 Let k be a field of characteristic 2. Let x be a semisimple element in G = F4 (k) such that the trace of both x and xτ is an integer, and x and xτ are not conjugate. If x has order at most 9, then the traces of x and xτ are as below, where we give x up to graph automorphism. o(x) Trace of x on Vmin Trace of xτ on Vmin 3 8 −1 5 None None 7 9 4.6 −2 5 3 −1 (x has trace −1) 3 2 (x has trace −1) sl2 -subalgebras of L(G) In this section we consider subalgebras of L(G), specifically sl2 -subalgebras. The stabilizers of sl2 -subalgebras will be shown to be positive dimensional, and so if a subgroup stabilizes such a subalgebra, it must be contained inside an element of X σ . To begin with, we give a proposition that gives us a criterion for a subgroup H to stabilize an sl2 subalgebra in the first place. This proposition is a restatement of results of Alexander Ryba from [25], particularly Lemma 10 from that paper. Proposition 4.17 Let V be a 3-dimensional subspace of L(G), and let H be a subgroup of G such that HZ(G)/Z(G) = PSL2 (pa ) for some p > 5. If V is H-stable and a complement for V is also H-stable (i.e., V is a summand of L(G) ↓H ) and HomH (V, L(G)) is 1-dimensional (i.e., there are no other submodules of L(G) ↓H isomorphic to V ) then V is a subalgebra of L(G) isomorphic to sl2 . Proof: Suppose that L(G) ↓H has a unique submodule isomorphic to V , and that this is a summand, so that the quotient L(G) ↓H /V has no quotient isomorphic to V ∗ ∼ = V . By [25, Lemma 6], we have that V possesses a non-singular trace form, and then we apply Block’s theorem [6] to see that V is a simple Lie algebra of type sl2 . In order to use this proposition, we need to know something about sl2 -subalgebras of the Lie algebras of exceptional groups. The following is a theorem of David Stewart and Adam Thomas [28], specialized to the case of G = E6 , E7 , for which we need it. Theorem 4.18 Let g = E6 and p > 7, or G = E7 , E8 and p > 11. The sl2 -subalgebras of L(G) are in one-to-one correspondence with the nilpotent orbits of L(G), with a bijection being realized by sending an sl2 -subalgebra to the nilpotent orbit of largest dimension intersecting it non-trivially. Along with the proof of this theorem, Stewart has representatives for the nilpotent orbits intersecting each of these sl2 s, in a GAP file. When the sl2 is in bijection with a nilpotent class not of order p, there are two nilpotent classes that intersect the sl2 , and for p > 5 and the sl2 not restricted we give the other class that intersects it for E6 , E7 and E8 in Tables 4.3, 4.4 and 4.5 respectively. All of these classes have order 21 Class p=5 p=7 D4 3A1 A5 A3 D5 (a1 ) A2 + A1 E6 (a3 ) A3 + A1 D5 A3 A3 + A1 E6 (a1 ) 2A2 + A1 A5 E6 A2 + 2A1 2A2 + A1 p = 11 A5 Table 4.3: Second nilpotent class intersecting an sl2 -subalgebra of L(E6 ) for p > 5 and not restricted p, and hence e and f lie in different nilpotent orbits of L(G) when the sl2 is not restricted. This yields the following corollary. Corollary 4.19 Let g = E6 and p > 7, or G = E7 , E8 and p > 11. Let H be a copy of PSL2 (p) in G/Z(G). If NḠ (H) stabilizes an sl2 -subalgebra h of L(G), then h is restricted and NḠ (H) is contained inside an element of X σ . Proof: If h is restricted then it is stabilized by a good A1 in the algebraic group (see [26]), and hH, A1 i is positive dimensional and stabilizes h, so we are done. Thus h is not restricted, and therefore e and f lie in different nilpotent classes of L(G). Since there is a unique conjugacy class of subgroups PSL2 (p) inside PSL2 , we see that because the standard PSL2 (p) inside PSL2 swaps e and f , H must swap the two nilpotent orbits of h, clearly contradicting the fact that they lie inside different orbits of L(G). Hence h is restricted, as needed. 22 Class p=5 D4 (3A1 )′ ′′ (A5 ) A3 D4 + A1 4A1 D5 (a1 ) A2 + A1 ′ p=7 (A5 ) A3 A5 + A1 (A3 + A1 )′ D5 (a1 ) + A1 A2 + 2A1 D6 (a2 ) D4 (a1 ) + A1 E6 (a3 ) (A3 + A1 )′ D5 A3 E7 (a5 ) A3 + A2 A6 A2 + 2A1 D5 + A1 (A3 + A1 )′ A3 + 2A1 D6 (a1 ) A3 + 2A1 D4 (a1 ) + A1 E7 (a4 ) D4 (a1 ) + A1 A3 + A2 D6 A3 A3 + 2A1 E6 (a1 ) 2A2 + A1 (A5 )′ E6 A2 + 2A1 p = 11 p = 13 p = 17 (A3 + A1 )′ 2A2 + A1 ′ E7 (a3 ) (A3 + A1 ) D4 (a1 ) + A1 E7 (a2 ) 2A2 + A1 A3 + 2A1 ′ (A5 )′ D6 (a2 ) E7 (a1 ) A2 + 2A1 (A5 ) D6 D6 (a1 ) E7 A4 + A2 A6 A5 + A1 D5 + A1 D6 Table 4.4: Second nilpotent class intersecting an sl2 -subalgebra of L(E7 ) for p > 5 and not restricted 23 Class p=5 D4 3A1 A5 A3 D4 + A2 A2 + 3A1 E6 (a3 ) A3 + A1 D5 A3 A5 + A1 A3 + A1 p=7 p = 11 p = 13 p = 17 p = 19 p = 23 p = 29 A3 + A1 D5 (a1 ) + A2 2A2 + A1 E6 (a3 ) + A1 A3 + 2A1 D5 + A1 A3 + A1 E8 (a7 ) A4 + A3 A6 + A1 A2 + 3A1 E6 (a1 ) 2A2 + A1 A5 D5 + A2 A3 + A2 A3 + A2 + A1 E6 A2 + 2A1 2A2 + A1 D7 (a2 ) 2A3 A4 + A1 A3 + 2A1 A5 A7 2A2 + A1 A5 E6 (a1 ) + A1 2A2 + 2A1 A5 + A1 E7 (a3 ) A3 + A1 D4 (a1 ) + A1 E8 (b6 ) D4 (a1 ) + A1 E7 (a5 ) D7 (a1 ) A3 + 2A1 A3 + A2 E6 + A1 A2 + 3A1 2A2 + 2A1 E8 (a6 ) 2A3 A4 + 2A1 D7 A2 + 3A1 A5 D5 + A1 E8 (b5 ) 2A2 + 2A1 D4 (a1 ) + A1 E7 (a5 ) A5 + A1 E7 (a1 ) A2 + 2A1 A5 D6 E8 (a5 ) 2A2 + A1 E6 (a3 ) + A1 E7 (a4 ) D6 (a1 ) E8 (b4 ) A2 + 3A1 A5 + A1 E7 (a3 ) E7 (a4 ) E8 (a4 ) A4 + A3 A5 D6 (a2 ) E7 (a3 ) E8 (a3 ) A4 + A2 + A1 A6 + A1 E6 (a3 ) + A1 D6 (a1 ) E7 (a3 ) E8 (a2 ) 2A3 A4 + A3 A5 + A1 D7 E7 (a1 ) E7 (a2 ) E8 (a1 ) 2A2 + 2A1 A4 + A2 + A1 D5 (a1 ) + A2 A7 D7 E7 E7 (a1 ) E8 A3 + A2 + A1 A3 + A2 + A1 A4 + A3 A6 + A1 A7 E6 + A1 D7 Table 4.5: Second nilpotent class intersecting an sl2 -subalgebra of L(E8 ) for p > 5 and not restricted. (Missing classes, D4 + A1 , D5 (a1 ), D5 (a1 ) + A1 , D6 (a2 ), E7 (a5 ), A6 , D6 (a1 ), E7 (a4 ), D6 , E7 (a2 ) and E7 , are exactly as in Table 4.4) 24 E7 Modules for SL2(pa ) 5 The purpose of this section is to describe everything we need to know about the simple modules and extensions between them for the groups SL2 (pa ) for p a prime and a > 1. 5.1 Modules for SL2 (2a ) We construct certain modules for H = SL2 (2a ) for some a 6 10, and prove that various configurations of module do not exist. (The reason we choose a 6 10 is so that these results may be used in work for E8 , for which v(E8 ) = t(E8 ) = 1312.) The main motivation for this is to get better bounds on the number of certain composition factors that are needed to prevent a particular simple module appearing in the socle of a given module M . The pressure, and more general M-pressure of Section 2 proves that if M does not fix a line, yet has a trivial composition factor, then it needs at least one more 2-dimensional composition factor than trivial factor. We can do better than this in some circumstances. We begin with some notation. Let u be an element of order 2 in H. By 21 we denote the natural module for H, and define 2i by the equation ⊗2 2i−1 = 1/2i /1, i.e., 2i is the twist under the field automorphism of 2i−1 . Given this, if I is a subset of {1, . . . , a}, of cardinality b, we define, 2bI = O 2i , i∈I for example, 41,2 = 21 ⊗ 22 ; the modules 2bI for all I ⊆ {1, . . . , a} furnish us with a complete set of irreducible modules for H, by Steinberg’s tensor product theorem. We first recall a result of Alperin [1], that determines Ext1 (A, B) for A, B simple modules for H. Lemma 5.1 Let A and B be simple H-modules, corresponding to the subsets I and J of {1, . . . , a}. The dimension of Ext1 (A, B) is always 0, unless (i) |I ∩ J| + 1 = |I ∪ J| < a, and (ii) if i ∈ I ∪ J and i − 1 ∈ / I ∩ J, then i − 1 ∈ / I ∪ J, and in this case the dimension is 1. In particular, if Ext1 (A, B) 6= 0 then the dimension of A is either half or double that of B. Given this, we know that if a module M has a trivial composition factor but does not fix a line, then it has at least two 2-dimensional composition factors, i.e., has positive pressure. If it has pressure 1, then we can say something about the module still. This is important for F4 and E6 because there are no involutions acting projectively there. We will generalize this result in the next lemma, but provide a full proof in this simple case for the benefit of the reader. Lemma 5.2 Let V be an H-module that has at least one trivial composition factor but no trivial submodules or quotients. If V has pressure 1 then an involution in H acts projectively on V if dim(V ) is even and with a single Jordan block of size 1 if dim(V ) is odd. Proof: Note that, since V has pressure 1, it cannot have 2i ⊕ 2j or 1⊕2 as a subquotient without fixing a line or hyperplane. We proceed by induction on dim(V ), starting with the even-dimensional case. We may 25 assume that soc(V ) = 2i for some i: firstly there are no composition factors of soc(V ) of dimension greater than 2 because the quotient by one would still satisfy the hypotheses of the lemma, and 2i ⊕ 2j cannot be in the socle by the note above. The module V / soc(V ) has pressure 0, so H must fix a line or hyperplane, but cannot fix a hyperplane by assumption, so V / soc(V ) has a trivial submodule, and it must be unique by the note at the start of the lemma. Quotient out by any possible factors of dimension at least 4 in the socle of V / soc(V ) to get a module W of pressure 0 and with soc(W ) = 1. (If there is a 2 in soc(W ) then we find a submodule of pressure 2, not allowed.) The socle of W/ soc(W ) must be 2j for some j, since 2j ⊕ 2l cannot be a subquotient and 1 only has extensions with simple modules of dimension 2. Now W/ soc2 (W ) is again pressure 0, so has a trivial submodule as it cannot have a trivial quotient, and we have constructed a submodule 1/2j /1 inside W . Letting U be the quotient of W by this submodule, we have removed 2i , 2j , 12 from V , and possibly some other modules, and so an involution acts projectively on U , but it also acts projectively on the kernel of the map W → U , namely 1/2j /1, and on the kernel of the map V → W since that has no trivial factors at all, so an involution acts projectively on all of V , as needed. For odd-dimensional modules, we now simply find any submodule W with a single trivial composition factor and such that it is a quotient of W . The module V /W must have even dimension and has no trivial submodule as otherwise V would have 1 ⊕ 1 as a subquotient. Also, W has pressure 0 since otherwise W with the 1 removed from the top has pressure 2, contradicting Lemma 2.2, and so V /W has pressure 1, thus an involution acts projectively on V /W and with a single 1 on W , as needed. We can generalize this result to modules of larger pressure. Lemma 5.3 Let V be an H-module that has at least one trivial composition factor but no trivial submodule or quotient. If V has pressure n then an involution in H acts on V with at most n Jordan blocks of size 1. Proof: As with the previous lemma, choose V to be a minimal counterexample to the lemma, so that the socle and top of V consist solely of 2-dimensional modules. Notice that, by choice of minimal counterexample, there cannot exist a submodule W such that W has no trivial quotients and V /W has no trivial submodules, since otherwise one of W and V /W would also be a counterexample. Let W be a minimal submodule with a trivial composition factor but no trivial quotient, and note that, since all simple modules with non-trivial 1-cohomology have dimension 1, W contains a single trivial composition factor. If W = V then V itself must have a single trivial composition factor, and so V has a single block of size 1, and the result holds since V must have pressure at least 1. Thus W < V . If V /W has no trivial submodule then we have a contradiction by the statements above, so soc(V /W ) has a trivial composition factor: let W2 denote the preimage of this trivial submodule of soc(V /W ) in V . We claim that W2 has a quotient 1/2/1. If this true then, since W2 has pressure at least 0 and u acts projectively, and V /W2 has no trivial submodules or quotients, there must be at most n Jordan blocks of size 1 in V , a contradiction. Lemma 5.4 Let a = 3. If M is an even-dimensional module with 2n > 0 trivial composition factors and no trivial submodule or quotient, then it has at least 3n composition factors of dimension 2. Proof: Note that if M = M1 ⊕ M2 with the Mi even-dimensional, then by induction M satisfies the conclusion of the lemma: thus M is either indecomposable or the sum of two odd-dimensional indecomposable modules. 26 The projective cover of 21 is 21 /1, 41,3/21 , 22 , 23 /1, 1, 42,3/21 , 22 , 23 /1, 41,3 /21 . Remove any 4-dimensional factors from the top and socle of M , so that M is a submodule of a sum of copies of projectives P (2i ). If M has seven socle layers then P (2i ) is a summand of M , so M = P (2i ) and we are done. Thus M has at most five socle layers. The number of 2s in the first and third socle layers must be at least as many as the number of 1s in the second layer, and there are at least as many 2s in the third and fifth socle layers as 1s in the fourth layer. We therefore must have that there are at least 3n 2-dimensional factors in M , as claimed. Our next result is the best result possible in this direction. Lemma 5.5 Let H = SL2 (2a ) for 3 6 a 6 10. The largest submodule of P (21 ) whose composition factors have dimension 1 or 2 has dimension 10, and structure 21 /1/22 , 2a /1/21, where 2a is a quotient of this module. Let M be a module for SL2 (2a ) for some a 6 10. Suppose that u acts on M with b Jordan blocks of size 1. If there are c > 0 trivial composition factors in M , but no trivial submodules or quotients, then M has at least 2b + 3(c − b)/2 composition factors of dimension 2. Proof: The first statement, of the structure of the largest submodule of P (21 ) with factors of dimension 1 and 2, is easily verified by computer in the range specified. Thus we concentrate on the second statement, which we prove by induction on dim(M ). By removing all submodules and quotients of simple modules of dimension at least 4, we may assume that M is a submodule of a sum of P (2i )s for various i. The largest submodule N of M with factors of dimension 1 and 2, firstly has no trivial submodules or quotients, and secondly is a submodule of sums of modules of the form in the first part of this lemma. Since u acts on the subquotient 1/2/1 with two blocks of size 2, if u has b′ Jordan blocks of size 1 on N and c′ trivial composition factors in total, then we see that modulo the third socle soc3 (N ) of N we must have exactly (c′ − b′ )/2 trivial composition factors; hence we have (c′ − b′ )/2 2-dimensionals in the fifth socle layer, and the socle and third socle layers have at least (c′ + b′ )/2 2-dimensional modules each, yielding 2b′ + 3(c′ − b′ )/2 2-dimensionals in total. The quotient M/N also has no trivial submodules or quotients, so we are done if the number of Jordan blocks of size 1 in the action of u on M/N is at least b − b′ , but this is clear. This completes the proof. Obviously this improves the result that the pressure must be positive, i.e., if there are c trivials then there must be at least (c + 1) 2-dimensionals; we easily see from the modules in the lemma above that this bound of (3c + b)/2 is best possible. Lemma 2.3 shows that, not only can we not fix a 1-space on either Vmin or L(G), but we cannot fix a 2-space on Vmin either for F4 , E6 and E7 . By Lemma 5.1 we see that 2s only have non-split extensions with 1 and 4s, so we would like a similar result to the previous one, counting the number of 4-dimensionals in a module M that has 2-dimensional composition factors but no 2-dimensional submodules or quotients. We start with the easier case, where there are no trivial composition factors in M at all. Notice that we can use M-pressure here as well, but we can do a bit better using the structure of modules for SL2 (2a ). (We do not need to consider a > 6 here as these lemmas are not of use for E8 .) 27 Lemma 5.6 Let H = SL2 (2a ) for 4 6 a 6 6. The largest submodule of P (4i,j ) whose composition factors have dimension 2 and 4 is as follows: for j = i ± 1, we have a 10-dimensional module 4i−1,i+1 /2i+1 /4i,i+1 ; for a = 4 we have a 28-dimensional module 41,3 , 41,3 /21 , 23 /41,4 , 42,3 /21 , 23 /41,3 ; for j = i ± 2 and a > 4 we have a 32-dimensional module 4i,i+2 , 4i,i+2 /2i , 2i+2 /4i+1,i+2 , 4i,i+3 , 4i−1,i+2 /2i , 2i+2 /4i,i+2 , with 4i−1,i+2 as a quotient. In all other cases, we have the module 4i,j , 4i,j /2i , 2j /4i,j−1 , 4i,j+1 , 4i+1,j , 4i−1,j /2i , 2j /4i,j , with 4i,j−1 and 4i−1,j as quotients. Consequently, if M is a module with no trivial composition factors, with c > 0 composition factors of dimension 2, and no 2-dimensional submodule or quotient, then M has at least c composition factors of dimension 4. Proof: The proof follows that of Lemma 5.5: we cannot produce a module 4/2, 2/4/2, 2/4 since the 4s in the middle of the modules above do not have extensions with both 2s by Lemma 5.1. Thus we have at least 4/2, 2/4, 4/2, 2/4, and so we need as many 4s as 2s. Of course, unlike in the case of Lemma 5.5, the 4i,j s are not all the same up to field automorphism, and so the largest constructible modules depend on which 4s and 2s we have. The next lemma brings together the previous two results, in the sense that we want to know how many 1s and 2s we can stack on top of a given simple module of dimension 4. This lemma gives that answer, and hence how many 4s one needs to hide all 1 and 2s inside the middle of the module. Lemma 5.7 Let H = SL2 (2a ) for some 2 6 a 6 6. The largest submodule of P (41,2 ) whose composition factors modulo the socle have dimensions 1 or 2 is 22 /1/23/1/22 /41,2 , and an involution acts projectively on this module. For a = 4 and a > 5 we have 22 , 24 /1/21 , 23 /41,3 , and 22 /1/21, 23 /41,3 respectively. For a > 6 and i = 4, 5 we have 1/21 , 2i /41,i . In particular, if M is a module for H with no trivial or 2-dimensional submodules or quotients, and it has 2n trivial composition factors for some n > 0, then it has n′ > n + 1 4-dimensional factors, and between 2n + 1 and 4n′ 2-dimensional composition factors. Proof: The facts about the largest submodule of P (4i,j ) can easily be checked with a computer. For the conclusion, we proceed by induction. By removing submodules and quotients of dimension 8 and above, we may assume that the socle and top of M consists entirely of 4-dimensional modules. 28 Let M1 = soc(M ) and M2 /M1 be the 4′ -radical of M/M1 , noting that M2 /M1 is the direct sum of its {1, 2}-radical and {1, 2, 4}′-radical. By the first part, if M2 has 2m trivial modules then M1 has at least m copies of 4-dimensional modules to suppose the 2m trivials, and from the structure above the number of 2-dimensionals is at most 4m. Applying induction to M/M2 , this proves there are at least n + 1 different 4-dimensional factors and at most 4n 2-dimensional factors; there are at least 2n + 1 2-dimensional factors since M must have positive pressure. 5.2 Modules for SL2 (3a ) In this section we describe the simple modules for H = SL2 (3a ) for a 6 7, describe various extensions between some of the simple modules, and prove the existence or non-existence of various indecomposable modules. Let L = SL2 (3) 6 H. The simple modules for L have dimension 1, 2 and 3, with only the 2 being faithful. Therefore, the modules for H are tensor products of modules of dimension 2 and 3, with a module of dimension 2m 3n being faithful if and only if m is odd. Writing 2i for the image of 2 under i iterations of the Frobenius map, and similarly for 3i , the simple modules for H can be labelled by 2m 3nr1 ,...,rm+n , where m, n > 0 are integers, {r1 , . . . , rm+n } ⊂ {1, . . . , a} with the ri distinct, with 2m 3nr1 ,...,rm+n     m m+n O O = 2 ri  ⊗  3 ri  . j=1 j=m+1 Hence for example 122,3,1 = 22 ⊗ 23 ⊗ 31 is a module for PSL2 (3a ) for any a > 3. We need to understand the restrictions of these simple modules to L, in order to understand which ones we can have in the restrictions of minimal modules for G = F4 , E6 , E7 . Lemma 5.8 Let H = PSL2 (3a ), a > 1, and let M be a simple module of dimension at most 56. The restriction of M to PSL2 (3) is as below. Module Restriction Composition factors of restriction 1 1 1 3 3 3 3⊕1 3, 1 4=2⊗2 ⊕ P (1) 32 , 13 12 = 2 ⊗ 2 ⊗ 3 3⊕3 ⊕ P (1) 33 , 13 16 = 2 ⊗ 2 ⊗ 2 ⊗ 2 3⊕4 ⊕ P (1) ⊕ 1 34 , 14 27 = 3 ⊗ 3 ⊗ 3 3⊕7 ⊕ P (1)2 37 , 16 48 = 2 ⊗ 2 ⊗ 2 ⊗ 2 ⊗ 3 3⊕12 ⊕ P (1)⊕4 312 , 112 9=3⊗3 3 ⊕2 We now move on to extensions. With the labelling above, we have the following easy lemma, which can be found for example in [3]. Lemma 5.9 For any a > 1, a simple module M has non-trivial 1-cohomology if and only if M = 4i,i+1 for some 1 6 i 6 a, and  1 a > 3, dim(Ext1 (1, 4i,i+1 )) = 2 a = 2. 29 We will need more detailed information about extensions between low-dimensional modules for H, and we summarize that which we need now. We restrict to the case when a 6= 2, because in this case things are slightly different, with that pesky 2-dimensional 1-cohomology group, and secondly because we describe the full projectives for this group after the lemma anyway. Lemma 5.10 Let H = PSL2 (3a ) for 3 6 a 6 6. The following extension groups have dimension 1, for all 1 6 i, j 6 a: (4i,i+1 , 1), (1, 4i,i+1 ), (3i , 4i−1,i ), (4i−1,i , 3i ), (4i,j , 4i±1,j ), (4i,j , 4i,j±1 ), If A and B are simple modules for H of dimension at most 9 then Ext1 (A, B) = 0 unless (A, B) is on the list above. We now consider certain modules. For a = 2, the structures of the projective indecomposable modules are as follows: 1 3i 4 4 4 4 1 1 31 32 1 1 1 31 32 1 33−i 4 4 4 4 4 4 1 1 31 32 1 3i 4 We see that if a module M has five socle layers then it has a projective summand. More generally, if M has trivial composition factors, then we can use these to prove that M must have more 4s than pressure arguments suggest. Lemma 5.11 Let H = PSL2 (9) and let M be a module for H. If M has no trivial submodules or quotients, and there are 2n − 1 or 2n trivial composition factors, then the number of 4-dimensional factors is at least 2n. Furthermore, the only submodules of P (4) consisting of 4s and 1s are submodules of a self-dual module 4/1, 1/4. In particular, there is no uniserial module of the form 4/1/4. Proof: Let M be a module for H. We may assume that M is indecomposable. If M is the 9-dimensional projective simple then the claim is true. If M has any 3-dimensional submodules or quotients then we may remove them without affecting the claim, and so we may assume that M is a submodule of copies of P (4). If M is projective then the result holds, so M is not projective, in which case it has at most four socle layers. Since the fourth socle layer consists solely of 1s and 3i s, M must actually have three socle layers. In particular, the trivials are all in the second socle layer, so if there are 2n − 1 or 2n of them, there must be at least n copies of the 4-dimensional module in the socle, and similarly in the top. This completes the proof of the first claim. The second is easy to see by a computer proof that 4/1, 1/4 is the largest such module. Since it is self-dual, we cannot construct a 4/1/4 inside it, yielding the second statement. Lemma 5.12 Let H = PSL2 (3a ) for some 2 6 a 6 7. There does not exist a uniserial module with socle layers 4a , 1 and 4b , where 4a and 4b are any of the simple modules of dimension 4. As a consequence, if a 6= 2 and M is a module with composition factors of dimension 42i−α , 1i for some i > 0 and α > 0, then M has a trivial submodule or quotient. 30 Proof: For the first part, the only modules with 1-cohomology are 4i,i+1 = 2i ⊗ 2i+1 , so we may assume that the socle of our uniserial module is 41,2 . To prove this we simply use a computer to compare Ext1 (4′ , 1/41,2 ) and Ext1 (4′ , 41,2 ), and note that they coincide for all 4-dimensional modules 4′ . For the second statement, we firstly use induction: quotienting out by the socle, which consists of n modules each of dimension 4, we get at most n trivial modules dropping into the socle, which we quotient out to get another module of the same form as in the lemma but with fewer trivial composition factors. Hence we may assume that we have removed all trivial modules in this process, i.e., that there are n modules of dimension 4 in the socle, and at most n modules of dimension 1 in the second socle layer. Since we need a 4-dimensional to lie above each trivial in the third socle layer, the bounds on composition factors means that our module has three socle layers, each with n composition factors, of dimensions 4, 1 and 4 respectively. We now simply quotient out by all but one factor in the socle: this drops all but one trivial into the socle since a 6= 2, which we also remove. The resulting module has a single trivial and so any more than two 4s must be summands, so we remove them as well, constructing a uniserial module of the form 4/1/4, a contradiction that completes the proof. We end with a small lemma, needed at one point in the text. Lemma 5.13 Let pa = 27. The projective cover of 41,2 is 41,2 1 32 42,3 41,3 122,3,1 1 31 33 42,3 41,3 41,2 41,2 41,2 9 1,3 121,3,2 1 1 32 32 42,3 42,3 41,3 41,3 41,2 121,2,3 122,3,1 122,3,1 1 31 33 42,3 41,3 41,2 41,2 41,2 91,3 121,3,2 1 32 42,3 41,3 122,3,1 41,2 Consequently, if V is a self-dual module of pressure 1 with at least five trivial composition factors then H fixes a line or hyperplane of V . Proof: The description of the projective is produced by a Magma calculation, and to see the consequence, since V has pressure 1 is cannot be the whole projective, hence we can remove all quotients that are trivial, 41,3 or 42,3 , but clearly the top two 1s can be taken off. 5.3 Modules for SL2 (p) Since H = SL2 (p) has a cyclic Sylow p-subgroup, there are only finitely many indecomposable modules for it over a field of characteristic p. In this section we describe how to construct all indecomposable modules for H in characteristic p, using the projective indecomposable modules as a starting point. The Green correspondence [2] shows that the number of indecomposable modules of dimension congruent to i modulo p for H is the same as that of the normalizer NH (P ) of a Sylow p-subgroup P of H, a soluble group of order p(p − 1) with a centre of order 2. However, for this group, it is easy to construct the indecomposable modules: the projective modules are of dimension p, and look like truncated polynomial rings k[X]/(X p − 1), hence uniserial. Every indecomposable module is a quotient of such a module, and as every simple module for NH (P ) is 1-dimensional, we see that there are exactly p − 1 indecomposable modules of dimension i for each 1 6 i 6 p, with half of these faithful modules for SL2 (p) and half modules for PSL2 (p). 31 In particular, we see that once we have constructed p(p − 1) non-projective, indecomposable modules for H then we must have found them all. Thus we start with the simple and projective modules for H: letting M = L(1) be the natural module for H, we construct all simple modules using symmetric powers L(i) = S i (M ) 0 6 i 6 p − 1, with L(i) being of dimension i + 1. As with the case of SL2 (2a ), we will normally write the single number i to refer to the simple module of dimension i, and so a module 3/5 for SL2 (7), for example, is an 8-dimensional module with 5-dimensional socle L(4) and 3-dimensional top L(2). The odd-dimensional simple modules are modules for PSL2 (p), and the even-dimensional ones are faithful modules for SL2 (p). Having defined the simple modules, we consider the projectives: the Steinberg module L(p − 1) of dimension p is already projective, and for each simple module i with 1 6 i 6 p − 1, the projective module P (i) has structure i/(p + 1 − i) , (p − 1 − i)/i, except when i = 1, in which case p + 1 − i would have dimension p, and we have 1/(p − 1)/1, and when i = p − 1, so p − 1 − i would have dimension 0, and we have (p − 1)/2/(p − 1). We represent these in diagrams, with lines linking two composition factors A and B if there is a non-split extension A/B as a subquotient of the module. For example, here are P (3) and P (5) for PSL2 (11). 3 5 7 9 5 7 3 5 Using these we construct indecomposable modules as follows: we have modules of the form i/(p + 1 − i) and i/(p − 1 − i), and also two modules of the form i/(p − 1 − i), (p + 1 − i) and (i + 2)/(p − 1 − i). These two indecomposables can be summed together, then quotiented by a diagonal submodule p − 1 − i to make a new module with four composition factors. It is easier to visualize using diagrams. In the example above, we can remove the socles of the two projectives to get modules 3/7, 9 and 5/5, 7, take their direct product, and then quotient out by a diagonal 7. 5 3 5 5 7 3 → ⊕ 7 9 5 7 9 This process certainly produces a module, with quotients both of our original summands, and so this module must be indecomposable. Note that if one tries to do this with say two copies of 3/7, 9 then the fact that Ext1 (3, 7) is 1-dimensional means that this module splits, so one needs the modules at the top (in this case 3 and 5) to be different. One can continue this process until one constructs an indecomposable module M with all (non-projective) simple modules appearing in the top and the socle of M exactly once. As an example, the diagrams of the two such modules for p = 11 (one for PSL2 (11), one for faithful modules for SL2 (11)) are as follows: 9 1 7 3 5 5 3 7 32 1 9 2 4 10 8 6 6 8 4 10 2 We can take subquotients of these modules and construct new indecomposable modules, and we claim that this constructs all non-projective, indecomposable modules for SL2 (p). Firstly, the non-simple indecomposable subquotients of the module M are in one-to-one correspondence with connected subdiagrams of the diagram with at least one edge, since one notes that no two distinct subdiagrams of the diagram above have the same first and second rows. In the case of simple modules, of course each appears twice. The number of connected subdiagrams of each diagram with at least one edge is (p − 1)(p − 2)/2 (i.e., we choose the start and end points), and add in the p − 1 simple modules (other than the Steinberg), and the p − 1 non-simple projective modules, to get (p − 1)(p − 2) + 2(p − 1) = p(p − 1). This is the number of indecomposable modules for the normalizer, and so we must have constructed all indecomposable modules for SL2 (p). It is clear from this ‘zigzag’ structure, that for any indecomposable module, the socle is a collection of modules, and if A and B lie in the socle so does any module with dimension between dim(A) and dim(B). We have proved the following proposition. Proposition 5.14 Let H = SL2 (p), and let M be an indecomposable module for H. (i) If M has one socle layer then M is simple, and there are p such modules, one of each dimension. (ii) If M has three socle layers then M = P (i) for some 1 6 i 6 p − 1. (iii) If M has two socle layers then the socle of M consists of modules of dimension i, i + 2, . . . , j (i 6 j), and the top consists of modules p − j + ǫ, p − j + ǫ + 2, . . . , p − i + δ, where ǫ, δ = ±1. There are (p − 1)(p − 2) such modules. The indecomposable modules for PSL2 (7) other than the Steinberg are below, ordered so that the modules in column i have dimension congruent to i modulo 7. 1 3, 5/3, 5 3 1, 3, 5/1, 3, 5 5 3/3 P (1) 3/5 1, 3/5 1, 3, 5/3, 5 3/3, 5 1, 3/3, 5 1/5 P (3) 5/3 5/1, 3 3, 5/1, 3, 5 3, 5/3 3, 5/1, 3 5/1 P (5) As another example, the indecomposable modules for PSL2 (5) are 1, 3, 1/3, 3/1, P (1), P (3), 3, 1/3, 3/1, 3, 3/3, 1, 3/1, 3. Since each of these modules M is in Green correspondence with an indecomposable module V of dimension at most p − 1, and Green correspondence means that the restriction of M to NH (P ) is a sum of V and projective modules, this means that a unipotent element u of order p in H acts on M with at most one Jordan block of size not equal to p (if M is projective then all blocks have size p, of course). Notice that the only indecomposable modules with no Jordan blocks of size p in the action of u are either simple or of dimension p − 1. The next lemma is an easy consequence of these facts. 33 Lemma 5.15 Let H = PSL2 (p), and let M be a module for H over a field of characteristic p. Let u ∈ H have order p. If ni denotes the number of Jordan blocks of size i in the action of u on M , then np > X n2i . 16i<(p−1)/2 Proof: The modules of dimension at most p are either simple, so u acts on then with a block of odd size, or are i/(p − 1 − i), so u acts with a single block of size p − 1. Therefore if there is a block of even size i < p − 1 then it must come from an indecomposable module of dimension greater than p, and so we get at least one block of size p, as needed. For G = E7 we also must consider H = SL2 (p) with Z(H) = Z(G). In this case we want a similar result to the above but for faithful modules. Lemma 5.16 Let H = SL2 (p), and let M be a module for H over a field of characteristic p on which the central involution z acts as the scalar −1. Let u ∈ H have order p. If ni denotes the number of Jordan blocks of size i in the action of u on M , then np > X n2i−1 . 16i<(p−1)/2 Proof: Similar to Lemma 5.15, and omitted. We often want to understand self-dual modules for H, since the minimal modules Vmin are self-dual for F4 and E7 , and the adjoint module L(G) is always self-dual. Using the statements above, if ni is odd, where again ni is the number of blocks of size i in the action of u, there must be a self-dual indecomposable summands of dimension congruent to i modulo p. The next lemma follows from Proposition 5.14 and classifies self-dual indecomposable modules for SL2 (p). From our zigzag diagrams above, it is clear which the self-dual modules are: choose the same simple module as the start and end points of the subdiagram. Lemma 5.17 Let H = SL2 (p), and let M be a self-dual indecomposable module for H. If M is not simple or projective, then M has socle (and top) consisting of pairwise non-isomorphic modules N1 , N2 , . . . , Nr , where dim(Ni ) − dim(Ni−1 ) = 2 and dim(N1 ) + dim(Nr ) = p ± 1. In particular, there are exactly p − 1 nonprojective, indecomposable self-dual modules for PSL2 (p), and exactly p − 1 non-projective, indecomposable and faithful self-dual modules for SL2 (p). Therefore, if p ≡ 1 mod 4, all non-projective indecomposable self-dual modules for PSL2 (p) have dimension congruent to an odd number modulo p, and all non-projective, indecomposable, faithful self-dual modules for SL2 (p) have dimension congruent to an even number modulo p. We can use this to get a better handle on which possible Jordan block structures a given unipotent element u can have, given it lies inside a copy of PSL2 (p) for p ≡ 1 mod 4. We split the result into two corollaries depending on whether one has modules for PSL2 (p) or SL2 (p). Corollary 5.18 Let H = PSL2 (p) with p ≡ 1 mod 4, and let M be a self-dual module for L. Let u be an element of order p in H. The action of u has an even number of blocks of a given even size i, and there are at least as many blocks of size p as there are blocks of size all even numbers less than p − 1. 34 Corollary 5.19 Let H = SL2 (p) with p ≡ 1 mod 4, and let M be a self-dual module for H on which the central involution z acts as the scalar −1. Let u be an element of order p in H. The action of u has an even number of blocks of a given odd size i, and there are at least as many blocks of size p as there are blocks of size all odd numbers less than p. We now turn to tensor products. By Steinberg’s tensor product theorem, simple modules for SL2 (pa ) are tensor products of Frobenius twists of p-restricted modules, i.e., L(i) for i 6 p − 1. These restrict to SL2 (p) as tensor products of simple modules, so it will come in handy to understand the tensor products of simple modules for SL2 (p). The next result gives the tensor product of any two simple modules for L, and will be of great use when computing the restriction of simple SL2 (pa )-modules to SL2 (p). Proposition 5.20 Let H = SL2 (p). If 0 6 µ 6 λ 6 p − 1 then L(λ) ⊗ L(µ) is given by one of the following: (i) If λ + µ < p then L(λ) ⊗ L(µ) = L(λ − µ) ⊕ L(λ − µ + 2) ⊕ · · · ⊕ L(λ + µ − 2) ⊕ L(λ + µ). (ii) If λ + µ > p and λ < p − 1 then L(λ) ⊗ L(µ) = L(λ − µ) ⊕ L(λ − µ + 2) ⊕ · · · ⊕ L(a)  P (λ + µ) ⊕ P (λ + µ − 2) ⊕ · · · ⊕ P (p + 1) ⊕ L(p − 1) µ even ⊕ P (λ + µ) ⊕ P (λ + µ − 2) ⊕ · · · ⊕ P (p) µ odd where a = 2p − (λ + µ + 4). (iii) L(p − 1) ⊗ L(p − 1) = P (1) ⊕ P (3) ⊕ · · · ⊕ P (p − 1). This result can be found, for example, in [12] and explicitly in [11, Lemma 3.1]. 5.4 Modules for SL2 (pa ) for p > 5 and a > 1 As with modules for SL2 (3a ) we need a notation system for the simple modules, and as in that section, we let 21 denote the natural module, i1 = S i−1 (21 ) for 2 6 i 6 p be the symmetric powers (the p-restricted modules) and let ij+1 denote the application of the Frobenius morphism to ij . We then write, for module of dimension n formed as the tensor product of m twisted fundamental modules, na1 ,...,am , in order of increasing dimension of factor; for example, the module 21 ⊗ 32 will be denoted 61,2 , and 31 ⊗ 32 ⊗ 23 will be denoted 183,1,2 . If the integer n has a unique decomposition as a product of exactly m integers greater than 1 such that the module would be for the correct group (i.e., PSL2 (pa ) or SL2 (pa )) then we simply write that, so that 61 and 61,2 for PSL2 (49) are unambiguous. Sometimes there are modules that could be either for SL2 or PSL2 , such as 121,2 for p > 7, which is either 21 ⊗ 62 or 31 ⊗ 42 , but context will tell us which. When there genuinely is ambiguity, for example, 181,2 when p > 11, as it could be 21 ⊗ 92 or 31 ⊗ 62 , we label them (1) (2) with subscripts 181,2 and 181,2 according to the lexicographic ordering on the partitions of 18, but in these rare cases we remind the reader which is which. We start with some restrictions of simple PSL2 (q)-modules to PSL2 (p). This is needed because we often understand the action of PSL2 (p) on the minimal or adjoint modules completely. We consider modules of dimension at most 56 to include the minimal modules of F4 , E6 and E7 . We use Proposition 5.20 to compute 35 the restrictions of modules for SL2 (pa ) to SL2 (p). Since v(E7 ) = 75 we only list restrictions for pa 6 150 and dimension up to 56. Lemma 5.21 Let H = PSL2 (5a ) for a = 2, 3, and let M be a simple module of dimension at most 56. The restriction of M to L = PSL2 (5) is as below. Module Restriction Composition factors of restriction 1 1 1 3 3 3 4=2⊗2 3⊕1 3, 1 5 5 5 8=2⊗4 5⊕3 5, 3 9=3⊗3 1⊕3⊕5 5, 3, 1 12 = 2 ⊗ 2 ⊗ 3 5 ⊕ 3⊕2 ⊕ 1 5, 32 , 1 15 = 3 ⊗ 5 5 ⊕ P (3) 5, 33 , 1 16 = 4 ⊗ 4 5 ⊕ P (3) ⊕ 1 5, 33 , 12 20 = 2 ⊗ 2 ⊗ 5 5⊕2 ⊕ P (3) 52 , 33 , 1 24 = 2 ⊗ 4 ⊗ 3 5⊕2 ⊕ P (3) ⊕ 3 ⊕ 1 52 , 34 , 12 25 = 5 ⊗ 5 5⊕2 ⊕ P (3) ⊕ P (1) 52 , 34 , 13 27 = 3 ⊗ 3 ⊗ 3 5⊕2 ⊕ P (3) ⊕ 3⊕2 ⊕ 1 52 , 35 , 12 40 = 2 ⊗ 4 ⊗ 5 5⊕3 ⊕ P (3)⊕2 ⊕ P (1) 53 , 37 , 14 5⊕4 ⊕ P (3)⊕2 ⊕ P (1) 54 , 37 , 14 45 = 3 ⊗ 3 ⊗ 5 48 = 4 ⊗ 4 ⊗ 3 5 ⊕3 ⊕2 ⊕ P (3) ⊕ P (1) ⊕ 3 54 , 38 , 14 Consequently, if V is a module for H of dimension at most 56 such that V ↓L has more trivial than 3dimensional composition factors, then H stabilizes a line on V . Proof: We prove the last statement: from the table above we see that only the trivial has more 1s than 3s in its restriction to L. Suppose that the composition factors of V ↓L are 5i , 3j , 1k , with k > j. If there are α trivial factors and β 8-dimensional factors in V , then α > k − (j − β) > β, so V has negative pressure and so H fixes a line on V , as needed. For PSL2 (25), we will need the eigenvalues of an element of order 12 on the simple modules, so we list them here. These are of course easy to compute. Lemma 5.22 Let H = PSL2 (25), and let x be a semisimple element of order 12 in H. Let ξ denote a primitive 12th root of unity. Choosing ξ so that x acts on the symmetric square of the natural module for SL2 (25) with eigenvalues ξ ±1 , the eigenvalues of x on the various simple modules for H are as follows. 36 Dimension Eigenvalues 1 1 3 1, (ξ, ξ 11 )/(ξ 5 , ξ 7 ) 4 (ξ 2 , ξ 10 ), (ξ 3 , ξ 9 ) 5 1, (ξ 2 , ξ 10 ), (ξ, ξ 11 )/(ξ 5 , ξ 7 ) 8 (ξ 2 , ξ 10 ), (ξ 3 , ξ 9 ), (ξ 4 , ξ 8 ), (ξ, ξ 11 )/(ξ 5 , ξ 7 ) 9 1, (−1)2 , (ξ, ξ 11 ), (ξ 4 , ξ 8 ), (ξ 5 , ξ 7 ) 15 1, (−1)2 , (ξ, ξ 11 ), (ξ 2 , ξ 10 ), (ξ 3 , ξ 9 ), (ξ 4 , ξ 8 ), (ξ 5 , ξ 7 ), (ξ, ξ 11 )/(ξ 5 , ξ 7 ) 16 (−1)2 , (ξ, ξ 11 ), (ξ 2 , ξ 10 ), (ξ 3 , ξ 9 )2 , (ξ 4 , ξ 8 )2 , (ξ 5 , ξ 7 ) 25 13 , (−1)2 , (ξ, ξ 11 )2 , (ξ 2 , ξ 10 )2 , (ξ 3 , ξ 9 )2 , (ξ 4 , ξ 8 )2 , (ξ 5 , ξ 7 )2 Here, (ξ, ξ 11 )/(ξ 5 , ξ 7 ) means either (ξ, ξ 11 ) or (ξ 5 , ξ 7 ), depending on the isomorphism type of the module. We now give the analogue of Lemma 5.21 for p = 7. Again, we only need go up to pa = 150, so just 49 in this case. Lemma 5.23 Let H = PSL2 (49), and let M be a simple module for H. The restriction of M to L = PSL2 (7) is as below. Module Restriction Composition factors of restriction 1 1 1 3 3 3 4=2⊗2 3⊕1 3, 1 5 5 5 7 7 7 8=2⊗4 5⊕3 5, 3 9=3⊗3 5⊕3⊕1 5, 3, 1 12 = 2 ⊗ 6 7⊕5 7, 5 15 = 3 ⊗ 5 7⊕5⊕3 7, 5, 3 16 = 4 ⊗ 4 7⊕5⊕3⊕1 7, 5, 3, 1 21 = 3 ⊗ 7 7 ⊕ P (5) 7, 52 , 3, 1 24 = 4 ⊗ 6 7 ⊕ P (5) ⊕ 3 7, 52 , 32 , 1 25 = 5 ⊗ 5 7⊕5 ⊕3⊕1 7, 52 , 32 , 12 35 = 5 ⊗ 7 7 ⊕ P (5) ⊕ P (3) 7, 53 , 34 , 1 36 = 6 ⊗ 6 7 ⊕ P (5) ⊕ P (3) ⊕ 1 7, 53 , 34 , 12 49 = 7 ⊗ 7 7⊕2 ⊕ P (5) ⊕ P (3) ⊕ P (1) 72 , 54 , 34 , 13 ⊕2 Having given restrictions of modules, we now need to understand Ext1 between simple modules. These were completely determined in [3], but the information is not so easy to extract, and so we give a few special cases that are necessary for us. Of particular interest is which modules have non-trivial 1-cohomology, since we will often want to prove that we stabilize a line. The next lemma gives this completely. Lemma 5.24 Let p be a prime, a > 1 be an integer, and let M be a simple module for H = SL2 (pa ) with non-trivial 1-cohomology. One of the following holds. (i) pa = 2, M is the trivial module, with dim(H 1 (H, M )) = 1. 37 (ii) p is odd and a = 1, dim(M ) = p − 2, with dim(H 1 (H, M )) = 1. (iii) pa = 9, dim(M ) = 4, with dim(H 1 (H, M )) = 2. (iv) pa 6= 9 with a > 2, M is up to application of a Frobenius map L(p − 2) ⊗ L(1)σ , where σ is the Frobenius twist (so that dim(M ) = 2(p − 1) and M = 2(p − 1)2,1 ), with dim(H 1 (H, M )) = 1. Just knowing that modules have 1-cohomology is not going to be enough information. We need more specific information about extensions between simple modules of low dimension, for p = 5, 7 and a > 1. The final two lemmas of this section furnish us with this information. Lemma 5.25 Let H = PSL2 (5a ) for a = 2, 3. The extensions between simple modules of dimension at most 8 are: (i) 1 with 8i,i−1 ; (ii) 3i with 4i,i+1 , 8i,i−1 ; (iii) 4i,i+1 with 3i , 8i+1,i−1 (the latter only for a = 3); (iv) 5i with nothing; (v) for a = 2, 8i,i+1 with 3i ; (vi) for a = 3, 8i,i+1 with 4i−1,i ; (vii) for a = 3, 8i,i−1 with 1, 3i . Lemma 5.26 Let H = PSL2 (49). The extensions between simple modules of dimension at most 9 are: (i) 1 with nothing; (ii) 3i with 8i+1,i ; (iii) 41,2 with 51 , 52 ; (iv) 5i with 41,2 ; (v) 7i with nothing; (vi) 8i,i+1 with 3i+1 , 91,2 ; (vii) 91,2 with 81,2 , 82,1 . 38 Some PSL2s inside E6 in characteristic 3 6 In this short section we lay the groundwork for studying copies of H = PSL2 (3a ) (for a > 2) inside Ĝ = F4 (k) by embedding Ĝ inside G = E6 (k), and attempting to construct many subgroups isomorphic to H inside members of X σ of G other than Ĝ. Notice that field automorphisms of Ĝ lift to field automorphisms of G, so we can embed an almost simple group with socle Ĝ into an almost simple group with socle G/Z(G). Let Ḡ denote such an almost simple group, and note that Vmin is Ḡ-stable. Suppose that NḠ (H) is contained inside both a σ-stable member X of X and inside Ĝ. The dimensions of G and Ĝ are 78 and 52 respectively, so if X has dimension greater than 26, then X ∩ Ĝ is positive dimensional (and of course still σ-stable), so that NḠ (H) lies inside a σ-stable, positive-dimensional subgroup of Ḡ, as desired. Since the Borel subgroup of G has dimension 42, if NḠ (H) is contained in any parabolic subgroup of G then we are done. This also works if NḠ (H) is contained inside a conjugate of Ĝ, inside C4 – which has dimension 36 – and A1 A5 – which has dimension 38. We are left with the irreducible G2 , the A2 G2 subgroup, and the A2 A2 A2 maximal-rank subgroup. In these cases we will show that H is a blueprint for Vmin . If H is contained in X = G2 (k) then H acts on the natural module (up to Frobenius) as either 3⊕2 1 ⊕ 1, or lies in a diagonal subgroup of A1 Ã1 acting as 41,i ⊕ 31 for any i > 1. In both cases H is contained in an algebraic A1 subgroup Y . The subgroup X acts irreducibly as L(20) on Vmin , and these two copies of H act on Vmin as ⊕3 3⊕3 , 1 ⊕ (1/41,2 /1) 91,i ⊕ 1/41,2 /1 ⊕ 41,i /(22 ⊗ 2i )/41,i , where of course 22 ⊗ 2i is 42,i if i > 2 and 1 ⊕ 32 if i = 2. The subgroups Y containing them act in the same way, and stabilize the same subspaces as H, so that H is a blueprint for Vmin . If X = A2 G2 , then X acts on Vmin as (10⊗10)⊕(02⊗00): if H lies inside the G2 factor then it centralizes a 6-space on Vmin , so definitely lies inside a line stabilizer of F4 , and hence we may assume that H projects along the A2 factor as 31 . Along the G2 it can act as either 3⊕2 i ⊕ 1 or 4i,j ⊕ 3i , for any i, j > 1 with i 6= j. In the first case we get ⊕2 31 ⊕ 91,i ⊕ 1/41,2 /1 and ⊕3 3⊕3 , 1 ⊕ (1/41,2 /1) for i > 1 and i = 1 respectively, and in the second case we get 31 ⊕1/41,2/1⊕41,i/(22 ⊗2i )/41,i ⊕1/41,2/1, 91,i ⊕41,j /(22 ⊗2j )/41,j ⊕1/41,2/1, 91,i ⊕12i,j,1 ⊕1/41,2/1, for i = 1, j = 1 and i, j 6= 1 respectively. Again, in all cases, the algebraic subgroup containing H stabilizes the same subspaces as H, so again H is a blueprint for Vmin . Finally, we have X = A2 A2 A2 , which acts on Vmin as (up to duality) the sum of the three possible configurations of natural times natural times trivial. If we act trivially on one or two or them we get, up to twist, ⊕9 , 3⊕6 1 ⊕1 3⊕7 1 ⊕ 1/41,2 /1, ⊕3 91,i ⊕ 3⊕3 1 ⊕ 3i , according as one non-trivial, two non-trivial and the same, and two non-trivial and different. Thus we may assume that H acts along the first factor as 31 , the second as 3i and the third as 3j , then we have, up to twist, one of ⊕3 , 3⊕3 1 ⊕ (1/41,2 /1) 31 ⊕ 1/41,2 /1 ⊕ 9⊕2 1,j , 271,i,j , according as whether i = j = 1, i = 1 6= j, and 1 6= i 6= j 6= 1. As with the other cases, each of these is contained in an algebraic A1 stabilizing the same subspaces of Vmin , so again H is a blueprint for Vmin . 39 In particular, in all cases, either NḠ (H) is contained in a member of X σ or H is a blueprint for the Ḡ-stable module Vmin , in which case NḠ (H) is contained in a member of X σ again. We therefore have the following result. Proposition 6.1 Let H = PSL2 (3a ), and let Ḡ be an almost simple group with socle G = F4 (k). If H stabilizes a 3-space on the 25-dimensional minimal module for G, or the image of H in E6 centralizes a 2-space on the 27-dimensional minimal module for E6 , then NḠ (H) is contained in a member of X σ 40 7 Proof of the theorems: strategy In this section we discuss the techniques that we will use in proving that a given copy of PSL2 (pa ) is contained inside a member of X σ . We have two cases to consider: when k, the field for the ambient group G, is not a splitting field for H, and when k is. In the first case, we have to be more careful, as for example if 21 is a submodule of Vmin ↓H , H will not fix a 2-space over k, since 21 is not defined over k. Often we will deal with these small fields separately, so we can use more uniform arguments in general, but H fixes a line over k if and only if it does so over an extension field of k, so if that is what we prove we need no restriction on k. The first step is usually to use the dimensions of modules and the traces of semisimple elements to produce a list of potential sets of composition factors for the action of H on Vmin , which we call conspicuous sets of composition factors. For many groups this list is small, but as the sizes of G and H grow the number grows larger and we need more efficient methods that cut this number down, for example only considering possible multisets of dimensions that have either no modules of dimension 1 or more modules of dimension 2(p − 1) than modules of dimension 1, at least for pa odd and not equal to 9, i.e., modules of positive pressure. Having done this, we can assume we know the composition factors of Vmin ↓H , and we have a few ways to proceed. • We can use the traces of semisimple elements to deduce a list, often a list with one element, of potential sets of composition factors for L(G) ↓H . Sometimes this cannot exist, of course only if there is no embedding of H with these composition factors. Other times L(G) ↓H has non-positive pressure, so we are again done. Otherwise, we may analyse both Vmin ↓H and L(G) ↓H using the techniques below. We will occasionally employ Lemma 2.1 in this regard. • We can easily compute Ext1 between the composition factors of Vmin ↓H and determine if Vmin ↓H is semisimple or not. If it is, the action of a unipotent element u must match one of the unipotent classes of G, whose actions on Vmin and L(G) are tabulated in [13]. If it does not appear, or is generic, then we are done. • If V ↓H is not semisimple, and V is self-dual (i.e., all cases except when G = E6 and V = Vmin ) then in order for a composition factor to appear in the socle and not be a summand, it must occur with multiplicity at least 2. This allows us to cut down the possibilities for the socle of V ↓H . • If the socle of V ↓H is W , then V is a submodule of P (W ), where P (W ) denotes the projective cover of W . In particular, it is a submodule of the cf(V )-radical of P (W ), where we recall that cf(V ) is the set of composition factors of V . This needs to contain at least as many copies of each composition factor as there are in V , and further analysis of this radical can eliminate more cases. • We can use Lemma 4.12: suppose that H = PSL2 (pa ) embeds in G, and an algebraic A1 -subgroup X embeds in the algebraic version of G, such that for some module V , the highest weights of the composition factors of both H and X on V are the same. Assume furthermore that the composition factors of V ↓X satisfy the hypotheses of Lemma 4.12. We wish to conclude that H is a blueprint for Vmin . In order to do this, an element x in H of order (pa ± 1)/2 must be guaranteed to come from a class intersecting X. If the semisimple class containing x is determined by its eigenvalues on V then this is true, but this is not true for every semisimple class, so we will have to check when we use the lemma. 41 • In a similar vein, we can look for elements of G that do not lie in H and yet stabilize some eigenspaces of an element of H on a module V : if ζ1 , . . . , ζr are roots of unity and y acts as a scalar on each ζi -eigenspace of an element x ∈ H (i.e., preserves all subspaces of the eigenspace), then y stabilizes any subspace of V on which x acts with eigenvalues some of the ζi . In particular, if there is a submodule W of H with this property then hH, yi stabilizes W . Of course, it might be that hy, Hi is almost simple, say PGL2 (pa ) for example, so we need to exclude this case by finding other such elements, proving that the index of H in this group is not 2, or applying Corollary 4.14. • If G = E6 , E7 and p = h − 1 where h is the Coxeter number of G, then in one case we prove that H and NḠ (H) stabilize an sl2 -subalgebra of L(G). We can then apply Corollary 4.19 on positivedimensionality of such a stabilizer. Some combination of these ideas is usually enough to solve any case we will see here. 42 F4 8 In this section, k is a field of characteristic p > 2 and G = F4 (k). Let Ḡ be an almost simple group with socle G. From Section 4.2 we see that v(F4 ) = 18, so if H is any subgroup of G with a semisimple element of order at least 19, then H is a blueprint for Vmin . The same holds for Ḡ except possibly if p = 2 and Ḡ induces a graph involution on G. In [10] we proved that, when p = 2, SL2 (2a ) cannot be a maximal subgroup of Ḡ if a > 5 regardless of this potential problem with graph automorphisms. In addition, in [9] we proved that SL2 (4) cannot be a maximal subgroup of Ḡ either, so here we let H = PSL2 (pa ) with a = 3, 4 if p = 2 and pa 6 36 = 2 · v(F4 ) if p is odd. Let L = PSL2 (p) 6 H and let u denote a unipotent element of L of order p. 8.1 Characteristic 2 Let p = 2. Since all semisimple elements of G lie inside D4 , which centralizes a 2-space on Vmin , and an element of order 2a + 1 in H has a fixed point only on the trivial simple module, we see that Vmin ↓H has at least two trivial composition factors. In particular, Lemma 5.2 applies in this situation, and so the pressure of Vmin ↓H has to be at least 2 for H not to fix a line on Vmin . We start by eliminating the possibility that k is not a splitting field for H, or where the composition factors of Vmin ↓H are invariant under some outer automorphism of H, i.e., a field automorphism of H. Proposition 8.1 Suppose that p = 2 and a = 3, 4, and suppose that k does not contain a splitting field for H, or that the composition factors of Vmin ↓H are invariant under a field automorphism of H. Then either H or its image under the graph automorphism fixes a line on Vmin . Proof: Firstly let a = 3. The quickest way to do this is to use the traces of semisimple elements to see that the composition factors of Vmin ↓H must be 82 , (21 , 22 , 23 ), 14 , (41,2 , 41,3 , 42,3 ), (21 , 22 , 23 )2 , 12 , 83 , 12 . The trace of an element of order 7 on these modules is 5, −2 and 5 respectively, and the trace of an element of order 9 is 2, −1 and −1 respectively. Using Lemma 4.16, we therefore see that the first and second sets of composition factors are swapped by the graph automorphism and the third does not exist. The first has negative pressure, so fixes a line on Vmin , as needed. Now let a = 4. We assume that k contains F4 but not F16 , as this includes the case where k ∩ F16 = F2 . There are ten conspicuous sets of composition factors for Vmin ↓H , two of which are definable over F2 . They fall into three orbits under the graph automorphism (recall that the graph automorphism squares to a field automorphism), and well-chosen representatives of the three orbits are 41,3 , (21 , 23 )4 , 16 , (81,2,4 , 82,3,4 ), 41,3 , (21 , 23 ), 12 , 41,2 , 42,3 , 43,4 , 41,4 , 41,3 , 42,4 , 12 . The pressures of these modules are 2, 0 and −2 respectively, so the second and third definitely fix lines on Vmin . For the first, if 41,3 lies in the socle of Vmin ↓H then since Vmin is self-dual, it must be a summand, so we can assume that it is not; hence the socle consists of 21 s and 23 s, else H fixes a line on Vmin . The {1, 21 , 23 , 41,3 }-radical of P (21 ) is 1/21 , 23 /1, 41,3 /21 , so there must be at least three 2i in the socle of Vmin ↓H , but then soc(Vmin ↓H ) has pressure 3 but Vmin ↓H has pressure 2, contradicting Lemma 2.2. This completes the proof of the result. 43 We now turn to the case where k contains a splitting field for H. We split a = 3 and a = 4 into two propositions. Proposition 8.2 Suppose that p = 2 and a = 3, and that k contains a splitting field for H. If Vmin ↓H or its image under the graph automorphism does not fix a line on Vmin , then up to field automorphism of H the composition factors of Vmin ↓H are 421,3 , 241 , 22 , 223 , 14 , H stabilizes a 2-space on Vmin , and NḠ (H) = HCḠ (H) lies inside a member of X σ . Proof: We use the traces of semisimple elements of order at most 17 to find all conspicuous sets of composition factors for Vmin ↓H . There are sixty-three such sets, ten of which do not have corresponding sets of composition factors for L(G) ↓H . The rest fall into orbits of length 2, 3 and 6 under the graph and field automorphisms of G. (The orbit of length 2 arose in Proposition 8.1, as did one of the ten sets that do not yield corresponding composition factors on L(G).) Note that there are two orbits of length six that share three points, because there are rational elements of order 9 whose image under the graph automorphism is non-rational, so there are three options for their image. This does not affect things, as the points they share correspond to conspicuous sets of composition factors with non-positive pressure so fix lines on Vmin . Six of the ten orbits contain sets with pressure 0, and a further two contain sets of pressure 1, which are forbidden by Lemma 5.2. We are left with two orbits, one of length six and one of length three, with representatives 8, 41,3 , 42,3 , 221 , 22 , 23 , 12 , and 421,3 , 241 , 22 , 223 , 14 . Suppose that the first set of factors does not fix a line on Vmin : since the only non-trivial simple module appearing more than once is 21 , Vmin ↓H is the sum of an indecomposable module with socle 21 and a semisimple module, which we can ignore. We know that Vmin ↓H is self-dual, so if there is a non-split extension between two non-trivial simple modules A and B inside Vmin ↓H , we must also have one between B and A: i.e., A (or B) must be 21 , and so the other must be 41,3 by Lemma 5.1. In particular, 42,3 must be a summand of Vmin ↓H . The {1, 21 , 22 , 23 , 41,3 }-radical of P (21 ) has three trivial composition factors, but we remove all simple quotients other than 21 to obtain the smaller module 21 /1/21 , 22 /1, 41,3 /21 , on which an involution acts projectively. However, an involution cannot act projectively on Vmin (see [13, Table 3]) so H must fix a line on Vmin . We come to the final set of composition factors. There are modules with these composition factors that do not fix a line, for example ⊕2 41,3 ⊕ 21 /1/22/1/21 ⊕ 21 /1/23 ⊕ 23 /1/21, and this has an allowable action of an involution as well. We note that Vmin ↓H always has a 2-dimensional submodule, and so lies inside a member of X σ , and furthermore, since Vmin ↓H is not stable under the field automorphism of H, if H is normalized by any element of an almost simple group Ḡ with socle G then H is centralized by it. To see that H stabilizes a 2-space on Vmin , note that otherwise Vmin ↓H is a submodule of P (41,3 ), but P (41,3 ) has structure 41,3 /21 /1/22/1/21/41,3 , 44 and there are many reasons why this cannot work: the dimension is 16, 23 is not involved in it, there are not enough 1s or 21 s, the involution u acts projectively on it, and so on. There is a copy of SL2 (8) inside F4 that does indeed not fix a line on Vmin up to the graph automorphism, inside Ã2 A2 , with H projecting along the Ã2 factor as 21 /1 and along the A2 factor as 1/23: the product of these two modules is an indecomposable module 21 /1/23 /41,3 with dual 23 /1, 41,3/21 , and the product of 21 /1 and its dual is 21 /1/22/1/21 ⊕ 1, yielding an embedding into F4 with the required property (remember that the trivial in the last decomposition is removed when considering Vmin .) We now turn to a = 4, which ends this section on F4 in characteristic 2. Almost exactly the same result holds in this case. Proposition 8.3 Suppose that p = 2 and a = 4, and that k contains a splitting field for H. If Vmin ↓H or its image under the graph automorphism does not fix a line on Vmin , then up to field automorphism of H and graph automorphism of G the composition factors of Vmin ↓H are 421,3 , 241 , 22 , 223 , 14 , H stabilizes a 2-space on Vmin , and NḠ (H) = HCḠ (H) lies inside a member of X σ . Proof: We proceed as in Proposition 8.2, starting by assembling all conspicuous sets of composition factors using the traces of semisimple elements of order up to 17, this time finding 146 conspicuous sets of composition factors, 16 of which have no corresponding set of composition factors on L(G), falling into eighteen orbits, fifteen of length 8, two of length 4 and one of length 2. Eleven of these orbits contain a conspicuous set of composition factors with negative pressure, and a further two with factors with pressure 0. Using Lemma 5.2 we can exclude factors with pressure 1 as well, eliminating a further two orbits. There remain three orbits, each of length 8, so not stable under Out(H) or the graph automorphism of G. The three orbits have representatives 81,2,3 , 41,3 , 42,3 , 221 , 22 , 23 , 12 , 81,2,4 , 41,3 , 42,4 , 221 , 22 , 23 , 12 , 421,3 , 241 , 22 , 223 , 14 . For the first orbit we argue as in Proposition 8.2, to see that since the only non-trivial simple module appearing more than once is 21 , so Vmin ↓H is a sum of a semisimple module, which can be ignored, and a self-dual submodule of P (21 ) that has top 21 . The {1, 22, 23 , 41,3 , 42,3 , 81,2,3 }-radical of P (21 )/21 , lifted back to P (21 ), is 23 /1, 42,3 /22 , 23 /1, 41,3/21 , but on top of some submodule of this must go a 21 , and the module must be self-dual. We therefore see that we can remove all simple quotients other than 1 and 41,3 , as some submodule of this must be the second radical layer (as 1 ⊕ 41,3 is the second socle layer). Doing this yields the smaller module 1/22/1, 41,3 /21 , and an involution u acts projectively on this, a contradiction. 45 The second orbit is almost identical, and the exact same proof works with the same smaller submodule of P (21 ), and a slightly different original module of 1/22 , 23 /1, 41,3 /21 . For the third orbit, since we constructed an example of this embedding not fixing a line on Vmin inside the Ã2 A2 subgroup just after Proposition 8.2, we will not be able to prove that it fixes a line on Vmin . However, it does stabilize a 2-space, as for a = 3: the {1, 21 , 22 , 23 , 41,3 }-radical of P (41,3 ) is 22 /1/21, 23 /41,3 , so soc(Vmin ↓H ) cannot be just 41,3 , and H either fixes a line or a 2-space on Vmin , as needed. 8.2 Characteristic 3 In characteristic 3, since v(F4 ) = 18 we only need consider a = 2, 3. We begin with the case a = 3, since we have a complete result for that. In fact, we show that PSL2 (27) is always a blueprint for Vmin . Proposition 8.4 Suppose that p = 3 and a = 3. Then H is a blueprint for Vmin . Proof: There are forty conspicuous sets of composition factors for Vmin ↓H , but for only seven of these do the elements of order 13 come from semisimple classes that are not blueprints for Vmin , and only three up to field automorphism of H, which are 122,3,1 , 91,2 , 41,2 , 122,3,1 , 91,3 , 41,2 , 421,2 , 421,3 , 422,3 , 1. Let ζ denote a primitive 13th root of unity, and let θ denote a primitive 26th root of unity with θ2 = ζ. Let x ∈ H denote an element of order 13 that acts on 41,2 with eigenvalues ζ ±1 and ζ ±2 . In the first case, x acts on Vmin with eigenvalues 12 , (ζ ±1 )2 , (ζ ±2 )3 , (ζ ±3 )2 , (ζ ±4 )2 , ζ ±5 , (ζ ±6 )2 . There is an element x̂ of order 26 in G that squares to x and has eigenvalues 12 , (θ±1 )2 , (θ±2 )3 , (θ±3 )2 , (θ±4 )2 , θ±5 , θ±6 , (−θ±6 ). This does not stabilize all the eigenspaces of x, but it only splits the ζ ±6 -eigenspaces, which are contained inside the 12 factor. Hence x̂ stabilizes all subspaces stabilized by H and, since x̂ has order 26 > v(F4 ), this means that H is a blueprint for Vmin . In the second and third cases, the trace of x on Vmin is 0, and there is an element x̂ in G, of order 26, such that x̂2 = x and x̂ acts on Vmin with eigenvalues 1, (θ±1 )2 , (θ±2 )2 , (θ±3 )2 , (θ±4 )2 , θ±5 , (−θ±5 ), θ±6 , (−θ±6 ), so x̂ stabilizes any 41,2 in the socle of the second and third cases. This means that in the second case H is contained inside a positive-dimensional subgroup stabilizing the 4-space. Examining the list of maximal positive-dimensional subgroups of G, if H acts on Vmin with factors 12, 9, 4 then the only member of X σ in which H can lie is A1 C3 , which acts with factors of dimension 12 and 13, so any positive-dimensional subgroup containing H must also stabilize the 12; hence H is a blueprint for Vmin in this case as well. 46 We are left with the case of 421,2 , 421,3 , 422,3 , 1. We easily show that H lies inside a member of X , (although not necessarily X σ yet). If H fixes a line on Vmin then we are done, so the socle consists of 4s, so by relabelling we get 41,2 as a submodule of Vmin ↓H . But now the element x̂ above must stabilize any 41,2 in the socle of Vmin ↓H , and since x̂ is a blueprint for Vmin , there is an infinite subgroup of G stabilizing a 4-space that hH, x̂i stabilizes. Thus H is contained in an element of X , as claimed. We now run through the elements of X , proving in fact that H does fix a line and u lies in the generic class A2 , thus H is a blueprint for Vmin . We cannot embed H in a maximal parabolic or A2 Ã2 as the dimensions are not compatible. If H 6 B4 , which acts as 9 ⊕ 16, then by Lemma 5.12 H must act semisimply on the 9 (as the 9 is self-dual), so the action of u of order 3 has at least 36 , 13 on the 25-dimensional Vmin . Checking Table 4.1 we see that u belongs to class A2 , generic. If H embeds in X = A1 C3 then we may assume that H acts along A1 as 21 . Since (1, 100) is a summand of Vmin ↓X , we need 6-dimensional modules whose tensor product with 21 only have 4-dimensional composition ⊕2 factors, each appearing at most twice, and there are three of these: 2⊕2 2 ⊕ 23 , 22 ⊕ 23 , and 63,1 , but none of these has the correct exterior square, so H does not embed in A1 C3 . We are left with A1 G2 , which acts on Vmin with composition factors (2, 10) of dimension 21 and (4, 00) of dimension 4. This is impossible: H acts along the A1 factor as 31 , and so the action of H on the minimal module for G2 cannot have a trivial or 3-dimensional composition factor, because the product with 31 is not right. But then you cannot make a 7-dimensional module at all, a contradiction. Thus if H embeds into G with these factors on Vmin then it is a blueprint, as needed. We now consider a = 2, which we did not consider in [9] because we could not produce a complete answer there, and we cannot here either. We will make substantial progress, pinning down precisely the action of H on Vmin , but not enough to prove that it is always contained inside a positive-dimensional subgroup. Proposition 8.5 Suppose that p = 3 and a = 2. One of the following holds: (i) H fixes a line on Vmin or L(G); (ii) H stabilizes a unique 3-space on Vmin ; (iii) the action of H on the minimal module for E6 has two trivial submodules; (iv) up to field automorphism of H, the action of H on Vmin is 9 ⊕ 4/1, 31/4 ⊕ 4, where 4/1, 31/4 = 4 ⊗ 32 . If (i), (ii) or (iii) hold, then NḠ (H) is contained in a member of X σ . Proof: Using the traces of semisimple elements of orders 2, 4 and 5, one finds, up to field automorphism of H, eight conspicuous sets of composition factors, namely 361 , 17 , 43 , 331 , 14 , 9, 43 , 31 , 1, 44 , 31 , 32 , 13 , 4, 371 , 4, 361 , 32 , 9, 42 , 31 , 32 , 12 92 , 4, 31 . The first case is semisimple and u lies in the generic class A2 . The sixth and seventh have the trace of an involution being −7 on Vmin , whence it has trace 20 on L(G), so that L = PSL2 (3) acts with composition 47 factors 38 , 128 . By Lemma 5.8 any non-trivial simple module for H has at most two 3s for every three 1s on restriction to L, and so H always has at least sixteen trivial composition factors and at most eight non-trivial composition factors. Since H 1 (H, 4) has dimension 2 by Lemma 5.9, L(G) ↓H has non-positive pressure and hence has a trivial submodule. The second conspicuous set of composition factors must yield a trivial submodule on Vmin by Lemma 5.11. This leaves the third, fourth, fifth and eighth conspicuous sets of composition factors. Suppose that we show that H stabilizes a unique 3-space on Vmin . The same must be true of NḠ (H), and so if the stabilizer of that 3-space is positive-dimensional then NḠ (H) lies inside a member of X σ , and in particular it is not maximal. However, Proposition 6.1 shows that if H stabilizes a 3-space on Vmin then the stabilizer of that 3-space is positive dimensional, and so we are done whenever this is the case. In particular, the semisimple eighth case must yield a unique 3-space being stabilized. Also, if Vmin ↓H has no 1-cohomology then H stabilizes a line other than the F4 line, and Proposition 6.1 again states that NḠ (H) lies inside a member of X σ . If the composition factors are 9, 42 , 31 , 32 , 12 , and we fix neither a line nor a unique 3-space on Vmin , then the structure of Vmin ↓H is either 9 ⊕ 4/1, 1, 31, 32 /4 or 9 ⊕ 31 ⊕ 32 ⊕ 4/1, 1/4. We claim that, in either case, Vmin ↓H has no 1-cohomology. The second module is uniquely determined and so is an easy computer calculation. In the first case, the quotient by the unique 4 in the socle is also uniquely determined, and this module has no 1-cohomology; adding a 4 on the bottom that already has two trivial modules above it cannot add to the 1-cohomology, and so the claim holds. This proves, from the remarks above, that NḠ (H) lies inside a member of X σ . For 44 , 31 , 32 , 13 , we cannot have a single 3 in the socle of Vmin ↓H as we saw above. We cannot have two 3s in the socle, for then the module has 31 ⊕ 32 as a summand and 4, 4/1, 1, 1/4, 4, but since the self-dual module 4/1, 1/4 is the {1, 4}-radical of P (4), such a module cannot exist. Thus Vmin ↓H must have the form 4, 4/1, 1, 1, 31, 32 /4, 4. We now look at the image of H inside E6 , and its action on the 27-dimensional module V27 . If soc(V27 ↓H ) = 1 then, since P (1) has dimension 27, we have that P (1) = V27 ↓H . However, the action of u of order 3 on V27 is clearly now 39 , so acts on Vmin as 38 , 1, from Table 4.1. But if we remove the top and socle from P (1) we get a 25-dimensional module on which u acts as 37 , 22 , a contradiction. Thus there exists an H-submodule 1 ⊕ 4 of the minimal module for E6 . Notice that P (4) has dimension 36 and has five socle layers, and P (1) has five socle layers, so since neither of these is contained in the module V27 ↓H (where V27 is the minimal module for E6 ), we must have that V27 ↓H has at most four socle layers. In particular, since V27 is self-dual, we cannot have a uniserial module 3i /4/1 as a subquotient of V27 ↓H , since 1/4/3i would also have to be a subquotient, and there is a unique 3i in V27 ↓H , hence V27 ↓H needs at least five socle layers, not allowed. Consider the preimage W of soc2 (Vmin ↓H ) in V27 , and in particular the {1, 4}-radical of W . This is the preimage of a module 1, 1/4 ⊕ 1/4, and since 1, 1/4 has no extensions with 1, the {1, 4}-radical of W must be a module 1, 1/4 ⊕ 1/4/1 (the uniserial module 1/4/1 is not uniquely determined). We need to place both a 31 and a 32 on this module, but without constructing a uniserial 3i /4/1: this must yield a module 1, 1, 31, 32 /4 ⊕ 1/4/1, the only way to exclude the uniserial 3i /4/1. Since there is no uniserial module 4/1/4 by Lemma 5.12, no 4 48 placed on top of this module W can cover the 1, and so Vmin ↓H has a trivial quotient, not allowed. Thus (without loss of generality) 31 is diagonally placed across the 1, 1/4 and the 1/4/1. Since Ext1 ((1, 1/4), 31) = 0, at most one (and in fact exactly one) of the modules 1/4/1 can have an extension with 31 , and by replacing the summands by diagonal summands if necessary, we end up with a module 1, 1/4 ⊕ 1, 31 /4/1, and we have our uniserial 31 /4/1, not allowed. We therefore see that H cannot have non-trivial 1-cohomology, as needed for the proposition. The final case to consider is 9, 43 , 31 , 1. Again we cannot have the 31 in the socle, and not a trivial either, and so Vmin ↓H must be 9 ⊕ 4/1, 31/4 ⊕ 4. There is a unique self-dual module 4/1, 31/4, and it is 4 ⊗ 32 . To see that it is unique, notice that above 1, 1, 31 /4 one may place two copies of 4, one of which lies above 1, 1 only to make the module 4/1, 1/4, and so any diagonal 4 between this and the one above 4 ⊗ 32 must cover both 1s, so we cannot peel a 1 off as a quotient to make a different 4/1, 31/4. This proves (iv). We can give a bit more information about case (iv) now. The action of such an H on V27 is unique as well: although 4/1, 31/4 has non-trivial 1-cohomology, if the trivial does not lie only underneath the summand 4, there must be five socle layers to V27 ↓H , which as we saw in the previous case leads to a contradiction. This set of composition factors corresponds to 9, 44 , 351 , 332 , 13 on L(G), but even this does not help as H can act on L(G) without fixing a line. We cannot say much about the 3i s, so remove them from the top and bottom, as well as the 9, to leave a module W . With four 4s and three 1s we cannot have P (4) or P (1), so from their structure above W has (at most) three socle layers. The two unipotent classes that act on Vmin as 38 , 1 are Ã2 and Ã2 + A1 : the former acts on L(G) with seven blocks of size 1, and so we end up fixing a line, but the other acts as 316 , 22 , and need not. With two 4s in the socle of W , and three 1s above, we get as in the previous analysis 1, 1/4 ⊕ 1/4, on which we can place 3i s and then two 4s. We must place 31 or 32 on top of the 1/4 to avoid fixing a hyperplane, and then on top of the 1, 1/4 we need a 31 and a 32 , since we need both classes of elements of order 3 to act as 316 , 22 and modules of the form 4/1, 1/4 and 4/1, 1, 3i/4 do not allow this. However there is, unique up to isomorphism, a self-dual indecomposable module 4/1, 1, 31, 32 /4 on which both unipotent classes act with two blocks of size 2. Inside C3 A1 , there is a copy of H whose projections along each factor act irreducibly on the respective natural modules, and it acts on Vmin as stated, and on L(G) as 31⊕3 ⊕ 9 ⊕ 32 /4/1, 31/4/32 ⊕ 4/1, 1, 31, 32 /4. We cannot push the analysis far enough to get uniqueness of this subgroup: it certainly exists, as we have seen. 8.3 Characteristic at least 5 Let p > 5, and recall that H = PSL2 (pa ) for some a > 1, with pa 6 36 = 2 · v(F4 ), with u ∈ H of order p. The possible actions of u on Vmin are given in [13, Table 3]; by Lemma 4.6 we may assume that our unipotent class is not generic: this leaves us with the following three unipotent classes: (i) C3 , p = 7, acting as 72 , 62 ; 49 (ii) F4 (a2 ), p = 7, acting as 73 , 5; (iii) F4 , p = 13, acting as 132 . This proves the following result immediately. Proposition 8.6 If pa 6= 7, 13 then H is a blueprint for Vmin . For p = 7 we have the following result. Proposition 8.7 If pa = 7 then H fixes a line on either Vmin or L(G). Proof: We use the traces of elements of orders 2, 3 and 4 to produce the possible composition factors of Vmin ↓H , namely 36 , 18 , 5, 37 , 53 , 33 , 12 , 7, 53 , 3, 1, 73 , 15 . We saw in Section 5.3 that the only indecomposable module with the trivial composition factor but no trivial submodule or quotient is P (3) = 5/1, 3/5. This immediately tells us that the first, third and fifth cases fix lines on Vmin . (Indeed, the first and fifth cases have that all trivial factors are summands.) The case 7, 53 , 3, 1 yields traces of elements of orders 2, 3 and 4 of 2, −1 and −2 respectively. This yields traces on L(G) of −4 for an involution, −2 or 7 for an element of order 3, and finally 4 for an element of order 4. There is no set of composition factors that are compatible with this, so this case cannot occur. If the composition factors are 5, 37 , then the traces of the elements of orders 2 and 3 fix uniquely the composition factors on L(G), and these become 57 , 3, 114 , and so H fixes lines on L(G), completing the proof. For p = 13 we are left with one open possibility, which we will prove yields a Serre embedding (see Definition 4.7). Proposition 8.8 Suppose that pa = 13. Either H is a blueprint for Vmin , or u is a regular unipotent element and Vmin ↓H and L(G) ↓H are given by P (9) = 9/3, 5/9 and P (3) ⊕ P (11) = 3/9, 11/3 ⊕ 11/1, 3/11 respectively. In particular, H is a Serre embedding. Proof: From the list above, the regular class is the only non-generic one for p = 13, so if H is not a blueprint for Vmin then u is regular and in particular acts projectively on Vmin and L(G), hence both modules must restrict to H as projectives. The projective indecomposable modules for H are 1/11/1, 3/9, 11/3, 5/7, 9/5, 7/5, 7/7, 9/3, 5/9, 11/1, 3/11, 13. Thus there are eight possible projective modules of dimension 26, two of which yield conspicuous sets of composition factors on Vmin , namely P (5) and P (9). The first of these does not have corresponding factors on L(G), and the second has factors 113 , 9, 33 , 1, which yield the projective module P (3) ⊕ P (11), as claimed. We have therefore completed the proof of Theorem 1.1. 50 E6 9 In this section, k is a field of characteristic p > 2 and G = E6 (k), by which we mean the simply connected form, i.e., |Z(G)| = gcd(3, |k × |) (if k is finite) and G′ = G. Let Ḡ be an almost simple group with socle G/Z(G). From [10] we see that for real semisimple elements (and the semisimple elements of PSL2 (pa ) are real), v(E6 ) = 18, so if H is any subgroup of G with a real semisimple element of order at least 19, then H a blueprint for Vmin . The same holds for Ḡ, even when Ḡ involves the graph automorphism, by using ∗ Vmin ⊕ Vmin instead of Vmin , which is Ḡ-stable, and applying Lemma 4.9. In addition, in [9] we prove that almost simple groups with socles SL2 (4) and PSL2 (9) cannot be maximal subgroups of Ḡ either, so here we let H = PSL2 (pa ) with a = 3, 4 if p = 2 and pa 6 36 = 2·v(F4 ) with pa 6= 9 if p is odd. Let L = PSL2 (p) 6 H and let u denote a unipotent element of L of order p, as in Section 8. 9.1 Characteristic 2 Let p = 2. Unlike G = F4 the case of p = 2 is easy, since the graph automorphism, which could cause the only problem, simply induces duality. As we see above, we just have to deal with a = 3, 4, and when a = 3 the group Out(H) has order 3, hence a graph automorphism must centralize H (hence H is an element of X σ ), not merely normalize it. We therefore see that if H = SL2 (8) stabilizes a 2-space on Vmin then NḠ (H) lies inside a positive-dimensional subgroup, even if Ḡ induces a graph automorphism on G. For a = 4 we use the fact that, while not every semisimple element of order 17 in F4 is a blueprint for the minimal module, almost every one is. This statement passes through to Vmin , since our real semisimple elements lie in F4 , via Lemma 4.9. We start with a = 3. ∗ Proposition 9.1 Suppose that p = 2 and a = 3. Then H fixes a line or 2-space on Vmin or Vmin . ∗ Proof: Suppose that soc(Vmin ↓H ) and soc(Vmin ↓H ) have neither 1s nor 2s, so Vmin ↓H is a submodule of P (4)s and 8s. The projective cover of 4i,i+1 is 4i,i+1 /2i+1 /1/2i−1 /1/2i+1/4i,i+1 , and thus Vmin ↓H is a sum of projectives P (4i,i+1 ) and 8s, but this has even dimension, not right. Now we move on to a = 4, where we use semisimple elements of order 17 that are blueprints for Vmin , as suggested earlier. ∗ Proposition 9.2 Suppose that p = 2 and a = 4. The subgroup H is always a blueprint for Vmin ⊕ Vmin . ∗ Proof: Of the 230 semisimple classes in F4 of elements of order 17, all but two are blueprints for Vmin ⊕Vmin , as we saw in Section 8, with representatives x and x3 , where x has eigenvalues ±1 2 ±2 2 ±3 ±4 2 ±5 ±6 ±7 ±8 2 13 , (ζ17 ) , (ζ17 ) , (ζ17 ), (ζ17 ) , (ζ17 ), (ζ17 ), (ζ17 ), (ζ17 ) on Vmin . We thus may assume that every element of H of order 17 is conjugate to either x or x3 . However, although there are 107766 possible sets of composition factors for a module of dimension 27, none of them has the eigenvalues above, up to algebraic conjugacy. Thus a semisimple element of H of order ∗ 17 is always a blueprint for Vmin ⊕ Vmin , and so the result holds by Lemma 4.9. 51 9.2 Characteristic 3 Let p = 3. From the remarks at the start of this section we need only consider a = 3, i.e., H = PSL2 (27). In the previous section we exploited the fact that most semisimple elements of order 17 are blueprints for Vmin . We will do the same here with order 13 elements. Of the 104 semisimple classes of elements of order 13 in F4 , all but seven are blueprints, since there are elements of order 26 that square to them and preserve the number of eigenvalues. ∗ Proposition 9.3 Suppose that p = 3 and a = 3. Either H is a blueprint for Vmin ⊕ Vmin or it fixes a line ∗ on Vmin or Vmin . Proof: This is easier than the case of F4 , but will start in exactly the same way. There are fifty conspicuous sets of composition factors for Vmin ↓H , but for only seven of these do the elements of order 13 come from ∗ semisimple classes that are not blueprints for Vmin ⊕ Vmin , three up to field automorphism of H, which are 122,3,1 , 91,2 , 41,2 , 12 , 122,3,1 , 91,3 , 41,2 , 12 , 421,2 , 421,3 , 422,3 , 13 . The first two have pressure −1 and so must fix a line on Vmin . For the third, since there is no module 4/1/4 for H by Lemma 5.12, Vmin ↓H cannot have the form 4, 4, 4/1, 1, 1/4, 4, 4, and so if H does not fix a line or hyperplane on Vmin then there can be either one or two 4s in the socle. The {1, 4}-radical of P (41,2 ) has three trivial factors but has a trivial quotient, so we may assume that the socle of Vmin ↓H is the sum of two 4s. Since the pressure of Vmin ↓H is 3, we cannot have a submodule with three 4s, but we need two 1s above this socle (else we could quotient out by one of them and get a module with a simple socle), so the socle is 4, 4 and the second socle layer is 1, 1, so we must have a 4/1/4 ∗ subquotient, not allowed. Thus H fixes a line on Vmin or Vmin , as needed. 9.3 Characteristic at least 5 Let p > 5, and recall that H = PSL2 (pa ) for some a > 1, with pa 6 36, with u ∈ L 6 H of order p, where L = PSL2 (p). The possible actions of u on Vmin are given in [13, Table 5]; by Lemma 4.6 we may assume that our unipotent class is not generic, leaving us with the following seven unipotent classes: (i) A4 , p = 5, acting as 55 , 12 ; (ii) A4 + A1 , p = 5, acting as 55 , 2; (iii) A5 , p = 7, acting as 72 , 62 , 1; (iv) D5 (a1 ), p = 7, acting as 73 , 3, 2, 1; (v) E6 (a3 ), p = 7, acting as 73 , 5, 1; (vi) E6 (a1 ), p = 11, acting as 112 , 5; (vii) E6 , p = 13, acting as 132 , 1. We now go prime by prime, starting with p = 5. Proposition 9.4 Suppose that p = 5. If a = 1 then H fixes a line on either Vmin or L(G). If a = 2 then H either fixes a line or hyperplane on Vmin , or a line on L(G). 52 Proof: Suppose that a = 1. The conspicuous sets of composition factors of Vmin ↓H are 36 , 19 , 5, 37 , 1, 53 , 33 , 13 . The first set of composition factors has pressure −3, so fixes a line on Vmin by Lemma 2.2. In the second case we switch to L(G), on which H acts with composition factors 58 , 38 , 114 or 511 , 35 , 18 . In either case, we see that H fixes a line on L(G), as needed. The third set of composition factors has pressure 0, so might only fix a hyperplane on Vmin . However, the only indecomposable modules with a trivial composition factor but no trivial submodule are submodules of P (3) = 3/1, 3/3, so in order not to fix a line, Vmin ↓H must be 5⊕3 ⊕ (1/3)⊕3 , on which u acts as 53 , 43 , but this does not appear on [13, Table 5], so H does indeed fix a line (and hyperplane) on Vmin . Now suppose that a = 2. By Lemma 5.21, if Vmin ↓L has more trivials than 3-dimensionals then H fixes a line on Vmin . Thus if Vmin ↓L is the first set of composition factors then H fixes a line on Vmin , and if Vmin ↓L is the second set of composition factors then H fixes a line on L(G). We therefore assume that Vmin ↓L has factors 53 , 33 , 13 . At this point it seems easiest to use the traces of semisimple elements of order at most 13, finding eighteen conspicuous sets of composition factors, each with at least one trivial factor and with non-positive pressure, so fix either a line or a hyperplane on Vmin . For p = 7 we do not need to go past a = 1, which makes this easier than the previous case. Proposition 9.5 Suppose that p = 7 and a = 1. Then H fixes a line or hyperplane on Vmin . Proof: The conspicuous sets of composition factors are, as for p = 5, the same as for F4 but with an extra trivial factor, namely 36 , 19 , 5, 37 , 1, 53 , 33 , 13 , 7, 53 , 3, 12 , 73 , 16 . The only indecomposable module that has a trivial composition factor but no trivial submodule or quotient is P (5) = 5/1, 3/5, thus all of these sets of composition factors fix either a line or hyperplane on Vmin . Since any indecomposable module with a trivial composition factor but no trivial submodule has 5/1 as a submodule, the first and fifth conspicuous sets of composition factors in the proof definitely fix lines on Vmin . If H fixes a hyperplane but not a line then it cannot lie in F4 and must lie inside a D5 -parabolic, with composition factors of dimensions 1, 16 and 10. These are incompatible with the second and fifth sets of composition factors, hence H also lies inside F4 in this case. For p = 11, we see the first use of the idea of fixing an sl2 -subalgebra. Proposition 9.6 Suppose that p = 11. Either H is a blueprint for both Vmin and L(G), or H has a trivial summand on Vmin , or H acts on Vmin and L(G) as P (9) ⊕ 5 and 11⊕2 ⊕ P (7) ⊕ P (5) ⊕ 9 ⊕ 3, and fixes an sl2 -subalgebra of L(G). 53 Proof: Examining [13, Tables 5 and 6], we see that there are only two unipotent classes of elements of order 11 that are not generic for both Vmin and L(G), namely D5 (generic for Vmin ) and E6 (a1 ) (not generic for either). If u belongs to class D5 , then it acts on Vmin with Jordan blocks 11, 9, 5, 12, and since there are two Jordan blocks of size 1 and only one of size 11, Vmin ↓H must have a trivial summand as each non-trivial indecomposable summand of dimension congruent to 1 modulo 11 has dimension 12 and uses up a block of size 11. We therefore assume that u belongs to class E6 (a1 ), so acts as 112 , 5 on Vmin and as 116 , 9, 3 on L(G). There are five indecomposable modules of dimension congruent to 5 modulo 11, which up to duality are 5, 7, 5, 3/5, 3, 9, 7, 5, 3/1, 3, 5, 7, 9, with the last one having dimension 49, not allowed, and the second one having dimension 27, with trace of an involution −1, so not allowed. Thus Vmin ↓H is the sum of 5 and a 22-dimensional projective module. We now use traces of semisimple elements of orders at most 6 to see which sums of projectives and a 5 are conspicuous, finding two, namely 11 ⊕ P (1) ⊕ 5 and P (9) ⊕ 5. The first fixes a line on Vmin but does not have a trivial summand, hence lies inside a D5 -parabolic, acting on Vmin uniserially as 10/16/1, and the image of H inside the D5 -Levi must act as 1/9 on the 10, not allowed since this is a self-dual module. Thus the first case does not exist, and H must be the second. The corresponding sets of composition factors on L(G) are 11, 93 , 74 , 33 , 13 and 112 , 9, 73 , 54 , 32 . Since L(G) is self-dual and there is a unique self-dual module congruent to each dimension modulo 11 by Lemma 5.17, we have that 9 and 3 must be summands of L(G) ↓H . The first set of factors cannot form a projective and these summands, but the second case can, yielding 11⊕2 ⊕ P (7) ⊕ P (5) ⊕ 9 ⊕ 3. By Proposition 4.17, the 3-dimensional summand is an sl2 -subalgebra, as claimed. When p = 13, the only non-generic class is the regular unipotent class. We will show more generally that if H contains a regular unipotent element then H either lies in F4 , or p = 13 and H is a non-G-cr subgroup in a D5 -parabolic subgroup of G. Proposition 9.7 Suppose that p > 13. If H contains a regular unipotent element then H is contained in a conjugate of F4 , or p = 13 and H is a non-G-cr subgroup of the D5 -parabolic acting on Vmin as 1/11/1 ⊕ 9/5. or its dual. ∗ If H does not contain a regular unipotent element, then H is a blueprint for Vmin ⊕ Vmin . Proof: Suppose that p > 17: the action of a unipotent element on Vmin is 17, 9, 1, and for p > 19 we must have that Vmin ↓H = 17 ⊕ 9 ⊕ 1, and so H lies inside either F4 , as desired, or a D5 -parabolic, but this has composition factors 10, 16, 1, incompatible. For p = 17 then 17, 1 could come from an 18-dimensional indecomposable module, but the 9 is a summand, so in particular H has three composition factors on Vmin . 54 However, u is contained in the regular class, which is generic for p = 17, hence H is a blueprint for Vmin , in particular an element X of X . Since X contains a regular unipotent element (eliminating all reductive maximal subgroups except for F4 from [14]) and must have at most three composition factors on Vmin , and if it does have three then one has dimension 9 (eliminating all parabolic subgroups), we must have H 6 F4 , as claimed. We therefore have that p = 13, and u acts on Vmin with factors 132 , 1. Suppose that the 1 in the action of u arises from a trivial summand in Vmin ↓H . From the proof of Proposition 8.8 we see that the conspicuous sets of composition factors are 5/7, 9/5 ⊕ 1 and 9/3, 5/9 ⊕ 1. Since there is no 10-dimensional quotient not including the trivial summand, these structures are incompatible with coming from a D5 -parabolic, and so H 6 F4 , as needed. We thus assume that Vmin ↓H has no trivial summand. We therefore have a projective of dimension 13 (either P (1) or 13, both with a trace of 1 for the involution) and a module i/(p + 1 − i), with a trace of ±2. As the trace of an involution on Vmin is either 3 or −5, we see that it has a trace of +2 on i/(p + 1 − i), and hence i = 5, 9. This means that, up to duality, Vmin ↓H is either 13 ⊕ 5/9 or 1/11/1 ⊕ 9/5. The second case is as claimed in the proposition, so we are left to eliminate the first case. Here we take the Borel subgroup B of H: the exact structure of B on the 27-dimensional module Vmin is up to duality as follows, where ζ is a cube root of unity. 1 ζ −ζ −ζ 2 ζ2 1 −1 −ζ ζ ζ2 −ζ 2 −1 1 ζ −ζ −ζ 2 ζ2 1 −1 −ζ ζ ζ2 −ζ 2 −1 1 ζ ζ2 Since F4 acts on Vmin as 26 ⊕ 1, the point that H fixes is either a D5 -parabolic point or a B4 point, but either way H lies inside a D5 -parabolic, either one stabilizing a line or one stabilizing a hyperplane. Let v be a unipotent element of D5 contained in the image of L inside the D5 -Levi. Thus v acts on the 10 and 16 as subquotients of the action of u on Vmin , namely 132 , 1. Therefore v acts on both the 10 and the 16 with at most three Jordan blocks, and if it has three then one is of size 1. We can read off the unipotent classes of D5 from the table for D6 , [14, Table 6], which shows that there are only three unipotent classes, A4 , D5 (a1 ) and D5 , that act with at most three blocks on the 10. From the embedding of the D5 -Levi into E6 we can easily deduce the actions of these on the 16, as we just consult [13, Table 5] which lists the block sizes for the classes for E6 , and look for the unipotent classes with these names. This gives us the list below. 55 Class A4 2 Action on 10 5 Action on 16 7, 5, 3, 1 D5 (a1 ) D5 7, 3 9, 1 72 , 2 9, 7 We therefore see that v comes from the regular class D5 , and so the image B̄ of B in D5 , which contains v, must act on the self-dual module 10 as 1 ⊕ (ζ 2 / − 1/ζ/ − ζ 2 /1/ − ζ/ζ 2 / − 1/ζ). This is a submodule of the action of B above, and we therefore see that B̄ acts on the 16 with eigenvalues (1, −1)2 , (ζ, ζ 2 , −ζ, −ζ 2 )3 ; these cannot form modules of dimension 9 and 7, since a module of dimension 9 needs exactly three ±1 eigenvalues, and a module of dimension 7 needs at least two ±1s. This proves that H cannot embed with these composition factors, and completes the proof of the proposition. We will construct this non-G-cr subgroup of the D5 -parabolic when p = 13; the same construction works for the E6 -parabolic subgroup of E7 and p = 19. Let (G, p, X, Y ) be one of (E6 , 13, D5 , B4 ) and (E7 , 19, E6 , F4 ), and let Vmin denote the minimal module for G. One of the stabilizers of a point on Vmin is a subgroup that is the extension of a unipotent group by Y , so let H be a copy of PSL2 (p) inside Y that covers the regular unipotent element, the fixed points of a principal PSL2 subgroup of Y . This copy of H embeds in X, of course, and the action of X on the unipotent radical of the X-parabolic is as a single simple module, so that the 1-cohomology is easy to compute. We see that the restriction of this simple module to H contains a summand of dimension p − 2, hence the 1-cohomology of H on the unipotent radical is 1-dimensional. There is an action of the torus of the X-parabolic outside of X on this cohomology group, and this yields two conjugacy classes of subgroups H in the X-parabolic, one inside X and another class of complements. Given the composition factors of H on Vmin , together with the table from [13], there is a unique possible module structure for Vmin ↓H if H does not lie inside X but merely the X-parabolic subgroup of G, and this intersects non-trivially the regular unipotent class of G. 56 10 E7 in characteristic 2 In this section, let k be a field of characteristic 2 and let G = E7 (k). Let a > 1 be a positive integer and H = SL2 (2a ). The case of characteristic 2 is very different from odd characteristic because if p is odd then a copy of PSL2 (pa ) inside the simple group of type E7 can lift in the simply connected group to either PSL2 (pa ) × 2 or SL2 (pa ), and the two possibilities require very different strategies. In characteristic 2 there is no such bifurcation. The case a = 2 is done in [9], and since v(E7 ) = 75 for semisimple elements of odd order, if a > 7 then H is a blueprint for Vmin ; so we may assume that 3 6 a 6 6. Furthermore, if Vmin ↓H has at least six trivial composition factors then by Proposition 4.10 we can assume that H has no semisimple elements of order more than 30, so a 6 4 in this case. We can use a computer to find which semisimple elements are blueprints for Vmin even when they have order smaller than 77, or 30 when they centralize a 6-space. For example, of the 2430 classes of elements of order 17, 1892 of them are blueprints for Vmin , which helps reduce the number of conspicuous sets of composition factors that need to be considered when a = 4. Suppose firstly that there are no 1- or 2-dimensional composition factors in Vmin ↓H . In this case if H is not a blueprint for Vmin then we have to switch to the Lie algebra L(G)′ , which we recall has dimension 132, not 133 in the case p = 2. We address this situation now. Proposition 10.1 Suppose that p = 2 and a = 3, 4, 5, 6. Suppose that there are no 1- or 2-dimensional composition factors in Vmin ↓H . (i) We cannot have a = 3, 4. (ii) If a = 5, 6 then H is a blueprint for Vmin . Proof: If H acts on Vmin with no composition factors of dimension 1 or 2, then the trace of an element of order 3 on Vmin is one of −25, −7, 2, 20, and so the dimensions of the composition factors are one of seven possibilities: 32, 16, 42, 32, 8, 44 , 163 , 8, 162 , 82 , 42 , 16, 83, 44 , 87 , 84 , 46 . For these, no arguments about unipotent classes or stabilizing subspaces will work if H is not a blueprint for Vmin , and so we will just have to deal with them case by case, switching to the Lie algebra where we need to. Let a = 3: the only conspicuous set of composition factors for Vmin ↓H is 84 , 421,2 , 421,3 , 422,3 , which does not have a corresponding set of composition factors on L(G)′ . For a = 4 we get no conspicuous sets of composition factors for Vmin ↓H at all. For a = 5, up to field automorphism of H, there are two conspicuous sets of composition factors for Vmin ↓H , namely 161234 , 8135 , 8235 , 8345 , 4213 , 423 , 434 and 82123 , 8124 , 8135 , 412 , 413 , 4214 , 4215 . It is easy to check that an element of order 31 is a blueprint for Vmin in both cases by finding an element of order 93 that cubes to it and has the same number of eigenvalues on Vmin . 57 For a = 6, we do not have lists of the traces of elements of orders 63 and 65, but we can check whether a given matrix is the trace of a semisimple element of order 63 on Vmin by using the preimage trick from Section 4.2. Doing this to the seven possible sets of dimensions yields the following table. In this, the number of sets of composition factors up to field automorphism is given in the second column, and those that are conspicuous using elements of order up to 21 and 63 are given in the third and fourth columns respectively. Dimensions 32, 16, 4 32, 8, 4 2 4 Number of modules Conspicuous up to 21 Conspicuous for 63 1800 1 0 61200 5 0 3 16 , 8 2270 1 0 162 , 82 , 42 504240 32 0 11781000 159 2 109660 1 0 57206136 934 9 3 16, 8 , 4 8 4 7 8 ,4 6 4 We thus simply need to check whether for a given conspicuous sets of composition factors, that any conjugacy class of elements of order 63 with the correct eigenvalues on Vmin is a blueprint for Vmin . This can easily be done with a computer, and so we prove the result. We have now dealt with the case where Vmin ↓H has no 1- or 2-dimensional composition factors. We generally cannot prove that H fixes a line on Vmin , and often want to prove that H fixes a 2-space on Vmin . For this to be enough to show that H is contained in a positive-dimensional subgroup, we need that k contains a splitting field for H, and for NḠ (H) we need to also consider when Vmin ↓H is stable under a field automorphism of H. In general, we therefore consider conspicuous sets of composition factors that are stable under some field automorphism. Proposition 10.2 Suppose that 3 6 a 6 6 and that the composition factors of Vmin ↓H are stable under a non-trivial field automorphism of H. (i) If a = 3 then either H fixes a line on Vmin or L(G)′ , or the composition factors of Vmin ↓H are 8, (41,2 , 41,3 , 42,3 )2 , (21 , 22 , 23 )3 , 16 . (ii) If a = 4 then H is a blueprint for Vmin or the composition factors of Vmin ↓H are (41,4 , 42,3 )2 , 421,2 , (21 , 23 )4 , (22 , 24 )2 , 18 and the stabilizer of any simple submodule of Vmin ↓NḠ (H) is positive dimensional. (iii) If a > 5 then H is a blueprint for Vmin . Proof: Let a = 3. Over F2 there are eight conspicuous sets of composition factors for Vmin ↓H , two of which have no corresponding set of composition factors on L(G)′ . One is as in the proposition, with corresponding factors 82 , (41,2 , 41,3 , 42,3 )4 , (21 , 22 , 23 )9 , 114 on L(G)′ . The other five are 8, (41,2 , 41,3 , 42,3 )3 , (21 , 22 , 23 )2 , (41,2 , 41,3 , 42,3 )2 , (21 , 22 , 23 )4 , 18 58 86 , 18 , 84 , (21 , 22 , 23 )2 , 112 , 8, (21 , 22 , 23 )8 , with corresponding sets of factors on L(G)′ given by 82 , (41,2 , 41,3 , 42,3 )2 , (21 , 22 , 23 )11 , 126 , 82 , (41,2 , 41,3 , 42,3 )4 , (21 , 22 , 23 )9 , 114 , 811 , (41,2 , 41,3 , 42,3 ), (21 , 22 , 23 )3 , 114 , 88 , (41,2 , 41,3 , 42,3 ), (21 , 22 , 23 )6 , 120 , (41,2 , 41,3 , 42,3 )8 , (21 , 22 , 23 ), 130 . By Lemma 5.4 we need three 2s for every two 1s in order not to fix a line or hyperplane, and so the third and fourth cases fix lines on Vmin and the first, third, fourth and fifth all fix lines on L(G)′ , so we need to consider the second case. We assume that Vmin ↓H has no trivial submodules. Remove any 4s from the top and bottom of Vmin ↓H , and any summands of dimension 2 to yield a module W . Since Vmin ↓H has pressure 4, there are at most four 2s in the socle of W . We cannot have a summand P (2i ) for any i because P (2i ) has dimension 56 and only four trivial factors, so as in the proof of Lemma 5.4 we see that W has at most five socle layers, and in fact exactly five socle layers. As it has pressure 4 we cannot have a subquotient of pressure greater than 4 or less than −4 by Lemma 2.2, so the first, third and fifth socle layers each have four 2s, and the second and fourth socle layers each have four 1s. It is clear that, since there are four 2s in the socle, two of them must be isomorphic, say 21 . The other ⊕2 ⊕2 two 21 s must be in the top, and so the socle is either M1 = 2⊕2 1 ⊕ 22 or M2 = 21 ⊕ 22 ⊕ 23 . In the first case, we construct the {21 , 22 }′ -submodule of P (M1 )/M1 , and note that this has only six trivial composition factors, so it cannot be the right socle. In the other case we construct the {21 }′ -submodule of P (M2 )/M2 , which has exactly eight trivial composition factors, so they must all lie in W . Therefore we take the {1}′-residual of this, and it has structure 1, 1, 1, 1/22, 22 , 22 , 23 , 23 /1, 1, 1, 1, 42,3/21 , 21 , 22 , 23 . This must be a submodule of W , and yet it has five 2s in the third socle layer, too many. This contradiction proves that H fixes a line on Vmin , as needed. Thus, except for the set of composition factors explicitly stated, H must fix a line on either Vmin or L(G)′ . For a = 4 there are, up to field automorphism of H, six conspicuous sets of composition factors over k = F4 , namely 421,3 , (21 , 23 )8 , 116 , 482,4 , (21 , 23 )2 , 116 , (41,4 , 42,3 )2 , 421,2 , (21 , 23 )4 , (22 , 24 )2 , 18 (81,2,4 , 82,3,4 )2 , 421,3 , (21 , 23 )2 , 18 , (41,2 , 41,3 , 41,4 , 42,3 , 42,4 , 43,4 )2 , 18 , 162 , (21 , 22 , 23 , 24 )2 , 18 . In the proof of Proposition 9.2 we saw that there are only two semisimple classes of elements of order 17 in F4 that are not blueprints for the 26-dimensional minimal module, and hence for Vmin . The semisimple elements of order 17 in the conspicuous sets of composition factors above are always conjugate into F4 , and all but the fourth one are in fact blueprints for Vmin (as they are for the minimal module for F4 ), so we get the first part of the result. We are left with the fourth set of composition factors. Let ζ denote a primitive 17th root of unity, and choose x ∈ H of order 17 such that the eigenvalues of x on 21 are ±ζ, and therefore the eigenvalues of x on Vmin are 18 , (ζ ±1 )4 , (ζ ±2 )4 , (ζ ±3 )2 , (ζ ±4 )4 , (ζ ±5 )2 , (ζ ±6 )2 , (ζ ±7 )2 , (ζ ±8 )4 . 59 There exists an element y1 in the algebraic group F4 , cubing to x, with eigenvalues 18 , (θ±1 )4 , (θ±2 )4 , (θ±3 )2 , (θ±4 )4 , (θ±5 )2 , (θ±6 )2 , (θ±7 )2 , (θ±8 )2 , (θ±9 )2 on Vmin , where θ is a primitive 51st root of unity with θ3 = ζ. This preserves all eigenspaces except for the ζ ±8 ones, which lie in 24 and 41,4 . There also exists an element y2 in F4 , again cubing to x, and with eigenvalues 18 , (θ±1 )4 , (θ±2 )4 , (θ±3 )2 , (θ±4 )2 , (θ±21 )2 , (θ±22 )2 , (θ±23 )2 , (θ±24 )2 , (θ±25 )4 , with now the ζ ±4 -eigenspaces being split and all others being preserved. Only the module 23 has ζ 4 as an eigenvalue, so the stabilizer of any simple submodule of Vmin ↓H contains either y1 or y2 , and hence is positive dimensional, either using the fact that v(F4 ) = 18 or Proposition 4.10. This proves that, regardless of the field k, or whether NḠ (H) induces a field automorphism on H, NḠ (H) is contained in a positive-dimensional subgroup stabilizing a σ-stable subspace of Vmin , as needed. For a = 5, we use the traces of semisimple elements and get a unique set of composition factors, 32, (21 , 22 , 23 , 24 , 25 )2 , 14 . An element of order 31 in H has 1-eigenspace of dimension 6 on these factors (since it has a 1-eigenspace of dimension 2 on the 32), hence is a blueprint for Vmin by Proposition 4.10. Thus H is a blueprint for Vmin , as claimed. When a = 6, the group of field automorphisms has order 6, so we need to consider those factors that are stable under field automorphisms of orders 2 and 3. We start with those definable over F4 , i.e., stable under the automorphism of order 3. There are sixteen conspicuous sets of composition factors for elements of order up to 63, six of which have no factors of dimension 1 or 2, hence dealt with in Proposition 10.1, with the rest given by 842,4,6 , (21 , 23 , 25 )2 , 112 , (41,3 , 43,5 , 41,5 )2 , (21 , 23 , 25 )4 , 18 , 81,3,5 , (41,3 , 43,5 , 41,5 )2 , 41,4 , 42,5 , 43,6 , (21 , 23 , 25 )2 , 81,3,5 , (21 , 23 , 25 )8 , 81,3,5 , (41,3 , 43,5 , 41,5 )2 , 41,6 , 42,3 , 44,5 , (21 , 23 , 25 )2 , up to field automorphism of H. The first two of these have more than six trivial composition factors, hence are blueprints for Vmin by Proposition 4.10; for the other three it can be checked manually that the elements of order 63 are blueprints for Vmin , by finding elements of order 315 = 5 · 63 that power to them and have the same number of eigenvalues on Vmin . We also have to check sets of composition factors defined over F8 , where up to field automorphism there are ten conspicuous sets of composition factors for semisimple elements of order 21, three of which lose their conspicuousness on elements of order 63. The remaining seven all have at least eight trivial composition factors, hence are blueprints for Vmin by Proposition 4.10. These are 421,4 , (21 , 24 )8 , 116 , 483,6 , (21 , 24 )2 , 116 , (41,5 , 42,4 )2 , 421,4 , (21 , 24 )4 , (22 , 25 )2 , 18 , 1621,3,4,6 , (21 , 24 )2 , (22 , 25 )2 , 18 , 1622,3,5,6 , (21 , 24 )2 , (23 , 26 )2 , 18 , (82,3,6 , 82,4,5 )2 , 422,5 , (21 , 24 )2 , 18 , This completes the proof of the proposition. 60 (81,3,6 , 83,4,6 )2 , 421,4 , (21 , 24 )2 , 18 We now can assume that k contains a splitting field for H and, moreover, that NḠ (H) = HCḠ (H), as the composition factors of Vmin ↓H , which is stable under Out(G), are not compatible with an outer automorphism of H. Proposition 10.3 Suppose that Vmin ↓H has at least one 2-dimensional composition factor and no trivial composition factors. (i) If a = 3 then H fixes a 2-space on Vmin . (ii) If a = 4, 5, 6 then H fixes a 2-space on Vmin or is a blueprint for Vmin . Proof: Suppose that a = 3. Any 8s split off, so we just consider the 4s and 2s. The projective cover of 4i,i+1 is P (4i,i+1 ) = 4i,i+1 /2i+1 /1/2i−1 /1/2i+1 /4i,i+1 , and from this we see that no module can have a 2-dimensional composition factor, no trivial composition factor, and no have a 2-dimensional submodule or quotient. This proves (i). For a = 4, we first compute the conspicuous sets of composition factors, finding eighty-one sets up to field automorphism of H. We have a list of those classes of elements of order 17 that are blueprints for Vmin , and all but fifteen of these sets appear on that list. We can also compute which have positive 2i -pressure (or no 2i ) for every i, and find that only eighteen of these sets do. The intersection of these two short lists has just two sets of composition factors on it, and so we consider these two: 81,2,3 , 421,2 , 431,3 , 432,3 , 42,4 , 221 , 222 , 223 , 81,2,4 , 82,3,4 , 421,2 , 41,3 , 421,4 , 432,3 , 221 , 223 . The first of these must stabilize a 2-space on Vmin , as notice that otherwise the socle can consist of summands of Vmin ↓H and a submodule of 41,2 ⊕ 41,3 ⊕ 42,3 , but the largest submodules of those projectives with composition factors those in Vmin ↓H are 42,4 /22 /41,2 , 41,3 /23 /42,3 /21 , 23 /41,3 , 23 /41,3 , 42,3 /23 , 81,2,3 /42,3 , so at most a single 21 can lie in Vmin ↓H , a contradiction. The second case is even easier, given that the corresponding submodules are 41,2 /81,2,4 /41,2 , 41,3 /21 /41,4 , 41,3 /23 /42,3 . This completes the proof for a = 4. We now let a = 5. There are thirty possible multisets of dimensions for the composition factors of Vmin ↓H that have at least one 2, no 1s, and have the right trace of an element of order 3. If H does not fix a 2-space, then we need two 4s in the dimensions, removing twenty multisets of dimensions from the list. We can also apply Lemma 5.6, which shows that if there are no 8s in Vmin ↓H then we need at least as many 4s as 2s, removing another three. Since any 4 has 2-pressure at most 2, there needs to be more than half as many 4s as 2s in all cases; this brings us down to ten. These are 410 , 28 , 162 , 44 , 24 , 8, 49 , 26 , 83 , 47 , 22 , 16, 47 , 26 , 82 , 48 , 24 , 16, 82 , 45 , 22 , 16, 8, 46, 24 , 32, 45 , 22 , 162 , 8, 43 , 22 . In these cases we switch to proving that H is a blueprint for Vmin . (This could be done for the other cases but the amount of extra work is significant and so this has not been done.) 61 We give a table listing the total number of possible sets of composition factors for Vmin ↓H , then those that are conspicuous, and finally those for which an element of order 31 in H is a blueprint for Vmin . These numbers are all up to a field automorphism of Vmin . Case 10 4 ,2 8 8, 49 , 26 7 6 8 4 16, 4 , 2 2 8 ,4 ,2 6 16, 8, 4 , 2 2 4 16 , 4 , 2 3 7 8 ,4 ,2 2 4 4 2 5 16, 8 , 4 , 2 5 32, 4 , 2 2 3 2 2 16 , 8, 4 , 2 2 Number Conspicuous 31 is blueprint 9145422 23 23 20420400 32 32 2402400 3 2 18718700 52 51 3503500 12 8 150150 2 2 7550400 22 21 1651650 20 19 6006 0 0 99000 4 4 We now focus on these remaining eight conspicuous sets of composition factors: 161,2,3,4, 42,5 , 41,4 , 422,4 , 41,3 , 41,5 , 42,3 , 223 , 222 , 221 , 161,3,4,5 , 82,4,5 , 42,5 , 43,5 , 41,5 , 424,5 , 42,3 , 23 , 231 , 82,3,5 , 81,2,5 , 41,4 , 423,5 , 41,3 , 421,5 , 422,3 , 223 , 221 , 161,3,4,5 , 82,4,5 , 41,4 , 43,5 , 41,3 , 424,5 , 42,3 , 223 , 221 , 161,2,3,4 , 81,4,5 , 42,5 , 43,5 , 42,4 , 41,5 , 43,4 , 42,3 , 223 , 221 , 82,4,5 , 81,3,4 , 81,2,5 , 42,4 , 41,5 , 424,5 , 43,4 , 42,3 , 41,2 , 23 , 21 , 161,2,3,5 , 82,3,4 , 41,4 , 43,5 , 421,3 , 44,5 , 42,3 , 24 , 23 , 221 , 161,2,4,5, 81,2,4 , 81,2,5 , 42,4 , 41,5 , 43,4 , 42,3 , 41,2 , 22 , 21 . Recall from Lemma 5.1 that 2i has extensions only with 4i,j for j 6= i, i + 1: from this we see that the third, fourth, fifth, seventh and eighth have non-positive 21 -pressure so have 21 s as submodules; the first case has 23 -pressure 0 so fixes a 23 submodule; the sixth case has 24 -pressure 0 so fixes a 24 submodule. This leaves the second case, which will fix a 21 submodule: we quotient out by any simple submodule other than 41,5 , 41,4 and 41,3 , and take any submodule whose quotient is simple and not one of these, to leave a module W containing both 21 s and having only 41,5 in the socle, except possibly for 41,4 or 41,3 appearing as a summand. We therefore consider the largest submodule of P (41,5 ) with composition factors from the factors of Vmin ↓H , and this is 41,4 /21 /41,5 . Thus Vmin ↓H must have 21 as a submodule, and we are done for the case a = 5. Finally, let a = 6. We have the same ten multisets of dimensions of composition factors for Vmin ↓H as the case of a = 5, and we perform the same analysis as before. 62 Case 10 4 ,2 Number 8 Conspicuous up to 21 Conspicuous up to 63 63 is blueprint 420696342 68 41 41 8, 49 , 26 1258472670 369 76 76 16, 47 , 26 134306100 121 9 9 1410195600 1068 104 104 244188000 750 38 38 7712064 89 12 12 626749200 983 90 90 128200860 1097 80 80 244188 15 1 1 5712000 208 24 24 2 8 8 ,4 ,2 4 6 16, 8, 4 , 2 2 4 16 , 4 , 2 3 7 8 ,4 ,2 2 4 4 2 5 16, 8 , 4 , 2 5 32, 4 , 2 2 2 2 3 16 , 8, 4 , 2 2 As every conspicuous set of composition factors for Vmin ↓H has an element of order 63 that is a blueprint for Vmin , H is always a blueprint for Vmin , as needed. Proposition 10.4 Suppose that Vmin ↓H has either two or four trivial composition factors. (i) If a = 3 then Vmin ↓H has a submodule of dimension at most 2. (ii) If a = 4 then either H fixes a line on L(G)′ or NḠ (H) fixes a σ-stable, proper, non-zero subspace of Vmin whose stabilizer is positive dimensional. (iii) If a = 5 then NḠ (H) fixes a σ-stable, proper, non-zero subspace of Vmin whose stabilizer is positive dimensional. (iv) If a = 6 then NḠ (H) is either a blueprint for Vmin or fixes a subspace of dimension at most 2 of Vmin . Proof: Let a = 3. As we have seen before, the projective cover of 4i,i+1 is P (4i,i+1 ) = 4i,i+1 /2i+1 /1/2i−1 /1/2i+1 /4i,i+1 , whence if Vmin ↓H has no 1- or 2-dimensional submodules or quotients, it is a sum of 8s and P (4i,i+1 )s for various i. In particular, since dim(P (4i,i+1 ) = 16, we have one of P (4), 85 and P (4)2 , 83 , as there are between two and four trivial factors. Thus the composition factors of Vmin ↓H are either 85 , 42 , 23 , 12 or 83 , 44 , 26 , 14 , on which an element of order 3 acts with trace −4 and −1 respectively, not a trace of an element of order 3 on Vmin , which is one of −25, −7, 2, 20. This completes the proof for a = 3. Let a = 4. Using all semisimple elements, there are (up to field automorphism) 113 conspicuous sets of composition factors for Vmin ↓H with exactly two trivial composition factors. Only seventy-nine of these have corresponding factors on L(G), and of these only thirty-eight have either no 2i or positive 2i -pressure for every i. One can eliminate three more as an element of order 17 is a blueprint for Vmin , leaving us with thirty-five. Two more of these have no 4-dimensional factors appearing with multiplicity greater than 1, so must stabilize either a line or 2-space as Vmin is self-dual. We are left with thirty-three conspicuous sets of composition factors for Vmin ↓H , still too many to list. Let W be the subquotient obtained from Vmin ↓H by quotienting out by the {8, 16}-radical and taking the {8, 16}-residual, and remove any 4-dimensional simple summands. Since H can be assumed not to fix a line or 2-space on Vmin , the socle of W consists of 4-dimensional modules, and the factors of soc(W ) consist of 4-dimensional simple modules that occur with multiplicity at least 2 in Vmin ↓H , and hence W . Let 63 S1 , . . . , Sr be the 4-dimensional simple modules that appear in Vmin ↓H with multiplicity at least 2. (If a module appears more than twice, we take the floor of half of its multiplicity, since this is the maximum number of times it may appear in the socle.) We construct the largest submodule W ′ of P (S1 ⊕ · · · ⊕ Sr ) that consists solely of composition factors from Vmin ↓H ; certainly W 6 W ′ . Thus W ′ must have at least two trivial factors, and all the requisite 2-dimensional factors. In fact, only twenty-two out of the thirty-three cases yield modules W ′ with any trivial factors, with five even being the zero module (as there are no such Si ). Another six can be removed for not having the correct 2-dimensional factors, leaving sixteen sets of composition factors. Five of these have corresponding set of composition factors on L(G)′ having pressure less than 6, hence H fixes a line on L(G)′ by Lemma 5.3 and the fact that an involution has at least six trivial Jordan blocks on L(G)′ . The remaining eleven are as follows: 821,3,4 , 41,2 , 421,3 , 441,4 , 241 , 22 , 12 , 81,3,4 , 421,3 , 431,4 , 422,3 , 42,4 , 231 , 22 , 223 , 24 , 12 , 81,3,4 , 41,2 , 41,3 , 41,4 , 42,3 , 422,4 , 423,4 , 231 , 22 , 23 , 224 , 12 , 81,2,4 , 421,2 , 421,3 , 41,4 , 42,3 , 42,4 , 43,4 , 221 , 222 , 223 , 24 , 12 , 82,3,4 , 41,2 , 421,3 , 41,4 , 422,3 , 422,4 , 221 , 222 , 223 , 24 , 12 , 16, 41,2, 41,3 , 41,4 , 422,4 , 43,4 , 221 , 222 , 223 , 24 , 12 , 81,2,3 , 81,2,4 , 421,2 , 421,3 , 421,4 , 42,3 , 221 , 22 , 223 , 12 , 821,3,4 , 41,2 , 421,3 , 431,4 , 42,3 , 221 , 22 , 223 , 12 , 81,2,4 , 81,3,4 , 41,2 , 41,3 , 421,4 , 422,3 , 42,4 , 221 , 22 , 23 , 24 , 12 , 821,2,4 , 81,3,4 , 431,2 , 41,3 , 421,4 , 221 , 22 , 12 , 16, 81,2,3, 81,3,4 , 41,2 , 41,3 , 421,4 , 221 , 22 , 12 . We can eliminate some more using module structures: in the second case, suppose that 41,4 lies in the socle. If it is a summand, we quotient it out and ignore it, so suppose it is a submodule but not a summand, and quotient this out, also quotienting out any 2- and 1-dimensional factors that become submodules to produce a module U . This is a submodule of P (41,4 ) and so we use Lemma 5.7, seeing that U is a submodule of 21 /1/22/1/21 /41,4 ; if both trivials are in U then Vmin ↓H /U has 23 -pressure 0, so has 23 as a submodule, a contradiction from the definition of U . If there is a single trivial in U then firstly replace U by the 7-dimensional submodule 1/21 /41,4 of U , and since Vmin is self-dual, there is a (unique) corresponding submodule U ′ such that Vmin ↓H /U ′ ∼ = U ∗. If U 6 U ′ then U ′ /U has no trivials and again it has 23 -pressure 0 and so we get a contradiction. Thus U ′ does not contain U , and we claim that in this case an involution u must act with exactly two trivial Jordan blocks, not allowed by [13, Table 7]. To see this, firstly let M denote the {1}′ -residual modulo the {1}′ -radical of Vmin ↓H , so it is a submodule of P (1), as otherwise it is simply 1⊕2 , with this impossible by [13, Table 7]. The submodule U of Vmin ↓H has image inside M which is just soc(M ), and the image of U ′ has image inside M which is simply rad(M ). It is therefore clear that the image of U ′ contains the image of U and, since U is uniserial, U ′ contains U . Thus we can remove any 41,4 in the socle and top, perhaps remove two 21 s that are now in the socle and top, and assume that the resulting module V ′ is a self-dual submodule of P (41,3 ) ⊕ P (42,3 ). We now give the three modules obtained from the following procedure, given a socle S that is a submodule of 41,3 ⊕ 42,3 : (i) Take the preimage S1 in P (S) of the radical of P (S)/S corresponding to all composition factors of Vmin ↓H other than those in S; 64 (ii) Take the preimage S2 in P (S) of the cf(S)-radical of the quotient P (S)/S1 ; (iii) Take the cf(S)′ -residual S3 of S2 . This must contain the module V ′ , so we examine the composition factors of the modules S3 for the choices of S, which are 41,3 , 41,3 /21 , 23 /41,4 , 42,3 /21 , 23 /41,3 , 42,3 /23 /1/24 /1/23/42,3 , 42,3 /23 /1, 41,3/21 , 24 /1, 41,3 , 41,4 , 42,3 /21 , 23 , 23 /41,3 , 42,3 . None of these has a 22 as a composition factor, and this yields a contradiction. Thus in the second case H must fix a line or 2-space on Vmin . In the third case, W ′ might have enough 2-dimensional factors, but in order to have three 21 s in W ′ we need both 42,4 and 43,4 in the socle, whence they cannot appear elsewhere in the module (which they can do in our construction of W ′ ). With this restriction, that 42,4 and 43,4 can only appear in the socle and top of Vmin ↓H , we get the analogue of W ′ to be 43,4 /23 , 24 /1, 1, 41,3, 42,4 /21 , 21 , 22 , 23 /1, 1, 41,2, 42,4 , 43,4 /22 , 24 , 24 /42,4 , 43,4 , which still does not have three 21 s in it, a contradiction. In the fourth case, the socle of W cannot simply be 41,2 as there are no 21 s in its contribution to W ′ . If it is 41,2 ⊕ 41,3 then, arguing as in the previous case, we get 41,2 /22 /1, 41,3 , 41,3 /21 , 23 , 23 /1, 41,2, 41,4 , 42,3 /21 , 22 , 23 , 81,2,4 /41,2 , 41,3 , and if it is just 41,3 then we get 41,3 , 41,3 /21 , 23 /41,4 , 42,3 /21 , 23 /41,3 , so in neither case can we contain all of W . In the sixth case, the socle of W must be 42,4 , and if so no 42,4 can appear outside of the socle and top of W . Taking the radical of P (42,4 )/42,4 with factors all other composition factors of Vmin ↓H , then adding on as many 42,4 s on top of that, then taking the {42,4 }′ -residual of this (since the socle of W must be 42,4 ), we end up with 42,4 , 42,4 /22 , 24 /41,2 , 43,4 /22 , 24 /42,4 , clearly wrong. Thus in the sixth case H fixes a 1- or 2-space on Vmin . In the ninth case, the possible factors of soc(W ) are 41,4 and 42,3 , with both required for all of the 2-dimensional factors to be present, as an examination of W ′ proves. In this case, we do as above to find that W is a submodule of 41,4 /21 /1, 41,4 /21 , 22 /1, 1, 41,3, 41,4 /21 , 23 , 81,3,4 /41,4 , 42,3 , which does not have a 24 , a contradiction. For the other cases, the existence of the uniserial modules M1 = 41,4 /21 /1/22/1/21/41,4 and M2 = 41,3 /21 /41,4 /21 /41,3 prove directly that the first (M1 plus M2 ), fifth (M1 twisted by the square of the field automorphism, M2 untwisted, and M2 twisted by the field), seventh (M1 twisted by the field, plus M2 ), eighth (M1 plus M2 twisted by the field squared), tenth and eleventh cases (both a single M1 ) cannot be solved in the same way. 65 For these we will show that H fixes a (σ-stable) subspace whose stabilizer is positive dimensional, since it will contain an element of order 85 > v(E7 ). In fact, five of the six satisfy an extra property that we will use later on: an element x of order 17 has seventeen distinct eigenvalues on Vmin , and has a preimage x̂ of order 85 that has eighteen eigenvalues on Vmin . This means that x̂ must have the same eigenspaces as x, except that the 1-eigenspace of x must split into two. Since only the trivial module has a 1-eigenspace for the action of x, this means that every submodule of Vmin ↓H that does not contain a trivial module must be stabilized by x̂ and hence by a positive-dimensional subgroup of G. We are left with a single case to consider, which is 821,3,4 , 41,2 , 421,3 , 431,4 , 42,3 , 221 , 22 , 223 , 12 ; if we choose x of order 17 and ζ a primitive 17th root of unity so that x acts on 21 with eigenvalues ζ ±1 , then x acts on Vmin with eigenvalues 12 , (ζ ±1 )3 , (ζ ±2 )2 , (ζ ±3 )5 , (ζ ±4 )4 , (ζ ±5 )4 , (ζ ±6 )3 , (ζ ±7 )3 , (ζ ±8 )3 , and there is an element x̂ of order 85 in G that powers to x and has the same eigenspaces, except it splits the ζ ±1 and 1-eigenspaces, so has twenty eigenvalues on Vmin . An easy calculation shows that the only composition factors of Vmin on which x has 1 or ζ ±1 as an eigenvalue are 1, 21 and 41,2 : if 1 or 21 is a submodule of Vmin ↓H then its stabilizer is positive dimensional anyway, and if 41,2 is a submodule then it is a summand, so there must be another factor in the socle, which therefore has a positive-dimensional stabilizer. This completes the proof of the proposition in the case where there are exactly two trivial factors in Vmin ↓H . Moving to exactly four trivial composition factors, up to field automorphism there are 114 conspicuous sets of composition factors for Vmin ↓H . Twenty-two of these contain an element of order 17 that is a blueprint for Vmin , and twenty-five have no corresponding sets of composition factors for L(G). Taken together, this leaves seventy sets of composition factors. Removing those with non-positive 1- or 2i -pressure and those without two isomorphic 4-dimensional composition factors brings us down to fifty-one sets of factors. As with the previous case, we construct the modules W and W ′ and apply the same test, reducing us to twenty-three sets of composition factors. Another three have pressure less than 6 on L(G)′ , so fix a line on L(G)′ and can be discarded. As we saw when considering two trivial factors, construction of the module W ′ does not take into account that if a 4-dimensional factor lies in the socle of W and has multiplicity exactly 2 in Vmin ↓H then it cannot appear anywhere other than the socle or the top of W . Including this, and ranging over all possible socles rather than just the largest one, yields a collection of modules for each case, all smaller than the original W ′ , and another twelve that no longer have enough 1- or 2-dimensional factors, bringing us down to eight. The last eight cases are as follows: 431,3 , 41,4 , 432,3 , 42,4 , 241 , 222 , 233 , 24 , 14 , 41,2 , 431,3 , 421,4 , 42,3 , 42,4 , 241 , 222 , 233 , 24 , 14 , 81,3,4 , 421,3 , 421,4 , 42,3 , 423,4 , 231 , 22 , 223 , 224 , 14 , 81,3,4 , 82,3,4 , 431,4 , 42,4 , 423,4 , 231 , 22 , 224 , 14 , 81,2,3 , 81,3,4 , 41,2 , 41,3 , 421,4 , 422,3 , 221 , 22 , 223 , 24 , 14 , 66 81,3,4 , 41,2 , 421,3 , 431,4 , 42,3 , 241 , 222 , 223 , 14 , 821,3,4 , 431,4 , 42,4 , 423,4 , 231 , 22 , 224 , 14 , 821,3,4 , 41,3 , 431,4 , 42,3 , 43,4 , 231 , 222 , 23 , 14 . In the first case, the socle of W can be either 41,3 or 41,3 ⊕ 42,3. If the socle of W is 41,3 then the module ′ W in which W can be found is 41,3 21 23 1 41,4 42,3 21 22 23 24 1 1 41,3 41,3 42,4 21 22 23 24 1 41,4 42,3 21 23 41,3 This is self-dual, so has a simple top, and since it is 64-dimensional, W must be contained in rad(W ′ ), and indeed in the {41,3 , 42,3 }′ -residual of this, which is 42,3 /23 /1, 41,3 , 41,3 /21 , 23 , 24 /1, 41,4, 42,3 /21 , 23 /41,3 , which has no 22 , so 41,3 cannot be the socle. If 41,3 ⊕ 42,3 is the socle, then the module W ′ is the sum of the one above and 41,3 , 42,3 /21 , 23 /1, 41,4 /21 , 24 /1, 41,3/23 /42,3 , which also has no 22 . The same statement about the top 41,3 not appearing in W remains true, and so we take the same residual (this is why we took the {41,3 , 42,3 }′ -residual rather than the {41,3 }′ -residual above) and see no 22 again. Thus H must fix a 1- or 2-space on Vmin . In the second case, the socle of W ′ must be 41,3 , and indeed W ′ is the same module as in the previous case, so the same method works there. In the third case, the socle of W ′ must be 41,3 ⊕ 41,4 ⊕ 43,4 . We can construct such a module, namely 41,4 43,4 41,3 21 24 23 1 1 42,3 ⊕ ⊕ 22 21 23 1 1 41,3 21 24 41,4 43,4 ⊕ 81,3,4 , so we will need to look at elements of G to solve this case. In the fourth case, the module W ′ is the self-dual module 41,4 21 81,3,4 1 41,3 41,4 21 22 23 1 1 42,3 21 22 23 1 41,3 41,4 21 81,3,4 41,4 67 which has two 81,3,4 s, so we can as in the first two cases take the {41,4 }′ -residual of rad(W ′ ) to get a module 41,4 /21 /1/22/1, 41,4/21 , 81,3,4 /41,4 , which cannot work for several reasons, so that H fixes a line or 2-space on Vmin . The exact same module appears as W ′ in the eighth case as well, so this method works there. In the fifth and sixth cases, W ′ must have socle 41,4 ⊕ 43,4 and we can construct a module with the right composition factors, namely 41,4 43,4 21 24 1 1 22 ⊕ 21 1 1 21 24 41,4 43,4 with the remaining factors being summands. In the seventh case, W ′ must have 41,4 ⊕42,3 in the socle, and a module with the right composition factors has the first summand above and the second summand twisted by three iterations of the field automorphism, so 41,4 42,3 21 23 1 1 22 ⊕ 24 1 1 21 23 41,4 42,3 We have therefore eliminated the first, second, fourth and eighth cases, and will look at semisimple elements in the third, fifth, sixth and seventh cases. In the third case, the element x acts on Vmin with eigenvalues 14 , (ζ ±1 )3 , (ζ ±2 )2 , (ζ ±3 )3 , (ζ ±4 )5 , (ζ ±5 )5 , (ζ ±6 )2 , (ζ ±7 )2 , (ζ ±8 )4 , and there exists an element of order 85 that powers to x and has nineteen distinct eigenvalues on Vmin , only splitting the ζ ±2 -eigenspaces. In Vmin ↓H , these lie in the 22 and 42,3 , the latter of which can only lie in the socle if it is a summand. Therefore every other simple submodule is preserved by an element of order 85 > v(E7 ) and therefore a positive-dimensional subgroup of G. We do the same thing in the fifth case, finding an element of order 85 that powers to x and only disturbs the 1- and ζ ±1 -eigenspaces. Since these only lie in the trivial and 21 , every simple submodule of Vmin ↓H is stabilized by a positive-dimensional subgroup of G. For the sixth case, there are eight elements of order 85 that power to x and have nineteen eigenvalues on Vmin : four split the ζ ±6 -eigenspace and the other four split the ζ ±8 -eigenspace. The ζ ±6 -eigenspace is contributed to by 42,4 and 81,3,4 from Vmin ↓H , and the ζ ±8 -eigenspace is contributed to by 24 and 41,4 . Thus any simple submodule of Vmin ↓H is stabilized by at least one element of order 85, and so the stabilizer is positive dimensional, as claimed. Finally, we have the seventh case. Here, the smallest number of eigenvalues that an element of order 85 powering to x has on Vmin is twenty-three, but there is one that splits the ζ ±1 , ζ ±2 and ζ ±5 -eigenspaces. The 68 element x has eigenvalues ζ ±7 , ζ ±8 on 41,4 , which is in the socle of Vmin ↓H as we saw above. (We actually saw that it was in the socle of W , but all modules that appear with multiplicity greater than 1 are either in the socle of W or have dimension at most 2, so that soc(W ) 6 soc(Vmin ↓H ) or H fixes a 1- or 2-space on Vmin .) Thus we see that an element of order 85, and hence a positive-dimensional subgroup of G, stabilizes the (σ-stable) submodule 41,4 of Vmin ↓H , completing the case for a = 4. Let a = 5, and firstly suppose that there are two trivial composition factors, so we need at least three 2s and two 4s, to avoid fixing a line or 2-space on Vmin . There are seventeen possible sets of dimensions of composition factors with these properties that also have the correct trace of an element of order 3: if there are exactly two 4s in Vmin ↓H then we can use Lemma 5.7 to see that we can have exactly three 2s, thus eliminating two of these cases, and if there are three 4s we can have at most eight 2s, eliminating two more. We now give a table listing the possible sets of dimensions, together with the number of sets of composition factors (up to field automorphism) with those dimensions, those that are conspicuous, those for which the element x of order 31 is a blueprint for Vmin , and those for which there exists an element x̂ of order 93, cubing to x, and such that x̂ has one more distinct eigenvalue than x. This last condition does not ensure that H is a blueprint for Vmin , but does show that H lies inside a positive-dimensional subgroup stabilizing every simple submodule of soc(Vmin ↓H ) not of dimension 1 or 32. To see this, if x̂ has one more eigenvalue than x then, since x̂ must be real as it lies in E7 , all eigenspaces are preserved except for the 1-eigenspace. As only the trivial and 32-dimensional have 1 as an eigenvalue for x, this means that x̂, and a positive-dimensional subgroup of G stabilizing the same subspaces as x̂, fix any simple submodule of Vmin ↓H not of dimension 1 or 32. In particular, this proves that H lies inside a member of X σ . Case 46 , 215 , 12 5 13 8, 4 , 2 , 1 2 4 2 11 8 ,4 ,2 ,1 9 9 4 ,2 ,1 8 2 7 8, 4 , 2 , 1 2 6 7 2 7 5 2 16, 4 , 2 , 1 2 2 8 ,4 ,2 ,1 5 5 16, 8, 4 , 2 , 1 2 3 5 16 , 4 , 2 , 1 2 2 Number Conspicuous 31 is blueprint One more eigenvalue 3879876 5 4 0 9529520 2 2 0 10735725 13 12 1 6952660 16 12 0 16044600 30 23 0 1651650 9 3 1 15855840 54 29 12 2522520 24 10 3 83160 6 6 0 83 , 46 , 23 , 12 7707700 22 5 9 16, 82 , 44 , 23 , 12 1376375 19 14 3 5005 1 0 0 57750 3 1 1 4 3 32, 4 , 2 , 1 2 2 3 2 16 , 8, 4 , 2 , 1 2 Excluding both those that are blueprints and where there is an element with one more eigenvalue, we are left with forty-eight conspicuous sets of composition factors. Twenty of these forty-eight have no corresponding set of composition factors on L(G)′ , so cannot yield embeddings of H into G. We are left with twenty-eight conspicuous sets of composition factors for Vmin ↓H , still too many to list. Let W be the subquotient obtained from Vmin ↓H by quotienting out by the {8, 16, 32}-radical and taking the {8, 16, 32}-residual, and remove any 4-dimensional simple summands. Since H can be assumed not to fix a line or 2-space on Vmin , the socle of W consists of 4-dimensional modules, and the factors of soc(W ) 69 consist of 4-dimensional simple modules that occur with multiplicity at least 2 in Vmin ↓H , and hence W . Let S1 , . . . , Sr be the 4-dimensional simple modules that appear in Vmin ↓H with multiplicity at least 2. (Note that no composition factor of Vmin ↓H , in the twenty-eight remaining sets of factors, appears with multiplicity greater than 3, so we need only one copy of each Si .) We construct the largest submodule W ′ of P (S1 ⊕ · · · ⊕ Sr ) that consists solely of composition factors from Vmin ↓H ; certainly W 6 W ′ . Thus W ′ must have at least two trivial factors, and all the requisite 2-dimensional factors. In fact, only nine out of the twenty-eight cases yield modules W ′ with any trivial factors, with ten even being the zero module (as there are no such Si ). Another seven can be removed for not having the correct 2-dimensional factors, leaving the following two sets of factors: 161,3,4,5 , 81,3,4 , 81,4,5 , 41,4 , 421,5 , 41,2 , 22 , 221 , 12 . 81,3,5 , 81,4,5 , 41,4 , 421,3 , 421,5 , 42,3 , 41,2 , 223 , 22 , 221 , 12 , In these final two cases we need to consider a preimage x̂ that does not stabilize all eigenspaces, but does stabilize those that make up some submodule of Vmin ↓H . In the first case, x has thirty-one eigenvalues on Vmin , and the fewest number of eigenvalues for a preimage x̂ of order 93 is thirty-five (two such preimages, each a power of the other), with the four eigenvalues of x not being stabilized being ζ ±14 , ζ ±15 where ζ is a primitive 31st root of unity. In the second case, x again has thirty-one eigenvalues and the fewest number of eigenvalues for x̂ is thirtyfour (four preimages, yielding two subgroups of order 93), with the three eigenvalues of x not stabilized being either 1, ζ ±2 or 1, ζ ±3 , depending on the choice of preimage. The eigenvalues of x on 41,2 are ζ ±1 , ζ ±3 , so if this is a submodule (hence summand) of Vmin ↓H then that submodule is stabilized by a positive-dimensional subgroup of G, as needed. There are no extensions between 41,2 and any of 41,3 , 41,5 , 21 or 23 , and so since all other composition factors are multiplicity free, and 41,2 is multiplicity free, there can be no extensions between 41,2 and any other composition factor, as Vmin is self-dual. Thus 41,2 splits off in both cases, and our result is proved for two trivial factors. If there are four trivial composition factors in Vmin ↓H , then there are twenty-eight possible sets of dimensions for the factors of Vmin ↓H that have a good trace of an element of order 3, and we exclude those that do not have at least five 2s – bringing us down to sixteen sets – and those that do not have three 4s as needed by Proposition 5.7. We apply this lemma again to see that we cannot have too many 2s per 4, and this brings us down to six possible sets of dimensions, given in the table below. Case 5 16 4 8 10 4 4 ,2 ,1 4 ,2 ,1 Number Conspicuous 31 is blueprint 1939938 3 2 4866862 14 14 8, 47 , 28 , 14 11325600 30 28 16, 45 , 28 , 14 990990 7 3 11561550 45 45 1501500 19 18 2 6 6 8 ,4 ,2 ,1 4 6 4 16, 8, 4 , 2 , 1 4 This leaves just six sets of composition factors that are not guaranteed to be blueprints for Vmin ↓H . These are 81,4,5 , 423,5 , 421,3 , 421,5 , 42,3 , 224 , 223 , 222 , 221 , 14 , 161,2,3,4 , 41,4 , 41,3 , 41,5 , 423,4 , 25 , 224 , 23 , 222 , 221 , 14 , 161,2,4,5 , 42,5 , 43,5 , 422,4 , 43,4 , 225 , 224 , 22 , 231 , 14 , 161,2,3,5, 422,5 , 421,3 , 42,3 , 224 , 223 , 222 , 221 , 14 , 161,3,4,5 , 41,4 , 41,5 , 424,5 , 42,3 , 225 , 223 , 22 , 231 , 14 , 161,2,3,4, 81,3,4 , 41,4 , 42,4 , 43,4 , 42,3 , 25 , 23 , 222 , 221 , 14 . 70 They all have corresponding sets of composition factors on L(G), but the easiest way to eliminate them is to consider the modules W and W ′ from the case of two trivial factors: in each of the six cases, we have at most two trivial factors in W ′ , and so H must always fix a line or 2-space on Vmin , as needed. When a = 6, we have exactly the same possible dimensions for composition factors for Vmin ↓H as for a = 5. The traces of semisimple elements of order up to 21 are known, but not 63 or 65, so we can check if a set of composition factors are conspicuous up to 21. Letting x be an element of order 63 in H, we note that we have a list of all semisimple elements of order 21 in G, but not 63, so we use the preimage trick from Section 4.2 firstly to see if the composition factors are conspicuous up to 63, and then use the preimage trick again to see if there exists an element x̂ of order 63 · 5 = 195 with the same eigenspaces as x and with x̂5 = x. In every case, we find that the element of order 63 is a blueprint for Vmin . Case 6 15 4 ,2 ,1 5 2 13 8, 4 , 2 , 1 2 4 2 11 8 ,4 ,2 ,1 2 49 , 29 , 12 8, 48 , 27 , 12 6 7 2 7 5 2 16, 4 , 2 , 1 2 8 ,4 ,2 ,1 5 5 16, 8, 4 , 2 , 1 2 3 5 16 , 4 , 2 , 1 3 6 3 8 ,4 ,2 ,1 2 4 2 2 2 3 16, 8 , 4 , 2 , 1 2 32, 44 , 23 , 12 2 2 3 16 , 8, 4 , 2 , 1 2 Case 5 16 4 8 10 4 4 ,2 ,1 4 ,2 ,1 Number Conspicuous up to 21 Conspicuous up to 63 63 is blueprint 100155870 6 6 6 332095680 22 3 3 467812800 60 18 18 272669110 164 21 21 844192800 1201 40 40 76744800 254 16 16 1025589600 3079 93 93 146512800 1203 59 59 3427200 53 20 20 557110500 2665 54 54 89964000 996 63 63 171360 14 5 5 2688000 58 18 18 Number Conspicuous up to 21 Conspicuous up to 63 63 is blueprint 39437442 4 4 4 160048350 170 19 19 8, 47 , 28 , 14 498841200 792 47 47 16, 45 , 28 , 14 37414170 61 12 12 626754246 1484 85 85 70686000 146 37 37 2 6 6 8 ,4 ,2 ,1 4 6 4 16, 8, 4 , 2 , 1 4 This completes the proof for 3 6 a 6 6, as needed. We are left with H having at least six trivial composition factors, where by the remarks at the start of this subsection we noted that if a = 5, 6 then H is always a blueprint for Vmin . Proposition 10.5 Suppose that a > 3 and Vmin ↓H has at least six trivial composition factors. (i) If a = 3 then Vmin ↓H has a 1- or 2-dimensional submodule or Vmin ↓H is 8 ⊕ P (41,2 ) ⊕ P (42,3 ) ⊕ P (41,3 ). (ii) If a = 4 then H is a blueprint for Vmin or H fixes a subspace of dimension at most 2 on Vmin . 71 (iii) If a > 5 then H is a blueprint for Vmin . Proof: (iii) follows from the remarks above. For (i) we use the proof of the previous proposition to note that the only possibility is that Vmin ↓H is the sum of three P (4)s and an 8, so we consider the ten possible such modules, and note that only one has a conspicuous set of composition factors for Vmin ↓H , the one mentioned. We are left with a = 4. Here we use only non-blueprint elements of order 17 to restrict the number of possibilities. We also assume that Vmin ↓H has positive pressure, else H fixes a line on Vmin , and has at least two 4s, else it would fix a 2-space on Vmin . Remove any 8s and 16s in the top and socle of Vmin ↓H , together with any simple summands of dimension 4, leaving a self-dual module W whose top and socle consist of 4-dimensional modules, with W having all trivial factors in Vmin ↓H . The projectives P (41,2 ) and P (41,3 ) both have exactly four trivial composition factors, and have dimension 64. Therefore we cannot have the whole projective, so remove the simple top, then any 1-, 2- and 8dimensional modules from the top to find the following modules: 41,2 , 42,4 /22 , 24 /1, 43,4 /23 , 24 /1, 41,2, 42,4 /22 , 81,2,4 /41,2 ; 41,4 , 42,3 /21 , 23 /1, 1, 41,3, 41,3 , 42,4 /21 , 22 , 23 , 24 /1, 41,4, 42,3 /21 , 23 /41,3 . From this we see that we need at least two 4s in the socle, and can have two only if they are both 41,3 or 42,4 . This means that we need either three different 4s appearing in Vmin ↓H with multiplicity at least two, or 441,3 , 442,4 or 421,3 , 422,4 . Using the traces of non-blueprint semisimple elements of order 17, and traces of all elements of order 3, 5 and 15, we end up with, up to field automorphism, ten conspicuous sets of composition factors with at least six trivials, positive pressure, and at least two 4s. These are 421,3 , 421,4 , 422,3 , 241 , 222 , 243 , 224 , 18 , 431,3 , 41,4 , 432,3 , 241 , 222 , 243 , 24 , 16 , 421,3 , 421,4 , 42,3 , 423,4 , 241 , 232 , 223 , 224 , 16 , 81,3,4 , 431,3 , 421,4 , 42,4 , 241 , 22 , 223 , 224 , 16 , 16, 41,3, 41,4 , 423,4 , 231 , 232 , 23 , 224 , 16 , 82,3,4 , 421,3 , 421,4 , 423,4 , 241 , 232 , 224 , 16 , 81,2,4 , 82,3,4 , 431,3 , 422,4 , 241 , 22 , 223 , 16 , 82,3,4 , 41,2 , 41,3 , 422,3 , 423,4 , 231 , 222 , 223 , 224 , 16 , 821,3,4 , 421,3 , 41,4 , 42,3 , 42,4 , 231 , 223 , 224 , 16 , 821,2,3 , 41,2 , 41,3 , 41,4 , 422,3 , 221 , 222 , 223 , 24 , 16 . By our previous remarks, in all but the first three cases H must fix either a 1-space or a 2-space on Vmin , as needed. In those three cases, all 4s that appear with multiplicity greater than 1 must appear in the socle of Vmin ↓H . The first case we saw before in Proposition 10.2, but we will come back to it. In the second case we take the preimages of the {1, 2, 42,3}-radicals of P (41,3 )/41,3 , P (41,4 )/41,4 and P (43,4 )/43,4 to produce three modules in whose direct sum rad(W ) is a submodule, but these are 1/22 , 23 , 24 /1, 42,3 /21 , 23 /41,3 , 21 /1/22/1/21/41,4 , 24 /1/21/1/24 /43,4 , and rad(W ) cannot have a trivial quotient, so there are only five 1s in W , a contradiction. In the third case we do the same thing, but with the {1, 21, 22 , 24 , 82,3,4 }-radicals, to get 21 /41,3 , 21 /1/22/1/21 /41,4 , 72 24 /1/21 /1/24, 82,3,4 /43,4 , and clearly we have a contradiction here. Back to the first case, the appropriate modules here are 22 , 24 /1/21 , 23 /41,3 , 21 /1/22/1/21 /41,4 , so we again must stabilize a 2-space on Vmin . 73 23 /1/24 /1/23/42,3 , 11 E7 in odd characteristic: PSL2 embedding In this section, k is a field of characteristic p > 3 and G = E7 (k), by which we mean the simply connected form, i.e., |Z(G)| = 2 and G′ = G. Let Ḡ be an almost simple group with socle G/Z(G). From [10] we see that v(E7 ) = 75 for odd integers, so if H is any subgroup of G with a semisimple element of odd order 77 or more, then H is a blueprint for Vmin . In addition, in [9] we prove that PSL2 (9) cannot be a maximal subgroup of Ḡ either, so here we let H = PSL2 (pa ) with a = 3, 4 if p = 3 and pa 6 150 = 2 · v(E7 ) if p > 5. Let L = PSL2 (p) 6 H and let u denote a unipotent element of L of order p. By Proposition 4.10, if a semisimple element x has order at least 31 in G and centralizes a 6-space on Vmin , then x is a blueprint for Vmin . Since any semisimple element in H has a 1-dimensional 1-eigenspace on every odd-dimensional simple module, if H has at least six odd-dimensional composition factors on Vmin and then pa > 60 then H is a blueprint for Vmin . This normally ends up being the case. 11.1 Characteristic 3 Now let H = PSL2 (3a ) for some a > 1. Since v(E7 ) = 75, we assume that a 6 4, and from [9] we assume that a 6= 2, so a = 3, 4. If a = 4 then we may assume that there are fewer than six odd-dimensional composition factors in Vmin ↓H , by the discussion at the start of this section. We begin by computing the composition factors of Vmin ↓L , which depends only on the trace of an involution, ±8. This means that there are eight more of one factor than the other, so 312 , 120 and 316 , 18 . From Lemma 5.8 we can see the possible dimensions of composition factors for Vmin ↓H : if Vmin ↓L has factors 316 , 18 then we must have at least eight 3-dimensional factors in Vmin ↓H , and if the factors are 312 , 120 then as only 9 and 1 for H have more 1s than 3s on restriction to L, we need at least eight of these in Vmin ↓H , and again have at least eight odd-dimensional composition factors in Vmin ↓H . This gives us the first proposition. Proposition 11.1 Let p = 3 and a = 4. A semisimple element of order 41 in H is always a blueprint for Vmin , and hence H is always a blueprint for Vmin . We turn to a = 3, where we cannot quite get the same result, but we come close. Proposition 11.2 Let p = 3 and a = 3. Either H is a blueprint for Vmin or H fixes a line on either Vmin or L(G). Proof: As with F4 and E6 , we want to discount conspicuous sets of composition factors where a semisimple element is a blueprint for Vmin . We already know that there are 97 classes of semisimple elements of order 13 that are blueprints for the minimal module for F4 , and there are 188 classes of semisimple elements of order 13 in E7 whose 1-eigenspace is at least 8-dimensional, leaving 91 classes to which an element of order 13 in H can belong. Using this, we find up to field automorphism eight conspicuous sets of composition factors, two of which have negative pressure so will not be displayed. The other six are 91,3 , 491,3 , 31 , 18 , 441,2 , 441,3 , 442,3 , 18 , 932,3 , 451,2 , 41,3 , 15 , 461,2 , 391 , 32 , 12 , 41,2 , 451,3 , 42,3 , 391 , 1, 92,3 , 451,2 , 351 , 342 . The first and third have pressure 1 so fix a line on Vmin by Lemma 5.13. The second case fixes a line on Vmin by Lemma 5.12. 74 For the fourth, if H does not fix a line on Vmin then we may assume that the socle consists of 41,2 s by quotienting out any 3s in the socle, and the {1, 31 , 32 , 41,2 }-radical of P (41,2 ) is 41,2 /1, 32 /41,2 , but since there is only one 32 in Vmin ↓H we cannot cover both trivials in this way, thus H fixes a line on 10 6 21 Vmin . (Alternatively, the factors of H on L(G) are 416 1,2 , 31 , 32 , 1 , so H fixes a line on L(G).) The fifth case is 41,2 , 42,3 , 451,3 , 391 , 1, which yields a set of composition factors on L(G) of 10 16 451,2 , 452,3 , 411 1,3 , 31 , 33 , 1 , which has pressure 5, and so might not have a trivial submodule or quotient. However, the largest submodule of P (4i,j ) with these composition factors has three trivial composition factors in all cases, and so we need at least six 4s in the socle of L(G) ↓H (once we remove all 3s), contradicting the fact that the module has pressure 5, so we fix a line. The final case is 91,2 , 451,2 , 351 , 342 . The 9 splits off and we may quotient out by the {31 , 32 }-radical to get a module with 41,2 s in the socle. On this we can only place 32 s, and so u would act on Vmin as 317 , 15 , not a valid unipotent action in [13, Table 7], so H cannot embed with these factors. 11.2 Characteristic at least 5 We now let p > 5, let H = PSL2 (pa ) with a > 1, let L = PSL2 (p) 6 H and let u ∈ L have order p. We begin by producing a list of all unipotent classes to which u can belong, excluding those that come from generic classes (see Lemma 4.6) and those that fail Lemma 5.15. Moreover, we make a few remarks now about indecomposable modules for L, which can cut down our list. When p = 5, 13, 17, we use Corollary 5.18, so for these primes the number of blocks of each even size less than p − 1 is even. For p = 7, 11, 19, 23, there exists a unique indecomposable module for L of dimension congruent to a given even number modulo p. For p = 11, the self-dual module of dimension congruent to 6 modulo p has socle structure 1, 3, 5, 7, 9/1, 3, 5, 7, 9 and has dimension 50. The trace of an involution on the module is 0, and since involutions have trace ±8 on Vmin , we would need a trace of ±8 from the remaining factors of Vmin ↓L , a module of dimension 6, so not possible. Thus this is not a summand of Vmin ↓L . For p = 19, the module of dimension congruent to 6 modulo p has socle structure 5, 7, 9, 11, 13, 15/5, 7, 9, 11, 13, 15 and has dimension 120, so cannot be a summand of Vmin ↓L . For p = 23 the module of dimension congruent to 10 modulo p has socle structure 3, 5, 7, 9, 11, 13, 15, 17, 19, 21/3, 5, 7, 9, 11, 13, 15, 17, 19, 21 and has dimension 240, so cannot be a summand of Vmin ↓L . We now list the unipotent classes of interest using [13, Table 7]. (i) A3 + A2 , p = 5, acting as 56 , 42 , 34 , 22 , 12 ; 75 (ii) A4 , p = 5, acting as 510 , 16 ; (iii) A4 + A1 , p = 5, acting as 510 , 22 , 12 ; (iv) A4 + A2 , p = 5, acting as 510 , 32 ; (v) (A5 )′′ , p = 7, acting as 72 , 67 ; (vi) D4 + A1 , p = 7, acting as 76 , 25 , 14 ; (vii) D5 (a1 ), p = 7, acting as 76 , 32 , 22 , 14 ; (viii) (A5 )′ , p = 7, acting as 74 , 64 , 14 ; (ix) A5 + A1 , p = 7, acting as 74 , 63 , 52 ; (x) D5 (a1 ) + A1 , p = 7, acting as 76 , 4, 25 ; (xi) D6 (a2 ), p = 7, acting as 76 , 52 , 4; (xii) E6 (a3 ), p = 7, acting as 76 , 52 , 14 ; (xiii) E7 (a5 ), p = 7, acting as 76 , 6, 42 ; (xiv) A6 , p = 7, acting as 78 ; (xv) D6 , p = 11, acting as 114 , 10, 12; (xvi) E6 (a1 ), p = 11, acting as 114 , 52 , 12 ; (xvii) E7 (a3 ), p = 11, acting as 114 , 10, 2; (xviii) E6 , p = 13, acting as 134 , 14 ; (xix) E7 , p = 19, acting as 192 , 18. We start with p = 5, proving that there are always at least six odd-dimensional summands so that we can assume that a = 1, 2 when doing the hard work. Proposition 11.3 Let p = 5 and a > 1. (i) If a = 1, 2 then H fixes a line on either Vmin or L(G). (ii) If a > 3 then H is a blueprint for Vmin . Proof: The traces on elements of orders 2 and 3 yield conspicuous sets of composition factors for L = PSL2 (5) of 312 , 120 , 52 , 314 , 14 , 59 , 33 , 12 , 56 , 36 , 18 . As we have seen, only P (3) = 3/1, 3/3 has a trivial composition factor and no trivial submodule or quotient, and so the first, third and fourth cases all fix lines on Vmin . However, in the third case this means that L cannot embed with these factors: as it fixes a line on Vmin , from Lemma 2.5 we see that L lies in either an E6 -parabolic, with factors 1, 1, 27, 27∗ or a B5 -subgroup, factors 1, 1, 112, 32, neither of which is compatible with 59 , 33 , 12 , so this case cannot occur. 76 For the remaining case of 52 , 314 , 14 , we switch to the Lie algebra. There are two possibilities for the corresponding composition factors of L(G) (since an element of order 3 with trace 2 on Vmin can have trace either −2 or 7 on L(G)) are 510 , 322 , 117 , and 513 , 319 , 111 , both of which must have trivial submodules as again we can only cover a 1 by 3/1, 3/3. This proves (i). Recall from Lemma 5.24 that the only simple modules for H with non-trivial 1-cohomology when a > 2 have dimension 8 and restrict to L as 5 ⊕ 3 by Lemma 5.21. When a = 2, if Vmin ↓L has composition factors 312 , 120 then Vmin ↓H has at least eight trivial composition factors and no factors of dimension 8, so Vmin ↓H has eight trivial summands. Similarly, if the composition factors of Vmin ↓L are 56 , 36 , 18 then Vmin ↓H must have at least two trivial composition factors by Lemma 5.21, and for every composition factor of dimension 8 we must have another trivial factor, so Vmin ↓H always has pressure at most −2, so (ii) holds. We thus may assume that Vmin ↓L has factors 52 , 314 , 14 . We have at most two 8s in Vmin ↓H since there are only two 5s in Vmin ↓L , and hence there can be at most a single trivial composition factor in Vmin ↓H , else H fixes a line on Vmin . We thus get two cases: there is a trivial composition factor and there is not. If there is a trivial factor we have 82 , 1 in Vmin ↓H , and the remaining factors of Vmin ↓H restrict to L as 312 , 13 , so we need factors 82 , 43 , 39 , 1. For a = 2, there is no such set of composition factors, so we cannot have a trivial composition factor in Vmin ↓H . For a = 2 there are up to field automorphism five possible sets of composition factors, which are 521 , 44 , 310 1 , 82,1 , 51 , 44 , 391 , 822,1 , 44 , 371 , 32 , 822,1 , 44 , 361 , 322 , 1522,1 , 42 , 341 , 322 . The fact that 4 has an extension with 31 and 32 (see Lemma 5.25) makes deducing the module structure difficult, and so we turn to the Lie algebra in all cases. These are 5 11 6 832,1 , 510 1 , 41,2 , 31 , 1 , 11 852,1 , 551 , 461,2 , 310 1 , 32 , 1 , 93 , 842,1 , 531 , 48 , 361 , 32 , 16 , 9, 872,1 , 531 , 351 , 332 , 17 , 1522,1 , 941,2 , 821,2 , 82,1 , 531 , 52 , 431,2 , 321 , 32 , 12 : each of these has non-positive pressure, as needed. (Remember that 82,1 has 1-cohomology but 81,2 does not by Lemma 5.24.) Finally, suppose that a > 3. From Lemma 5.21 we see the following facts: firstly, in any even-dimensional composition factor of Vmin ↓H there are the same number of 3s as 5s and 1s combined on restriction to L, and secondly, in any odd-dimensional factor of Vmin ↓H there is at most one more 5 and 1 combined than 3 on restriction to L. This means that if Vmin ↓L has factors 56 , 36 , 18 , there must be at least six odd-dimensional composition factors. Lemma 5.21 easily shows that if the factors of Vmin ↓L are 312 , 120 then there must be at least eight trivial factors in Vmin ↓H , and if we have 52 , 314 , 14 then we have at least six 3s in Vmin ↓H , so in all cases we have at least six odd-dimensional composition factors, so an element of order (pa ± 1)/2 > 30 has a 1-eigenspace of dimension at least 6. This means that H is a blueprint by Proposition 4.10, as needed for the proposition. Having completed p = 5, we now move on to p = 7. This time pa = 7, 49 will need to be considered, but pa = 343 is above 2 · v(E7 ) = 150. Proposition 11.4 Suppose that p = 7. 77 (i) If a = 1 then either H fixes a line on Vmin or L(G), or the actions of H on Vmin and L(G) are 7⊕4 ⊕ P (3)⊕2 7⊕5 ⊕ P (5)⊕6 ⊕ P (3). and (ii) If a = 2 then either H is a blueprint for Vmin or H fixes a line on Vmin . Proof: We first compute the possible composition factors of Vmin ↓H when a = 1, using the traces of elements of orders 2, 3 and 4. There are seven of these, given by 312 , 120 , 52 , 314 , 14 , 56 , 36 , 18 , 7, 59 , 3, 1, 72 , 56 , 32 , 16 , 74 , 52 , 36 , 76 , 114 . As in the case of p = 5, the only indecomposable module with a trivial composition factor but no trivial submodule or quotient is P (5) = 5/1, 3/5, so we need twice as many 5s as 1s and as many 3s as 1s. Thus all but the fourth and sixth cases must fix lines on Vmin . Case 4: If the factors are 7, 59 , 3, 1, then H cannot fix a line or hyperplane on Vmin , since by Lemma 2.5 the line stabilizers for Vmin are contained in either an E6 -parabolic – composition factors 27, 27∗, 12 – or a subgroup q 1+32 B5 (q) · (q − 1), – composition factors 32, 112, 12 – neither of which can work. As there are no self-extensions of the 5, Vmin ↓H is 7 ⊕ P (5) ⊕ 5⊕7 , with u acting as 73 , 57 , not in [13, Table 7], so there does not exist an embedding of H into G with these factors. Case 6: We are left with 74 , 52 , 36 . Here, the lack of trivials means that the possible summands are 3/5 ⊕ 5/3, 3/3 3/3, 5/3, 3/3, 5 ⊕ 3, 5/3, 3, 5/3, 5. Therefore we need an even number of 1s, 4s and 7s in the Jordan block structure of u, with at least four more 7s than the 1s, 2s and 4s combined. Examining the list above, we see only two examples of this, namely (xiii) and (xiv). this yields the two possible embeddings Vmin ↓H to be 7⊕4 ⊕ 3/3 ⊕ 3/3, 5 ⊕ 3, 5/3, and 7⊕4 ⊕ P (3)⊕2 . The traces of semisimple elements of orders 3 and 4 on Vmin yield two possibilities each for the semisimple class, and so we get four possible sets of composition factors for L(G) ↓H , namely 76 , 510 , 310 , 111 , 78 , 510 , 36 , 19 , 73 , 513 , 313 , 18 , 75 , 513 , 39 , 16 . Apart from the last one, each of these has enough trivials and not enough 5s to ensure that H fixes a line on L(G), since P (5) = 5/1, 3/5 is the only indecomposable module for H with a trivial factor but no trivial submodule or quotient. We now remove the first possible action on Vmin , using the simple fact that for p > 5, the symmetric square of Vmin is the sum of L(G) and the 1463-dimensional module L(2λ1 ), Lemma 2.1. The symmetric square of the first module is a sum of projectives and (3, 5/1, 3, 5 ⊕ 1, 3, 5/3, 5)⊕2 ⊕ 5 ⊕ 3 ⊕ 1. Since u comes from class E7 (a5 ), and this acts on L(G) as 717 , 5, 33 , we must have two of the summands of dimension 17 in L(G) ↓H , hence H fixes a line on L(G). This completes the proof for a = 1. 78 Now let a = 2, so that H = PSL2 (49), and recall that L 6 H is a copy of PSL2 (7). At the start of this proof we gave the conspicuous sets of composition factors for Vmin ↓L , and from Lemmas 5.23 and 5.24 we see that the only simple modules for H with non-trivial 1-cohomology have dimension 12 and restrict to L as 7 ⊕ 5, and only the trivial module for H restricts to L with more 1s than 3s. These two facts mean that if Vmin ↓L has factors the first, third, fifth and seventh cases then Vmin ↓H has trivial composition factors, and these are summands except for the fifth case, and there we have at least four trivials and at most two 12s, so pressure at most −2. The fourth case cannot occur, as we proved, so Vmin ↓L has factors either 52 , 314 , 14 , and Vmin ↓H can have no trivial factors else it has a trivial summand, or 74 , 52 , 36 . In the case of 52 , 314 , 14 , from Lemma 5.23, apart from 3, there are no simple modules for H whose restriction to L has more 3s than other factors, and the composition factors of Vmin ↓H have dimensions 1, 3, 4, 5, 8 and 9. In particular, this means that Vmin ↓H has at least eight 3-dimensional composition factors. By Lemma 5.26, of these modules only 8s can have an extension with 3s, with there being at most two of those, so the 3-pressure is at least 6. This means that Vmin ↓H has at least four 3-dimensional summands, so the action of the unipotent element u on Vmin has at least four Jordan blocks of size 3. There are no non-generic unipotent classes with this property, as we saw in the list at the start of this section, and so H is a blueprint for Vmin . Thus we end with Vmin ↓L being 74 , 52 , 36 , and Lemma 5.23 implies that H has at least two 7s and four 3s on Vmin . The remaining composition factors have dimension 3, 5, 7, 8, 12 or 15: using the traces of semisimple elements, we find exactly four conspicuous sets of composition factors for Vmin ↓H with the correct restriction to L, and for each of these the eigenvalues of an element of order 24 determine its conjugacy class, and this lies inside F4 , hence a blueprint by Lemma 4.9. Thus H is a blueprint for Vmin , as needed. Proposition 11.5 Suppose that p = 11. (i) If a = 1 then either H is a blueprint for Vmin or H fixes a line on Vmin . (ii) If a = 2 then H is a blueprint for Vmin . Proof: Let a = 1 firstly, and suppose that H is not a blueprint for Vmin , so in particular the class to which the unipotent u belongs is non-generic, thus cases (xv) to (xvii) from the start of this section. In each case we either have 52 or 10 in the action of u. A single block of size 10 (as Vmin is self-dual) must come from 5/5, and for the 52 the indecomposable modules of dimension congruent to 5 modulo 11 are 5 itself, 5, 7/3, 5, 7 and its dual of dimension 27, and 3, 5, 7, 9/1, 3, 5, 7, 9 and its dual, of dimension 49. Thus if we are in case (xvi), so u belongs to class E6 (a1 ) acting as 114 , 52 , 12 , we therefore have 5⊕2 as a summand of Vmin ↓H , or Vmin ↓H = 5, 7/3, 5, 7 ⊕ 3, 5, 7/5, 7 ⊕ 1⊕2 ; an involution x ∈ H acts with trace 0 on this module, so it is not allowed. Therefore in all cases Vmin ↓H has either 5/5 or 5⊕2 as a summand, contributing 2 to the trace of x. If u comes from class E7 (a3 ), acting as 114 , 10, 2, the self-dual module that can contribute 2 to the action of u is 5, 7/5, 7, so that Vmin ↓H has composition factors at least 72 , 54 . The only conspicuous sets of composition factors with this many 7s and 5s are 92 , 72 , 54 , 14 and 72 , 56 , 32 , 16 , with the latter being incompatible with the unipotent action and the former implying that Vmin ↓H is P (1)⊕2 ⊕ 5/5 ⊕ 5, 7/5, 7. Clearly therefore H fixes a line on Vmin . 79 For D6 and E6 (a1 ) we already have the composition factors of 52 , and the Jordan blocks 12 in the action of u come either from two trivial summands, so we are done, or come from 5/7 or 3/9 and their duals, on each of which x acts with trace 0. From the previous case we know that 5/7 yields P (1)⊕2 ⊕ 5/7 ⊕ 7/5 ⊕ M, where M is either 5⊕2 or 5/5, and again we fix two lines on Vmin . If we have 3/9 ⊕ 9/3, we again have a unique conspicuous set of composition factors, and this time it is the very similar P (1)⊕2 ⊕ 3/9 ⊕ 9/3 ⊕ M, where M is as before, proving the result. Now let a = 2, and suppose that H is not a blueprint for Vmin . In particular, by Proposition 4.10 there are at most four odd-dimensional composition factors in Vmin ↓H . When the composition factors of Vmin ↓L are 92 , 72 , 54 , 14 , as they are in two cases above, all of the 1s become trivial composition factors for H, as there are no 3s in Vmin ↓L . Also, because there are no 11s either, there can be no simple modules in Vmin ↓H with non-trivial 1-cohomology by Lemma 5.24, as a 20-dimensional module restricts as 11 ⊕ 9. Thus the potential embeddings of L into G with these factors, where L has a trivial submodule but no trivial summand, cannot be extended to embeddings of H into G. The same statement holds when the composition factors are 94 , 52 , 32 , 14 , as we have at least two trivial composition factors. Thus we may assume that Vmin ↓L has two trivial summands, along with the two 5s, with the rest being projective. The conspicuous such modules are 11⊕2 ⊕ P (1)⊕2 ⊕ 1⊕2 ⊕ M and P (9)⊕2 ⊕ 1⊕2 ⊕ M. The first case has six trivial factors and no 3s, so Vmin ↓H has six trivial factors and hence H is a blueprint for Vmin . In the second case there are two more trivials than 3s so Vmin ↓H has two trivial factors, and Vmin ↓L has four 9s and no 7s or 11s, so Vmin ↓H has four 9s, thus H has six odd-dimensional factors on Vmin and so is a blueprint for Vmin , as needed. For p = 13, since 169 > 150 = 2 · v(E7 ), we need only consider a = 1. Lemma 11.6 Suppose that p = 13 and a = 1. Then either H is a blueprint for Vmin or H fixes a line on either Vmin or L(G). Proof: If H is not a blueprint for Vmin then u acts non-generically, and so we are in case (xviii) of the list of possible unipotent actions at the start of this subsection. Suppose that H has no trivial summand on Vmin , so that the 14 in the action of u all comes from indecomposables of dimension 14; this means that there are eight composition factors of dimensions between 3 and 11, as indecomposables of dimension 14 have the form i/(14 − i). Since the trace of an involution x is ±8, and the trace of x on i/(14 − i) is ±2, each of them has the same trace. Adding in the traces of elements of orders 3 and 4, the unique such set of composition factors is 112 , 74 , 32 . This gives Vmin ↓H as 11/3 ⊕ 3/11 ⊕ 7/7 ⊕ 7/7. Using these traces, we can determine two possibilities for the action of L on the adjoint module L(G): these are 133 , 11, 93 , 75 , 53 , 3, 13 and 132 , 113 , 94 , 7, 54 , 33 , 12 . Either way, H fixes a line on L(G), since the only module with a trivial factor but not a trivial submodule or quotient is P (11) = 11/1, 3/11. The proof is complete. 80 The last case is p = 19, where again we only have a = 1. Proposition 11.7 Suppose that p = 19 and a = 1. If H is not a blueprint for Vmin then H centralizes a 2-space on Vmin and is a non-G-cr subgroup of the E6 -parabolic acting on Vmin as P (1)⊕2 ⊕ 9/9. Proof: If H is not a blueprint for Vmin then in particular u is non-generic, and so we are in case (xix) from the list at the start of the section, i.e., u is regular and acts as 192 , 18. We need a self-dual indecomposable module of dimension congruent to 18 modulo 19, and there is only one of these by Lemma 5.17, namely 9/9, and the remainder of the module is projective. If x denotes an involution in H then x has trace ±8 on Vmin , and has trace 2 on 9/9, leaving a trace of 6 or −10 on the remaining projective summand. The trace of x on P (i) for 3 6 i 6 17 is ±2, the trace of x on 19 is −1, and on P (1) it is 3. Thus Vmin ↓H is P (1)⊕2 ⊕ 9/9, as needed. This non-G-cr subgroup was constructed at the end of Section 9. 81 12 E7 in odd characteristic: SL2 embedding In this section, k is a field of characteristic p > 3 and G = E7 (k), by which we mean the simply connected form, i.e., |Z(G)| = 2 and G′ = G. Let Ḡ be an almost simple group with socle G/Z(G). From [10] we see that v(E7 ) = 75 for odd integers, so if H is any subgroup of G with a semisimple element of odd order 77 or more, then H is a blueprint for Vmin , with the same holding for NḠ (H). In addition, in [9] we prove that SL2 (9) cannot yield a maximal subgroup of Ḡ either, so here we let H = SL2 (pa ) with a = 3, 4 if p = 3 and pa 6 150 = 2 · v(E7 ) if p > 5. In order for H not to be contained in a centralizer of a non-central involution, we require that Z(G) = Z(H). Let L = SL2 (p) 6 H and let u denote a unipotent element of L of order p. On Vmin , since we consider SL2 (pa ) rather than PSL2 (pa ), there can be no trivial composition factors in Vmin ↓H , but rather 2-dimensional factors. We will thus normally aim to show that H is a blueprint for Vmin , that H fixes a line on L(G), or that H fixes a 2-space on Vmin . 12.1 Characteristic 3 We let p = 3 and a = 3, 4. We begin with the case where the action of H = SL2 (3a ) on Vmin is definable over a subfield of F3a . Proposition 12.1 Suppose that p = 3, that a = 3, 4, and that the composition factors of Vmin ↓H are invariant under a non-trivial field automorphism of H. (i) If a = 3 then the composition factors of Vmin ↓H are either 8, (21 , 22 , 23 )8 , or 84 , (21 , 22 , 23 )4 ; in the first case H fixes a line on L(G), and in the second case NḠ (H) is contained in a member of X σ. (ii) The case a = 4 cannot occur. Proof: For a = 4, it turns out that the traces of semisimple elements of orders 5 and 8 are enough to eliminate all possible sets of composition factors for Vmin ↓H , so we concentrate on the case a = 3. The traces of semisimple elements of H are enough to confirm the first part of this statement. If the composition factors of Vmin ↓H are 8, (21 , 22 , 23 )8 then the composition factors of H on L(G) are (41,2 , 42,3 , 41,3 )8 , (31 , 32 , 33 ), 128 , which has pressure −4 and so H fixes a line on L(G). Suppose therefore that the composition factors of Vmin ↓H are 84 , (21 , 22 , 23 )4 , and to start that there is an 8 in the socle of Vmin ↓H . Let y be the diagonal matrix with entries ζ and ζ −1 , where ζ is a primitive 26th root of unity. The eigenvalues of y 2 on 8 are 12 , ζ ±4 , ζ ±10 , ζ ±12 , and so we look for elements of order 26 in G that square to y 2 and stabilize these eigenspaces of the action of y 2 on Vmin : in fact, there are elements of G lying in seven distinct conjugacy classes of semisimple elements, one of which contains y itself, and all of which have no (−1)-eigenspace on L(G). Any of these can be used with Corollary 4.14, but taken together they show that the stabilizer of an 8 that is a submodule of Vmin ↓H must be very large, and in particular positive dimensional. 82 Thus 8 is not a submodule of Vmin ↓H . If a 2i submodule is stabilized by NḠ (H) and Ḡ then H is contained inside a member of X σ , so we may assume that this is not the case, either because NḠ (H) induces the field automorphism on H or that no 2i is σ-stable (because k does not contain F27 for example). In this case there must be an NḠ (H)-stable H-submodule W isomorphic to 21 ⊕ 22 ⊕ 23 , and the eigenvalues of y 2 on W are ζ ±2 , ζ ±6 and ζ ±8 . In this case we do the same as for 8, finding again seven distinct classes containing elements that square to y 2 and preserve these eigenspaces. Thus NḠ (H) is always contained in a member of X σ as needed. We may now attack the case of a = 3. We will not prove anything specific about the embeddings of H into G, except that they are always contained in positive-dimensional subgroups. Proposition 12.2 Suppose that p = 3 and a = 3. The subgroup NḠ (H) is contained inside a member of X σ. Proof: There are 284 conspicuous sets of composition factors for Vmin ↓H , but only 137 of these have corresponding sets of factors on L(G), each of these being unique. Of these, seventy-seven have either no 2i or positive 2i -pressure for each i = 1, 2, 3, and of these only sixty-seven have either no trivial or positive pressure on L(G). One of these is invariant under the field automorphism, which we saw earlier, so we are left with twenty-two sets of composition factors, up to field automorphism. The module 2i has non-split extensions only with 2i±1 , 6i−1,i and 8, so if there are 2s but no 6i,i−1 or 8 appearing with multiplicity 2 or above, then H fixes a 2-space on Vmin : two sets of composition factors (up to field automorphism) satisfy this, so we are down to twenty sets of composition factors. There are eighteen (six up to field automorphism) sets of composition factors with no 8s, and since 2i only has extensions with the 8, 2i±1 and 6i−1,i , and of course there can be no 2s in the socle of Vmin ↓H , the socle must consist of 6i−1,i s, plus modules we can remove without exposing 2s. In each case there is a unique i such that 6i−1,i appears with multiplicity at least 2, so this must be the socle and all 2s must be stacked on top of it in some way. In each case we cannot place enough 2s on top of each 6i−1,i , and so we must fix a 2-space in all these cases. This reduces us to fourteen sets of composition factors. Thus we have at least one 8 in Vmin ↓H . There are five conspicuous sets of composition factors with a single 8, up to field automorphism, namely 8, 622,1 , 623,1 , 261 , 242 , 223 , 8, 621,3 , 62,3 , 623,1 , 251 , 222 , 223 , 8, 621,2 , 622,1 , 63,1 , 63,2 , 221 , 222 , 223 , 8, 653,1 , 251 , 222 , 223 , 182,3,1 , 8, 62,1 , 623,1 , 231 , 22 , 223 , Since there is a single 8, we must still have the 6i−1,i s in the socle, and so again we can eliminate these cases as follows: each of these only has a single 6i−1,i appearing with a non-unital multiplicity, and it appears with multiplicity 2, so this appears once in the socle and all 2s lie above this, so we consider the {2, 6, 8}-radical of P (61,2 ), and then remove all quotients that are not 61,2 , since Vmin is self-dual. This module is 61,2 /22 /23 /22 /61,2 , and so we can only support three 2s, but there are clearly far too many. This is enough to complete the first four cases, but the fifth has an 18. We take the appropriate radical of P (63,1 ), and again remove all composition factors from the top that are not 63,1 , to get the module 63,1 /21 /22 , 63,1 /21 , 62,1 , 182,3,1 /63,1 , 83 which does not have a 23 in it. Thus all these conspicuous sets of composition factors yield a stabilized 2-space. Thus we are down to nine, which are below. 82 , 622,1 , 61,2 , 63,1 , 241 , 232 , 23 , 82 , 623,2 , 62,1 , 623,1 , 221 , 222 , 23 , 82 , 62,1 , 61,3 , 623,1 , 241 , 222 , 223 , 82 , 61,3 , 63,1 , 622,3 , 61,2 , 221 , 222 , 23 , 181,2,3 , 82 , 62,1 , 63,1 , 221 , 222 , 23 , 181,2,3 , 83 , 61,3 , 231 , 22 , 82 , 623,2 , 61,2 , 62,1 , 63,1 , 61,3 , 21 , 22 , 82 , 63,2 , 62,1 , 62,3 , 621,3 , 221 , 222 , 23 , 181,2,3 , 82 , 62,1 , 61,3 , 231 , 222 . Recall that 2i has extensions with 2i±1 , 6i−1,i and 8, and no other simple modules. Cases 1,6,7,8,9: In the first, sixth, seventh, eighth and ninth cases, 6i−1,i does not occur with multiplicity greater than 1 for all i, and so if it occurs in the socle then it is a summand. Therefore, for these six sets of composition factors, we can remove all quotients and submodules from Vmin ↓H other than 8, and yield a submodule W of P (8), which contains all composition factors of dimension 2 in Vmin ↓H . The {2i , 6i,i+1 , 6i+1,i , 181,2,3 }-radical of P (8)/ soc(P (8)) is 21 , 22 , 23 , 61,2 , 62,3 , 63,1 /21 , 22 , 23 , 62,1 , 63,2 , 61,3 /8, and so if W has two 8s and three 2i s then H must stabilize a 2-space on Vmin , eliminating the first and ninth cases immediately. It also means that W has at most four socle layers except for the eighth case, which we eliminate easily, since the {21 , 22 , 61,3 , 8, 181,2,3 }-radical of P (8) is 8/21 , 22 , 61,3 /8, which doesn’t have enough 21 s, so H fixes a 2-space of Vmin . Since W has at most four socle layers and is self-dual, none of the 6i,i+1 can occur in W . Also, any 2i that occurs with multiplicity 1 in Vmin ↓H must occur in the second socle layer, and cannot have any extensions with a 2i±1 in the third socle layer. However, both 2i±1 in the third layer have an extension with the 2i in the second layer, so cannot exist in W . In other words, we cannot have two 2i in W , eliminating the sixth and seventh cases. Case 5: Remove all composition factors from the top and bottom of Vmin ↓H to yield a module W with socle a submodule of 8 ⊕ 62,3 and all 2s in it. The preimages of the {21 , 22 , 23 , 61,2 , 61,3 , 62,3 }-radical of the module P (8)/ soc(P (8)) and {21 , 22 , 23 , 61,2 , 61,3 , 8}radical of P (62,3 )/ soc(P (62,3 )) are 21 , 22 , 23 , 62,3 /21 , 22 , 23 , 61,3 /8 22 , 23 /21 , 8/23, 61,3 /62,3 , and the fact that there is a single 23 means it must lie in the second socle, and has no extensions with the other 2i composition factors. But then all other 2i s lie in the second socle layer as well, and that means we cannot fit enough 2s in, so H fixes a 2-space on Vmin . Cases 2,3,4: Here we wish to apply Corollary 4.14, so let y be the diagonal matrix with entries ζ 2 , ζ −2 for ζ a primitive 26th root of unity, so that y has order 13 and acts with eigenvalues ζ ±2 on 21 . The eigenvalues of y 2 on 63,1 and 8 are ζ ±4 , ζ ±8 , ζ ±12 and 12 , ζ ±4 , ζ ±10 , ζ ±12 . If we can find an element ŷ of order 26 in G \ H that has no (−1)-eigenspace on L(G) and that stabilizes a submodule W of Vmin ↓H , then by Corollary 4.14 the subgroup hH, ŷi, which cannot be all of G, is not 84 almost simple modulo Z(G) either, and so by Proposition 3.3 the stabilizer of W , and any submodule of Vmin ↓H isomorphic to W , is contained in a member of X σ , and so H and indeed NḠ (H) are contained inside a member of X σ . In the third case, the composition factor 63,1 only has extensions with 21 and 62,1 from the composition factors of Vmin ↓H , so this must split off as a summand. In the second and fourth cases, if 8 is not a submodule of Vmin ↓H and Vmin ↓H does not a 2-dimensional submodule then Vmin ↓H is a submodule of P (63,1 ) and P (63,2 ⊕ 63,1 ) respectively. The cf(Vmin ↓H )-radical of P (63,1 ) in case 2 is 63,1 /21 , 23 /22 , 8/21 , 62,1 /63,1 , so 8 must be a submodule of Vmin ↓H . Similarly, the cf(Vmin ↓H )-radicals of P (63,1 ) and P (63,2 ) in case 4 is 62,1 /63,1 , 8/21 , 23 , 63,2 /22 , 8/21 , 62,1 /63,1 and 63,1 /21 , 62,1 /8/63,2 , so since there is no 222 in this, 8 must be in the socle of Vmin ↓H again. We have therefore proved that in cases 2 and 4, 8 must be a submodule, and in case 3, 63,1 must be a submodule. We therefore find, in each case, an element ŷ in G \ H of order 26, squaring to y 2 , and stabilizing the eigenspaces of the particular stabilized submodule. On Vmin these have eigenvalues 14 , (−ζ ±1 )6 , (ζ ±2 )4 , (ζ ±3 ), (−ζ ±3 )2 , (ζ ±4 )2 , (−ζ ±4 )3 , (ζ ±5 )3 , (−ζ ±6 )5 , 14 , (ζ ±1 )2 , (−ζ ±1 )2 , (−ζ ±2 )5 , (ζ ±3 )3 , (−ζ ±3 ), (ζ ±4 )4 , (ζ ±5 ), (−ζ ±5 )3 , (−ζ ±6 )5 , 14 , (ζ ±1 )2 , (−ζ ±1 ), (−ζ ±2 )6 , (ζ ±3 )4 , (−ζ ±3 ), (ζ ±4 )5 , (−ζ ±5 )3 , (−ζ ±6 )4 . Thus the result holds. Proposition 12.3 Suppose that p = 3 and a = 4. Either H is a blueprint for Vmin or the composition factors of Vmin ↓H are 184,2,3 , 821,2,3 , 81,2,4 , 61,3 , 64,1 , 21 , and NḠ (H) lies inside an element of X σ . Proof: Using semisimple elements of order up to 41, one whittles down the 55 million or so possible sets of composition factors for a module of dimension 56 to just 190 up to field automorphism, of which two fail the trace of an element of order 80, leaving 188. Of these, we consider an element y of order 41 in H, and whether there exists an element of order 123 in G cubing to y and stabilizing the same subspaces of Vmin . If this is true then y is a blueprint for Vmin since 123 > v(E7 ). Indeed, a computer check shows that this is true for 187 of the 188 semisimple elements involved. The remaining one comes from the conspicuous set of composition factors in the statement of the proposition, 184,2,3 , 821,2,3 , 81,2,4 , 61,3 , 64,1 , 21 , where y has 38 distinct eigenvalues on Vmin , and there exist elements of order 123 cubing to y and with 40 distinct eigenvalues, but none with 38. If ζ is a primitive root of unity then y can be chosen to have the following eigenvalues. 85 Module Eigenvalues 21 ζ ±1 61,3 ζ ±1 , ζ ±17 , ζ ±19 64,1 ζ ±12 , ζ ±14 , ζ ±16 81,2,3 ζ ±5 , ζ ±7 , ζ ±11 , ζ ±13 81,2,4 ζ ±10 , ζ ±12 , ζ ±16 , ζ ±18 184,2,3 ζ ±2 , ζ ±3 , ζ ±4 , ζ ±8 , ζ ±9 , ζ ±10 , ζ ±14 , ζ ±15 , ζ ±20 There exists an element ŷ of order 123 cubing to y and stabilizing all eigenspaces except for the ζ ±1 eigenspaces. Since 81,2,3 is the only composition factor to occur with multiplicity greater than 1, any other factor in the socle must be a summand. The module 81,2,3 only has extensions with 21 , 61,3 and 81,2,4 from the composition factors of Vmin ↓H , and so the structure of Vmin ↓H must be W ⊕ 64,1 ⊕ 184,2,3, where W consists of the remaining factors. Since ŷ stabilizes all but the ζ ±1 -eigenspaces, it fixes the 32 ⊕ 6 ⊕ 18 decomposition above, and if Ŷ denotes an infinite subgroup of G containing ŷ and stabilizing the same subspaces of Vmin as ŷ (which exists since 123 > v(E7 ) = 75), then X = hŶ , Hi certainly stabilizes the 6- and 18-dimensional summands of Vmin ↓H . Thus H is contained inside an element of X σ . 12.2 Characteristic at least 5 We now let p > 5: since there are elements of orders (pa + 1)/2 or (pa − 1)/2, and one of these is odd, we assume that pa 6 150. As all unipotent classes are generic for Vmin for all p > 29, we only need consider pa = 5, 7, 11, 13, 17, 19, 23, 25, 49, 121, 125. As for PSL2 (pa ), there are some restrictions we can place on the possible actions of a unipotent element u, above and beyond appearing on [13, Table 7], given by Lemma 5.16. This yields twenty-nine possible non-generic classes for various primes, as given below. (i) (A3 + A1 )′′ , p = 5, acting as 52 , 48 , 27 ; (ii) D4 (a1 ) + A1 , p = 5, acting as 56 , 4, 34 , 25 ; (iii) A3 + A2 , p = 5, acting as 56 , 42 , 34 , 22 , 12 ; (iv) A4 , p = 5, acting as 510 , 16 ; (v) A3 + A2 + A1 , p = 5, acting as 56 , 44 , 25 ; (vi) A4 + A1 , p = 5, acting as 510 , 22 , 12 ; (vii) A4 + A2 , p = 5, acting as 510 , 32 ; (viii) (A5 )′′ , p = 7, acting as 72 , 67 ; (ix) D4 + A1 , p = 7, acting as 76 , 25 , 14 ; (x) D5 (a1 ), p = 7, acting as 76 , 32 , 22 , 14 ; (xi) (A5 )′ , p = 7, acting as 74 , 64 , 14 ; 86 (xii) A5 + A1 , p = 7, acting as 74 , 63 , 52 ; (xiii) D5 (a1 ) + A1 , p = 7, acting as 76 , 4, 25 ; (xiv) D6 (a2 ), p = 7, acting as 76 , 52 , 4; (xv) E6 (a3 ), p = 7, acting as 76 , 52 , 14 ; (xvi) E7 (a5 ), p = 7, acting as 76 , 6, 42 ; (xvii) A6 , p = 7, acting as 78 ; (xviii) E7 (a4 ), p = 11, acting as 112 , 10, 8, 6, 42, 2; (xix) D6 , p = 11, acting as 114 , 10, 12; (xx) E6 (a1 ), p = 11, acting as 114 , 52 , 12 ; (xxi) E7 (a3 ), p = 11, acting as 114 , 10, 2; (xxii) E6 , p = 13, acting as 134 , 14 ; (xxiii) E7 (a3 ), p = 13, acting as 132 , 12, 10, 6, 2; (xxiv) E7 (a2 ), p = 13, acting as 134 , 4; (xxv) E7 (a2 ), p = 17, acting as 172 , 10, 8, 4; (xxvi) E7 (a1 ), p = 17, acting as 172 , 16, 6; (xxvii) E7 (a1 ), p = 19, acting as 192 , 12, 6; (xxviii) E7 , p = 19, acting as 192 , 18; (xxix) E7 , p = 23, acting as 232 , 10. Thus we need to consider p = 5, 7, 11, 13, 17, 19, 23, and we will examine each in turn. Proposition 12.4 Suppose that p = 5. (i) If a = 1 then H fixes a 2-space on Vmin . (ii) For a = 2, one of the following holds: H and NḠ (H) fix a 2-space on Vmin ; H fixes a line on L(G) or H stabilizes a 4-space on Vmin that has a positive-dimensional stabilizer; H stabilizes an sl2 -subalgebra of L(G). (iii) If a = 3 then an element of order 63 in H is a blueprint for Vmin , and hence H is a blueprint for Vmin . Proof: Only the element of order 3 is important here, and it has trace one of −25, −7, 2, 20, with the last case not possible, and so we get 4, 226 , 47 , 214 , 410 , 28 . As P (4) = 4/2/4, each of these must fix a 2-space on Vmin , as claimed. When a = 2, there are 106 conspicuous sets of composition factors for Vmin ↓H , but fifty of these have no corresponding set of composition factors for L(G), so can be ignored. None of the 106 sets is definable 87 over F5 , so if H stabilizes a line on L(G) or a 2-space on Vmin then we are done. Removing those sets of factors with non-positive 2i -pressure (and at least one 2i ) leaves eighteen, nine up to field automorphism of H. Exactly one of these has two possible sets of composition factors on L(G), one of which has a single trivial and a single 8-dimensional, so that second option will be ignored as having pressure 0. Of the other eight, which all have a unique corresponding set of composition factors on L(G), three have non-positive pressure and trivial factors, so that leaves us with six conspicuous sets of composition factors on Vmin . Up to field automorphism of H, these are 1221,2 , 101,2 , 422 , 421 , 231 , 121,2 , 101,2 , 62,1 , 621,2 , 432 , 221 , 121,2 , 122,1 , 102,1 , 62,1 , 61,2 , 42 , 41 , 21 , 121,2 , 1021,2 , 62,1 , 61,2 , 42 , 41 , 22 , 21 , 1221,2 , 102,1 , 101,2 , 61,2 , 41 , 21 , 1222,1 , 101,2 , 631,2 , 41 . The simple modules with extensions with 21 are 42 , 62,1 and 121,2 . Case 1: This has pressure 1, and we may assume that we have a submodule of P (121,2 ) or P (42 ) with three 21 s. The {21 , 41 , 42 , 101,2 , 121,2 }-radicals of these two modules are 101,2 /121,2 /21 , 41 , 101,2 /121,2 and 42 /21 /42 , so H fixes a 2-space on Vmin . Case 2: The corresponding submodule of P (42 ) in the second case is also 42 /21 /42 , so again this fixes a 2-space on Vmin . Cases 3, 4: The 21 -pressure is 1, but the only simple module with multiplicity more than 1 is 101,2 , so 21 (and 22 ) split off, and the result holds again, and of course the same idea works for the fourth case. Case 6: There are no extensions between the simple modules involved so Vmin ↓H is semisimple. The corresponding composition factors for L(G) ↓H have no extensions between them either and so the restriction is also semisimple, acting as ⊕3 ⊕3 ⊕3 151,2 ⊕ 15⊕2 ⊕ 51 ⊕ 52 ⊕ 3⊕4 2,1 ⊕ 9 1 ⊕ 32 . Write x for an element of order 13. Choosing ζ a primitive 13th root of unity appropriately (so that x acts on 21 with eigenvalues ζ ±1 ) the eigenvalues of x on Vmin are 14 , (ζ ±1 )7 , (ζ ±2 )6 , (ζ ±3 )3 , (ζ ±4 )6 , ζ ±5 , (ζ ±6 )3 . Looking through the elements of order 26 in E7 , we find one x̂ that squares to x, and if θ is a primitive 26th root of 1 with θ2 = ζ, we have that the eigenvalues of x̂ are 14 , (θ±1 )7 , (θ±2 )6 , (θ±3 )3 , (θ±4 )6 , θ±5 , (θ±6 )2 , (−θ±6 ). This stabilizes the 4-space of Vmin stabilized by H (as well as the 6-spaces and the sum of the 12- and 10-spaces), so the stabilizer Y of this 4-space is either an almost simple group PGL2 (25) modulo Z(G) or H is not the socle of an almost simple maximal subgroup. The eigenvalues of x̂ on L(G) are 117 , (θ±1 )10 , (θ±2 )13 , (θ±3 )12 , (θ±4 )6 , (θ±5 )8 , (−θ±5 )3 , (θ±6 )4 , (−θ±6 )2 , so hH, x̂i is not PGL2 (25) by Corollary 4.14. By Proposition 3.3, either H is contained in a member of X σ or H is contained in a copy of the Rudvalis group Ru (which is really 2 · Ru) acting on Vmin as 28 ⊕ 28∗ by the table in [23]. Since this is incompatible with the action of H, we get that H is contained inside a member of X σ , and this 4-space stabilizer must itself be positive dimensional. 88 Case 5: The 102,1 must split off as it has no extensions with the 121,2 , but the rest of the composition factors of Vmin ↓H can lie above it, and there is a unique module 102,1 ⊕ 121,2 /21 , 41 , 61,2 , 101,2 /121,2 , with u acting as 510 , 32 , class A4 + A2 . The action of u on the direct sum of the composition factors of Vmin ↓H has block structure 58 , 42 , 24 , and examining [13, Table 7], we see that there are only two possible actions for u: 510 , 32 and 510 , 22 , 12 . Thus the 41 and 61,2 cannot be summands (as they both have a 4 in the action of u), and we assume that the 21 is not a submodule, so if Vmin ↓H is not the module above then only the 101,2 can be removed from the non-simple summand. However, the {21 , 41 , 61,2 , 121,2 }-radical of P (121,2 ) is 121,2 /21 , 41 , 61,2 /121,2, but with a 61,2 quotient, not allowed. Thus Vmin ↓H is as above, and in particular the symmetric square of this has L(G) ↓H as a summand (since S 2 (Vmin ) = L(G) ⊕ L(2λ1 )). The composition factors of L(G) ↓H are 16, 1521,2, 1522,1 , 821,2 , 832,1 , 321 , 332 , 12 , and u must act on L(G) as 526 , 3. There are only six isomorphism types of indecomposable module appearing as a summand of S 2 (Vmin ↓H ) whose composition factors appear on the list above, and these have structures 31 , 152,1 , 82,1 /1, 32/82,1 , 152,1 /82,1 /1, 32/82,1 /152,1 , 151,2 /81,2 /1, 31 /81,2 /151,2, 32 /82,1 , 16/32, with the second module appearing only once. There is only one way to assemble these summands into a module with the right unipotent action and composition factors, and this is 152,1 /82,1 /1, 32/82,1 /152,1 ⊕ 151,2 /81,2 /1, 31/81,2 /151,2 ⊕ 32 /82,1 , 16/32 ⊕ 31 . In particular, this has 31 as a summand and so this is an sl2 -subalgebra by Proposition 4.17, and also 32 as a submodule and subalgebra, but not necessarily a copy of sl2 . This completes the proof for a = 2. Finally, let a = 3. Using the traces of semisimple elements of order up to 31 there are 434 conspicuous sets of composition factors, 146 up to field automorphism. Checking the traces of elements of order 63, we find that eleven of these are not conspicuous for elements of order 63, and the remaining 135 all have preimages of order 5 · 63 = 315 that have the same number of eigenspaces on Vmin . Since 315 > v(E7 ) = 75 (for odd-order elements) we have that elements of order 63 in H are always blueprints for Vmin , and hence H is as well. In the introduction we claimed that this potential SL2 (25) is maximal if it exists, so we must show that it is not contained in any positive-dimensional subgroup. By consideration of composition factors and summand dimensions, it can only lie inside a D6 -parabolic; then one can proceed either by showing that the 12-dimensional factor cannot support a symmetric bilinear form, or by noting that if the subgroup lies inside the D6 -parabolic then another lies inside the D6 -Levi, hence acting semisimply, but the action of the unipotent element would be 58 , 42 , 24 , not appearing in [13, Table 7]. The next case is p = 7, where we cannot prove that there are no maximal SL2 (7)s in all cases. Proposition 12.5 Suppose that p = 7. 89 (i) Let a = 1. If H does not fix either a 2-space on Vmin , or a 1-space on L(G), then the action of H on Vmin and L(G) are P (6)⊕2 ⊕ P (4) ⊕ 6 ⊕ 4⊕2 and 7⊕5 ⊕ P (5)⊕3 ⊕ P (3)⊕3 ⊕ 5 ⊕ 3⊕3 respectively. (ii) Let a = 2. If H is not a blueprint for Vmin then either NḠ (H) fixes a 2-space on Vmin or a line on L(G). Proof: We start with a = 1. The conspicuous sets of composition factors are 4, 226 , 47 , 214 , 6, 49 , 27 , 63 , 47 , 25 , 64 , 43 , 210 , 65 , 45 , 23 , 66 , 4, 28 , 67 , 43 , 2. As the projective indecomposable modules are P (2) = 2/4, 6/2, P (4) = 4/2, 4/4, P (6) = 6/2/6, we look through the list above, checking to see whether we have enough 4s and 6s (three of the first or two of the second) to cover all 2s; this leaves the sixth and eighth cases of 65 , 45 , 23 and 67 , 43 , 2 to deal with. Case 8: We switch to L(G), and there is only one corresponding set of composition factors on L(G), namely 7, 515 , 310 , 121 , which means that H fixes a line on L(G). Case 6: The only possible structure that does not fix a 2-space on Vmin and also yields a unipotent action from the list at the start of this section is P (6)⊕2 ⊕ P (4) ⊕ 6 ⊕ 4⊕2 , with u lying in class E7 (a5 ). The factors of L(G) ↓H aren’t uniquely determined, and can be any one of 75 , 515 , 32 , 117 , 72 , 518 , 35 , 114 , 78 , 57 , 312 , 16 , 75 , 510 , 315 , 13 . The first three of these must fix a line on L(G), but the last one could in theory not, with module action 7⊕5 ⊕ P (5)⊕3 ⊕ P (3)⊕3 ⊕ 5 ⊕ 3⊕3 , this action compatible with the action of u on Vmin . Now let a = 2, and recall that L = SL2 (7). The eigenvalues of an element y of order 25 on Vmin are enough to determine the semisimple class of E7 to which y belongs. This allows us to apply Lemma 4.12 to see that if there is an A1 subgroup with 24-restricted composition factors, then any subgroup H of G whose composition factors on Vmin match the restriction of this A1 to SL2 (49) is a blueprint for Vmin . There are 150 conspicuous sets of composition factors for Vmin ↓H , and this is too many to analyse one at a time, although none of these is definable over F7 , so we can eliminate those of negative 2i -pressure. Of the 150, only 92 of them have a corresponding set of composition factors for L(G), and only 42 of these have either no trivial factors or positive pressure. Of these 42, only 26 have either no 2i or positive 2i pressure for i = 1, 2, so we have thirteen conspicuous sets of composition factors left to deal with, up to field automorphism. Six of these have a 21 composition factor: 652 , 61,2 , 442 , 221 , 1821,2 , 102,1 , 41 , 42 , 21 , 141,2 , 101,2 , 622 , 61,2 , 432 , 21 , 281,2 , 102,1 , 622 , 41 , 21 , 182,1 , 1022,1 , 61 , 61,2 , 42 , 21 , 90 142,1 , 1032,1 , 61,2 , 42 , 21 . Case 1: Consider the diagonal A1 inside the A1 A1 maximal subgroup of G, acting along each factor as L(1): this acts on Vmin as (L(6) ⊗ L(3)) ⊕ (L(2) ⊗ L(5)) ⊕ (L(4) ⊗ L(1)), which has factors L(5)5 , L(3)4 , L(7)2 , L(9), up to field automorphism the same as the first case above. Case 4: Inside C3 G2 , consider an A1 subgroup X acting along the first factor as L(5) and along the second as L(2) ⊕ L(8). The action of X on Vmin is L(5)/L(7)/L(5) ⊕ L(3) ⊕ L(11) ⊕ L(13) ⊕ L(3)/L(9)/L(3), so the restriction to SL2 (49) has composition factors 142,1 , 102,1 , 621 , 62,1 , 431 , 22 , up to field automorphism a match for the fourth case. Case 5: For the fifth case, we note that the composition factors are the same as 22 ⊗ ((61 ⊗ 22 ) ⊕ 51 /41,2 /51 ⊕) ⊕ 42 : inside A1 F4 , let X be a copy of A1 acting along the first factor as L(7) and along the second factor as L(12) ⊕ L(4)/L(8)/L(4). This subgroup of F4 exists inside the A1 C3 subgroup, acting irreducibly on the minimal modules of both subgroups as L(7) and L(5). The composition factors of Vmin ↓X match the fifth case. Case 6: For the sixth case, as in the fifth, we note that the composition factors are the same as 22 ⊗ (71 ⊕ 51 /41,2 /51 ⊕ 51 ) ⊕ 42 : inside A1 F4 , let X be a copy of A1 acting along the first factor as L(7) and along the second factor as L(6) ⊕ L(4)/L(8)/L(4) ⊕ L(4). This subgroup of F4 exists inside the A1 G2 subgroup, acting irreducibly on the minimal modules of both subgroups as L(1) and L(6). The composition factors of Vmin ↓X match the sixth case. Since these embeddings have factors up to L(21), in all cases H is a blueprint for Vmin by Lemma 4.12. Case 3: We now address the third case. Inside C3 G2 , let X be an A1 subgroup acting along the C3 as L(1) ⊕ L(21) and acting along G2 as L(6). The action of X on Vmin is L(27) ⊕ L(5)/L(7)/L(5) ⊕ L(3) ⊕ L(29). Up to field automorphism, the composition factors match the third case. While these are not 24-restricted, they are close: checking the weight spaces against the eigenvalues of the SL2 (49) contained within it, all weight spaces that have the same eigenvalues when restricted to SL2 (49) are contained within the L(27) ⊕ L(29). Thus if H is not a blueprint then H is contained in a positive-dimensional subgroup Y with composition factors of dimension 38, 6, 6, 4, 2. Notice that therefore Y , and hence H, must lie in either C3 G2 itself – and we know from above that in that case H is a blueprint for Vmin – or inside A1 F4 , but it is easily seen to not be possible to place H inside this subgroup by the action of H on Vmin . Thus H is indeed a blueprint for Vmin . Case 2: Here if H is not semisimple – and hence stabilizes a 2-space of Vmin – then the action of H on Vmin is 181,2 /21 , 41 /181,2 ⊕ 102,1 ⊕ 42 ; we claim that such a subgroup H does not lie in a positive-dimensional subgroup of G. To see this, firstly the dimensions of the composition factors are not compatible with coming from any maximal parabolic, so 91 that H must be contained in a reductive maximal subgroup, where the dimensions and multiplicities exclude A7 and A2 , and it is easy to see that it doesn’t lie in the A1 A1 . For H to lie in A1 D6 , 181,2 would have to lie in the product of a module for SL2 of dimension 2 and a module for PSL2 of dimension 12: this is possible, but only with 21 being tensored by 21 ⊗ 62 , and this yields 62 as well, not in Vmin ↓H . If H lies in A2 A5 then we must have that H acts on the natural modules along each factor as 31 and 62 , whence the module (00, λ3 ) is 42 /61,2 /42 ⊕ 62 , obviously not correct. If H lies in G2 C3 , the the tensor product of the two minimal modules for these groups must be 1821,2 , 4i for some i, and this is obviously impossible. For H to lie in A1 G2 , 181,2 would have to be a composition factor of the tensor product of a module for SL2 (49) of dimension 4 and a module for PSL2 (49) of dimension 7, not possible. We finally have H in A1 F4 , where H must act on the natural module as 2i for some i, yielding 4i as a composition factor of Vmin ↓H , and the rest of the module must be 2i ⊗ M for some 26-dimensional module M for PSL2 (49), and this cannot yield 1821,2 , so H cannot embed in this subgroup either. Having proved this, we now show that the stabilizer of the 42 submodule is positive dimensional, a contradiction. There are eight elements of order 50 in a maximal torus of G squaring to y of order 25 and preserving the eigenspaces making up the 42 : these eight elements generate a subgroup Z50 × Z2 × Z2 of order 200, and so the stabilizer of the 4-space contains H as a subgroup of index at least 4, ruling out the possibility that it is almost simple with socle H. Thus H is contained in a member of X σ by Proposition 3.3, a contradiction and we are done. We now give the seven conspicuous sets of composition factors with no 2i in them. 1822,1 , 61 , 62,1 , 421 , 182,1 , 142,1 , 102,1 , 62,1 , 421 , 1222,1 , 101,2 , 631,2 , 41 , 421,2 , 62,1 , 421 , 282,1 , 122,1 , 622,1 , 41 , 281,2 , 141,2 , 61 , 421 281,2 , 182,1 , 101,2 . Cases 1 and 2: Inside A2 A5 , let a subgroup X of type A1 act along the two factors as L(14) and L(5) respectively. The composition factors of Vmin ↓X are L(21)2 , L(5), L(3)2 , L(9). This is the first case. Inside C3 G2 , consider an A1 subgroup X acting along the first factor as L(5) and along the second as L(14) ⊕ L(8). The action of X on Vmin is L(19) ⊕ L(13) ⊕ L(11) ⊕ L(3)/L(9)/L(3). The composition factors of X on Vmin match the second case. Case 3: Inside C3 G2 , consider an A1 subgroup X acting along the first factor as L(5) and along the second as L(42). The action of X on Vmin is L(47) ⊕ L(3)/L(9)/L(3), a match for the third case, but of course these are not 24-restricted, but do satisfy the second condition of Lemma 4.12, so that H is a blueprint for Vmin Case 4: Inside F4 A1 , let X denote an A1 subgroup acting along the second factor as L(1), and along the first factor as L(4) ⊕ L(44), which exists inside the A1 G2 subgroup of F4 . The action of X on Vmin is L(43) ⊕ L(45) ⊕ L(5) ⊕ L(3)⊕2 , 92 so this is the fourth case. Of course, these are not 24-restricted, so we proceed as in the second case of the previous set of composition factors, looking for elements of order 50 squaring to y and stabilizing the eigenspaces the comprise the 41 in the socle. Again, we find a subgroup Z50 × Z2 × Z2 , and we conclude as before that the stabilizer of the 41 is a positive-dimensional subgroup of G. We claim that H is a blueprint for Vmin . With the dimensions and multiplicities of the composition factors, the only maximal positive-dimensional subgroups it can lie in are D6 A1 , C3 G2 , A1 G2 , A1 F4 and A1 A1 , with the last one clearly impossible. If H 6 D6 A1 then 141,2 ⊕ 61 ⊕ 41 is a tensor product of a 12-dimensional and a 2-dimensional module, so must be 21 ⊗ (72 ⊕ 51 ). Thus H lies inside the product of the A1 and a product of two orthogonal groups, Spin7 × Spin5 , and there is a unique action of an A1 subgroup inside these of acting as L(42) ⊕ L(0) and L(42) on the two relevant modules of Spin7 , and as L(3) and L(4) on the two modules of Spin5 . This A1 fixes the same subspaces of Vmin as H, so H is a blueprint for Vmin . The same statement holds from above for A1 F4 . If H 6 C3 G2 then a similar analysis shows that H acts on the minimal modules of the two factors as 21 ⊕ 41 and 72 respectively, and the A1 acting along each factor as L(1) ⊕ L(3) and L(42) again stabilizes the same subspaces of Vmin as H, so H is a blueprint for Vmin . We are left with A1 G2 , where in order to find the 281,2 we must have that H acts on the two natural modules as 21 and 72 respectively, so that the factor 3 ⊗ 10 in Vmin ↓A1 G2 yields 281,2 , but then the other factor of 1 ⊗ 01 yields two copies of 61,2 , not correct. (Indeed, this is how we get the sixth case above.) Thus, whenever H is a subgroup of a positive-dimensional subgroup of G, it is a blueprint for Vmin , as needed. Case 5: Inside the maximal subgroup A1 G2 , let X be an A1 subgroup acting along the first factor as L(7) and along the second as L(2)⊕2 ⊕ L(0): the composition factors of X on Vmin are L(9)3 , L(11), L(21), L(23)2, matching up with the fifth case, up to field automorphism. Since they are all 24-restricted, H is a blueprint for Vmin by Lemma 4.12. Case 6: Inside the same subgroup A1 G2 , let X instead be an A1 subgroup acting along the first factor as L(7) and along the second as L(6): the composition factors of X on Vmin are L(3), L(9)2 , L(17), L(27), matching up with the sixth case, but no longer 24-restricted, but H is still a blueprint for Vmin by Lemma 4.12(ii). Case 7: Inside the maximal A1 A1 subgroup, take a diagonal A1 as we have done before, but this time acting as L(1) and L(7) along the two factors. The composition factors of this on Vmin are L(27), L(13), L(37), of course not 24-restricted, and even Lemma 4.12(ii) doesn’t work in this case. If H is contained in a positivedimensional subgroup other than A1 A1 then the dimensions of the composition factors and multiplicities show that it can only come from A1 G2 , and in order to get 281,2 appearing, H must act along A1 as 21 and G2 as 72 . However, the other factor of dimension 28 must have 61,2 as a composition factor, not allowed. Thus H 6 A1 A1 , and so H is a blueprint for Vmin . It remains to show that H is always contained inside a member of X . Of course, since Vmin ↓H is multiplicity free, it is semisimple, and so the 101,2 is a submodule. As with previous cases, we find more than one element of order 50 squaring to y and stabilizing the eigenspaces that comprise 101,2 . The subgroup generated by these is Z50 × Z2 , and we wish to apply Corollary 4.14, so we need to find an element ŷ of order 50 in this subgroup whose action on L(G) has no (−1)-eigenspace, but this is easy: its eigenspaces are 17 , (θ±2 )6 , (θ±4 )4 , (θ±5 ), (θ±6 )2 , (θ±7 )3 , (θ±8 ), (θ±9 )5 , (θ±11 )6 , (θ±13 )6 , (θ±15 )5 , (θ±16 ), (θ±17 )3 , (θ±18 )2 , (θ±19 )2 , (θ±20 )4 , (θ±21 ), (θ±22 )5 , (θ±24 )6 , 93 where θ is a primitive 50th root of unity and y = ŷ 2 acts on 21 with eigenvalues θ±2 . We have thus shown that all cases are blueprints for Vmin , fix a 2-space on Vmin , or fix a line on L(G), as needed. Proposition 12.6 Suppose that p = 11. (i) Let a = 1. If H is not a blueprint for Vmin , then NḠ (H) fixes a 2-space on Vmin or a line on L(G). (ii) Let a = 2. If H is not a blueprint for Vmin , then NḠ (H) fixes a 2-space on Vmin . Proof: Let a = 1. As p = 11 the action of u is one of cases (xviii) to (xxi) in the list above. In the first unipotent class, E7 (a4 ) acting as 112 , 10, 8, 6, 42, 2, there are single blocks of size 10, 8, 6 and 2, which must come from simple summands of those dimensions. Since we cannot have a faithful indecomposable module of dimension 11 + 4 = 15, the 4s must also come from simple summands, and so Vmin ↓H is a single projective plus a semisimple module. The conspicuous such sets of composition factors yield P (10) ⊕ 10 ⊕ 8 ⊕ 6 ⊕ 4⊕2 ⊕ 2 P (4) ⊕ 10 ⊕ 8 ⊕ 6 ⊕ 4⊕2 ⊕ 2. and The second of these has corresponding set of factors on L(G) given by 98 , 72 , 57 , 112 , and the action of u on L(G) is 118 , 9, 72 , 52 , 34 . Blocks of size 3 come from, up to duality, 3, 7, 9/1, 3, 5, 3, 5, 7/5, 7, 9, and so H cannot embed with these factors and this action of u. (The other set of composition factors yields 11⊕4 ⊕ P (9) ⊕ P (7) ⊕ 9 ⊕ 7⊕2 ⊕ 5⊕2 ⊕ 3⊕4 .) If u comes from class D6 , acting as 114 , 10, 12 , then the 10 must come from a simple summand, and the 12 comes from (up to duality) 6/6, 4/8 or 2/10. The sum of one of these plus its dual, a single projective indecomposable module, and the 10, must be conspicuous. There are five such conspicuous sets of composition factors, all of which have corresponding sets of factors on L(G), three of them having two different sets. The action of u on L(G) is 1110 , 102 , 13 , so certainly H has a trivial summand on L(G), with the 102 coming from (5/5)⊕2 , 3/7 ⊕ 7/3 or 1/9 ⊕ 9/1, the other 12 being either semisimple, 9/3 ⊕ 3/9 or 5/7 ⊕ 7/5, with the rest of the module being projective. There are 937 such sets of composition factors, and when taking the intersection of that list with those of the corresponding sets of composition factors to our list for Vmin ↓H , we find two members: P (4) ⊕ 10/2 ⊕ 2/10 ⊕ 10 and P (6) ⊕ (6/6)⊕2 ⊕ 10, with corresponding embeddings 11⊕4 ⊕ P (5) ⊕ P (3) ⊕ 3/9 ⊕ 9/3 ⊕ 3/7 ⊕ 7/3 ⊕ 1 and 11⊕6 ⊕ P (5) ⊕ P (3) ⊕ 3/7 ⊕ 7/3 ⊕ 1⊕3 . Of course, these fix a line on L(G), as needed. If u comes from class E6 (a1 ) acting as 114 , 52 , 12 , then the two blocks of size 5 must come from summands of dimension 16, so 4, 6/6 ⊕ 6/4, 6, and the two 1s must come from summands of dimension 12. The conspicuous such sets of composition factors yield 4, 6/6 ⊕ 6/4, 6 ⊕ 10/2 ⊕ 2/10, 4, 6/6 ⊕ 6/4, 6 ⊕ 4/8 ⊕ 8/4, 94 4, 6/6 ⊕ 6/4, 6 ⊕ (6/6)⊕2 . Of these, only the last has a corresponding set of composition factors on L(G), and this is 112 , 98 , 55 , 114 ; however, u acts as 1110 , 9, 52 , 3, 1 on L(G), so we need a 3 as a summand of L(G) ↓H , not possible. Thus H does not embed with u from this class. Finally, if u acts as 114 , 10, 2, coming from E7 (a3 ), then the 2 and 10 must come from summands of the same dimension, so we need two projectives plus 10⊕2. There are three such conspicuous sets of composition factors, yielding P (4)⊕2 ⊕ 10 ⊕ 2, P (4) ⊕ P (10) ⊕ 10 ⊕ 2, P (6) ⊕ P (10) ⊕ 10 ⊕ 2. Each of these has corresponding sets of composition factors on L(G), with the third having two. However, u acts on L(G) with blocks 1111 , 9, 3, so L(G) ↓H is the sum of 9 ⊕ 3 and projectives, and since we have 1111 in the action of u, the number of summands of L(G) ↓H that are either 11s or P (1)s must be odd. In particular, any trivial composition factors lie either in P (1)s or P (9)s. The four corresponding sets of factors are 98 , 73 , 57 , 112 , 114 , 93 , 74 , 53 , 36 , 1, 113 , 92 , 76 , 55 , 35 , 112 , 94 , 77 , 5, 36 , 13 ; the first and second cases need an odd number of P (1)s, and the second case can have no P (9)s as it has no 3s, leading to a contradiction. The fourth case cannot work with the unipotent class either, but the third case yields 11⊕3 ⊕ P (7)⊕2 ⊕ P (5) ⊕ P (3) ⊕ 9 ⊕ 3. Thus P (6) ⊕ P (10) ⊕ 10 ⊕ 2 is the only acceptable embedding of H into Vmin with this unipotent action. Now let a = 2, and recall that L is a copy of SL2 (11) inside H. We have traces of semisimple elements of order up to 40, and can use the preimage trick from Section 4.2 to find traces of elements of orders 60 and 120 as well. We would like that the eigenvalues of an element y of order 120 on Vmin uniquely determine the semisimple class of E7 to which y belongs. This is not true in general for all classes, but will be true for the particular classes that arise from conspicuous sets of composition factors for Vmin ↓H , by a check using the preimage trick. Suppose that u comes from class E7 (a4 ), so that the composition factors of Vmin ↓L are 103 , 8, 6, 42 , 2. There are, up to field automorphism, twenty conspicuous sets of composition factors for Vmin ↓H , using semisimple elements of order up to 40; using the preimage trick, we can eliminate seven of these from contention, as they fail either the trace of an element of order 60 or 120, leaving thirteen. Note that, for these thirteen remaining sets of composition factors, the eigenvalues of an element y of order 120 on Vmin determine the semisimple class to which y belongs. Nine of the thirteen have a 2-dimensional composition factor, and are 141,2 , 1032 , 422 , 221 , (1) 1031 , 81 , 61 , 421 , 21 , 22 , 301,2 , 102 , 101,2 , 41 , 21 , (1) (1) 222,1 , 182,1 , 61 , 421 , 21 , (1) 221,2 , 181,2 , 101,2 , 41 , 21 , (2) (1) 222,1 , 142,1 , 101 , 421 , 21 , 181,2 , 1022 , 62 , 61,2 , 42 , 21 , 1031 , 81 , 61 , 62,1 , 41 , 21 , (2) 221,2 , 181,2 , 102 , 42 , 21 . (1) (Recall that 18i,j = 2i ⊗ 9j , 18i,j = 3i ⊗ 6j and 30i,j = 3i ⊗ 10j .) The simple modules with non-trivial (1) (1) extensions with 21 are 102 , 182,1 and 301,2 , and in order for H not to stabilize a 2-space, one of these must occur with multiplicity 2: thus all cases must fix a 2-space on Vmin except for the first and eighth. However, even in the first case the {21 , 42 , 102 , 141,2 }-radical of P (102 ) is simply 102 /21 /102 , so there must be a 21 submodule of Vmin ↓H , so that case also fixes a 2-space. For the eighth case, up to field automorphism we find this inside D6 A1 , by taking an A1 subgroup acting on the natural modules for the two factors as 91 ⊕ 31 = L(8) ⊕ L(2) and 22 = L(11) respectively. 95 (1) This yields 182,1 ⊕ 62,1 = L(19) ⊕ L(13), and for the spin module for the D6 term, we need a module with unipotent action 112 , 6, 4 (one sees this from the entry for D6 (a1 ) in [13, Table 7]) and composition factors 1021 , 61 , 41 , 22 = L(9)2 , L(5), L(3), L(11) (obtained from the traces of semisimple elements), and so the restriction of the spin module to this A1 subgroup is L(9)/L(11)/L(9) ⊕ L(5) ⊕ L(3), so we apply Lemma 4.12 to see that H is a blueprint for Vmin , as needed. The remaining four conspicuous sets of composition factors, which have no 2-dimensional composition factor, are 362,1 , 101 , 61,2 , 41 , 421,2 , 101 , 41 , 222,1 , 101 , 102,1 , 81 , 61,2 , 282,1 , 222,1 , 62,1 . For the last of these, consider a diagonal A1 inside A1 G2 , acting as 22 = L(11) along A1 and as 71 = L(6) along the G2 factor. The composition factors on Vmin are L(39), L(21), L(13), matching up with the fourth case above, so we satisfy the conditions of Lemma 4.12. Consider an A1 subgroup of G2 C3 , acting as 72 = L(66) along the G2 factor and as 61 = L(5) along the C3 factor: the composition factors on Vmin are L(71), L(9), L(3), matching up with the second case above. Again we apply Lemma 4.12, this time the second statement, and therefore H is a blueprint for Vmin , as claimed. For the third case, we find an A1 subgroup Y inside D6 A1 that works: consider Y acting as 21 = L(1) along the A1 factor, and as 91 ⊕ 32 = L(8) ⊕ L(22) along the second factor. This second A1 is contained diagonally as an irreducible subgroup inside the product of orthogonal groups O9 × O3 , i.e., B4 A1 , so its action on the 32-dimensional half-spin module is as the tensor product of the spins. The action on Spin3 must be as 22 = L(11), and the action on the Spin9 has unipotent factors 11, 5 and can be seen to be 111 ⊕ 51 = L(10) ⊕ L(4). Thus the subgroup Y has composition factors L(21), L(15), L(9), L(7), L(23), and hence satisfies Lemma 4.12, with the SL2 (121) inside Y having the same factors on Vmin as the third case. We are left with 362,1 , 101 , 61,2 , 41 . We firstly note that if there is such a subgroup H then NḠ (H) is not contained in a positive-dimensional subgroup of Ḡ: to see this, notice that since Vmin ↓H is multiplicityfree and contains a 36-dimensional composition factor, the only positive-dimensional subgroups that could contain it are G2 C3 and A1 F4 . If H 6 G2 C3 , the module 10 ⊗ 100 has dimension 42, so must restrict to 362,1 ⊕ 61,2 , but 362,1 = 91 ⊗ 42 is not a composition factor of any tensor product of a 6-dimensional module and a 7-dimensional module, a contradiction. Since A1 F4 acts on Vmin with factors 1 ⊗ 0001 and 3 ⊗ 0000, we see that if H 6 A1 F4 then the projection of H along A1 must act on the natural module as 21 , so that L(3) restricts to H as 41 . However, again 362,1 is not a composition factor of any tensor product of 21 and a module of dimension at most 26, so H cannot lie in A1 F4 either. Thus H, and by extension NḠ (H), cannot lie in a positive-dimensional subgroup of G. We therefore must have that NḠ (H) contains SL2 (121) with index at most 2 by Proposition 3.3. Recalling that y is an element of order 120, chosen so that the eigenvalues of y on 21 are ζ ±1 for ζ a primitive 120th root of unity, we consider the elements of order 120 in a maximal torus of G squaring to y 2 , noting that the ζ 2 - and ζ 6 -eigenspaces of y 2 on Vmin are both 3-dimensional and coincide with the ζ- and ζ 3 -eigenspaces of y respectively. We thus look for elements that square to y 2 and preserve the ζ 2 - and ζ 6 -eigenspaces of y 2 ; of course, y is one of these elements, and we find four elements with 3-dimensional ζ- and ζ 3 -eigenspaces (and therefore four with 3-dimensional (−ζ)- and (−ζ 3 )-eigenspaces), which together generate a subgroup 96 Z120 × Z2 × Z2 of the torus. Thus the stabilizer in G of the 4-dimensional submodule 41 of Vmin contains H with index at least 4, a contradiction, and so H doesn’t exist by the above proof. This completes the proof of the proposition when u comes from class E7 (a4 ). Suppose that u comes from class D6 , and that the composition factors of Vmin ↓L are 10, 67 , 4: the trace of an element of order 5 is 6, and this is enough to seriously restrict the possibilities. Using other semisimple elements of order up to 20, we find up to field automorphism a single conspicuous set of composition factors, namely 101 , 671 , 41 , and this must be semisimple as there are no non-trivial extensions between the factors. However, this is incompatible with the action of u, so H cannot embed with this restriction to L. The other set of composition factors are the same as for E7 (a4 ), which we have already considered above. Suppose that u comes from E7 (a3 ), so that Vmin ↓L has composition factors 103 , 63 , 4, 22 . Checking traces of elements of order up to 40 yields, up to field automorphism, only five conspicuous sets of composition factors, which are 1031 , 631 , 41 , 221 , 1032 , 632 , 42 , 221 , 1031 , 102,1 , 621 , 21 , 22 , 101 , 1022 , 61 , 622 , 61,2 , 21 , 221,2 , 102 , 101,2 , 622 , 21 . The last two of these fail the traces of elements of order 60, so do not exist. The 21 -pressures of the remaining three are −2, 1 and −1 respectively, as only 102 from these simple modules has an extension with 21 , so only the second need not fix a 2-space. In this case the {21 , 42 , 62 , 102 }-radical of P (102 ) is 102 /21 /102 , so Vmin ↓H has a 2-dimensional submodule. We now have that p > 13, for which we only need consider a = 1. For p = 17, 19, 23, if H is not in a member of X σ , we will prove that H fixes an sl2 -subalgebra, and for p = 19 we will also get a Serre embedding (see Definition 4.7). We begin with p = 13. Proposition 12.7 Suppose that p = 13 and a = 1. If H is not a blueprint for Vmin then NḠ (H) either fixes a 2-space or 4-space, and in both cases lies in a member of X σ . Proof: There are three possibilities for the action of u on Vmin , namely cases (xxii), (xxiii) and (xxiv) from the list above, with the last of these being semiregular. In the first case, u acts as 134 , 14 , and so Vmin ↓H is the sum of four modules of dimension 14, which are 2/12, 4/10, 6/8, 8/6, 10/4, 12/2. There are only two conspicuous sets of composition factors consisting of dual pairs of these, and they are 2/12 ⊕ 12/2 ⊕ 4/10 ⊕ 10/4 and 4/10 ⊕ 10/4 ⊕ 6/8 ⊕ 8/6. Neither of these has a corresponding set of composition factors on L(G), so H does not embed in G with u coming from class E6 . If u comes from class E7 (a3 ) then it acts as 132 , 12, 10, 6, 2. The single block of size 2 must come from a self-dual indecomposable module of dimension congruent to 2 modulo 13, and the two of these are 2 itself – so H fixes a 2-space on Vmin – or a 28-dimensional module 6, 8/6, 8; from here, the blocks of sizes 6 and 10 must come from simple summands and the 12 comes either from a 12 or a 6/6, yielding two possible sets of composition factors, neither of which is conspicuous, having trace −1 for an element of order 3. This completes the proof for the second action of u. 97 The final unipotent class to consider is the semiregular E7 (a2 ), acting as 134 , 4 on the minimal module. The single block of size 4 comes either from a summand 4 or from the indecomposable module 4, 6, 8, 10/4, 6, 8, 10, which is conspicuous, but we saw above that it has no corresponding set of factors for L(G). Hence Vmin ↓H has a 4 as a summand, with two projective indecomposable summands. The conspicuous such sets of composition factors yield P (2) ⊕ P (4) ⊕ 4, P (12) ⊕ P (10) ⊕ 4, P (10) ⊕ P (8) ⊕ 4, P (6) ⊕ P (4) ⊕ 4. The first and second of these cannot occur because they do not have corresponding factors on L(G). In the fourth case we again switch to L(G), and find two corresponding sets of composition factors, namely 13, 11, 92, 79 , 53 , 34 , 1, 113 , 93 , 75 , 54 , 36 . The action of u on L(G) must be 1310 , 3, and the single 3 in this action comes from a summand isomorphic to either 3 or 5, 7, 9/5, 7, 9. The first case cannot occur as the single 1 must lie in a P (11), but this cannot occur. In the second case, no trivials means there can be no P (11)s, so we must have P (3)⊕3 in L(G) ↓H , but then there are no 3s or 9s remaining, so the summand contributing the 3 to the action of u cannot occur, a contradiction. Thus H cannot embed with these factors either. In the third case, there are again two corresponding sets of composition factors on L(G), namely 13, 113, 92 , 77 , 5, 34 , 13 , 115 , 93 , 73 , 52 , 36 , 12 . In the first of these, the single 5 means one has no P (5) and at most one P (7), but these are the only two projectives containing 7, so we cannot use up the seven 7s. The second case does have a unique possibility, however, of P (11)⊕2 ⊕ P (9) ⊕ P (7) ⊕ P (3) ⊕ 3. Although it has 3 as a summand, the presence of a P (3) means that we cannot guarantee that it is an sl2 -subalgebra of L(G), although the 3 ⊕ 3 in the socle of L(G) ↓H does form a subalgebra. Let x denote an element of order 14 in H and let ζ be a primitive 14th root of unity, arranged so that the eigenvalues of x on 4 are ζ ±1 , ζ ±3 . The eigenvalues of x on Vmin are (−1)8 , (ζ ±1 )9 , (ζ ±3 )8 , (ζ ±5 )7 . Let θ denote a primitive 28th root of unity with θ2 = ζ, and we find x̂ ∈ G such that x̂2 = x and x̂ has eigenvalues (±i)4 , (θ±1 )9 , (θ±3 )8 , (θ±5 )5 , (−θ±5 )2 on Vmin . This stabilizes the eigenspaces intersecting the 4, and so x̂ stabilizes the 4-space stabilized by H. The action of x̂ on L(G) has a 21-dimensional 1-eigenspace but −1 is not an eigenvalue of x̂: if H̄ = hH, x̂i/Z(G) ∼ = PSL2 (13) then all of the composition factors of L(G) ↓ must be the plus-type factors, in the H̄ notation of Section 4.4. Thus we extend the action of H/Z(G) ∼ = PSL2 (13) on L(G) uniquely to an action of PGL2 (13), and doing so yields a trace of 11 on L(G) for an element of order 4 in PGL2 (13) \ PSL2 (13). However, 11 is not the trace of an element of order either 4 or 8 (in case it powers to the central involution) in G on L(G), a contradiction, so that hH, x̄i, which stabilizes the 4-space, is not almost simple modulo Z(G). Thus NḠ (H) is contained inside a member of X σ by Proposition 3.3, as needed. Proposition 12.8 Suppose that p = 17 and a = 1. If H is not a blueprint for Vmin then either NḠ (H) stabilizes a 4-space on Vmin whose stabilizer not NḠ (H), and hence NḠ (H) is contained in a member of X σ , or H stabilizes an sl2 -subalgebra of L(G). 98 Proof: There are two non-generic unipotent classes, cases (xxv) and (xxvi) above, where there are single Jordan blocks of sizes 4, 6, 8, 10, 16. Apart from the simple modules of dimension congruent to 4, 6, 8, 10, 16 modulo 17, the self-dual indecomposable modules congruent to those dimensions have dimensions 72, 108, 144, 114 and 16 respectively, so only the 16 might not come from a simple summand. For u belonging to class E7 (a2 ), so acting as 172 , 10, 8, 4, we therefore have a single projective plus 10 ⊕ 8 ⊕ 4. Applying the traces of semisimple elements yields two possibilities: P (16) ⊕ 10 ⊕ 8 ⊕ 4 and P (10) ⊕ 10 ⊕ 8 ⊕ 4. The second of these does not yield an action on L(G) as the traces do not match up, but the first of these has a unique set of composition factors on L(G) which yields 17 ⊕ P (15) ⊕ P (11) ⊕ 15 ⊕ 11 ⊕ 9 ⊕ 7 ⊕ 3⊕2 . The subspace 3⊕2 is an H-invariant Lie subalgebra of L(G), but we proceed as in the case of p = 13, finding an element of order 36 that preserves the 4-dimensional submodule. Let x be an element of H of order 18 and ζ be a primitive 18th root of unity, arranging our choices so that the eigenvalues of x on 4 are ζ ±1 and ζ ±3 . The eigenvalues of x on Vmin are (−1)6 , (ζ ±1 )6 , (ζ ±3 )7 , (ζ ±5 )6 , (ζ ±7 )6 . Letting θ denote a primitive 36th root of unity squaring to ζ, we find an element x̂ of order 36 in G with x̂2 = x and with eigenvalues on Vmin given by (±i)3 , (θ±1 )6 , (θ±3 )7 , (θ±5 )5 , −θ±5 , (θ±7 )4 , (−θ±7 )2 . We see immediately that x̂ preserves the 4-space stabilized by H, and we proceed as in Proposition 12.7, noting that −1 is not an eigenvalue of x̂ on L(G), and so there is a unique extension of PSL2 (17) to PGL2 (17). However, an element of order 6 in PGL2 (17) \ PSL2 (17) has trace 8 on L(G). While 8 is the trace of an element of order 6 in G (but not an element of order 12 powering to the central involution), the square of this element needs trace 34 on L(G), which is not a trace of an element of order 3 in H, a contradiction. We then proceed as in Proposition 12.7. For u belonging to class E7 (a1 ), so acting as 172 , 16, 6, the 6 must come from a simple summand, but the 16 comes from either a simple summand or 8/8. Thus our embedding of H is either a single projective plus 8/8 ⊕ 6 or a single projective plus 16 ⊕ 6. Using traces, the two options are P (12) ⊕ 16 ⊕ 6 and P (4) ⊕ 16 ⊕ 6. The second of these has no corresponding set of composition factors on L(G), but the first has a unique set, which implies that L(G) ↓H is 17 ⊕ P (15) ⊕ P (11) ⊕ P (7) ⊕ 11 ⊕ 3, and so the 3 is an sl2 -subalgebra by Proposition 4.17 and we complete the proof. Proposition 12.9 Suppose that p = 19 and a = 1. If H is not a blueprint for Vmin then H stabilizes an sl2 -subalgebra of L(G), or H is a Serre embedding. 99 Proof: When p = 19, there are two non-generic unipotent classes, E7 (a1 ) and E7 , cases (xxvii) and (xxviii) above. As p ≡ 3 mod 4 there is a unique self-dual indecomposable module congruent to any given integer modulo p. For E7 (a1 ) the 12 and 6 in the action of u must therefore come from simple summands, leaving a single projective module of dimension 38. Only two possibilities yield conspicuous sets of composition factors, namely P (16) ⊕ 12 ⊕ 6 and P (4) ⊕ 12 ⊕ 6. The second of these has no corresponding set of composition factors on L(G), with the first of these yielding the unique action P (15) ⊕ P (11) ⊕ 19 ⊕ 17 ⊕ 11 ⊕ 7 ⊕ 3, with the 3 being an sl2 -subalgebra of L(G) by Proposition 4.17. The remaining case is u coming from the regular class, where as with the E7 (a1 ) case the 10 from the action of u must yield a simple summand, with the rest projective. There are again two conspicuous sets of composition factors for Vmin ↓H , coming from P (4) ⊕ 18 and P (10) ⊕ 18. The first has no corresponding set of composition factors on L(G), and the second has a single set, which since u is projective on L(G), must be arranged so that L(G) ↓H is 19 ⊕ P (15) ⊕ P (11) ⊕ P (3). While the 3-dimensional submodule is a subalgebra of L(G), it is not obviously an sl2 -subalgebra because we cannot apply Proposition 4.17. This is a Serre embedding as defined in Definition 4.7, as needed. The last case is p = 23 and the regular unipotent class, to conclude this section. Proposition 12.10 Suppose that p = 23 and a = 1. If H is not a blueprint for Vmin then H stabilizes an sl2 -subalgebra of L(G). Proof: The only non-generic class for p = 23 and Vmin is the regular class, with blocks 232 , 10, case (xxix) above. The 10 in the action of u must come from a simple summand, leaving a single projective module of dimension 46. Only two possibilities yield conspicuous sets of composition factors, namely 20, 18, 10, 42 and 182 , 10, 6, 4. The first of these has no corresponding set of composition factors on L(G), with the second of these yielding the unique action P (19) ⊕ P (11) ⊕ 23 ⊕ 15 ⊕ 3, with the 3 being an sl2 -subalgebra of L(G) by Proposition 4.17. 100 A Actions of maximal positive-dimensional subgroups on minimal and adjoint modules In this appendix we collate information on the actions of the reductive and parabolic maximal subgroups of positive dimension on the minimal and adjoint modules for the algebraic groups F4 , E6 and E7 that we have used in the text, other than those in Lemmas 2.4 and 2.5. These have been documented in many places, but we give them here as well for ease of reference. We need information for F4 and E6 in characteristic 3, and for E6 in characteristics 7 and 11. We list the composition factors of every maximal closed, connected subgroup of positive dimension in these characteristics, taken from [20], on Vmin , and L(G) for G = F4 . We list the reductive subgroups first, and then the parabolics. Write M ± to mean a module M and its dual M ∗ . We begin with the table for F4 in characteristic 3. Subgroup of F4 for p = 3 Factors on Vmin Factors on L(G) B4 1000, 0001 0100, 0001 Ã1 C3 (1, 100), (0, 010) (2, 000), (0, 200), (1, 001) A2 Ã2 (10, 10), (01, 01), (00, 11) (11, 00), (00, 11), (10, 02), (01, 20), (00, 00)2 A1 G2 (2, 10), (4, 00) (2, 00), (0, 01), (0, 10)2, (4, 10) B3 100, 0012, 0002 1002 , 010, 0012, 000 C3 1002 , 010 200, 0012, 0003 (10, 1)± , (10, 0)± , (11, 0), (10, 2)±, (10, 1)± , (10, 0)± , (00, 2), (00, 1)2 (00, 2), (00, 1)2, (00, 0)2 A2 Ã1 (10, 1)± , (10, 0)± , (11, 0) Ã2 A1 (20, 1)± , (20, 0)± , (11, 0), (00, 2), (00, 1)2, (00, 0)2 Next, the subgroups of E6 in characteristic 3. Subgroup of E6 for p = 3 Factors on Vmin A5 A1 (λ4 , 0), (λ1 , 1) A2 A2 A2 (10, 01, 00), (00, 10, 01), (01, 00, 10) F4 0001, 00002 C4 0100 G2 A2 (10, 10), (00, 02) G2 (2 classes) 20 D5 λ1 , λ4 , 0 A5 λ21 , λ4 A4 A1 (1000, 1), (0001, 0), (0010, 0), (1, 0000) A2 A2 A1 (10, 01, 1), (01, 00, 1), (00, 10, 1), (01, 00, 0), (00, 10, 0) Finally, the subgroups of E7 in characteristics 7 and 11. 101 Subgroup of E7 for p = 7, 11 Factors on Vmin D6 A1 (λ1 , 1), (λ5 , 0) A7 λ± 1 A5 A2 (λ1 , 10)± , (λ3 , 00) C3 G2 (001, 00), (100, 10) G2 A1 (01, 1), (10, 3) F4 A1 (0001, 1), (3, 0000) A2 06± A1 A1 (6, 3), (4, 1), (2, 5) E6 2 λ± 1 ,0 D6 λ21 , λ5 A6 ± λ± 1 , λ2 A5 A1 (λ1 , 10)± , (λ3 , 00) A4 A2 (10, 1000)±, (10, 0000)±, (00, 0100)± A3 A2 A1 (000, 10, 1)±, (010, 00, 1), (100, 10, 0)±, (100, 00, 0)± 102 References [1] Jonathan Alperin, Projective modules for SL(2, 2n ), J. Pure Appl. Algebra 15 (1979), 219–234. [2] , Local representation theory, Cambridge Studies in Advanced Mathematics, vol. 11, Cambridge University Press, Cambridge, 1996. [3] Henning Haahr Andersen, Jens Jørgensen, and Peter Landrock, The projective indecomposable modules of SL(2, pn ), Proc. London Math. Soc. 46 (1983), 38–52. [4] Michael Aschbacher, The maximal subgroups of E6 , preprint, 170pp. [5] Michael Aschbacher and Leonard Scott, Maximal subgroups of finite groups, J. Algebra 92 (1985), 44–80. [6] Richard Block, Trace forms on Lie algebras, Canad. J. Math. 14 (1962), 553–564. [7] Alexandre Borovik, Structure of finite subgroups of simple algebraic groups, Algebra i Logika 28 (1989), 249–279 (Russian). [8] Arjeh Cohen, Martin Liebeck, Jan Saxl, and Gary Seitz, The local maximal subgroups of exceptional groups of Lie type, finite and algebraic, Proc. London Math. Soc. 64 (1992), 21–48. [9] David A. Craven, Alternating subgroups of exceptional groups of Lie type, submitted. [10] , Subspace stabilizers and maximal subgroups of exceptional groups of Lie type, submitted. [11] , On tensor products of simple modules for simple groups, Algebr. Represent. Theory 126 (2013), 377–404. [12] Stephen Doty and Anne Henke, Decomposition of tensor products of modular irreducibles for SL2 , Quart. J. Math. 56 (2005), 189–207. [13] Ross Lawther, Jordan block sizes of unipotent elements in exceptional algebraic groups, Comm. Algebra 23 (1995), 4125–4156. [14] , Unipotent classes in maximal subgroups of exceptional algebraic groups, J. Algebra 322 (2009), 270–293. [15] Martin Liebeck and Jan Saxl, On the orders of maximal subgroups of the finite exceptional groups of Lie type, Proc. London Math. Soc. 55 (1987), 299–330. [16] Martin Liebeck, Jan Saxl, and Donna Testerman, Simple subgroups of large rank in groups of Lie type, Proc. London Math. Soc. 72 (1996), 425–457. [17] Martin W. Liebeck and Gary M. Seitz, Maximal subgroups of exceptional groups of Lie type, finite and algebraic, Geom. Dedicata 35 (1990), 353–387. [18] , On the subgroup structure of exceptional groups of Lie type, Trans. Amer. Math. Soc. 350 (1998), 3409–3482. [19] , On finite subgroups of exceptional algebraic groups, J. reine angew. Math. 515 (1999), 25–72. [20] , The maximal subgroups of positive dimension in exceptional algebraic groups, Mem. Amer. Math. Soc. 169 (2004), no. 802, vi+227. 103 [21] , Maximal subgroups of large rank in exceptional groups of Lie type, J. London. Math. Soc. 71 (2005), 345–361. [22] Alastair Litterick, Finite simple subgroups of exceptional algebraic groups, Ph.D. thesis, Imperial College, London, 2013. [23] , Finite simple subgroups of exceptional algebraic groups, Mem. Amer. Math. Soc., to appear., 2015. [24] Kay Magaard, The maximal subgroups of the Chevalley groups F4 (F ) where F is a finite or algebraically closed field of characteristic not equal to 2 or 3, Ph.D. thesis, California Institute of Technology, 1990. [25] Alexander Ryba, Short proofs of embeddings into exceptional groups of Lie type, J. Algebra 249 (2002), 402–418. [26] Gary M. Seitz, Unipotent elements, titling modules, and saturation, Invent. Math. 141 (2000), 467–502. [27] Jean-Pierre Serre, Exemples de plongements des groupes PSL2 (Fp ) dans des groupes de Lie simples, Invent. Math. 124 (1996), 525–562. [28] David Stewart and Adam Thomas, The Jacobson–Morozov theorem and complete reducibility of Lie subalgebras, submitted. 104
4math.GR
Whodunnit? Crime Drama as a Case for Natural Language Understanding arXiv:1710.11601v1 [cs.CL] 31 Oct 2017 Lea Frermann Shay B. Cohen Mirella Lapata Institute for Language, Cognition and Computation School of Informatics, University of Edinburgh 10 Crichton Street, Edinburgh EH8 9AB [email protected] [email protected] [email protected] Abstract In this paper we argue that crime drama exemplified in television programs such as CSI: Crime Scene Investigation is an ideal testbed for approximating real-world natural language understanding and the complex inferences associated with it. We propose to treat crime drama as a new inference task, capitalizing on the fact that each episode poses the same basic question (i.e., who committed the crime) and naturally provides the answer when the perpetrator is revealed. We develop a new dataset1 based on CSI episodes, formalize perpetrator identification as a sequence labeling problem, and develop an LSTM-based model which learns from multi-modal data. Experimental results show that an incremental inference strategy is key to making accurate guesses as well as learning from representations fusing textual, visual, and acoustic input. 1 Introduction The success of neural networks in a variety of applications (Sutskever et al., 2014; Vinyals et al., 2015) and the creation of large-scale datasets have played a critical role in advancing machine understanding of natural language on its own or together with other modalities. The problem has assumed several guises in the literature such as reading comprehension (Richardson et al., 2013; Rajpurkar et al., 2016), recognizing textual entailment (Bowman et al., 2015; Rocktäschel et al., 2016), and notably question answering based on text (Hermann et al., 1 Our dataset is available at https://github.com/ EdinburghNLP/csi-corpus. 2015; Weston et al., 2015), images (Antol et al., 2015), or video (Tapaswi et al., 2016). In order to make the problem tractable and amenable to computational modeling, existing approaches study isolated aspects of natural language understanding. For example, it is assumed that understanding is an offline process, models are expected to digest large amounts of data before being able to answer a question, or make inferences. They are typically exposed to non-conversational texts or still images when focusing on the visual modality, ignoring the fact that understanding is situated in time and space and involves interactions between speakers. In this work we relax some of these simplifications by advocating a new task for natural language understanding which is multi-modal, exhibits spoken conversation, and is incremental, i.e., unfolds sequentially in time. Specifically, we argue that crime drama exemplified in television programs such as CSI: Crime Scene Investigation can be used to approximate real-world natural language understanding and the complex inferences associated with it. CSI revolves around a team of forensic investigators trained to solve criminal cases by scouring the crime scene, collecting irrefutable evidence, and finding the missing pieces that solve the mystery. Each episode poses the same “whodunnit” question and naturally provides the answer when the perpetrator is revealed. Speculation about the identity of the perpetrator is an integral part of watching CSI and an incremental process: viewers revise their hypotheses based on new evidence gathered around the suspect/s or on new inferences which they make as the episode evolves. We formalize the task of identifying the perpetrator in a crime series as a sequence labeling problem. Like humans watching an episode, we assume the model is presented with a sequence of inputs comprising information from different modalities such as text, video, or audio (see Section 4 for details). The model predicts for each input whether the perpetrator is mentioned or not. Our formulation generalizes over episodes and crime series. It is not specific to the identity and number of persons committing the crime as well as the type of police drama under consideration. Advantageously, it is incremental, we can track model predictions from the beginning of the episode and examine its behavior, e.g., how often it changes its mind, whether it is consistent in its predictions, and when the perpetrator is identified. We develop a new dataset based on 39 CSI episodes which contains goldstandard perpetrator mentions as well as viewers’ guesses about the perpetrator while each episode unfolds. The sequential nature of the inference task lends itself naturally to recurrent network modeling. We adopt a generic architecture which combines a one-directional long-short term memory network (Hochreiter and Schmidhuber, 1997) with a softmax output layer over binary labels indicating whether the perpetrator is mentioned. Based on this architecture, we investigate the following questions: 1. What type of knowledge is necessary for performing the perpetrator inference task? Is the textual modality sufficient or do other modalities (i.e., visual and auditory input) also play a role? 2. What type of inference strategy is appropriate? In other words, does access to past information matter for making accurate inferences? 3. To what extent does model behavior simulate humans? Does performance improve over time and how much of an episode does the model need to process in order to make accurate guesses? Experimental results on our new dataset reveal that multi-modal representations are essential for the task at hand boding well with real-world natural language understanding. We also show that an incremental inference strategy is key to guessing the perpetrator accurately although the model tends to be less consistent compared to humans. In the remainder, we first discuss related work (Section 2), then present our dataset (Section 3) and formalize the modeling problem (Section 4). We describe our experiments in Section 5. 2 Related Work Our research has connections to several lines of work in natural language processing, computer vision, and more generally multi-modal learning. We review related literature in these areas below. Language Grounding Recent years have seen increased interest in the problem of grounding language in the physical world. Various semantic space models have been proposed which learn the meaning of words based on linguistic and visual or acoustic input (Bruni et al., 2014; Silberer et al., 2016; Lazaridou et al., 2015; Kiela and Bottou, 2014). A variety of cross-modal methods which fuse techniques from image and text processing have also been applied to the tasks of generating image descriptions and retrieving images given a natural language query (Vinyals et al., 2015; Xu et al., 2015; Karpathy and Fei-Fei, 2015). Another strand of research focuses on how to explicitly encode the underlying semantics of images making use of structural representations (Ortiz et al., 2015; Elliott and Keller, 2013; Yatskar et al., 2016; Johnson et al., 2015). Our work shares the common goal of grounding language in additional modalities. Our model is, however, not static, it learns representations which evolve over time. Video Understanding Work on video understanding has assumed several guises such as generating descriptions for video clips (Venugopalan et al., 2015a; Venugopalan et al., 2015b), retrieving video clips with natural language queries (Lin et al., 2014), learning actions in video (Bojanowski et al., 2013), and tracking characters (Sivic et al., 2009). Movies have also been aligned to screenplays (Cour et al., 2008), plot synopses (Tapaswi et al., 2015), and books (Zhu et al., 2015) with the aim of improving scene prediction and semantic browsing. Other work uses low-level features (e.g., based on face detection) to establish social networks of main characters in order to summarize movies or perform genre Peter Berglund: Grissom doesn't look You're still going to have to worried. convince a jury that I killed He takes his gloves off and two strangers for no reason. puts them on the table. Grissom: You ever been to the theater Peter? There 's a play called six degrees of separation. It 's about how all the Camera holds on Peter people in the world are Berglund's worried look. connected to each other by no more than six people. All it takes to connect you to the victims is one degree. Figure 1: Excerpt from a CSI script (Episode 03, Season 03: “Let the Seller Beware”). Speakers are shown in bold, spoken dialog in normal font, and scene descriptions in italics. Gold-standard entity mention annotations are in color. Perpetrator mentions (e.g., Peter Berglund) are in green, while words referring to other entities are in red. classification (Rasheed et al., 2005; Sang and Xu, 2010; Dimitrova et al., 2000). Although visual features are used mostly in isolation, in some cases they are combined with audio in order to perform video segmentation (Boreczky and Wilcox, 1998) or semantic movie indexing (Naphide and Huang, 2001). A few datasets have been released recently which include movies and textual data. MovieQA (Tapaswi et al., 2016) is a large-scale dataset which contains 408 movies and 14,944 questions, each accompanied with five candidate answers, one of which is correct. For some movies, the dataset also contains subtitles, video clips, scripts, plots, and text from the Described Video Service (DVS), a narration service for the visually impaired. MovieDescription (Rohrbach et al., 2017) is a related dataset which contains sentences aligned to video clips from 200 movies. Scriptbase (Gorinski and Lapata, 2015) is another movie database which consists of movie screenplays (without video) and has been used to generate script summaries. In contrast to the story comprehension tasks envisaged in MovieQA and MovieDescription, we focus on a single cinematic genre (i.e., crime series), and have access to entire episodes (and their corresponding screenplays) as opposed to video-clips or DVSs for some of the data. Rather than answering multiple factoid questions, we aim to solve a single problem, albeit one that is inherently challenging to both humans and machines. Question Answering A variety of question answering tasks (and datasets) have risen in popularity in recent years. Examples include reading compre- hension, i.e., reading text and answering questions about it (Richardson et al., 2013; Rajpurkar et al., 2016), open-domain question answering, i.e., finding the answer to a question from a large collection of documents (Voorhees and Tice, 2000; Yang et al., 2015), and cloze question completion, i.e., predicting a blanked-out word of a sentence (Hill et al., 2015; Hermann et al., 2015). Visual question answering (VQA; Antol et al. (2015)) is a another related task where the aim is to provide a natural language answer to a question about an image. Our inference task can be viewed as a form of question answering over multi-modal data, focusing on one type of question. Compared to previous work on machine reading or visual question answering, we are interested in the temporal characteristics of the inference process, and study how understanding evolves incrementally with the contribution of various modalities (text, audio, video). Importantly, our formulation of the inference task as a sequence labeling problem departs from conventional question answering allowing us to study how humans and models alike make decisions over time. 3 The CSI Dataset In this work, we make use of episodes of the U.S. TV show “Crime Scene Investigation Las Vegas” (henceforth CSI), one of the most successful crime series ever made. Fifteen seasons with a total of 337 episodes were produced over the course of fifteen years. CSI is a procedural crime series, it follows a team of investigators employed by the Las Vegas Police Department as they collect and evaluate ev- per case episodes with one case episodes with two cases total number of cases sentences sentences with perpetrator scene descriptions spoken utterances characters murder accident type of crime suicide other 19 20 59 min 228 0 64 144 8 51 4 2 2 max 1209 267 538 778 38 avg 689 89 245 444 20 Table 1: Statistics on the CSI data set. The type of crime was identified by our annotators via a multiple-choice questionnaire (which included the option “other”). Note that accidents may also involve perpetrators. idence to solve murders, combining forensic police work with the investigation of suspects. We paired official CSI videos (from seasons 1–5) with screenplays which we downloaded from a website hosting TV show transcripts.2 Our dataset comprises 39 CSI episodes, each approximately 43 minutes long. Episodes follow a regular plot, they begin with the display of a crime (typically without revealing the perpetrator) or a crime scene. A team of five recurring police investigators attempt to reconstruct the crime and find the perpetrator. During the investigation, multiple (innocent) suspects emerge, while the crime is often committed by a single person, who is eventually identified and convicted. Some CSI episodes may feature two or more unrelated cases. At the beginning of the episode the CSI team is split and each investigator is assigned a single case. The episode then alternates between scenes covering each case, and the stories typically do not overlap. Figure 1 displays a small excerpt from a CSI screenplay. Readers unfamiliar with script writing conventions should note that scripts typically consist of scenes, which have headings indicating where the scene is shot (e.g., inside someone’s house). Character cues preface the lines the actors speak (see boldface in Figure 1), and scene descriptions explain what the camera sees (see second and fifth panel in Figure 1). Screenplays were further synchronized with the 2 http://transcripts.foreverdreaming.org/ video using closed captions which are time-stamped and provided in the form of subtitles as part of the video data. The alignment between screenplay and closed captions is non-trivial, since the latter only contain dialogue, omitting speaker information or scene descriptions. We first used dynamic time warping (DTW; Myers and Rabiner (1981)) to approximately align closed captions with the dialogue in the scripts. And then heuristically time-stamped remaining elements of the screenplay (e.g., scene descriptions), allocating them to time spans between spoken utterances. Table 1 shows some descriptive statistics on our dataset, featuring the number of cases per episode, its length (in terms of number of sentences), the type of crime, among other information. The data was further annotated, with two goals in mind. Firstly, in order to capture the characteristics of the human inference process, we recorded how participants incrementally update their beliefs about the perpetrator. Secondly, we collected goldstandard labels indicating whether the perpetrator is mentioned. Specifically, while a participant watches an episode, we record their guesses about who the perpetrator is (Section 3.1). Once the episode is finished and the perpetrator is revealed, the same participant annotates entities in the screenplay referring to the true perpetrator (Section 3.2). 3.1 Eliciting Behavioral Data All annotations were collected through a webinterface. We recruited three annotators, all postgraduate students and proficient in English, none of them regular CSI viewers. We obtained annotations for 39 episodes (comprising 59 cases). A snapshot of the annotation interface is presented in Figure 2. The top of the interface provides a short description of the episode, i.e., in the form of a one-sentence summary (carefully designed to not give away any clues about the perpetrator). Summaries were adapted from the CSI season summaries available in Wikipedia.3 The annotator watches the episode (i.e., the video without closed captions) as a sequence of three minute intervals. Every three minutes, the video halts, and the annotator is pre3 See e.g., https://en.wikipedia.org/wiki/ CSI:_Crime_Scene_Investigation_(season_1). Number of cases: 2 Case 1: Grissom, Catherine, Nick and Warrick investigate when a wealthy couple is murdered at their house. Case 2: Meanwhile Sara is sent to a local high school where a cheerleader was found eviscerated on the football field. ( It ’s a shell casing . ) Perpetrator Suspect Other GRISSOM moves his light to Perpetrator Suspect Other the canopy below Figure 3: Annotation interface (second pass): after watching the episode, the annotator indicates for each word whether it refers to the perpetrator. Screenplay Perpetrator mentioned? Relates to case 1/2/none? (Nick cuts the canopy around MONICA NEWMAN.) Nick okay, Warrick, hit it (WARRICK starts the crane support under the awning to remove the body and the canopy area that NICK cut.) Nick white female, multiple bruising . . . bullet hole to the temple doesn’t help Nick .380 auto on the side Warrick yeah, somebody manhandled her pretty good before they killed her Figure 2: Annotation interface (first pass): after watching three minutes of the episode, the annotator indicates whether she believes the perpetrator has been mentioned. sented with the screenplay corresponding to the part of the episode they have just watched. While reading through the screenplay, they must indicate for every sentence whether they believe the perpetrator is mentioned. This way, we are able to monitor how humans create and discard hypotheses about perpetrators incrementally. As mentioned earlier, some episodes may feature more than one case. Annotators signal for each sentence, which case it belongs to or whether it is irrelevant (see the radio buttons in Figure 2). In order to obtain a more fine-grained picture of the human guesses, annotators are additionally asked to press a large red button (below the video screen) as soon as they “think they know who the perpetrator is”, i.e., at any time while they are watching the video. They are allowed to press the button multiple times throughout the episode in case they change their mind. Even though the annotation task just described reflects individual rather than gold-standard behavior, we report inter-annotator agreement (IAA) as a means of estimating variance amongst participants. We computed IAA using Cohen’s (1960) Kappa based on three episodes annotated by two participants. Overall agreement on this task (second column in Figure 2) is 0.74. We also measured percent agreement on the minority class (i.e., sentences tagged as “perpetrator mentioned”) and found it to be reasonably good at 0.62, indicating that despite individual differences, the process of guessing the perpetrator is broadly comparable across participants. Finally, annotators had no trouble distinguishing which utterances refer to which case (when the episode revolves around several), achieving an IAA of κ = 0.96. 3.2 Gold Standard Mention Annotation After watching the entire episode, the annotator reads through the screenplay for a second time, and tags entity mentions, now knowing the perpetrator. Each word in the script has three radio buttons attached to it, and the annotator selects one only if a word refers to a perpetrator, a suspect, or a character who falls into neither of these classes (e.g., a police investigator or a victim). For the majority of words, no button will be selected. A snapshot of our interface for this second layer of annotations is shown in Figure 3. To ensure consistency, annotators were given detailed guidelines about what constitutes an entity. Examples include proper names and their titles (e.g., Mr Collins, Sgt. O’ Reilly), pronouns (e.g., he, we), and other referring expressions including nominal mentions (e.g., let’s arrest the guy with the black hat). Inter-annotator agreement based on three episodes and two annotators was κ = 0.90 on the perpetrator class and κ = 0.89 on other entity annotations (grouping together suspects with other entities). Percent agreement was 0.824 for perpetrators and 0.823 for other entities. The high agreement indicates that the task is well-defined and the elicited annotations reliable. After the second pass, various entities in the script are disambiguated in terms of whether they refer to the perpetrator or other individuals. Note that in this work we do not use the tokenlevel gold standard annotations directly. Our model is trained on sentence-level annotations which we obtain from token-level ones, under the assumption that a sentence mentions the perpetrator if it contains a token that does. 4 Figure 4: Overview of the perpetrator prediction task. The model receives input in the form of text, images, and audio. Each modality is mapped to a feature representation. Feature representations are fused and passed to an LSTM which predicts whether a perpetrator is mentioned (label l = 1) or not (l = 0). Model Description We formalize the problem of identifying the perpetrator in a crime series episode as a sequence labeling task. Like humans watching an episode, our model is presented with a sequence of (possibly multi-modal) inputs, each corresponding to a sentence in the script, and assigns a label l indicating whether the perpetrator is mentioned in the sentence (l = 1) or not (l = 0). The model is fully incremental, each labeling decision is based solely on information derived from previously seen inputs. We could have formalized our inference task as a multi-label classification problem where labels correspond to characters in the script. Although perhaps more intuitive, the multi-class framework results in an output label space different for each episode which renders comparison of model performance across episodes problematic. In contrast, our formulation has the advantage of being directly applicable to any episode or indeed any crime series. A sketch of our inference task is shown in Figure 4. The core of our model (see Figure 5) is a one-directional long-short term memory network (LSTM; Hochreiter and Schmidhuber (1997; Zaremba et al. (2014)). LSTM cells are a variant of recurrent neural networks with a more complex Figure 5: Illustration of input/output structure of our LSTM model for two time steps. computational unit which have emerged as a popular architecture due to their representational power and effectiveness at capturing long-term dependencies. LSTMs provide ways to selectively store and forget aspects of previously seen inputs, and as a consequence can memorize information over longer time periods. Through input, output and forget gates, they can flexibly regulate the extent to which inputs are stored, used, and forgotten. The LSTM processes a sequence of (possibly multi-modal) inputs s = {xh1 , xh2 , ..., xhN }. It utilizes a memory slot ct and a hidden state ht which are incrementally updated at each time step t. Given input xt , the previous latent state ht−1 and previous memory state ct−1 , the latent state ht for time t and the updated memory state ct , are computed as follows:     it σ   ft   σ   =  W ht−1 ot   σ  xt cˆt tanh ct = ft ct−1 + it ht = o t tanh(ct ). cˆt The weight matrix W is estimated during inference, and i, o, and f are memory gates. As mentioned earlier, the input to our model consists of a sequence of sentences, either spoken utterances or scene descriptions (we do not use speaker information). We further augment textual input with multi-modal information obtained from the alignment of screenplays to video (see Section 3). Textual modality Words in each sentence are mapped to 50-dimensional GloVe embeddings, pretrained on Wikipedia and Gigaword (Pennington et al., 2014). Word embeddings are subsequently concatenated and padded to the maximum sentence length observed in our data set in order to obtain fixed-length input vectors. The resulting vector is passed through a convolutional layer with maxpooling to obtain a sentence-level representation xs . Word embeddings are fine-tuned during training. Visual modality We obtain the video corresponding to the time span covered by each sentence and sample one frame per sentence from the center of the associated period.4 We then map each frame to a 1,536-dimensional visual feature vector xv using the final hidden layer of a pre-trained convolutional network which was optimized for object classification (inception-v4; Szegedy et al. (2016)). Acoustic modality For each sentence, we extract the audio track from the video which includes all sounds and background music but no spoken dialog. We then obtain Mel-frequency cepstral coefficient (MFCC) features from the continuous signal. MFCC features were originally developed in the context of speech recognition (Davis and Mermelstein, 1990; Sahidullah and Saha, 2012), but 4 We also experimented with multiple frames per sentence but did not observe any improvement in performance. have also been shown to work well for more general sound classification (Chachada and Kuo, 2014). We extract a 13-dimensional MFCC feature vector for every five milliseconds in the video. For each input sentence, we sample five MFCC feature vectors from its associated time interval, and concatenate them in chronological order into the acoustic input xa .5 Modality Fusion Our model learns to fuse multimodal input as part of its overall architecture. We use a general method to obtain any combination of input modalities (i.e., not necessarily all three). Single modality inputs are concatenated into an m-dimensional vector (where m is the sum of dimensionalities of all the input modalities). We then multiply this vector with a weight matrix W h of dimension m × n, add an m-dimensional bias bh , and pass the result through a rectified linear unit (ReLU): xh = ReLU([xs ; xv ; xa ]W h + bh ) The resulting multi-modal representation xh is of dimension n and passed to the LSTM (see Figure 5). 5 Evaluation In our experiments we investigate what type of knowledge and strategy are necessary for identifying the perpetrator in a CSI episode. In order to shed light on the former question we compare variants of our model with access to information from different modalities. We examine different inference strategies by comparing the LSTM to three baselines. The first one lacks the ability to flexibly fuse multi-modal information (a CRF), while the second one does not have a notion of history, classifying inputs independently (a multilayer perceptron). Our third baseline is a rule-base system that neither uses multi-modal inputs nor has a notion of history. We also compare the LSTM to humans watching CSI. Before we report our results, we describe our setup and comparison models in more detail. 5.1 Experimental Settings Our CSI data consists of 39 episodes giving rise to 59 cases (see Table 1). The model was trained on 5 Preliminary experiments showed that concatenation outperforms averaging or relying on a single feature vector. 53 cases using cross-validation (five splits with 47/6 training/test cases). The remaining 6 cases were used as truly held-out test data for final evaluation. We trained our model using ADAM with stochastic gradient-descent and mini-batches of six episodes. Weights were initialized randomly, except for word embeddings which were initialized with pre-trained 50-dimensional GloVe vectors (Pennington et al., 2014), and fine-tuned during training. We trained our networks for 100 epochs and report the best result obtained during training. All results are averages of five runs of the network. Parameters were optimized using two cross-validation splits. The sentence convolution layer has three filters of sizes 3, 4, 5 each of which after convolution returns 75-dimensional output. The final sentence representation xs is obtained by concatenating the output of the three filters and is of dimension 225. We set the size of the hidden representation of merged crossmodal inputs xh to 300. The LSTM has one layer with 128 nodes. We set the learning rate to 0.001 and apply dropout with probability of 0.5. We compared model output against the gold standard of perpetrator mentions which we collected as part of our annotation effort (second pass). 5.2 Model Modality Cross-val T V A pr re f1 PRO + – – 19.3 76.3 31.6 CRF + – – 33.1 15.4 20.5 + – – 36.7 32.5 33.7 + + – 37.4 35.1 35.1 MLP + – + 39.6 34.2 35.7 + + + 38.4 34.6 35.7 + – – 39.2 45.7 41.3 + + – 39.9 48.3 43.1 LSTM + – + 39.2 52.0 44.0 + + + 40.6 49.7 44.1 Humans 74.1 49.4 58.2 Held-out pr re f1 19.5 77.2 31.1 30.2 16.1 21.0 35.9 36.8 36.3 38.0 41.0 39.3 38.7 36.5 37.5 38.5 42.3 40.2 36.9 50.4 42.3 40.9 54.9 46.8 36.8 56.3 44.5 42.8 51.2 46.6 76.3 60.2 67.3 Table 2: Precision (pr) recall (re) and f1 for detecting the minority class (perpetrator mentioned) for humans (bottom) and various systems. We report results with crossvalidation (center) and on a held-out data set (right) using the textual (T) visual (V), and auditory (A) modalities. sheds light on the importance of sequential information for perpetrator identification task. All results are best checkpoints over 100 training epochs, averaged over five runs. Model Comparison CRF Conditional Random Fields (Lafferty et al., 2001) are probabilistic graphical models for sequence labeling. The comparison allows us to examine whether the LSTM’s use of long-term memory and (non-linear) feature integration is beneficial for sequence prediction. We experimented with a variety of features for the CRF, and obtained best results when the input sentence is represented by concatenated word embeddings. MLP We also compared the LSTM against a multi-layer perceptron with two hidden layers, and a softmax output layer. We replaced the LSTM in our overall network structure with the MLP, keeping the methodology for sentence convolution and modality fusion and all associated parameters fixed to the values described in Section 5.1. The hidden layers of the MLP have ReLU activations and layersize of 128, as in the LSTM. We set the learning rate to 0.0001. The MLP makes independent predictions for each element in the sequence. This comparison PRO Aside from the supervised models described so far, we developed a simple rule-based system which does not require access to labeled data. The system defaults to the perpetrator class for any sentence containing a personal (e.g., you), possessive (e.g., mine) or reflexive pronoun (e.g., ourselves). In other words, it assumes that every pronoun refers to the perpetrator. Pronoun mentions were identified using string-matching and a precompiled list of 31 pronouns. This system cannot incorporate any acoustic or visual data. Human Upper Bound Finally, we compared model performance against humans. In our annotation task (Section 3.1), participants annotate sentences incrementally, while watching an episode for the first time. The annotations express their belief as to whether the perpetrator is mentioned. We evaluate these first-pass guesses against the gold standard (obtained in the second-pass annotation). Human LSTM LSTM avg Human avg precision in final 10% of the episode 1 0.8 0.6 0.4 0.2 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 test episode ID Figure 6: Precision in the final 10% of an episode, for 30 test episodes from five cross-validation splits. We show scores per episode and global averages (horizontal bars). Episodes are ordered by increasing model precision. 5.3 Which Model Is the Best Detective? We report precision, recall and f1 on the minority class, focusing on how accurately the models identify perpetrator mentions. Table 2 summarizes our results, averaged across five cross-validation splits (left) and on the truly held-out test episodes (right). Overall, we observe that humans outperform all comparison models. In particular, human precision is superior, whereas recall is comparable, with the exception of PRO which has high recall (at the expense of precision) since it assumes that all pronouns refer to perpetrators. We analyze the differences between model and human behavior in more detail in Section 5.5. With regard to the LSTM, both visual and acoustic modalities bring improvements over the textual modality, however, their contribution appears to be complementary. We also experimented with acoustic and visual features on their own, but without high-level textual information, the LSTM converges towards predicting the majority class only. Results on the held-out test set reveal that our model generalizes well to unseen episodes, despite being trained on a relatively small data sample compared to standards in deep learning. The LSTM consistently outperforms the nonincremental MLP. This shows that the ability to utilize information from previous inputs is essential for this task. This is intuitively plausible; in order to identify the perpetrator, viewers must be aware of the plot’s development and make inferences while the episode evolves. The CRF is outperformed by all other systems, including rule-based PRO. In contrast to the MLP and PRO, the CRF utilizes sequential information, but cannot flexibly fuse information from different modalities or exploit non-linear mappings like neural models. The only type of input which enabled the CRF to predict perpetrator mentions were concatenated word embeddings (see Table 2). We trained CRFs on audio or visual features, together with word embeddings, however these models converged to only predicting the majority class. This suggests that CRFs do not have the capacity to model complex long sequences and draw meaningful inferences based on them. PRO achieves a reasonable f1 score but does so because it achieves high recall at the expense of very low precision. The precision-recall tradeoff is much more balanced for the neural systems. 5.4 Can the Model Identify the Perpetrator? In this section we assess more directly how the LSTM compares against humans when asked to identify the perpetrator by the end of a CSI episode. Specifically, we measure precision in the final 10% of an episode, and compare human performance (first-pass guesses) and an LSTM model which uses all three modalities. Figure 6 shows precision results for 30 test episodes (across five cross-validation splits) and average precision as horizontal bars. Perhaps unsurprisingly, human performance is superior, however, the model achieves an average precision of 60% which is encouraging (compared to Episode 12 (Season 03): “Got Murder?” 0.8 LSTM f1 Human f1 0.4 0.2 0.4 0.2 0 0 0 100 200 300 400 500 600 0 180 60 40 120 400 500 200 300 400 500 200 300 #sentences observed 400 500 30 0 0 100 200 300 400 500 600 0 10 LSTM tp Human tp Gold tp 4 2 100 LSTM tp Human tp Gold tp 8 count count 300 90 0 6 200 60 20 8 100 LSTM tp Human tp Gold tp 150 count count 100 LSTM tp Human tp Gold tp 80 10 LSTM f1 Human f1 0.6 score 0.6 score Episode 19 (Season 03): “A Night at the Movies” 0.8 6 4 2 0 0 0 100 200 300 400 #sentences observed 500 600 0 100 Figure 7: Human and LSTM behavior over the course of two episodes (left and right). Top plots show cumulative f1; true positives (tp) are shown cumulatively (center) and as individual counts for each interval (bottom). Statistics relating to gold perpetrator mentions are shown in black. Red vertical bars show when humans press the red button to indicate that they (think they) have identified the perpetrator. 85% achieved by humans). Our results also show a moderate correlation between model and humans: episodes which are difficult for the LSTM (see left side of the plot in Figure 6) also result in lower human precision. Two episodes on the very left of the plot have 0% precision and are special cases. The first one revolves around a suicide, which is not strictly speaking a crime, while the second one does not mention the perpetrator in the final 10%. 5.5 How Is the Model Guessing? We next analyze how the model’s guessing ability compares to humans. Figure 7 tracks model behavior over the course of two episodes, across 100 equally sized intervals. We show the cumulative development of f1 (top plot), cumulative true positive counts (center plot), and true positive counts within each interval (bottom plot). Red bars indicate times at which annotators pressed the red button. Figure 7 (right) shows that humans may outperform the LSTM in precision (but not necessarily in recall). Humans are more cautious at guessing the perpetrator: the first human guess appears around sentence 300 (see the leftmost red vertical bars in Figure 7 right), the first model guess around sentence 190, and the first true mention around sentence 30. Once humans guess the perpetrator, however, they are very precise and consistent. Interestingly, model guesses at the start of the episode closely follow the pattern of gold-perpetrator mentions (bottom plots in Figure 7). This indicates that early model guesses are not noise, but meaningful predictions. Further analysis of human responses is illustrated in Figure 8. For each of our three annotators we plot the points in each episode where they press the red button to indicate that they know the perpetrator (bottom). We also show the number of times (all three) annotators pressed the red button individually for each interval and cumulatively over the course of the episode. Our analysis reveals that viewers tend to press the red button more towards the end, which is not unexpected since episodes are inherently designed to obfuscate the identification of the perpetrator. Moreover, Figure 8 suggests that there are two types of viewers: eager viewers who like our model guess early on, change their mind often, and therefore press the red button frequently (annotator 1 pressed the red button 6.1 times on average per annotator 1 annotator 2 annotator 3 all annotators frequency all annotators cumulative 0 0.2 First correct perpetrator prediction min max avg LSTM 2 554 141 Human 12 1014 423 0.4 0.6 0.8 1 Table 3: Sentence ID in the script where the LSTM and Humans predict the true Figure 8: Number of times the red button is pressed by each anno- perpetrator for the first time. We show tator individually (bottom) and by all three within each time interval the earliest (min) latest (max) and avand cumulatively (top). Times are normalized with respect to length. erage (avg) prediction time over 30 test episodes (five cross-validation splits). Statistics are averaged across 18/12/9 cases per annotator 1/2/3. portion of episode lapsed s1 Grissom pulls out a small evidence bag with the filling s1 Grissom What’s so amusing? s2 He puts it on the table Episode 03 (Season 03): “Let the Seller Beware” s3 s4 s5 s6 Tooth fill- 10-7-02 Brass We Peter B. Look ing 0857 also found I’m sure you’ll your finger- find me all prints and over the house your hair s2 Adam Trent So let’s say you find out who did it and maybe it’s me. s7 Peter B. I wanted to buy it Episode 21 (Season 05): “Committed” s3 s4 s5 s6 Adam Trent Adam Trent Adam Grissom What are you Are you going smirks Is it you? going to do? to convict me and starts of murder and biting his put me in a nails. bad place? s8 Peter B. I was everywhere s7 Adam Trent Check the files sir. s9 Brass well you made sure you were everywhere too didn’t you? s8 Adam Trent I’m a rapist not a murderer. Table 4: Excerpts of CSI episodes together with model predictions. Model confidence (p(l = 1)) is illustrated in red, with darker shades corresponding to higher confidence. True perpetrator mentions are highlighted in blue. Top: a conversation involving the true perpetrator. Bottom: a conversation with a suspect who is not the perpetrator. episode) and conservative viewers who guess only late and press the red button less frequently (on average annotator 2 pressed the red button 2.9 times per episode, and annotator 3 and 3.7 times). Notice that statistics in Figure 8 are averages across several episodes each annotator watched and thus viewer behavior is unlikely to be an artifact of individual episodes (e.g., featuring more or less suspects). Table 3 provides further evidence that the LSTM behaves more like an eager viewer. It presents the time in the episode (by sentence count) where the model correctly identifies the perpetrator for the first time. As can be seen, the minimum and average identification times are lower for the LSTM compared to human viewers. Table 4 shows model predictions on two CSI screenplay excerpts. We illustrate the degree of the model’s belief in a perpetrator being mentioned by color intensity. True perpetrator mentions are highlighted in blue. In the first example, the model mostly identifies perpetrator mentions correctly. In the second example, it identifies seemingly plausible sentences which, however, refer to a suspect and not the true perpetrator. 5.6 What if There Is No Perpetrator? In our experiments, we trained our model on CSI episodes which typically involve a crime, committed by a perpetrator, who is ultimately identified. How does the LSTM generalize to episodes without 60 LSTM fp Human fp 50 count 40 30 20 10 0 0 50 100 150 200 250 300 #sentences observed 350 400 450 Figure 8: Cumulative counts of false positives (fp) for the LSTM and a human viewer for an episode with no perpetrator (the victim committed suicide). Red vertical bars show the times at which the viewer pressed the red button indicating that they (think they) have identified the perpetrator. a crime, e.g., because the “victim” turns out to have committed suicide? To investigate how model and humans alike respond to atypical input we present both with an episode featuring a suicide, i.e., an episode which did not have any true positive perpetrator mentions. Figure 8 tracks the incremental behavior of a human viewer and the model while watching the suicide episode. Both are primed by their experience with CSI episodes to identify characters in the plot as potential perpetrators, and predict false positive perpetrator mentions. The human realizes after roughly two thirds of the episode that there is no perpetrator involved (he does not annotate any subsequent sentences as “perpetrator mentioned”), whereas the LSTM continues to make perpetrator predictions until the end of the episode. The LSTM’s behavior is presumably an artifact of the recurring pattern of discussing the perpetrator in the very end of an episode. 6 Conclusions In this paper we argued that crime drama is an ideal testbed for models of natural language understanding and their ability to draw inferences from complex, multi-modal data. The inference task is welldefined and relatively constrained: every episode poses and answers the same “whodunnit” question. We have formalized perpetrator identification as a sequence labeling problem and developed an LSTM-based model which learns incrementally from complex naturalistic data. We showed that multi-modal input is essential for our task as well an incremental inference strategy with flexible access to previously observed information. Compared to our model, humans guess cautiously in the beginning, but are consistent in their predictions once they have a strong suspicion. The LSTM starts guessing earlier, leading to superior initial true-positive rates, however, at the cost of consistency. There are many directions for future work. Beyond perpetrators, we may consider how suspects emerge and disappear in the course of an episode. Note that we have obtained suspect annotations but did not used them in our experiments. It should also be interesting to examine how the model behaves out-of-domain, i.e., when tested on other crime series, e.g., “Law and Order”. Finally, more detailed analysis of what happens in an episode (e.g., what actions are performed, by who, when, and where) will give rise to deeper understanding enabling applications like video summarization and skimming. Acknowledgments The authors gratefully acknowledge the support of the European Research Council (award number 681760; Frermann, Lapata) and H2020 EU project SUMMA (award number 688139/H2020-ICT-2015; Cohen). We also thank our annotators, the anonymous TACL reviewers whose feedback helped improve the present paper, and members of EdinburghNLP for helpful discussions and suggestions. References Stanislaw Antol, Aishwarya Agrawal, Jiasen Lu, M̃argaret Mitchell, Dhruv Batra, C. Lawrence Zitnick, and Devi Parikh. 2015. VQA: Visual Question Answering. In Proceedings of the IEEE International Conference on Computer Vision (ICCV), pages 2425– 2433, Santiago, Chile. Piotr Bojanowski, Francis Bach, Ivan Laptev, Jean Ponce, Cordelia Schmid, and Josef Sivic. 2013. Finding actors and actions in movies. In The IEEE International Conference on Computer Vision (ICCV), pages 2280– 2287, Sydney, Australia. John S. Boreczky and Lynn D. Wilcox. 1998. A hidden Markov model framework for video segmentation using audio and image features. In Proceedings of the 1998 IEEE International Conference on Acoustics, Speech and Signal Processing (ICASSP), pages 3741– 3744, Seattle, Washington, USA. Samuel R. Bowman, Gabor Angeli, Christopher Potts, and Christopher D. Manning. 2015. A large annotated corpus for learning natural language inference. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 632– 642, Lisbon, Portugal. Elia Bruni, Nam Khanh Tran, and Marco Baroni. 2014. Multimodal distributional semantics. J. Artif. Int. Res., 49(1):1–47, January. Sachin Chachada and C.-C. Jay Kuo. 2014. Environmental sound recognition: A survey. APSIPA Transactions on Signal and Information Processing, 3. Jacob Cohen. 1960. A coefficient of agreement for nominal scales. Educational and Psychological Measurement, 20(1):37–46. Timothee Cour, Chris Jordan, Eleni Miltsakaki, and Ben Taskar. 2008. Movie/script: Alignment and parsing of video and text transcription. In Proceedings of the 10th European Conference on Computer Vision, pages 158–171, Marseille, France. Steven B. Davis and Paul Mermelstein. 1990. Comparison of parametric representations for monosyllabic word recognition in continuously spoken sentences. In Alex Waibel and Kai-Fu Lee, editors, Readings in Speech Recognition, pages 65–74. Morgan Kaufmann Publishers Inc., San Francisco, California, USA. Nevenka Dimitrova, Lalitha Agnihotri, and Gang Wei. 2000. Video classification based on HMM using text and faces. In Proceedings of the 10th European Signal Processing Conference (EUSIPCO), pages 1–4. IEEE. Desmond Elliott and Frank Keller. 2013. Image description using visual dependency representations. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 1292– 1302, Seattle, Washington, USA. Philip John Gorinski and Mirella Lapata. 2015. Movie script summarization as graph-based scene extraction. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 1066–1076, Denver, Colorado, USA. Karl Moritz Hermann, Tomas Kocisky, Edward Grefenstette, Lasse Espeholt, Will Kay, Mustafa Suleyman, and Phil Blunsom. 2015. Teaching machines to read and comprehend. In C. Cortes, N. D. Lawrence, D. D. Lee, M. Sugiyama, and R. Garnett, editors, Advances in Neural Information Processing Systems 28, pages 1693–1701. Curran Associates, Inc. Felix Hill, Anoine Bordes, Sumit Chopra, and Jason Weston. 2015. The Goldilocks principle: Reading children’s books with explicit memory representations. In Proceedings of the 3rd International Conference on Learning Representations (ICLR), San Diego, California, USA. Sepp Hochreiter and Jürgen Schmidhuber. 1997. Long short-term memory. Neural Computation, 9(8):1735– 1780, November. Justin Johnson, Ranjay Krishna, Michael Stark, Li-Jia Li, David A Shamma, Michael S Bernstein, and Li FeiFei. 2015. Image retrieval using scene graphs. In Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3668–3678, Boston, Massachusetts, USA. Andrej Karpathy and Li Fei-Fei. 2015. Deep visualsemantic alignments for generating image descriptions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3128– 3137, Boston, Massachusetts. Douwe Kiela and Léon Bottou. 2014. Learning image embeddings using convolutional neural networks for improved multi-modal semantics. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 36–45, Doha, Qatar. John D. Lafferty, Andrew McCallum, and Fernando C. N. Pereira. 2001. Conditional random fields: Probabilistic models for segmenting and labeling sequence data. In Proceedings of the 18th International Conference on Machine Learning, pages 282–289, San Francisco, CA, USA. Morgan Kaufmann Publishers Inc. Angeliki Lazaridou, Nghia The Pham, and Marco Baroni. 2015. Combining language and vision with a multimodal skip-gram model. In Proceedings of the 2015 Conference of the North American Chapter of the Association for Computational Linguistics: Human Language Technologies, pages 153–163, Denver, Colorado, USA. Dahua Lin, Sanja Fidler, Chen Kong, and Raquel Urtasun. 2014. Visual semantic search: Retrieving videos via complex textual queries. In IEEE Conference on Computer Vision and Pattern Recognition, pages 2657–2664, Columbus, Ohio, USA. Cory S. Myers and Lawrence R. Rabiner. 1981. A comparative study of several dynamic time-warping algorithms for connected word recognition. The Bell System Technical Journal, 60(7):1389–1409. Milind R. Naphide and Thomas S. Huang. 2001. A probabilistic framework for semantic video indexing, filtering, and retrieval. IEEE Transactions on Multimedia, 3(1):141–151. Luis Gilberto Mateos Ortiz, Clemens Wolff, and Mirella Lapata. 2015. Learning to interpret and describe abstract scenes. In Proceedings of the 2015 NAACL: Human Language Technologies, pages 1505–1515, Denver, Colorado, USA. Jeffrey Pennington, Richard Socher, and Christopher D. Manning. 2014. GloVe: Global vectors for word representation. In Proceedings of the 2014 Conference on Empirical Methods in Natural Language Processing (EMNLP), pages 1532–1543, Doha, Qatar. Pranav Rajpurkar, Jian Zhang, Konstantin Lopyrev, and Percy Liang. 2016. SQuAD: 100,000+ questions for machine comprehension of text. In Proceedings of the 2016 Conference on Empirical Methods in Natural Language Processing, pages 2383–2392, Austin, Texas, USA. Zeeshan Rasheed, Yaser Sheikh, and Mubarak Shah. 2005. On the use of computable features for film classification. IEEE Transactions on Circuits and Systems for Video Technology, 15(1):52–64. Matthew Richardson, Christopher J.C. Burges, and Erin Renshaw. 2013. MCTest: A challenge dataset for the open-domain machine comprehension of text. In Proceedings of the 2013 Conference on Empirical Methods in Natural Language Processing, pages 193–203, Seattle, Washington, USA. Tim Rocktäschel, Edward Grefenstette, Karl Moritz Hermann, Tomas Kocisky, and Phil Blunsom. 2016. Reasoning about entailment with neural attention. In Proceedings of the 4th International Conference on Learning Representations (ICLR), San Juan, Puerto Rico. Anna Rohrbach, Atousa Torabi, Marcus Rohrbach, Niket Tandon, Christopher Pal, Hugo Larochelle, Aaron Courville, and Bernt Schiele. 2017. Movie description. International Journal of Computer Vision, 123(1):94–120. Md Sahidullah and Goutam Saha. 2012. Design, analysis and experimental evaluation of block based transformation in MFCC computation for speaker recognition. Speech Communication, 54(4):543–565. Jitao Sang and Changsheng Xu. 2010. Character-based movie summarization. In Proceedings of the 18th ACM International Conference on Multimedia, pages 855–858, Firenze, Italy. Carina Silberer, Vittorio Ferrari, and Mirella Lapata. 2016. Visually grounded meaning representations. IEEE Transactions on Pattern Analysis and Machine Intelligence, 99. Josef Sivic, Mark Everingham, and Andrew Zisserman. 2009. “Who are you?” – Learning person specific classifiers from video. In IEEE Conference on Computer Vision and Pattern Recognition, pages 1145– 1152, Miami, Florida, USA. Ilya Sutskever, Oriol Vinyals, and Quoc V. Le. 2014. Sequence to sequence learning with neural networks. In Proceedings of the 27th International Conference on Neural Information Processing Systems, NIPS’14, pages 3104–3112, Cambridge, MA, USA. MIT Press. Christian Szegedy, Sergey Ioffe, and Vincent Vanhoucke. 2016. Inception-v4, inception-ResNet and the im- pact of residual connections on learning. CoRR, abs/1602.07261. Makarand Tapaswi, Martin Bäuml, and Rainer Stiefelhagen. 2015. Aligning plot synopses to videos for storybased retrieval. International Journal of Multimedia Information Retrieval, (4):3–26. Makarand Tapaswi, Yukun Zhu, Rainer Stiefelhagen, Antonio Torralba, Raquel Urtasun, and Sanja Fidler. 2016. MovieQA: Understanding stories in movies through question-answering. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 4631–4640, Las Vegas, Nevada. Subhashini Venugopalan, Marcus Rohrbach, Jeff Donahue, Raymond J. Mooney, Trevor Darrell, and Kate Saenko. 2015a. Sequence to sequence – Video to text. In Proceedings of the 2015 International Conference on Computer Vision (ICCV), pages 4534–4542, Santiago, Chile. Subhashini Venugopalan, Huijuan Xu, Jeff Donahue, Marcus Rohrbach, Raymond Mooney, and Kate Saenko. 2015b. Translating videos to natural language using deep recurrent neural networks. In Proceedings the 2015 Conference of the North American Chapter of the Association for Computational Linguistics – Human Language Technologies (NAACL HLT 2015), pages 1494–1504, Denver, Colorado, June. Oriol Vinyals, Alexander Toshev, Samy Bengio, and Dumitru Erhan. 2015. Show and tell: A neural image caption generator. Proceedings of the 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 3156–3164. Ellen M. Voorhees and Dawn M. Tice. 2000. Building a question answering test collection. In ACM Special Interest Group on Information Retrieval (SIGIR), pages 200–207, Athens, Greece. Jason Weston, Antoine Bordes, Sumit Chopra, and Tomas Mikolov. 2015. Towards AI-complete question answering: A set of prerequisite toy tasks. CoRR, abs/1502.05698. Kelvin Xu, Jimmy Ba, Ryan Kiros, Kyunghyun Cho, Aaron Courville, Ruslan Salakhudinov, Rich Zemel, and Yoshua Bengio. 2015. Show, attend and tell: Neural image caption generation with visual attention. In Proceedings of the 32nd International Conference on Machine Learning, pages 2048–2057, Boston, Massachusetts, USA. Yi Yang, Wen-tau Yih, and Christopher Meek. 2015. WikiQA: A challenge dataset for open-domain question answering. In Proceedings of the 2015 Conference on Empirical Methods in Natural Language Processing, pages 2013–2018, Lisbon, Portugal. Mark Yatskar, Luke Zettlemoyer, and Ali Farhadi. 2016. Situation recognition: Visual semantic role labeling for image understanding. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 5534–5542, Zurich, Switzerland. Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. 2014. Recurrent neural network regularization. CoRR, abs/1409.2329. Yukun Zhu, Ryan Kiros, Rich Zemel, Ruslan Salakhutdinov, Raquel Urtasun, Antonio Torralba, and Sanja Fidler. 2015. Aligning books and movies: Towards story-like visual explanations by watching movies and reading books. In The IEEE International Conference on Computer Vision (ICCV), Santiago, Chile.
7cs.IT
Consensus-Based Torque Control of Deloaded Wind DFIGs for Distributed and Fair Dynamic Dispatching arXiv:1602.04234v1 [cs.SY] 12 Feb 2016 Stefanos Baros1 Abstract— In this paper we aim to address the problem of dynamically dispatching a group of state-of-the-art deloaded wind generators (WGs) in a fair-sharing manner. We use the term dynamically since the WGs aim to dispatch themselves according to a varying committed WF power output. We first propose a leader-follower protocol whose execution guarantees asymptotically, two control objectives. These are 1) reaching asymptotic consensus on the utilization level of all WGs and 2) the total power output of the WGs asymptotically converges to the reference value. Thereafter, we combine singular perturbation and Lyapunov theory to prove that, under certain conditions, the proposed protocol will asymptotically converge to its equilibrium. Finally, we derive a cooperative Control Lyapunov Function-based (CLF) controller for the rotor side converter (RSC) of each WG that realizes the protocol in practice. We demonstrate the effectiveness of our proposed protocol and the corresponding RSC controller design via simulations on the modified IEEE 24-bus RT system. I. I NTRODUCTION A recent study conducted by the US Department Of Energy [1] outlines the future of wind power in the US. Specifically, it mentions that 10% of the US electricity demand is expected to be produced by wind power by 2020, 20% of the US electricity demand by 2020 and 35% of the US electricity demand by 2050. In a similar status is Europe, where wind power integration is expected to increase significantly in the next years [2]. These studies evidence a recent world-wide tendency toward integrating a lot of wind power into power systems. On the other hand, integrating high levels of wind power into power systems raises an important challenge for those systems. That is, to maintain their stability, their reliability and their robustness [2]. It is worthwhile realizing that in high-wind-integration settings, the WGs control will have a pronounced impact on the stability and performance of the power grids that accommodate the wind power. For this reason, the ongoing regulations for the operation of WGs require the WGs to provide multiple advanced capabilities into the grid [2]. Between them, frequency regulation, inertial response, power output smoothing, Low Voltage Ride-Through (LVRT) capability and voltage control [2]. Yet, by allowing communication between WGs, capabilities that require coordination between WGs can be achieved. Examples can be coordinated voltage control for regulation of the WF terminal voltage and coordinated power control with load-sharing between WGs. Such capabilities can be achieved efficiently with distributed control methods that require a limited number of dedicated communication links. 1 Stefanos Baros is with the ECE department of Carnegie Mellon University, Pittsburgh, PA, 15213 USA e-mail: [email protected] In this paper, we focus on an important and advanced capability that can be provided by a group of deloaded WGs. The capability for regulating their total power extracted from the wind such that it tracks a reference while they dynamically dispatch themselves in a fairly fashion. Deloaded WGs are characterized by their flexibility to increase their power output when they are commanded to. A WF that has its WGs operating in a deloaded regime aiming to provide the above capability has to address the following challenges. Firstly, to timely compute the reference power points of its WGs while taking into account the local varying wind speed conditions. Secondly, to timely communicate these set-points to the WGs in order for the WF total power output to match the required reference. In the literature, most of the studied methods relied on centralized control schemes. Centralized schemes presume that information about the wind speed, which is scattered throughout the WF, is obtained from the central controller. The central controller, having this information together with information regarding the total WF power output can then compute the power set-point for each WG individually. Then, it can dispatch the WGs accordingly. Finally, the power output of each WG can be regulated by its local controller such that the WG generates the reference power. An approach belonging to the above category can be found in [3]. Despite the fact that centralized-based approaches can address the problem discussed above they come with several drawbacks, rather critical to be neglected. Among others are, single-point failures, increased computational cost, extensive communication network costs and delays [4]. The delays can hamper a fast-responding control action from the WF and can also compromise its tracking performance when (in a given set-up) the dispatching of the WGs has to happen fast e.g for maintaining power balance in a microgrid. The literature on distributed methods for addressing the problem of dispatching distributively a group of WGs given a varying WF committed power output is not very broad. As far as the authors are aware, the only references related to the above problem are [5] and [6]. In [6], the authors proposed a distributed WF controller for regulating the power references of multiple WGs. At the same time, the controller ensured that the fatigue experienced by the WGs was reduced while the total power of the WF was reaching a pre-assigned value. In a similar line of research, the authors in [5] proposed a multi-agent-based strategy for addressing the same problem in a microgrid setting. The global information of the total demand and total available wind power were retrieved via a consensus protocol that was executed by the agents. Subsequently, this information was used by each agent to define the set point of its corresponding WG. In this work we make several contributions toward addressing the problem of distributively and dynamically dispatching a group of WGs for the purpose of having the WF power output tracking a reference. To this end, we first propose a distributed leader-follower consensus protocol that realizes two basic control objectives 1) asymptotic consensus of the utilization levels of all WGs i.e consensus on the ratio defined by the available (from the wind) mechanical power over the maximum mechanical power of each WG 2) asymptotic tracking of a varying reference by the WF total power output. We prove that the proposed protocol asymptotically converges to its equilibrium point under specific conditions. Our proof relies on results from singular perturbation theory [7]. In the last part of our approach, we develop a Control Lyapunov Function-based (CLF) [8] RSC controller that realizes the proposed protocol in practice. The rest of the paper is outlined in the following way. Section II describes the problem of distributed dynamic dispatching of the WGs for WF power output tracking. Section III, presents the relevant WF model. Section IV and V provide the main results of the paper. Section IV, introduces the proposed protocol and Section V presents the stability analysis. Section VI gives the derivation of the CLFbased torque RSC controller. In Section VII, the effectiveness of the proposed approach is evaluated via simulations on the modified IEEE-RTS 24-bus system. Finally, Section VIII concludes the paper. II. P ROBLEM F ORMULATION A. Notation With G being a set we use |G| to denote its cardinality. We denote by R the set of reals and by C the set of complex numbers. Also, we denote by R+ the set of nonnegative real numbers and with R++ the set of positive reals. We denote the m-dimensional Euclidean space by Rm . We denote vectors and matrices with bold characters. Let A ∈ Rm×n be a m × n matrix of reals. With A> we denote the transpose of A and with [a]ij the (i, j)-entry of the matrix A. Let A  0 (A  0) denote that the matrix A is positive definite (semi-definite). The spectrum of the matrix A (set of eigenvalues) is denoted by σ(A). A n×n diagonal matrix B is denoted by B = diag[bi ]ni=1 . The maximum value of the vector a is denoted by ā. Similarly the maximum value of a scalar quantity z is given by z̄. With In we denote the n × n identity matrix and with 0n×1 and 1n×1 a n × 1 column vector of zeros and ones respectively. With ẋ we denote the time derivative of a variable x with respect to t, dx dt . With 2 ẍ we denote the second derivative ddt2x The operator Re(·) returns the real part of an imaginary number (·) ∈ C. With C 2 we denote the space of functions with continuous second derivatives. B. Fair Dynamic Dispatching of WGs While the WF Power Output is Tracking a Reference To formulate the main problem, we consider a set-up where we have a WF comprised with n wind generators. We denote these generators by the set G , {1, ..., n} and index each WG by i where i ∈ G. The available mechanical power that can be extracted from the wind by each WG is given by [9]: Pm,i , 1 3 ρCp,i Ai vw,i , 2 ∀i ∈ G (1) kg where ρ ∈ R++ is the air density [ m 3 ], Cp,i ∈ R+ is the 2 power coefficient, Ai = πRi ∈ R++ is the area (swept by the blades) and vw,i ∈ R++ , the local wind speed in [ m s ]. Notice that, the only controllable variable in (1) is Cp,i which can be regulated by the rotor speed of the WG, ωr,i . The standard functionality provided by DFIGs wind turbines is Maximum Power Point Tracking (MPPT). Achieving MPPT presumes that the WG is controlled such that Cp,i = C̄p,i , where C̄p,i is the maximum value of Cp,i . In that case, (1) can be recasted to: 1 3 , ∀i ∈ G (2) P̄m,i , ρC̄p,i Ai vw,i 2 The total power that a WF is required to extract from the wind at any given moment can be described by a reference Pd that equals the WF committed power output to the grid. The latter is true under the mild assumption that the WF power losses are negligible. In our case, we consider a setting where the WGs are operating in a deloading regime and can P always meet the demanded power reference i.e Pd ≤ i∈G P̄m,i . For that setting, the problem we aim to address can be formulated as follows. Problem 1: To develop a fully distributed control scheme for the RSC of the WGs that guarantees meeting the next two conditions. P Condition 1: lim Pm,i = Pd t→∞ i∈G     Pm,i P Condition 2: lim P̄m,i = lim P̄m,j , ∀i, j ∈ G m,j t→∞ t→∞ The first condition ensures that the total WF power extracted from the wind is tracking the reference while the second condition that the WGs are dynamically dispatched in a fairly manner i.e the ratio of the mechanical power to the maximum mechanical power of each WG is the same. We suppose that all WGs have identical technical characteristics such that Ai = Aj , ∀i, j ∈ G. The following remark holds.     Cp,i P Remark 1: P̄m,i = , ∀i ∈ G C̄p,i m,i Remark 1 directly appears when dividing (1) over (2). With this, the Condition 2 becomes: Condition 3: C  C  p,i p,j = lim , ∀i, j ∈ G lim t→∞ C̄p,i t→∞ C̄p,j Observe that: Condition 2⇔ Condition 3 In the sequel, we use this observation to introduce an approach that addresses Problem 1. Power Coefficient h Cp,i (λi , θi ),0.22 116( III. M ATHEMATICAL M ODELING  We present the WF-related models for providing the ground of the forthcoming analysis. Specifically, we present the wind-speed stochastic model, the rotor-voltage dynamical model including the RSC control input and the rotor-speed dynamical model. The effective wind speed vw,i ∈ R+ can be modeled by integrating two basic components, the slowly-varying mean wind-speed, vm,i ∈ R+ , and the fast turbulence, vs,i ∈ R+ [10],[11]. Therefore, vw,i appears as: i∈G (3) We note that, the turbulent component can be modeled in the standard state-space form parameterized by the mean wind-speed vm,i with p1,i , p1,i (vm,i ), p2,i , p2,i (vm,i ), ki , ki (vm,i ) ∈ R as: !      0 1 0 vs,i v̇s,i e + , p +p2,i ki − p1,i1p2,i − p1,i v̇s,i v̈s,i p1,i p2,i 1,i p2,i (4) With e ∈ N (0, 1), we denote a white noise process [10],[11]. B. Wind Generator Model Since the problem we aim to address involves only the rotor of the WG, we only present the rotor-side dynamics of the WG. These, can be fully described by the electromagnetic state-variables (rotor-voltages) dynamics and the electromechanical state-variable (rotor-speed) dynamics [9],[12] as: Rotor-voltage Dynamics 0 0 0 1 h Ėd,i , 0 − (Ed,i − (Xs,i − Xs,i )Iqs,i ) T0,i i 0 0 Xm,i + T0,i (−ωs Vqr,i + (ωs − ωr,i )Eq,i ) , ∀i∈G Xr,i (5a) 0 0 0 1 h Ėq,i , 0 − (Eq,i + (Xs,i − Xs,i )Ids,i ) T0,i i 0 0 Xm,i + T0,i (ωs Vdr,i − (ωs − ωr,i )Ed,i ) , ∀i∈G Xr,i (5b) Rotor-speed Dynamics ω̇r,i , ωs (Tm,i − Te,i ), ∀i∈G 2Hi (5c) Mechanical Torque Tm,i , 1 i +0.08θi ) − 0.035 3 θ +1 i  , ∀i∈G (5e) Tip-speed Ratio  2k  ω R  i r i λi , , ∀i∈G pi vw,i (5f) All the variables are explained in the Appendix. A. Wind Speed Model vw,i = vm,i + vs,i , ·e −12.5( λ 0.035 i 1 ) − 3 λi + 0.08θi θi + 1 1 ρπRi2 ωs 3 Cp (λi , θi )vw,i , ∀i∈G 2 Sb,i ωr,i (5d) IV. L EADER -F OLLOWER C ONSENSUS P ROTOCOL By establishing the equivalence between Condition 2 and 3, we readily observe that having WGs achieving fair sharing is the same as ensuring that Condition 3 is met. Consequently, we can pose this problem as a consensus agreement problem among all WGs on the utilization levels Cp,i , ∀i ∈ G. For this reason, we introduce an appropriate C̄p,i Leader-follower Consensus Protocol which we prove that it converges to an equilibrium point that solves the exact consensus agreement problem. Let WG 1 be the group leader l , 1 and Ḡ , {2, ..., n} where Ḡ ⊂ G be the set of WGs without the leader. Then, we propose the following protocol. Protocol P1 Leader WG X dξh , (Pd − Pm,l − Pm,i ) dt i∈Ḡ dzl , −kα,l (zl − ξh ) , dt zl , z1 ξh ∈ R (6a) zl ∈ R (6b) WG i dzi , −kα,i (zi − zi−1 ) , i ∈ Ḡ zi ∈ R (6c) dt     C Cp,i where the consensus states are zl , C̄p,l and z , i C̄ p,i p,l respectively and the auxiliary state-variable of the leader is ξh . The allowable communication links for implementing this protocol can be seen in Fig. 3. We briefly describe the mechanism by which the protocol is executed. The WF supervisory controller obtains the WF reference Pd from the system operator and passes its value to the leader WG. Next, the leader WG computes its auxiliary state ξh and its consensus state zl , using the reference and information from all WGs. The leader communicates its consensus state with the time derivative of its consensus state to the neighboring WG. The same process is executed by all WGs i.e they obtain their consensus state and communicate it to a neighboring WG, concurrently. An assumption that has to be valid in order for the protocol to be realizable is that the leader P WG can retrieve the information i∈Ḡ Pm,i . The following methods can be used for this purpose. 1) information passing from each WG to the leader (indirectly, via intermediate WGs). 2) average consensus protocol [13] P with consensus statevariable the mechanical power i.e i∈Ḡ (Pm,i +Pm,l ) = (Pm,avg · n). V. S TABILITY A NALYSIS OF THE P ROPOSED P ROTOCOL In this section, we study the asymptotic behavior of the proposed protocol and the properties of its equilibrium point. We begin by defining the following coefficients: 1 3 ρC̄p,l Al vw,l , α l ∈ R+ (7) 2 1 3 αi , ρC̄p,i Ai vw,i , αi ∈ R+ , i ∈ Ḡ (8) 2 where in vector form are written as α = [αl , α2 , ..., αn ]> , α ∈ Rn . We define the consensusstates vector compactly as z = [z1 , ..., zi , ..., zn ]> , z ∈ Rn . With these, Eq. (6a) become: X dξh = (Pd − αl zl − α i zi ) (9a) dt αl , i∈Ḡ The equilibrium of the consensus protocol as obtained from Eq. (9a),(6b),(6c) is: ξh0 = (αl + P Pd zl0 = ξh0 i∈Ḡ αi ) zi0 = ξh0 , ∀i ∈ Ḡ (10) (11) (12) Without loss of generality we take kα,i , kα,l , ∀i ∈ Ḡ. we have the next Theorem. Defining ε ∈ R+ as ε = kᾱ a,i Theorem 1: ∃ε∗ > 0 s.t ∀ε < ε∗ the equilibrium point (ξh0 , z0 ) is asymptotically stable. Proof: First, we define a new time-scale τ = ᾱ t with dτ = ᾱ dt. Using this, equations (6b),(6c), (9a) become: X αi dξh Pd αl ,( − zl − zi ) (13a) dτ ᾱ ᾱ ᾱ i∈Ḡ  ᾱ  dz l , −(zl − ξh ) (13b) kα,l dτ  ᾱ  dz i , −(zi − zi−1 ), i ∈ Ḡ (13c) kα,i dτ ā ā Letting kα,l = kα,l = ε, we can write the above equations more compactly as: Slow quasi-steady system dξh , gh , dτ gh ∈ R (14a) Fast boundary-layer system ε dz , g, dτ g ∈ Rn (14b) where X αi Pd αl gh , ( − zl − zi ) ᾱ ᾱ ᾱ i∈Ḡ g , [−(zl − ξh ) · · · − (zi − zi−1 ) · · · − (zn − zn−1 )]> (14c) Equations (14a),(14b) are in the standard singularly perturbed form [7] with ξh being the slow state-variable and z being the fast state-variables. A system possessing a multitime-scale property enables a compartmental stability analysis of its system dynamics. By exploiting this property, we first study the fast boundary-layer system dynamics (14b) in a new time scale τ̃ = τε . Assuming that the slow state-variable h ξh is “frozen” i.e dξ dτ̃ ≈ 0, and using the transformation yi = (zi − ξh ) we can write the system equations (14b) as: dy , Af y, dτ̃ y , [y1 , ..., yn ]>  −1 0 · · · 0  1 −1 · · · 0  Af ,  . .  .. . . | (15) (16) 0 0 .. .      (17) 0 0 · · · 1 −1 {z } n×n Since Af is a lower-triangular matrix, the diagonal terms represent also the eigenvalues of Af . From that, we can conclude that Af is a Hurwitz matrix and that the equilibrium y0 = 0n×1 is asymptotically stable. Equivalently that, the equilibrium z0 = (ξh0 · 1n×1 ) is asymptotically stable and attractive to the trajectories of the fast state-variables z. Thus, all zi will converge toward the slow state-variable ξh . We are left to show that the ξh converges toward ξh0 . To do that, we focus on the behavior of the fast sub-system equation (14b) when ε , 0, and observe that it degenerates into the algrebraic equation: 0n×1 = g(ξh , z) (18) Solving for z results into the n−dimensional equilibrium slow-manifold of (18), described by z = η(ξh ) = (ξh ·1n×1 ). Direct substitution into (14a) yields the slow model: dξh = gh (ξh , η(ξh )) dτ P X αi  αl d = − ξh − ξh ᾱ ᾱ ᾱ (19) i∈Ḡ The slow sub-system (19) has an asymptotically stable equilibrium equal to: ξh0 = (αl + P Pd i∈Ḡ αi ) Having established that, the fast and the slow sub-systems have asymptotically stable equilibria, from Theorem 11.4 (in [7]) we conclude the next statement. That, ∃ε∗ > 0 such that ∀ε < ε∗ the equilibrium point of the full system (13a)-(13c) is asymptotically stable. That, completes the proof. VI. D ESIGN OF THE C ONSENSUS - BASED T ORQUE C ONTROLLER The previous Section was dedicated to establishing asymptotic convergence of the proposed consensus protocol to an equilibrium point that realizes the desired control objectives, described in Problem 1. For implementing the proposed protocol, we design a cooperative torque controller for the RSC of each WG that will force the system dynamics to evolve as in (13a)-(13c). Writing equation (6c) analytically leads to: Cp,i Cp,i−1 Ċp,i = −kα,i ( − ), C̄p,i C̄p,i C̄p,i−1 i∈G (20) i∈G (21) WG i Gearbox Noticing from (5e) that when θi = 0 we have Cp,i , Cp,i (λi , 0), The term Ċp,i C̄p,i Te,i i∈G 1 ∗ 2 ) , ∀i ∈ G (24) Ve,i = (Te,i − Tei 2 ∗ where Ve,i > 0, ∀Te,i ∈ De,i \ {Tei }. Now, consider the following proposition. Proposition 1: Ve,i ∈ C 2 is a CLF and the equilibrium ∗ Te,i = Te,i can be rendered asymptotically stable. ∗ Proof: Define the variable T̃e,i = (Te,i − Te,i ), ∀i ∈ G and let the electrical torque expressed as: 0 Te,i (25) Computing the time-derivative of Ve,i along T̃˙e,i dynamics gives us: 0 0 dVe,i Vs,i 1 h = T̃e,i 0 − (Eq,i + (Xs,i − Xs,i )Ids,i ) 0 dt Xs,i T0,i i 0 0 Xm,i ∗ + T0,i (ωs Vdr,i − (ωs − ωr,i )Ed,i ) − T̃e,i Ṫe,i Xr,i (26) This expression can be compactly expressed as: dVe,i ∂Ve,i = [fi + hi Vdr,i ], dt ∂ T̃e,i ∀i ∈ G (27) where 0 0 ∂Ve,i Vs,i 1 h fi , T̃e,i 0 − (Eq,i + (Xs,i − Xs,i )Ids,i ) 0 Xs,i T0,i ∂ T̃e,i i 0 0 ∗ + T0,i (−(ωs − ωr,i )Ed,i ) − T̃e,i Ṫe,i , ∀i ∈ G (28) ∂Ve,i Vs,i Xm,i hi , T̃e,i 0 ωs , ∀i ∈ G (29) Xr,i Xs,i ∂ T̃e,i - k + ,i 0 + + Xs,i + Vs,i ⇤ Ṫe,i ⇤ Te,i (22) Letting (22) and (20) to be equal gives the electrical torque ∗ Te,i ∈ R as: Cp,i Cp,i−1 i 1 ∂Cp,i ∂λi ωs −1 h ∗ −kα,i ( ) − ) Te,i = Tm,i −( C̄p,i ∂λi ∂ωr,i 2Hi C̄p,i C̄p,i−1 (23) ∗ To guarantee that limt→∞ (Te,i ) = Te,i we consider the candidate Control Lyapunov Function (CLF): Eq,i Vs,i = , ∀i ∈ G 0 Xs,i GSC Vdr,i in (20) can be expanded as:  1  ∂C  ∂λ  ω  Ċp,i p,i i s , (Tm,i −Te,i ), ∂λi ∂ωr,i 2Hi C̄p,i C̄p,i Capacitor RSC - ⇤ ⇤ Computation of Te,i , Ṫe,i xi Cp,i C̄p,i Ċp,i , 1 C̄p,i 1 From WG (i local 1 i local 1 1) Fig. 1: Cooperative torque controller of WG i ∂V We observe that ∂ Te,i ˜ hi 6= 0 whenever T̃e,i 6= 0. That, means e,i the feedback control input Vdr,i can always guarantee that ∂Ve,i fi < 0, ∀T̃e,i 6= 0. That, proves that Ve,i is indeed ∂ T˜ e,i ∗ a CLF and that the equilibrium Te,i = T̃e,i can be rendered exponentially stable. That, completes the proof. We note that, Ve,i being a CLF is a necessary condition for the existence of a stabilizing feedback control Vdr,i . Hence, we proceed by designing a RSC stabilizing controller Vdr,i . For having V̇e,i < 0 we take V̇e,i to be: dVe,i ∗ 2 = −kβ,i (Te,i − Te,i ) < 0, dt ∗ ∀Te,i ∈ De,i \ {Te,i } (30) dV Equation (30) can be written as dte,i = −2kβ,i (Ve,i ) which −2kβ,i t has solution Ve,i = Ve,i0 e i.e limt→∞ Ve,i = 0, For having (30) the following equation has to hold: ∗ dTe,i dTe,i ∗ = − kβ,i (Te,i − Te,i ), ∀i ∈ G dt dt (31) dV Furthermore, we assume that dts,i = 0, ∀i ∈ G ∂λi ∂ and ∂t ( ∂ω ) = 0, ∀i ∈ G hold. Combining equar,i tions (31),(25),(5b) we derive the RSC controller as: 0 ∗ i Xs,i h dTe,i 0 1 h ∗ − kβ,i (Te,i − Tei ) − 0 − (Eq,i Vdr,i = Vs,i dt T0,i 0 + (Xs,i − Xs,i )Ids,i ) i X 0 0 r,i + T0,i (−(ωs − ωr,i )Ed,i ) , Xm,i ωs i∈G (32) This controller is depicted in Fig. 1 with all the variables explained in the Appendix. The expressions of the appearing 2 ∂λi ∂Cp,i ∂ Cp,i terms ∂ω , ∂λi , ∂λ2 are ommitted due to space limitar,i i  18    21    22    23    17   16    20    19    15    14    13    11    24    3    12    9    10    6    4    5    8    1    2    7   W F Bus Fig. 2: IEEE 24-bus RT system with a WF (with 10 WGs) at bus 22 2 1 n 3 W F Supervisory Controller (a) 2 1 3 n (b) Fig. 3: a) Physical connectivity of the WF b) Communication structure between WGs tion. Nevertheless, they can be derived from (5e),(5f). VII. P ERFORMANCE E VALUATION The effectiveness of the proposed approach is explored via simulations on the modified IEEE 24-bus RT system. In this system, a WF comprised with 10 WGs lies at bus 22. The physical connectivity and the allowable communication links among the WGs (for n = 10) are shown in Fig. 3. The control logic for each RSC follows equation (32) (Fig. 1) whereas the group objective for the RSC controllers is to dynamically self-dispatch their WGs in a fair-sharing way and the WF power output to track a reference shown in Fig. 4b. We studied the following critical scenarios. Scenario 1 : At t = 0s, the WF power output reference is 0.38p.u and suddenly at t = 0.2s, the reference changes step-wise to 0.42p.u as seen in Fig. 4b. The response of the WF power output (blue) is tracking the reference (red) closely with good performance given standard metrics e.g overshoot, response time (Fig. 4b). The response of the consensus state-variables is depicted in Fig. 4a. Notice that, the response for all 10 WGs is completely identical. That, verifies the “fair-dispatching” between the WGs i.e each WG extracts mechanical power from the wind according to the local wind-speed conditions. In our setting, we regard that all WGs experience the same local wind-speed conditions. The mechanism by which the CLF-based RSC controller carries out its objectives is understood as follows. When the leader WG obtains the new power reference its consensus state-variable is ordered to increase value. Since all the WGs are trying to reach consensus with the leader they increase their consensus state variables, leading all the utilization factors to exceed 0.8 while starting from a value of 0.73 (Fig. 4a). To achieve that, the various RSC torque controllers slowed-down the WGs (Fig. 4c), enabling them to increase the mechanical power that they extract from the wind until their total power reached the pre-assigned reference value (Fig. 4b). In summary, the proposed protocol and the developed RSC controllers effectively address Problem 1. VIII. C ONCLUDING R EMARKS This paper introduced a leader-follower consensus protocol that is able to dynamically dispatch a fleet of WGs according to their local wind-speed conditions such that the WF total power output reaches a new assigned value. By employing singular perturbation theory [7], we provided theoretical guarantees in the form of asymptotic stability of desired equilibria, proving that the protocol will asymptotically accomplish its aforementioned objectives. On the practical side, we developed a cooperative CLF-based RSC controller that implements the above protocol. We demonstrated the performance of the proposed methodology via simulations on the IEEE 24-bus RT system. IX. A PPENDIX The various variables related to WG i are explained below. Variable Te,i ∈ R+ Tm,i ∈ R+ 0 T0,i ∈ R+ 0 Xs,i ∈ R+ Xs,i ∈ R+ Xr,i ∈ R+ Xm,i ∈ R+ H i ∈ R+ 0 0 Eq,i , Ed,i ∈ R+ Iqs,i , Ids,i ∈ R+ Vqr,i , Vdr,i ∈ R+ ωs Sb,i ∈ R+ ωr,i ∈ R+ λi ∈ R+ θi ∈ R ki ∈ R + p i ∈ R+ Corresponds to electrical torque mechanical torque transient open-circuit time constant stator transient reactance stator reactance rotor reactance mutual reactance of the stator-rotor combined inertia of the WG q, d axis rotor voltages q, d axis stator current q and d axis RSC control inputs synchronous speed 2π · 60 [ rad s ] base power electrical rotor speed of the WG tip speed ratio pitch angle gearbox ratio poles 0.81 R EFERENCES 0.8 9h z1 z2 z3 z4 z5 z6 z7 z8 z9 z10 0.79 0.78 0.77 0.793 0.76 0.7925 0.75 0.792 0.74 0.73 6.5 0 6.6 5 6.7 10 15 time(s) (a) Response of the Cp,i coefficients 0.43 0.42 P 0.41 i2G Pm;i (p:u) Pd 0.4 0.39 0.38 0.37 0 3 6 9 12 15 time(s) (b) WF total mechanical power tracking response (reference Pd ) 415 398.2 410 398.1 398 405 [ rs ] 5 5.2 400 395 390 0 5 !r;1 !r;2 !r;3 !r;4 !r;5 !r;6 !r;7 !r;8 !r;9 !r;10 10 15 time(s) (c) Rotor speed response Fig. 4: System response under Scenario 1 xi = [Tm,i , Ṫm,i , ωr,i , ω̇r,i , ∂Cp,i ∂ 2 Cp,i Cp,i Ċp,i , , , , ∂λi ∂λ2i C̄p,i C̄p,i ∂λi , vw,i ]> ∂ωr,i 0 0 1 h γi = 0 − (Eq,i + (Xs,i − Xs,i )Ids,i ) T0,i i X 0 0 r,i + T0,i (−(ωs − ωr,i )Ed,i ) Xm,i ωs ωs ∂λi −1 ∂Cp,i −2 ∗ Ṫe,i = Ṫm,i + kβ,i C̄p,i ( ) ( ) 2Hi ∂ωr,i ∂λi h Ċ Ċp,i−1 ∂Cp,i p,i · ( − ) C̄p,i C̄p,i−1 ∂λi i Cp,i Cp,i−1 ∂ 2 Cp,i −( − ) · ω̇ , ∀i ∈ G r,i C̄p,i C̄p,i−1 ∂λ2i (33) (34) (35) [1] U.S Deparment of Energy. Windvision: A new era for wind power in the united states. Technical report, U.S Deparment of Energy, March 2015. [2] Thomas Ackermann, editor. Wind Power in Power Systems. John Wiley and Sons, second edition edition, 2012. [3] Liyan Qu and Wei Qiao. Constant power control of dfig wind turbines with supercapacitor energy storage. IEEE Transactions on Industry Applications, 47(1):359–367, January/February 2011. [4] Huanhai Xin, Zhihua Qu, John Seuss, and Ali Maknouninejad. A selforganizing strategy for power flow control of photovoltaic generators in a distribution network. IEEE Transactions on Power Systems, 26(3):1462–1473, August 2011. [5] Wei Zhang, Yinliang Xu, Wenxin Liu, Frank Ferrese, and Liming Liu. Fully distributed coordination of multiple dfigs in a microgrid for load sharing. IEEE Transactions on Smart Grid, 4(2):806–815, June 2013. [6] Biegel B., Madjidian D., Spudic V., Rantzer A., and Stoustrup J. Distributed low-complexity controller for wind power plant in derated operation. In Proceeding of 2013 IEEE International Conference on Control Applications (CCA), pages 146–151. IEEE, August 2013. [7] H.K.Khalil. Nonlinear Systems. Prentice Hall, 3rd edition, 2002. [8] E.D.Sontag. Mathematical Control Theory: Deterministic Finite Dimensional Systems. Number 6 in Textbooks in Applied Mathematics. Springer, 2nd edition, 1998. [9] H.A. Pulgar-Painemal and P.W. Sauer. Dynamic modeling of wind power generation. In NAPS, pages 1–6. IEEE, October 2009. [10] A.J Larsen and T.S Mogensen. Individuel pitchregulering af vindmølle. Master’s thesis, Technical University of Denmark., 2006. [11] S.Thomsen. Nonlinear control of a wind turbine. Master’s thesis, Technical University of Denmark, 2006. [12] W.Qiao. Dynamic modeling and control of doubly fed induction generators driven by wind turbines. In PSCE, 2009, pages 1–8. IEEE, March 2009. [13] Reza Olfati-Saber, J. Alex Fax, and Richard M. Murray. Consensus and cooperation in networked multi-agent systems. Proceedings of the IEEE, 95(1):215–233, January 2007. [14] Soummya Kar and Jose M.F.Moura. Distributed consensus algorithms in sensor networks with imperfect communication: Link failures and channel noise. IEEE Transactions on Signal Processing, 57(1):355– 369, January 2009. [15] Ali Bidram, Ali Davoudi, Frank L. Lewis, and Josep M. Guerrero. Distributed cooperative secondary control of microgrids using feedback linearization. IEEE Transactions on Power Systems, 28(3):3462–3470, March 2013. [16] Alejandro D.Dominguez-Garcia and Christoforos N.Hadjicostis. Resilient networked control of distributed energy resources. IEEE Journal on Selected Areas in Communications, 30(6):1137–1148, May 2012. [17] Alejandro D.Dominguez-Garcia and Christoforos N.Hadjicostis. Coordination and control of distributed energy resources for provision of ancillary services. In IEEE International Conference on Smart Grid Communications (SmartGridComm), pages 537–542, October 2010. [18] Soummya Kar and Gabriela Hug. Distributed robust economic dispatch in power systems: A consensus + innovations approach. In Power and Energy Society General Meeting, pages 1–8, July 2012. [19] Roger A. Horn and Charles R. Johnson. Matrix Analysis. Cambridge University Press, 2013. [20] Stefanos Baros. A novel ectropy-based control scheme for a dfig driven by a wind turbine with an integrated energy storage. In American Control Conference (submitted), July 2015. [21] S.Baros and M. Ilic. Robust ectropy-based cooperative control of a wind dfig for transient stabilization and mppt (submitted). IEEE PES General Meeting, July 2015. [22] Chad Abbey and Geza Joos. Supercapacitor energy storage for wind energy applications. IEEE Transactions on Industry Applications, 43(3):769–776, May/June 2007. [23] Faruk A.Bhuiyan and Amirnaser Yazdani. Multimode control of a dfigbased wind-power unit for remote applications. IEEE Transactions on Power Delivery, 24(4):2079–2089, October 2009. [24] Chad Abbey and Geza Joos. Integration of energy storage with a doubly-fed induction machine for wind power applications. In IEEE 35th Annual on Power Electronics Specialists Conference, volume 3, pages 1964–1968. IEEE, June 2004.
3cs.SY
Association Rules Mining Based Clinical Observations Mahmood A. Rashid1, Md Tamjidul Hoque2, Abdul Sattar1 1 Institute for Integrated and Intelligent Systems (IIIS), Discovery Biology, Eskitis Institute for Cell & Molecular Therapies, Griffith University Nathan, QLD, Australia {m.rashid, t.hoque, a.sattar}@griffith.edu.au 2 Abstract Healthcare institutes enrich the repository of patients’ disease related information in an increasing manner which could have been more useful by carrying out relational analysis. Data mining algorithms are proven to be quite useful in exploring useful correlations from larger data repositories. In this paper we have implemented Association Rules mining based a novel idea for finding co-occurrences of diseases carried by a patient using the healthcare repository. We have developed a system-prototype for Clinical State Correlation Prediction (CSCP) which extracts data from patients’ healthcare database, transforms the OLTP data into a Data Warehouse by generating association rules. The CSCP system helps reveal relations among the diseases. The CSCP system predicts the correlation(s) among primary disease (the disease for which the patient visits the doctor) and secondary disease/s (which is/are other associated disease/s carried by the same patient having the primary disease). Key words Disease Correlation, Association Mining, e-Health, Healthcare, Medicare 1. Introduction In the recent era, medical science has revealed that the occurrence of one disease can lead to several associated diseases [1]. For example, Heart-Block can lead to the occurrences of other diseases like Hypertension, CardiacArrest and so on. It is, however, still an interesting problem [1], to see how far the medical philosophy holds from statistical point of view. Data mining based techniques, like association rule mining, have gained popularity [1-3] among contemporary scientists to gain clearer understanding of different physical and scientific phenomenon. In this paper, we apply association rule mining to extract knowledge from clinical data for predicting correlation of diseases carried by a patient. From the viewpoint of scientific research, data mining is relatively a new discipline that has been developed mainly from studies carried out in various disciplines such as computing, marketing, statistics and so on [4]. Data mining problems and corresponding solutions have roots in classical data analysis. Many of the methodologies used in data mining has come from two branches of research: i) one is developed in machine leaning (artificial intelligence) community, and ii) the other is developed in the statistical community particularly in multivariate and computational statistics. Both have made great contributions to the understanding and applications of data mining techniques [5, 6]. The remainder of the paper is organized as follows. Section 2 highlights previous research in related areas. Section 3 introduces the Architecture of the CSCP Prototype-system. It also briefly discusses the working procedures and Algorithms used to compute the correlations. Section 4 highlights the output of the system with the hypothetical datasets. Concluding remarks and future research are sketched in section 5. 2. Related Works Automated healthcare systems are accumulating large quantities of information about patients and their medical conditions everyday. Unfortunately, few methodologies have been developed and applied to discover this hidden knowledge [7]. The cluster-analysis based model is suggested and discussed [8] for assigning prostate cancer patients into homogenous groups with the aim to support future clinical treatment decisions as an illustration. To explore association rules in noisy and high dimensional medical data-repository an improved algorithm has been introduced with several constraints [9]. A statistical analysis of decision tree based classification approach on diagnosing the Ovarian Cancer using Bio-marker Patterns Software (BPS) has been applied [10]. A task [11] has been accomplished on comparison of data mining methods supporting diagnosis for Melanoma. Association rule classifiers have been applied to diagnose breast cancer using digital mammograms [12], Neural Network based classification approach also used for the same purpose [13]. Association Mining applied on questionnaire responses related to human sleeping [14] where questionnaire data and clinical summaries comprised a total of 63 variables including gender, age, body mass index, and Epworth and depression scores. Many Clinical Decision Support Systems (CDSS) have been developed. CHICA [15] is a CDSS, developed to improve preventive paediatric primary care. Dynamic forms are generated and tailored to patients’ needs based on the Medical Logic Modules (MLMs). A knowledge management framework for distributed healthcare systems has been proposed [16] to integrate the heterogeneous systems used by different departments from clinical care to administration. However, the aforementioned developments are application specific and thus hard to apply in general. Instead of developing an application limited to a specific purpose such as prostate cancer [8], skin cancer [11], and sleeping [14] and so on, we proposed for a more generic version of CSCP system that can work for all diseases in similar fashion and generate correlations depending on the input dataset. In the next section, the architecture of the application and its working procedures are stated. 3. Framework and Working Procedures The CSCP system will extract data from an OLTP system. Thus to implement the CSCP system, we require the regular operational OLTP system to generate input data for the CSCP system. The architecture of the system can be described as follows. OLTP Application: When a patient will visit a doctor he/she must have to fill up a prescribed form and the information from the form is proposed to be captured through web enabled OLTP system. CSCP Application: This application will import transactional records from OLTP application for further processing to generate correlations among diseases using Association Rules data mining. The OLTP system is a regular database application to capture patient’s information and to preserve the records into a database repository. It is simple and no analytical process has been incorporated in this portion and thus the CSCP system is our major focus in this paper and we presume that the OLTP system has been implemented successfully and data has been captured accordingly from healthcare institutes. 3.2 Association Rules Mining and Apriori Algorithm In data mining, association rule is used for discovering interesting relations between variables in large databases. The two key terms support and confidence are used in computing correlations between variables which can be defined as follows: Support: In a fixed number of transactions the occurrences of a particular event is the support of that event. For example there are T transactions among which Txy transaction s contain the itemset {X,Y} is Tx. Confidence: confidence is a relative support. For example there are T transactions among which Txy transactions contain itemset {X, Y} and Tx transactions contain item X and thus confidence of occurring X and Y together is Txy/ Tx. The Apriori Algorithm [17] is used here for Association Rule Mining to find out frequent dataset that satisfy the predefined minimum support and confidence from a given database. As computers are handy now-a-days, a viable CSCP system can be setup to collect large volumes of data and to stored in the database simultaneously. This kind of data includes the transaction records of clinics, hospitals, supermarkets, banks, stock markets, telephone companies and so on. The next few sections we try to discover some hidden information from a sample transactional dataset. 3.3 Sample Dataset Figure 1 - The Complete Architecture of the Proposed System for Prediction Correlation among diseases using association mining on healthcare data. The upper-portion of the figure describes the architecture of the OLTP system and the lower portion is the CSCP system. 3.1 System Architecture The disease diagnosis application proposed here based on two different software systems. One is online transaction processing (OLTP) system and another is disease correlation predicting (CSCP) application. In a clinic various patients come but most of them come for a particular disease, which mentioned here as primary disease. When Doctors or their associates make an interview with the patient and note down other problems (diseases), which mentioned here as secondary or associated diseases are inserted into a database. The main objective of the paper is to find out relations among the primary disease and other secondary diseases. The following table represents sample dataset of a Medicare database that contains the patient-wise diseases. Table 1 - Transactional data sample Patient Id Disease P000000001 P000000001 P000000001 P000000001 P000000002 P000000002 P000000002 … P000001000 Bradycardia Cardiac Arrest Hypertension Myocarditis Bradycardia Cardiac Arrest Hypertension … Cardiac Arrest 3.4 Producing Itemsets A set of diseases obtained by each patient presented here along with the number of diseases counted by the algorithm in Figure 3 and put the result into the column headed CNT in figure 3 Algorithm 1 - CountDisease 1 PROCEDURE CountDisease 2 FOR each p in P 3 Ds "" 4 c0 5 find records for p 6 FOR each r in R 7 c  c 1 8 Ds  Ds  r " , " 9 NEXT r 10 Ds  Ds without comma at the end 11 INSERT  p, c, Ds  in to database table 12 NEXT p 13 END CountDisease Figure 2 - Pseudo code to count diseases carried by any patient. Table 2: Patient records with multiple diseases Patient Count P000000001 4 P000000002 … 3 … P000001000 1 Diseases Heart-Block, Hypertension, CardiacArrest, Bradycardia Heart-Block, Hypertension, CardiacArrest … Hypertension 3.5 Counting Support of an Item (Disease) in the sample dataset The frequency of every item in all the transactions has been calculated in the following table implementing the following algorithm and for a 1-item itemsets for the first pass. Algorithm 2- FindSupport PROCEDURE FindSupport d  disease 1 2 3 db  database in considarat ion 4 r  record 5 rs  recordset s  support 6 7 BEGIN 8 FOR each d in db 9 s0 10 find records for d 11 FOR each r in rs 12 s  s 1 13 NEXT r 14 UPDATE Database with s 15 NEXT d 16 END 17 END FindSupport Figure 3 - Pseudo code to calculate support. Disease Table 3 - Distinct diseases Support Heart-Block 334 Hypertension 549 Myocarditis 532 Cardiac-Arrest Bradycardia 536 305 Pass 1 1 1 1 1 3.6 Generating Candidate Itemset The following procedure generates candidate itemsets taking the transactional records as input and maximum pass and minimum support as parameters. Algorithm 3 - GenerateRule PROCEDURE GenerateRule (maxpass, minsup) // the method requires two user input // maxpass- maximum number of items are consider in an itemset // minsup- minimum support for the candidate sets BEGIN 1. Produce maxpass copies of transaction data by aliasing the original one for generating all possible combination of items in each pass by producing Cartesian product and the filter the meaning sets 2. Calculate the supports for the filtered sets 3. Eliminate the sets having support less than minsup END Figure 4 - Generating candidate itemset from sample dataset. Table 4 - Candidate Sets for stop-level 2 Itemset Count {Bradycardia, Cardiac-Arrest} 26 {Bradycardia, Heart Block} {Bradycardia, Hypertension} {Bradycardia, Myocarditis} 9 28 21 {Cardiac Arrest, Heart-Block} {Cardiac Arrest, Myocarditis} 13 32 {Heart Block, Hypertension} {Heart Block, Myocarditis} 10 11 3.7 Association Rule Generation Using the sample transactions of Table 1, after second pass (maxpass=2), the CSCP system has generated the rule data as listed in Table 5 below Table 5- Candidate Sets for stop-level 2 Itemset Supp (%) Conf (%) Figure 5 represents the support and confidence of second pass for the disease set{Hypertension, Heart-Block} for the patients of different age groups. The graph in the Figure 6 represents the supports and confidences for different itemsets for the female patients in the sample transactions. In our work we implement the system to compute the correlation of diseases for different age groups and the output in Figure 5 is clearly illustrating that at the age of 45-50 the risk of Heart-Block is more than other ages if a patient has already been living with Hypertension. Our system has also been applied on the database for the patent of different sexualities and the graphical form of empirical output has been shown in Figure 6 which illustrates that for the female patients the risk of Hypertension is significant if the patient already carry Bradycardia. Suport 12.00 10.00 {Bradycardia, Cardiac-Arrest} {Bradycardia, Heart-Block} 2.60 0.90 8.52 2.69 ………… ….. ….. 4.00 2.00 {Heart Block, Hypertension} 1.00 1.82 0.00 {Heart Block, Myocarditis} 1.10 3.29 4. Discussion on the Empirical Results In practical applications, a rule can be considered statistically significant when it generates from a data repository that contain hundred of thousands or millions of trusted transactions. We have carried out our experiments on a relatively small number of transactions1 due to the lack of availability of real transactional data where the disease Heart-Block and the disease Hypertension conjunctionally occurs once and thus its support of {Heart Block , Hypertension} is 1.0 as shown in Table 5. Support Confidence 40.00 35.00 30.00 25.00 20.00 15.00 Conf idence 14.00 8.00 6.00 } } } n} s} n} n} a} ia st ia io i ti io di io re rd rd rd ns ar ns ns Ar ca a ca e c e e t y c t y t c d d a dy er er er yo ra ra di ra yp yp yp ,M ,B ar ,B ,B H st ,H is st ck ,C t,H k, t e a i i s c r k e o r rd lo rd re Bl Ar oc Ar ca rt Ar ca Bl tB c ac yo rt ia ar dy ea di ac a i r e a d H M r r e a { { d a {H {B ar {H {C {C {C Figure 6 - For the different itemsets in second pass, the supports and confidences for patients of different sexualities (here females only). X-axis represents the disease sets and Y-axis represents the value of support and confidence respectively. The system can easily be enhanced for further crucial aspects: such as patients of various professions, localities, physiological conditions and so on. The nature of working environment for IT professionals is remarkably different from that of the construction professionals. IT professionals work in static indoor environment where as construction professionals work in dynamic and outdoor environment. By implementing our system on the patients’ database of IT profession and construction profession, new trend of disease correlation can be predicted. 10.00 5.00 5. Conclusions 0.00 0 20 40 60 80 100 Figure 5- For the itemset {Hypertension, Heart-Block} in second pass, the support and confidence for patients of different age groups. X-axis represents the ages and Yaxis represents the value of support and confidence respectively. 1 Randomly generated 1000 transactions In this paper, we have implemented system-prototype, named CSCP system, using the association rules of data mining technique applied to a patients’ (assumed) database for discovering patterns of diseases that might be carried by a patients. As a novel idea of mining the data capturing process can further be modified in the clinics as well as in the data-warehouses which should further be involved to enhance the CSCP system we have proposed. The recognised pattern by this implementation definitely can improve the healthcare services along with medical researchers for further exploring trends of diseases that are correlated. To ensure strong national economy and bio-security [18] by having healthier inhabitants, for example, Medicare Australia [19] can use CSCP system to ensure wellbeing further. In this research-work, we have succeeded to investigate correlation among diseases for patients of different age and sex groups providing the outcome in statistical as well as in graphical format. The system we developed has been based on computer generated data, since the real data were not handy. However, it is our future target to enhance the system for the aforementioned various cases, applying the system on collected real-life data while enhancing the proposed system rigorously. 6. Acknowledgement This research is partially supported by the ARC (Australian Research Council) grant no DP0557303. 7. References [1] Lovell NH, Magrabi F, Celler BG, Huynh K, and Garsden H, Web-based acquisition, storage, and retrieval of biomedical signals, IEEE Eng. Medicine and Biology, vol. 20(3), pp. 38-44, 2001. [2] Mazzi C, Ganguly P, and Kidd M, Healthcare application based on software agents, in Medinfo 2001 Proceedings, 2001, pp. 136-140. [3] Takeuchi H, Kodama N, Hashiguchi T, and Hayashi D, Automated Healthcare Data Mining Based on a Personal Dynamic Healthcare System, the 28th IEEE EMBS Annual International Conference, New York City, USA, 2006. [4] Giudici P, Applied Data Mining: Statistical Methods for Business and Industry: Wiley Publications, 2003. [5] Mannila H, Data mining: machine learning, statistics, and databases, in Eighth International Conference on Scientific and Statistical Database Management, 1996, pp. 1-8. [6] Kantardzic M, Data Mining: Concepts, Models, and Algorithms. NJ: Wiley Interscience, 2003. [7] Prather J, Lobach D, Goodwin L, Hales J, Hage M, and Hammond W, Medical data mining: knowledge discovery in a clinical data warehouse, in Proc AMIA Annu Fall Symp., 1997, pp. 101-5. [8] Churilov L, Bagirov A, Schwartz D, Smith K, and Dally M, Improving Risk Grouping Rules for Prostate Cancer Patients with Optimization, the 37th International Conference on System Sciences, Hawaii 2004. [9] Ordonez C, Santana C, and Braal LD, Discovering Interesting Association Rules in Medical Data, in ACM SIGMOD Workshop on Research Issues on Data Mining and Knowledge Discovery, 2000, pp. 78-85. [10] Vlahou A, Schorge JO, Gregory BW, and. Coleman RL, Diagnosis of Ovarian Cancer Using Decision Tree Classification of Mass Spectral Data, Journal of Biomedicine and Biotech-nology, vol. 5, pp. 308– 314, 2003. [11] Grzymala-Busse JW and Hippe JS, Data Mining Methods Supporting Diagnosis of Melanoma, the 18th IEEE Symposium on Computer-Based Medical Systems (CBMS 2005), 2005, pp. 371–373. [12] Za¨ıane OR, Antonie ML, and Coman A, Mammography classification by an association rulebased classifier, in MDM/KDD: Inter-national Workshop on Multimedia Data Mining (with ACM SIGKDD 2002), 2002, pp. 62–69. [13] Land WH, Masters JT, Lo JY, McKee DW, and Anderson FR, New results in breast cancer classification obtained from an evolutionary computation/adaptive boosting hybrid using mammogram and history data in Industrial Applications, Proceedings of the 2001 IEEE Mountain Workshop on Soft Computing, Virginia Tech, Blacksburg. Virginia, 2001, pp. 47–52. [14] Laxminarayan P, Ruiz C, Alvarez SA, and Moonis M, Mining associations over human sleep time series, the 18th IEEE Symposium on Computer- Based Medical Systems (CBMS), 2005, pp. 323–328. [15] Anand A, Biondich PG, Liu G, Rosenman M, and Downs SM, Child health improvement through computer automation: The CHICA system, in MEDINFO, 2004. [16] Kazemzadeh RS and Sartipi K, Interoperability of Data and Knowledge in Distributed Health care Systems, in The 13th IEEE International Workshop on Software Technology and Engineering Practice, 2005. [17] Agrawal and Srikant, Fast algorithm for Mining Association Rules, in The 20th VLDB conference Santiago, Chile, 1994. [18] A Healthier Future For All Australians. vol. ISBN: 174186-940-4 Publications Number: P3 -5499: Commonwealth of Australia, 2009. [19] Medicare Australia, www.medicareaustralia.gov.au, last access: Oct, 2009. Address for correspondence Mahmood A. Rashid Building N34, Room 1.45 Institute for Integrated and Intelligent Systems (IIIS) Griffith University, Nathan, QLD 4111, Australia Email: [email protected] Phone: +61(0)7 373 53757, Fax: +61 (0)7 373 54066
5cs.CE
DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS OF A REGULAR LOCAL RING arXiv:1512.03848v2 [math.AC] 2 Jan 2016 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER Abstract. Let (R, m) be a d-dimensional regular local domain with d ≥ 2 and let V be a valuation domain birationally dominating R such that the residue field of V is algebraic over R/ m. Let v be a valuation associated to V . Associated to R and V there exists an infinite directed family {(Rn , mn )}n≥0 of d-dimensional regular local rings dominated by V with R = R0 and Rn+1 the S local quadratic transform of Rn along V . Let S := n≥0 Rn . Abhyankar proves that S = V if d = 2. Shannon observes that often S is properly contained in V if d ≥ 3, and Granja gives necessary and sufficient conditions for S to S be equal to V . The directed family {(Rn , mn )}n≥0 and the integral domain S = n≥0 Rn may be defined without first prescribing a dominating valuation domain V . If {(Rn , mn )}n≥0 switches strongly infinitely often, then S = V is a rank one valuaord n (f ) ) tion domain and for nonzero elements f and g in m, we have v(f . = lim ordR v(g) R (g) n→∞ n If {(Rn , mn )}n≥0 is a family of monomial local quadratic transforms, we give necessary and sufficient conditions for {(Rn , mn )}n≥0 to switch strongly infinitely often. If these conditions hold, then S = V is a rank one valuation domain of rational rank d and v is a monomial P valuation. Assume that V is rank one and birationally dominates S. Let s = ∞ i=0 v(mi ). Granja, Martinez and Rodriguez show that s = ∞ implies S = V . We prove that s is finite if V has rational rank at least 2. In the case where V has maximal rational rank, we give a sharp upper bound for s and show that s attains this bound if and only if the sequence switches strongly infinitely often. 1. Introduction Let R = R0 be a d-dimensional regular local ring, and for each integer n ≥ 0, let Rn+1 be a d-dimensional local quadratic transform of Rn . Thus {(Rn , mn )}n≥0 is a S directed family of d-dimensional regular local rings. Let S := n≥0 Rn . If d = 2, Abhyankar proves in [A] that S is always a valuation domain. In the case where Date: March 2, 2018. 1991 Mathematics Subject Classification. Primary: 13H05, 13A18, 13C05; Secondary: 13E05, 13H15. Key words and phrases. local quadratic transform, infinite directed family, switches strongly infinitely often, rank and rational rank of a valuation domain, transform of an ideal, monomial ideal, valuation ideal. 1 This paper was supported by Faculty Research Fund, Sungkyunkwan University, 2013. Correspondence with Alan Loper, Bruce Olberding and Hans Schoutens that motivated our interest in the work of Shannon and Granja on infinite directed unions of local quadratic transformations is gratefully acknowledged. 1 2 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER d ≥ 3, Shannon in [S] and later Granja in [Gr] consider conditions in order that S be a valuation domain. In this connection, Shannon gives the following definition in [S, page 314]. Definition 1.1. Let {(Rn , mn )}n≥0 be an infinite directed family of local quadratic transforms of a regular local ring (R, m). We say that {(Rn , mn )}n≥0 switches strongly infinitely often if there does not exist an integer j and a height one S prime ideal pj of Rj with the property that ∞ n=0 Rn ⊂ (Rj )pj . S Assume that V is a rank one valuation domain that birationally dominates S := n≥0 Rn . If V is non-discrete, Shannon proves in [S, Proposition 4.18] that S = V if and only if {(Rn , mn )}n≥0 switches strongly infinitely often. It is observed in [GR, Theorem 6] that the proof given by Shannon also holds if V is rank one discrete. S Granja [Gr, Proposition 7] shows that if S := n≥0 Rn is a valuation domain V , then V has real rank either one or two, and in [Gr, Theorem 13], he characterizes the sequence of local quadratic transforms of R along V . If V has rank one, then {(Rn , mn )}n≥0 switches strongly infinitely often. If V has rank two, then the value group of V is Z ⊕ G, where G has rational rank one. In this case Granja proves [Gr, Theorem 13] that the sequence {(Rn , mn )}n≥0 is height one directed as in Definition 1.2. Definition 1.2. Let {(Rn , mn )}n≥0 be an infinite directed family of local quadratic transforms of a regular local ring (R, m). The sequence {(Rn , mn )}n≥0 is height one directed if there exists a nonnegative integer j and a height one prime ideal p S of Rj such that ∞ n=0 Rn ⊂ (Rj )p , and if for some nonnegative integer k and some S height one prime ideal q of Rk we have ∞ n=0 Rn ⊂ (Rk )q , then (Rj )p = (Rk )q . Let {(Rn , mn )}n≥0 be a directed family of Noetherian local domains. Assume that S ordRn defines a valuation for each n. If ∞ n=0 Rn = V is a rank one valuation domain, we prove in Theorem 3.9 that the valuation v is related to the order valuations of the Rn as follows: ordRn (f ) v(f ) = lim , n→∞ ordRn (g) v(g) for all nonzero elements f, g in the maximal ideal of V . Let (R, m) be a d-dimensional regular local ring with d ≥ 2 and fix d elements x, y, . . . , z such that m = (x, y, . . . , z)R. In Section 4, we consider finite sequences R = R0 ⊂ R1 ⊂ · · · ⊂ Rn of monomial local quadratic transforms. We prove in DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 3 Theorem 4.3 that the order in R of each nonzero f ∈ m is greater than the order of the transform of f in Rn if and only if in passing from R0 to Rn we transform in each monomial direction at least once. In Section 5, we consider infinite sequences {(Rn , mn )}n≥0 of monomial local quaS dratic transforms. In Theorem 5.4, we prove that ∞ n=0 Rn is a rank one valuation domain if and only if the transform in each monomial direction occurs infinitely many times. In Section 6, we present examples of infinite sequences of local quadratic transforms {(Rn , mn )}n≥0 that switch strongly infinitely often and have the property that S n≥0 Rn = V is a rank one valuation ring having rational rank less than dim R. Let {(Rn , mn )}n≥0 be a directed sequence of local quadratic transforms along a zero-dimensional rank one valuation V . In Section 7, we consider the invariant P s= ∞ i=0 v(mi ). Granja, Martinez and Rodriguez prove in [GMR, Prop. 23] that S s = ∞ implies n≥0 Rn = V . We observe in Proposition 7.3 that s is finite if V has rational rank at least 2 and that s = ∞ or s < ∞ are both possible if V has rational rank one and is not a DVR. In the case where V has maximal rational rank, we give in Theorem 7.2 a sharp upper bound for s, and show that s attains this bound if and only if the sequence switches strongly infinitely often. In Theorem 7.5, we give necessary and sufficient conditions for a sequence {(Rn , mn )}n≥0 to be height one S directed. This yields examples where S = n≥0 Rn is a rank 2 valuation domain with value group Z ⊕ H such that H is rational rank one but not discrete. We use µ(I) to denote the minimal number of generators of an ideal I, and λR (M ) to denote the length of an R-module M . We use the notation A ⊂ B to denote that A is a subset of B that may be equal to B. 2. Preliminaries Definition 2.1. Let R ⊆ T be unique factorization domains (UFDs) with R and T having the same field of fractions. Let p be a height-one prime in R. If pT ∩ R = p, then there exists a unique height-one prime q in T such that q ∩ R = p. We then have Rp = Tq . On the other hand, if p ( pT ∩ R, then (R \ p)−1 T = Q(T ), the field of fractions of T . The transform pT of p in T is the ideal q if pT ∩ R = p and is the ring T if p ( pT ∩ R. Thus pT = ( q T if if p = pT ∩ R, p ( pT ∩ R. 4 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER Let I be a nonzero ideal of R. Then I has a unique factorization I = pa11 · · · pann J, where the pi are principal prime ideals, the ai are positive integers, and J is an ideal with J −1 = R. (1) The transform I T of I in T is the ideal I T = q1a1 · · · qnan (JT )(JT )−1 where qi = pTi for each i with 1 ≤ i ≤ n. (2) The complete transform of I in T is the completion I T of I T . In the case where J is a nonzero principal ideal, the definition here of the transform agrees with the definition given by Granja [Gr, page 701] for the strict transform. For an ideal I of a local ring (R, m), the order of I, denoted ordR I, is r if I ⊆ mr but I * mr+1 . If (R, m) is a regular local ring, the function that associates to an element a ∈ R, the order of the principal ideal aR, defines a discrete rank-one valuation, denoted ordR on the field of fractions of R. The associated valuation ring (DVR) is called the order valuation ring of R. Definition 2.2. Let V be a valuation domain corresponding to the valuation v. The rank of v is defined to be the Krull dimension of V . The rational rank of v, denoted rat. rank v, is the rank of the value group Γv of V over Q. Thus, rat. rank v = dimQ (Γv ⊗Z Q). Definition 2.3. Let R be an integral domain. An ideal I of R is said to be a valuation ideal if there exists a valuation domain V such that R ⊆ V ⊆ Q(R) and IV ∩ R = I. We then say that I is a V -ideal in R, and if v is a valuation corresponding to V that I is a v-ideal in R. If R is a subring of a valuation domain V and mV is the maximal ideal of V , then the prime ideal mV ∩R of R is called the center of V on R. Let (R, m) be a Noetherian local domain with field of fractions Q(R). A valuation domain (V, mV ) is said to birationally dominate R if R ⊆ V ⊆ Q(R) and mV ∩R = m, that is, m b.d. is the center of V on R. We write R ⊂ V to denote that V birationally dominates R. The valuation domain V is said to be a prime divisor of R if V birationally dominates R and the transcendence degree of the field V / mV over R/ m is dim R−1. If V is a prime divisor of R, then V is a DVR [A, p. 330]. Definition 2.4. Let R be a local domain with maximal ideal m and let V be a valuation domain that birationally dominates R. Let v be the valuation associated DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 5 with V . The dimension of v on R, or the dimension of V over R, is defined to be the transcendence degree of the residue field k(v) of v over the field R/ m. The quadratic dilatation or blowup of m along V , cf. [N, page 141], is the unique local ring on the blowup Blm (R) of m that is dominated by V . The ideal m V is principal and is generated by an element of m. Let a ∈ m be such that aV = m V . Then R[m /a] ⊂ V . Let Q := mV ∩R[m /a]. Then R[m /a]Q is the quadratic transformation of R along V . In the special case where (R, m) is a d-dimensional regular local domain we use the following terminology. Definition 2.5. Let d be a positive integer and let (R, m, k) be a d-dimensional regular local ring with maximal ideal m and residue field k. Let x ∈ m \ m2 and let S1 := R[ mx ]. The ring S1 is a d-dimensional regular ring in the sense that each localization of S1 at a prime ideal is a regular local ring. To see this, observe that S1 /xS1 is isomorphic to a polynomial ring in d − 1 variables over the field k, cf. [SH, Corollary 5.5.9], and S1 [1/x] = R[1/x] is a regular ring. Moreover, S1 is a UFD since x is a prime element of S1 and S1 [1/x] = R[1/x] is a UFD, cf. [M, Theorem 20.2]. Let I be an m-primary ideal of R with r := ordR (I). Then one has in S1 IS1 = xr I1 for some ideal I1 of S1 . It follows that either I1 = S1 or ht I1 ≥ 2. Thus I1 is the transform I S1 of I in S1 as in Definition 2.1. Let p be a prime ideal of R[ mx ] with m ⊆ p. The local ring m R1 : = R[ ]p = (S1 )p x is called a local quadratic transform of R; the ideal I1 R1 is the transform of I in R1 as in Definition 2.1. Remark 2.6. Let (R, m) be a regular local ring and let (R1 , m1 ) be a local quadratic transform of R as in Definition 2.5. If q is a nonzero prime ideal of R1 such that q ∩R =: p is properly contained in m, then Rp = (R1 )q . Proof. We have Rp ⊆ (R1 )q, and (R1 )q dominates Rp . Since R1 is a localization / p. Thus of S1 = R[ mx ], we have xR1 ∩ R = m. Hence q ∩R 6= m implies that x ∈ R[ x1 ] ⊂ Rp , and so R ⊂ S1 ⊂ Rp ⊆ (R1 )q. Since (R1 )q is a localization of S1 and q(R1 )q ∩ S1 = p Rp ∩ S1 , we have Rp = (R1 )q .  WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 6 Definition 2.7. Let (R, m) be a d-dimensional regular local ring and consider a sequence of local quadratic transforms along R, R = R0 ⊂ R1 ⊂ . . . ⊂ Rn . We say there is a change of direction from R0 to Rn if m0 ⊂ m2n . Remark 2.8. Assume the notation of Definition 2.7. Let V be a valuation domain birationally dominating Rn and let v be a valuation associated to V . There is a change of direction from R0 to Rn if and only if v(m0 ) > v(mn−1 ). Proof. It suffices to prove the case where n = 2. Assume that v(m0 ) = v(m1 ). We show there is no change of direction from R0 to R2 . Let x ∈ m0 be such that v(x) = v(m0 ). Then R2 is a localization of R1 [ mx1 ]. Hence x ∈ m2 \ m22 . Conversely, assume that v(m0 ) > v(m1 ). We show there is a change of direction from R0 to R2 . Let x ∈ m0 . Let w ∈ m1 be such that v(w) = v(m1 ). Then R2 is a localization of R1 [ mw1 ]. Since v(x) ≥ v(m0 ) > v(m1 ) = v(w), we have x= w wx ∈ m22 . We conclude that m0 ⊂ x w m22 . ∈ m2 . Thus  3. Directed unions of local quadratic transforms Remark 3.1. If (R, m) is a 2-dimensional regular local ring, then a well-known result of Abhyankar [A, Lemma12] states that an infinite directed union of local quadratic transforms of R is always a valuation domain. Examples given by Shannon in [S, Examples 4.7 and 4.17] show that this fails in general if d ≥ 3. Remark 3.2. Let {(Rn , mn )}n≥0 be an infinite directed family of local quadratic transforms of a regular local ring R. As shown by Granja in [Gr, Lemma 10], the following are equivalent: (1) The sequence {(Rn , mn )}n≥0 switches strongly infinitely often. (2) For each integer j ≥ 0 and nonzero element f ∈ Rj , there exists a positive integer n ≥ j such that the transform (f Rj )Rn = Rn . Let V be a valuation domain birationally dominating a regular local ring (R, m) and let {(Rn , mn )}n≥0 be the family of local quadratic transforms of R along V . Granja in [Gr, Theorem 13] proves the following: Remark 3.3. Let {(Rn , mn )}n≥0 be an infinite directed family of local quadratic transforms of a regular local ring R. If {Rn }n≥0 switches strongly infinitely often, S then S := ∞ n=0 Rn is a rank one valuation domain. DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 7 Proof. To prove that S is a valuation domain, it suffices to show for nonzero elements f, g ∈ R := R0 that either f /g or g/f is in Rn for some n > 0. Let I = (f, g)R. We prove the assertion by induction on ordR (I). The case where ordR (I) = 0 is clear. Let ordR (I) = r > 0, and assume the assertion holds for nonnegative integers less than r. We may assume that r = ordR (f ) ≤ ordR (g). Let I R1 = (f1 , g1 )R1 , where f1 g1 = fg , denote the transform of I in R1 . Since r = ordR (f ) = ordR (I), the ideal f1 R1 is the transform of f R in R1 . If ordR1 (f1 ) < r or ordR1 (g1 ) < r, then we are done by the induction hypothesis. Otherwise, ordR1 (I1 ) = ordR1 (f1 ) = r and I1 := (f1 , g1 )R1 satisfies the same hypotheses as I. Let I R2 = (f2 , g2 )R2 , where f2 g2 = fg , denote the transform of I in R2 , and continue in this way to define In = (fn , gn )Rn . Since the sequence switches strongly infinitely often, there exists a positive integer n such that either ordRn (gn ) < r or the strict transform fn of f S in Rn has ordRn (fn ) < r. This proves that S = ∞ n=0 Rn is a valuation domain. Assume that dim S > 1 and let P be a nonzero nonmaximal prime ideal of S. For S S each n ≥ 0, let Pn := P ∩ Rn . Then P = n≥0 Pn and SP = n≥0 (Rn )Pn . There exists a positive integer t for which Pt is a nonzero, nonmaximal prime ideal of the regular local ring Rt . For each positive integer i, we have Pt+i ∩ Rt = Pt . Therefore by Remark 2.6 (Rt )Pt = (Rt+i )Pt+i . It follows that SP = (Rt )Pt , a contradiction to our hypothesis that {Rn }n≥0 switches strongly infinitely often. We conclude that dim S = 1 and S is a rank one valuation domain.  We use the following setting to observe in Theorem 3.5 a connection between valuation ideals and an infinite directed family that switches strongly infinitely often. Setting 3.4. Let {(Rn , mn )}n≥0 be an infinite directed family of local quadratic transforms of a regular local ring R. Assume that {(Rn , mn )}n≥0 switches strongly S infinitely often and let V = n≥0 Rn . As noted in Remark 3.3, V is a rank one valuation domain. Let v be a valuation associated to V . By [ZS2, Lemma 3, p. T 343], the V -ideals of R form a descending sequence {In }n≥0 , and n≥0 In = (0). Theorem 3.5. Assume notation as in Setting 3.4. Then there exists an ascending sequence of integers {τn }n≥0 such that for each valuation domain W that birationally dominates Rτn , the ideals I1 , . . . , In are valuation ideals for W . Proof. We construct the sequence {τn }n≥0 by induction on n. Suppose we have constructed the sequence up to length n. Since the sequence of local quadratic transforms switches strongly infinitely often, there exists an integer τn+1 ≥ τn such 8 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER that In Rτn+1 is principal, say In Rτn+1 = gRτn+1 , where g ∈ In . Since V birationally dominates Rτn+1 , it is clear that v(g) = v(In ). Notice that we may take g to be any element in In such that v(g) = v(In ). Let h be another such element. Since h ∈ gRτn+1 , element h g h g ∈ Rτn+1 . Since V birationally dominates Rτn+1 and v(g) = v(h), the is a unit in Rτn+1 , so gRτn+1 = hRτn+1 . Let W birationally dominate Rτn+1 . Then W birationally dominates Rτn . By the induction hypothesis, I0 , . . . , In are W -ideals. To see that In+1 is a W -ideal, consider J = In+1 W ∩ R0 . Since In+1 ( In and In is a W -ideal, we have In+1 ⊂ J ⊂ In . Suppose by way of contradiction that J 6= In+1 . Let f ∈ J \ In+1 . Since In+1 = {a ∈ R0 | v(a) > v(In )}, it follows that v(f ) ≤ v(In ). Because f ∈ In , we have v(f ) = v(In ). Thus In Rτn+1 = f Rτn+1 , so J = In . Since In+1 ( In and In Rτn+1 = f Rτn+1 , there exists a proper ideal L of Rτn+1 such that In+1 Rτn+1 = f L. Since L is a proper ideal of Rτn+1 and W dominates Rτn+1 , we have w(L) > 0. Since J = f LW ∩ R and f ∈ J, it follows that f ∈ f LW , which contradicts the fact that w(L) > 0.  Remark 3.6. Let (R, m) be a Noetherian local domain and let V be a valuation domain birationally dominating R such that the vector space dimension of V / mV over R/ m denoted dimR/ m V / mV = e < ∞. Let {In }n≥0 be the sequence of V ideals of R. Then 1 ≤ λR (In /In+1 ) ≤ e for all n ≥ 0. To see this, fix an integer n, and consider the natural embedding as R-modules, In In+1 ∼ = In V In V ∩ R V ∼ ֒→ , = m V In V ∩ R m V In V mV where the last isomorphism follows because In V = f V , for some element f ∈ In . Thus there is an R-module embedding of In /In+1 into V / mV , and hence we have 0 < λR (In /In+1 ) ≤ λR (V / mV ) = e. In particular, if R/ m = Rn / mn for all n ≥ 0 and {In }n≥0 is the sequence of V -ideals in R, then λR (In /In+1 ) = 1 for all n ≥ 0. Remark 3.7. Let R and the family {(Rn , mn )}n≥0 be as in Theorem 3.5. It is natural to ask about conditions on the integer τn given in Theorem 3.5. The smaller the integer τn , the sharper the assertion. We describe the situation in more detail in Discussion 3.8 Discussion 3.8. Let the ring R, the family of local quadratic transforms {(Rn , mn )}n≥0 , and the descending chain of ideals {In }n≥0 be as in Theorem 3.5. Let S denote the DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 9 set of valuation domains that birationally dominate R. For each integer n ≥ 0, let Sn = {W ∈ S | I0 , I1 , . . . , In are all W -ideals}, b.d. Tn = {W ∈ S | Rn ⊂ W }. Notice that S0 = S1 = S = T0 and the families {Sn } and {Tn } are both linearly ordered with respect to inclusion and decreasing. Since I2 = PRR1 is the special ∗-simple complete ideal in R associated to R1 as defined by Lipman in [L, Proposition 2.1], we also have S2 = T1 . Associated with these sequences, we define: sn = min{ j ∈ N0 | Tj ⊆ Sn }. ( min{ j ∈ N0 | Sj ⊆ Tn }, tn = ∞ if Sj is not contained in Tn for all j. We have s0 = 0 = t0 and s1 = 0, while t1 = 2 and s2 = 1. The sequences {sn } and {tn } are increasing in the sense that sn ≤ sn+1 and tn ≤ tn+1 for each n ≥ 0. Theorem 3.5 implies that for each positive integer n there exists a positive integer τn such that Tτn ⊆ Sn that is, W ∈ Tτn =⇒ W ∈ Sn . Thus τn is any integer such that τn ≥ sn . The proof of Theorem 3.5 also proves that: (1) sn ≤ min{ j ∈ N0 | Iµ Rj is principal for all µ with 0 ≤ µ ≤ n − 1}. Theorem 3.9 applies to a directed family {(Rn , mn )}n≥0 of Noetherian local doS mains such that ∞ n=0 Rn is a rank one valuation domain. Theorem 3.9. Let {(Rn , mn )}n≥0 be an infinite family of Noetherian local domains such that Rn is a subring of Rn+1 for each integer n ≥ 0. Assume that ordRn defines S a valuation for each integer n ≥ 0, and that ∞ n=0 Rn = V is a rank one valuation domain. Let v denote a valuation associated to V , and let f, g be nonzero elements in the maximal ideal of V . Then for n sufficiently large, f and g are in mn , and we have v(f ) ordRn (f ) = lim . n→∞ ordRn (g) v(g) Proof. Let L = v(f ) v(g) and let ǫ > 0. There exist positive integers p and q such that L−ǫ < Then p+1 p ≤ L < < L + ǫ. q q p v(f ) p+1 ≤ L= < q v(g) q WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 10 implies that pv(g) ≤ qv(f ) < (p + 1)v(g) For n sufficiently large, we have and f q g p+1 gp , f q v(g p ) ≤ v(f q ) < v(g p+1 ). ∈ Rn . Therefore ordRn (g p ) ≤ ordRn (f q ) < ordRn (g p+1 ). It follows that p ordRn (f ) p+1 ≤ . < q ordRn (g) q We conclude that L−ǫ< ordRn (f ) <L+ǫ ordRn (g) for all sufficiently large integers n.  Corollary 3.10 is immediate from Theorem 3.9. Corollary 3.10. Let {(Rn , mn )}n≥0 be an infinite directed family of local quadratic transforms of a regular local ring R. Assume that {(Rn , mn )}n≥0 switches strongly S infinitely often, so V = ∞ n=0 Rn is a rank 1 valuation. Let v be a valuation associated to V . Then for nonzero f, g ∈ m, we have ordRn (f ) v(f ) = lim . n→∞ ordRn (g) v(g) 4. Directed unions of monomial local quadratic transforms Definition 4.1. Let (R, m) be a d-dimensional regular local ring with d ≥ 2, and fix d elements x, y, . . . , z such that m := (x, y, . . . , z)R. An element p ∈ R is called a monomial in x, y, . . . , z if there exists (α, β, . . . , γ) ∈ Nd0 such that p = xα y β · · · z γ . An ideal I of R is said to be a monomial ideal if I is generated by monomials. Let x A = R y m z = R , ..., x x x x1 := x, y1 : = y , x . . . , z1 := z . x If I is a monomial ideal in R, the transform of I in x A is generated by elements of the form xa1 y1b · · · z1c with a, b, . . . , c ∈ N0 . This motivates us to define an ideal J of x A to be a monomial ideal if J is generated by monomials in x1 , y1 , . . . , z1 . We consider monomial quadratic transformations of R defined as follows: the ring   xR = R m x (x, y , ..., z ) is a monomial local quadratic transformation of R in x x the x-direction. An ideal J of x R is said to be a monomial ideal if J is generated by monomials in x1 , y1 , . . . , z1 . DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 11 In a similar manner, we define y R, . . ., z R to be the local monomial quadratic transformations of R in the y-direction, . . ., z-direction, respectively, where m m z y R = R . R = R z , ..., x x y y ( y , y, ..., y ) z ( z , z , ..., z) We define an ideal of y R, . . ., z R to be a monomial ideal if it is generated by monomials in the respective rings. We refer to the elements in the fixed set of minimal generators of the regular local ring as variables. For a monomial ideal I of one of these rings, there exists a unique set of monomial minimal generators of I, [KS, Corollary 4]. We let ∆(I) denote the set of monomial minimal generators of I. Setting 4.2. Let (R, m) and x, y, . . . , z be as in Definition 4.1. For n a positive integer, consider a sequence of regular local rings (2) {(Ri , mi )}ni=0 ≡ R =: R0 ⊂ R1 ⊂ R2 ⊂ · · · ⊂ Rn , where Ri+1 is a monomial local quadratic transformation of Ri , for each i < n mi = (xi , yi , . . . , zi )Ri and mi+1 = (xi+1 , yi+1 , . . . , zi+1 )Ri+1 , and where one of the following d-cases occur: xi+1 := xi , yi+1 := yi , xi ··· , zi+1 := zi , xi in which case we say the transform from Ri to Ri+1 is in the x-direction, or xi+1 := xi , yi yi+1 := yi , ··· , zi+1 := zi , yi in which case we say the transform from Ri to Ri+1 is in the y-direction, or .. . xi yi , yi+1 := , · · · , zi+1 := zi , zi zi in which case we say the transform from Ri to Ri+1 is in the z-direction. xi+1 := Let Dx (respectively, Dy , . . . , Dz ) denote the set of integers i ∈ {0, 1, . . . , n − 1} for which the transform from Ri to Ri+1 is in the x-direction (respectively, the y-direction, . . . , the z-direction). Theorem 4.3. Let notation be as in Setting 4.2. The following are equivalent: (1) The sets Dx , Dy , . . . , Dz are all nonempty. (2) For every nonzero f ∈ m, we have ordRn (f R)Rn < ordR (f ). WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 12 Proof. Assume that item 1 fails. Then at least one of the sets Dx , Dy , . . . , Dz is empty. By relabeling, we may assume that Dx is empty. Then Rn ⊂ RxR and we have ordRn (xR)Rn = 1 = ordR (x). Assume that item 1 holds and fix a nonzero element f ∈ m. Let r := ordR (f ) > 0. The order of the transform of f R never increases, cf [HKT, Lemma 3.6]. By [HubS, Proposition 1.3], there exist monomials g1 , . . . , gt and units λ1 , . . . , λt in R such that f = λ1 g1 + · · · + λt gt . Let gi = xai y bi · · · z ci be a monomial with ordR (gi ) = r. By relabeling the variables, we may assume ai > 0. Since the set Dx is nonempty, there exists s ∈ {0, . . . , n − 1} such that the transform from Rs to Rs+1 is in the x-direction. Let s be minimal with this property. If ordRs (f R)Rs < r, we are done. Otherwise, we have ordRs (f R)Rs = r, and there exists a monomial q in xs , ys , . . . , zs such that g1 gt f (f R)Rs = ( )Rs = ( λ1 + . . . + λt )Rs . q q q g1 gt The elements q , . . . , q are distinct monomials in xs , ys , . . . , zs . Since ordRs is a monomial valuation and ordRs (f R)Rs = r, we have ordRs (gi R)Rs = r. Thus gi (gi R)Rs = ( )Rs = (xas i ysbi · · · zsci )Rs . q Since the transform from Rs to Rs+1 is in the x-direction, ordRs+1 (gi R)Rs+1 = r − ai < r. Set q ′ = qxrs . Then g1 gt f (f R)Rs+1 = ( ′ )Rs+1 = ( ′ λ1 + . . . + ′ λt )Rs+1 . q q q gi Rs+1 . Since ord Rs+1 is a monomial valuation and q ′ Rs+1 = (gi R) gt g1 s+1 ≤ r − a < r. This i q ′ , . . . , q ′ are distinct, we have ordRs+1 (f R) We have the mono- mials completes the proof of Theorem 4.3.  Remark 4.4. For the transform of an ideal as defined in Definition 2.1, we observe some properties of the transform of a monomial ideal with respect to a monomial local quadratic transform from R0 to R1 . Let (R1 , m1 ) be the monomial local quadratic transformation of R0 in the wdirection, where w ∈ ∆(m0 ), and m1 := (x1 , y1 , . . . , w1 , . . . , z1 ), where x y z x1 := , y1 := , . . . , w1 := w, . . . , z1 := . w w w Let p := xα1 y β1 · · · wη1 · · · z γ1 and q := xα2 y β2 · · · wη2 · · · z γ2 be distinct monomials in R and let I := (p, q)R. Assume that r := ordR (p) ≤ ordR (q) := s. Thus DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 13 r = ordR (I). In R1 , the monomials p and q can be written as follows: p : = xα1 y β1 · · · wη1 · · · z γ1 = (wx1 )α1 (wy1 )β1 · · · wη1 · · · (wz1 )γ1 = w1r (xα1 1 y1β1 · · · w10 · · · z1γ1 ) = w1r p1 = wr p1 and q : = xα2 y β2 · · · wη2 · · · z γ2 = (wx1 )α2 (wy1 )β2 · · · wη2 · · · (wz1 )γ2 = w1r (xα1 2 y1β2 · · · w1s−r · · · z1γ2 ) = w1r q1 = wr q1 . Thus I1 := I R1 = (p1 , q1 )R1 is the transform of I in R1 . We have (3) ordR1 (I1 ) ≤ ordR1 (p1 ) and ordR1 (p1 ) = r − η1 ≤ ordR (p). Hence if η1 > 0, then ordR1 (I1 ) < ordR (I). It is observed in [HKT, Lemma 3.6] that ordR1 (I R1 ) ≤ ordR0 (I) even without the assumption that I is a monomial ideal. Remark 4.5. Let notation be as in Setting 4.2, and let V be a valuation domain that dominates Rn . The following are equivalent: (1) The transform from R0 to R1 is in the x-direction. (2) v(x) < v(w) for each w ∈ ∆(m) with w 6= x. (3) m V = xV . Assume that the transform from R0 to R1 is in the x-direction. By relabeling the variables, we may assume that  v(y) = min v(w) | w ∈ ∆(m) with w 6= x . With this assumption, the following are equivalent: (a) The set Dy is nonempty. (b) The set Dy ∪ · · · ∪ Dz is nonempty. (c) There exists a positive integer s in {1, . . . , n − 1} such that the transform from R0 to Rs is in the x-direction and the transform from Rs to Rs+1 is in the y-direction. (d) We have sv(x) < v(y) < (s + 1)v(x) for some s in {1, . . . , n − 1}. Remark 4.6. Let notation be as in Remark 4.5. Assume that the sets Dx , Dy , . . . , Dz are all nonempty. Label the variables x, y, . . . , z in ∆(m) as w1 , w2 , . . . wd , where 14 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER i < j if the sequence {Ri }ni=0 contains a transform in the wi -direction before it con- tains a transform in the wj -direction. Thus with the assumptions of Remark 4.5, we have w1 = x, w2 = y, and v(wi ) < v(wj ) if and only if i < j. Definition 4.7. Let V be a valuation domain, and let b1 , . . . , bs be nonzero elements √ √ of V . We say that b1 , . . . , bs are comparable in V if b1 V = · · · = bs V , that is, the ideals bi V and bj V have the same radical for all i and j between 1 and s. Proposition 4.8. Let notation be as in Remark 4.6. Thus the sets Dx , Dy , . . . , Dz are all nonempty, and our fixed regular system of parameters (x, y, . . . , z) is also denoted (w1 , w2 , . . . , wd ). Let ai := v(wi ) for 1 ≤ i ≤ d. Thus the tuple (a1 , a2 , . . . , ad ) is the family of v-values of (w1 , w2 , . . . , wd ). Then we have: (1) 0 < a1 < a2 < · · · < ad . (2) There exists a positive integer s such that sa1 < a2 < (s + 1)a1 . (3) We have (j − 2)aj < a1 + a2 + · · · + aj−1 for j with 3 ≤ j ≤ d. (4) The elements w1 , . . . , wd are comparable in V . Proof. Item 1 follows from Remark 4.6, and item 2 follows from Remark 4.5. In order to give a detailed proof of item 3, we introduce more notation. For each i ∈ {0, 1, . . . , n} and each positive integer j with 1 ≤ j ≤ d, we define wij as follows: m = m0 = (x, y, . . . , z)R0 = (w01 , w02 , . . . , w0d )R0 mi = (xi , yi , . . . , zi )Ri = (wi1 , wi2 , . . . , wid )Ri . To prove item 3, it suffices to show that if (ℓ − 2)aℓ ≥ a1 + a2 + · · · + aℓ−1 for some ℓ with 3 ≤ ℓ ≤ d, then the set Dwℓ is empty. Let   a01 , a02 , . . . , a0d = v(w01 ), v(w02 , . . . , v(w0d )),   ak1 , ak2 , . . . , akd = v(wk1 ), v(wk2 ), . . . , v(wkd ) for each k ≥ 1. With this notation, we show (ℓ − 2)akℓ ≥ ak1 + · · · + akℓ−1 for all k ≥ 0 by induction on k. By hypothesis (ℓ − 2)a0ℓ ≥ a01 + · · · + a0ℓ−1 . Assume the assertion holds for k and let ek := min{ak1 , ak2 , . . . , akℓ−1 }. Then we have (ℓ − 2)ak+1ℓ = (ℓ − 2)(akℓ − ek ) = (ℓ − 2)akℓ − (ℓ − 2)ek ≥ ak1 + · · · + akℓ−1 − (ℓ − 2)ek = ak+11 + · · · + ak+1ℓ−1 . DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 15 Therefore the assumption that Dwℓ is nonempty implies that (ℓ − 2)aℓ < a1 + a2 + · · · + aℓ−1 . This proves item 3. Item 4 now follows from items 1, 2 and 3.  5. Infinite Directed Unions of Monomial Local Quadratic Transforms Remark 5.1. Let (R, m) be a d-dimensional regular local ring with d ≥ 2, and let V be a valuation domain birationally dominating R and zero-dimensional over R. Let v be a valuation associated to V . Then there exists a uniquely defined infinite sequence (4) {(Rn , mn )}n≥0 ≡ R =: R0 ⊂ R1 ⊂ R2 ⊂ · · · ⊂ Rn ⊂ · · · ⊂ V of local quadratic transforms of R along V . (1) If the v-values v(x), v(y), . . . , v(z) of a regular system of parameters for m are rationally independent real numbers, then the sequence given in Equation 4 is monomial with respect to this regular system of parameters. However, as Shannon shows in [S, Example 4.17], in this situation it is often the case S that S := n≥0 Rn is properly contained in V . (2) If v is rank one discrete, then the sequence given in Equation 4 switches S strongly infinitely often, that is V = n≥0 Rn . To see this, let pq ∈ V , with p, q ∈ R. Assume that from R to R1 , we divide by x, where v(x) > 0. Let p1 = p/x and q1 = q/x, so that p q = p1 q1 , where v(q1 ) < v(q). A simple induction argument shows that we can write p q = pn qn , where pn , qn ∈ Rn and v(qn ) = 0, for some n. See for example [HRW, Proposition 23.3]. Thus the sequence {(Rn , mn )}n≥0 switches strongly infinitely often. (3) If V is rank one and the rational rank of V is less than d, it is possible that the field extension R/ m ⊂ V / mv is an infinite algebraic field extension. This is illustrated in Example 4 of page 104 in [ZS2]. (4) Assume that V has rank one and rational rank r and that the local quadratic sequence {(Rn , mn )}n≥0 along V switches strongly infinitely often. Then for each sufficiently large integer n, there exists a sequence of elements w1 , . . . , wr that are part of a regular system of parameters for mn and are such that v(w1 ), . . . , v(wr ) are rationally independent. Proof. Since V has rational rank r, there exist elements a1 , . . . , ar in R such S that v(a1 ), . . . , v(ar ) are rationally independent. Since V = n≥0 Rn , it WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 16 follows from [S, Prop. 4.18] that for sufficiently large integers n, the product a1 · · · ar is a monomial with respect to a regular system of parameters w1 , . . . , wd of Rn . It follows that v(a1 ), . . . , v(ar ) are in the Q-linear subspace L of R spanned by v(w1 ), . . . , v(wd ). Since v(a1 ), . . . , v(ar ) are linearly independent over Q, the vector space L has rank at least r. By re-labeling the wi , it follows that v(w1 ), . . . , v(wr ) are rationally independent.  We observe in Proposition 5.2 that an infinite sequence {(Rn , mn )}n≥0 of local quadratic transforms that switches strongly infinitely often is eventually monomial S if V = n≥0 Rn has maximal rational rank . Proposition 5.2. Let (R, m), be a d-dimensional regular local ring and let V be a rank 1, rational rank d valuation domain birationally dominating R. Consider the infinite sequence R =: R0 ⊂ R1 ⊂ · · · ⊂ Rn ⊂ · · · ⊂ V S of local quadratic transforms of R along V . If V = ∞ n=0 Rn , then there exists an integer n ≥ 0 and a regular system of parameters x, y, . . . , z of Rn such that the sequence {Ri }i≥n is monomial in these regular parameters. Proof. By Remark 5.1.4, there exists an integer n ≥ 0 and a regular system of parameters x, y, . . . , z of Rn such that v(x), v(y), . . . , v(z) are rationally independent. It follows that the sequence {Ri }i≥n is monomial with respect to x, y, . . . , z.  In Setting 5.3, we extend the notation of Setting 4.2 to an infinite sequence. Setting 5.3. Let (R, m) and x, y, . . . , z be as in Setting 4.2. We consider an infinite sequence of regular local rings (5) {(Ri , mi )}i≥0 ≡ R =: R0 ⊂ R1 ⊂ R2 ⊂ · · · ⊂ Ri ⊂ · · · , where Ri+1 is a monomial local quadratic transformation of Ri for each i ≥ 0. As in Setting 4.2, let Dx (respectively, Dy , . . . , Dz ) denote the set of nonnegative integers i for which the transform from Ri to Ri+1 is in the x-direction (respectively, the y-direction, . . . , the z-direction). S Set S := i≥0 Ri . It is straightforward to prove that S is a normal local domain S with field of fractions Q(R) and maximal ideal mS := i≥0 mi . Our assumption that the local quadratic transforms are monomial implies that there is no residue field S extension, that is, i≥0 (Ri / mi ) = R/ m. Moreover, if S is not a valuation domain, DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 17 it is known that there exist infinitely many valuation domains V that birationally dominate S and have positive dimension over S, that is, the residue field of V has positive transcendence degree over the field S/ mS ; see [A, Lemma 7] or [SH, Exercise 6.24]. Theorem 5.4. Let notation be as in Setting 5.3, and let V be a valuation domain that birationally dominates S. The following are equivalent: (1) The sets Dx , Dy , . . . , Dz are all infinite. (2) {(Rn , mn )}n≥0 switches strongly infinitely often. (3) S = V and V has rank 1. Proof. (2) ⇒ (1) : Assume that item 1 fails. Then at least one of the sets Dx , Dy , . . . , Dz is finite. By relabeling, we may assume that Dx is finite. Then there exists a pos- itive integer j such that for n ≥ j, the transform from Rn to Rn+1 is not in the x-direction. Let mj := (xj , yj , . . . , zj )Rj . Then pj := (xj )Rj has the property that  S n≥0 Rn ⊆ Rj p . Thus {(Rn , mn )}n≥0 does not switch strongly infinitely often. j (1) ⇒ (2) : Assume that item 1 holds. To prove that {(Rn , mn )}n≥0 switches strongly infinitely often it suffices to show for each integer j ≥ 0 and nonzero element f ∈ Rj that there exists an integer n ≥ j such that the transform (f Rj )Rn = Rn , cf. Remark 3.2. Let r := ordRj (f ). To prove that the transform (f Rj )Rn = Rn for some n, it suffices to prove that the order of the transform (f Rj )Rs is less than r for some integer s > j, and this is immediate from Theorem 4.3. (2) ⇒ (3) : This is clear by Remark 3.3. (3) ⇒ (2) : This is shown by Granja [Gr, Theorem 13].  Lemma 5.5. Let notation be as in Setting 5.3, and let p and q be distinct monomials in R. If the sets Dx , Dy , . . . , Dz are all infinite, then there exists an integer t such that either p/q ∈ mt or q/p ∈ mt . Proof. Let I := (p, q)R. We prove Lemma 5.5 by induction on r := ordR (I). The case where r = 0 is clear. Assume the assertion of Lemma 5.5 holds for all nonnegative integers less than r. We may assume ordR (p) ≤ ordR (q). Then r = ordR (p). Assume notation as in Remark 4.4. Thus the transform from R to R1 is in the w-direction. If η1 > 0, then as shown in Equation 3, we have ordR1 (p1 ) < r. Hence by our inductive hypothesis applied to the ideal I1 in R1 , we have, for some positive integer t, either or q p = q1 p1 ∈ mt . p q = p1 q1 ∈ mt WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 18 If η1 = 0, then ordR1 (p1 ) = ordR (p) = r. If ordR1 (q1 ) < r, then again by induction applied to the ideal I1 in R1 , we have either p q = p1 q1 for some positive integer t. ∈ mt or q p = q1 p1 ∈ mt If η1 = 0 and ordR1 (q1 ) ≥ r, then the ideal I1 = (p1 , q1 )R1 satisfies the same hypothesis as the ideal I = (p, q)R. Let I2 = (p2 , q2 )R2 denote the transform of p2 q2 mt or pq I1 in R2 , where p q = p2 q2 ∈ = pq . If ordR2 (I2 ) < r, then for some positive integer t, either = q2 p2 ∈ mt . If ordR2 (I2 ) = r, we define I3 = (p3 , q3 )R3 and continue. Let Ii = (pi , qi )Ri denote the transform of I in Ri , where pi qi = pq , for each i ≥ 1. If ordRi (Ii ) = r for all i, then the transform from Ri−1 to Ri is never in a direction where the associated exponent of p is positive. This is impossible since the sets Dx , Dy , . . . , Dz are all infinite and the monomial p contains at least one positive exponent. We conclude by induction that there exists an integer t such that either p/q ∈ mt or q/p ∈ mt .  Corollary 5.6. Assume notation as in Theorem 5.4. The valuation domain V has rational rank d = dim R, and V is a zero-dimension over R. If v is a valuation associated to V , then v(x), v(y), . . . , v(z) are rationally independent. In particular, v is a monomial valuation Proof. Assume that a1 v(x) + b1 v(y) + · · · + c1 v(z) = a2 v(x) + b2 v(y) + · · · + c2 v(z), with (a1 , b1 , . . . , c1 ) and (a2 , b2 , . . . , c2 ) being d-tuples of nonnegative integers. Then we have v(xa1 y b1 · · · z c1 ) = v(xa2 y b2 · · · z c2 ), and hence xa1 y b1 · · · z c1 = xa2 y b2 · · · z c2 by Lemma 5.5. Thus we have a1 = a2 , b1 = b2 , . . . , c1 = c2 . By [SH, Theorem 6.6.7], we have rat. rank v + tr. degR/ m k(v) ≤ dim(R). Since d ≤ rat. rank v, we have rat. rank v = d. It follows that tr. degR/ m k(v) = 0.  DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 19 6. Infinite Directed Unions of Local Quadratic Transforms Related to Item 2 of Remark 5.1, Example 6.1 demonstrates the existence of a nondiscrete rational rank 1 valuation domain V that birationally dominates and is zero-dimensional over a 3-dimensional regular local ring R and is such that the sequence {(Rn , mn )}n≥0 of local quadratic transforms of R along V as in Equation 4 S fails to switch strongly infinitely infinitely often, that is, we may have n≥0 Rn ( V . Example 6.1. Let x, y be indeterminates over a field k, and let A0 = k[[x, y]] be the formal power series ring in x and y over k. We describe a sequence {(An , nn )}n≥0 of local quadratic transforms of A0 , such that nn = (xn , yn )An is the maximal ideal of An , where for each even integer n ≥ 0, we set An+1 = An [ xynn ](xn , yn −1) , and for xn each odd integer n ≥ 1, we set An+1 = An [ xynn ](yn , xn ) . Thus for each integer k ≥ 0, yn we have x2k+1 = x2k , y2k+1 = y2k − x2k , x2k x2k+2 = x2k+1 , y2k+1 and y2k+2 = y2k+1 . Notice that An+1 is the localization of An [xn+1 , yn+1 ] at the maximal ideal generated by xn+1 , yn+1 . S Let W = ∞ n=0 An . By Remark 3.1, W is a valuation domain that birationally dominates A0 and has residue field k. Let w denote the valuation associated to W such that w(x) = 1. The fact that W dominates every An implies that W is rational k rank 1 nondiscrete and that w(x2k ) = w(x2k+1 ) = w(y2k ) = w(y2k−1 ) = 21 , for k k+1 , it follows that all k ≥ 0. Since for k ≥ 0, w(n2k ) = 12 and w(n2k+1 ) = 21     1 X X 1 k X 1 k+1 1 2 w(nk ) = + = 3. + = 2 2 1 − 12 1 − 21 k≥0 k≥0 k≥0 Let p(x) ∈ k[[x]] be such that x and p(x) are algebraically independent over k and let z = x4 p(x). Let R = k[x, y, z](x,y,z) , V = W ∩ k(x, y, z), and v = w|R(x,y,z) . It follows that V is a rational rank 1 nondiscrete valuation domain that birationally dominates R and has residue field k. Let {(Rn , mn )}n≥0 be the sequence of local quadratic transforms of R along V . Since v(z) ≥ 4, we have mn = (xn , yn , zn ), where xn , yn are the generators of nn as defined above and zn is defined inductively by zn+1 = z-direction, zn xn S for n even and zn+1 = n≥0 Rn zn yn ⊂ R(zR) , and thus S for n odd. Since we never divide in the n≥0 Rn (V. By stringing together infinitely many finite sequences of monomial local quadratic transforms as in Theorem 4.3 and interspersing between each two a local quadratic WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 20 transform that is not monomial, we obtain examples of infinite sequences {Ri }i≥0 S that switch strongly infinitely often and have the property that V = i≥0 Ri has rational rank less than d = dim R. We give explicit examples with d = 3 in Exam- ple 6.3. We use the following remark. Remark 6.2. Let (R, m) be a Noetherian local domain, and let V be a valuation domain dominating R. that dimR/ m m / m2 Let v be a valuation associated to V . Assume = d, and that there exist elements x1 , . . . , xd in m such that v(x1 ) < v(x2 ) < · · · < v(xd ) < v(m2 ). v(y) ∈ {v(x1 ), . . . , v(xd )}. Then for each y ∈ m \ m2 , we have To see this, let R = I0 ) I1 ) I2 ) . . . be the sequence of valuation ideals of V in R, where In+1 = {a ∈ R | v(a) > v(In )}. For 1 ≤ i ≤ d, define Ji = {a ∈ R | v(a) ≥ v(xi )}. Define J0 = R and Jd+1 = {a ∈ R | v(a) ≥ v(m2 )}. The assumption that v(xd ) < v(m2 ) implies that Jd+1 ( Jd . Thus we have the chain of inclusions of ideals, R = J0 ) J1 ) . . . ) Jd ) Jd+1 ⊃ m2 . Since λR (R/ m2 ) = d + 1, it follows that for 0 ≤ i ≤ d, Ji /Ji+1 is a simple Rmodule, and it follows that Jd+1 = m2 . Thus for 0 ≤ i ≤ d + 1, Ii = Ji , and for each y ∈ m \ m2 , v(y) ∈ {v(I1 ), . . . , v(Id )} = {v(x1 ), . . . , v(xd )}. Example 6.3. Let (R, m) be a 3-dimensional regular local ring, and let m = (x, y, z)R. Define: y z m m1 = (x1 , y1 , z1 )R1 = (x, , )R1 R1 = R[ ](x, y , z ) and x x x x x m1 x2 y z R2 = R1 [ ]( x1 ,y1 , z1 ) and m2 = (x2 , y2 , z2 )R2 = ( , , )R2 y1 y1 y1 y x y m2 x2 y 2 z R3 = R2 [ ]( x2 , y2 ,z2 ) and m3 = (x3 , y3 , z3 )R3 = ( , , )R3 z2 z2 z2 z xz y x2 y 2 z2 m3 R4 = R3 [ ](x3 , y3 −1, z3 −1) and m4 = (x4 , y4 , z4 )R4 = ( , 3 − 1, 2 − 1)R4 x3 x3 x3 z x x y For each valuation domain V birationally dominating R4 , we have v(y) = 23 v(x) and v(z) = 74 v(x). Starting from (R4 , m4 ) and m4 = (x4 , y4 , z4 )R4 , we make a sequence R4 ⊂ R5 ⊂ R6 ⊂ R7 of monomial local quadratic transforms with respect to the fixed basis x4 , y4 , z4 of m4 such that R4 to R5 is in the x-direction, R5 to R6 is in the ydirection, and R6 to R7 is in the z-direction. With (x7 , y7 , z7 )R7 the monomial DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 21 regular system of parameters for m7 , we define the local quadratic transform R7 to R8 in a manner similar to that from R3 to R4 . Thus x8 := x7 , y8 := z8 := z7 x7 y7 x8 − 1, and − 1. If V is a valuation birationally dominating R8 , then v(y4 ) = 32 v(x4 ) and v(z4 ) = 47 v(x4 ). In a similar manner, for each positive integer n, we inductively define the sequence of local quadratic transforms R4n ⊂ R4n+1 ⊂ R4n+2 ⊂ R4n+3 ⊂ R4n+4 . For each valuation domain V that birationally dominating R4n+4 , we have v(y4n ) = 23 v(x4n ) and v(z4n ) = 74 v(x4n ). Theorem 4.3 implies that the sequence {Ri }i≥0 switches strongly infinitely ofS ten. Hence V = i≥0 Ri is a rank one valuation domain by Remark 3.3 and V is a zero-dimension over R. The rational rank of V is 1, for if the rational rank of V were greater than 1, then by Remark 5.1.4, there exists an integer n > 0 and elements w1 , w2 ∈ R4n such that ordR4n (w1 ) = ordR4n (w2 ) = 1 and v(w1 ), v(w2 ) are rationally independent. Since v(x4n ) < v(y4n ) < v(z4n ) < v(m24n ) and v(x4n ), v(y4n ), v(z4n ) are rationally dependent, Remark 6.2 implies that v(w1 ) and v(w2 ) are in {v(x4n ), v(y4n ), v(z4n )} and hence are rationally dependent. Theorem 3.5 implies the following result for an infinite sequence of monomial local quadratic transforms. Construction 6.4. Let notation be as in Theorem 5.4 and assume that the sets Dx , Dy , . . . , Dz are all infinite. Then: (1) There exists an infinite decreasing chain {In }n≥0 of v-ideals in R such that each In is a monomial ideal and λR (In /In+1 ) = 1 for each n ≥ 0. T (2) We have n≥1 In = (0). (3) If p is a monomial in R, then pV ∩ R = In for some n ≥ 0. S (4) V = n≥0 Rn is a rank one valuation domain. Proof. Since the sequence {Rn }n≥0 is monomial, we have R/ m = Rn / mn for all n ≥ 0. Since the sets Dx , Dy , . . . , Dz are all infinite, the sequence {Rn }n≥0 S switches infinitely often by Theorem 5.4. Remark 3.3 implies that V = n≥0 Rn is a rank one valuation domain. Theorem 3.5 implies items 1, 2 and 3.  7. Properties of infinite sequences of local quadratic transforms Setting 7.1. Let (R, m) be a d-dimensional regular local ring with d ≥ 2 and let V be a zero-dimensional real valuation domain birationally dominating R with WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 22 a corresponding valuation v. Consider the infinite sequence {(Ri , mi )}i≥0 of local quadratic transforms of R along V , R = R0 ⊂ R1 ⊂ · · · ⊂ Rn ⊂ · · · ⊂ ∪n≥0 Rn ⊂ V. Let s denote the infinite sum, s= ∞ X v(mi ). i=0 Thus s is either ∞ or a positive real number. In Theorem 7.2, we describe the value of s in the monomial case. Theorem 7.2. Assume the notation of Setting 7.1 and that m = (x, y, . . . , z)R, where v(x), v(y), . . . , v(z) are rationally independent. Then, P∞ v(x)+v(y)+···+v(z) (1) s = . In particular, s is finite. i=0 v(mi ) ≤ (d−1) (2) The following are equivalent: (a) Equality holds in Item 1. (b) The sequence {(Rn , mn )}n≥0 switches strongly infinitely often. (c) lim v(wn ) = 0, for each variable w ∈ ∆(m0 ). n→∞ Proof. For item 1, we prove by induction that the following equation holds for every integer n ≥ 0. (6) n−1 X ! v(mi ) i=0 + v(x) + v(y) + · · · + v(z) v(xn ) + v(yn ) + · · · + v(zn ) = . d−1 d−1 Equality is clear in the case where n = 0. Assume that the claim is true for n. By re-arranging variables, we may assume that v(xn ) = v(mn ), so that the local quadratic transform from Rn to Rn+1 is in the x-direction. Hence for every variable w that is not x, wn+1 := wn /xn , so v(wn+1 ) = v(wn ) − v(xn ). Thus, ! n X v(xn+1 ) + v(yn+1 ) + · · · + v(zn+1 ) v(mi ) + d−1 i=0 ! n−1 X (v(xn ) + v(yn ) + · · · + v(zn )) − (d − 1)v(xn ) v(mi ) + v(xn ) + = d−1 i=0 ! n−1 X v(xn ) + v(yn ) + · · · + v(zn ) v(mi ) + = d−1 i=0 = v(x) + v(y) + · · · + v(z) . d−1 By taking limits, we conclude that s = P∞ i=0 v(mi ) ≤ v(x)+v(y)+···+v(z) . (d−1) DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS For item 2, we let En := we have Pn−1 i=0 23 v(mi ). We first show (a) ⇒ (c): By assumption, v(xn ) + v(yn ) + · · · + v(zn ) v(x) + v(y) + · · · + v(z) thus lim = 0. n→∞ n→∞ d−1 d−1 For each w ∈ ∆(m0 ), the sequence {v(wn )}n≥0 is a nonincreasing sequence of positive lim En = real numbers. Hence each lim v(wn ) exists and is a nonnegative real number. Since n→∞ d ≥ 2, we have lim {v(xn )+ v(yn )+ · · ·+ v(zn )} = 0, and thus we have lim v(wn ) = n→∞ n→∞ 0, for each variable w ∈ ∆(m0 ). (c) ⇒ (a): . Assume that lim v(wn ) = 0, for each variable w ∈ ∆(m0 ). That is, n→∞ we have lim v(xn ) = 0, lim v(yn ) = 0, · · · , lim v(zn ) = 0. n→∞ n→∞ n→∞ By Equation 6 we have v(x) + v(y) + · · · + v(z) v(xn ) + v(yn ) + · · · + v(zn ) En = − . d−1 d−1 Hence n v(x) + v(y) + · · · + v(z) o n v(x ) + v(y ) + · · · + v(z ) o n n n lim En = lim − lim n→∞ n→∞ n→∞ d−1 d−1 v(x) + v(y) + · · · + v(z) = . d−1 The last equality follows by assumption. (c) ⇒ (b): Assume that lim v(wn ) = 0, for each variable w ∈ ∆(m0 ). Suppose n→∞ by way of contradiction that the sequence {(Rn , mn )}n≥0 does not switch strongly infinitely often. By Theorem 5.4, there exists a variable w ∈ ∆(m0 ) such that Dw is finite. That is, there exists positive integer n0 such that the sequence Rn0 ⊂ Rn0 +1 ⊂ Rn0 +2 ⊂ · · · never goes in the w-direction. By replacing n0 by zero, we may assume that the sequence {(Rn , mn )}n≥0 never goes in the w-direction. That is, v(wn ) 6= min{v(xn ), v(yn ), . . . , v(wn ), . . . , v(zn )} for every integer n ≥ 0. From Equation 6, we have v(w) = v(wn ) + En and [ + · · · + v(z) = v(xn ) + v(yn ) + · · · + v(w \ v(x) + v(y) + · · · + v(w) n ) + · · · + v(zn ) + (d − 2)En . By assumption, we have v(w) = lim En n→∞ [ + · · · + v(z) = (d − 2) lim En . and v(x) + v(y) + · · · + v(w) n→∞ [ + · · · + v(z) = (d − 2)v(w), Using both equalties, we have v(x) + v(y) + · · · + v(w) which is a contradiction, since v(x), v(y), . . . , v(z) are rationally independent. WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 24 (b) ⇒ (c): By item (1), we have s := P∞ i=0 v(mi ) is finite. Hence lim v(mn ) = n→∞ lim En+1 − lim En = 0. Fix w ∈ ∆(m0 ), we have v(wn ) = v(mn ) for every n such n→∞ n→∞ that the transform from Rn to Rn+1 is in the w-direction. By assumption, Dw = ∞, and hence lim v(wn ) = lim v(mn ) = 0 n→∞  n→∞ Proposition 7.3. Assume the notation of Setting 7.1. Then we have the following: (1) If V is a DVR, then s = ∞, and ∪n≥0 Rn = V . (2) If s = ∞, then the sequence {Rn }n≥0 switches strongly infinitely often. (3) If V has rational rank r ≥ 2, then s < ∞. Thus if s = ∞, then V has rational rank r = 1. (4) If V has rational rank 1 and V is not a DVR, then both s = ∞ and s < ∞ are possible. Proof. If V is discrete, we may assume the value group of V is Z, and hence v(mn ) ≥ 1 for all n ≥ 0. Thus item 1 is clear. Item 2 is proved by Granja, Martinez and Rodriguez in [GMR, Proposition 23]. To see Item 3, assume that V has rational rank r ≥ 2 and suppose by way of contradiction that s = ∞. By Item 2, the sequence switches strongly infinitely often. By Remark 5.1.4, there is some n > 0 and elements x, y that are part of some regular system of parameters for Rn such that v(x), v(y) are rationally independent. By replacing R by Rn , we may assume that there are elements x, y in some regular system of parameters for R such that v(x), v(y) are rationally independent. We show that s ≤ v(x) + v(y) by inductively proving that for all n ≥ 0, there are elements xn , yn of some regular system of parameters for Rn such that v(xn ), v(yn ) P  n−1 are rationally independent and i=0 v(mi ) + v(xn ) + v(yn ) ≤ v(x) + v(y). Taking x0 = x and y0 = y, the base case n = 0 is clear. Assume the claim is true for n. Thus we have elements xn , yn ∈ mn such that v(xn ), v(yn ) are rationally independent and ! n−1 X v(mi ) + v(xn ) + v(yn ) ≤ v(x) + v(y). (7) i=0 Let z ∈ mn denote an element of minimal v-value. Then v(z) and at least one of v(xn ), v(yn ) are rationally independent, so we may assume without loss of generality that v(z), v(yn ) are rationally independent. Thus z, yn are part of a regular system of parameters for Rn . Set xn+1 = z and yn+1 = yn z , so v(xn+1 ), v(yn+1 ) are rationally DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 25 independent, and v(yn+1 ) = v(yn ) − v(z). We have v(mn ) = v(z) ≤ v(xn ). Thus, ! ! n−1 n X X v(mi ) + v(z) + v(z) + v(yn ) − v(z) v(mi ) + v(xn+1 ) + v(yn+1 ) = i=0 ≤ i=0 n−1 X i=0 ! v(mi ) + v(xn ) + v(yn ) ≤ v(x) + v(y) where the last inequality follows from Equation 7. We conclude that s < ∞, in contradiction to the assumption that s = ∞. This proves Item 3. Example 6.3 shows that s < ∞ is possible in the case where the rational rank of V 1 1 + 16 )+. . ., is 1 and V is not a DVR. The pattern gives s = (1+ 12 + 41 + 41 )+( 14 + 18 + 16 P∞ 1 P∞ 1 so s = n=0 2n + 2 n=1 4n = 38 . To complete the proof of item 4, we show in Examples 7.11 and 7.12 that s = ∞ is possible in the case where the rational rank S of T = n≥0 An is 1 and T is not a DVR.  Setting 7.4. Let (R, m) be a d-dimensional regular local ring with d ≥ 2, and with R := R0 , let {(Rn , mn )}n≥0 be an infinite sequence of local quadratic transforms with dim Rn = dim R for all n. Let yn ∈ ∆(mn ) be such that the transform from S Rn to Rn+1 is in the yn -direction. Let S := n≥0 Rn . It is well known that S is a S normal local domain with unique maximal ideal mS := n≥0 mn . Assume that for some nonnegative integer j there exists a regular prime element x in Rj such that S ⊂ (Rj )xRj . In considering properties of the directed union, we may assume the sequence starts at Rj . Thus with a change of notation, we assume that j = 0. Let P := xRxR ∩ S and let T := S/P and mT := mS /P . For each n ≥ 0, let xn be the S transform of x in Rn . Then P = n≥0 xn Rn . For each n ≥ 0, let mn Rn and nn := . x n Rn x n Rn Each (An , nn ) is a (d − 1)-dimensional regular local ring. Moreover {(An , nn )}n≥0 is S an infinite sequence of local quadratic transforms. Hence T = n≥0 An is a normal S local domain with maximal ideal mT = n≥0 nn . Let νx be the x-adic valuation An := associated with the valuation domain RxR . For an element g ∈ S, let g denote the image of g in T . Theorem 7.5. Let notation be as in Setting 7.4. The following are equivalent. (1) The sequence {(Rn , mn )}n≥0 is height one directed. WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 26 (2) S is a valuation domain. (3) T is a rank one valuation domain with associated real valuation ν such that P n≥0 ν(nn ) = ∞. (4) The sequence {(An , nn )}n≥0 switches strongly infinitely often, and for the P associated real valuation ν we have n≥0 ν(nn ) = ∞. Proof. (1) ⇒ (2): This is proved by Granja in [Gr, Theorem 13]. (2) ⇒ (1): By [Gr, Proposition 7], the valuation domain S has rank either 1 or 2. By assumption, the sequence {(Rn , mn )}n≥0 does not switch strongly infinitely often. Hence by [Gr, Theorem 13], the sequence {(Rn , mn )}n≥0 is height one directed and S has rank 2. (2) ⇒ (3): Assume that S is a valuation domain. Then T = S/P is a valuation domain of the field RxR /xRxR . Since P is a nonzero nonmaximal prime ideal in S P and dim S = 2, we have dim T = 1. It remains to show that s := n≥0 ν(nn ) = ∞. Suppose by way of contradiction that s < ∞. Let z ∈ ∆(m0 ) be such that νx (z) = 0, (that is zR 6= xR). By the Archimedean property, there exists an integer N > 0 such that N ν(z) > s. Consider the following element f := x − z N . For simplicity of notation, we set g := z N . Then ν(g) = ν(z N ) > s. For each n ≥ 0, let fn be the transform f in Rn . Let νf be the f -adic valuation associated with the valuation domain Rf R . To see S ⊂ Rf R , we prove by induction on n the following claim; Claim 7.6. For every integer n ≥ 0, there exists gn ∈ Rn such that fn = xn − gn , where νf (fn ) = 1, νf (gn ) = 0 and ν(gn ) > ∞ X ν(ni ). i=n Proof. The case where n = 0 is clear by construction. Assume that the claim holds for n. Since the transform from Rn to Rn+1 is in the yn -direction, we have fn xn gn gn fn+1 = = − = xn+1 − . yn yn yn yn gn We set gn+1 := yn . Then we have νf (gn+1 ) = νf (gn ) − νf (yn ) = 0 and ∞ ∞ g  X X n ν(gn+1 ) = ν = ν(gn ) − ν(yn ) > ν(ni ). ν(ni ) − ν(nn ) = yn i=n i=n+1  DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 27 By Claim 7.6, we have Rn ⊂ Rf R for each positive integer n. Hence S ⊂ Rf R . Since RxR 6= Rf R , this contradicts the fact that the sequence {(Rn , mn )}n≥0 is height one directed. (3) ⇒ (2): Assume that T is a rank one valuation domain with associated real P valuation ν such that n≥0 ν(nn ) = ∞. Let W be the composite valuation domain defined by the valuations ν and νx . Thus W = {α ∈ Q(R) | νx (α) > 0 or νx (α) = 0 and ν(e α) ≥ 0}, where α e denotes the image of α in RxR /xRxR . We have S ⊂ W ⊂ RxR . We prove the following claim : Claim 7.7. W ⊂ S. Proof. Let α ∈ W . Then α = xt hg ,where g, h ∈ R \ xR are relatively prime in R and t = νx (α) ≥ 0. We consider two cases (Case i): Assume that t = νx (α) = 0. Since α ∈ W , we have ν(e α) ≥ 0. Let r0 := min{ ordR0 (g), ordR0 (h) }. If r0 = 0, then at least one of g or h is a unit in R. If h is a unit in R then α ∈ R ⊂ S. If g is a unit in R, then ν(e g ) = 0. Since ν(e α) = ν(e g ) − ν(e h) ≥ 0, we must also have ν(e h) = 0, and α ∈ R. Assume that r0 > 0 and set g0 := g and h0 := h. Since the transform from R = R0 to R1 is in the y = y0 -direction there exist elements g1 and h1 in R1 such that g = y r0 g1 and h = y r0 h1 . Then α = g1 h1 . Notice that the ideal (g1 , h1 )R1 is the transform in R1 of the ideal (g, h)R. Let r1 := min{ ordR1 (g1 ), ordR1 (h1 ) }. If r1 = 0, then α ∈ R1 . If r1 > 0, then since the transform from R1 to R2 is in the y1 -direction there exist elements g2 and h2 in R2 such that g1 = y1r1 g2 and h1 = y1r1 h2 . Then α = g1 h1 = g2 h2 . The ideal (g2 , h2 )R2 is the transform in R2 of the ideal (g1 , h1 )R1 and also the transform of the ideal (g, h)R. Suppose the transform of (g, h)R in Rn is a proper ideal in Rn for every integer n ≥ 0. Then rn := min{ ordRn (gn ), ordRn (hn ) } is positive for all n ≥ 0. This gives infinite sequences {gn+1 }n≥0 , {hn+1 }n≥0 such that gn+1 , hn+1 ∈ Rn+1 \ xn+1 Rn+1 , where gn = ynrn gn+1 and hn = ynrn hn+1 . Then for every integer n ≥ 0 we have ν(gg yn ) = ν(gen ) − rn ν(nn ) ≤ ν(gen ) − ν(nn ), n+1 ) = ν(gen ) − rn ν(f f fn ) − rn ν(nn ) ≤ ν(h fn ) − ν(nn ). ν(h] yn ) = ν(h n+1 ) = ν(hn ) − rn ν(f WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 28 Hence for every integer n ≥ 1 we have ν(gen ) ≤ ν(ge0 ) − By taking limits, we have lim ν(gen ) ≤ ν(ge0 ) − n→∞ Since P∞ i=0 ν(ni ) n−1 X i=0 fn ) ≤ ν(f ν(ni ) and ν(h h0 ) − ∞ X ν(ni ) and i=0 n−1 X ν(ni ). i=0 fn ) ≤ ν(f lim ν(h h0 ) − n→∞ ∞ X ν(ni ) i=0 = ∞, this is a contradiction. Hence rn = min{ ordRn (gn ), ordRn (hn ) } = 0 for some integer n ≥ 0. Then either gn is a unit in Rn or hn is a unit in Rn . If hn is a unit in Rn , then α ∈ Rn , and hence α ∈ S. If gn is a unit in Rn , then ν(gen ) = 0. fn ) ≥ 0, we must also have ν(h fn ) = 0, and α ∈ R. Since ν(e α) = ν(gen ) − ν(h (Case ii): Assume that t = νx (α) > 0. Let β0 := hg . If ν(βe0 ) ≥ 0, then by Case i, β0 ∈ S and hence xt β0 = α ∈ S. If ν(βe0 ) < 0, let β1 := y0t β0 . Then α = xt β0 = xt1 y t β0 = xt1 β1 . If ν(βe1 ) ≥ 0, then by (Case i), β1 ∈ S and hence xt1 β1 = α ∈ S. If ν(βe1 ) < 0, let β2 := y1t β1 . Then α = xt1 β1 = xt2 y1t β1 = xt2 β2 β2 = y1t y0t β0 and For each positive integer n, we define βn+1 = ynt βn . It follows that α = xtn βn = xtn+1 ynt βn = xtn+1 βn+1 and βn+1 = (yn yn−1 · · · y0 )t β0 . Thus we have ν(β] n+1 ) = t Since P∞ i=0 ν(ni ) n X i=0 n  X  ν(yei ) + ν(βf ) = t ν(n ) + ν(βe0 ). 0 i i=0 fn ) ≥ 0 for all sufficiently large integers n. Then = ∞, we have ν(β by Case i, we have βn ∈ S and hence xtn βn = α ∈ S. This completes the proof of Claim 7.7.  Hence by Claim 7.7 we have S = W , and we conclude that S is a valuation domain. (3) ⇔ (4): This equivalence follows from Shannon([S, Proposition 4.18]) and Granja([Gr, Theorem 13]).  Remark 7.8. Let (R0 , m0 ) be a d-dimensional regular local ring with d ≥ 2, and let {(Rn , mn )}n≥0 be an infinite sequence of local quadratic transforms with S dim Rn = dim R0 for all n. Assume that S := n≥0 Rn is a valuation domain of rank greater than one. If R0 is excellent and equicharacteristic zero, Granja proves DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 29 in [Gr, Theorem 17] that there exists for some nonnegative integer j a regular prime x in Rj such that S ⊂ (Rj )xRj . Remark 7.9. Let notation be as in Setting 7.4. Assume that S is a valuation domain. Let G be the value group of a valuation v associated with S. and let H be the value group of a valuation ν associated with T . Then we have the following : (1) S has rational rank 2 and G ∼ = Z ⊕ H. (2) T has rational rank 1. (3) If T is DVR, then G ∼ = Z2 . Proof. To see item 1, by Granja [Gr, Proposition 14], the valuation domain S has rational rank 2. By [ZS2, Theorem 15, page 40] the set GP := { ±v(α) | α ∈ S \ P } is an isolated subgroup of G, (that is, GP is a segment and a proper subgroup of G). By [ZS2, Theorem 17, page 43] the group H and the group GP are isomorphic as ordered groups. Since SP = RxR is a DVR, the value group of SP is Z. Hence by [ZS2, Theorem 17, page 43] the groups G/GP and Z are order isomorphic. It  follows that G ∼ = Z ⊕ H. Items 2 and 3 follow from item 1. = Z ⊕ GP ∼ Remark 7.10. Let notation be as in Setting 7.4. S (1) If d = 3, then T = n≥0 An is a valuation domain by [A, Lemma 12]. (2) Let T be as in Setting 7.4. If T is a rank one valution domain and s = P∞ i≥0 ν(ni ) < ∞, then there exist infinitely many choices for the positive integer N and hence infinitely many nonassociate regular prime elements f = x − z N in R such that S ⊂ Rf R . Let Q = S ∩ f Rf R . Then S/Q is an infinite directed union of d − 1-dimensional regular local domains. If d = 3, then by item 1, each of the infinitely many S/Q is a valuation domain. In Example 7.11 we construct an infinite directed sequence {(Rn , mn )}n≥0 of local quadratic transforms of a 3-dimensional regular local ring R = R0 such that S S = n≥0 Rn is a rank 2 valuation domain with value group Z ⊕ H, where H is rational rank 1 but not discrete. Example 7.11. Let (R0 , m0 ) be a 3-dimensional regular local ring, and let m0 = (x, y, z)R0 . We define a sequence {(Rn , mn )}n≥0 of local quadratic transforms of R0 as follows. The sequence from R0 to R3 is y z y′ R := R0 ⊂ R1 ⊂ R2 ⊂ R3 30 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER defined as m R1 = R0 [ ]( xy ,y, yz ) and m1 = (x1 , y1 , z1 )R1 y x1 y 1 m1 m2 = (x2 , y2 , z2 )R2 = ( , , z1 )R2 R2 = R1 [ ]( x1 , y1 ,z1 ) and z1 z1 z1 z1 z1 m2 x2 z2 R3 = R2 [ ]( x2 ,y2 , z2 −1) and m3 = (x3 , y3 , z3 )R3 = ( , y2 , − 1)R3 y2 y2 y2 y2 y2 Starting from (R3 , m3 ) and m3 = (x3 , y3 , z3 )R3 , we define a sequence y y z y′ R3 ⊂ R4 ⊂ R5 ⊂ R6 ⊂ R7 of local quadratic transform with respect to the regular system of parameters x3 , y3 , z3 of m3 such that the 21 transforms from R3 to R5 are both monomial in the ydirection, the transform from R5 to R6 is monomial in the z-direction, and the transform from R6 to R7 is defined in a manner similar to that from R2 to R3 . Thus we have m7 = (x7 , y7 , z7 )R7 = x 6 y6 , y6 ,   x y3 z2  z6 3 3 3 − 1 R7 = , , − 1 R7 . y6 y33 z3 y35 Let t0 := 0 and t1 := 3. For each integer n ≥ 2, let tn = 2tn−1 − tn−2 + 2n−2 . We inductively define a sequence of local quadratic transforms with respect to the regular system of parameters xtn , ytn , ztn of mtn as follows: 2n times }| { z y y y y′ z Rtn ⊂ Rtn +1 ⊂ · · · ⊂ Rtn +2n ⊂ Rtn +2n +1 ⊂ Rtn +2n +2 , The 2n transforms from Rtn to Rtn +2n are all monomial in the y-direction, the transform from Rtn +2n to Rtn +2n +1 is monomial in the z-direction, and the transform from Rtn +2n +1 to Rtn +2n +2 is defined in a manner similar to that from R6 to R7 . Thus we have 2n times z }| { x ztn  y y tn mtn = (xtn , ytn , ztn )Rtn → · · · → mtn +2n = , y , n n Rtn +2n t n yt2n yt2n n x yt2n +1 ztn  z tn n → mtn +2 +1 = , , 2n Rtn +2n +1 ztn ztn ytn n  x  yt2n +1 zt2n y′ tn , → mtn +2n +2 = − 1 Rtn +2n +2 , n 2(2n )+1 ztn yt2n +1 ytn S S Let S := n≥0 Rn and mS := n≥0 mn . Since we never divide in the x-direction, we have S ⊂ RxR . Let P := xRxR ∩ S and let T := S/P and mT := mS /P . For each DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS n ≥ 0, let xn be the transform of x in Rn . Then P = let An := Rn x n Rn and nn := S n≥0 xn Rn . 31 For each n ≥ 0, mn . x n Rn Each (An , nn ) is a 2-dimensional regular local ring with maximal ideal nn generated by the images of yn and zn in An . By identifying yn and zn with their images in An , we have nn = (yn , zn )An . Moreover {(An , nn )}n≥0 is an infinite sequence of local quadratic transforms of (A0 , n0 ), where n0 := (y, z)A0 . By [A, Lemma 12], the ring S S T = n≥0 An is a valuation domain with maximal ideal mT = n≥0 nn . Let ν be a valuation associated with the valuation domain T . The sequence {(An , nn )}n≥0 is determined by the sequence {(Rn , mn )}n≥0 . With the integers tn as defined in the construction of the sequence {(Rn , mn )}n≥0 , we have 2n times z }| { y y y y′ z Atn ⊂ Atn +1 ⊂ · · · ⊂ Atn +2n ⊂ Atn +2n +1 ⊂ Atn +2n +2 , The 2n transforms from Atn to Atn +2n are all monomial in the y-direction, the transform from Atn +2n to Atn +2n +1 is monomial in the z-direction, and we have 2n times ntn Since z }| {  zt  y y = (ytn , ztn )Atn → · · · → ntn +2n = ytn , 2nn Atn +2n ytn n  y 2 +1 z  z t → ntn +2n +1 = tn , 2nn Atn +2n +1 ztn ytn n +1 2   y z2 y′ → ntn +2n +2 = tn , 2(2tnn)+1 − 1 Atn +2n +2 ztn ytn ztn +2n +1 ytn +2n +1 = zt2n 2(2n )+1 yt n ∈ Atn +2n +2 \ ntn +2n +2 , we have ν(ztn ) = 2(2n )+1 ν(ytn ). 2 Assume that ν(y) = 1. Then we have: s := ∞ X i=0 ν(ni ) = 1 + 1 1 1 1 1 1 1 1 1 1 + +{ + }+ + +{ + + + } 2 2 2 2 4 4 4 4 4 4 z 23 times }| { z 24 times }| { 1 1 1 1 1 1 1 1 1 1 +{ + + · · · + } + · · · = ∞. + + + { + + ··· + }+ + 8 8 8 8 8 16 16 16 16 16 By Theorem 7.5, the ring S is the valuation domain, the sequence {(Rn , mn )}n≥0 is height one directed, and S has rank 2. Let G be the value group of S and let H be the value group of T . By Remark 7.9, S has rational rank 2 and G ∼ = Z ⊕H. Clearly, T has rational rank 1, and T is not a DVR. 32 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER In Example 7.12 we construct an example similar to that of Example 7.11, but with dim R = 4 and dim A = 3. Example 7.12. Let (R0 , m0 ) be a 4-dimensional regular local ring, and let m0 = (x, y, z, w)R0 . We define a sequence {(Rn , mn )}n≥0 of local quadratic transforms of R0 as follows: The sequence from R0 to R5 is y y z y′ w R := R0 ⊂ R1 ⊂ R2 ⊂ R3 ⊂ R4 ⊂ R5 defined by m m1 = (x1 , y1 , z1 , w1 )R1 R1 = R0 [ ]( xy ,y, yz , wy ) and y m1 R2 = R1 [ ]( x1 ,y1 , z1 , w1 ) and m2 = (x2 , y2 , z2 , w2 )R2 y1 y1 y1 y1 m2 R3 = R2 [ ]( x2 , y2 ,z2 , w2 ) and m3 = (x3 , y3 , z3 , w3 )R3 z2 z2 z2 z2 m3 R4 = R3 [ ]( x3 , y3 , z3 ,w3 ) and m4 = (x4 , y4 , z4 , w4 )R4 w3 w3 w3 w3 m4 m5 = (x5 , y5 , z5 , w5 )R5 R5 = R4 [ ]( x4 ,y4 , z4 −1, w4 −1) and y4 y4 y4 y4 x   x y3 z2  z4 w4 w2 4 = , y4 , − 1, − 1 R5 = , , − 1, − 1 R5 y4 y4 y4 y3 w y5 y3z Starting from (R5 , m5 ) and m5 = (x5 , y5 , z5 , w5 )R5 , we define a sequence y y y y z w y′ R5 ⊂ R6 ⊂ R7 ⊂ R8 ⊂ R9 ⊂ R10 ⊂ R11 ⊂ R12 of local quadratic transform with respect to the regular system of parameters x5 , y5 , z5 , w5 of m5 such that the 22 transforms from R5 to R9 are all monomial in the y-direction, the transform from R9 to R10 is monomial in the z-direction, the transform from R10 to R11 is monomial in the w-direction, and the transform from R11 to R12 is defined in a manner similar to that from R4 to R5 Thus we have  x y5 z2  x z11 w11  w52 5 11 5 5 , y11 , −1, −1 R12 = , , −1, −1 R12 . m12 = (x12 , y12 , z12 , w12 )R12 = y11 y11 y11 y55 w5 y59 y55 z5 Let t0 := 0, t1 := 5, and t2 := 12 = 2t1 − t0 + 2. For each n ≥ 3, we let tn := 2tn−1 − tn−2 + 3 · 22(n−2) . We inductively define a sequence of local quadratic transforms with respect to the fixed regular system of parameters xtn , ytn , ztn , wtn of mtn as follows: 22n times }| { z y y y y′ z w Rtn ⊂ Rtn +1 ⊂ · · · ⊂ Rtn +22n ⊂ Rtn +22n +1 ⊂ Rtn +22n +2 ⊂ Rtn +22n +3 The 22n transforms rom Rtn to Rtn +22n are all monomial in the y-direction, the transform from Rtn +22n to Rtn +22n +1 is monomial in the z-direction, the transform DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 33 from Rtn +22n +1 to Rtn +22n +2 is monomial in the w-direction, and the transform from Rtn +22n +2 to Rtn +22n +3 is defined in a manner similar to that from R4 to R5 . Thus with mtn = (xtn , ytn , ztn , wtn )Rtn , we have 22n times z }| { x ztn wtn  y y tn , y , mtn → · · · → mtn +22n = t 2n 2n , 2n Rtn +22n n yt2n yt2n yt2n 2n x yt2n +1 ztn wtn  z tn → mtn +22n +1 = , , 22n , Rtn +22n +1 ztn ztn ztn ytn x y 2 +1 z2 wtn  → mtn +22n +2 = , tn , 22ntn , Rtn +22n +2 wtn wtn ytn wtn ztn 2n   x yt2n +1 wt2n zt2n y′ tn − 1, − 1 Rtn +22n +3 , → mtn +22n +3 = , 2n 2n 2(22n )+1 wtn yt2n +1 yt2n +1 ztn ytn S S Let S := n≥0 Rn and mS := n≥0 mn . Since we never divide in the x-direction, we w 2n tn have S ⊂ RxR . Let P := xRxR ∩ S and let T := S/P and mT := mS /P . For each S n ≥ 0, let xn be the transform of x in Rn . Then P = n≥0 xn Rn . For each n ≥ 0, let An := Rn xn Rn mn xn Rn . and nn := Each (An , nn ) is a 3-dimensional regular local ring with maximal ideal nn generated by images of yn , zn and wn in An . By identifying yn , zn and wn with their images in An , we have nn = (yn , zn , wn )An . Moreover {(An , nn )}n≥0 is an infinite sequence of local quadratic transforms of (A0 , n0 ), where S n0 := (y, z, w)A0 . Then T = n≥0 An is a normal local domain with maximal S ideal mT = n≥0 nn . The sequence {(An , nn )}n≥0 is determined by the sequence {(Rn , mn )}n≥0 . Thus the local quadratic transforms from A0 to A5 are: y y z w y′ A0 ⊂ A1 ⊂ A2 ⊂ A3 ⊂ A4 ⊂ A5 where  z   y3 z2  w4 w2 4 n5 = (y5 , z5 , w5 )A5 = y4 , − 1, − 1 A5 = , 5 − 1, 3 − 1 A5 y4 y4 w y y z Let W be a valuation domain birationally dominating T and let ω be a valuation associated with W . Since z4 y4 = z2 y5 and w4 y4 = w2 y3 z are in A5 \n5 , we have ω(z) = 25 ω(y) and ω(w) = 32 ω(y) + 12 ω(z). The transforms from A5 to A12 are: y y y y z w y′ A5 ⊂ A6 ⊂ A7 ⊂ A8 ⊂ A9 ⊂ A10 ⊂ A11 ⊂ A12 where     y5 z2 w2 z11 w11 5 n12 = (y12 , z12 , w12 )A12 = y11 , − 1, − 1 A12 = , 59 − 1, 5 5 − 1 A12 . y11 y11 w5 y5 y5 z5 WILLIAM HEINZER, MEE-KYOUNG KIM1 , AND MATTHEW TOENISKOETTER 34 Since z12 y12 ω(w5 ) = z52 y59 = and w11 y11 1 5 2 ω(y5 ) + 2 ω(z5 ). = y52 y55 z5 are in A12 \ n12 , we have ω(z5 ) = 9 2 ω(y5 ) and With the integers tn as defined in the construction of the sequence {(Rn , mn )}n≥0 , we have 22n times z }| { y y y y′ z w Atn ⊂ Atn +1 ⊂ · · · ⊂ Atn +22n ⊂ Atn +22n +1 ⊂ Atn +22n +2 ⊂ Atn +22n +3 . The 22n transforms from Atn to Atn +22n are all monomial in the y-direction, the transform from Atn +22n to Atn +22n +1 is monomial in the z-direction, the transform from Atn +22n +1 to Atn +22n +2 is monomial in the w-direction, and with ntn = (ytn , ztn , wtn )Rtn , we have 22n times z }| {  ztn wtn  y y ntn → · · · → ntn +22n = ytn , 22n , 22n Atn +22n ytn ytn 2n  y 2 +1 z wtn  z tn , 22n , Atn +22n +1 → ntn +22n +1 = tn ztn ztn ytn  y 22n +1 z2 wtn  w → ntn +22n +2 = tn , 22ntn , Atn +22n +2 wtn ytn wtn ztn  y 22n +1  wt2n zt2n y′ → ntn +22n +3 = tn − 1, − 1 Atn +22n +3 , 2(22n 2n )+1 wtn yt2n +1 ztn ytn Since zt2n 2(22n )+1 yt n and ω(wtn ) = and wt2n 22n +1 zt n yt n 22n +1 2 ω(ytn ) in Atn +22n +3 \ntn +22n +3 , we have ω(ztn ) = 2(22n )+1 ω(ytn ) 2 + 12 ω(ztn ). Assume that ω(y) = 1. Then we have 22·1 times }| { z ∞ n1 X 1 n1 1o n1 1 1 1o 1 1o ω(ni ) = 1 + 1 + + 2 + 2 + 2 + 2 + 2 + 2 + 3 + 4 + 4 s:= 2 2 2 2 2 2 2 2 2 2 i=0 22·2 times 22·3 times z }| { }| { z n1 n 1 1o 1 1o n1 1 1o 1 1 + 4 + 4 + · · · + 4 + 5 + 6 + 6 + 6 + 6 + · · · + 6 + 7 + · · · = ∞. 2 2 2 2 2 2 2 2 2 2 By Proposition 7.3, the sequence {(An , nn )}n≥0 switches strongly infinitely often. S Hence by Remark 3.3, the ring T = n≥0 An is a valuation domain and T has rank 1. Notice that T = W . By Theorem 7.5, the ring S is a valuation domain, the sequence {(Rn , mn )}n≥0 is height one directed, and S has rank 2. Let G be the value group of S and H be the value group of T . By Remark 7.9, the ring S has rational rank 2 and G ∼ = Z ⊕H. Clearly, T has rational rank 1, and T is not a DVR. DIRECTED UNIONS OF LOCAL QUADRATIC TRANSFORMS 35 References [A] S.S. Abhyankar, On the valuations centered in a local domain, Amer. J. Math. 78 (1956) 321-348. [GR] A. Granja and C. Rodrı́guez, Proximity relations for real rank one valuations dominating a local regular ring, Rev. Mat. Iberoamericana 19 (2003), no. 2, 393-412. [Gr] A. Granja, Valuations determined by quadratic transforms for a regular ring, J. Algebra, 280 (2004), 699-718. [GMR] A. Granja, M.C. Martı́nez, and C. Rodrı́guez, Valuation dominating regular local rings and proximity relations, J. of Pure and Algebra, 209 (2007), 371-382. [HKT] W. Heinzer, M.-K. Kim, and M. Toeniskoetter, Finitely supported *-simple complete ideals in a regular local ring , J. Algebra, 401 (2014), 76-106 [HRW] W. Heinzer, C. Rotthaus and S. Wiegand, Examples Using Power Series Over Noetherian Integral Domains, to appear. [HubS] R. Hübl and I. Swanson, Adjoints of ideals, Michigan Math. J., 57 (2008), 447-462. [KS] K. Kiyek and J. Stückrad, Integral closure of monomial ideals on regular sequences , Rev. Mat. Iberoamericana, 19 (2003), 483-508. [L] J. Lipman, On complete ideals in regular local rings, Algebraic Geometry and Commutative Algebra in Honor of Masayoshi Nagata, (1986), 203-231. [M] H. Matsumura, Commutative Ring Theory, Cambridge Univ. Press, Cambridge, 1986. [N] M. Nagata, Local Rings, Interscience, New York, 1962. [S] D. Shannon, Monoidal transforms of regular local rings, Amer. J. Math. 95 (1973), 294-320. [SH] I. Swanson and C. Huneke, Integral Closure of Ideals, Rings, and Modules, London Math. Soc. Lecture Note Series 336, Cambridge Univ. Press, Cambridge, 2006. [ZS2] O. Zariski and P. Samuel,Commutative Algebra, Vol. 2, D. Van Nostrand, New York, 1960. Department of Mathematics, Purdue University, West Lafayette, Indiana 47907 U.S.A. E-mail address: [email protected] Department of Mathematics, Sungkyunkwan University, Jangangu Suwon 440-746, Korea E-mail address: [email protected] Department of Mathematics, Purdue University, West Lafayette, Indiana 47907 U.S.A. E-mail address: [email protected]
0math.AC
1 The Importance of System-Level Information in Multiagent Systems Design: Cardinality and Covering Problems arXiv:1710.07460v1 [cs.GT] 20 Oct 2017 Dario Paccagnan1 and Jason R. Marden2 Abstract A fundamental challenge in multiagent systems is to design local control algorithms to ensure a desirable collective behaviour. The information available to the agents, gathered either through communication or sensing, naturally restricts the achievable performance. Hence, it is fundamental to identify what piece of information is valuable and can be exploited to design control laws with enhanced performance guarantees. This paper studies the case when such information is uncertain or inaccessible for a class of submodular resource allocation problems termed covering problems. In the first part of this work we pinpoint a fundamental risk-reward tradeoff faced by the system operator when conditioning the control design on a valuable but uncertain piece of information, which we refer to as the cardinality, that represents the maximum number of agents that can simultaneously select any given resource. Building on this analysis, we propose a distributed algorithm that allows agents to learn the cardinality while adjusting their behaviour over time. This algorithm is proved to perform on par or better to the optimal design obtained when the exact cardinality is known a priori. S I. I NTRODUCTION EVERAL social and engineering systems can be thought of as a collection of multiple subsystems or agents, each taking local decisions in response to available information. A central goal in this field is to design control algorithms for the individual subsystems to ensure that the collective behaviour is desirable with respect to a global objective. Achieving this goal is particularly challenging because of the restriction on the information available to each agent and to the large scale of typical systems. Examples include, but are not limited to, power grid networks [2], charging of electric vehicles [3], transportation network [4], task assignment problems [5], sensor allocation [6], robotic networks [7]. A considerable bulk of the research has focused on This research was supported by SNSF Grant #P1EZP2-172122 and by AFOSR Grant #FA9550-12-1-0359, ONR Grant #N00014-15-1-2762, NSF Grant #ECCS-1351866. 1 D. Paccagnan is with the Department of Electrical and Computer Engineering, University of California, Santa Barbara, USA and with the Automatic Control Laboratory, Swiss Federal Institute of Technology, Zurich, Switzerland. Email: [email protected]. 2 J. R. Marden is with the Department of Electrical and Computer Engineering, University of California, Santa Barbara, USA. Email: [email protected]. A much abbreviated conference version of this work appeared in [1]. October 23, 2017 DRAFT 2 the design of local control algorithms in a framework where the information at agents’ disposal is itself a fixed datum of the problem. A non exhaustive list includes [8], [9] and references therein. Understanding the impact of information availability on the achievable performances is a seemingly important but less tracked problem [10], [11], [12]. Of particular interest is to recognise what supplementary piece of information could coordinate the agents to improve the system performance, and further how to incorporate this additional knowledge into a control algorithm. It is important to highlight that providing each agent with all the information available to the system is in principle beneficial, but not necessarily desirable. Indeed, the communication costs associated with propagating additional information through the system might overcome the performance gains that the knowledge of additional information gives. Therefore, the previous question has to be understood within this context. Ideally, one is interested in a piece of information that gives a significant performance enhancement, and is simple to obtain. Loosely speaking, we measure the value of an additional piece of information with the performance gain that the best controller can offer, using that supplementary piece of information. Relative to the class of resource allocation problems termed covering problems, [11], [13] show that the maximum number of agents that can simultaneously select a resource (which we term cardinality, see Equation (1) for a formal definition) constitutes a valuable piece of information. More precisely, when the system operator is aware of the cardinality of the problem, he can devise distributed algorithms with improved performance guarantees. Nevertheless, the knowledge of the exact cardinality is in many applications uncertain, not available or may require excessive communication to be determined. Following this observation, a system operator would like to understand how to operate when the knowledge of the exact cardinality is not available. What is the risk associated with using the wrong cardinality in the control design? What is the reward for using the correct one? Further and more fundamental: when the cardinality is not available at all, can the agents learn it while simultaneously adjusting their behaviour? The paper proceeds by considering covering problems [14], [15], a class of resource allocation problems where agents are assigned to resources in order to maximise the total value of covered items. Examples include vehicle-target assignment problems [16], sensor allocation [6], task assignment [17], among others. Due to the inherent limitations in sensing and communication, in all these applications the control algorithms are required to rely only on local information. Thus, we model distributed covering problems as strategic-form games, where the system operator has the ability to assign local objective functions to each agent. Indeed, as shown in [18], [10], Game Theory lends itself to analyse distributed systems where individual agents adjust their behaviour in response to partial information. Such game theoretic approach offers the possibility to build upon existing tools to quantify the system performance, as well as the opportunity to exploit readily available algorithms to compute equilibria in a distributed fashion [5], [13]. The October 23, 2017 DRAFT 3 overarching goal of the system operator is to design local utilities in order to render the equilibria of the game as efficient as possible. Agents can then be guided towards an equilibrium of such game by means of existing distributed algorithms [5], [19]. It is important to highlight that we are not modelling agents as competing units, but we are rather designing their utilities to achieve the global objective. Building on the previous results of [11], [13], we contribute as follows. i) We study the problem of optimally designing the utility functions in the case when the true cardinality is not known, but only an upper bound is available.1 We further perform a risk-reward analysis in the case when the information on the cardinality of the game is uncertain. When the goal is to guard the system against the worst case performances, the right choice is to design the utilities as if the true cardinality was the given upper bound. Different designs will offer potential benefits, but come with a certain degree of risk. These results are presented in Theorem 1. ii) Motivated by the potential advantages and inherent shortcomings presented in the riskreward analysis, we propose a distributed and asynchronous algorithm that dynamically updates the utility functions while agents adjust their behaviour over time. Such algorithm requires no initial information, and is certified to perform on par or better (in a worst case sense) to the optimal design possible, had we known the cardinality in the first place. These results are summarised in Theorem 2. iii) We compare, instance by instance, the performance of the proposed learning algorithm with the performance of the optimal design obtained with full knowledge of the cardinality. We show that it is not possible to deem one approach superior to the other on all instances of covering problems, in that there are instances where one outperforms the other, and the reverse too. These results are presented in Theorem 3. The remaining of the paper is organised as follows. The next section introduces the covering problem, its formulation as a strategic game and the metric used to measure the system-level performance. Section III studies the utility design problem when a sole upper bound on the cardinality is available and presents the risk-reward tradeoff associated with the use of uncertain information. Section IV shows the possibility of dynamically adjusting the utility functions to improve the performance. Numerical simulations and conclusions follow. Notation For any two positive integers p ≤ q, denote [p] = {1, ..., p} and [p, q] = {p, ..., q}; given (a , . . . , an ), denote a−i = (a1 , . . . , ai−1 , ai+1 , . . . , an ). We use N and R≥0 to denote the set of 1 natural numbers (excluding zero) and the set of non-negative real numbers, respectively. 1 A simple bound is given by the number of agents. October 23, 2017 DRAFT 4 II. D ISTRIBUTED COVERING VIA GAME THEORY In this section we present the covering problem and the associated covering game. We further define the performance metric used throughout the paper and recap previous results. A. Model Let us consider the problem of assigning a collection of agents N = {1, . . . , n} to a finite set of resources R = {r1 , . . . , rm } with the goal of maximising the value of covered resources. The feasible allocations for each agent i ∈ N are the elements of the action set ai ∈ Ai ⊆ 2R , while every resource r ∈ R is associated with a non-negative value vr ≥ 0. Observe that ai ⊆ R. The welfare of an allocation a = (a1 , . . . , an ) ∈ A1 × · · · × An is measured by the total value of covered resources X W (a) := vr , r : |a|r ≥1 where |a|r denotes the number of agents that choose resource r in allocation a. The covering problem C = {N, R, {Ai }i∈N , {vr }r∈R } consists in finding an optimal allocation, that is an assignment ao ∈ arg maxa∈A W (a).2 Given a covering problem C, we define its cardinality as the maximum number of players that can concurrently select the same resource, that is max |a|r . r∈R, a∈A (1) Instead of directly specifying a distributed algorithm, we shift the focus to the design of local utility functions for each agent, as proposed first for distributed welfare games by [22], [5] and successively by [11]. Within this framework, each agent i ∈ N is associated with a utility function of the form ui (ai , a−i ) := X vr ·f (|a|r ) . (2) r∈Ai The function f : [n] → R≥0 constitutes our design choice and is called distribution rule as it represents the fractional benefit an agent receives from each resource he selects. The advantages of using utilities of the form (2) are twofold. First, ui (ai , a−i ) is local as it depends only on the resources agent i selects, their value and the number of agents that selects the same resources. Second, (2) allows to construct a distribution rule irrespective of {Ai }i∈N and {vr }r∈R so that the final design is scalable and applies to different choices of the action sets and of the resource valuations . 2 Approximation algorithms for finding a near optimal solution to submodular optimization problems have been extensively studied in the literature [20], [21]. The focus of this literature is predominantly on centralized algorithms for finding near optimal allocations. In contrast, our focus is on distributed solutions where each decision-making entity has incomplete information about the system as a whole. October 23, 2017 DRAFT 5 Given a covering problem C and a distribution rule f : [n] → R≥0 , we consider the associated covering game G := {C, f } = {N, R, {Ai }i∈N , {vr }r∈R , f }, where Ai is the set of feasible allocations and the utility of agent i ∈ N is as in equation (2). We do not aim at designing f using information on the specific instance of covering problem at hand, as such information is often not available to the system designer. Our goal is rather to construct a distribution rule that behaves well for a large class of problems. Hence, we consider the set of covering problems for which the cardinality is smaller or equal to k ∈ N, k ≤ n. Given a distribution rule f : [k] → R≥0 , we define the set of associated games as Gfk := {G = {C, f } : max |a|r ≤ k} . r∈R, a∈A Our objective is to design f : [k] → R≥0 so that the efficiency of all the equilibria of games in Gfk is as high as possible. Note that for fixed f , any game G is potential [22]. Hence existence of equilibria is guaranteed and distributed algorithms, such as the best response scheme, converge to them [23]. Throughout the paper, we focus on pure Nash equilibria [24], which we will refer to in the following just as equilibria. Definition 1 (Pure Nash equilibrium). Given a game G, an allocation ae ∈ A is a pure Nash i i −i i i equilibrium iff ui (aie , a−i e ) ≥ u (a , ae ) for all deviations a ∈ A and for all players i ∈ N . In the following we use NE(G) to denote the set of Nash equilibria of G. For a given distribution rule, we evaluate the efficiency of the Nash equilibria of games in Gfk , adapting the concept of Price of Anarchy from [25] as   mina∈NE(G) W (a) PoA(f, k) := inf ≤ 1. maxa∈A W (a) G∈Gfk (3) In essence, the quantity PoA(f, k) bounds the inefficiency of the worst equilibrium (and thus of all equilibria) over games in Gfk , that is over games with distribution rule set to f and cardinality bounded by k.3 The higher the price of anarchy, the better the performance guarantees we can provide. B. Related Work and Performance Guarantees The problem of designing a distribution rule so as to maximise PoA(f, k) has been studied in [11] and [13]. Both works impose a natural constraint on the admissible f , requiring f (1) = 1 and f : [k] → R≥0 to be non-increasing. The optimal distribution rule is explicitly derived in 3 The quantity W (a) appearing in Equation (3) does depend on which game instance G we are considering, since the resource valuations do. Hence, a more formal notation would entail using W (a; G). In the interest of readability, we avoid the latter and simply use W (a) when no ambiguity arise. October 23, 2017 DRAFT 6 the former work, while the latter shows how PoA(f, k) is fully characterised by a single scalar quantity χ(f, k) defined in (4), measuring how fast the distribution rule f decreases. We intend to build upon these results, which are summarised in the following proposition. Given k and a distribution rule f , we define χ(f, k) := max {j · f (j) − f (j + 1), (k − 1) · f (k)} . j≤k−1 (4) Proposition 1 ([11], [13]). Consider a non-increasing distribution rule f : [k] → R≥0 , with f (1) = 1. i) The price of anarchy over the class Gfk is PoA(f, k) = 1 . χ 1 + (f, k) ii) The price of anarchy over the class Gfk is maximised for Pk−1 1 1 + i=j (k−1)(k−1)! i! ? fk (j) = (j − 1)! Pk−1 1 , 1 + i=1 i! (k−1)(k−1)! j ∈ [k] (5) with corresponding (6) χ(fk? , k) = (k − 1)·fk? (k) . iii) The optimal price of anarchy is a decreasing function of the cardinality k PoA(fk? , k) = 1 − 1 1 (k−1)(k−1)! + Pk−1 1 i=1 i! . (7) III. T HE CASE OF UNKNOWN CARDINALITY: A R ISK -R EWARD TRADEOFF When the cardinality k defining the class of games Gfk is known, Proposition 1 gives a conclusive answer on which distribution rule agents should choose to achieve the best worst case performance. In spite of that, the knowledge of the exact cardinality is in many applications not available or may require excessive communications between the agents to be determined. Motivated by this observation, we study in the following the problem of designing a distribution rule when the cardinality k defining the class of games Gfk is not known, but an upper bound k ≤ ku is available. Observe that a universal upper bound for such quantity can be easily computed as the number n of agents. Potentially tighter bounds can be derived for specific applications. Our objective is to design a distribution rule f : [ku ] → R≥0 with the best performance guarantees possible with the sole knowledge of ku . Once such a distribution rule has been designed, one can use existing distributed algorithms to find an equilibrium as discussed in the introduction. Two natural questions arise in this context: 1) How should we select the distribution rule? 2) What performance can we guarantee? October 23, 2017 DRAFT 7 We will show how selecting fk?u guards us against the worst case performance but will not guarantee the same efficiency of fk? , when k < ku . We will then present the potential benefits and risks associated with a more aggressive choice. These results motivate Section IV, where we will present a dynamic scheme that overcomes the difficulties encountered here, offering the same performances of fk? at no risk. A. Two alternative distributions A natural choice when an upper bound on the cardinality is available consists in designing the distribution rule exactly at the upper bound, that is using fk?u . A different choice might entail constructing a distribution rule where the entries [kd ] are designed as if the cardinality was kd < ku , while the remaining entries [kd + 1, ku ] are optimally filled. The latter suggestion is inspired by the observation that the optimal system level performance (measured by the price of anarchy) is a decreasing function of k as per (7). This distribution is denoted with fk0 d and is constructed fixing fk0 d (j) = fk?d (j) for j ∈ [kd ]. The tail entries corresponding to j ∈ [kd + 1, ku ] are chosen to mitigate the risk taken. Formally, for any 1 < kd < ku we define the distribution rule fk0 d : [ku ] → R≥0 as a solution of the following optimisation problem fk0 d ∈ arg max PoA(f, ku ) f ∈F s.t. f (j) = fk?d (j) (8) ∀j ∈ [kd ] , where F = {f : [ku ] → R≥0 with f (1) = 1, f (j + 1) ≤ f (j), ∀j ∈ [ku − 1]} is the set of admissible distributions. Note that we do not define fk0 d for kd = 1 or kd = ku as it would reduce in both cases to fk?u . Further observe that the constraint fk0 d (j) = fk?d (j), ∀j ∈ [kd ] is equivalent to requiring fk0 d ∈ arg maxf ∈F PoA(f, kd ). The next proposition characterises explicitly fk0 d . Proposition 2. For any 1 < kd < ku , the distribution fk0 d defined in (8) is given by     fk?d (j) j ∈ [kd ]     fk0 d (j) = (j−1)! f ? (kd ) − χ(f 0 , ku ) Pj−1−kd (j−1)! + 1 k k h=1 (k −1)! (j−h−1)!  d d d     j ∈ [kd + 1, ku ] (9) where the expression for χ(fk0 d , ku ) can be found in Equation (13) in the Appendix. The proof can be found in the appendix. Remark. In [11] a distribution rule f was required to satisfy the constraint j ·f (j) ≤ 1 for all j. Loosely speaking the above requirement guarantees that a distribution rule does not overpay October 23, 2017 DRAFT 8 1 fk?u fk0 d 0.8 0.6 f (j) 0.4 0.2 0 1 2 3 4 5 6 7 8 9 10 j Fig. 1: Example of distribution rules fk?u and fk0 d as defined respectively in (5) and (9); ku = 10, kd = 2. P the players, in the sense that i∈N ui (ai , a−i ) ≤ W (a) for all allocations. Observe that such constraint might be important for economic applications, but it is irrelevant in the design of engineering systems. While [11] shows that the distribution rule fk?u satisfies this property, the next lemma proves that also fk0 d verifies this condition even if this was not requested a priori. Lemma 1. For any 1 < kd < ku the distribution fk0 d : [ku ] → R≥0 satisfies j ·fk0 d (j) ≤ 1 for all j ∈ [ku ]. The proof is provided in the appendix. B. Performance comparison Based on the metric introduced in (3), we compare in this section the performance of fk?u with the performance of fk0 d . Theorem 1 constitutes the main result of this section. Theorem 1. Consider the set of games Gfk , where k ≤ ku . i) The distribution fk?u has performance PoA(fk?u , k) = PoA(fk?u , ku ) . Such performance is strictly worse than the one achieved by the distribution fk? if k < ku and equal if k = ku . ii) For 1 < kd < k the distribution fk0 d has performance PoA(fk0 d , k) = PoA(fk0 d , ku ) , October 23, 2017 DRAFT 9 which is strictly worse than the one achieved by fk?u . For k ≤ kd < ku the distribution fk0 d has performance PoA(fk0 d , k) = PoA(fk?d , kd ) , which is strictly better than the one achieved by fk?u . The proof can be found in the Appendix. Remark. Claim i) in Theorem 1 shows that the performance of the distribution fk?u on the class of games with cardinality bounded by k is independent on the actual value of k, as for any k ≤ ku , such performance is governed by PoA(fk?u , ku ). Claim ii) in Theorem 1 ensures that the distribution fk0 d outperforms fk?u for ku > kd ≥ k and the opposite when kd < k. In each of these cases the performance is independent on the actual value of k, but only depends on whether kd is above or below k. Loosely speaking, if we underestimate k by designing kd < k, the performance guarantees offered by fk0 d are worse than what fk?u can achieve. The reverse holds in the case when we overestimate the cardinality as in ku > kd ≥ k. In Figure 2 we compare the performance of fk0 d with the performance of fk?u . It is important to note that the performance degradation (incurred whenever kd < k) always dominates the potential gains (achieved when kd ≥ k). This motivates the next section where we will introduce a dynamic algorithm capable of offering the benefits of fk0 d for kd ≥ k at no risk. IV. B EYOND THE R ISK -R EWARD TRADEOFF The previous section has focused on the design of a distribution rule when an upper bound on the true cardinality is known. We have demonstrated how fk?u guards against worst case performance while fk0 d could give potential benefits, but comes with a certain degree of risk. In both cases the performance is equal or inferior to what we could achieve if we knew the true cardinality. In this section we show how to overcome such difficulties, when we are given a game G ∈ Gfk with unknown cardinality k. We propose a distributed and asynchronous implementation of the best response algorithm that dynamically updates which distribution rule to use (see footnote 5 for further details). The upshot is that we guarantee an equal or superior performance to what we could achieve if we knew k. In the following, we allow distribution rules to depend on an additional variable xr ∈ [n] defined for r ∈ R, which we will dynamically update to coordinate the agents. In particular, we generalise the utilities of (2) to ui (ai , a−i ; x) := X vr f (xr , |a|r ) , (10) r∈ai October 23, 2017 DRAFT 10 Performance of fk0 d relative to fk?u , k = 3 0.25 0 −0.25 −0.5 −0.75 −1 2 3 4 5 6 7 8 9 kd Performance of fk0 d relative to fk?u , k = 4 0.25 0 −0.25 −0.5 −0.75 −1 2 3 4 5 6 7 8 9 kd Fig. 2: The bars represent the difference PoA(fk0 d , k) − PoA(fk?u , k), normalized by its largest value. As such, it describes the normalized difference in performance between fk0 d and fk?u for various values of 1 < kd < ku = 10. In the first figure k = 3, while k = 4 in the second figure. where x = {xr }r∈R and f : [n] × [n] → R≥0 might be different across the resources, depending on the value of xr . One could question wether the improved performance we will obtain comes from the additional degree of freedom introduced allowing resource specific distribution rules. Nevertheless [11] shows that it is not the case, in that the best resource specific and non resource specific distribution perform equally (in the worst case sense). The only rationale to introduce resource dependent October 23, 2017 DRAFT 11 rules is the distributability of the algorithm. Indeed, similar results could have been achieved dynamically updating a single distribution rule shared by all resources, but such algorithm would have not been distributed. A. Algorithm description and distributedness In the following t ∈ N describes the time step of the algorithm and at ∈ A the corresponding allocation. With slight abuse of notation, for every resource r ∈ R we introduce the quantity xr (t) that associates r ∈ R to the maximum number of agents that chose such resource until time t ∈ N. Further, we define f`alg : [n] → R≥0 for every ` ∈ N as a distribution rule matching the optimal in equation (5) for j ∈ [`] and constant in between [`, n]4   f ? (j) j ∈ [`] , ` alg := f` (j)  f ? (`) j ∈ [` + 1, n] . ` (11) Algorithm 1 Asynchronous cardinality learning 1: Initialise a1 ; t ← 1; 2: while not converged do xr (t) ← |a1 |r ∀r ∈ R . Best response 3: i ← t mod n 4: ait+1 ← arg maxai ∈Ai 5: ait+1 ← (ait+1 , a−i t ) P r∈ai vr fxalg (|at |r ) r (t) . Update kt and thus f on every resource 6: xr (t + 1) ← max{xr (t), |at+1 |r } 7: t←t+1 8: ∀r ∈ R end while Through the additional variable xr (t), the algorithm keeps track of the maximum number of players that visited every resource until the current time t, and selects consequently a resource specific distribution rule. In particular on every r ∈ R, the algorithm uses f`alg with ` set to the maximum number of players that visited that resource until time t (lines 4 and 6). Following a 4 The rule f`alg is a valid distribution rule, being non increasing and such that f`alg (1) = 1. It will in general not satisfy j · f`alg (j) ≤ 1, but this was neither requested, nor has relevance in the design of engineering systems. October 23, 2017 DRAFT 12 round-robin rotation, players i is selected to best respond and update the allocation (lines 3 to 5). The procedure repeats until convergence.5 The algorithm is distributed in the sense that every agent needs to keep track of xr (t) only for those resources he has access to i.e. for r ∈ Ai . Further, it is asynchronous as players need not to update their allocation in a specified order, but can spontaneously revise their strategies. It is important to highlight that the communnication requirements of Algorithm 1 are the same of those needed by the best response algorithm applied for instance to distribution rules fk?u or fk0 d . That is, Algorithm 1 better exploits the information that is already available. For ease of exposition we have presented the case where the distribution rules depend on the history xr (t), but the same across the players. It is simple to extend these results to the case of agent specific distribution rules. Every player would use a resource specific distribution rules that depend on the maximum number of players that visited every resource up until his last visit. Similar convergence guarantees and performance certificates will follow. B. Convergence and quality of equilibria The following theorem is the main result of this section. Claim i) shows convergence of Algorithm 1 to a Nash equilibrium. Claim ii) proves that the quality of such equilibrium is higher or equal to what the optimal distribution fk? could achieve. Theorem 2. Consider a covering game G with cardinality k and initial assignment a1 ∈ A. i) Algorithm 1 converges in a finite number of steps to ae := limt→∞ at ∈ A. The allocation ae is a Nash equilibrium of the game with resource specific distribution rules fixed to fxalg ∞ r ∞ := for r ∈ R, where xr limt→∞ xr (t). ? ii) Let kM := maxr∈R x∞ r . The quality of the equilibrium ae is higher than PoA(fkM , kM ) and thus of PoA(fk? , k) W (ae ) ≥ PoA(fk?M , kM ) ≥ PoA(fk? , k) . W (ao ) (12) These statements hold for any initial condition, even if the allocation to which the Algorithm 1 converges may be different. The proof is detailed in the Appendix. 5 Note that the best response strategy is not guaranteed to be unique. To overcome this issue, in the following we assume the existence of a tie-breaking rule selecting a single optimal allocation, should these be multiple. Nevertheless, we observe that neither this, nor requiring players to best respond in a round-robin is fundamental. It is still possible to show that Algorithm 1 converges almost surely if the players best responding are uniformly randomly selected form [n] and a single optimal allocation is uniformly randomly extracted from the set of best responses. This will produce a totally asynchronous algorithm. October 23, 2017 DRAFT 13 C. Instance by instance analysis The previous theorem shows that Algorithm 1 achieves a higher or equal worst case performance than the optimal distribution fk? . While worst case analysis has been and still is a fruitful tool to measure and improve on algorithms’ performance, the computer science community has recently showed interest in moving beyond it [26]. Inspired by this, the question arises as to whether Algorithm 1 performs better than fk? , instance by instance. More formally, we would like to understand if Algorithm 1 yields higher welfare than the optimally designed rule on all the remaining instances (the non worst case ones). We show that neither this, nor the opposite holds. Theorem 3. Let C be an instance of covering problem defined in Section II. Further denote with NEalg (C) the set equilibria obtained using Algorithm 1 on C, and G? = {C, fk? } the associated game where the optimal distribution fk? has been selected. i) There exists an instance C of the covering problem such that min a∈NEalg (C) W (a) > min a∈NE(G? ) W (a) . ii) There exists an instance C of the covering problem such that min a∈NEalg (C) W (a) < min a∈NE(G? ) W (a) . The proof is constructive and is presented in the Appendix. Note that both statements in Theorem 3 compare the performances of a given covering problem C and associated game G? . Observe that this metric is significantly different from (3), where we additionally take the infimum over problems with cardinality bounded by k. V. S IMULATIONS In this section we provide simulations to compare the performance of different distribution rules. More specifically, given a coverage problem of cardinality k, we compare the performance of Algorithm 1 with the performance of the best response dynamics (BR) using the distribution rule fk?u or the optimal distribution rule fk? . For this numerical study, we randomly generated 3000 instances of the covering problem with n = 10 agents, m = 20 resources. Each agent is equipped with an action set whose elements are singletons, that is ai ∈ R for all i ∈ N . We believe this is not restrictive in assessing the performance, as the worst cases characterized in [11] and [13] are of this form. The value of the resources is randomly selected according to a uniform distribution with minimum and maximum value of 1 and 100, respectively. For every instance generated, we randomly selected 50 different October 23, 2017 DRAFT 14 initial allocations used as starting points for the algorithms. The following table presents the results. TABLE I: Performance Comparison Algorithm Average Poa Average min Poa BR with fk?u 0.9701 0.9517 fk? 0.9723 0.9533 Algorithm 1 0.9734 0.9538 BR with W (ae ) In the first column we show the mean price of anarchy, i.e. the quantity W averaged over (ao ) all the instances and all the initial conditions. The second column presents the average-minimum price of anarchy, that is for every covering problem we compute the minimum of W (ae ) W (ao ) over all the initial conditions, and we then take the average over the instances. We note that Algorithm 1 as well as the distribution rules fk?u , fk? perform similarly, when W (ae ) looking at a randomly generated instance. The efficiency values W obtained are much higher (ao ) compared to the analytical worst case, hinting at the fact that such instances are very few. Given that the average performance is similar, but the distribution fk?u is proven to have inferior worst case performance (Theorem 1), one might want to use either the optimal distribution fk? or Algorithm 1. Recall indeed that the worst case performance of Algorithm 1 is on par or better to fk? (Theorem 2). Nevertheless, the use of fk? require knowledge of the cardinality k, while the algorithm proposed does not. To conclude: Algorithm 1 achieves similar average performances compared to the other distributions tested, but has a better worst case performance than fk?u and a better-equal worst case performance than fk? even if it does not require the knowledge of k. VI. C ONCLUSION In this work we studied how additional information impacts the optimal design of local utility functions, when the goal is to improve the overall efficiency of a class of multiagent systems. Relative to covering problems, in the first part of the manuscript we highlighted an inherent tradeoff between potential risks and rewards when such additional information is uncertain. In the second part, we showed how it is possible to fully eliminate the risks by using a distributed algorithm that dynamically updated the local utility functions. The methodology used suggests that similar results could be obtained for a broader class of resource allocation problems than the one studied here. October 23, 2017 DRAFT 15 A PPENDIX A P ROOF OF P ROPOSITION 2 Before proving the proposition, we report the expression for χ(fk0 d , ku ), appearing in Equation (9) χ(fk0 , ku ) = d fk?d (kd ) (ku − 1)(ku − 1)! . Pku −1−kd (ku −1)! (kd − 1)! ku + (ku − 1) h=1 (ku −h−1)! (13) Thanks to result i) in Proposition 1 maximising PoA(f, ku ) is equivalent to minimising χ(f, ku ) u and fk0 d can be computed by the following linear program (LP) in the unknowns x, {f (j)}kj=1 min x≥0, f ∈F x s.t. jf (j) − f (j + 1) ≤ x j ∈ [ku − 1] , (14) (ku − 1)f (ku ) ≤ x , f (j) = fk?d (j) j ∈ [kd ] . We remove the constraints x ≥ 0, f ∈ F as well as jf (j) − f (j + 1) ≤ x for j ∈ [kd − 1] and introduce the following relaxed linear program min x x, f s.t. jf (j) − f (j + 1) ≤ x j ∈ [kd , ku − 1] , (15) (ku − 1)f (ku ) ≤ x , f (j) = fk?d (j) j ∈ [kd ] . The proof is divided in two subproofs: i) We show that a solution to the relaxed program (15) is given by (9) and (13). ii) We show that the solution to the relaxed program obtained in i) is feasible for the original problem too. Proof. i) The proof proceeds by showing that a solution of (15) can be obtained transforming all the inequality constraint into equalities. This will produce the expressions (9) and (13). Let us define vj = f (j) for j ∈ [p+1, ku ] and introduce the cost function J(x, vkd +1 , . . . , vku ) = x. We further introduce the constraint functions g1 (x, vkd +1 ) = −x−vkd +1 and gi (x, vp+i−1 , vp+i ) = −x + j vp+i−1 − vp+i for i ∈ [2, ku − p] and gku −kd +1 (x, vku ) = −x + (ku − 1)vku . With these October 23, 2017 DRAFT 16 definitions the LP (15) is equivalent to the following where we have removed the decision variables that are already determined min x,vkd +1 ,...,vku s.t. J(x, vkd +1 , . . . , vku ) , g1 (x, vkd +1 ) ≤ −kd fk?d (kd ) , gi (x, vp+i−1 , vp+i ) ≤ 0 i ∈ [2, ku − p] , gku −kd +1 (x, vku ) ≤ 0 . Thanks to the convexity of the cost function and to the polytopic constraints, the Karush-KuhnTucker conditions are necessary and sufficient for optimality [27]. Consequently, a feasible point ? , . . . , vn? ) is an optimiser iff there exists µi ∈ R so that (x? , vk+1 ? ∇J + ku −k d +1 X µi ∇gi? = 0 i=1 gi? ≤ 0, µi ≥ 0, µi gi? = 0 i ∈ [ku − kd + 1] where we used ∇J ? to indicate ∇J(x? , vk?d +1 , . . . , vk?u ), and similarly for gi? , ∇gi? . Observe that the distribution rule in (9) and the corresponding χ(fk0 d , ku ) in (13) are the unique solution of the linear system gi? = 0 for all i ∈ [ku − kd + 1], that is    jfk0 d (j) − fk0 d (j + 1) − χ(fk0 d , ku ) = 0 j ∈ [kd , ku − 1] ,    (ku − 1)fk0 d (ku ) − χ(fk0 d , ku ) = 0 ,      f 0 (j) = f ? (j) j ∈ [kd ] . kd kd (16) Primal feasibility and complementarity slackness are hence naturally satisfied. We are only left P u −kd +1 µi ∇gi? = 0. We proceed by writing to prove that there exists µi ≥ 0 such that ∇J ? + ki=1 the stationarity conditions explicitly and show that this is indeed the case. Note that both the cost function and the constraints are linear so that their derivatives are constant functions ∇J ? = (1, 0, . . . , 0) ∇g1? = (−1, −1, 0, . . . , 0) ∇g2? = (−1, kd + 1, −1, 0, . . . , 0) .. . ∇gk?u −kd −1 = (−1, 0, . . . , 0, ku − 2, −1, 0) ∇gk?u −kd = (−1, 0, . . . , 0, ku − 1, −1) ∇gk?u −kd +1 = (−1, 0, . . . , 0, ku − 1) October 23, 2017 DRAFT 17 Solving the stationarity condition in a recursive fashion starting from last component gives   u −1)! µ i = µku −kd +1 (ku(k−1)(k i ∈ [ku − kd ] d +i−1)!  Pku −kd +1 µi = 1 . i=1 Substituting the first equation into the second one and solving yields    Pku −kd −1 (ku −1)(ku −1)! −1  (ku −1)(ku −1)! µ i = i ∈ [ku − kd ],  i=1 (kd +i−1)! (kd +i−1)!   Pku −kd −1 (ku −1)(ku −1)! −1   µku −kd +1 = . i=1 (kd +i−1)! Since µi ≥ 0 for all i ∈ [ku − kd + 1], we conclude that (9) and (13) solve the relaxed program (15). Proof. ii) The proof proceeds by showing that (9) and (13) satisfy the constraints removed when transforming the original program (14) into (15). Using (13) and (9), it is trivial to verify that χ(fk0 d , ku ) ≥ 0 and fk0 d (1) = 1, fk0 d (j) ≥ 0. We proceed to prove that fk0 d is non increasing. Note that for j ≤ kd , fk0 d coincides with fk?d , which was proven to be non increasing in [11]. Further, from Lemma 2 we know that jfk0 d (j) − (j + 1)fk0 d (j + 1) ≥ 0 for j ∈ [kd , ku − 1]. Thus jfk0 d (j) − jfk0 d (j + 1) ≥ jfk0 d (j) − (j + 1)fk0 d (j + 1) ≥ 0 for j ∈ [kd , ku − 1], which guarantees that fk0 d is non increasing for j ∈ [kd , ku ] too. We are left to show that jfk0 d (j) − fk0 d (j + 1) ≤ χ(fk0 d , ku ) for j ∈ [kd − 1]. Since j ∈ [kd − 1], it holds that jfk0 d (j) − fk0 d (j + 1) = jfk?d (j) − fk?d (j + 1). Note that jfk?d (j)−fk?d (j +1) ≤ χ(fk?d , kd ) by definition of χ(fk?d , kd ) in (4). Further, χ(fk?d , kd ) ≤ χ(fk? , ku ) for any kd ≤ ku since the price of anarchy is a monotonically decreasing function u (Proposition 1). Finally, Lemma 3 shows that for any kd ≤ ku , it holds χ(fk?u , ku ) ≤ χ(fk0 d , ku ). Hence jfk0 d (j) − fk0 d (j + 1) ≤ χ(fk0 d , ku ) for j ∈ [kd − 1]. It follows that fk0 d is feasible for the original problem (14). Thanks to this, and to the fact that fk0 d is optimal for (15), we conclude that fk0 d is a solution of the original problem. P ROOF OF L EMMA 1 Proof. The result of Lemma 2 implies that for all kd ≤ ku kd fk0 d (kd ) − jfk0 d (j) ≥ 0 October 23, 2017 ∀j ∈ [kd , ku − 1] . DRAFT 18 Further we know from [11] that kd fk?d (kd ) ≤ 1. Since fk?d (kd ) = fk0 d (kd ), we conclude that for j ∈ [kd , ku − 1] 1 ≥ kd fk?d (kd ) = kd fk0 d (kd ) ≥ jfk0 d (j) . For j ∈ [kd ], it holds fk0 d (j) = fk?d (j) and we already know that the optimal distribution fk?d does not overpay the players [11]. This concludes the proof. P ROOF OF T HEOREM 1 Proof. i) Thanks to Proposition 1, the performance of fk?u on the class of games with cardinality k can be computed as PoA(fk?u , k) = 4 to χ(fk? , k) and conclude that 1 . 1+χ(fk?u ,k) Since k ≤ ku , we can apply part i) of Lemma u 1 . χ 1 + (fk?u , ku ) on the set of games with cardinality k is the same PoA(fk?u , k) = This means that the performance of fk?u performance of the distribution fk?u on the set of games with cardinality ku ≥ k, and PoA(fk?u , k) = PoA(fk?u , ku ) ≤ PoA(fk? , k) , where the last inequality holds since PoA(fk? , k) is a decreasing function of k as seen in part iii) of Proposition 1. The inequality is tight if and only if k = ku . ii) Consider kd ∈ [ku − 1]. The performance of fk0 d on the class of games with cardinality k can be computed as PoA(fk0 d , k) = 4 to conclude that 1 . 1+χ(fk0 ,k) Since kd ∈ [k − 1], we apply part ii) of Lemma d PoA(fk0 d , k) = 1 . χ 1 + (fk0 d , ku ) Hence, for kd ∈ [ku − 1], the performance of fk0 d in the class of games with cardinality k is the same of the performance in the class of games with cardinality ku i.e. PoA(fk0 d , k) = PoA(fk0 d , ku ). Finally, by Lemma 3 we conclude that such performance is worse than what fk?u can offer PoA(fk0 d , k) < 1 = PoA(fk?u , k) . ? χ 1 + (fku , ku ) Consider kd ∈ [k, ku ]. Since k ≤ kd , only the first k entries of fk0 d will determine the performance and these are identical to fk?d by definition of fk0 d . Hence PoA(fk0 d , k) = Further kd ∈ [k, ku ] and part i) of Lemma 4 applies 1 = PoA(fk?d , kd ) , PoA(fk0 d , k) = 1 + χ(fk?d , kd ) 1 . 1+χ(fk? ,k) d so that fk0 d has the same performance of fk?d . Using the fact that the optimal price of anarchy is a decreasing function, for any p ∈ [k, ku ] we get PoA(fk0 d , k) = PoA(fk?d , kd ) ≥ PoA(fk?u , ku ) = PoA(fk?u , k) . The inequality is tight if and only if p = ku . October 23, 2017 DRAFT 19 P ROOF OF T HEOREM 2 Proof. i) Consider xr (t) for fixed r ∈ R. The integer sequence {xr (t)}∞ t=1 is upper bounded by the true cardinality k (by definition of cardinality) and is non decreasing in t thanks to its update rule (line 6 in Algorithm 1). Hence, after a finite number of steps, xr (t) has converged to x∞ r . Repeating the same reasoning for all the resources r ∈ R shows that the map xr (t) converges in a finite number t̂ of steps. Hence, for t ≥ t̂ the distribution rule used in the algorithm is fixed. Consequently the game is potential as it can be formulated as a standard congestion game [11], [23]. Since for t ≥ t̂ agents are playing round-robin best response on a potential game, their strategy will converge in a finite number of steps to a Nash equilibrium of the game with resource specific distribution rules fixed to fxalg ∞ for r ∈ R. r ii) Let us define ke = maxr∈R |ae |r (note that in general ke 6= kM ). To ease the notation, in i i −i ) to the following we will simply use f (xr , |a|r ) to indicate fxalg ∞ (|a|r ), and similarly u (a , a r i i refer to ui (ai , a−i ; {x∞ r }r∈R ). Further, we define Ae = ∪i ae and Ao = ∪i ao i i −i By definition of equilibrium we have for all i ∈ [n], ui (aie , a−i e ) ≥ u (ao , ae ) and hence X X 0≤ ui (aie , a−i ) − ui (aio , a−i (17) e e ). i∈[n] i∈[n] Using the definition of payoff, the first term can be rewritten as X XX ui (aie , a−i ) = f (xr , |ae |r )vr e i∈[n] r∈aie i∈[n] = X |ae |r f (xr , |ae |r )vr = ke X X (18) jf (xr , j)vr . j=1 r∈Ae |ae |r =j r∈Ae With a similar manipulation the second term becomes X XX ui (aio , a−i f (xr , |(aio , a−i ) = e e )|r )vr i∈[n] r∈aio i∈[n] XX ≥ f (xr , min{k, |ae |r + 1})vr , i∈[n] r∈aio i −i this holds because for all resources |(aio , a−i e )|r ≤ |ae |r + 1, |(ao , ae )|r ≤ k and f is non increasing in its second argument. For resources r ∈ ao it holds |ao |r ≥ 1, and so XX f (xr , min{k, |ae |r + 1})vr i∈[n] r∈aio = X |ao |r f (xr , min{k, |ae |r + 1})vr r∈Ao ≥ X f (xr , min{k, |ae |r + 1})vr . r∈Ao October 23, 2017 DRAFT 20 The second term in (17) can thus be lower bounded by X X ui (aio , a−i ) ≥ f (xr , min{k, |ae |r + 1})vr e r∈Ao i∈[n] = (19) ke X X f (xr , min{k, j + 1})vr . j=0 r∈Ao |ae |r =j Substituting (18) and (19) in (17) gives X X 0≤ ui (aie , a−i ) − ui (aio , a−i e e ) i∈[n] ≤ = ke X i∈[n] X jf (xr , j)vr − ke X X f (xr , min{k, j + 1})vr j=1 r∈Ae |ae |r =j j=0 r∈Ao |ae |r =j ke X X ke X X jf (xr , j)vr − j=1 r∈Ao |ae |r =j j=1 r∈Ae |ae |r =j − X f (xr , min{k, j + 1})vr vr f (xr , 1) r∈Ao \Ae = ke X X jf (xr , j)vr + j=1 r∈Ae \Ao |ae |r =j − ke X X j=1 r∈Ae ∩Ao |ae |r =j ke X X f (xr , min{k, j + 1})vr − j=1 r∈Ao |ae |r =j = ke X X jf (xr , j)vr − ke X X  X vr f (r, 1) r∈Ao \Ae j=1 r∈Ae \Ao |ae |r =j + jf (xr , j)vr X vr r∈Ao \Ae  jf (xr , j) − f (xr , min{k, j + 1}) vr , (20) j=1 r∈Ao |ae |r =j where we have used the fact that f (xr , 1) = 1 for all resources. We intend to bound the first and the third term in the last expression. In the summands of (20) j = |ae |r ≤ x∞ r due to the update of xr (t) in Algorithm 1 and recall that f (xr , |a|r ) = fxalg ∞ (|a|r ). Hence we can apply Lemma 5 r to the first term in (20) ke X X j=1 r∈Ae \Ao |ae |r =j October 23, 2017 jf (xr , j)vr ≤ ke X X j=1 r∈Ae \Ao |ae |r =j (χ(fk?M , kM ) + 1)vr . (21) DRAFT 21 Similarly for the third term in (20)  ke X X  jf (xr , j) − f (xr , min{k, j + 1}) vr j=1 r∈Ao |ae |r =j ≤ ke X X (22) χ(fk? , kM )vr = χ(fk? , kM ) M M X vr . r∈ae ∩ao j=1 r∈Ao |ae |r =j Hence combining (20) with the bounds from (21) and (22) 0 ≤(χ(fk?M , kM ) + 1) ke X X (23) vr j=1 r∈Ae \Ao |ae |r =j + χ(fk?M , kM ) X r∈Ae ∩Ao =(χ(fk?M , kM ) + 1) X vr − vr r∈Ao \Ae X (24) vr r∈Ae \Ao + χ(fk?M , kM ) X r∈Ae ∩Ao =(χ(fk?M , kM ) + 1) X vr − vr r∈Ao \Ae X (25) vr r∈Ae \Ao X + (χ(fk?M , kM ) + 1) X r∈Ae vr − X vr r∈Ao r∈Ae ∩Ao =(χ(fk?M , kM ) + 1) X vr − vr r∈Ao =(χ(fk?M , kM ) + 1)W (ae ) − W (ao ). Hence (χ(fk?M , kM ) + 1)W (ae ) − W (ao ) ≥ 0 and rearranging W (ae ) 1 ≥ = PoA(fk?M , kM ) ≥ PoA(fk? , k) , ? χ W (ao ) 1 + (fkM , kM ) where the last inequality follows from the fact that the price of anarchy is a decreasing function, and kM ≤ k by definition of cardinality. P ROOF OF T HEOREM 3 Proof. i) Consider the covering problem depicted in the following figure (a), composed of players p1 , p2 , p3 represented by a solid dot; resources r1 , r2 , r3 , r4 represented by a circle with values v1 , v2 , v3 , v4 such that v1 > v3 > v4 > v2 October 23, 2017 and v1 f3? (2) < v2 < v1 f2? (2) < v4 DRAFT k 2 k e n r1 ✓++ . . . xn xn+1 . . . x2n 1 x2n v3 r3 p3 v1 22 v3 ✓ ✓p1 ✓p+2 ✓++ p2 p1 {ron 1 , r2 , r3 }, {r2 , r3 , r4 }, {r1 , r2 , r3 , r4 }, respectively i.e. each player can only choose one arrow v2 x1 x2 . . . pointing outwards from himself. v2 . . . xn xn+1 r2 off xn+1 xn+2 . . . p1 v1 v2 v3 1 p1 r2 . . . x2n p2 r1 ✏ r1 As an example take v = (11, 5, 7, 6). Each player p1 , p2 , p3 can choose only one resource from r3 2 r3 p3 v1 n r2 r3 1 24 ✏ 1 x2n v p2 p3 2 ✏ p3 v1 p1 p2 v2 v3 v4 p3 (a) Original game r4 (b) Equilibrium ae The cardinality is k = 3 since all players could choose simultaneously r2 or r3 , hence the optimal distribution rule is f ? . Amongst the equilibria obtained with f3? there is ae = (r2 , r3 , r1 ), a project, HeatReserves and .. This work was not supported by Swiss Nano-Tera 3 project, HeatReserves and .. ygeros are with the Switzerland. Email: .ee.ethz.ch. MK: ask your funding from John depicted in the previous figure (b). This configuration is an equilibrium since v2 > v1 f3? (2) > D. Paccagnan, M. Kamgarpour and J. Lygeros are with the Control Laboratory, ETH Zürich, and v1 Email: > v2 f3? (2), v1 > v3 f3? (2), v1 > v4 . Such equilibrium v3 > v4 , v3 > v2 f3? (2)Switzerland. v3Automatic f3? (2) and {dariop,mkamgar,lygeros}@control.ee.ethz.ch. gives a welfare of v1 + v2 + v3 that is less than the optimal v1 + v3 + v4 , since v2 < v4 . We intend to show that for any initial condition and for any execution, Algorithm 1 will converge to an optimal allocation. This suffices to prove that the worst equilibrium obtained with Algorithm 1 performs better than the worst equilibrium obtained with f3? , which is not optimal as shown above. Observe that the conditions v1 > v3 > v4 > v2 and v4 > v1 f2? (2) ensure that an allocation with two or more agents covering the same resource is never an equilibrium.   This holds regardless 4 of the distribution used. Hence, the welfare can potentially take   = 4 different values, 3 since the binomial represents the number of subsets with 3 elements (agents allocations) that can be extracted from a set of 4 elements (set of resources). These different welfare values are obtained for (r1 , r2 , r4 ), (r2 , r3 , r4 ), (r1 , r3 , r4 ), (r1 , r2 , r3 ), or feasible permutations of each. The allocation (r1 , r2 , r4 ) is never an equilibrium since player p3 can improve moving to r3 because v3 > v4 . Similarly for any feasible permutation of (r1 , r2 , r4 ), the player selecting resource r4 can always improve moving to r3 . The allocation (r2 , r3 , r4 ) is never an equilibrium since player p3 can improve moving to r1 since v1 is the highest. Similarly for any feasible permutation of (r2 , r3 , r4 ), there exists a player that can improve moving to r1 . This holds regardless of what distribution rule is used. The allocation (r1 , r3 , r4 ) (or any feasible permutation) is optimal. We are thus left to show that Algorithm 1 never converges to (r1 , r2 , r3 ), or any other feasible permutation. We show this by enumeration. October 23, 2017 DRAFT 23 The allocation (r1 , r2 , r3 ) can not be an equilibrium since player p2 can improve moving to r4 because v4 > v2 . The allocation (r1 , r3 , r2 ) can not be an equilibrium since player p3 can improve moving to r4 . The allocation (r3 , r2 , r1 ) can not be an equilibrium since player p2 can improve moving to r4 . We are left to check ae = (r2 , r3 , r1 ), depicted in the previous figure (b). On characterizing Controllability of 1,abecause Population of for Thermostatically bility of a This Population of Thermostatically l = 1, 2 and so player can not be an equilibrium of Algorithm v2 < v1 f`alg (2) p2 could improve moving toControlled r1 . The fact thatLoads the algorithm uses l ≤ 2 on resource r1 holds ntrolled Loads because the maximum number of players on r1 is two, and so kt (1) ≤ 2 at any time step t ∈ [n]. We conclude thatLygeros all the equilibria towards which the and algorithm converges give optimal welfare, Dario Paccagnan, Maryam Kamgarpour, John Lygeros aryam Kamgarpour, and John ? while f3 also produces the suboptimal equilibrium ae ; the claim follows. Observe that this is not I. a worst case instance because the price of anarchy with the example values v = (11, 5, 7, 6) I NTRODUCTION is 10k(x) = µ10 (x, 2 t) on on n = ke k 2 2 n k n = ke k n i) Consider the covering problem depicted in the following figure (a), composed of players ✓ 2 ke k ✓+ ke ✓+ n 2 ke p1 , p2 , p3 represented by a solid dot; resources r1 , r2 , r3 represented by an empty circle with 01 (x) n n k ke 2 k ke 2 t) µ01 (x, values v1 , v2 , v3 such that off off ✓ Fig. Soft boundaries transition rates (x) at 01 1. As an 2example the bottom. ++ W (ae ) 11 + 5 + 7 23 7 ? k= = = > PoA(f = ke . n 2 3 , 3) W (ao ) 11 + 6 + 7 24 11 ke v3 f3? (2) < v1 < v2 < v3 /2 <kv3 . e n 2 k k take v = [9, 9.5, 20]. Each player p1 , p2 , p3 can choose only one resource from 10 (x) at the top and 01 (x) n at {r1 , r2 }, i.e. each player can only ke arrow pointing e 2 k choose one 2 {r2 , r3 }, k{r1 , r2 , r3 },krespectively outwards from himself. r1 p3 v1 ✓ ✓ p1✓+ n+1 x1 r3 r1 v3 v1 p2✓++ on v2 . . . xn xn+1 r2 x2 . . . off xn+1 xn+2 . . . 1 x2n n n . . .game x2n (a) Original 1 x2n r3 p3 v3 p2 p1 v2 r2 (b) Equilibrium a2 The cardinality is k = 3 since all players could choose simultaneously r1 , hence the optimal ? distributionr1rule is fr23? . All the r3 equilibria obtained with f3 are completely spread i.e. they feature one and only one player on each resource. Any allocation where there are two or more players 1 1 2 ✏ in one resource is not an equilibrium for f3? , as detailed in the following. If all three players selected resource r2 , p2 could improve moving to r3 since v3 > v2 . If p1 and p p p 2 3 p3 selected r1 ,1 depending on the choice of p2 , either p1 or p3 could improve moving respectively to r2 or r3 since v2 > v1 and v3 > v1 . If p2 and p3 selected r3 , depending on the choice 2 October 23, 2017 ✏ r4 DRAFT 24 of p1 , either p2 or p3 could improve moving respectively to r2 or r1 since v3 f3? (2) < v2 and v3 f3? (2) < v1 . If p1 , p3 selected both r2 , regardless of the choice of p2 , p3 could improve moving to r3 since v3 > v2 . If p2 , p3 selected both r2 , regardless of the choice of p1 , p3 could improve moving to r3 since v3 > v2 . Finally, if p1 , p2 selected r2 , regardless of the choice of p3 , p2 could always improve moving to r3 since v3 > v2 . Thus all equilibria obtained with f3? (including the worst) give a welfare of v1 + v2 + v3 . Let us consider Algorithm 1 and initialise it at a1 = [r2 , r3 , r1 ], giving k1 (r) = 1 for all r. Player p3 updates and since v3 · 1 > v1 · 1, he selects r3 , giving a2 = [r2 , r3 , r3 ] and k2 (r) = 1 for r1 , r2 and k2 (r3 ) = 2. This allocation is depicted in the previous figure (b) and is an equilibrium configuration. Indeed p1 can not improve since v2 > v1 ; p2 can not improve since v3 f2? (2) = v3 2 > v2 · 1; p3 can not improve since v3 f2? (2) = v3 2 > v2 · 1 and v3 f2? (2) = v3 2 > v1 · 1. Such equilibrium has a welfare of v2 + v3 . In conclusion, all equilibria obtained with f3? give a better welfare than a2 and thus of the worst equilibrium obtained with Algorithm 1. L EMMATA Lemma 2. Let kd ∈ [ku ]. The distribution fk0 d satisfies jfk0 d (j) − (j + 1)fk0 d (j + 1) ≥ 0 j ∈ [kd , ku − 1] . Proof. Recall that fk0 d is obtained from equation (16). Using χ(fk0 d , ku ) from (13), one can reconstruct the tail entries of fk0 d (j) with the following backward recursion jfk0 d (j) − fk0 d (j + 1) = χ(fk0 d , ku ) j ∈ [kd , ku − 1] , (ku − 1)fk0 d (ku ) = χ(fk0 d , ku ) . χ(f 0 ,ku ) k , the first equation gives for j ≥ kd   kX u −1 j! j! 0 0 + . jfkd (j) = χ(fkd , ku ) 1 + i! (k − 1)(k − 1)! u u i=j+1 Starting from fk0 d (ku ) = d ku −1 Hence 1 0 0 χ(fk0 , ku ) (jfkd (j) − (j + 1)fkd (j + 1)) = d kX u −1 kX u −1 (j + 1)! j! − (j + 1)! j! = − + = i! i=j+2 i! (ku − 1)(ku − 1)! i=j+1 = kX u −2  i=j+1 October 23, 2017 j! (j + 1)! − i! (i + 1)!    j! 1 j+1 + 1+ − . (ku − 1)! ku − 1 ku − 1 DRAFT 25 Note that for i > j, one has j! 1 = i! i(i − 1) . . . (j + 1) and so j! (j + 1)! − > 0. i! (i + 1)! Further 1 j+1 ku − j − 1 + = ≥0 ku − 1 ku − 1 ku − 1 since j ≤ ku − 1 by assumption. Hence we conclude that 1+ jfk0 d (j) − (j + 1)fk0 d (j + 1) ≥ 0 j ∈ [kd , ku − 1] . Lemma 3. For any 1 < kd < ku it holds χ(fk?u , ku ) < χ(fk0 d , ku ). Proof. The expression of χ(fk?u , ku ) in (6) and of χ(fk0 d , ku ) in equation (13) can be rewritten as χ(fk? , ku ) = u χ(fk0 , ku ) = d (ku − 1)(ku − 1)! P u −1 1 + (ku − 1)(ku − 1)! ki=1 ku + , (ku − 1)(ku − 1)! Pku −1−kd (ku −1)(ku −1)! β(kd ) , h=1 where β(kd ) := 1 i! (ku −h−1)! 1 1+ Pkd −1 (kd −1)(kd −1)! h=1 h! . Instead of showing χ(fk?u , ku ) < χ(fk0 d , ku ), in the following we equivalently prove that 1 χ(f 0 ,ku ) i.e., that 1 χ(f ? ,ku ) > ku kd kX u −1 k −2 u X 1 1 = ku + (ku − 1)(ku − 1)! > 1 + (ku − 1)(ku − 1)! i! i! i=1 i=1   ku −1−k kX d −1 X d (ku − 1)(ku − 1)!  (kd − 1)(kd − 1)! ku + 1+ . (ku − h − 1)! h! h=1 h=1 The previous inequality can be rewritten as kX  ku −1−k u −2 Xd 1 1 (ku − 1)(ku − 1)! − > i! (k − h − 1)! u i=1 h=1   ku −1−k d d −1 X (ku − 1)(ku − 1)! kX (kd − 1)(kd − 1)! ku + . (ku − h − 1)! h! h=1 h=1 P d −1 1 P d −1 Since the left hand side is equal to (ku −1)(ku −1)! kh=1 , we can simplify the term kh=1 h! 1 h! to get (ku − 1)(ku − 1)! > (kd − 1)(kd − 1)! October 23, 2017  ku −1−k X d (ku − 1)(ku − 1)!  ku + , (ku − h − 1)! h=1 DRAFT 26 which is finally equivalent to ku −1−k Xd 1 1 ku > + . (kd − 1)(kd − 1)! (ku − 1)(ku − 1) (ku − h − 1)! h=1 (26) We use induction to show that inequality (26) holds for 1 < kd < ku , as required. We start from kd = ku − 1 and apply induction backwards until we reach kd = 2. i) For kd = ku − 1 and kd > 1 inequality (26) reads as kd + 1 1 > ⇐⇒ kd 2 > kd 2 − 1 , (kd − 1)(kd − 1)! kd · kd ! which is always satisfied. ii) Let us assume the inequality holds for a generic kd ≤ ku − 1, we show that it holds also for kd − 1 (with kd > 1). That is, we assume ku −1−k Xd 1 ku 1 > + , (kd − 1)(kd − 1)! (ku − 1)(ku − 1) (k u − h − 1)! h=1 (27) and want to show ku −k Xd ku 1 1 > + . (kd − 2)(kd − 2)! (ku − 1)(ku − 1) h=1 (ku − h − 1)! (28) We can rewrite the right hand side of (28) and use (27) to upper bound it kX u −kd ku 1 + = (ku − 1)(ku − 1) (ku − h − 1)! h=1 ku −k d −1 X ku 1 1 + + < (ku − 1)(ku − 1) (k (k u − h − 1)! d − 1)! h=1 (29) 1 1 kd + = < (kd − 1)(kd − 1)! (kd − 1)! (kd − 1)(kd − 1)! 1 . (kd − 2)(kd − 2)! The last inequality holds since it is equivalent to kd 1 < ⇐⇒ kd 2 − 2kd < (kd − 1)2 , 2 (kd − 1) kd − 2 which is always satisfied. Comparing the first and last term in (29) gives (28). This completes the induction and thus the proof. Lemma 4. i) For any 1 ≤ l ≤ m, m ∈ N it holds ? ? χ(fm , m) . , l) = χ(fm October 23, 2017 DRAFT 27 ii) For any k ∈ [ku ] and 1 < kd < k it holds χ(fk0 , k) = χ(fk0 , ku ) . d d Proof. i) If l = m, the result holds trivially. Hence in the following we consider l ∈ [m − 1]. ? By definition of χ(fm , l) in (4), one has ? χ(fm , l) = min x x≥0 ? ? s.t. jfm (j) − fm (j + 1) ≤ x j ∈ [l − 1] , ? (l − 1)fm (l) ≤ x . ? is derived in [11, Theorem 2] solving the following recursion Note that fm ? ? ? jfm (j) − fm (j + 1) = χ(fm , m) j ∈ [m − 1] (30) ? ? (l − 1)fm (l) = χ(fm , m) . ? , m). Since m > l, it follows that any feasible x from the LP above has to satisfy x ≥ χ(fm ? ? (l) ≤ x is also , m), the constraint (l − 1)fm In the following we show that setting x = χ(fm ? ? satisfied. This will be enough to conclude that χ(fm , l) = χ(fm , m). ? Since fm is non increasing, one has ? ? ? ? ? (l − 1)fm (l) − χ(fm , m) = lfm (l) − fm (l) − χ(fm , m) ≤ ? ? ? ≤ lfm (l) − fm (l + 1) − χ(fm , m) = 0 , where the equality holds applying (30) for j = l ∈ [m − 1]. ii) We intend to compute χ(fk0 , k) = min x d x≥0 s.t. jfk0 d (j) − fk0 d (j + 1) ≤ x j ∈ [k − 1] (k − 1)fk0 d (k) ≤ x . For any feasible x, it must be x ≥ χ(fk0 d , ku ) due to how fk0 d (j) is recursively defined for j > kd in Equation (16). Similarly to what shown before, one can prove that x = χ(fk0 , ku ) d will also satisfy the constraint (k − 1)fk0 d (k) ≤ x. Hence χ(fk0 d , k) = χ(fk0 d , ku ) and the proof is concluded. Lemma 5. For all resources r ∈ R, the distribution rules fxalg ∞ are such that r October 23, 2017 ? j fxalg ∞ (j) ≤ χ(fk , kM ) + 1 M r j ∈ [x∞ r ] (31) alg ? j fxalg ∞ (j) − fx∞ (min{k, j + 1}) ≤ χ(fk , kM ) M r r j ∈ [x∞ r ] (32) DRAFT 28 where kM = maxr∈R x∞ r . ∞ Proof. We start from (31) and examine fxalg ∞ for a fixed r ∈ R. Consider j ∈ [xr − 1], by r ? definition of fxalg ∞ and the fact that fx∞ is non increasing r r ? ? j fxalg ∞ (j) − 1 = j fx∞ (j) − fx∞ (1) r r r ≤ j fx?∞ (j) − fx?∞ (j + 1) ≤ χ(fx?∞ , x∞ r ) r r r ? ∞ j fxalg ∞ (j) ≤ χ(fx∞ , xr ) + 1 , r r =⇒ where the last inequality holds thanks to the definition (4). Since x∞ r ≤ kM and the price ? ∞ ? of anarchy is a decreasing function, one has χ(fx∞ , xr ) ≤ χ(fkM , kM ) and so j fxalg ∞ (j) ≤ r r χ(fk? , kM ) + 1 for j ∈ [x∞ r − 1]. M In a similar fashion when j = x∞ r alg ∞ ? ? x∞ (x∞ (x∞ (1) r f x∞ r ) − 1 = x r f x∞ r ) − f x∞ r r r ? ? ≤ x∞ (x∞ (x∞ r f x∞ r ) − f x∞ r ) r r = (x∞ r − 1)fx?∞ (x∞ r ) r (33) χ ? = χ(fx?∞ , x∞ r ) ≤ (fkM , kM ) , r where the only difference is in the last equality that comes from equation (6). Repeating the same reasoning for all r ∈ R, one has proven (31). In the remaining, we show that (32) holds. Consider fxalg ∞ for a fixed resource r ∈ R and r ∞ ∞ recall that xr ≤ k. Thus for j ∈ [xr − 1] one has min{k, j + 1} = j + 1 and the claim reads alg ? as j fxalg ∞ (j) − fx∞ (j + 1) ≤ χ(fk , kM ). This holds since r r M alg ? ? j fxalg ∞ (j) − fx∞ (j + 1) = j fx∞ (j) − fx∞ (j + 1) r r r r χ ? ≤ χ(fx?∞ , x∞ r ) ≤ (fkM , kM ) r where the first inequality holds thanks to definition (4) and the last since the price of anarchy is non increasing (x∞ r ≤ kM ). ∞ In the remaining we focus on j = x∞ r and divide the proof in two subparts. When k = xr , min{k, j + 1} = x∞ r and the claim follows from alg alg ? ∞ ? (x∞ (x∞ x∞ (x∞ (x∞ r ) r ) = x r f x∞ r ) − f x∞ r f x∞ r ) − f x∞ r r r r ? χ ? , x∞ χ ? = (x∞ (x∞ r ) ≤ (fkM , kM ) , r − 1)fx∞ r ) = (fx∞ r r ∞ similarly to (33). When k > x∞ r , then min{k, j + 1} = xr + 1 and the claim holds if we show alg alg χ ? , x∞ x∞ (x∞ (x∞ r f x∞ r ) − f x∞ r + 1) ≤ (fx∞ r ). r r r October 23, 2017 DRAFT 29 For this to hold, one has to require ∞ ? ∞ ∞ ∞ alg fxalg ∞ (xr + 1) ≥ xr fx∞ (xr ) − χ(fx∞ , xr ) r r r ? χ ? , x∞ (x∞ = x∞ r ) r ) − (fx∞ r f x∞ r r alg (x∞ = fx?∞ (x∞ r ), r ) = f x∞ r r ∞ ? where the second equality sign follows form χ(fx?∞ , x∞ (x∞ r ) = (xr − 1)fx∞ r ), that is form r r equation (4). Hence we need to impose alg ∞ ∞ fxalg ∞ (xr + 1) ≥ fx∞ (xr ) , r r ∞ but at the same time we are limited to non increasing distribution rules. Hence we set fxalg ∞ (xr + r alg ∞ from Equation (11). The proof is completed by observing 1) = fxalg ∞ (xr ) as by definition of f` r that the same reasoning can be repeated for any resource r ∈ R. R EFERENCES [1] D. Paccagnan and J. R. Marden, “The risks and rewards of conditioning noncooperative designs to additional information,” in Proceedings of the 55th Allerton Conference on Communication, Control, and Computing, 2017. [2] D. D. Siljak, Decentralized control of complex systems. Courier Corporation, 2011. [3] D. Paccagnan, M. Kamgarpour, and J. Lygeros, “On aggregative and mean field games with applications to electricity markets,” in 2016 European Control Conference (ECC), June 2016, pp. 196–201. [4] P. N. Brown and J. R. Marden, “Studies on robust social influence mechanisms: Incentives for efficient network routing in uncertain settings,” IEEE Control Systems, vol. 37, no. 1, pp. 98–115, Feb 2017. [5] J. R. Marden and A. Wierman, “Distributed welfare games,” Operations Research, vol. 61, no. 1, pp. 155–168, 2013. [6] S. Martinez, J. Cortes, and F. Bullo, “Motion coordination with distributed information,” IEEE Control Systems, vol. 27, no. 4, pp. 75–88, Aug 2007. [7] M. Pavone, A. Arsie, E. Frazzoli, and F. Bullo, “Distributed algorithms for environment partitioning in mobile robotic networks,” IEEE Transactions on Automatic Control, vol. 56, no. 8, pp. 1834–1848, Aug 2011. [8] C. Langbort, R. S. Chandra, and R. D’Andrea, “Distributed control design for systems interconnected over an arbitrary graph,” IEEE Transactions on Automatic Control, vol. 49, no. 9, pp. 1502–1519, Sept 2004. [9] B. Bamieh, F. Paganini, and M. A. Dahleh, “Distributed control of spatially invariant systems,” IEEE Transactions on Automatic Control, vol. 47, no. 7, pp. 1091–1107, Jul 2002. [10] J. R. Marden, “The role of information in multiagent coordination,” in 53rd IEEE Conference on Decision and Control, Dec 2014, pp. 445–450. [11] M. Gairing, Covering Games: Approximation through Non-cooperation. Berlin, Heidelberg: Springer Berlin Heidelberg, 2009, pp. 184–195. [12] C. Langbort and V. Gupta, “Minimal interconnection topology in distributed control design,” SIAM Journal on Control and Optimization, vol. 48, no. 1, pp. 397–413, 2009. [13] V. Ramaswamy, D. Paccagnan, and J. R. Marden, “The impact of local information on the performance of multiagent systems,” ArXiv:1710.01409, 2017. [14] V. V. Vazirani, Approximation Algorithms. October 23, 2017 New York, NY, USA: Springer-Verlag New York, Inc., 2001. DRAFT 30 [15] U. Feige, “A threshold of ln n for approximating set cover,” J. ACM, vol. 45, no. 4, pp. 634–652, July 1998. [16] R. A. Murphey, Target-Based Weapon Target Assignment Problems. Boston, MA: Springer US, 2000, pp. 39–53. [17] U. Feige and J. Vondrak, “Approximation algorithms for allocation problems: Improving the factor of 1 - 1/e,” in 2006 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS’06), Oct 2006, pp. 667–676. [18] H.-L. Chen, T. Roughgarden, and G. Valiant, “Designing network protocols for good equilibria,” SIAM Journal on Computing, vol. 39, no. 5, pp. 1799–1832, 2010. [19] B. Gentile, F. Parise, D. Paccagnan, M. Kamgarpour, and J. Lygeros, “Nash and wardrop equilibria in aggregative games with coupling constraints,” arXiv preprint arXiv:1702.08789, 2017. [20] 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. [21] A. Krause and C. Guestrin, “Near-optimal observation selection using submodular functions,” in in Proceedings of the 22nd Conference on Artifical Intelligence, 2007. [22] J. R. Marden, G. Arslan, and J. S. Shamma, “Cooperative control and potential games,” IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), vol. 39, no. 6, pp. 1393–1407, Dec 2009. [23] D. Monderer and L. S. Shapley, “Potential games,” Games and Economic Behavior, vol. 14, no. 1, pp. 124 – 143, 1996. [24] J. F. Nash, “Equilibrium points in n-person games,” Proceedings of the National Academy of Sciences, vol. 36, no. 1, pp. 48–49, 1950. [25] E. Koutsoupias and C. Papadimitriou, “Worst-case equilibria,” in Proceedings of the 16th Annual Conference on Theoretical Aspects of Computer Science, ser. STACS’99. Berlin, Heidelberg: Springer-Verlag, 1999, pp. 404–413. [26] M.-F. Balcan, B. Manthey, H. Röglin, and T. Roughgarden, “Analysis of Algorithms Beyond the Worst Case (Dagstuhl Seminar 14372),” Dagstuhl Reports, vol. 4, no. 9, pp. 30–49, 2015. [27] S. Boyd and L. Vandenberghe, Convex optimization. October 23, 2017 Cambridge university press, 2004. DRAFT
3cs.SY
Closure properties of classes of multiple testing procedures arXiv:1607.04327v4 [math.ST] 30 Apr 2017 Georg Hahn Department of Mathematics, Imperial College London Abstract Statistical discoveries are often obtained through multiple hypothesis testing. A variety of procedures exists to evaluate multiple hypotheses, for instance the ones of BenjaminiHochberg, Bonferroni, Holm or Sidak. We are particularly interested in multiple testing procedures with two desired properties: (solely) monotonic and well-behaved procedures. This article investigates to which extent the classes of (monotonic or well-behaved) multiple testing procedures, in particular the subclasses of so-called step-up and step-down procedures, are closed under basic set operations, specifically the union, intersection, difference and the complement of sets of rejected or non-rejected hypotheses. The present article proves two main results: First, taking the union or intersection of arbitrary (monotonic or well-behaved) multiple testing procedures results in new procedures which are monotonic but not well-behaved, whereas the complement or difference generally preserves neither property. Second, the two classes of (solely monotonic or well-behaved) step-up and step-down procedures are closed under taking the union or intersection, but not the complement or difference. Keywords: Multiple Hypothesis Testing, Statistical Significance, Step Up Procedure, Set Operations, Monotonicity 1 Introduction Multiple testing is a widespread tool to evaluate scientific studies (Westfall and Young, 1993; Hsu, 1996; Hochberg and Tamhane, 2008). We are interested in testing m ∈ N hypotheses H01 , . . . , H0m with corresponding p-values p1 , . . . , pm for statistical significance while controlling an error criterion such as the familywise error (FWER) or the false discovery rate (FDR). Following Gandy and Hahn (2016), we define a multiple testing procedure as a mapping h : [0, 1]m × [0, 1] → P({1, . . . , m}) whose input is a vector of m p-values p ∈ [0, 1]m and a significance level α ∈ [0, 1] and whose output is the set of indices of rejected hypotheses, where P denotes the power set. Many procedures of the above form are available in the literature in order to correct for multiple tests, for instance the procedures of Bonferroni (1936), Sidak (1967), Holm (1979), Hochberg (1988) or Benjamini and Hochberg (1995). Many common procedures, including the ones aforementioned, belong to a certain class of procedures, called step-up and step-down procedures (Romano and Shaikh, 2006). It is assumed throughout the article that only the m p-values which serve as input to h are used as a basis for making decisions, dependencies between elementary hypotheses are not considered explicitly. Apart from defining properties on p imposed by those multiple testing procedures to which the results of this article are applied, no additional conditions on p are required. 1 This article focuses on two types of multiple testing procedures: monotonic procedures defined in Roth (1999) and Tamhane and Liu (2008) as well as well-behaved procedures (Gandy and Hahn, 2016). We investigate to which extent the class of solely monotonic and the class of wellbehaved multiple testing procedures is closed under the computation of the union, intersection, difference or the complement of sets of rejected or non-rejected hypotheses. A multiple testing procedure is said to be monotonic if smaller p-values (Tamhane and Liu, 2008) or a higher significance level (Roth, 1999) lead to more rejections. Gandy and Hahn (2016) call a monotonic multiple testing procedure well-behaved if p-values corresponding to rejected hypotheses can be lowered and p-values corresponding to non-rejected hypotheses can be increased while leaving all rejections and non-rejections invariant. For a set of given hypotheses, the closed testing procedure (CTP) of Marcus et al. (1976) (also referred to as the closure principle) and the partitioning principle (PP) of Finner and Strassburger (2002) provide means to efficiently construct a simultaneous hypothesis test controlling the FWER. The CTP is based on enforcing coherence (Gabriel, 1969): An intersection hypothesis HI , that is a hypothesis of the form HI = ∩i∈I Hi for I ⊆ {1, . . . , m}, is rejected if and only if all intersection hypotheses implying HI are rejected by their local tests (Hommel et al., 2007). Many common procedures such as the one of Holm (1979) can be constructed using the CTP. The PP divides the parameter space underlying the hypotheses of interest into disjoint subsets which are then tested independently at level α. Since the partitioned hypotheses are disjoint, no multiplicity correction is necessary and at most one of the mutually exclusive hypotheses is true. Whereas CTP and PP can only be used to construct procedures with FWER control, the present article offers a means to combine procedures controlling several criteria such as the FDR into one procedure (see the example in Section 4.5). In case of the CTP, the exponential number of tests to be carried out might also pose a problem: The present article considers the direct construction of step-up and step-down procedures which allow for efficient testing of multiple hypotheses. The motivation for the present article is as follows: 1. Investigating closure properties (in a set theoretical sense) of a class, in the case of the present article certain classes of multiple testing procedures, is of interest in its own right: The closure of step-up and step-down procedures allows us to construct new multiple testing procedures of the same (step-up/step-down) form from existing ones; moreover, the resulting procedure will be given explicitly. 2. Being able to perform set operations with multiple testing procedures is useful in practice: Many multiple testing procedures exist to test hypotheses according to various criteria, each of which might prove beneficial in certain applications. Whereas hypotheses can also be tested sequentially using several procedures, it is nontrivial a priori that procedures can be combined to test multiple hypotheses in a single run while drawing benefits of several criteria simultaneously. This feature is similar to using (stepwise) “shortcut procedures” (Romano and Wolf, 2005; Hommel et al., 2007) which aim to reduce the (potentially) exponential number of tests required by the CTP for FWER control to a polynomial number of tests. 3. Monotonic and well-behaved procedures have already been of interest in the literature. For instance, Gordon (2007) uses the idea of monotonicity to show that there is no monotonic stepup procedure which improves upon the Bonferroni (1936) procedure in the sense that it always returns the same rejections or possibly more. Gordon and Salzman (2008) show that the classical Holm (1979) procedure dominates all monotonic step-down multiple testing procedures in the 2 above sense. Proving that certain classes of procedures (for instance, monotonic procedures) are closed renders the applicability of known results more apparent. 4. The results discussed in this paper extend the methodology developed in Gandy and Hahn (2014) and Gandy and Hahn (2016) which relies on well-behaved procedures. Briefly, the authors consider a scenario in which the p-value underlying each hypothesis is unknown, but can be estimated through Monte Carlo samples drawn under the null, for instance using bootstrap or permutation tests. Instead of using estimated p-values to obtain ad-hoc decisions on all hypotheses, the authors prove that it is possible to improve existing algorithms designed for Monte Carlo based multiple testing (Besag and Clifford, 1991; Lin, 2005; van Wieringen et al., 2008; Guo and Peddada, 2008; Sandve et al., 2011): the proposed modifications guarantee that the test results of published algorithms are identical (up to an error probability pre-specified by the user) to the ones obtained with the unknown p-values. This ensures the repeatability and objectivity of multiple testing results even in the absence of p-values. The article is structured as follows. Section 2 provides formal definitions of the two properties of a multiple testing procedure under investigation. Section 3 considers arbitrary (solely monotonic or well-behaved) multiple testing procedures and demonstrates that solely the monotonicity is preserved when taking unions and intersections. The difference and complement are neither monotonic nor well-behaved. Section 4 focuses on step-up and step-down procedures and shows that both classes of (solely monotonic or well-behaved) step-up and step-down procedures are closed under the union or intersection operation, but not the complement or difference. The article concludes with a short discussion in Section 5. All proofs are given in Appendix A. In the entire article, | · | and k · k denote the absolute value and the Euclidean norm, respectively, and M := {1, . . . , m}. 2 Basic definitions Consider a step-up (hu ) and step-down (hd ) procedure  hu (p, α) = i ∈ {1, . . . , m} : pi ≤ max{p(j) : p(j) ≤ τα (j)} ,  hd (p, α) = i ∈ {1, . . . , m} : pi < min{p(j) : p(j) > τα (j)} , returning the set of indices of rejected hypotheses (Gandy and Hahn, 2016), where p(1) ≤ p(2) ≤ · · · ≤ p(m) refers to the ordered p-values. Any procedure of the above form is fully characterised by a threshold function τα : {1, . . . , m} → [0, 1] returning the critical value τα (i) each p(i) is compared to. A step-up procedure first determines the largest j ∈ M such that the p-value p(j) lies below τα (j) and then rejects all hypotheses having p-values up to p(j) . Likewise, a step-down procedure non-rejects all those hypotheses with p-values larger or equal to the smallest p-value above the threshold function. We now consider two useful properties of arbitrary multiple testing procedures. The first one, monotonicity, states that smaller p-values (Tamhane and Liu, 2008) or a higher significance level (Roth, 1999) lead to more rejections: Definition 1. A multiple testing procedure h is monotonic if h(p, α) ⊆ h(q, α0 ) for p ≥ q and α ≤ α0 . The monotonicity in α introduced by Roth (1999), also called α-consistency (Hommel and Bretz, 2008), is a natural property desired for any testing procedure since testing at a more 3 stringent significance level should never result in more rejections (Dmitrienko and Tamhane, 2013). Gandy and Hahn (2016) introduce another useful property, the class of well-behaved multiple testing procedures. Such procedures, in connection with a generic algorithm presented in Gandy and Hahn (2016), allow to use p-value estimates obtained with independent samples under the null to compute test results which are proven to be identical (up to a pre-specified error probability) to the ones obtained with the unknown p-values. A monotonic multiple testing procedure h is well-behaved if it additionally satisfies the following condition. Condition 1. 1. Let p, q ∈ [0, 1]m and α ∈ R. If qi ≤ pi ∀i ∈ h(p, α) and qi ≥ pi ∀i ∈ / h(p, α), then h(p, α) = h(q, α). 2. Fix p∗ ∈ [0, 1]m and α∗ ∈ [0, 1]. Then there exists δ > 0 such that p ∈ [0, 1]m , α ∈ [0, 1] and max(kp − p∗ k, |α − α∗ |) < δ imply h(p, α) = h(p∗ , α∗ ). Well-behaved procedures stay invariant if rejected (non-rejected) p-values are replaced by smaller (larger) values. Moreover, well-behaved procedures are constant on a δ-neighbourhood around fixed inputs p∗ and α∗ . The level α is a parameter in Condition 1 to account for settings in which α is unknown a-priori: This can occur, for instance, when the significance level depends on an estimate of the proportion of true null hypotheses which is often a functional of p (Gandy and Hahn, 2016, Section 2.2). Condition 1 is a generalisation of (Gandy and Hahn, 2014, Condition 1) which states the same invariance property for the case that α is a given constant: In this case, h is solely a function of p and the condition |α − α∗ | < δ in the second part of Condition 1 can be ignored. 3 Arbitrary multiple testing procedures We define the union, intersection, difference and the complement of two procedures to be the equivalent operations on the sets of rejected hypotheses returned by the two procedures. Formally, for two multiple testing procedures h1 and h2 we define h1 ∪ h2 : [0, 1]m × [0, 1] → P({1, . . . , m}), h1 ∪ h2 (p, α) := h1 (p, α) ∪ h2 (p, α), and similarly h1 ∩ h2 , h1 \ h2 and the complement hi (p, α)c := {1, . . . , m} \ hi (p, α), where i ∈ {1, 2}. In what follows, we sometimes drop the dependence of h(p, α) on p, on α, or on both parameters. The following lemma summarises the results. Lemma 1. Let h1 and h2 be two well-behaved multiple testing procedures. 1. h1 ∪ h2 and h1 ∩ h2 are monotonic and satisfy part 2. of Condition 1. 2. hi (p, α)c and h1 \ h2 are not monotonic, i ∈ {1, 2}. As well-behaved procedures are also monotonic, the complement or difference of two procedures is also not well-behaved. Although by Lemma 1, both the union and the intersection are monotonic, they do not necessarily allow to lower the p-values of rejected hypotheses or to increase the p-values of non-rejected hypotheses (first part of Condition 1) as demonstrated in the following two counterexamples. 4 Example 1. Let p∗ = (0.034, 0.06, 1) and α∗ = 0.1. Let h1 be the Benjamini and Hochberg (1995) step-up procedure, h2 be the Sidak (1967) step-down procedure and h(p, α) = h1 (p, α) ∩ h2 (p, α). Then h1 (p∗ , α∗ ) = {1, 2}, h2 (p∗ , α∗ ) = {1} and thus 2, 3 ∈ / h(p∗ , α∗ ). However, ∗ ∗ ∗ increasing p to q = (0.034, 1, 1) results in h1 (q, α ) = ∅ and thus h(q, α ) = ∅ = 6 h(p∗ , α∗ ). Example 2. Let p∗ and α∗ be as in Example 1. Let h1 be a step-up procedure which uses the same threshold function as the (step-down) Sidak (1967) correction, and likewise h2 be a step-down procedure using the same threshold function as the (step-up) Benjamini and Hochberg (1995) procedure – using (Gandy and Hahn, 2016, Lemma 3), it is straightforward to show that both procedures are well-behaved. Let h(p, α) = h1 (p, α) ∪ h2 (p, α). Then h1 (p∗ , α∗ ) = {1}, h2 (p∗ , α∗ ) = ∅ and thus h(p∗ , α∗ ) = {1}. However, decreasing p∗ to q = (0, 0.06, 1) results in h2 (q, α∗ ) = {1, 2} and thus h(q, α∗ ) = {1, 2} = 6 h(p∗ , α∗ ). Examples 1 and 2 also demonstrate that both the union and the intersection of a well-behaved step-up and a well-behaved step-down procedure are not necessarily well-behaved any more. Although neither the class of well-behaved multiple testing procedures of general form nor the combination of a well-behaved step-up and a well-behaved step-down procedure is closed under the four set operations aforementioned, the next section proves that this holds true for the special classes of well-behaved step-up and step-down procedures individually (when taking unions and intersections). 4 Step-up and step-down procedures Gandy and Hahn (2016) show that any step-up or step-down procedure (characterised by its threshold function τα ) which satisfies the following condition is well-behaved: Condition 2. 1. τα (i) is non-decreasing in i for each fixed α. 2. τα (i) is continuous in α and non-decreasing in α for each fixed i. Furthermore, Gandy and Hahn (2016) verify that a large variety of commonly used procedures satisfies Condition 2 and is hence well-behaved, among them the procedures of Bonferroni (1936), Sidak (1967), Holm (1979), Hochberg (1988) or Benjamini and Hochberg (1995). Even though (Gandy and Hahn, 2016, Lemma 3) only prove that Condition 2 is sufficient for a procedure to be well-behaved, the condition is actually also necessary: Lemma 2. Any well-behaved step-up or step-down procedure satisfies Condition 2. Consider two step-up procedures hu and h̃u with threshold functions ταu and τ̃αu as well as two step-down procedures hd and h̃d with threshold functions ταd and τ̃αd . In the following subsections we separately investigate whether the classes of step-up (stepdown) procedures are closed under each of the four set operations (union, intersection, difference and complement). Moreover, we investigate whether the subclasses of well-behaved step-up (step-down) procedures are closed. To this end, by Lemma 2, it suffices to show that the classes of step-up (step-down) procedures satisfying Condition 2 are closed. 5 0.15 0.10 0.00 0.05 p−values and thresholds 0.15 0.10 0.05 p−values and thresholds 0.00 1 2 3 4 5 6 1 rank of hypothesis 2 3 4 5 6 rank of hypothesis Figure 1: Combined threshold function (bold) for the computation of the union (left) and the intersection (right) of the Bonferroni (1936) correction (vertical solid line) and the Hochberg (1988) (dashed line) procedure. The Bonferroni (1936) correction was applied with significance level 0.2, the Hochberg (1988) procedure with level 0.1. P-values of rejected (crosses) and non-rejected (triangles) hypotheses. 4.1 Union The class of step-up procedures is closed under the union operation: To be precise, if hu and h̃u are two step-up procedures, their union is computed by another step-up procedure h with threshold function τα (i) = max(ταu (i), τ̃αu (i)) as visualised in Fig. 1 (left). This is seen as follows: As ταu (i), τ̃αu (i) ≤ τα (i) for all i ∈ M , all hypotheses rejected by either u h or h̃u are also rejected by h, that is hu ∪ h̃u ⊆ h. Likewise, as τα (i) takes precisely one of the values ταu (i) or τ̃αu (i) for each i ∈ M , any p-value belonging to the non-rejection area of both procedures hu and h̃u also stays non-rejected in h, hence (hu )c ∩ (h̃u )c ⊆ hc . Moreover, the subclass of well-behaved step-up procedures is also closed under the union operation as proven in the following lemma. Lemma 3. If hu and h̃u are two step-up procedures which satisfy Condition 2 then so does the union hu ∪ h̃u . Similarly, the union of two step-down procedures hd and h̃d (having threshold functions ταd and τ̃αd ) is obtained through another step-down procedure characterised by the threshold function τα (i) = max(ταd (i), τ̃αd (i)). Since the proof of Lemma 3 does not use any properties of ταu and τ̃αu other than that both satisfy Condition 2, the maximum of two step-down threshold functions likewise leads to a threshold function satisfying Condition 2. 4.2 Intersection Similarly to Section 4.1, the intersection of two step-up procedures hu and h̃u is again a step-up procedure h, characterised by the new threshold function τα (i) = min(ταu (i), τ̃αu (i)) as visualised in Fig. 1 (right). This is seen as follows: As ταu (i), τ̃αu (i) ≥ τα (i) for all i ∈ M , any hypothesis non-rejected by either procedure hu or h̃u is also non-rejected by h, that is (hu )c ∪ (h̃u )c ⊆ hc . Likewise, as τα (i) takes precisely one of the values ταu (i) or τ̃αu (i) for each i ∈ M , any p-value in the rejection area of both procedures remains rejected when tested with h, thus hu ∩ h̃u ⊆ h. 6 Similarly to Lemma 3, the subclass of well-behaved step-up procedures is again closed under the intersection operation. Lemma 4. If hu and h̃u are two step-up procedures which satisfy Condition 2 then so does the intersection hu ∩ h̃u . The intersection of two step-down procedures hd and h̃d is again obtained with another step-down procedure using the threshold function τα (i) = min(ταd (i), τ̃αd (i)). Analogously to Section 4.1, the proof of Lemma 4 does not use any properties of ταu and τ̃αu other than that both satisfy Condition 2, thus the minimum of two step-down threshold functions again leads to a threshold function satisfying Condition 2. 4.3 Complement Whereas the complement is generally neither well-behaved nor monotonic, it can be computed for step-up and step-down procedures using the following construction. Let α be a known constant. We re-consider the step-up procedure hu with threshold function u τα . Then the step-down procedure hd (1 − p) with threshold function ταd (i) = 1 − ταu (m + 1 − i) applied to 1 − p (instead of p) computes the complement of hu (p), where 1 − p for p ∈ [0, 1]m is understood coordinate-wise. The reasoning behind this is as follows: For any hypothesis with p-value p(i) below ταu (i), 1 − p(i) (having rank m + 1 − i in the sorted sequence of values 1 − p) is above ταd (m + 1 − i) by construction of ταd . Therefore, all former rejections of hu turn into non-rejections of hd and vice versa. Likewise, the complement of a step-down procedure hd with threshold function ταd and constant α is computed by a step-up procedure hu with threshold function ταu (i) = 1 − ταd (m + 1 − i). Condition 2 is again satisfied: Lemma 5. Let α be a known constant. If the step-up procedure hu with threshold function ταu satisfies Condition 2, then so does its step-down complement hd (defined with threshold function ταd (i) = 1 − ταu (m + 1 − i)). The requirement that α be a known constant is crucial since ταd is not non-decreasing in α for a fixed i as required in the second part of Condition 2. However, Lemma 5 is made possible by the fact that for a given constant α (that is, if h and the threshold function seize to be a function of α), all the parts in Condition 1 (and likewise, Condition 2) which involve α can be ignored (see remark at the end of Section 2). 4.4 Difference Following the notation of Section 3, the difference h1 \ h2 of two procedures h1 and h2 can equivalently be written as h1 ∩ hc2 using the complement of h2 . If h2 is a step-up procedure, hc2 turns into a step-down procedure (see Section 4.3). Therefore, in case both h1 and h2 are step-up (step-down) procedures satisfying Condition 2, Lemma 1 yields that h1 \ h2 is still monotonic but not well-behaved any more. However, if h1 is a step-down and h2 is a step-up procedure (or vice versa), the results from Section 4.2 apply and yield that h1 \ h2 a well-behaved step-up/step-down procedure with explicit threshold function. 7 4.5 Example Suppose we are interested in testing H01 , . . . , H0m for statistical significance while ensuring FDR control at a pre-specified level 0.05, for instance using the Benjamini and Hochberg (1995) procedure. Additionally, we are interested in only selecting those k ∈ N hypotheses having the lowest p-values (assuming there are no ties), for instance due to the fact that budget constraints only allow follow-up studies for k hypotheses. We thus look to construct an intersection procedure which returns the indices of hypotheses satisfying both requirements simultaneously. To this end, let h1 be the Benjamini and Hochberg (1995) step-up procedure controlling the FDR at level 0.05, defined through the threshold function τ 1 (i) = 0.05 · i/m for i ∈ {1, . . . , m}. Moreover, let h2 be the (step-up) Bonferroni (1936) correction with constant but p-dependant threshold function τp2 (i) = p(k) for i ∈ {1, . . . , m}, where p(k) denotes the k’th smallest entry of vector p = (p1 , . . . , pm ). By construction, all rejected hypotheses by h2 are precisely the ones with the k lowest p-values. Threshold functions τα for which α = α(p) is a function of p are widely used in practice, for instance when using an estimate of the proportion of true null hypotheses to correct the level α (see, for instance, Example 1 in Gandy and Hahn (2016)). Both the Benjamini and Hochberg (1995) procedure h1 and the Bonferroni (1936) correction h2 satisfy Condition 2 and are thus well-behaved. Following Section 4.2, the step-up procedure h defined through the threshold function τp (i) = min(τ 1 (i), τp2 (i)) = min(0.05 · i/m, p(k) ) computes h1 ∩ h2 . Moreover, h is well-behaved by Lemma 4. Consider the numerical example of 15 ordered p-values (here denoted as p̃) given in Section 3.2 of Benjamini and Hochberg (1995). In agreement with Benjamini and Hochberg (1995), who test p̃ while controlling the FDR at level 0.05 and observe four rejections (of the first four hypotheses), h1 applied to p̃ yields h1 (p̃) = {1, 2, 3, 4}. Applying the intersection procedure h constructed above with k = 3 to p̃ yields h(p̃) = {1, 2, 3}, that is h indeed yields those k = 3 hypotheses having the lowest p-values which are also significant under FDR control at level 0.05. 5 Discussion This article investigates closure properties of general multiple testing procedures, step-up and step-down procedures as well as subclasses of (solely) monotonic and well-behaved procedures under four set operations (union, intersection, complement and difference). The article shows that for general multiple testing procedures, solely the class of monotonic procedures is closed under taking the union and intersection. However, the subclass of wellbehaved step-up (step-down) procedures is closed under taking the union and intersection. The implications of the closure properties proven in this article are threefold: They provide a tool to construct new procedures of known form and with known properties, they render theoretical results (Gordon, 2007; Gordon and Salzman, 2008) instantly applicable to a large class of multiple testing procedures and they allow to combine the benefits of various multiple testing procedures in practice. A Proofs The appendix contains all proofs sorted by section. 8 A.1 Proofs of Section 3 Proof of Lemma 1. We prove both assertions. 1. Monotonicity. If p ≤ q and α ≤ α0 then h1 (q, α) ⊆ h1 (p, α0 ), h2 (q, α) ⊆ h2 (p, α0 ) and thus h1 (q, α) ∪ h2 (q, α) ⊆ h1 (p, α0 ) ∪ h2 (p, α0 ) as well as h1 (q, α) ∩ h2 (q, α) ⊆ h1 (p, α0 ) ∩ h2 (p, α0 ). The second statement of Condition 1. As h1 satisfies Condition 1, there exists δ1 such that max(kp − p∗ k, |α − α∗ |) < δ1 implies h1 (p, α) = h1 (p∗ , α∗ ). Likewise for h2 with a suitable δ2 . For δ = min(δ1 , δ2 ) and max(kp − p∗ k, |α − α∗ |) < δ, we have h1 (p, α) = h1 (p∗ , α∗ ) and h2 (p, α) = h2 (p∗ , α∗ ) and thus h1 ∪ h2 (p, α) = h1 ∪ h2 (p∗ , α∗ ). Likewise for the intersection. 2. Fix α. If q ≤ p then hi (p, α) ⊆ hi (q, α), but hi (p, α)c ⊇ hi (q, α)c for i ∈ {1, 2}. The complement is thus not monotonic. The operation h1 (p, α) \ h2 (p, α) is equivalent to h1 (p, α) ∩ (h2 (p, α))c and thus also not monotonic. A.2 Proofs of Section 4 Proof of Lemma 2. Let h be a step-up (step-down) procedure characterised through its threshold function τα . We now verify Condition 2. 1. We show that τα (i) must be non-decreasing in i for a fixed α. Indeed, suppose τα is decreasing for some i. Then h cannot be monotonic for all inputs: Assume that m = 2, p = (0.5, 0.5) and h is of step-up type with τα (1) = 1 and τα (2) = 0. Then h(p) = {1} but increasing p to q = (1, 0.5) results in h(q) = {2} 6⊆ h(p), thus contradicting monotonicity. 2. We show that τα (i) must also be non-decreasing in α for any fixed i. Indeed, for a fixed i, suppose τα (i) > τα0 (i) for α < α0 . Then h can again not be monotonic for all inputs: Assume we test m = 1 hypothesis H01 with p-value p = τα (1) > τα0 (1). Then H01 is rejected at τα (1) but non-rejected at τα0 (1) even though α < α0 , thus contradicting monotonicity. 3. We show that τα (i) is continuous in α for a fixed i. Let  > 0 be given. Fix i and α∗ . We show continuity of the threshold function at α∗ as α → α∗ . Case 1: α∗ > α. Then τα∗ (i) ≥ τα (i) by monotonicity. Define p∗ = (0, . . . , 0, p∗i , 1, . . . , 1) for any p∗i ∈ [0, τα∗ (i)) (i.e., p∗ contains p∗i as ith entry, zeros before and ones after). Since h is wellbehaved it satisfies the second part of Condition 1, hence for the fixed p∗ and α∗ there exists δ > 0 such that for all α and p satisfying |α−α∗ | < δ, kp−p∗ k < δ we have h(p, α) = h(p∗ , α∗ ). Assume |α − α∗ | < δ. Define p = (0, . . . , 0, p∗i − γ, 1, . . . , 1) for any 0 < γ < min(δ, ). Since |α − α∗ | < δ and kp − p∗ k = γ < δ, h(p, α) = h(p∗ , α∗ ) by Condition 1: As the ith hypothesis is rejected in h(p∗ , α∗ ) and hence also in h(p, α), it follows that τα∗ (i) ≥ τα (i) ≥ pi = p∗i − γ. This holds true for all p∗i ∈ [0, τα∗ (i)), thus τα∗ (i) ≥ τα (i) ≥ τα∗ (i) − γ and hence |τα∗ (i) − τα (i)| ≤ γ < . Case 2: α∗ ≤ α. Then τα∗ (i) ≤ τα (i). Using p∗ = (0, . . . , 0, p∗i , 1, . . . , 1) with p∗i ∈ (τα∗ (i), 1] and p = (0, . . . , 0, p∗i + γ, 1, . . . , 1) with 0 < γ < min(δ, ), the same argument as in Case 1 yields τα∗ (i) ≤ τα (i) < τα∗ (i) + γ. Proof of Lemma 3. Let h = hu ∪ h̃u be defined through τα (i) = max(ταu (i), τ̃αu (i)). First, h is monotonic by Lemma 1. We now verify Condition 2. 9 1. The function τα (i) is non-decreasing in i: Suppose w.l.o.g. τα (i) = ταu (i). If ταu (i + 1) ≥ + 1) then τα (i) = ταu (i) ≤ ταu (i + 1) = τα (i + 1) by definition of τα as the maximum of ταu and τ̃αu . If ταu (i + 1) < τ̃αu (i + 1) then τα (i) = ταu (i) ≤ ταu (i + 1) < τ̃αu (i + 1) = τα (i + 1). τ̃αu (i 2. τα is continuous in α as the maximum of two continuous functions (in this case in α) is continuous. The function τα is also non-decreasing in α: Indeed, fix i, let α ≤ α0 and suppose w.l.o.g. τα (i) = ταu (i). If ταu0 (i) ≤ τ̃αu0 (i) then τα (i) = ταu (i) ≤ ταu0 (i) ≤ τ̃αu0 (i) = τα0 (i) by definition of τα as the maximum of ταu and τ̃αu . Otherwise, τα (i) = ταu (i) ≤ ταu0 (i) = τα0 (i). Proof of Lemma 4. Let h = hu ∩ h̃u be defined through τα (i) = min(ταu (i), τ̃αu (i)). Again, h is monotonic by Lemma 1. We now verify Condition 2. 1. The function τα (i) is non-decreasing in i: Suppose w.l.o.g. τα (i) = ταu (i). If ταu (i + 1) ≥ τ̃αu (i + 1) then τα (i) = ταu (i) ≤ τ̃αu (i) ≤ τ̃αu (i + 1) = τα (i + 1) by definition of τα as the minimum of ταu and τ̃αu . If ταu (i + 1) < τ̃αu (i + 1) then τα (i) = ταu (i) ≤ ταu (i + 1) = τα (i + 1). 2. τα is continuous in α as the minimum of two continuous functions (in this case in α) is continuous. The function τα is also non-decreasing in α: Indeed, fix i, let α ≤ α0 and suppose w.l.o.g. τα (i) = ταu (i). If ταu0 (i) ≤ τ̃αu0 (i) then τα (i) = ταu (i) ≤ ταu0 (i) = τα0 (i). Otherwise, τα (i) = ταu (i) ≤ τ̃αu (i) ≤ τ̃αu0 (i) = τα0 (i) (by definition of τα as the minimum). Proof of Lemma 5. Since ταu (i) is non-decreasing in i, it is immediate to verify that ταd (i) is also non-decreasing in i. For a given constant α, the second part of Condition 2 can be ignored as shown in (Gandy and Hahn, 2014, Condition 1) and is hence automatically satisfied (see Section 2). References Benjamini, Y. and Hochberg, Y. (1995). Controlling the false discovery rate: A practical and powerful approach to multiple testing. J Roy Stat Soc B Met, 57(1):289–300. Besag, J. and Clifford, P. (1991). Sequential Monte Carlo p-values. Biometrika, 78(2):301–304. Bonferroni, C. (1936). Teoria statistica delle classi e calcolo delle probabilità. Pubblicazioni del R Istituto Superiore di Scienze Economiche e Commerciali di Firenze, 8:3–62. Dmitrienko, A. and Tamhane, A. (2013). General theory of mixture procedures for gatekeeping. Biom J, 55(3):402–419. Finner, H. and Strassburger, K. (2002). The partitioning principle: a powerful tool in multiple decision theory. Ann Stat, 30(4):1194–1213. Gabriel, K. (1969). Simultaneous Test Procedures – Some Theory of Multiple Comparisons. Ann Math Statist, 40(1):224–250. Gandy, A. and Hahn, G. (2014). MMCTest – A Safe Algorithm for Implementing Multiple Monte Carlo Tests. Scand J Stat, 41(4):1083–1101. 10 Gandy, A. and Hahn, G. (2016). A framework for Monte Carlo based Multiple Testing. Scand J Stat, 43(4):1046–1063. Gordon, A. (2007). Unimprovability of the Bonferroni procedure in the class of general step-up multiple testing procedures. Stat Probab Lett, 77(2):117–122. Gordon, A. and Salzman, P. (2008). Optimality of the Holm procedure among general step-down multiple testing procedures. Stat Probab Lett, 78(13):1878–1884. Guo, W. and Peddada, S. (2008). Adaptive choice of the number of bootstrap samples in large scale multiple testing. Stat Appl Genet Mol Biol, 7(1):1–16. Hochberg, Y. (1988). A sharper Bonferroni procedure for multiple tests of significance. Biometrika, 75(4):800–802. Hochberg, Y. and Tamhane, A. (2008). Multiple Comparison Procedures. Wiley. Holm, S. (1979). A simple sequentially rejective multiple test procedure. Scand J Stat, 6(2):65– 70. Hommel, G. and Bretz, F. (2008). Aesthetics and power considerations in multiple testing – a contradiction? Biom J, 50(5):657–666. Hommel, G., Bretz, F., and Maurer, W. (2007). Powerful short-cuts for multiple testing procedures with special reference to gatekeeping strategies. Stat Med, 26(22):4063–4073. Hsu, J. (1996). Multiple Comparisons: Theory and Methods. Chapman and Hall/CRC. Lin, D. (2005). An efficient Monte Carlo approach to assessing statistical significance in genomic studies. Bioinformatics, 21(6):781–787. Marcus, R., Peritz, E., and Gabriel, K. (1976). On closed testing procedures with special reference to ordered analysis of variance. Biometrika, 63(3):655–660. Romano, J. and Shaikh, A. (2006). Stepup procedures for control of generalizations of the familywise error rate. Ann Stat, 34(4):1850–1873. Romano, J. and Wolf, M. (2005). Exact and Approximate Stepdown Methods for Multiple Hypothesis Testing. J Am Stat Assoc, 100(469):94–108. Roth, A. (1999). Multiple comparison procedures for discrete test statistics. J Stat Plan Infer, 82(1-2):101–117. Sandve, G., Ferkingstad, E., and Nygard, S. (2011). Sequential Monte Carlo multiple testing. Bioinformatics, 27(23):3235–3241. Sidak, Z. (1967). Rectangular confidence regions for the means of multivariate normal distributions. J Am Stat Assoc, 62(318):626–633. Tamhane, A. and Liu, L. (2008). On weighted Hochberg procedures. Biometrika, 95(2):279–294. van Wieringen, W., van de Wiel, M., and van der Vaart, A. (2008). A test for partial differential expression. J Am Stat Assoc, 103(483):1039–1049. Westfall, P. and Young, S. (1993). Resampling-based multiple testing: Examples and methods for p-value adjustment. Wiley. 11
10math.ST
Integrating Research Data Management into Geographical Information Systems Christian T. Jacobs, Alexandros Avdis, Simon L. Mouradian, and Matthew D. Piggott arXiv:1509.04729v1 [cs.DL] 15 Sep 2015 Department of Earth Science and Engineering, South Kensington Campus, Imperial College London, London SW7 2AZ, United Kingdom {c.jacobs10,a.avdis,simon.mouradian06,m.d.piggott}@imperial.ac.uk http://www.imperial.ac.uk/engineering/departments/earth-science Abstract. Ocean modelling requires the production of high-fidelity computational meshes upon which to solve the equations of motion. The production of such meshes by hand is often infeasible, considering the complexity of the bathymetry and coastlines. The use of Geographical Information Systems (GIS) is therefore a key component to discretising the region of interest and producing a mesh appropriate to resolve the dynamics. However, all data associated with the production of a mesh must be provided in order to contribute to the overall recomputability of the subsequent simulation. This work presents the integration of research data management in QMesh, a tool for generating meshes using GIS. The tool uses the PyRDM library to provide a quick and easy way for scientists to publish meshes, and all data required to regenerate them, to persistent online repositories. These repositories are assigned unique identifiers to enable proper citation of the meshes in journal articles. Keywords: Geographical Information Systems, Research Data Management, Digital Curation, Reproducibility, Digital Object Identifier, Online Repositories 1 Introduction Computer simulations of ocean dynamics are becoming ever more important to predict the effects of global-scale hazards such as tsunamis [13], the influence of marine renewable energy turbines on sediment transport [20], and the dispersal range of nuclear contaminants [6], to name just a few applications. The underlying numerical model behind such simulations often requires a mesh upon which the equations describing the flow dynamics are solved, thereby transitioning from a continuous description of the region of interest (also known as the domain) to a discrete one. An example focussing on the area around the Orkney and Shetland Isles is shown in Figure 1. A mesh for ocean simulations must be of high enough quality to resolve the intricate coastlines and bathymetry [12]. However, creating such a mesh manually is infeasible for large-scale, high-resolution simulations. Geographical Information Systems (GIS) offer an effective way of processing bathymetry and coastline data to create a geometry with which to work [19]. 2 Data Management in Geographical Information Systems Fig. 1. An example of an unstructured computational mesh which discretises the marine area around the North-East coast of Scotland. The resolution is highest around the Scottish coastline and around the Orkney and Shetland Isles. A method of producing a computational mesh from this geometry is then required to perform a simulation on it. QMesh [2] is a software package currently being developed at Imperial College London for this purpose. QMesh reads in a geometry defined in the QGIS Geographical Information System software [21], and then converts the geometry into a readable format for the Gmsh mesh generation software [11], which in turn generates the mesh to provide a discrete representation of the domain. Ocean simulations may then be performed with a computational fluid dynamics package. Publications that are dependant on numerical simulation often provide details of the simulation setups to improve reproducibility and indeed recomputability. However, while a description of the domain may also be given, the mesh that discretises this domain is rarely provided as a supplementary material. This lack of data availability has also been highlighted in many other areas of science [27], [1], [26]. Furthermore, citations to the software used to produce the mesh typically only refer to a generic user manual and contain no information about which version was used. For the purpose of recomputability and reproducibility, it is crucial that researchers provide all the data files, as well as the precise version of the software’s source code used to produce the output in the first place [8], [5]. In the case of this work, the input data is the geographical information defining the domain, the output data is the computational mesh, and the software is QMesh (and its dependencies). Data Management in Geographical Information Systems 3 Despite the need for a more open research environment where software and datasets are shared freely, the level of motivation amongst researchers to do this is generally quite low. This is in part due to the extra effort and time required to gather and publish the data [18], whilst typically gaining little from the process. To encourage the sharing of data and improve its reproducibility and recomputability, it is therefore important to make the publication process more straight forward and swift. This can be effected by the development of research data management tools that readily capture the datasets involved and information about the software being used [25], [18]. This paper describes the integration of a research data management tool, which uses the PyRDM library [14], into the QMesh software. The tool automates the publication of the QMesh source code, as well as the input and output data for a specified QGIS project, to online, citable and persistent repositories such as those provided by Figshare (figshare.com), Zenodo (zenodo.org) and DSpace-based (dspace.org) hosting services. The tool has both a command line and a graphical user interface, and allows users to publish the software and data at the ‘push of a button’, thereby facilitating sharing and a more open research environment. In contrast to other software tools that also facilitate the publication of code and datasets, such as Fidgit [24], rfigshare [4], and dvn [17], the QMesh publishing tool incorporates application-specific knowledge to provide a greater amount of automation. For example, the tool is able to parse QGIS project files to automatically determine the relevant input data to publish, rather than the user having to specify the data files manually. Furthermore, this work represents a novel application of research data management and curation software within a GIS environment. Section 2 describes in greater detail the extensions made to the QMesh software to automate the publication process for the software itself, the input files (for a given QGIS project) and any output files (i.e. the computational mesh). Section 3 presents a realistic example of a scientific workflow involving production of a mesh of a UK coastal region. The data files are read in to QGIS and a mesh is produced. Both the QGIS data and mesh are subsequently published to an online repository provided by Figshare, and a DOI is assigned which can be used to properly cite the data in journal articles. Finally, some concluding remarks are made in Section 4. 2 Integration with QMesh QMesh features a command line interface (CLI), as well as a graphical user interface (GUI) via a QGIS plugin through which users can select relevant geometry objects and produce a mesh. The integration of research data management techniques into QMesh was achieved by adding a PyRDM-based publishing tool to both of these interfaces. The tool provides the option of publishing the QMesh software source code and data required to reproduce the mesh to separate online repositories. Users are presented with a simple interface and only have to provide a minimal amount 4 Data Management in Geographical Information Systems of information; this is illustrated in Figure 2. The publication process itself is handled by the PyRDM library [14] which communicates with an online repository hosting service via its Application Programming Interface (API). The publication process results in a Digital Object Identifier (DOI) [7] being assigned to the repository, with which users can properly cite their research outputs. Fig. 2. The QMesh publisher tool, which is part of the QMesh QGIS plugin. Users choose the online repository service that they wish to use; by default this is set to Figshare. In addition to the input data files associated with the QGIS project, users may also publish the output data file (i.e. the resulting computational mesh) produced by QMesh, if they so desire. By default, the publication is made public unless the user decides otherwise; in the case of private publication, a DOI is still assigned to the repository, but will not be made active/‘live’ until the repository is made public. The publication of data is handled separately to the publication of the QMesh software. In the former case, when a suitable mesh has been produced and is ready to be published, users simply have to provide the QMesh publishing tool with the location of the QGIS project file on the computer’s file system when using the CLI. When using the GUI, this location is provided automatically when the project is opened in QGIS. The tool then searches for the <datasource> tags in the XML-based project file to determine the location of all the files that the project comprises; these may include shape files that define various layers in the Data Management in Geographical Information Systems 5 geometry, data files in NetCDF format [23] which define the bathymetry of the ocean, and a multitude of other data formats. Optionally, the location of the Gmsh mesh file may also be provided, thereby publishing the resultant output data along with the files required to produce it. The locations of all these data files, including the QGIS project file itself, are then provided to PyRDM which automatically creates a repository on the hosting service and uploads the files via the service’s API. The service then returns a publication ID and a DOI, which is presented to the user for citation purposes. This process is illustrated in Figure 3. The publication of software involves a similar process, but can currently only be accomplished via the CLI. The user only has to provide the QMesh publishing tool with the location of the software’s source code on the computer’s file system. The PyRDM library then handles the rest; it determines the exact version of QMesh currently in use using the Git version control system (git-scm.com) [22], and then checks to see whether that version has been published already1 . If it has, PyRDM retrieves the existing DOI for re-use. If it has not, then PyRDM publishes the source code in a similar fashion to the case of publishing data, as shown in Figure 3. Note that publications in journals would need to reference both the software repository’s DOI and the data repository’s DOI. There is currently no explicit link that is made between the software and data repositories, unless specified manually. As demonstrated by Figure 3, the QMesh publishing tool requires minimal user interaction and is largely automated by the PyRDM library. This is important for encouraging the sharing of software and data files, in order to achieve a more open research environment. 3 Workflow Example To demonstrate an example of a scientific workflow involving mesh generation using GIS, the Orkney and Shetland Isles considered in [2] and [3] are used. The researcher first has to describe the geography of the domain in QGIS and then decide on the area they wish to create a mesh for. The QGIS project for the Orkney and Shetland Isles comprises a number of geometrical layers which define the coastlines (and potentially coastal engineering structures such as marine power turbines), in addition to a NetCDF file which defines the bathymetry of the ocean floor, and another NetCDF file which defines the desired resolution throughout the mesh. These files are shown in Figure 4 beside the area that will be meshed. The mesh that QMesh produces for this domain (shown in Figure 1) is then used by the researcher in their marine simulations. Once the researcher is ready to publish their results, they upload the data files associated with the production 1 Repository searching is only available when using the Figshare repository service, due to API limitations explained later in Section 4. PyRDM will publish the software regardless of whether it has been published before when Zenodo or a DSpace-based service is chosen. 6 Data Management in Geographical Information Systems Fig. 3. The processes behind publishing the QGIS data files (left) and QMesh software source code (right) to Figshare. Fig. 4. Screenshot of the UK region visualised in QGIS. The solid dark purple line defines the area that will be meshed (in this case it contains the Orkney and Shetland Isles). The different files that make up the layers of the geometry are specified in the column on the left-hand side. Data Management in Geographical Information Systems 7 of the simulation’s mesh to an online repository using the QMesh publishing tool shown in Figure 2 (the CLI may also be used instead of the graphical interface). In this example, it uploads all the files previously mentioned to Figshare. Once uploaded, the files can be downloaded from the Figshare website (see Figure 5) and a DOI is presented to the researcher to share with colleagues and for use in journal publications (see Figure 6). Fig. 5. A screenshot of the resulting repository on the Figshare website, with the files readily available to download. The QMesh publishing tool automatically assigns a title and tags to the repository based on the QGIS project’s name. The version of the QMesh software’s source code that is used should also be published, in a separate repository to the data. However, it should be noted that publishing the QMesh source code may not be enough to reproduce the exact same mesh without also knowing the versions of its dependencies. For example, different versions of Gmsh may produce slightly different meshes as a result of algorithmic improvements within the software. It is therefore important that such information be recorded in some way to further improve the degree of reproducibility. For example, ideally Gmsh would also have a similar system for publishing the current version of its source code in use. 8 Data Management in Geographical Information Systems Fig. 6. A Figshare publication ID and a DOI are assigned to each repository, and presented to the researcher once the publication process is complete. 4 Discussion and Conclusions Throughout the production of the PyRDM-based publishing tool for QMesh, several issues were encountered which largely stemmed from a lack of standardisation and support in the repository hosting services’ APIs. For example, in order for PyRDM to attribute authors to the software repository on Figshare, all authors of QMesh must provide their Figshare author IDs in the AUTHORS file that is part of the QMesh source code. Unfortunately, another different set of author IDs would need to be provided when using a different repository service such as Zenodo, which is inconvenient and requires all authors of QMesh to have accounts across all the supported services. A more standardised way of identifying and attributing authors to research software and data would be to use ORCID (orcid.org) researcher IDs. Figshare has recently added support for authenticating with ORCID IDs via its web interface [9], and it is hoped that ORCID authentication via the Figshare API will also be added for the benefit of PyRDM. Another example, this time involving lack of API support, is the current inability to search for an existing repository with the Zenodo API. Further developments are necessary in this area to enrich the publication process and improve automation. The production of meshes can involve proprietary and/or private data which cannot be published openly, but at the same time sharing all research output is becoming a common requirement imposed by research funders. The QMesh publishing tool comes with the option of publishing the data to private repositories. However, with some services the private storage space is rather limited, and typically not large enough to store high quality mesh files for realistic ocean simulations. For example, the free private storage space offered by Figshare is 1 GB at the time of writing this paper, with a 250 MB individual file size limit2 . Furthermore, only a maximum of 5 collaborators can be given access to a private repository. In contrast, the integration of Figshare for Institutions [10] offers a more suitable platform for larger-scale research data management. This project enables researchers at an institution to publish to private repositories hosted in the cloud. This is considerably more sustainable for GIS projects and mesh 2 http://figshare.com/pricing Data Management in Geographical Information Systems 9 generation that can involve very large file sizes, both public and private data, and collaboration amongst many researchers and research groups. In conclusion, the integration of a publishing tool in a Geographical Information System has helped to mitigate one of the reasons why researchers tend not to publish their software and data; that is, it is time-consuming to do so with little reward. The new QMesh publishing tool makes publishing a computational mesh and associated data files easy and largely effortless through the addition of a significant amount of automation. Furthermore, the use of online repository services enable more formal citation of all research outputs through the use of DOIs. However, it is the responsibility of the scientific community to encourage and provide incentives for the openness and public availability of this software and data, in order to overcome the barrier of lack of motivation to publish. Acknowledgments CTJ was funded by an internal grant entitled “Research data management: Where software meets data” from the Research Office at Imperial College London. Part of the work presented in this paper is based on work first presented in poster form at the International Digital Curation Conference (IDCC) in February 2015 [16], and in a PyRDM project report [15]. The authors would like to thank the two anonymous reviewers of this paper for their feedback. References 1. Alsheikh-Ali, A.A., Qureshi, W., Al-Mallah, M.H., Ioannidis, J.P.A.: Public Availability of Published Research Data in High-Impact Journals. PLoS ONE 6(9), e24357 (2011) 2. Avdis, A., Hill, J., Jacobs, C.T., Kramer, S.C., Candy, A.S., Gorman, G.J., Piggott, M.D.: Efficient unstructured mesh generation for renewable tidal energy using Geographical Information Systems (In Preparation) 3. Avdis, A., Jacobs, C.T., Hill, J., Piggott, M.D., Gorman, G.J.: Shoreline and Bathymetry Approximation in Mesh Generation for Tidal Renewable Simulations. In: Proceedings of the 11th European Wave and Tidal Energy Conference (Accepted) 4. Boettiger, C., Chamberlain, S., Ram, K., Hart, E.: rfigshare: an R interface to figshare.com. (2014), http://CRAN.R-project.org/package=rfigshare, r package version 0.3-1 5. Buckheit, J.B., Donoho, D.L.: WaveLab and Reproducible Research. In: Antoniadis, A., Oppenheim, G. (eds.) Wavelets and Statistics, Lecture Notes in Statistics, vol. 103, pp. 55–81. Springer, New York (1995) 6. Choi, Y., Kida, S., Takahashi, K.: The impact of oceanic circulation and phase transfer on the dispersion of radionuclides released from the Fukushima Dai-ichi Nuclear Power Plant. Biogeosciences 10, 4911–4925 (2013) 7. Davidson, L.A., Douglas, K.: Digital Object Identifiers: Promise and Problems for Scholarly Publishing. Journal of Electronic Publishing 4(2) (1998) 8. de Leeuw, J.: Reproducible Research: the Bottom Line. Department of Statistics Papers, University of California (2001), http://escholarship.org/uc/item/ 9050x4r4 10 Data Management in Geographical Information Systems 9. Figshare: figshare ORCID integration. Figshare blog, http://figshare.com/blog (2013) 10. Figshare: Loughborough University, figshare, Arkivum and Symplectic announce pioneering research data management solution. Figshare blog, http://figshare.com/blog (2014) 11. Geuzaine, C., Remacle, J.F.: Gmsh: A 3-D finite element mesh generator with builtin pre- and post-processing facilities. International Journal for Numerical Methods in Engineering 79(11), 1309–1331 (2009) 12. Gorman, G.J., Piggott, M.D., Wells, M.R., Pain, C.C., Allison, P.A.: A systematic approach to unstructured mesh generation for ocean modelling using GMT and Terreno. Computers & Geosciences 34(12), 1721–1731 (2008) 13. Hill, J., Collins, G.S., Avdis, A., Kramer, S.C., Piggott, M.D.: How does multiscale modelling and inclusion of realistic palaeobathymetry affect numerical simulation of the Storegga Slide tsunami. Ocean Modelling 83, 11–25 (2014) 14. Jacobs, C.T., Avdis, A., Gorman, G.J., Piggott, M.D.: PyRDM: A Python-based library for automating the management and online publication of scientific software and data. Journal of Open Research Software 2(1), e28 (2014) 15. Jacobs, C.T., Avdis, A., Gorman, G.J., Piggott, M.D.: RDM Green Shoots Project Report: Research data management: Where software meets data (2014), http: //dx.doi.org/10.6084/m9.figshare.1269127 16. Jacobs, C.T., Avdis, A., Gorman, G.J., Piggott, M.D.: PyRDM: A library to facilitate the automated publication of software and data in computational science. Poster presentation at the 10th International Digital Curation Conference (2015), http://dx.doi.org/10.6084/m9.figshare.1318710 17. Leeper, T.J.: Archiving Reproducible Research with R and Dataverse. The R Journal 6(1) (2014), http://journal.r-project.org/archive/2014-1/leeper.pdf 18. LeVeque, R.J., Mitchell, I.M., Stodden, V.: Reproducible Research for Scientific Computing: Tools and Strategies for Changing the Culture. Computing in Science & Engineering 14(4), 13–17 (2012) 19. Li, R.: Data Models for Marine and Coastal Geographic Information Systems, chap. 3. CRC Press (2000) 20. Martin-Short, R., Hill, J., Kramer, S.C., Avdis, A., Allison, P.A., Piggott, M.D.: Tidal resource extraction in the Pentland Firth, UK: potential impacts on flow regime and sediment transport in the Inner Sound of Stroma. Renewable Energy 76, 596–607 (2015) 21. QGIS Development Team: QGIS Geographic Information System. Open Source Geospatial Foundation (2009), http://qgis.osgeo.org 22. Ram, K.: Git can facilitate greater reproducibility and increased transparency in science. Source Code for Biology and Medicine 8(7) (2013) 23. Rew, R.K., Davis, G.P.: NetCDF: an interface for scientific data access. IEEE Computer Graphics and Applications 10(4), 76–82 (1990) 24. Smith, A.: Fidgit - DOIs for code. figshare (2013), http://dx.doi.org/10.6084/ m9.figshare.828487 25. Stodden, V., Bailey, D., Borwein, J., LeVeque, R.J., Rider, W., Stein, W.: Setting the Default to Reproducible: Reproducibility in Computational and Experimental Mathematics. Tech. rep., Institute for Computational and Experimental Research in Mathematics (ICERM) (2013), http://www.davidhbailey.com/ dhbpapers/icerm-report.pdf 26. Vines, T.H., Andrew, R.L., Bock, D.G., Franklin, M.T., Gilbert, K.J., Kane, N.C., Moore, J.S., Moyers, B.T., Renaut, S., Rennison, D.J., Veen, T., Yeaman, S.: Man- Data Management in Geographical Information Systems 11 dated data archiving greatly improves access to research data. The FASEB Journal 27(4), 1304–1308 (2013) 27. Whitlock, M.C., McPeek, M.A., Rausher, M.D., Rieseberg, L., Moore, A.J.: Data Archiving. The American Naturalist 175(2), 145–146 (2010)
5cs.CE
Approximating Directed Steiner Problems via Tree Embedding Bundit Laekhanukit∗.† arXiv:1511.06559v3 [cs.DS] 29 Feb 2016 March 1, 2016 Abstract Directed Steiner problems are fundamental problems in Combinatorial Optimization and Theoretical Computer Science. An important problem in this genre is the k-edge connected directed Steiner tree (k-DST) problem. In this problem, we are given a directed graph G on n vertices with edge-costs, a root vertex r, a set of h terminals T and an integer k. The goal is to find a min-cost subgraph H ⊆ G that connects r to each terminal t ∈ T by k edge-disjoint r, t-paths. This problem includes as special cases the well-known directed Steiner tree (DST) problem (the case k = 1) and the group Steiner tree (GST) problem. Despite having been studied and mentioned many times in literature, e.g., by Feldman et al. [SODA’09, JCSS’12], by Cheriyan et al. [SODA’12, TALG’14] and by Laekhanukit [SODA’14], there was no known non-trivial approximation algorithm for k-DST for k ≥ 2 even in the special case that an input graph is directed acyclic and has a constant number of layers. If an input graph is not acyclic, the complexity status of k-DST is not known even for a very strict special case that k = 2 and |T | = 2. In this paper, we make a progress toward developing a non-trivial approximation algorithm for k-DST. We present an O(D · k D−1 · log n)-approximation algorithm for k-DST on directed acyclic graphs (DAGs) with D layers, which can be extended to a special case of k-DST on “general graphs” when an instance has a D-shallow optimal solution, i.e., there exist k edge-disjoint r, t-paths, each of length at most D, for every terminal t ∈ T . For the case k = 1 (DST), our algorithm yields an approximation ratio of O(D log h), thus implying an O(log3 h)-approximation algorithm for DST that runs in quasi-polynomial-time (due to the height-reduction of Zelikovsky [Algorithmica’97]). Our algorithm is based on an LP-formulation that allows us to embed a solution to a tree-instance of GST, which does not preserve connectivity. We show, however, that one can randomly extract a solution of k-DST from the tree-instance of GST. Our algorithm is almost tight when k, D are constants since the case that k = 1 and D = 3 is NP-hard to approximate to within a factor of O(log h), and our algorithm archives the same approximation ratio for this special case. We also remark that the k 1/4−ǫ -hardness instance of k-DST is a DAG with 6 layers, and our algorithm gives O(k 5 log n)-approximation for this special case. Consequently, as our algorithm works for general graphs, we obtain an O(D ·k D−1 · log n)-approximation algorithm for a D-shallow instance of the k edge-connected directed Steiner subgraph problem, where we wish to connect every pair of terminals by k edge-disjoint paths. ∗ The Weizmann Institute of Science, Israel, email:[email protected]. The work was partly done while the author was at McGill University, Simons Institute for the Theory of Computing and the Swiss AI Lab IDSIA. Partially supported by the ERC Starting Grant NEWNET 279352 and by Swiss National Science Foundation project 200020 144491/1. † 1 1 Introduction Network design is an important class of problems in Combinatorial Optimization and Theoretical Computer Science as it formulates scenarios that appear in practical settings. In particular, we might wish to design an overlay network that connects a server to clients, and this can be formulated as the Steiner tree problem. In a more general setting, we might have an additional constraint that the network must be able to function after link or node failures, leading to the formulation of the survivable network design problem. These problems are well-studied in symmetric case where a network can be represented by an undirected graph. However, in many practical settings, links in networks are not symmetric. For example, we might have different upload and download bandwidths in each connection, and sometimes, transmissions are only allowed in one direction. This motivates the study of network design problems in directed graphs, in particular, directed Steiner problems. One of the most well-known directed network design problem is the directed Steiner tree problem (DST), which asks to find a minimum-cost subgraph that connects a given root vertex to each terminal. DST is a notorious problem as there is no known polynomial-time algorithm that gives an approximation ratio better than polynomial. A polylogarithmic approximation can be obtained only when an algorithm is allowed to run in quasi-polynomial-time [CCC+ 99, Rot11, FKK+ 14]. A natural generalization of DST, namely, the k edge-connected directed Steiner tree (k-DST) problem, where we wish to connect a root vertex to each terminal by k edge-disjoint paths, is even more mysterious as there is no known non-trivial approximation algorithm, despite having been studied and mentioned many times in literature, e.g., by Feldman et al. [FKN12], by Cheriyan et al. [CLNV14] and by Laekhanukit [Lae14]. The focus of this paper is in studying the approximability of k-DST. Let us formally describe k-DST. In k-DST, we are given a directed graph G with edge-costs {ce }e∈E(G) , a root vertex r and a set of terminals T ⊆ V (G). The goal is to find a min-cost subgraph H ⊆ G such that H has a k edge-disjoint directed r, t-paths from the root r to each terminal t ∈ T . Thus, removing any k − 1 edges from H leaves at least one path from the root r to each terminal t ∈ T , and DST is the case when k = 1 (i.e., we need only one path). The complexity status of k-DST tends to be negative. It was shown by Cheriyan et al. [CLNV14] that the problem is at least as hard 1−ǫ as the label cover problem. Specifically, k-DST admits no 2log n -approximation, for any ǫ > 0, unless NP ⊆ DTIME(2polylog(n) ). Laekhanukit [Lae14], subsequently, showed that k-DST admits no k1/4−ǫ -approximation unless NP = ZPP. The integrality gap of a natural LP-relaxation for kDST is Ω(k/ log k) which holds even for a special case of connectivity-augmentation where we wish to increase a connectivity of a graph by one. All the lower bound results are based on the same construction which are directed acyclic graphs (DAGs) with diameter 5, i.e., any path in an input graph has length (number of edges) at most 5 (we may also say that it has 6 layers). Even for a very simple variant of k-DST, namely (1, 2)-DST, where we have two terminals, one terminal requires one path from the root and another terminal requires 2 edge-disjoint paths, it was not known whether the problem is NP-hard or polynomial-time solvable. To date, the only known positive result for k-DST is an O(nkh )-time (exact) algorithm for k-DST on DAGs [CLNV14], which thus runs in polynomial-time when kh is constant, and a folk-lore |T |-approximation algorithm, which can be obtained by computing min-cost k-flow for |T | times, one from the root r to each terminal t and then returning the union as a solution. We emphasize that there was no known non-trivial approximation algorithm even when an input graph is “directed acyclic” and has “constant number of layers”. Also, in contrast to DST, in which an O(2|T | poly(n))-time (exact) algorithm exists for 2 general graphs, it is not known whether k-DST for k = 2 and |T | = 2 is polynomial-time solvable if an input graph is not acyclic. This leaves challenging questions whether ones can design a nontrivial approximation algorithm for k-DST on DAGs with at most D layers, and whether ones can design a non-trivial approximation algorithm when an input graph is not acyclic. In this paper, we make a progress toward developing a non-trivial approximation algorithm for k-DST. We present the first “non-trivial” approximation algorithm for k-DST on DAGs with D layers that achieves an approximation ratio of O(D · kD−1 · log n). Our algorithm can be extended to a special case of k-DST on “general graphs” where an instance has a D-shallow optimal solution, i.e., there exist k edge-disjoint r, t-paths, each of length at most D, for every terminal t ∈ T . Consequently, as our algorithm works for a general graph, we obtain an O(D · kD−1 · log n)-approximation algorithm for a D-shallow instance of the k edge-connected directed Steiner subgraph problem, where we wish to connect every pair of terminals by k edge-disjoint paths, i.e., the set of terminal T is required to be k-edge connected in the solution subgraph (there is no root vertex in this problem). Our algorithm is almost tight when k and D are constants because the case that k = 1 and D = 3 is essentially the set cover problem, which is NP-hard to approximate to within a factor of O(log h) [LY94, Fei98], and our algorithm achieves the same approximation ratio. We also remark that the k1/4−ǫ -hardness instance of k-DST is a DAG with 6 layers, and our algorithm gives O(k5 log n)-approximation for this special case. For k = 1, we obtain a slightly better bound of O(D log h), thus giving an LP-based O(log3 h)-approximation algorithm for DST as a by product. The key idea of our algorithm is to formulate an LP-relaxation with a special property that a fractional solution can be embedded into a tree instance of the group Steiner tree problem (GST). Thus, we can apply the GKR Rounding algorithm in [GKR00] for GST on trees to round the fractional solution. However, embedding of an LP-solution to a tree instance of GST does not preserve connectivity. Also, it does not lead to a reduction from k-DST to the k edge-connected variant of GST, namely, k-GST. Hence, our algorithm is, although simple, not straightforward. 1.1 Our Results Our main result is an O(D · kD−1 · log n)-approximation algorithm for k-DST on a D-shallow instance, which includes a special case that an input graph is directed acyclic and has at most D layers. Theorem 1. Consider the k edge-connected directed Steiner tree problem. Suppose an input instance has an optimal solution H ∗ in which, for every terminal t ∈ T , H ∗ has k edge-disjoint r, t-paths such that each path has length at most D. Then there exists an O(D · kD−1 · log n)approximation algorithm. In particular, there is an O(D · kD−1 · log n)-approximation algorithm for k-DST on a directed acyclic graph with D layers. For the case k = 1, our algorithm yields a slightly better guarantee of O(D log h). Thus, we have as by product an LP-based approximation algorithm for DST. Applying Zelikovsky’s heightreduction theorem [Zel97, HRZ01], this implies an LP-based quasi-polynomial-time O(log3 h)approximation algorithm for DST. (The algorithm runs in time O(poly(nD ) and has approximation ratio O(h1/D · D 2 log h).) Theorem 2 also implies an algorithm of the same (asymptotic) approximation ratio for a Dshallow instance of the k edge-connected directed Steiner subgraph problem, where we wish to find a subgraph H such that the set of terminal T is k-edge-connected in H. To see this, we invoke the algorithm in Theorem 2 as follows. Take any terminal t∗ ∈ T as a root vertex of a k-DST 3 instance. Then we apply the algorithm for k-DST to find a subgraph H out such that every terminal is k edge-connected from t∗ . We apply the algorithm again to find a subgraph H in such that every terminal is k edge-connected to t∗ . Then the set of terminal T is k-edge connected in the graph H out ∪ H in by transitivity of edge-connectivity. The cost incurred by this algorithm is at most twice that of the algorithm in Theorem 2. Thus, we have the following theorem as a corollary of Theorem 2 Theorem 2. Consider the k edge-connected directed Steiner subgraph problem. Suppose an input instance has an optimal solution H ∗ in which, for every pair of terminals s, t ∈ T , H ∗ has k edgedisjoint s, t-paths such that each path has length at most D. Then there exists an O(D ·kD−1 ·log n)approximation algorithm. Overview of our algorithm The key idea of our algorithm is to embed an LP solution for k-DST to a standard LP of GST on a tree. (We emphasize that we embed the LP solution of k-DST to that of GST not k-GST.) At first glance, a reduction from k-DST to GST on trees is unlikely to exist because any such reduction would destroy all the connectivity information. We show, however, that such tree-embedding exists, but we have to sacrifice running-time and cost to obtain such embedding. The reduction is indeed the same as a folk-lore reduction from DST to GST on trees. That is, we list all rooted-paths (paths that start from the root vertex) of length at most D in an input graph and form a suffix tree. In the case of DST, if there is an optimal solution which is a tree of height D, then it gives an approximation preserving reduction from GST to DST which blows up the size (and thus the running time) of the instance to O(nD ). Unfortunately, for the case of k-DST with k > 1, this reduction does not give an equivalent reduction from k-DST to k-GST on trees. The reduction is valid in one direction, i.e., any feasible solution to k-DST has a corresponding feasible solution to the tree-instance of k-GST. However, the converse is not true as a feasible solution to the tree-instance of k-GST might not give a feasible solution to k-DST. Thus, our reduction is indeed an “invalid” reduction from k-DST to a tree instance of “GST” (the case k = 1). To circumvent this problem, we formulate an LP that provides a connection between an LP solution on an input k-DST instance and an LP solution of a tree-instance of GST. Thus, we can embed an LP solution to an LP-solution of GST on a (very large) tree. We then round the LP solution using the GKR Rounding algorithm for GST on trees [GKR00]. This algorithm, again, does not give a feasible solution to k-DST as each integral solution we obtain only has “connectivity one” and thus is only feasible to DST. We cope with this issue by using a technique developed by Chalermsook et al. in [CGL15]. Specifically, we sample a sufficiently large number of DST solutions and show that the union of all these solutions is feasible to k-DST using cut-arguments. Each step of our algorithm and the proofs are mostly standard, but ones need to be careful in combining each step. Otherwise, the resulting graph would not be feasible to k-DST. Organization. We provide definitions and notations in Section 2. We start our discussion by presenting a reduction from DST to GST in Section 3. Then we discuss properties of minimal solutions for k-DST in Section 4. We present standard LPs for k-DST and GST in Section 5 and formulate a stronger LP-relaxation for k-DST in Section 6. Then we proceed to present our algorithm in Section 7. Finally, we provide some discussions in Section 8. 4 2 Preliminaries We use standard graph terminologies. We refer to a directed edge (u, v), shortly, by uv (i.e., u and v are head and tail of uv, respectively), and we refer to an undirected edge by {u, v}. For a (directed or undirected) graph G, we denote by V (G) and E(G) the sets of vertices and edges of G, respectively. If a graph G is associated with edge-costs {ce }e∈E(G) , then we denote the cost of any P subgraph H ⊆ G by cost(H) = e∈E(H) ce . For any path P , we use length to mean the number of edges in a path P and use cost to mean the total costs of edges in P . In the directed Steiner tree problem (DST), we are given a directed graph G with edge-costs {ce }e∈E(G) , a root vertex r and a set of terminals T ⊆ V (G). The goal is to find a min-cost subgraph H ⊆ G such that H has a directed path from the root r to each terminal t ∈ T . A generalization of DST is the k edge-connected directed Steiner tree problem (k-DST). In k-DST, we are given the same input as in DST plus an integer k. The goal is to find a min-cost subgraph H that has k edge-disjoint paths from the root r to each terminal t ∈ T . The k edge-connected directed Steiner subgraph problem is a variant of k-DST, where there is no root vertex, and the goal is to find a min-cost subgraph H such that the set of terminals T is k edge-connected in H. The problems on undirected graphs that are closely related to of DST and k-DST are the group Steiner tree problem (GST) and the k edge-connected group Steiner tree problem (k-GST). In GST, we are given an undirected graph G with edge-costs {ce }e∈E(G) , a root vertex r and a collection of subset of vertices {Ti }hi=1 called groups. The goal is to find a a min-cost subgraph H that connects r to each group Ti . In k-GST, the input consists of an additional integer k, and the goal is to find a min-cost subgraph H with k edge-disjoint r, Ti -paths for every group Ti . Consider an instance of DST (resp., k-DST). We denote by Q the set of all paths in G that start from the root r. The set of paths in Q that end with a particular pattern, say σ = (v1 , . . . , vq ), is denoted by Q(σ). This pattern σ can be a vertex v, an edge e or a path σ = (v1 , . . . , vq ) in G. For example, Q(u, v, w) consists of paths P of the form P = (r, . . . , u, v, w). We say that a path P ends at a vertex v (resp., an edge e) if v (resp., e) is the last vertex (resp., edge) of P . We may consider only paths with particular length, say D. We denote by QD the set of paths that start at r and has length at most D. The notation for QD is analogous to Q, e.g., QD (uv) ⊆ QD is the set of paths in QD that end at an edge uv. A concatenation of a path p with an edge e or a vertex v are denoted by p + e and p + v, respectively. For example, (u1 , . . . , uℓ ) + vw = (u1 , . . . , uℓ , v, w). Given a subset of vertices S, the set of edges entering S is denoted by δ− (S) = {uv ∈ E : u ∈ S, v 6∈ S} The indegree of S is denoted by indeg(S) = |δ− (S)|. Analogously, we use δ+ (S) and outdeg(S) for the set of edges leaving S. For undirected graphs, we simply use the notations δ(S) and deg(S). We say that a feasible solution H to k-DST is D-shallow if, for every terminal t ∈ T , there exists a set of k edge-disjoint r, t-paths in H such that every path has length at most D. An instance of k-DST that has an optimal D-shallow solution is called a D-shallow instance. We also use the term D-shallow analogously for k-GST and the k edge-connected Steiner subgraph problem. To distinguish between the input of k-DST (which is a directed graph) and k-GST (which is an undirected graph), we use script fonts, e.g., G, to denote the input of k-GST. Also, we use Q to denote the set of all paths from the root r to any vertexP v in the graph G. The cost of a set of edges F (or a graph) is defined by a function cost(F ) = e∈F ce . At each point, we consider 5 only one instance of k-DST (respectively, k-GST). So, we denote the cost of the optimal solution to k-DST by optkDST (respectively, optkGST ). 3 Reduction from Directed Steiner Tree to Group Steiner Tree In this section, we describe a reduction R from DST to GST. We recall that Q denotes all the r, v-paths in a DST instance G. The reduction is by simply listing paths in the directed graph G as vertices in a tree G = R(G) and joining each path p to p + e if p + e is a path in G. In fact, R(G) is a suffix tree of paths in Q. To be precise, V (G) = {p : p is an r, v-path in G} E(G) = {{p, p + e} : both p and p + e are paths in G starting at r} We set the cost of edges of G to be c{p,p+e} = ce . Since the root r has no incoming edges in G, r maps to a unique vertex (r) ∈ G, and we define (r) as the root vertex of the GST instance. We will abuse r to mean both the root of DST and its corresponding vertex of GST. For each terminal ti ∈ T , define a group of the GST instance as Ti := Q(ti ) = {p ⊆ G : p is an r, ti -path in G} It is easy to see that the reduction R produces a tree, and there is a one-to-one mapping between a path in the tree G = R(G) and a path in the original graph G. Thus, any tree in G corresponds to a subtree of R(G) (but not vice versa), which implies that the reduction R is approximationpreserving (i.e., optDST = optGST ). Note, however, that the size of the instance blows up from O(n + m) to O(nD ), where D is the length of the longest path in G. The reduction holds for general graphs, but it is approximation-preserving only if the DST instance is D-shallow, i.e., it has an optimal solution H ∗ such that any r, ti -path in H ∗ has length at most D, for all terminals ti ∈ T . However, Zelikovsky [Zel97, HRZ01] showed that the metric completion of G always contains a D-shallow solution with cost at most D|V (G)|1/D of an optimal solution to DST. (This is now known as Zelikovsky’s height reduction theorem.) Thus, we may list only paths of length at most D from the metric completion. We denote the reduction that lists only paths of length at most D by RD . 4 Properties of Minimal Solutions to k-DST In this section, we provide structural lemmas which are building blocks in formulating a strong LP-relaxation for k-DST. These lemmas characterize properties of a minimal solution to k-DST. Lemma 3. Let H be any minimal solution to k-DST. Then H has at most k edge-disjoint r, v-paths, for any vertex v ∈ V (H). Proof. Suppose to a contrary that H has k + 1 edge-disjoint r, v-paths, for some vertex v ∈ V (H). Then v must have indegree at least k + 1 in H. We take one of the k − 1 edges entering v, namely, uv. By minimality of H, removing uv results in a graph H ′ = H − uv that has less than k edgedisjoint r, ti -paths for some terminal ti ∈ T . Thus, by Menger’s theorem, there must be a subset of vertices S ⊆ V such that ti ∈ S, r ∈ V − S and indegH ′ (S) ≤ k − 1. Observe that we must have 6 − (S) because H is a feasible solution to k-DST, which means that v ∈ S. Since we remove uv in δH only one edge uv from H, the graph H ′ must have k edge-disjoint r, v-paths. But, this implies that indegH ′ (S) ≥ k, a contradiction. Lemma 4. Let H be any minimal solution to k-DST. Any vertex v ∈ V (H) has indegree exactly λ(v), where λ(v) is the maximum number of edge-disjoint r, v-paths in H. Proof. The proof follows a standard uncrossing argument. Assume a contradiction that v has indegree at least λ(v) + 1 in H. By Menger’s theorem, there is a subset of vertices U ⊆ V such that indegH (U ) = λ(v), v ∈ U and r 6∈ U that separates v from r. We assume that U is a minimum − (U ), i.e., such set. Since indegH (v) > λ(v), there is an edge uv ∈ E(H) that is not contained in δH u, v ∈ U . By minimality of H, removing uv results in the graph H ′ = H − uv such that H ′ has less than k edge-disjoint r, ti -path for some terminal ti ∈ T . Thus, by Menger’s theorem, there is a subset of − (W ) and indegH (W ) = k. (The latter is because H vertices W such that ti ∈ W , r 6∈ W , uv ∈ δH is a feasible solution to k-DST.) Now we apply an uncrossing argument to U and W . By submodularity of indegH , we have indegH (U ) + indegH (W ) ≥ degH (U ∩ W ) + degH (U ∪ W ) Observe that v ∈ U ∩ W , t ∈ U ∪ W and r 6∈ S ∪ S ′ . So, by the edge-connectivity of v and t, indegH (U ∩ W ) ≥ λ(v) and indegH (U ∪ W ) ≥ k (1) The sum of the left-hand side of Eq (1) is indegH (U ) + indegH (W ) = k + λ(v). So, we conclude that indegH (U ∩ W ) = λ(v) and indegH (U ∪ W ) = k Consequently, we have the set U ′ = U ∩ W such that indegH (U ′ ) = λ(v), v ∈ U ′ and r 6∈ U ′ that separates v from r. Since u 6∈ W , we know that U ′ is strictly smaller than U . This contradicts to the minimality of U . The following is a corollary of Lemma 3 and Lemma 4 Corollary 5. Let H be a minimal solution to k-DST. Then any vertex v ∈ V (H) has indegree at most k. The next lemma follows from Corollary 5. Lemma 6. Consider any minimal solution H to k-DST (which is a simple graph). For any edge e ∈ E(H) and ℓ ≥ 2, there are at most kℓ−2 paths in H with length at most ℓ that start at the root ℓ−2 for all e ∈ E(H), where QH (e) is the set of r, v-paths of r and ends at e. That is, |QH ℓ ℓ (e)| ≤ k length ℓ in H. 7 Proof. We prove by induction. The base case ℓ = 2 is trivial because any rooted path of length at most 2 cannot have a common edge. ℓ−3 for some ℓ ≥ 3. Consider any edge vw ∈ E(H). Assume, inductively, that |QH ℓ−1 (e)| ≤ k By Corollary 5, v has indegree at most k. Thus, there are at most k edges entering v, namely, u1 v, . . . , ud v, where d = indeg(v). By the induction hypothesis, each edge is the last edge of at ℓ−3 ≤ k ℓ−2 paths that end at uv. That is, most kℓ−3 paths in QH ℓ−1 . Thus, we have at most d · k |QH ℓ (vw)| ≤ d X |QH ℓ−1 (ud v)| ≤ kℓ−3 = d · kℓ−3 ≤ kℓ−2 . i=1 i=1 5 d X Standard LPs for k-DST and GST In this section, we describe standard LPs for k-DST and GST. Each LP consists of two sets of variables, a variable xe on each edge e and a variable fpi on each path p and a terminal ti . The variable xe indicates whether we choose an edge e in a solution. The variable fpi is a flow-variable on each path and thus can be written in a compact form using a standard flow formulation.  P min  e∈E(G) ce xe  P    s.t. f i ≤ xe ∀e ∈ E(G), ∀ti ∈ T  p∈Q(t i ):e∈E(p) p  P  i ∀ti ∈ T p∈Q(ti ) fp ≥ k LP-k-DST  xe ≤ 1 ∀e ∈ E(G)     x ∀e ∈ E(G)  e ≥0   fpi ≥ 0 ∀p ∈ Q(ti ), ∀ti ∈ T. The standard LP for GST is similar to LP-k-DST.  P min  e∈E(G) ce xe  P P    s.t. fpi ≤ xe  v∈Ti P p∈Q(v):e∈E(p)  P  i v∈Ti p∈Q(v) fp ≥ 1 LP-GST  xe ≤ 1     xe ≥ 0    fpi ≥ 0 6 ∀e ∈ E(G), ∀i = 1, 2, . . . , h ∀i = 1, 2, . . . , h ∀e ∈ E(G) ∀e ∈ E(G) ∀p ∈ Q, ∀i = 1, 2, . . . , h A Strong LP-relaxation for for k-DST In this section, we formulate a strong LP-relaxation for k-DST that allows us to embed a fractional solution into an LP solution of LP-GST on a tree. 8  P min P  e∈E ce xe    s.t. fi  p∈Q(t  i ):e∈E(p) p P  i    p∈Q(ti ) fp  P  i  f  p∈Q(t P i ):q⊆p p LP-k-DST* p∈Qℓ (e) yp    xe     xe     fpi    yp ≤ xe ≥k ≤ yq ≤ max{1, kℓ−2 } · xe ≤1 ≥0 ≥0 ≥0 ∀e ∈ E(G), ∀ti ∈ T ∀ti ∈ T ∀q ∈ Q, ∀ti ∈ T ∀e ∈ E, ∀ℓ ≥ 1 ∀e ∈ E(G) ∀e ∈ E(G) ∀p ∈ Q(ti ), ∀ti ∈ T ∀p ∈ Q (Subflow Capacity) (Aggregating k-Flow) For D-shallow instances of k-DST, we replace Q by QD to restrict length of paths to be at most D. The next lemma shows that LP-k-DST* is an LP-relaxation for k-DST. Lemma 7. LP-k-DST* is an LP-relaxation for k-DST. Moreover, replacing Q by QD gives an LP-relaxation for k-DST on D-shallow instances. Proof. LP-k-DST* is, in fact, obtained from LP-k-DST (which is a standard LP) by adding a new variable yp and two constraints. X (1) Subflow-Capacity: fpi ≤ yq , ∀q ∈ Q, ∀ti ∈ T . p∈Q(ti ):q⊆p (2) Aggregating k-Flow: X yp ≤ max{1, kℓ−2 } · xe , ∀e ∈ E, ∀ℓ ≥ 1. p∈Qℓ (e) To show that these two constraints are valid for k-DST, we take a minimal feasible (D-shallow) solution H of k-DST. We define a solution (x, f, y) to LP-k-DST as below.   1 if e ∈ E(H) 1 if p ⊆ H ∧ p ∈ Q xe = yp = 0 otherwise  0 otherwise 1 if p ⊆ H ∧ p ∈ Q(t ) i fpi = 0 otherwise By construction, fpi = 1 implies that yp = 1. Thus, (x, f, y) satisfies the Subflow-Capacity constraint. By minimality of H, Corollary 6 implies that even if we list all the paths of length ℓ ≥ 2 in H, at most kℓ−2 of them end at the same edge, and we know that rooted paths of length one share no edge (given that H is a simple graph). Thus, (x, f, y) satisfies the Aggregating k-Flow constraint. Consequently, these two constraints are valid for k-DST. On the other hand, any integral solution that is not feasible to k-DST could not satisfy the constraints of LP-k-DST* simply because LP-k-DST* contains the constraints of LP-k-DST, which is a standard LP for k-DST. Thus, LP-k-DST* is an LP-relaxation for k-DST. The proof for the case of D-shallow instances is the same as above except that we take H as a minimal D-shallow solution and replace Q by QD . 9 7 An Approximation Algorithm for k-DST In this section, we present an approximation algorithm for k-DST on a D-shallow instance. Our algorithm is simple. We solve LP-k-DST* on an input graph G and then embed an optimal fractional solution (x, f, y) to an LP-solution (x̂, fˆ) of LP-GST on the tree R(G). We lose a factor of O(kD−2 ) in this process. As we now have a tree-embedding of an LP-solution, we can invoke the GKR Rounding algorithm [GKR00] to round an LP-solution on the tree R(G). Our embedding guarantees that any edge-set of size k − 1 in the original graph G never maps to an edge-set in the tree G = R(G) that separates r and Ti = Q(ti ) in G. So, the rounding algorithm still outputs a feasible solution to GST with constant probability even if we remove edges in the tree G that correspond to a subset of k − 1 edges in G. Consequently, we only need to run the algorithm for O(D · k · log n) times to boost the probability of success so that, for any subset of k − 1 edges and any terminal ti ∈ T , we have at least one solution that contains an r, ti -path using none of these k − 1 edges. In other words, the union of all the solutions satisfies the connectivity requirement. Our algorithm is described in Algorithm 1. Algorithm 1 Algorithm for k-DST Solve LP-k-DST* and obtain an optimal solution (x, f, y). Map (x, f, y) to a solution (x̂, fˆ) to LP-GST on G = R(G). for i = 1 to 2Dk log2 n do Run GKR Rounding on (x̂, fˆ) to get a solution Zi . Map Zi back to a subgraph Zi of G. end for S return H = i Zi as a solution to k-DST. We map a solution (x, f, y) of LP-k-DST* on G to a solution (x̂, fˆ) of LP-GST on the tree G = R(G) as below. Note that there is a one-to-one mapping between a path in G and a path in the tree G. x̂{p,p+e} := yp+e for all p + e ∈ Q fˆpi := fpi for all p ∈ Q and for all ti ∈ T 7.1 Cost Analysis We show that cost(x̂, fˆ) ≤ kD−2 · cost(x, f, y). Lemma 8. Consider a solution (x̂, fˆ) to LP-GST, which is mapped from a solution (x, f ) of LPk-DST* when an input k-DST instance is D-shallow, for D ≥ 2. The cost of (x̂, fˆ) is at most cost(x̂, fˆ) ≤ kD−2 · cost(x, f ). P Proof. By the constraint p∈Qℓ (e) fp ≤ max{1, kℓ−2 } · xe , we have that P P P = e∈E(G) c x̂ cost(x̂, fˆ) = e′ ∈E(G) ce′ x̂e′ P P P P{p,p+e}∈E(G) e {p,p+e} = e∈E(G) ce fp+e = e∈E(G) p∈Q(e) ce fp   p+e∈Q P P P = e∈E(G) ce · p∈Q(e) fp ≤ e∈E(G) ce · kD−2 · xe = kD−2 · cost(x, f ). 10 It can be seen from Algorithm 1 and Lemma 8 that the algorithm outputs a solution H with cost at most O(Dk D−1 log n) · cost(x, f ). Thus, H is an O(Dk D−1 log n)-approximate solution. It remains to show that H is feasible to k-DST. 7.2 Feasibility Analysis Now we show that H is feasible to k-DST with at least constant probability. To be formal, consider any subset F ⊆ E(G) of k − 1 edges. We map F to their corresponding edges F in the tree G. Thus, F := {{P, P + e} : P + e ∈ Q ∧ e ∈ F }. Observe that no vertices in G − F correspond to paths that contain an edge in F . Thus, we can define an LP solution (y F , z F ) for LP-GST on the graph G − F as follows.   i x̂e if e 6∈ F fˆp if E(p) ∩ F = ∅ F,i F ye = zp = 0 otherwise 0 otherwise We show that (y F , z F ) is feasible to LP-GST on G − F. Lemma 9. For any subset of edges F ⊆ E(G), define (y F , z F ) from (x̂, fˆ) as above. Then (y F , z F ) is feasible to LP-GST on G − F. Proof. First, observe that zpF,i > 0 only if a path p contains no edges in F. So, by construction, (y F , z F ) satisfies zpF,i = fˆpi ≤ x̂e = yeF for all e ∈ E(p). Hence, (y F , z F ) satisfies the capacity constraint. Next we show that (y F , z F ) satisfies the connectivity constraint. Consider the solution (x, f, y) to LP-k-DST*. By the feasibility of (x, f, y) and the Max-Flow-Min-Cut theorem, the graph G − F with P capacities {xe }e∈G−F can support a flow of value one from r to any terminal ti . This implies that p∈Q(ti ):E(p)∩F =∅ fpi ≥ 1. Consequently, we have P i p∈Q(ti ):E(p)∩F =∅ fp P P ˆi = p∈Ti :E(p)∩F =∅ p′ ∈Q(v) fp′ P P fˆi′ = v∈Ti ′ ′ Pp ∈Q(v):E(p )∩F =∅ pF,i P = v∈Ti ′ ′ )∩F =∅ zp′ Pp ∈Q(v):E(p P F,i = v∈Ti p′ ∈Q(v) zp′ ≥ 1. All the other constraints are satisfied because (y F , z F ) is constructed from (x̂, fˆ). Thus, (y F , z F ) is feasible to LP-GST on G − F. Lemma 9 implies that we can run the GKR Rounding algorithm on (y F , z F ). The following is the property of GKR Rounding. Lemma 10 ([GKR00]). There exists a randomized algorithm such that, given a solution (x̂, fˆ) to LP-GST on a tree G with height D, the algorithm outputs a subgraph H ⊆ G so that the probability that any subset of vertices U ⊆ V (G) is connected to the root is at least P P ˆi v∈U p∈Q(v) fp Pr[H has an r, U -path.] ≥ O(D) Moreover, the probability that each edge is chosen is at most x̂e . That is, E[cost(H)] = cost(x̂, fˆ). The running time of the algorithm is O(|E(G)| + |V (G)|). 11 Since (y F , z F ) ≤ (x̂, fˆ) (coordinate-wise), we can show that running GKR Rounding on (x̂, fˆ) simulates the runs on (y F , z F ) for all F ⊆ E(G) with |F | ≤ k − 1, simultaneously. Lemma 11. Let H be a subgraph of G obtained by running GKR Rounding on (x̂, fˆ), and let H be a subgraph of G corresponding to H. Then, for any subset of edges F ⊆ E(G) with |F | ≤ k − 1 and for any terminal ti ∈ T , Pr[H − F has an r, ti -path] ≥ 1 . O(D) Proof. Let us briefly describe the work of GKR Rounding. The algorithm marks each edge e in the tree with probability xe /x̺(e) , where ̺(e) is the parent of an edge e in G, which is unique. Then the algorithm picks an edge e if all of its ancestors are marked. Clearly, removing any set of edges F from G only affects paths that contain an edge in F. Let (y F , z F ) be defined from (x̂, fˆ) as above. This LP solution is defined on a graph G − F. Thus, the probability of success is not affected by removing F from the graph. By Lemma 9, we can run GKR Rounding on (y F , z F ) and obtain a subgraph HF of G − F. Since zpF ≤ fˆp for all 6 ∅, we have from Lemma 10 and Lemma 9 that paths p ∈ Q and zpF = 0 for all p ∈ Q : E(p) ∩ F = Pr[H − F has an r, ti -path] = Pr[H − F has an r, Ti -path] F has an r, T -path] ≥ Pr[H i P P ≥ ≥ v∈Ti 1 O(D) . F p∈Q(v) zp O(D) Finally, we recall that Algorithm 1 employs GKR Rounding on (x̂, fˆ) for 2Dk log2 n times. So, for any subset of k − 1 edges F ⊆ E(G) and for any terminal ti ∈ T , there exists one subgraph that has an r, ti -path that contains no edge in F with large probability. In particular, the union is a feasible solution to k-DST with at least constant probability. S Lemma 12. Consider the run of Algorithm 1. The solution subgraph H = i Zi is a feasible solution to k-DST with probability at least 1/n. Proof. For i = 1, 2, . . . , 2Dk log2 n, let Zi be a subgraph of G obtained by running GKR Rounding on (x̂, fˆ) and mapping the solution back to a subgraph of G as in Algorithm 1. By Lemma 11, Zi − F has an r, ti -path with probability Ω(1/D). Since each Zi is sampled independently, we have Pr[∀i Zi − F has no r, ti -path] ≤  1 1− O(D) 2Dk log2 n  2k log2 n 1 ≤ ≤ n−2k . e We have at most |E(G)|k−1 ≤ n2(k−1) such sets F and at most |T | ≤ n terminals. So, there are at most n2k−1 bad events where there exists an edge-set ofSsize k − 1 that separates the root r and some terminal ti ∈ T . Therefore, by union bound, H = i Zi is a feasible solution to k-DST with probability at least 1/n. This completes the proof of Theorem 2. Note that, for the case of DST (k = 1), we only need to run GKR Rounding for O(D log h) times, thus implying an approximation ratio of O(D log h). 12 8 Conclusion and Discussion We presented the first non-trivial approximation algorithm for k-DST in a special case of a Dshallow instance, which exploits the reduction from DST to GST. We hope that our techniques will shed some light in designing an approximation algorithm for k-DST in general case and perhaps lead to a bi-criteria approximation algorithm in the same manner as in [CGL15]. One obstruction in designing an approximation algorithm in directed graphs is that there is no “true” (perhaps, probabilistic) tree-embedding for directed graphs. Both devising a tree-embedding for directed graphs and designing an approximation algorithm for k-DST with k ≥ 2 are big open problems in the area. Another open problem, which is considered as the most challenging one by many experts, is whether there exists a polynomial-time algorithm for DST that yields a subpolynomial approximation ratio. Acknowledgements. Our work was inspired by the works of Rothvoß [Rot11] and Friggstad et al. [FKK+ 14] and by discussions with Joseph Cheriyan and Lap Chi Lau. We also thank Zachary Friggstad for useful discussions. References [CCC+ 99] Moses Charikar, Chandra Chekuri, To-Yat Cheung, Zuo Dai, Ashish Goel, Sudipto Guha, and Ming Li. Approximation algorithms for directed steiner problems. J. Algorithms, 33(1):73–91, 1999. 2 [CGL15] Parinya Chalermsook, Fabrizio Grandoni, and Bundit Laekhanukit. On survivable set connectivity. In Proceedings of the Twenty-Sixth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2015, San Diego, CA, USA, January 4-6, 2015, pages 25– 36, 2015. 4, 12 [CLNV14] Joseph Cheriyan, Bundit Laekhanukit, Guyslain Naves, and Adrian Vetta. Approximating rooted steiner networks. ACM Transactions on Algorithms, 11(2):8:1–8:22, 2014. 2 [Fei98] Uriel Feige. A threshold of ln n for approximating set cover. J. ACM, 45(4):634–652, 1998. 3 [FKK+ 14] Zachary Friggstad, Jochen Könemann, Young Kun-Ko, Anand Louis, Mohammad Shadravan, and Madhur Tulsiani. Linear programming hierarchies suffice for directed steiner tree. In Integer Programming and Combinatorial Optimization - 17th International Conference, IPCO 2014, Bonn, Germany, June 23-25, 2014. Proceedings, pages 285–296, 2014. 2, 13 [FKN12] Moran Feldman, Guy Kortsarz, and Zeev Nutov. Improved approximation algorithms for directed steiner forest. J. Comput. Syst. Sci., 78(1):279–292, 2012. 2 [GKR00] Naveen Garg, Goran Konjevod, and R. Ravi. A polylogarithmic approximation algorithm for the group steiner tree problem. J. Algorithms, 37(1):66–84, 2000. 3, 4, 9, 11 13 [HRZ01] Christopher S. Helvig, Gabriel Robins, and Alexander Zelikovsky. An improved approximation scheme for the group steiner problem. Networks, 37(1):8–20, 2001. 3, 6 [Lae14] Bundit Laekhanukit. Parameters of two-prover-one-round game and the hardness of connectivity problems. In Proceedings of the Twenty-Fifth Annual ACM-SIAM Symposium on Discrete Algorithms, SODA 2014, Portland, Oregon, USA, January 5-7, 2014, pages 1626–1643, 2014. 2 [LY94] Carsten Lund and Mihalis Yannakakis. On the hardness of approximating minimization problems. J. ACM, 41(5):960–981, 1994. 3 [Rot11] Thomas Rothvoß. Directed steiner tree and the lasserre hierarchy. CoRR, abs/1111.5473, 2011. 2, 13 [Zel97] Alexander Zelikovsky. A series of approximation algorithms for the acyclic directed steiner tree problem. Algorithmica, 18(1):99–110, 1997. 3, 6 14
8cs.DS
1 Incentive Mechanism Design for Wireless Energy Harvesting-Based Internet of Things arXiv:1712.06250v1 [cs.IT] 18 Dec 2017 Zhanwei Hou, He Chen, Yonghui Li, and Branka Vucetic Abstract—Radio frequency energy harvesting (RFEH) is a promising technology to charge unattended Internet of Things (IoT) low-power devices remotely. To enable this, in future IoT system, besides the traditional data access points (DAPs) for collecting data, energy access points (EAPs) should be deployed to charge IoT devices to maintain their sustainable operations. Practically, the DAPs and EAPs may be operated by different operators, and the DAPs thus need to provide effective incentives to motivate the surrounding EAPs to charge their associated IoT devices. Different from existing incentive schemes, we consider a practical scenario with asymmetric information, where the DAP is not aware of the channel conditions and energy costs of the EAPs. We first extend the existing Stackelberg gamebased approach with complete information to the asymmetric information scenario, where the expected utility of the DAP is defined and maximized. To deal with asymmetric information more efficiently, we then develop a contract theory-based framework, where the optimal contract is derived to maximize the DAP’s expected utility as well as the social welfare. Simulations show that information asymmetry leads to severe performance degradation for the Stackelberg game-based framework, while the proposed contract theory-based approach using asymmetric information outperforms the Stackelberg game-based method with complete information. This reveals that the performance of the considered system depends largely on the market structure (i.e., whether the EAPs are allowed to optimize their received power at the IoT devices with full freedom or not) than on the information availability (i.e., the complete or asymmetric information). Index Terms—Internet of Things, Wireless energy harvesting, Stackelberg game, contract theory, incentive mechanism I. I NTRODUCTION A. Background and Motivations By connecting objects, physical devices, vehicles, animals and other items to the Internet, Internet of Things (IoT) has emerged as a new paradigm to enable ubiquitous and pervasive communications [1]–[3]. Wireless sensing service is one of the fundamental applications of IoT, which enables systems and users to continuously monitor ambient environment [4]. One of the major hurdles for implementing the wireless sensing application is the limited lifetime of traditional batterypowered sensors, which are costly and hard to maintain [5], [6]. For example, frequent recharging or battery replacement is inconvenient in deserts or remote areas, and is even impossible for some scenarios, such as toxic environment or implanted medical applications [7]. To tackle this problem, radio frequency energy harvesting (RFEH) has recently been proposed Z.W. Hou, H. Chen, Y.H. Li and B. Vucetic are with the Centre of Excellence in Telecommunications, School of Electrical and Information Engineering, University of Sydney, Sydney, NSW, Australia (e-mail: {zhanwei.hou, he.chen, yonghui.li, branka.vucetic}@sydney.edu.au). as an attractive technology to prolong the operational lifetime of sensors, enhance the deployment flexibility, and reduce the maintenance costs [7], [8]. In this paper, we consider a radio frequency energy harvesting based IoT system consisting of a data access point (DAP) and several energy access points (EAPs). The DAP collects information from its associated sensors. EAPs can provide wireless charging services to sensors via the RF energy transfer technique. The sensors are assumed to have no embedded energy supply, but they can harvest energy from radio frequency (RF) signals radiated by the surrounding EAPs to transmit the data to the DAP [9]. There are some research considering the deployment of dedicated EAPs in the existing cellular network, such that the upgraded network can provide both wireless access and wireless charging services [10]–[17]. However, it was assumed that the EAPs are deployed by the same operator of the existing network. In practice, the DAP and EAPs may be operated by different operators1 . To effectively motivate these third-party and self-interested EAPs to help charge the sensors, effective incentive mechanisms are required to improve the payoff of the DAP as well as those of EAPs. While there are several initial work designing the incentive mechanism [18]– [20] for the EAPs belonging to different operators, complete information was considered in these schemes. Specifically, it was assumed that the EAPs will truthfully report their private information to the DAP, e.g., their energy costs and channel gains between EAPs and sensors. This happens when there exists a supervising entity in the network, which is capable of monitoring and sharing all behaviours and network conditions of the DAP and EAPs to ensure that they always report the trustful information. However, without such a supervising entity, EAPs’ private information might be not aware to the DAP, which is normally called information asymmetry in the literature [21]. A rational EAP may provide misleading information maliciously and pretend to be an EAP with better channel condition and/or higher energy cost to cheat for more rewards. A malicious EAP can succeed in cheating to get more benefits because of information asymmetry in the RF energy trading process. To address above issues, in this paper we will design effective incentive mechanisms to maximize the utilities of the DAP and EAPs under scenarios with asymmetric information. 1 This could happen when a resource-limited operator cannot provide radio frequency energy charging service in some certain area due to limited budgets, or lack of site locations, or lack of licensed spectrum for energy harvesting. Therefore, it has to resort to third-party operators. 2 To this end, the following important questions should be addressed under asymmetric information: Which EAPs the DAP should hire, how much energy should be requested from the hired EAPs, and how many rewards should be given to the hired EAPs? The above questions are non-trivial to answer because the hierarchical interactions between multiple parities should be modeled and analyzed: the cooperations between the DAP, the DAP’s sensors and the EAPs, and the competition among EAPs with heterogeneous private information. Moreover, the information asymmetry make the problem even more challenging, because it is difficult for the DAP to hire the effective EAPs without knowing EAPs’ private information, such as energy costs and channel condition towards its sensors. B. Solution and Contribution To answer the above questions, we apply the wellestablished economic theories to model the conflicted interests among the multiple parities in the considered RFEH-based IoT system. Specifically, we first extend the existing Stackelberg game-based approach with complete information to the considered case with asymmetric information, such that we can evaluate the performance degradation caused by information asymmetry to this approach. More specifically, due to lack of the complete information, the expected utility function of the DAP is defined and optimized in the Stackelberg game with asymmetric information. Considering that contract theory is a powerful tool originated from economics to deal with information asymmetry in a monopoly market, we apply contract theory to develop an optimal contract to effectively motivate the EAPs under asymmetric information. In our contract, the RF energy trading market is analogous as a monopoly labor market in economics. The DAP is modeled as the employer who offers a contract to each EAP. The contract is composed of a serious of contract items, which are combinations of energy-reward pairs. Each contract item is an agreement about how many rewards an EAP will get by contributing a certain amount of RF energy. Various heterogeneous EAPs are classified into different types according to their energy costs and instantaneous channel conditions. The EAPs are regarded as labors in the market, which will choose a contract item best meeting their interests. By properly designing the contract, an EAP’s type will be revealed through its selection. Thus the DAP can capture each EAP’s private information to a certain extent and thus relieve the issue of information asymmetry. To the best knowledge, this is the first paper that systematically studies the RFEH-based IoT system under asymmetric information. The main contributions of this paper are summarized as follows. • We develop the framework of RF energy trading in the RFEH-based IoT system and systematically design the incentive mechanisms for a practical scenario with asymmetric information. • To explore the performance degradtion due to lack of full information, we first extend the existing Stackelberg game-based approach to the considered case without instantaneous channel condition and energy costs of the EAPs by optimizing the expected utility function of the DAP. As contract theory is a powerful economic theory for designing incentive mechanism with asymmetric information. We then reformulate the problem by using contract theory. In our contract design, we characterize the necessary and sufficient conditions for the contract feasibility, i.e, individual rationality (IR) conditions and incentive capability (IC) conditions [21]. Subject to the IR and IC constraints, the optimal contract under information asymmetry is achieved by maximizing the DAP’s expected utility as well as the social welfare. • To compare the performance of the proposed contract theory-based approach using asymmetric information with that of the existing Stackelberg game-based method with complete information, we generalize the existing Stackelberg game formation with unified pricing to the case with discriminative pricing and derive the new Stackelberg equilibrium in closed-form. Here discriminative pricing means that we set different energy prices for different EAPs to fully exploit their potentials for the enery charging service. Numerical simulation results show that information asymmetry can lead to severe performance degradation for the Stackelberg game-based framework, while the proposed contract theory-based scheme using asymmetric information outperforms the Stackleberg game-based approach with complete information. This implies that the performance of the considered system depends largely on the market structure (i.e., whether the EAPs are allowed to optimize their received power at the IoT devices with full freedom or not) than on the information availability (i.e., the complete or asymmetric information). Note that part of the work was presented in our previous conference paper [22]. In this journal version, we extend our previous work by considering both scenarios of complete information and asymmetric information and explore the impacts of information availability and market structure. The rest of this paper is organized as follows: In Section II, we review the related literature. The system model is presented in Section III. The incentive mechanisms in asymmetric information in complete information are proposed in Section IV. The benchmark schemes are elaborated in Section V. Numerical results are presented in Section VI, and conclusions are drawn in Section VII. II. R ELATED W ORK A. EAP assisted Wireless Energy Harvesting The idea of deploying a dedicated wireless energy network, that can provide wireless charging service to the terminals by using RFEH technology, was originally proposed by Huang et al. [10], [11]. The dedicated power transmitters are called power beacons or EAPs. Using stochastic geometry, the tradeoff between the densities of the base stations and EAPs was analyzed in [10]. There are many works exploiting EAPs to enable services of both wireless information and energy access in existing cellular networks [12]–[17]. Stochastic geometry was used to analyze the network performance with the EAPs 3 in [12]–[14]. In [15], beamforming was introduced in the EAPs assisted cellular network to reduce the interference resulting from the EAPs. Leveraging finite-length information theory, the system performance in the finite blocklength regime was analyzed in [16]. The security issue with EAP in the presence of a passive eavesdropper was investigated in [17]. In all above works, the DAP and EAPs are assumed to belong to the same operator. In such a network, the devices belonging to the same operator with extra energy were assumed to voluntarily assist other devices. However, in practice, the DAP and EAPs may be operated by different operators. To successfully motivate self-interested EAPs to provide help, effective incentive mechanisms are required. There are several prior research works in designing the incentive mechanism [18]–[20] for the EAPs, where [18], [19] adopted Stackelberg game and [20] used auction to design the incentive mechanism. However, the existing incentive mechanisms only considered complete information scenario. B. Contract Theory The contract theory has been employed to address incentive design problems in wireless communication areas, such as mobile edge computing [23], device-to-device (D2D) communications [24] and cooperative spectrum sharing [25]. To the best knowledge of the authors, we are the first to apply contract theory in the RF energy trading process in RFEHbased IoT systems. To design the incentive mechanism in such a scenario is challenging because the DAP needs to choose and reward the most efficient EAPs without knowing their channel conditions and energy costs. C. Stackelberg Game Stackelberg game has been widely used in wireless communications to model the interactions of steatitic parties, such as physical layer security [26], resource management for LTEunlicensed [27], cognitive radio [28] and wireless energy harvesting [18], [19], [29]–[31]. In [29], the authors considered cooperative spectrum sharing with one primary user (PU) and one secondary user (SU), which harvests energy from ambient radio signal. The Stackelberg game was used to design the the SU’s optimal cooperation strategy. In [30], simultaneous wireless information and power transfer (SWIPT) in relay interference channels was considered, where multiple sourcedestination pairs communicate through their dedicated energy harvesting relays. The optimal power splitting ratios for all relays were derived by the formulated Stackelberg game. In [31], the authors formulated a stochastic Stackelberg game to study the delay optimal power allocation scheme. There is a recent paper addressing the EAP assisted wireless energy harvesting by using Stackelberg game [19], but their system settings are different from those in our work. Only one EAP with multiple antennas was considered in this paper, and the EAP acts as the seller and the base station (BS) as the buyer in behalf of its sensors. A more relevant work is [18], where an incentive mechanism was designed for the system with the similar setup where monetary reward with unified pricing were provided by the DAP to motivate third-party EAP 1 EAP 2 DAP Backhaul EAP N Server Information Transmission Radio Frequency Energy Transfer Active Sensor Inactive Sensor Fig. 1: System model for the radio frequency energy harvesting assisted Internet of Things network EAPs to assist the charging process. Here the unified pricing means prices per unit energy for different EAPs are the same. However, in this paper, we consider discriminative pricing scheme of Stackelberg game for the heterogenous EAPs in our work, including unified pricing scheme as a special case. Here discriminative pricing means that we set different energy prices for different EAPs to fully exploit their potentials for the enery charging service. Moreover, we extend the Stackelberg game to asymmetric information scenario by optimizing expected utility function of the DAP, instead of optimizing instantaneous utility function of the DAP in the classical Stackelberg game. III. S YSTEM M ODEL Consider a wireless energy harvesting-based IoT system consisting of one DAP and N EAPs belonging to different operators, which are connected to constant power supplies and connected to the server by backhauls, as shown in Fig. 1. The DAP is responsible for collecting various data from several wireless-powered sensors within its serving region. Without embedded energy supplies, the wireless-powered sensors fully rely on the energy harvested from the RF signals emitted by the EAPs to transmit its information to the DAP. For simplicity, we consider that the RF energy transfer and information transmission are performed over orthogonal bandwidth. For analytical tractability, time division-based transmission among sensors is adopted, i.e., there is only one active sensor during each transmission block. Hereafter, we refer to this active sensor as the information source. Besides, all the nodes in the system are assumed to be equipped with single antenna and operate in the half-duplex mode. We consider that the energy-carrying signals sent by the EAPs are independent and identically distributed (i.i.d.) random variables with zero mean and unit variance. Note that no coordination between the EAPs is needed since independent signals are transmitted. All channels are assumed to experience independent slow and flat fading, where the channel gains remain constant during each transmission block and change 4 independently from one block to another2. The information source rectifies the RF signals received from the EAPs and uses the harvested energy to transmit its information. The time duration of every transmission block is normalized to one. So we use “energy” and “power” interchangeably hereafter. The amount of energy harvested by the information source during one transmission block can be expressed as Es = η N X pm Gm,s , (1) m=1 where 0 < η < 1 is the energy harvesting efficiency, pm is the charging power of the mth EAP, and Gm,s is the channel power gain between the mth EAP and the information source. Note that the noise is ignored in (1) since it is practically negligible at the energy receiver. The harvest-use protocol is considered in this paper [32]. More specifically, the information source will use the harvested energy to perform instantaneous information transmission to the DAP. We consider a battery-free design which indicates that the sensor only has a storage device like supercapacitor to hold the harvested energy for a short period of time, e.g., among its scheduled transmission block. Hence the sensor exhausts all the harvested energy in each transmission block, so the sensor’s energy storage device is emptied at the beginning of the transmission block. This battery-free design can reduce the complexity and costs of the sensors, which is particularly suitable for the considered IoT sensing applications and has been adopted by other applications [33], [34]. The transmit power of the information source is thus given by Ps = Es . (2) Then, the received signal-to-noise ratio (SNR) at the DAP is given by ps Ga,s , (3) β= N0 where N0 is the noise power at the DAP, and Ga,s is the channel power gain from the information source to the DAP. Note that the time duration for each transmission block is normalized as one, such that the channel capacity and throughput can be used interchangeably. Hence the achievable throughput (bps) from the information source to the DAP can be expressed by RSD = W log2 (1 + β) ! N (4) ηGa,s X pm Gm,s , = W log2 1 + N0 m=1 where W is the bandwidth. We define the received signal power at the active sensor contributed by the mth EAP3 as 2 Pilots are broadcasted by the active sensor to allow the DAP and EAPs to estimate the channels. So the DAP is aware of the channel gain from the DAP to the sensor and each EAP is aware of the channel gain from this EAP to the sensor. But the DAP generally is not aware of the channel gains from the EAPs to the active sensor. The energy consumption of channel estimation is ignored. 3 Note that the received power contributed by each EAP is assumed to be distinguishable by considering that the EAPs work in disjoint narrow bandwidth. qm = pm Gm,s , and set γ = ηGa,s /N0 for notation simplicity. We can thus simplify (4) as ! N X (5) qm . RSD = W log2 1 + γ m=1 As we mentioned before, the EAPs considered in the system belong to different operators and act strategically, so they would not help the DAP voluntarily. To address this issue, the DAP needs to provide rewards to motive the EAPs to charge its sensors. In this paper, we mainly focus on monetary rewards as the incentive between operators. Other forms of rewards, such as physical resources (e.g., spectrum), or free offloading data between operator can also be used. To efficiently exploit the EAPs to achieve a good throughput, the following questions need to be answered in asymmetric information: Which EAPs the DAP should hire, how much energy should be requested from the hired EAPs, and how many rewards should be given to the hired EAPs? IV. I NCENTIVE M ECHANISMS WITH A SYMMETRIC I NFORMATION To answer the above questions in the practical scenario with asymmetric information, we first model the strategic interactions between the DAP and EAPs as a Stackelberg game. We will first re-design and re-analyze the existing Stackelberg game into the considered scenario by defining and optimizing expected utility of the DAP. In economic theories, contract theory is a powerful tool to design incentive mechanism in information asymmetry. As such, we will then reformulate the incentive mechanism problem into an optimal contract design problem. A. Stackelberg Game with Asymmetric Information In this part, we will first explore how to design a Stackelberg game to model the interactions between the DAP and the EAPs, and then derive the optimal energy prices under asymmetric information. In the proposed Stackelberg game with asymmetric information, the DAP provides rewards to the EAPs for charging its sensors. The DAP is the leader of the formulated Stackelberg game, which imposes energy prices for the EAPs. The DAP optimizes the energy prices to maximize its expected utility function defined as the difference between the benefits obtained from the achievable throughput and its total payment to the EAPs. The EAPs are the followers which optimize their utility functions defined as the payment received from the DAP minus its energy cost. 1) Stackelberg Game Formulation: The channel conditions and energy costs of EAPs are different, so the efficiencies of EAPs to charge the sensor are distinct. To fully exploit the potential of the EAPs, a discriminative pricing strategy is considered, i.e., the DAP can impose different prices of per unit energy harvested from different EAPs. Let q = [q1 , q2 , . . . , qN ]T as the vector of the active sensor’s received power from EAPs, with qm denoting the received power from the mth EAP, and let λ = [λ1 , λ2 , . . . , λN ]T as the vector of prices per unit energy harvested from EAPs, with λm ≥ 0 5 denoting the price per unit energy harvested from the mth EAP. The total payment of the DAP to the EAPs is λ, q ) = Λ(λ N X λm qm , (6) m=1 where qm is the received energy from mth EAP. Since the aim of the DAP is to achieve higher throughput at the cost of less rewards to the EAPs, the utility function of the DAP can be defined as S λ , q ) = RSD − cΛ(λ λ , q ). (λ UDAP (7) where RSD is the achievable throughput defined in (4) and (5), c is the unit cost of the DAP, which is normalized as c = 1 without loss of generality hereafter. Each EAP is modeled as a follower which would like to maximize its individual profit, the utility of which is defined as (8) UkS (λk , qk ) = λk qk − Ck (pk ), where pk = qk /Gk,s is the transmit power of the kth EAP, and Ck (·) is used to model the energy cost of the kth EAP, given by Ck (x) = ak x2 , (9) where ak > 0 is the energy cost coefficient. Note that the above quadratic function has been widely adopted in the energy trading market to model the energy cost [35]. The utility function of the kth EAP becomes ak (10) UkS (λk , qk ) = λk qk − 2 qk2 , Gk,s Since the DAP is not aware of each EAP’s exact energy cost coefficient and channel gain, it can sort EAPs into some discrete types and use the statistical distributions of the types of EAPs from historical data to optimize the expected utility of the DAP. Specifically, we define the type of the kth EAP as G2k,s , (11) θk := ak which suggests that the larger the channel gain Gk,s between the EAP and the information source, and/or the lower the unit energy cost coefficient ak , the higher the type of the EAP. Without loss of generality, we assume that there are totally K types of EAPs with θ1 < θ2 < · · · < θK . In this definition, the higher type EAP has better channel quality and/or lower energy cost coefficient. Note that since ak > 0 and Gk,s > 0, θ > 0 holds. Using (11), the EAP’s utility can be rewritten as qk2 . (12) θk Assume PKthere are Nk EAPs belonging to the kth type, we thus have k=1 Nk = N . We then can rewrite the DAP’s utility according to the types of EAPs as ! K K X X S Nk λk qk . Nk qk − UDAP (λk , qk ) = W log2 1 + γ UkS (λk , qk ) = λk qk − k=1 k=1 (13) In this section, we consider a scenario with strong information asymmetry. In such a scenario, the DAP is only aware of the total number of EAPs (i.e., N ) and the distribution of each type. But it does not know each EAP’s private type and thus it does not know the exact number of EAPs belonging to each type k (i.e., Nk ). As such, the DAP needs to optimize its expected utility over the possibilities of all possible combinations of Nk . The expected utility of the DAP with N EAPs is given by S λ , q )} = E{UDAP (λ −n1 N NX X N− ··· n1 =0 n2 =0 ( " Φn1 ,...,nK W log2 1+γ K X k=1 PK−2 i=0 X ni nK−1 =0 nk qk ! − K X k=1 nk λk qk #) , (14) PK−1 where nK = N − n is known after giving i i=0 n1 , n2 , . . . , nK−1 since the DAP knows the total number N of EAPs, and Φn1 ,...,nK is the probability of a certain combination of the number of EAPs belonging to each type (i.e., Nk , {k = 1, 2, . . . , K}). We assume that all types are uniformly distributed. The probability of one EAP belonging to each type is the same, which is 1/K. In this case, Φn1 ,...,nK can be calculated as Φn1 ,...,nK = Pr (N1 = n1 , N2 = n2 , . . . , Nk = nk ) (15) N! = n1 !n2 ! . . . nK !K N Since the DAP is not aware of the EAPs’ private information, it can only optimize the expectation of DAP’s utility function by using the statistical knowledge of the EAP’s private information. So the optimization problem for the DAP or the leader-level game can be formulated as (P4.1) : S λ , q )} max E{UDAP (λ λ s.t. λ ≥ 0 (16) Accordingly, the optimization problem for the EAP with kth type or the follower-level game can be formulated as (P4.2) : max UkS (λk , qk ) qk (17) s.t. qk ≥ 0 Note that although the DAP does not know the EAP’s exact type, it knows the type set of EAPs. The Stackelberg game for the considered system has been formulated by combining problems (P4.1) and (P4.2). In this game, the DAP is the leader who aims to solve problem (P4.1), while the EAPs are the followers who aim to solve their individual problem (P4.2). Once a game is formulated, the subsequent task is to find its equilibrium point(s). For the solution of the formulated game, the most well-known concept is the Stackelberg equilibrium (SE), which can be formally defined as follows: Definition 1 (Stackelberg equilibrium (SE)). We use λ ∗ = ∗ T ] to denote the [λ∗1 , λ∗2 , . . . , λ∗N ]T and q ∗ = [q1∗ , q2∗ , . . . , qN solutions of problems (P4.1) and (P4.2), respectively. Then, λ ∗ , q ∗ ) is a SE of the formulated game if the following (λ conditions are satisfied S S λ ∗ , q ∗ ) ≥ UDAP λ, q ∗ ) , UDAP (λ (λ (18) 6 S ∗ S Um (qm , λ∗m ) ≥ Um (qm , λ∗m ) , (19) for all λ ≥ 0 and q ≥ 0 . 2) Analysis of the Proposed Game: In this part, we will analyze the SE of the proposed Stackelberg game with asymmetric information. It can be observed from (10) that for given values of λk , the utility function of the the EAP with the kth type is a quadratic function of its contributed power qk to the active sensor and the constraint is affine, which indicates that the problem (P4.2) is a convex optimization problem. Thus, it is straightforward to obtain its optimal solution given in the following lemma: Lemma 1. For given values of λk , the optimal qk∗ of the EAP with kth type for problem (P4.2) is given by θk λk . (20) 2 Proof. The proof of this lemma follows by noting that the objective function of problem (P4.2) given in (17) is a quadratic function in terms of qk . qk∗ = It can be observed from Lemma 1 that for the same energy price, an EAP with better channel gain and/or less energy cost would like to contribute more power to the sensors. Then we replace qk with qk∗ in problem (P4.1), the optimization problem at the DAP side can be expressed as S λ, q ∗ )} max E{UDAP (λ (P4.3) : λ (21) s.t. λ ≥ 0 S λ , q ∗ )} is given by where E{UDAP (λ S λ , q ∗ )} E{UDAP (λ = −n1 N NX X N− ··· n1 =0 n2 =0 ( " Φn1 ,...,nK W log2 − K 1X 2 k=1 nk θk λ2k i=0 X ni nK−1 =0 K γX 1+ nk θk λk 2 k=1 #) PK−2 ! (22) , where Φn1 ,...,nK is given in (15). We can observe that problem (P4.3) is a concave function in terms of vector λ . This is because each term in the summation is composed by a logarithm function (concave) and quadratic functions (concave), and the summation of concave functions are still a concave function. Moreover, the constraint is affine. Problem (P4.3) is then a convex optimization problem. So we can numerically solve the system of equations given by the KKT conditions to get the solution of problem (P4.3). According the KKT conditions, we can also get some insight about the structure of the solution and thus have the following proposition. Proposition 1. The optimal solution to problem (P4.3) have the following structure: λ∗1 = λ∗2 = · · · = λ∗N . Proof. See Appendix A. (23) We surprisingly find that the optimal energy prices for different EAPs are the same, even if we impose discriminative prices for different EAPs in the original design of the Stackelberg game. This is because the energy price of unit received power is used in our pricing scheme. The DAP has no motivation to treat the received power from EAPs differently, so a unified pricing per unit received power is achieved. Lack of complete information, the performance of the Stackelberg game with asymmetric information is worse than that with complete information. Note that in the considered scenario, there are N EAPs in the market. In each channel realization, each EAP in the market selects one EAP type from a EAP type set randomly. In each channel realization, the Stackelberg game under complete information can adapt to the instantaneous combination of EAP types and calculate an optimal price for each instantaneous combination of EAP types by optimizing the instantaneous utility function. While the Stackelberg game under asymmetric information cannot adapt to instantaneous combination of EAP types, since it can only calculate a single price for all possible combinations of EAP types. Therefore, the reason that Stackelberg game under asymmetric information is worse than Stackelberg game under complete information is that it fails to adapt to the change of the instantaneous combinations of EAP types, i.e., the change of wireless channel conditions. This deduction will be verified later in the simulation part. B. Optimal Contract with Asymmetric Information As we mentioned above, the performance of the Stackelberg game is degraded under asymmetric information. To improve the performance under asymmetric information, the DAP could design and offer a contract to effectively motivate the EAPs to charge its sensors. Note that in Stackelberg game, the EAP has the freedom to optimize its own utility by choosing any amount of received signal power at the active sensor when the DAP imposes some given energy price. Different from Stackelberg game, limited options are allowed for EAPs to select in contract theory. Specifically, a group of energy-reward pairs (referred to as contract items) are designed. A contract consisting of a group of contract items is provided to the EAPs. The EAPs will choose a contract item at its discretion to maximize its benefit. By properly designing the contract item, the DAP can induce the EAP to expose its type by its selection of the contract item and thus relieve the information asymmetry. In the following, we will formulate the optimal contract, characterize its feasibility conditions and provide optimal solution for the formulated contract. 1) Contract Formulation: In this part, we will formulate a contract for the RF energy trading between the DAP and EAPs, characterize its feasibility conditions, and derive the optimal contract subject to the feasibility conditions. A contract including a series of energy-reward pairs (qk , πk ) is designed to maximize the expectation of the DAP’s utility. For the kth type EAP, qk is the received power contributed by kth EAP and πk is the reward paid to the kth EAP as the incentive for the corresponding contribution. 7 We first rewrite the utility functions of the DAP and EAPs according to contract items. The DAP’s utility function is thus given by ! K K X X C π , q ) = W log2 1 + γ Nk πk , (24) Nk qk − UDAP (π k=1 k=1 where π = [π1 , π2 , . . . , πK ]T is the reward paid by the DAP to the EAP with the kth type for its corresponding contribution q = [q1 , q2 , . . . , qK ]T . Similar to (14), the expectation of C π , q ) can be represented as UDAP (π C π , q )} = (π E{UDAP −n1 N NX X N− ··· n1 =0 n2 =0 ( " Φn1 ,...,nK W log2 1+γ PK−2 i=0 X ni nK−1 =0 K X nk qk k=1 ! − K X nk πk k=1 #) , (25) PK−1 where nK = N − n is known after giving i i=0 n1 , n2 , . . . , nK−1 since the DAP knows the total number N of EAPs, and Φn1 ,...,nK is the probability of a certain combination of the number of EAPs belonging to each type (i.e., Nk , {k = 1, 2, . . . , K}), which is given by (15). And then the utility function of the EAP with the kth type is rewritten as q2 UkC (πk , qk ) = πk − k . (26) θk The social welfare is defined as the summation of the utilities of the DAP and all N EAPs, given by C π , q ) = UDAP π, q ) + Γ(π (π = W log2 K X Nk UkC (πk , qk ) k=1 K X 1+γ k=1 Nk qk ! − K X Nk q 2 k k=1 θk (27) . It can be seen that the internal transfers, i.e., rewards, are cancelled in the social welfare, which is consistent with the aim to maximize the efficiency of the whole system, i.e., achieving more throughput at the cost of less energy consumptions. Next, we will figure out the feasibility conditions. In our design, to encourage the EAPs to participate in the charging process and ensure that each EAP only chooses the contract item designed for its type, the following individual rationality (IR) and incentive compatibility (IC) constraints should be satisfied [21]. Definition 2 (Individual Rationality (IR)). The contract item that an EAP chooses should ensure a nonnegative utility, i.e., UkC (πk , qk ) = πk − qk2 ≥ 0, ∀k ∈ {1, . . . , K}. θk (28) Definition 3 (Incentive Compatibility (IC)). An EAP of any type k prefers to choose the contract item (qk , πk ) designed for its type, instead of any other contract item (qj , πj ), ∀j ∈ {1, . . . , K} and j 6= k, given by qj2 πk − ≥ πj − , ∀k, j ∈ {1, . . . , K}. θk θk qk2 (29) The IR condition requires that the received reward of each EAP should compensate the cost of its consumed energy when it participates in the energy trading. If Uk ≤ 0, the EAP will choose not to charge the information source for the DAP. We define this case as (qk = 0, πk = 0). The IC condition ensures that each EAP automatically selects the contract item designed for its corresponding type. The type of each EAP is thus revealed to the DAP, which is called “self-reveal”. If a contract satisfies the IR and IC constraints, we refer to the contract as a feasible contract. Following the idea of contract theory [21], the DAP aims at maximizing its expected utility subjecting to the constraints of IR and IC given in (28) and (29). Thus, the optimal contract is the solution to the following optimization problem (P4.4) : C π , q )} max E{UDAP (π π ,q q) (π qk2 ≥ 0, ∀k ∈ {1, . . . , K}, θk qj2 q2 πk − k ≥ πj − , ∀k, j ∈ {1, . . . , K}, θk θk qk ≥ 0, πk ≥ 0, θk ≥ 0, ∀k ∈ {1, . . . , K}. (30) The first two constraints correspond to IR and IC, respectively. Note that the EAP will reveal its private type truthfully with the IR and IC constraints. Specifically, the IR condition ensures the EAP’s participation and the IC condition ensures that each EAP selects the contract item designed for its corresponding type to gain highest payoff. 2) Constraint Reduction: There are K IR constraints and K(K − 1) IC constraints in (30), which are non-convex and couple different EAPs together. It is hard to solve (30) directly due to the complicated constraints. Motivated by this, in the subsection we first reduce the constraints of (30) and transform it. We first realize that the following necessary conditions can be derived from the IR and IC constraints. s.t. πk − Lemma 2. For any feasible contract, πi > πj if and only if qi > qj , ∀i, j ∈ {1, . . . , K}. Proof. See Appendix B. Lemma 2 shows that the EAP contributing more received power at the information source will receive more reward. Lemma 3. For any feasible contract, πi = πj if and only if qi = qj , ∀i, j ∈ {1, . . . , K}. Lemma 3 can be proved by using similar procedures as Lemma 2, which is omitted for brevity. Lemma 3 indicates that the EAPs providing the same received power will get the same amount of reward. Lemma 4. For any feasible contract, if θi > θj , then πi > πj , ∀i, j ∈ {1, . . . , K}. Proof. See Appendix C. Lemma 3 shows that a higher type EAP should be given more reward. Together with Lemma 1 and Lemma 2, it can be duduced that a higher type EAP also contributes more 8 energy to the information source. We define this feature as monotonicity. Definition 4 (Monotonicity). If θi ≥ θj , ∀i, j ∈ {1, . . . , K} and then πi ≥ πj . Based on the above analysis, we can now use the IC condition to reduce the IR constraints and have the following lemma. Lemma 5. With the IC condition, the IR constraints can be reduced as q2 π1 − 1 ≥ 0. (31) θ1 Proof. See Appendix D. We can also reduce the IC constraints and attain the following lemma. 3) Solution to Optimal Contract: We now solve the optimization problem (35) to attain the optimal contract in the subsequent way: a standard method is first applied to resolve the relaxed problem without monotonicity and the solution is then verified to satisfy the condition of the monotonicity. By iterating the first and second constraints in (35), we have k 2 q12 X qn2 − qn−1 + θ1 n=2 θn   k 1 2 X 1 1 2 = qk + qn−1 , − θk θ θ n−1 n n=2 πk = C π , q )}, where ∀k ∈ {2, . . . , K}. Substitute (36) into E{UDAP (π and all πk , ∀k ∈ {1, . . . , K} are removed from the optimization problem (35), which becomes Lemma 6. With monotonicity, the IC condition can be reduced as the local downward incentive compatibility (LDIC), given by q2 q2 πi − i ≥ πi−1 − i−1 , ∀i ∈ {2, . . . , K}, (32) θi θi and the local upward incentive compatibility (LUIC), given by q2 qi2 ≥ πi+1 − i+1 , ∀i ∈ {1, . . . , K − 1}, θi θi Proof. See Appendix E. πi − π ,q q) (π q12 ≥ 0, 2θ1 q2 q2 πi − i ≥ πi−1 − i−1 , ∀i ∈ {2, . . . , K}, θi θi 2 qi+1 qi2 ≥ πi+1 − , ∀i ∈ {1, . . . , K − 1}, πi − θi θi πK ≥ πK−1 ≥ · · · ≥ π1 , s.t. π1 − qk ≥ 0, πk ≥ 0, θk ≥ 0, ∀k ∈ {1, . . . , K}. (34) The LDIC and the LUIC in (34) can be combined as shown in Lemma 8. Lemma 7. Since the optimization objective function is an increasing function of qk and a decreasing function of πk , ∀k ∈ {1, . . . , K}, the above optimal problem can be further simplified as (P4.6) : C π , q )} max E{UDAP (π π ,q q) (π q12 = 0, θ1 q2 q2 πk − k = πk−1 − k−1 , ∀k ∈ {2, . . . , K}, θk θk πK ≥ πK−1 ≥ · · · ≥ π1 , s.t. π1 − qk ≥ 0, πk ≥ 0, θk ≥ 0, ∀k ∈ {1, . . . , K}. (35) Proof. See Appendix F. q −n1 N NX X N− × W log2 1 + γ − K−1 X k=1 PK−2 ··· n1 =0 n2 =0 " s.t. C π , q )} max E{UDAP (π (P4.5) : max (33) By using the reduced IR and IC constraints, the optimization problem (30) can be transformed as (36) i=0 X ni Φn1 ,...,nK nK−1 =0 K X k=1 nk qk ! K K 1 X 1 X ni − ni θk θk+1 i=k i=k+1 ! qk2 # nK 2 − q , θK K qk ≥ 0, ∀k ∈ {1, . . . , K}. (37) Note that (37) is composed of logarithmic functions and quadratic functions, both of which are concave functions. And the positive summation of all these concave function is still a concave function. Besides, the constraint set is a convex set. So we can leverage standard convex optimization tools in [36] to solve it to get qk , and then πk can be calculated by (36). Moreover, monotonicity is met automatically when the type is uniformly distributed [21]. So far, we have derived the optimal contract (qk , πk ), ∀k ∈ {1, . . . , K}, which can maximize the utility of the DAP and satisfy the constraints of IR and IC. C. Practical Implementation To implement the proposed approach in a practical radio frequency energy harvesting-based IoT system. The following steps should be followed. First, the DAP needs to collect the information it requires by the computation of the optimal contract. The active sensor will broadcast pilots to allow the DAP and EAPs to estimate the channels such that the DAP is aware of the channel gain from the DAP to the sensor. From historical data, the DAP can obtain empirical values of the energy harvesting efficiency factor and noise power, and thus it can attain the value of parameter γ. With the known values of other public system parameters including the channel bandwidth, the user number, and the set of EAP types, the DAP can calculate the optimal contract. Next, the DAP will broadcast the optimal contract to the candidate EAPs via the corresponding backhauls. By evaluating the contract, the EAPs will decide whether to participate in the cooperation. If it decides to participate in the current energy trading, it will send a feedback to the DAP. After the 9 DAP received the feedback, it will sign a contract with the EAP. Finally, after the contracts are signed, the EAPs will perform the contracts by establishing an energy transfer link towards the active sensor and charge it according to the agreed transmit power. When the DAP detects that the EAPs have fulfilled its contractual obligation, the DAP will pay the EAP with agreed amount of rewards via the backhaul connecting the operators. To investigate the impacts from information scenarios and compare the proposed schemes with the existing schemes under complete information, we first extend existing Stackelberg game from unified pricing strategy into discriminative pricing strategy. And then we present the centralized optimization scheme under complete information as the reference for the proposed incentive mechanisms. A. Stackelberg Game Formulation To fully exploit the potentials of EAPs with distinct channel conditions and energy costs, a discriminative pricing strategy is considered, i.e., the DAP can impose different prices of per unit energy harvested from different EAPs. The utility function of the DAP can be rewritten as = RSD − N X λm qm . (38) m=1 where q = [q1 , q2 , . . . , qN ]T is the vector of the active sensor’s received power from EAPs, with qm denoting the received power from the mth EAP, λ = [λ1 , λ2 , . . . , λN ]T is the vector of prices per unit energy harvested from EAPs, with λm ≥ 0 denoting the price per unit energy harvested from m EAP, and RSD is the achievable throughput defined in (4) and (5). The optimization problem for the DAP or the leader-level game can be formulated as (P5.1) : S λ, q ) max UDAP (λ λ s.t. λ ≥ 0 (39) Note that the optimization problem (P5.1) is different from (P4.1) under asymmetric information, the instantaneous utility of the DAP is optimized here, instead of expected utility of the DAP in asymmetric information. Each EAP is modeled as a follower which would like to maximize its individual profit, the utility of which is rewritten as am 2 S , (40) Um (λm , qm ) = λm qm − 2 qm Gm,s where am > 0 and Gm,s are the energy cost coefficient and channel gain of the mth EAP, respectively. Thus, the optimization problem for the EAP m or the follower-level game is given by (P5.2) : S max Um (λm , qm ) qm s.t. qm ≥ 0 In this subsection, we will derive the SE of the formulated game by analyzing the optimal strategies for the DAP and EAPs to maximize their own utility functions. A closedform solution is derived by using Karush-Kuhn-Tucker (KKT) conditions. ∗ First, the optimal qm of the mth EAP is similar to that in (20), which is given by the following Lemma: Lemma 8. For given λm , the optimal solution for problem (P5.2) is given by V. B ENCHMARK S CHEMES WITH C OMPLETE I NFORMATION S λ, q ) UDAP (λ B. Analysis of the Formulated Stackelberg Game (41) ∗ qm = G2m,s λm . 2am (42) Proof. The proof of this lemma follows by noting that the objective function of problem (P5.2) given in (41) is a concave function in terms of qm . It can be observed from Lemma 8 that for the same energy price, an EAP with better channel gain and/or less energy cost would like to contribute more power to the active sensor. Subsequently, we need to solve problem (P5.1) by replacing ∗ qm with qm given in (42). The optimization problem at the DAP side can be expressed as (P5.3) : S λ, q ∗ ) max UDAP (λ λ (43) s.t. λ ≥ 0 S λ, q ∗ ) is given by where UDAP (λ S λ, q ∗ ) UDAP (λ = W log2 N X G2m,s λm 1+γ 2am m=1 N X G2m,s 2 − λ . 2am m m=1 ! (44) We can observe that problem (P5.3) is a concave function in terms of vector λ since the former part in (44) is a logarithm function (concave) and the latter parts in (44) are the summation of quadratic functions (concave), and the constraint is affine. So problem (P5.3) is a convex optimization problem. By using KKT conditions to solve problem (P5.3), the closedform solution for λ is derived in the following proposition. Proposition 2. The optimal solution to problem (P5.3) is given by p log2 (e)γ 2 W Θ + 1 − 1 ∗ ∗ ∗ λ1 = λ2 = · · · = λN = , (45) γΘ where e is the base of the natural logarithm, Θ is given by Θ= Proof. See Appendix G. N X G2m,s . am m=1 (46) Proposition 2 shows that the optimal prices for the Stackelberg game with complete information are the same. This result is consistent with that of the Stackelberg game with asymmetric information. As we explained before, this is because the received power price is used in the Stackelberg games 10 with complete and asymmetric information. The DAP has no motivation to treat the received power from EAPs differently. Note that the Stackelberg game under complete information can calculate an optimal price for each instantaneous channel realization and equivalently the combination of EAPs’ types. As such, it can adapt to the change of channel conditions. As a comparison, the Stackelberg game under asymmetric information can only calculate a single price no matter of the change of the channel conditions, i.e., the change of the combinations of the EAPs’ types. TABLE I: System Settings Parameters 1MHz Energy cost coefficient am [0.1,1] dm,s [5m,10m] da,s [15m,25m] 2 Power attenuation at reference distance of 1m 30dB Noise power N0 10−8 mW 0.1 C π , q )} max E{UDAP (π π ,q q) (π q2 s.t. πk − k ≥ 0, ∀k ∈ {1, . . . , K} θk (47) -0.1 -0.2 peak values -0.3 type 3 type 6 type 9 -0.4 C π , q )} is given in (25). where E{UDAP (π Since the DAP knows exactly the types of the EAPs, the optimal prices are given by qk2 , ∀k ∈ {1, . . . , K} θk 0 Utilities of EAPs In this part, the performance of centralized optimization scheme, i.e., the optimal contract with complete information, where the DAP knows exactly the types of the EAPs, is presented. The centralized optimization problem is given as follows. πk∗ = 0.5 Bandwidth W Path-loss coefficient α C. Centralized Optimization (P5.4) : Values Energy harvesting efficiency η (48) -0.5 1 2 3 4 5 6 7 8 9 10 Contract item for a certain type EAP Fig. 2: Utilities of EAPs with type 3, type 6 and type 9 as functions of contract items designed for all kinds of EAPs from type 1 to type 10. We set N = 5 and K = 10. We substitute πk in (47) with πk∗ and get VI. S IMULATIONS C π ∗ , q )} max E{UDAP (π (P5.5) : q (49) s.t. q ≥ 0 C π ∗ , q )} is given by where E{UDAP (π C π ∗ , q )} E{UDAP (π = −n1 N NX X N− ··· n1 =0 n2 =0 ( " Φn1 ,...,nK W log2 1+γ PK−2 K X k=1 i=0 X ni nK−1 =0 nk qk ! − K X k=1 q2 nk k θk #) . (50) Note that (50) is exactly the expectation of the social welfare, which is defined in (27). Although we originally optimize the utility function of the DAP in problem (P5.4), it is consistent with the optimization of the social welfare, which is similar case in the design of contract theory as we mentioned before. It can also be observed that problem (P5.5) is a convex optimization problem. This is because each term in the summation is composed a logarithm function (concave) and quadratic functions (concave), the summation of concave functions are still a concave function, and the constraint is affine. We can get the solution of problem (P5.5) by solving the system of equations given by KKT conditions, which is omitted here as it is similar to that in Appendix A. AND D ISCUSSIONS In this section, we first evaluate the feasibility of the proposed contract, and then compare the performance of the proposed incentive mechanisms. The performance of centralized optimization scheme is also simulated as the upper bound. The main system parameters are shown in Table I. Since θ = G2m,s /am and γ = ηGa,s /N0 , the practical ranges of θ and γ can be determined by the parameters shown in Table I. In the simulations, K types of EAPs are first generated randomly and used as the set of EAP types. Then each of N EAPs in the market will choose one type from the set of EAP types uniformly, and thus the DAP’s type θ is uniformly distributed. The unit of achievable throughput is set as Mbps. To verify the feasibility (i.e., IR and IC) of the proposed scheme under information asymmetry, the utilities of EAPs with type 3, type 6 and type 9 are plotted in Fig. 2 as functions of all contract items (qk , πk ), k ∈ 1, 2, . . . , K. We can see from Fig. 2 that each of the utility achieves its peak value only when it chooses the contract item designed for its corresponding type, which indicates that the IC constraint is satisfied. For example, for the type 6 EAP, its utility achieves the peak value only when it selects the contract item (q6 , π6 ), which is exactly designed for its type. If the type 6 EAP selects any other contract item (qk , πk ), k ∈ 1, 2, . . . , K and k 6= 6, its utility will reduce. Moreover, when each of above type EAPs (i.e., type 3, type 6 and type 9) chooses the contract 11 2.2 3.5 2 1.8 Centralizd optimization, Complete information Contract theory,Asymmetric infomation Stackelberg game, Asymmetric infomation Stackelberg game, Complete information Centralizd optimization, Complete information Contract theory, Asymmetric infomation Stackelberg game, Asymmetric infomation Stackelberg game, Complete information 3 1.6 Social Welfare Social Welfare 2.5 1.4 1.2 2 1 1.5 0.8 0.6 1 0.4 0.2 0.8 0.5 1 1.2 1.4 1.6 1.8 2 2 2.2 Fig. 3: Social welfare as a function of γ. We set N = 2 and K = 5. 3 4 5 6 7 8 9 10 Fig. 5: Social welfare as a function of N . We set K = 2, γ = 2.2 and K = 2, 3, . . . , 10. 0.9 1 0.85 0.8 0.75 0.7 Normalized Social Welfare Normalized Social Welfare 0.9 Contract theory, Asymmetric infomation Stackelberg game, Asymmetric infomation Stackelberg game, Complete information 0.8 0.65 0.6 0.55 0.5 0.7 0.6 0.5 0.4 0.45 0.3 0.4 0.8 1 1.2 1.4 1.6 1.8 2 2.2 Contract theory, Asymmetric infomation Stackelberg game, Asymmetric infomation Stackelberg game, Complete information 0.2 2 Fig. 4: Normalized social welfare as a function of γ. We set N = 2 and K = 5. item designed for its corresponding type, the utilities are nonnegative. Note that similar phenomenon can be observed for all other types of EAPs when they select the contract item designed for their corresponding types, which are not shown in Fig. 2 for brevity. In this sense, the IR condition is satisfied. It can be concluded that utilizing the proposed scheme, EAPs will automatically reveal its type to the DAP after selecting the contract item. This means that using the proposed scheme, the DAP can capture the EAPs’ private information (i.e., its type), and thus effectively address the problem of information asymmetry. To evaluate the performance of the proposed schemes, we compare the social welfare of the contract, Stackelberg games and the upper bound. Fig. 3 plots the social welfare of these schemes as a function of γ. It can be observed from Fig. 3 that the utilities achieved by allPschemes increase with N γ. This is because with the same m=1 qm , the larger the value of γ, the larger the achievable throughput Rsa (refer 3 4 5 6 7 8 9 10 Fig. 6: Normalized social welfare as a function of N . We set K = 2, γ = 2.2 and N = 2, 3, . . . , 10. to (5)), and thus larger social welfare (refer to (27)). The performance of the optimal scheme with complete information providing the best performance serving as the upper bound. The performance of contract scheme is generally better than that of two Stackelberg games. This is because in contract theory, the EAPs have limited contract items to choose from and thus by using the contract theory, the DAP extracts more benefits from the EAPs and leave less surplus for the EAPs. However, in Stackelberg games, the EAPs have the freedom to optimize its individual utility function and thus can reserve more surplus. So the performance of the Stackelberg games are inferior than that of the contract scheme. We can also observe that the Stackelberg game with asymmetric information is inferior than that with complete information. This is because without complete information, the Stackelberg game fails to adapt to the change of the channel, and thus the performance becomes worse. 12 Fig. 4 shows the normalized social welfare as a function of γ, where social welfare of the contract and Stackelberg games are normalized by the upper bound. It can be seen in Fig. 4 that when γ is small, the social welfare of contract can initially achieve more than 85% of that of the centralized optimization scheme with complete information, and gradually approach to it with the increasing of γ. This demonstrates that the proposed incentive mechanism can effectively mitigate the effects of information asymmetry by leveraging contract theory. While the performance of the Stackelberg game with complete information is generally less than 75% of that of the optimal scheme with complete information. Moreover, the performance of the Stackelberg game with asymmetric information is even worse, which is generally less than 50% of that of the optimal scheme with complete information. The above results show that by using the monopoly position in contract theory to provide limited contract items, the contract can achieve good performance close to the optimal centralized optimization with complete information. However, in Stackelberg games, the DAP grants some freedom for the EAPs to do optimizations, which are selfish and do not care about social welfare. As such, its performance in terms of social welfare is degraded. To explore the impact of total EAP number N in the market, we plot the curves of the social welfare and the normalized social welfare of the contract, Stackelberg games and the upper bound in Fig. 5 and Fig. 6. In Fig. 5, the social welfare of these schemes is plotted as a function of N . We can observe from Fig. 5 that the utility functions achieved by all three schemes of upper bound, contract, Stackelberg with complete information increase with N . This is because the overall social welfare increases with the number of EAPs in the market. The more EAPs in the market, the larger the summation of utility functions of all the DAP and EAPs. However, the Stackelberg game under asymmetric information decrease slightly as N increases. This is because the Stackelberg game under asymmetric information fails to adapt to the change of the combinations of the EAPs’ types. As we mentioned before, it can only calculate one single price for all the combinations of EAPs’ types. The more EAPs in the market, the more diverse combinations of the EAPs’ types. As such the performance of the Stackelberg under asymmetric information become worse. As a comparison, the Stackelberg game with complete information can calculate a price targeting a certain combination of EAPs’ types in the market. So it provides better performance than that of its asymmetric counterpart. While the contract leverages its monopoly status in the market structure to provide a limited group of contract items for the EAPs to choose from. Therefore, contract theory-based scheme provides the better performance than that of both Stackelberg games and close to the performance of the upper bound. In Fig. 6, the normalized social welfare of these schemes is plotted as a function of N , where social welfare of the contract and Stackelberg games are normalized by the upper bound. It can be seen in Fig. 6 that when N = 2, the social welfare of contract can initially gain more than 95% of that of the centralized optimization scheme with complete information, and gradually approach to it with the increasing of N . This proves that the effects of information asymmetry can be mitigated successfully by leveraging contract theory. While the Stackelberg game with complete information can only provide the normalized social welfare of less than 75%. Besides, the performance of the Stackelberg game with asymmetric information is even worse, which is generally less than 50% of that of the optimal scheme with complete information and decrease significantly with the increasing of N in the market. This is because the more EAPs in the market, the more diverse the combinations of EAPs’ types will be. The Stackelberg game under asymmetric information cannot adapt to the change of the combinations of EAPs’ types as it can only calculate a single price for all possible combinations of EAPs’ types. VII. C ONCLUSIONS AND F UTURE W ORK In this paper, we developed incentive mechanisms under complete and asymmetric information to unveil the impact of information asymmetry and market structure. Specifically, we developed a contract based incentive mechanisms for the wireless energy trading in radio frequency energy harvesting (RFEH) based Internet of Things (IoT) systems under asymmetric information. In the asymmetric information scenario, a Stackelberg game based scheme is also formulated as a comparison. In complete information, the existing Stackelberg game is extended from unified pricing into discriminative pricing as a comparison. In the simulations, it was shown that the Stackelberg game degrades significantly without complete information, and the performance of the contract scheme under asymmetric information is better than that of the Stackelberg scheme with complete information. It can be concluded that the performance of the considered system depends largely on the market structure (i.e., whether the EAPs are allowed to optimize their received power at the IoT devices with full freedom or not) than on the information scenarios (i.e., the complete or asymmetric information). In our future work, we could consider both information asymmetry as well as hidden action. In this scenario, the DAP is not aware of the private information of EAPs and it cannot distinguish the actions taken by different EAPs, i.e., the received power contributed by different EAPs. Because the actions of EAPs are hidden from the DAP, some EAPs may get the reward of the group without paying any efforts, which leads to the free-rider problem. In this case, another mathematical tool from the economics, known as the moral hazard in teams, has a good potential to design effective incentive mechanisms for this new scenario. A PPENDIX A. Proof of Proposition 1 In this part, we will prove the proposition 1. Because the problem (P4.3) is a convex optimization problem, KKT conditions are the sufficient and necessary conditions for the optimal solution. The KKT conditions of problem (P4.3) are given as follows. 13 The first-order necessary condition are given by        −W log (e)γn θ   X    1 1  2  Φn1 ,...,nK  + n θ λ   1 1 1  K P      n1 ,...,nK n θ λ 2 + γ k k k    k=1     − µ = 0  1            −W log (e)γn θ  X    2 2  2  + n θ λ Φn1 ,...,nK    2 2 2  K P    n ,...,n 1 K nk θk λk 2+γ k=1     − µ = 0  2     ..   .              −W log (e)γn θ X     N N 2  + n θ λ Φ    N N N n ,...,n 1 K  K  P    n1 ,...,nK  n θ λ 2 + γ  k k k   k=1    − µN = 0 (51) where θk ≥ 0 are the types of EAPs, µk ≥ 0 are KKT multipliers, λm ≥ 0 are the prices, and k = 1, 2, . . . , K. The complementary slackness condition is given by µ1 λ1 + µ2 λ2 + · · · + µK λK = 0. (52) Since µk ≥ 0 and λk ≥ 0, k = 1, 2, . . . , K hold, (52) becomes  µ1 λ1 = 0      µ2 λ2 = 0 (53) ..   .    µK λK = 0 To get the optimal solution of the KKT conditions, we need to solve the equation system consists of (51) and (53) in terms of µk ≥ 0 and λk ≥ 0, k = 1, 2, . . . , N , which is a system of quadratic equations. Now we will discuss the combinations of active or inactive constraints in KKT condition. Let first test if µ1 = µ2 = · · · = µK = 0 leads to a valid solution. By substitute µ1 , µ2 , . . . , µK with µ1 = µ2 = · · · = µK = 0 in (51), we have  λ) λ1 ∆ = W log2 (e)γΩ(λ      λ2 ∆ = W log2 (e)γΩ(λ λ) (54) .  ..     λ) λK ∆ = W log2 (e)γΩ(λ where ∆ is given by ∆= X Φn1 ,...,nK = 1, (55) The above system of equations in (54) can be solved numerically. Note that the right term of each equation in (54) are the same, so we can conclude that λ ). λ1 = λ2 = · · · = λK = W log2 (e)γΩ(λ (57) Because problem (P4.3) is a convex optimization problem, we can conclude that this solution given by KKT conditions is the solution of original optimization problem. B. Proof of Lemma 2 The proof is conducted in two parts. First, we prove if qi > qj , then πi > πj . Due to the IC constraints in (30), we have πi − qj2 qi2 ≥ πj − , θi θi (58) and equivalently, θi (πi − πj ) ≥ qi2 − qj2 = (qi + qj )(qi − qj ). (59) Since qi > qj , we have θi (πi − πj ) ≥ qi2 − qj2 = (qi + qj )(qi − qj ) > 0, (60) and thus πi > πj . Next we prove if πi > πj , then qi > qj . Due to the IC constraints in (30), we have πj − qj2 q2 ≥ πi − i , θj θj (61) and equivalently, (qi + qj )(qi − qj ) = qi2 − qj2 ≥ θi (πi − πj ). (62) Since πi > πj , then we have (qi + qj )(qi − qj ) = qi2 − qj2 ≥ θi (πi − πj ) > 0, (63) and thus qi > qj . This completes the proof. C. Proof of Lemma 4 We prove this by contradiction. Suppose that there exists πi < πj when θi > θj . We have (πi − πj )(θi − θj ) < 0. (64) Due to the IC constraints, we also have πi − qj2 qi2 ≥ πj − , θi θi (65) πj − qj2 q2 ≥ πi − i . θj θj (66) and n1 ,...,nK λ ), λ = [λ1 , λ2 , . . . , λK ]T is given by and Ω(λ X Φn1 ,...,nK λ) = . Ω(λ K P n1 ,...,nK 2 + γ nk θk λk k=1 Combine (65) and (66), we have (πi − πj )(θi − θj ) ≥ 0, (56) (67) which is in contradiction with (64). So if θi > θj , then πi > πj . 14 D. Proof of Lemma 5 Due to the IC condition, ∀k ∈ {2, . . . , K}, we have qk2 q2 ≥ π1 − 1 . (68) θk θk Since we have defined that θ1 < θ2 < · · · < θK , we also have πk − π1 − q12 q12 ≥ π1 − . θk θ1 Combine (68) and (69), we have (69) q2 qk2 ≥ π1 − 1 ≥ 0. (70) θk θ1 Note that (70) shows that with the IC condition, if the IR condition of the EAP with type θ1 holds, the IR condition of the other K − 1 types will also hold. So the other K − 1 IR conditions can be bind into the IR condition of the EAP with type θ1 . So far, we have proved that type θi+1 will prefer contract item (qi+1 , πi+1 ) rather than contract item (qi−1 , πi−1 ). By using (79), it can be extended downward until type θ1 , and thus all DIC holds. πi+1 − 2 q2 qi+1 q2 ≥ πi−1 − i−1 ≥ . . . ≥ π1 − 1 , ∀i. θi+1 θi+1 θ1 (80) So we conclude that with the monotonicity and the LDIC, the DIC holds. Similarly, we can prove that with the monotonicity and the LUIC, the UIC holds. πk − E. Proof of Lemma 6 There are K(K − 1) IC constraints in (30), which can be divided into K(K − 1)/2 downward incentive compatibility (DIC)4 , given by πi − qj2 qi2 ≥ πj − , ∀i, j ∈ {2, . . . , K}, i > j, θi θi (71) and K(K − 1)/2 upward incentive compatibility (UIC), given by qj2 qi2 ≥ πj − , ∀i, j ∈ {2, . . . , K}, i < j, (72) θi θi Let’s first prove the DIC can be reduced as the LDIC. By using the LDIC for three continuous types, θi−1 < θi < θi+1 , ∀i ∈ {2, . . . , K − 1}, we have πi − πi+1 − 2 qi+1 q2 ≥ πi − i , θi+1 θi+1 (73) q2 qi2 ≥ πi−1 − i−1 , ∀i. (74) θi θi By applying the monotonicity, i.e., if θi > θj , then πi > πj , ∀i, j ∈ {1, . . . , K}, we have πi − (θi+1 − θi )(πi − πi−1 ) ≥ 0, (75) θi+1 (πi − πi−1 ) ≥ θi (πi − πi−1 ), (76) F. Proof of Lemma 7 We will first prove that the LDIC can be simplified as πk − 2 qk2 /θk = πk−1 − qk−1 /θk , which together with monotonicity can ensure the LUIC hold. For the reduced IR constraint π1 − q12 /θ1 ≥ 0 in (34), the DAP will lower the π1 as possible as it can to improve the optimization objective function E{UDAP }, until π1 − q12 /θ1 = 2 0. As for the LDIC, which is πi −qi2 /θi ≥ πi−1 −qi−1 /θi , ∀i ∈ {2, . . . , K}. Notice that the LDIC will still hold if both πi and πi−1 are lowered by the same amount. To maximize the optimization objective function, the DAP will lower all π − j 2 as much as possible until πi − qi2 /θi = πi−1 − qi−1 /θi . Note that this process will not affect on other type’s LDIC. So the 2 LDIC can be reduced to πi − qi2 /θi = πi−1 − qi−1 /θi , ∀k ∈ {2, . . . , K}. 2 Next, we show that if πi − qi2 /θi = πi−1 − qi−1 /θi , ∀k ∈ {2, . . . , K} and the monotonicity hold, the LUIC holds. Since 2 /θi , ∀k ∈ {2, . . . , K}, and we have πi − qi2 /θi = πi−1 − qi−1 equally it becomes 2 θi (πi − πi−1 ) = qi2 − qi−1 . Because of monotonicity, i.e., if θi ≥ θi−1 , then πi ≥ πi−1 , we further have θi (πi − πi−1 ) ≥ θi−1 (πi − πi−1 ). (77) Equally, (77) becomes q2 q2 πi − i ≥ πi−1 − i−1 . θi+1 θi+1 (78) Combine (78) and (73), we have q2 q2 πi+1 − i+1 ≥ πi−1 − i−1 . θi+1 θi+1 (82) Combine (81) and (82), we have 2 θi (πi − πi−1 ) = qi2 − qi−1 ≥ θi−1 (πi − πi−1 ), (83) and equally we have 2 θi−1 πi − qi2 ≤ θi−1 πi−1 − qi−1 , Combine (74) and (76), we have 2 θi+1 (πi − πi−1 ) ≥ θi (πi − πi−1 ) ≥ qi2 − qi−1 . (81) πi − q2 qi2 ≤ πi−1 − i−1 , θi−1 θi−1 (84) (85) which is exactly the LUIC condition. So the LUIC can be removed from the constraints in (34). G. Proof of Proposition 2 (79) 4 Note that K(K − 1)/2 is still an integer. Because K(K − 1) is the multiplication of two continuous integers, which must be an even number. So it is divisible by two. In this part, we will prove the proposition 2. Since the problem (P5.3) is a convex optimization problem, KKT conditions will be the sufficient and necessary conditions for the optimal solution. To solve problem (P5.3), the KKT conditions are given as follows. 15 The first-order necessary condition are given by  −W log2 (e)γθ1   + θ1 λ1 − µ1 = 0  N  P   2+γ θm λm    m=1     −W log2 (e)γθ2   + θ2 λ2 − µ2 = 0   N  P 2+γ θm λm m=1     ..   .      −W log2 (e)γθN   + θN λN − µN = 0   N P    2+γ θm λm ACKNOWLEDGMENT The authors would like to thank Prof. Zhu Han for his helpful discussion. The authors also thank the editor and anonymous reviewers for their valuable comments and suggestions, which improved the quality of the paper. (86) m=1 G2m,s am , where θm = µm ≥ 0 are KKT multipliers, and λm ≥ 0, m = 1, 2, . . . , N . The complementary slackness condition is given by µ1 λ1 + µ2 λ2 + · · · + µN λN = 0. (87) Since µm ≥ 0 and λm ≥ 0, m = 1, 2, . . . , N hold, (87) becomes  µ1 λ1 = 0      µ2 λ2 = 0 (88) ..   .    µN λN = 0 To get the optimal solution of the KKT conditions, we need to solve the equation system consists of (86) and (88) in terms of µm ≥ 0 and λm ≥ 0, m = 1, 2, . . . , N , which is a system of quadratic equations. Now we will discuss the combinations of active or inactive constraints in KKT condition. Let first test if µ1 = µ2 = · · · = µN = 0 leads to a valid solution. By substitute µ1 , µ2 , . . . , µN with µ1 = µ2 = · · · = µN = 0 in (86), we have  ! N X     θm λm = W log2 (e)γ λ1 2 + γ    m=1   !   N  X    λ2 2 + γ θm λm = W log2 (e)γ (89) m=1   .   ..     !  N  X    θm λm = W log2 (e)γ   λN 2 + γ m=1 By solving the system of equations of (89), we can get a solution as given by p log2 (e)γ 2 W Θ + 1 − 1 λ1 = λ2 = · · · = λN = , (90) γΘ where e is the base of the natural logarithm, Θ is given by Θ= N X θm . (91) m=1 Because problem (P5.3) is a convex optimization problem, we can conclude that this solution given by KKT conditions is the solution of original optimization problem. R EFERENCES [1] J. Gubbi, R. Buyya, S. Marusic, and M. Palaniswami, “Internet of things (IoT): A vision, architectural elements, and future directions,” Future Generation Computer Systems, vol. 29, no. 7, pp. 1645–1660, Sep. 2013. [2] J. Lin, W. Yu, N. Zhang, X. Yang, H. Zhang, and W. Zhao, “A survey on internet of things: Architecture, enabling technologies, security and privacy, and applications,” IEEE Internet of Things Journal, vol. 4, no. 5, pp. 1125–1142, Oct 2017. [3] W. Hou, W. Li, L. Guo, Y. Sun, and X. Cai, “Recycling edge devices in sustainable Internet of Things networks,” IEEE Internet of Things Journal, vol. 4, no. 5, pp. 1696–1706, Oct 2017. [4] Y. Peng, F. Al-Hazemi, R. Boutaba, F. Tong, I. S. Hwang, and C. H. Youn, “Enhancing energy efficiency via cooperative MIMO in wireless sensor networks: State of the art and future research directions,” IEEE Communications Magazine, vol. 55, no. 11, pp. 47–53, Nov. 2017. [5] H. Kawabata, K. Ishibashi, S. Vuppala, and G. T. F. de Abreu, “Robust relay selection for large-scale energy-harvesting IoT networks,” IEEE Internet of Things Journal, vol. 4, no. 2, pp. 384–392, April 2017. [6] Z. Yang, W. Xu, Y. Pan, C. Pan, and M. Chen, “Energy efficient resource allocation in machine-to-machine communications with multiple access and energy harvesting for IoT,” IEEE Internet of Things Journal, vol. PP, no. 99, pp. 1–1, 2017. [7] P. Kamalinejad, C. Mahapatra, Z. Sheng, S. Mirabbasi, V. C. Leung, and Y. L. Guan, “Wireless energy harvesting for the Internet of Things,” IEEE Commun. Magazine, vol. 53, no. 6, pp. 102–108, Jun. 2015. [8] D. Niyato, D. I. Kim, P. Wang, and L. Song, “A novel caching mechanism for Internet of Things (IoT) sensing service with energy harvesting,” in Proc. ICC, May. 2016, pp. 1–6. [9] H. Chen, C. Zhai, Y. Li, and B. Vucetic, “Cooperative strategies for wireless-powered communications: An overview,” IEEE Wireless Communications, avaliable: https://arxiv.org/abs/1610.03527, 2017. [10] K. Huang and V. K. Lau, “Enabling wireless power transfer in cellular networks: Architecture, modeling and deployment,” IEEE Trans. Wireless Commun., vol. 13, no. 2, pp. 902–912, 2014. [11] K. Huang and X. Zhou, “Cutting the last wires for mobile communications by microwave power transfer,” IEEE Commun. Mag., vol. 53, no. 6, pp. 86–93, 2015. [12] C. Zhong, X. Chen, Z. Zhang, and G. K. Karagiannidis, “Wirelesspowered communications: Performance analysis and optimization,” IEEE Trans. Commun., vol. 63, no. 12, pp. 5178–5190, 2015. [13] Y. Chen, D. B. da Costa, and H. Ding, “Interference analysis in wireless power transfer,” IEEE Communications Letters, vol. 21, no. 10, pp. 2318–2321, Oct 2017. [14] L. Chen, W. Wang, and C. Zhang, “Stochastic wireless powered communication networks with truncated cluster point process,” IEEE Trans. Veh. Technol., vol. PP, no. 99, pp. 1–1, 2017. [15] J. H. Park, Y. S. Jeon, and S. Han, “Energy beamforming for wireless power transfer in MISO heterogeneous network with power beacon,” IEEE Communications Letters, vol. 21, no. 5, pp. 1163–1166, May 2017. [16] T. A. Khan, R. W. Heath, and P. Popovski, “Wirelessly powered communication networks with short packets,” IEEE Trans. Wireless Commun., vol. PP, no. 99, pp. 1–1, 2017. [17] X. Jiang, C. Zhong, X. Chen, T. Q. Duong, T. A. Tsiftsis, and Z. Zhang, “Secrecy performance of wirelessly powered wiretap channels,” IEEE Trans. Commun., vol. 64, no. 9, pp. 3858–3871, 2016. [18] H. Chen, Y. Li, Z. Han, and B. Vucetic, “A stackelberg game-based energy trading scheme for power beacon-assisted wireless-powered communication,” in Proc. ICASSP, Apr. 2015, pp. 3177–3181. [19] S. Sarma, K. Kandhway, and J. Kuri, “Robust energy harvesting based on a stackelberg game,” IEEE Wireless Communications Letters, vol. 5, no. 3, pp. 336–339, 2016. [20] Y. Ma, H. Chen, Z. Lin, Y. Li, and B. Vucetic, “Distributed and optimal resource allocation for power beacon-assisted wireless-powered communications,” IEEE Trans. Commun., vol. 63, no. 10, pp. 3569– 3583, Aug. 2015. [21] P. Bolton and M. Dewatripont, Contract theory. MIT press, 2005. 16 [22] Z. Hou, H. Chen, Y. Li, Z. Han, and B. Vucetic, “A contract-based incentive mechanism for energy harvesting-based internet of things,” in Proc. ICC, May 2017, pp. 1–6. [23] T. Liu, J. Li, F. Shu, M. Tao, W. Chen, and Z. Han, “Design of contractbased trading mechanism for a small-cell caching system,” IEEE Trans. Wireless Commun., vol. 16, no. 10, pp. 6602–6617, Oct 2017. [24] Y. Zhang, L. Song, W. Saad, Z. Dawy, and Z. Han, “Contract-based incentive mechanisms for device-to-device communications in cellular networks,” IEEE J. Sel. Areas Commun., vol. 33, no. 10, pp. 2144–2155, May 2015. [25] L. Duan, L. Gao, and J. Huang, “Cooperative spectrum sharing: A contract-based approach,” IEEE Trans. Mobile Commun., vol. 13, no. 1, pp. 174–187, Nov. 2014. [26] R. Zhang, L. Song, Z. Han, and B. Jiao, “Physical layer security for two-way untrusted relaying with friendly jammers,” IEEE Trans. Veh. Technol., vol. 61, no. 8, pp. 3693–3704, 2012. [27] H. Zhang, Y. Xiao, L. X. Cai, D. Niyato, L. Song, and Z. Han, “A multi-leader multi-follower stackelberg game for resource management in lte unlicensed,” IEEE Trans. Wireless Commun., vol. 16, no. 1, pp. 348–361, 2017. [28] Y. Xu and S. Mao, “Stackelberg game for cognitive radio networks with mimo and distributed interference alignment,” IEEE Trans. Veh. Technol., vol. 63, no. 2, pp. 879–892, 2014. [29] S. Yin, E. Zhang, Z. Qu, L. Yin, and S. Li, “Optimal cooperation strategy in cognitive radio systems with energy harvesting,” IEEE Trans. Wireless Commun., vol. 13, no. 9, pp. 4693–4707, 2014. [30] H. Chen, Y. Li, Y. Jiang, Y. Ma, and B. Vucetic, “Distributed power splitting for swipt in relay interference channels using game theory,” IEEE Trans. Wireless Commun., vol. 14, no. 1, pp. 410–420, 2015. [31] T. Zhang, W. Chen, and F. Yang, “Balancing delay and energy efficiency in energy harvesting cognitive radio networks: A stochastic stackelberg game approach,” IEEE Trans. Cogn. Commun. Netw, vol. 3, no. 2, pp. 201–216, June 2017. [32] I. Krikidis, G. Zheng, and B. Ottersten, “Harvest-use cooperative networks with half/full-duplex relaying,” in Proc. WCNC, Apr. 2013, pp. 4256–4260. [33] H. Ju and R. Zhang, “Throughput maximization in wireless powered communication networks,” IEEE Trans. Wireless Commun., vol. 13, no. 1, pp. 418–428, Dec. 2014. [34] X. Lu, P. Wang, D. Niyato, D. I. Kim, and Z. Han, “Wireless networks with RF energy harvesting: A contemporary survey,” IEEE Commun. Surveys Tuts., vol. 17, no. 2, pp. 757–789, Nov. 2015. [35] A.-H. Mohsenian-Rad, V. W. Wong, J. Jatskevich, R. Schober, and A. Leon-Garcia, “Autonomous demand-side management based on game-theoretic energy consumption scheduling for the future smart grid,” IEEE Trans. Smart Grid, vol. 1, no. 3, pp. 320–331, Nov. 2010. [36] S. Boyd and L. Vandenberghe, Convex optimization. Cambridge university press, 2004.
7cs.IT
MAXIMAL COHEN-MACAULAY MODULES OVER CERTAIN SEGRE PRODUCTS arXiv:1802.04786v2 [math.AC] 7 Mar 2018 LINQUAN MA Dedicated to Professor Gennady Lyubeznik on the occasion of his 60th birthday Abstract. We prove some results on the non-existence of rank one maximal CohenMacaulay modules over certain Segre product rings. As an application we show that over these Segre product rings there do not exist maximal Cohen-Macaulay modules with multiplicity less than or equal to the parameter degree of the ring. This disproves a conjecture of Schoutens [Sch14]. 1. Introduction A finitely generated module M over a Noetherian local ring (R, m) is called a maximal Cohen-Macaulay module, abbreviated as MCM or small MCM,1 if depth M = dim R. A fundamental and long-standing open question in commutative algebra is that whether every complete local ring (R, m) admits a finitely generated MCM. This question was known to be true if dim R ≤ 2, if dim R = 3 and R is N-graded over a field of characteristic p > 0 (Hartshorne–Peskine-Szpiro–Hochster, see [Hoc75]), and in some other special cases (e.g., affine toric rings [Hoc72]). The importance of this question lies in the fact that an affirmative answer will imply Serre’s conjecture on positivity of intersection multiplicities [Hoc73]. Schoutens [Sch14] introduced a stronger version of MCM: in equal characteristic,2 M is called a very small MCM over (R, m) if M is a finitely generated MCM and e(M) ≤ min{l(R/I)|I is generated by a system of parameters} where e(M) denotes the multiplicity of M with respect to the maximal ideal m in R and the right hand side is called the parameter degree of R. We note that for local rings of dimension ≤ 2 and for affine toric rings, very small MCM do exist (it is not hard to see that the normalization will do the job in these cases [Hoc72] [Hoc73]). Some other existence results were established in [Sch14]. Moreover, it turns out that under mild conditions, if very small MCM exist in general in characteristic p > 0, then a reduction to p > 0 technique will guarantee the existence in characteristic 0 [Sch14] (such reduction process is not known for small MCM). Based on these facts, Schoutens made the following conjecture: The author is partially supported by NSF Grant DMS #1600198, and NSF CAREER Grant DMS #1252860/1501102. 1“Small” here only means M is finitely generated. This notion was introduced in comparison with the notion of big Cohen-Macaulay modules [Hoc75]: modules that are not necessarily finitely generated but are Cohen-Macaulay in a natural sense. However, throughout this article we only deal with finitely generated modules, hence sometimes we simply use MCM instead of small MCM. 2In mixed characteristic the definition of very small MCM is slightly different, we will not work with mixed characteristic in this paper. 1 Conjecture 1.1 (cf. Conjecture 1.1 in [Sch14]). Any compete local ring admits a very small MCM. We will make use of the Segre product of graded rings to obtain a family of counterexamples of Conjecture 1.1. The basic idea is as follows: we first prove in Section 2 that under some conditions on the I-invariant and multiplicity, very small MCM must have rank one, and then in Section 3 we do computations over a family of Segre product rings to show that they satisfy the conditions in Section 2 and that rank one MCM does not exist over these rings, thus these rings are counter-examples of Conjecture 1.1. Acknowledgement. I would like to thank Craig Huneke, Anurag Singh, Ehsan Tavanfar, Bernd Ulrich and Uli Walther for many valuable discussions. I would also like to thank the referee for his/her comments on Conjecture 3.7 and for pointing out Remark 3.8. 2. Very small MCM and rank one MCM In this section we make some elementary observations on very small MCM. We will see that under certain conditions on R, the very small condition will force the module to have rank one. We begin with the following definition. Definition 2.1. Let (R, m) be a local ring of dimension n such that Hmi (R) has finite length for every i < n. Then we define  n−1  X n−1 l(Hmi (R)) I(R) = i i=0 to be the I-invariant of R. Remark 2.2. It is well-known (for example, see [SV73] [SV78]) that when (R, m) is an excellent local domain that is Cohen-Macaulay on the punctured spectrum, Hmi (R) has finite length for every i < n, and in this case we always have 0 ≤ l(R/(x)) − e(x, R) ≤ I(R) for every system of parameters x = x1 , . . . , xn . As an easy consequence, we observe the following: Lemma 2.3. Suppose (R, m) is an excellent local domain that is Cohen-Macaulay on the punctured spectrum. Suppose also that R/m is infinite. If I(R) < e(R), then every very small MCM has rank one. Proof. We may pick x = x1 , . . . , xn a minimal reduction of m since R/m is infinite. We know that e(x, R) = e(R). If M is a very small MCM over R, then by Remark 2.2, rank(M) · e(R) = e(M) ≤ min{l(R/I)|I is generated by a system of parameters} ≤ l(R/(x)) ≤ e(R) + I(R) < 2 · e(R). This shows that M must have rank one.  When (R, m) is a normal local domain, every rank one MCM is reflexive, and hence isomorphic to a pure height one ideal of R, therefore it corresponds to an element in the class group Cl(R). From this we immediately get: 2 Proposition 2.4. Suppose (R, m) is an excellent local UFD of dimension 3, with R/m infinite. Suppose R is not Cohen-Macaulay and I(R) < e(R), then R does not admit very small MCM. Proof. It is easy to see that R satisfies the hypothesis of Lemma 2.3. Hence every very small MCM must have rank one. Since R is a UFD, Cl(R) is trivial and thus every rank one reflexive module is isomorphic to R. Since R is not Cohen-Macaulay, it follows that rank one MCM does not exists.  In general, constructing UFDs that are not Cohen-Macaulay turns out to be difficult. In fact, over the complex numbers, complete local UFDs of dimension ≤ 4 are Cohen-Macaulay [HO74] (this is not true if we do not assume completeness, see [Tav17]). However, examples of (R, m) that satisfies Proposition 2.4 do exist in positive characteristic, see Example 3 and Theorem 2.5 in [MS11] (here the I-invariant is 1, so the condition I(R) < e(R) is obvious). Although this example only works in characteristic 2 and is not complete, it already strongly suggests that Conjecture 1.1 might be false in general. In the next section we will use Segre product to construct complete local rings in arbitrary equal characteristic that do not admit very small MCM. 3. Computations over Segre products Segre product. Let A and B be N-graded rings over a field A0 = B0 = K. The Segre product of A and B is the ring R = A#B = ⊕j≥0 Aj ⊗K Bj This ring has a natural grading in which Rj = Aj ⊗K Bj . If M and N are graded modules over A and B respectively, their Segre product is the graded R-module M#N = ⊕j≥0 Mj ⊗K Nj . If A and B are both normal domains, then R = A#B is also normal since it is a direct summand of the normal ring A ⊗K B. For reflexive modules M and N over A and B respectively, we have the Kunneth formula for local cohomology [GW78]: (3.0.1) Hmq R (M#N) = M#Hmq B (N) ⊕ Hmq A (M)#N ⊕ (⊕i+j=q+1 Hmi A (M)#Hmj B (N)) where mR , mA , mB denote the homogeneous maximal ideals of the corresponding rings. Connections with sheaf cohomology. Suppose A and B are normal N-graded K-algebras generated over K by degree one forms. Let X = Proj A and Y = Proj B, then R is the section ring of X × Y with respect to the very ample line bundle OX (1) ⊠ OY (1). Remark 3.1. Now suppose A is a UFD and B is a polynomial ring, both have dimension ≥ 2. Then Cl(X) ∼ = Z and Y is a projective space, so Cl(X × Y ) = Z × Z. It follows from Excercise II.6.3 in [Har77] that Cl(R) = Z, and is generated by the class of ⊕∞ H 0(X × Y, OX (1 + i) ⊠ OY (i)) ∼ = A[1]#B. i=0 Main result. Now we can state and prove our result on Segre products. We first recall that the a-invariant of an N-graded Cohen-Macaulay ring R is defined to be aR = R sup{j|[Hmdim (R)]j 6= 0}. R Lemma 3.2 (cf. Example 4.4.13 in [GW78]). Suppose dim A ≥ 2 and dim B ≥ 2. Then A[n]#B is MCM over R = A#B if and only if aA < n < −aB . In particular there exists n such that A[n]#B is MCM if and only if aA + aB ≤ −2. 3 Proof. This follows directly from (3.0.1): the possible non-vanishing lower local cohomology B A modules of A[n]#B come from A[n]#Hmdim (B) and Hmdim (A)[n]#B, and these are both B A zero if and only if aA < n < −aB .  Remark 3.3. Although A[n]#B is not MCM for any n when aA + aB > −2, R = A#B might still have rank one MCM in many cases. For example, it follows from Proposition 2.3 (and its proof) in [Ma88] that if X = Proj A and Y = Proj B are smooth projective curves, then R has a small MCM of rank one. 1 ,...,xn ] Theorem 3.4. Let A = K[x be a graded complete intersection with isolated singularity (f1 ,...,fh ) at mA . Let B = K[s, t] and R = A#B. Set d = deg f1 + deg f2 + · · · + deg fh . If d > n and bmR do not have any rank one MCM. dim A = n − h ≥ 4, then R and R Proof. Since A is a complete intersection that is regular in codimension 3, A is a UFD by Corollaire XI 3.14 in [Gro68]. By Remark 3.1 we know that Cl(R) = Z and is generated by the class of P = A[1]#B ∼ = (x1 s, x2 s, . . . , xn s). ∼ It is easy to check that Q = A[−1]#B = (x1 s, x1 t) represents the inverse of [P ] in Cl(R). Since Cl(R) = Z, every rank one MCM must be isomorphic to a symbolic power of P or Q, which is A[n]#B for some n (this is because, under the notation of Remark 3.1, the class of 0 A[n]#B ∼ = ⊕∞ i=0 H (X × Y, OX (n + i) ⊠ OY (i)) is n times the class of P = A[1]#B in the divisor class group Cl(R), and since it is a rank one reflexive module, it must be isomorphic to P (n) ). However, since A and B are normal Cohen-Macaulay rings, Lemma 3.2 shows that there is no such n because aA + aB = d − n − 2 > −2. bmR , it is enough to observe that Cl(R bmR ) is still generated by [P R bmR ]. In the case of R But this follows from a result of Flenner (see 1.5 of [Fle81]): if R is N-graded, R2 and S3 , bmR ) is an isomorphism. Since our ring R is an isolated then the natural map Cl(R) → Cl(R singularity with depth R = dim R − 1 = dim A ≥ 4, R satisfies the hypothesis.  As an application of Theorem 3.4, we obtain the following which disproves Conjecture 1.1: Corollary 3.5. Let R = K[x1f,...,xn ] #K[s, t] with K an arbitrary infinite field. Suppose f is a degree n + 1 homogeneous polynomial with isolated singularity at the origin with n ≥ 5 (e.g., bmR does not admit one can take f = xn+1 + xn+1 + · · · + xn+1 when char(K) ∤ n + 1). Then R 1 2 n very small MCM. n] and B = K[s, t]. Note that dim A = n − 1 and dim R = n. Since Proof. Set A = K[x1,...,x f dimK [R]i = dimK [A]i · dimK [B]i , the leading term in the Hilbert polynomial of R is e(A) n−2 n + 1 n−1 i ·i= i . (n − 2)! (n − 2)! Hence we have bmR ) = e(mR , R) = e(R n+1 × (n − 1)! = (n + 1)(n − 1). (n − 2)! On the other hand, using (3.0.1) it is easy to see that Hmq R (R) = 0 for q ≤ n − 2 and Hmn−1 (R) = Hmn−1 (A)#B. R A 4 In particular, b mR ) = I(R  n−1  X n−1 i=0 i bmR )) = lR (Hmn−1 (R)) l(Hmi R (R R = dimK ([Hmn−1 (A)]0 ⊗ [B]0 ) + dimK ([Hmn−1 (A)]1 ⊗ [B]1 ) A A = n+2 bmR ) < e(R bmR ). Since R and hence R bmR are normal isolated singularities, Therefore I(R m b R must have rank one. But since deg f > n Lemma 2.3 tells us that very small MCM over R m b R does not have any rank one MCM. and n ≥ 5, Theorem 3.4 implies R  Remark 3.6. It is perhaps interesting to point out that in our Theorem 3.4 (or Corollary bmR do admit small MCM of higher rank. This follows from Proposition 3.2.2 3.5), R and R of [Han99] and the main result of [HUB91]. Motivated by Theorem 3.4 and Remark 3.6, I hazard the following conjecture: Conjecture 3.7. For every integer N, there exists a complete local domain R that does not admit small MCM of rank ≤ N. Remark 3.8. We point out that, for every N, there exists a complete local domain R that does not admit non-free MCM of rank ≤ N. Suppose R is a hypersurface with singular locus 1 ,...,xn ]] of codimension c ≥ 2N + 2 (e.g., one can take R = K[[x for n ≥ 2N + 3, where K is a x21 +···+x2n perfect field of char(K) 6= 2), it then follows from Corollary 2.2 in [Bru81] that any non-free MCM M has rank at least c−1 > N. 2 References [Bru81] [Fle81] [GW78] [Gro68] [Han99] [Har77] [HO74] [HUB91] [Hoc72] [Hoc73] W. Bruns: The Eisenbud-Evans generalized principal ideal theorem and determinantal ideals, Proc. Amer. Math. Soc. 83 (1981), no. 1, 19–24. H. Flenner: Divisorenklassengruppen quasihomogener Singularitäten, J. Reine Angew. Math. 328 (1981), 128–160. S. Goto and K. Watanabe: On graded rings I, J. Math. Soc. Japan 30 (1978), no. 2, 179–213. A. Grothendieck: Cohomologie Locale des Faisceaux Cohérents et Théorèmes de Lefschetz Locaux et Globaux (SGA2), Augmenté d’un exposé par Michèle Raynaud. Séminaire de Géométrie Algébrique du Bois-Marie, 1962, Advanced Studies in Pure Mathematics, vol. 2, North-Holland Publishing Co., Amsterdam; Masson & Cie, Éditeur, Paris, 1968, pp. vii+287. D. Hanes: Special conditions on maximal Cohen-Macaulay modules, and applications to the theory of multiplicities, Thesis, University of Michigan (1999). R. Hartshorne: Algebraic geometry, Springer-Verlag, New York, 1977, Graduate Texts in Mathematics, No. 52. R. Hartshorne and A. Ogus: On the factoriality of local rings of small embedding codimension, Comm. Algebra 1 (1974), 415–437. J. Herzog, B. Ulrich, and J. Backelin: Linear maximal Cohen-Macaualy modules over strict complete intersections, J. Pure Appl. Algebra 71 (1991), no. 2-3, 187–202. M. Hochster: Rings of invariants of tori, Cohen-Macaulay rings generated by monomials, and polytopes, Ann. of Math. (2) 96 (1972), 318–337. M. Hochster: Cohen-Macaulay modules, Conference on Commutative Algebra (Lawrence, Kansas, 1972), Lecture Notes in Mathematics, no. 311, Springer-Verlag, Berlin, 1973, pp. 120– 152. 5 [Hoc75] M. Hochster: Big Cohen-Macaulay modules and algebras and embeddability in rings of Witt vectors, Conference on Commutative Algebra-1975 (Queen’s Univ., Kingston, Ont., 1975), Queen’s Papers in Pure and Applied Math., no. 42, Queen’s Univ., Kingston, Ont., 1975, pp. 106–195. [Ma88] F. Ma: Splitting in integral extesions, Cohen-Macaulay modules and algebras, J. Algebra 116 (1988), no. 1, 176–195. [MS11] A. Marcelo and P. Schenzel: Non-Cohen-Macaulay unique factorization domains in small dimensions, J. Symbolic Comput. 46 (2011), no. 5, 609–621. [Sch14] H. Schoutens: Maximal Cohen-Macaulay modules over local toric rings, arXiv: 1408.6220. [SV78] J. Stückrad and W. Vogel: Toward a theory of Buchsbaum singularities, Amer. J. Math 100 (1978), no. 4, 727–746. [SV73] J. Stückrad and W. Vogel: Eine Verallgemeinerung der Cohen-Macaulay-Ringe und anwendungen auf ein Problem der Multiplizitätstheorie, J. Math. Kyoto Univ. 13 (1973), 513–528. [Tav17] E. Tavanfar: Reduction of the small Cohen-Macaulay conjecture to excellent unique factorization domains, Arch. Math. (Basel) 109 (2017), no. 5, 429–439. 3710763 Department of Mathematics, University of Utah, Salt Lake City, UT 84112 E-mail address: [email protected] 6
0math.AC
1 Cooperative Localization for Mobile Networks: A Distributed Belief Propagation – Mean Field Message Passing Algorithm arXiv:1512.07782v2 [cs.SY] 3 Apr 2016 Burak Çakmak, Daniel N. Urup, Florian Meyer, Member, IEEE, Troels Pedersen, Member, IEEE, Bernard H. Fleury, Senior Member, IEEE, and Franz Hlawatsch, Fellow, IEEE Abstract—We propose a hybrid message passing method for distributed cooperative localization and tracking of mobile agents. Belief propagation and mean field message passing are employed for, respectively, the motion-related and measurementrelated part of the factor graph. Using a Gaussian belief approximation, only three real values per message passing iteration have to be broadcast to neighboring agents. Despite these very low communication requirements, the estimation accuracy can be comparable to that of particle-based belief propagation. Index Terms—Belief propagation, mean field approximation, cooperative localization, distributed estimation, information projection, Kullback-Leibler-divergence, mobile agent network. I. I NTRODUCTION Cooperative localization is a powerful approach for mobile networks [1]–[5]. An attractive methodology for cooperative localization is sequential Bayesian estimation via message passing algorithms [6]. In particular, distributed belief propagation (BP) message passing algorithms were proposed in [2], [3], [7]–[11] to localize static or mobile agents. Feasible implementations involve certain approximations and use, e.g., particle methods [2], [3], [8]–[10] or the sigma point technique [11]. Each message transmitted between neighboring agents is a set of hundreds or more particles in the former case [2], [3], [8] and a mean and a covariance matrix, i.e., five real numbers in 2-D localization, in the latter case. For static agents, also message passing algorithms based on expectation propagation [12], [13] or the mean field (MF) approximation [14] were proposed. Similarly to sigma point BP [11], they use a Gaussian approximation and the transmitted messages consist of a mean and a covariance matrix. In this letter, building on the theoretical framework in [15], we present a distributed hybrid BP–MF message passing method for cooperative localization and tracking of mobile agents. We employ BP and MF [15] for, respectively, the motion-related and measurement-related part of the underlying factor graph, and we use a Gaussian belief approximation. Each BP–MF iteration includes an information projection Final manuscript, April 5, 2016. B. Çakmak, T. Pedersen, and B. H. Fleury are with the Department of Electronic Systems, Aalborg University, Aalborg, Denmark (e-mail: {buc, troels, bfl}@es.aau.dk). D. N. Urup is with Danish Defence, Denmark (e-mail: [email protected]). F. Meyer is with CMRE, La Spezia, Italy (e-mail: [email protected]). F. Hlawatsch is with the Institute of Telecommunications, TU Wien, Vienna, Austria (e-mail: [email protected]). This work was supported by the European Commission in the framework of the FP7 Network of Excellence NEWCOM# (grant 318306) and by the Austrian Science Fund (FWF) under grant P27370-N30. [16] that is efficiently implemented by means of a Newton conjugate-gradient technique [17]. Our method can achieve an accuracy comparable to that of BP-based methods with the same communication cost as the MF method [14], i.e., three real numbers per transmitted message in 2-D localization. This letter is organized as follows. The system model is described in Section II. The hybrid BP–MF scheme is developed in Section III, and the Gaussian belief approximation in Section IV. Section V presents simulation results. II. S YSTEM M ODEL The mobile network at discrete time n ∈ {1, ..., N } is described by a set of network nodes V n and a set of edges E n representing the communication/measurement links between n the nodes. The set V n is partitioned into a set VM of mobile n agents at unknown positions and a set VA of static anchors at known positions. An edge (k, l) ∈ E n indicates the fact that agent or anchor l transmits data to agent k and, concurrently, agent k acquires a noisy measurement of its distance to agent n or anchor l. The edge set E n is partitioned into a set EM n of edges between certain agents, i.e., (k, l) ∈ EM implies n n k, l ∈ VM , and a set EMA of edges between certain agents n n n and anchors, i.e., (k, l) ∈ EMA implies k ∈ VM and l ∈ VA . Information exchange between agents is bidirectional, i.e., n n (k, l) ∈ EM implies (l, k) ∈ EM . We consider a distributed scenario where each agent knows only its own measurements. Since the anchors have exact knowledge of their own position, they do not need to acquire measurements and receive position information from neighboring nodes. Accordingly, anchors transmit position information to agents but not vice versa, i.e., n n . implies (l, k) ∈ / EMA (k, l) ∈ EMA n n Let the vector xk denote the state of  agent  k ∈ VM at1:ntime n n n ∈ {1, ..., N }. Moreover, let x , xk k∈V n and x , M  i n x i=1 . While our approach applies to any linear-Gaussian motion model, we here consider specifically those two motion models (MMs) that are most frequently used in practice. In MM1, xnk = pnk ∈ R2 is the 2-D position of agent k at time n. If agent k belongs to the network at times n and n−1, i.e. n−1 n ∩ VM , then pnk is assumed to evolve according to k ∈ VM the Gaussian random walk model [18] √ pnk = pkn−1 + T v nk . Here, T is the duration of one time step and v nk ∈ R2 is zeromean Gaussian driving noise with component variance σv2 . 2 Note that v nk can be interpreted as a random velocity. In MM2,  T xnk = (pnk )T (v nk )T , where v nk ∈ R2 is the 2-D velocity of n−1 n agent k at time n. For k ∈ VM ∩ VM , xnk is assumed to evolve according to the constant velocity model [18] xnk = F xkn−1 + Gank . (1) Here, ank ∈ R2 is zero-mean Gaussian driving noise (a random acceleration) with component variance σa2 . Moreover, F = i i h h T 2 /2 1 T 0 1 ⊗ I2 , where ⊗ denotes the ⊗ I2 and G = T Kronecker product and Im is the m×m identity matrix. Note that in both MM1 and MM2, the state-transition probability density function (pdf) p(xnk |xkn−1 ) is Gaussian. For agents that are part of the network at time n but not at time n − 1, n−1 n i.e., k ∈ VM \ VM , we set p(xnk |xkn−1 ) = p(xnk ), where the prior pdf p(xnk ) is Gaussian. Under common statistical independence assumptions on v nk or ank [3], the joint prior pdf of all agent states up to time n is given by p(x1:n ) = n Y Y i i=1 k∈VM  . p xik |xi−1 k (2) n If (k, l) ∈ E n, agent k ∈ VM acquires at time n a noisy measurement of its distance to agent or anchor l, n dnk,l = kpnk − pnl k + wk,l . (3) n is assumed zero-mean Gaussian The measurement error wk,l 2 with variance σw . Note that the local likelihood function  n p(dnk,l |pnk , pnl ) is nonlinear in pnk and pnl . Let d1:n , di i=1   n with dn , dnk,l (k,l)∈E n . Assuming that all wk,l are independent, the global likelihood function involving all measurements and all states up to time n factors according to p(d1:n |x1:n ) = n Y Y p dik,l |pik , pil i i=1 (k,l)∈EM  Y  p diκ,λ |piκ , p̃iλ , i (κ,λ)∈EMA (4) n . where p̃nλ denotes the (known) position of anchor λ ∈ VA III. T HE P ROPOSED M ESSAGE PASSING S CHEME n The task of agent k ∈ VM is to estimate its state xnk from the 1:n total measurement vector d , for n ∈ {1, . . . , N }. We will consider the minimum mean-square error (MMSE) estimator Z n x̂nk , xnk p(xnk |d1:n )dxnk , k ∈ VM . (5) Calculating the posterior pdf p(xnk |d1:n ) involved in (5) by direct marginalization of the joint posterior pdf p(x1:n |d1:n ) is infeasible because of the excessive dimension of integration and because d1:n is not locally available at the agents. Next, we develop a distributed message passing scheme that n approximates p(xnk |d1:n ), k ∈ VM , n ∈ {1, . . . , N }. 1:n 1:n By Bayes’ rule, p(x |d ) ∝ p(d1:n |x1:n )p(x1:n ), where p(x1:n ) and p(d1:n |x1:n ) factor as in (2) and (4), respectively. This factorization underlies the proposed hybrid BP–MF message passing scheme, which provides approximate marginal posterior pdfs (“beliefs”) qk (xnk ) ≈ p(xnk |d1:n ) for n . Our scheme is an instance of the general hybrid all k ∈ VM BP–MF message passing scheme presented in [15]. We use BP for the motion-related factors p(xnk |xkn−1 ) and MF for the measurement-related factors p(dnk,l |pnk , pnl ), and we suppress all messages sent backward in time (cf. [3]). We thus obtain the following iterative scheme at time n: In message passing [t] iteration t ∈ {1, ..., t∗ }, beliefs qk (xnk ) are calculated as Y [t] 1 [t] n mk→k (xnk ) ml→k (pnk ), k ∈ VM , (6) qk (xnk ) = Z n l∈Nk where Z is a normalization constant and Nkn , {l |(k, l) ∈ E n } is the set of agents and anchors communicating with agent k at time n (termed “neighbors”). The factors in (6) are obtained as R [t∗ ] n−1 n−1 n n−1   qk (xk )p(xk |xk )dxk , n−1 n k ∈ VM ∩ VM (7) mk→k (xnk ) =   n−1 n n p(xk ), k ∈ VM \VM and  Z [t] [t−1] n n n n n n ml→k (pk ) = exp ql (xl ) ln p(dk,l |pk , pl )dxl . (8) (Note that pnl = p̃nl if l is an anchor.) This recursion is [0] initialized with qk (xnk ) = mk→k (xnk ). In a distributed implementation, each agent k broadcasts its [t−1] belief qk (xnk ) to its neighbors l ∈ Nkn and receives the [t−1] neighbor beliefs ql (xnl ), l ∈ Nkn . These beliefs are then [t] used to calculate the messages ml→k (pnk ), l ∈ Nkn at agent k as in (8). These messages, in turn, are needed to calculate the [t] updated belief qk (xnk ) at agent k according to (6). After t∗ [t∗ ] iterations, the final belief qk (xnk ) is used for state estimation, ∗ [t ] i.e. qk (xnk ) is substituted for p(xnk |d1:n ) in (5). IV. G AUSSIAN B ELIEF A PPROXIMATION Inspired by [14, Section IV], we introduce an approximation of the message passing scheme (6)–(8) such that the beliefs are constrained to a certain class of Gaussian pdfs. This leads to a significant reduction of both interagent communication and computational complexity relative to a particle-based implementation. We first consider MM2. A more detailed derivation is provided in [19]. A. Gaussian Belief Approximation for MM2 We constrain the beliefs to Gaussian pdfs by using the information projection approach [16], i.e., substituting for [t] qk (·) in (6)  [t] [t]  q̃k (·) , arg min D g qk . (9) g∈G Here, D gkq , g(x) ln g(x) q(x) dx is the Kullback-Leibler divergence and G is the set of 4-D Gaussian pdfs g(x) = i h c c ⊗ N (x; µ, C) with covariance matrix of the form C = p c cv I2 . We will denote the mean and covariance matrix of [t] n [t] n n [t] q̃k (xnk ) = in(9) as (µnk )[t] =  N xk ; (µk ) , (Ck )n [t]defined n [t] n [t] (µp,k ) (cp,k ) (ck ) and (C nk )[t] = ⊗ I2 . Because n [t] n [t] n [t]  (µv,k )  R (ck ) (cv,k ) direct computation of the minimizer (9) is infeasible, we resort 3 to an iterative method. To that end, we first an analytical  derive [t]  expression of the objective function D g qk in (9), which [t] we abbreviate by Fk (θ) with θ , [µT cp cv c]T. Using the factorization in (6), this function can be expressed as X [t] [t] Fk (θ) = D[gkmk→k ] − Gk,l (µp , cp ) + γ , (10) l∈Nkn where µp is the 2-D vector consisting of the first two entries of µ, γ is a constant, and Z [t] [t] Gk,l (µp , cp ) , N (pnk ; µp , cp I2 ) ln ml→k (pnk )dpnk . (11) To derive an expression of D[gkmk→k ] in (10), we note [t] n−1 n that for k ∈ VM ∩ VM , due to the Gaussian q̃k (xnk ) and the∗ linear-Gaussian model (1),∗ the message in (7) (in which [t ] [t ] qk (xkn−1 ) is replaced by q̃k (xkn−1 )) is also Gaussian, i.e., n n n mk→k (xk ) = N (xk ; η k , Σnk ). By using (1) and standard n−1 n Gaussian integral identities [20], we obtain for k ∈ VM ∩VM ∗ η nk = F(µkn−1 )[t ] , ∗ Σnk = F (C kn−1 )[t ] F T + σa2 GGT.(12) n−1 n For k ∈ VM \ VM , η nk and Σnk equal, respectively, the mean and covariance matrix of the Gaussian prior p(xnk ) = N (xnk ; η nk , Σnk ). Accordingly, we obtain in either case [20] D[gkmk→k ] =  1 tr (Σnk )−1 C − ln det(C) 2  + (µ−ηnk )T (Σnk )−1 (µ−ηnk ) + γ ′, (13) where γ ′ is a constant. Furthermore, one can express [t] Gk,l (µp , cp ) in (11) via an expectation of −(dnk,l − 2 kz nk,l k)2 /σw , where z nk,l is a 2-D Gaussian random vector with mean µp − (µnp,l )[t−1] and variance cp + (cnp,l )[t−1] . For n l ∈ VA , in particular, (µnp,l )[t−1] = p̃nl and (cnp,l )[t−1] = 0. By using expressions of the first-order and second-order moments of the Rician pdf [21], one obtains [19] cv = c= 2 c2 + n , n cp Jk,33 + Jk,44 q n n )2 c c 1 + 1 + (Jk,13 + Jk,24 p v n n Jk,13 + Jk,24 C. Gaussian Belief Approximation for MM1 The results in Sections IV-A and IV-B can be used with minor changes also for MM1. We here have µ = µp and C = [t] cp I2 , and the Gaussian belief approximation reads q̃k (pnk ) =  [t] N pnk ; (µnp,k )[t] , (cnp,k )[t] I2 . The objective function Fk (θ) T (with θ , [µT p cp ] ) is still given by (10) together with (13) and (14); however, the expressions (12) are replaced by   d2µ 1 πC + γ ′′ , (14) M − ; 1; − 2 2 2C where dµ , µp−(µnp,l )[t−1] , C , cp +(cnp,l )[t−1] , M (· ; · ; ·) denotes the confluent hypergeometric function of the first kind [22], and γ ′′ is a constant. B. Iterative Minimization Algorithm for MM2 To derive an iterative  algorithm for computing an approxT imation of (θnk )[t] = (µnk )[t]T (cnp,k )[t] (cnv,k )[t] (cnk )[t] , i.e., [t] of the minimizer of (10), we set the gradient of Fk (θ) to zero. This yields the following system of non-linear fixedpoint equations θ = (χnk )[t] (θ), whereof (θ nk )[t] is a solution: µ= η nk + Σnk X ∂G[t] k,l (µp , cp ) l∈Nkn c2 + cp = cv  ∂µ , −1 n n X ∂G[t] Jk,11 + Jk,22 k,l (µp , cp ) − , 2 ∂cp n l∈Nk (15) (16) ∗ Σnk = (C kn−1 )[t ] + T σv2 I2 , (19) n−1 [t ] n−1 [t ] ) I2 . where (µkn−1 )[t ] = (µp,k ) and (C kn−1 )[t ] = (cp,k Finally, fixed point equations in µp and cp are obtained by [t] setting to zero the gradient of Fk (θ), and an iterative belief approximation algorithm is again based on these equations. ∗ r (18) ;1; x) = (16) can be calculated using the relation dM(−1/2 dx −M (1/2; 2; x)/2 [22], where M (−1/2; 1; x) can be computed efficiently via an approximation [23, Section 4.5]. A Newton conjugate-gradient method [17, Chapter 7.1] is now applied to (15)–(18) to solve the system θ = (χnk )[t] (θ) in jmax steps, starting from an initial value θ0 . The method iteratively computes θ j+1 = (I7 − Ψj )θ j + Ψj (χnk )[t] (θj ), [t] where Ψj is the inverse of the Hessian matrix of Fk (θ) at θ j . The Hessian matrix is approximated via the conjugate [t] gradient, which requires only Fk (θ) and its gradient [17]. While the algorithm’s convergence has not been proven so far, it is suggested by our simulations. The algorithm may produce [t] a local minimum of Fk (θ), since this function is not convex in general. Therefore, the algorithm is run several times with different values of θ0 , and the result yielding the smallest [t] value of Fk (θ) is retained. In our simulations, we used the generic routine scipy.optimize.fmin_tnc [24]. ∗ dnk,l d2µ + 2cp + =− 2 2 2σw σw ,   n with Jk,ij , (Σnk )−1 ij . The partial derivatives in (15) and η nk = (µkn−1 )[t ] , [t] Gk,l (µp , cp ) (17) ∗ ∗ ∗ D. Distributed Cooperative Localization Algorithm The results of the previous subsections lead to a distributed algorithm for cooperative localization in which only parameters of Gaussian pdfs have to be communicated. At time n, agent k performs the following operations: n−1 n , ηnk and Σnk are 1. Mobility update: For k ∈ VM ∩ VM n−1 [t∗ ] n−1 [t∗ ] calculated from (µk ) and (C k ) as in (12) (for n−1 n , η nk and MM2) or as in (19) (for MM1). For k ∈ VM \ VM n Σk are the mean and covariance matrix of the Gaussian prior pdf p(xnk ), which are assumed already available at agent k. 2. Iterative message passing: The message passing iterations are initialized (t = 0) with (µnk )[0] = η nk and (C nk )[0] = Σnk . At iteration t ∈ {1, . . . , t∗ }, agent k broadcasts (µnp,k )[t−1] and (cnp,k )[t−1] and receives from the neighbors (µnp,l )[t−1] and 4 100 SBP (t∗ = 30) SBP (t∗ = 5) BPMF (t∗ = 5) NBP (t∗ = 5) NBP (t∗ = 30) BPMF (t∗ = 30) 10−1 0 0.5 1 1.5 2 2.5 3 3.5 4 10−1 10−2 0 100 P̂out P̂out P̂out 100 NBP (t∗ = 30) BPMF (t∗ = 5) BPMF (t∗ = 30) SBP (t∗ = 30) SBP (t∗ = 5) NBP (t∗ = 5) 0.5 1 1.5 2 2.5 3 3.5 4 10−1 10−2 0 NBP (t∗ = 30) NBP (t∗ = 5) BPMF (t∗ = 5) BPMF (t∗ = 30) SBP (t∗ = 5) SBP (t∗ = 30) 0.5 1 1.5 2 τ τ τ (a) (b) (c) 2.5 3 3.5 4 Fig. 1. Average outage probability versus outage threshold: (a) at n = 1 for both MMs, (b) at n = 30 for MM1, and (c) at n = 30 for MM2. n (cnp,l )[t−1] , l ∈ Nkn . Note that the anchors (l ∈ Nkn ∩ VA ) n n [t−1] broadcast their true position, so that (µp,l ) = p̃l and (cnp,l )[t−1] = 0. Then, new parameters (µnk )[t] and (C nk )[t] are calculated using the iterative belief approximation algorithm. After the last iteration (t = t∗ ), an approximation of the MMSE ∗ state estimate x̂nk in (5) is obtained as (µnk )[t ] . This equals [t∗ ] the result of (5) with p(xnk |d1:n ) replaced by q̃k (xnk ). The iterative belief approximation algorithm uses η nk and Σnk , which are locally available at agent k, and (µnp,l )[t−1] and (cnp,l )[t−1] , l ∈ Nkn , which were received from the neighbors of agent k. Therefore, at each message passing iteration t, each agent k must broadcast to its neighbors l ∈ Nkn only three real values, namely, two for (µnp,k )[t−1] and one for (cnp,k )[t−1] . V. S IMULATION R ESULTS We consider a region of interest (ROI) of size 120m×120m n n with the same |VM | = 41 agents and |VA | = 18 anchors at all N = 30 simulated time steps n. The anchors are regularly placed within the ROI. To avoid boundary effects, agents leaving the ROI reenter it at the respective opposite side. Agents and anchors have a communication radius of 20m; thereby, each agent communicates with one or two anchors. The agents measure distances according to (3) with σw = 1m. For √ trajectories, we set T = 1s, σv = √ generating the agent 1.5m/s, and σa = 0.03m/s2 . The initial agent positions are uniformly drawn on the ROI and, for MM2, the initial agent velocities are drawn from a Gaussian pdf with mean [0 0]T and covariance matrix 0.6·I2 . For initializing the various algorithms, the prior pdf for p0k is chosen Gaussian with mean µ0p,k and covariance matrix 900·I2. Here, if agent k is adjacent to one anchor l, then µ0p,k is uniformly drawn from a circle of radius d0k,l around the true anchor position p̃0l , and if agent k is adjacent to two anchors l and l′, then µ0p,k is chosen as (p̃0l + p̃0l′ )/2. For MM2, the pdf for v 0k is chosen Gaussian with mean [0 0]T and covariance matrix 0.6 · I2 . We compare the proposed hybrid BP–MF method as stated in Section IV-D (abbreviated BPMF) with nonparametric BP (NBP) and sigma point BP (SBP). NBP [8] is an extension of the particle-based BP method of [2] to mobile agents, and SBP [11] is a low-complexity sigma-point-based BP scheme in which, similarly to BPMF, only Gaussian parameters are communicated. Our simulation of NBP uses 800 particles. For simulating BPMF, we perform the fixed-point iteration (with 30 iteration steps) multiple times with different initial values θ0 . More specifically, 20 initial values of µ are drawn [t∗ ] n from mk→k (xk ), 20 are drawn from q̃k (xkn−1 ), and, for each adjacent anchor l, 20 are uniformly drawn from an annulus of radius dnk,l and radial width 3σw around p̃nl [2]. Furthermore, the initial values of cp and, for MM2, of cv ∗and c are always equal to the respective parameters [t ] of q̃k (xkn−1 ). Our measure of performance is the outage  probability Pout , Pr kp̂nk − p̃nk k > τ , where p̃nk is the true position of agent k at time n, p̂nk is a corresponding estimate, and τ > 0 is a threshold. Fig. 1 shows the simulated outage probability P̂out , averaged over 30 simulation trials, of the three methods versus the outage threshold τ . It is seen that, at n = 1, BPMF outperforms NBP and SBP for t∗ = 30; in particular, SBP performs poorly. Since BPMF and SBP use a Gaussian approximation, one may conclude that in the case of a noninformative prior (which is in force at n = 1), the Gaussian approximation degrades the performance of a pure BP scheme like SBP more than that of the proposed hybrid BP–MF scheme. At n = 30, for MM1, BPMF performs as NBP and SBP. However, for MM2, where the state can be predicted more accurately from the previous time, SBP outperforms both BPMF and NBP. Indeed, as previously observed in [11], SBP works very well when informative prior knowledge is available. We expect that NBP would be similarly accurate if more particles were used; however, the complexity of SBP grows quadratically with the number of particles. It is also seen that for both MMs, contrary to BPMF, the performance of NBP and SBP at n = 30 does not improve when t∗ is increased beyond 5. We note that in less dense networks, where beliefs can be multimodal, NBP can be expected to outperform SBP and BPMF. The communication requirements, in terms of number of real values broadcast per message passing iteration t by each agent k to adjacent agents l ∈ Nkn , are 3 for BPMF, 5 for SBP, and 1600 for NBP. VI. C ONCLUSION The proposed algorithm for cooperative localization and tracking combines the advantages of existing BP and MF methods: its accuracy is similar to that of particle-based BP although only three real values per message passing iteration are broadcast by each agent, instead of hundreds of particles. Our simulations showed that the algorithm performs particularly well relative to pure BP-based methods when the prior information on the agent positions is imprecise. 5 R EFERENCES [1] N. Patwari, J. N. Ash, S. Kyperountas, A. O. Hero III, R. L. Moses, and N. S. Correal, “Locating the nodes: Cooperative localization in wireless sensor networks,” IEEE Signal Process. Mag., vol. 22, no. 4, pp. 54–69, Jul. 2005. [2] A. T. Ihler, J. W. Fisher, R. L. Moses, and A. S. Willsky, “Nonparametric belief propagation for self-localization of sensor networks,” IEEE J. Sel. Areas Commun., vol. 23, no. 4, pp. 809–819, Apr. 2005. [3] H. Wymeersch, J. Lien, and M. Z. Win, “Cooperative localization in wireless networks,” Proc. IEEE, vol. 97, no. 2, pp. 427–450, Feb. 2009. [4] S. Mazuelas, A. Bahillo, R. M. Lorenzo, P. Fernandez, F. A. Lago, E. Garcia, J. Blas, and E. J. Abril, “Robust indoor positioning provided by real-time RSSI values in unmodified WLAN networks,” IEEE J. Sel. Topics Signal Process., vol. 3, no. 5, pp. 821–831, Oct. 2009. [5] D. Dardari, E. Falletti, and M. Luise, Satellite and Terrestrial Radio Positioning Techniques. Oxford, UK: Academic Press, 2012. [6] H.-A. Loeliger, “An introduction to factor graphs,” IEEE Signal Process. Mag., vol. 21, no. 1, pp. 28–41, Jan. 2004. [7] M. A. Caceres, F. Penna, H. Wymeersch, and R. Garello, “Hybrid cooperative positioning based on distributed belief propagation,” IEEE J. Sel. Areas Commun., vol. 29, no. 10, pp. 1948–1958, Dec. 2011. [8] J. Lien, J. Ferner, W. Srichavengsup, H. Wymeersch, and M. Z. Win, “A comparison of parametric and sample-based message representation in cooperative localization,” Int. J. Navig. Observ., 2012. [9] V. Savic and S. Zazo, “Reducing communication overhead for cooperative localization using nonparametric belief propagation,” IEEE Wireless Commun. Lett., vol. 1, no. 4, pp. 308–311, 2012. [10] F. Meyer, O. Hlinka, H. Wymeersch, E. Riegler, and F. Hlawatsch, “Distributed localization and tracking of mobile networks including noncooperative objects,” IEEE Trans. Signal Inf. Process. Netw., vol. 2, no. 1, pp. 57–71, Mar. 2016. [11] F. Meyer, O. Hlinka, and F. Hlawatsch, “Sigma point belief propagation,” IEEE Signal Process. Lett., vol. 21, no. 2, pp. 145–149, Feb. 2014. [12] M. Welling and J. Lim, “A distributed message passing algorithm for sensor localization,” in Proc. ICANN-2007, Limassol, Cyprus, 2007, pp. 767–775. [13] S. Van de Velde, H. Wymeersch, and H. Steendam, “Comparison of message passing algorithms for cooperative localization under NLOS conditions,” in Proc. IEEE WPNC-12, Dresden, Germany, 2012. [14] C. Pedersen, T. Pedersen, and B. H. Fleury, “A variational message passing algorithm for sensor self-localization in wireless networks,” in Proc. IEEE ISIT-11, Saint Petersburg, Russia, Aug. 2011, pp. 2158– 2162. [15] E. Riegler, G. E. Kirkelund, C. N. Manchon, M. Badiu, and B. H. Fleury, “Merging belief propagation and the mean field approximation: A free energy approach,” IEEE Trans. Inf. Theory, vol. 59, no. 1, pp. 588–602, Jan. 2013. [16] D. Koller and N. Friedman, Probabilistic Graphical Models: Principles and Techniques. Cambridge, MA, USA: MIT Press, 2009. [17] J. Nocedal and S. Wright, Numerical Optimization. New York, NY: Springer, 2006. [18] Y. Bar-Shalom, X.-R. Li, and T. Kirubarajan, Estimation with Applications to Tracking and Navigation. New York, NY, USA: Wiley, 2001. [19] B. Çakmak, D. N. Urup, F. Meyer, T. Pedersen, B. H. Fleury, and F. Hlawatsch, “Cooperative localization for mobile networks: A distributed belief propagation – mean field message passing algorithm (supplementary material),” 2016, Available online: http://arxiv.org/abs/1512.07782/anc/supplementaryMaterial.pdf. [20] K. B. Petersen and M. S. Pedersen, The Matrix Cookbook. Copenhagen, Denmark: Technical University of Denmark, 2008. [21] S. O. Rice, “Mathematical analysis of random noise,” Bell System Technical Journal, vol. 23, no. 3, pp. 282–332, 1944. [22] M. Abramowitz and I. A. Stegun, Handbook of Mathematical Functions with Formulas, Graphs, and Mathematical Tables. Washington D.C., USA: National Bureau of Standards, 1964. [23] D. N. Urup, “Distributed localization in dynamic cooperative wireless sensor networks using the mean field approximation,” Master’s thesis, Aalborg University, Denmark, Oct. 2014. [24] E. Jones, T. Oliphant, and P. Peterson, “Open source scientific tools for Python,” 2016, Available online: http://www.scipy.org/.
3cs.SY
Energy-efficient neuromorphic classifiers Daniel Martı́ ∗ † , Mattia Rigotti ‡ † Mingoo Seok § and Stefano Fusi † ∗ arXiv:1507.00235v1 [q-bio.NC] 1 Jul 2015 Département d’Études Cognitives, École Normale Supérieure - PSL Research University, Paris, France. Institut nationale de la santé et de la recherche médicale, France.,‡ Physical Sciences Department, IBM T. J. Watson Research Center, Yorktown Heights, NY 10598,† Center for Theoretical Neuroscience, Columbia University, New York, USA, and § Department of Electrical Engineering, Columbia University, New York, USA Neuromorphic engineering combines the architectural and computational principles of systems neuroscience with semiconductor electronics, with the aim of building efficient and compact devices that mimic the synaptic and neural machinery of the brain. Neuromorphic engineering promises extremely low energy consumptions, comparable to those of the nervous system. However, until now the neuromorphic approach has been restricted to relatively simple circuits and specialized functions, rendering elusive a direct comparison of their energy consumption to that used by conventional von Neumann digital machines solving real-world tasks. Here we show that a recent technology developed by IBM can be leveraged to realize neuromorphic circuits that operate as classifiers of complex real-world stimuli. These circuits emulate enough neurons to compete with state-of-the-art classifiers. We also show that the energy consumption of the IBM chip is typically 2 or more orders of magnitude lower than that of conventional digital machines when implementing classifiers with comparable performance. Moreover, the spike-based dynamics display a trade-off between integration time and accuracy, which naturally translates into algorithms that can be flexibly deployed for either fast and approximate classifications, or more accurate classifications at the mere expense of longer running times and higher energy costs. This work finally proves that the neuromorphic approach can be efficiently used in real-world applications and it has significant advantages over conventional digital devices when energy consumption is considered. neuromorphic electronic hardware tion | VLSI technology | neural networks | classifica- Abbreviations: SVM: support vector machine — SV: support vector — RCN: randomly connected neuron Introduction Recent developments in digital technology and machine learning are enabling computers to perform an increasing number of tasks that were once solely the domain of human expertise, such as recognizing a face in a picture or driving a car in city traffic. These are impressive achievements, but we should keep in mind that the human brain carries out tasks of such complexity using only a small fraction of the energy needed by conventional computers, the difference in energy consumption being often of several orders of magnitude. This suggests that one way to reduce energy consumption is to design machines whose architecture takes inspiration from the biological brain, an approach that was proposed by Carver Mead in the late 1980s [1] and that is now known as “neuromorphic engineering”. Mead’s idea was to use very-large-scale integration (VLSI) technology to build electronic circuits that mimic the architecture of the nervous system. The first electronic devices inspired by this concept were analog circuits that exploited the subthreshold properties of transistors to emulate the biophysics of real neurons. Nowadays the term “neuromorphic” refers to any analog, digital, or hybrid VLSI system whose design principles are inspired by those of biological neural systems [2]. Neuromorphic hardware has convincingly demonstrated its potential for energy efficiency, as proven by devices that consume as little as a few picojoules per neural event (spike) [3, 4, 5]. These devices contain however a relatively small number of elements (neurons and synapses) and they can typically perform only simple and specialized tasks, making it 1–12 difficult to directly compare their energy consumption to that of conventional digital machines. The situation has changed recently with the development by IBM of the TrueNorth processor, a neuromorphic device that implements enough artificial neurons to perform complex real-world tasks, like large-scale pattern classification [6]. Here we show that a pattern classifier implemented on the IBM chip can achieve performances comparable to those of state-of-the-art conventional devices based on the von Neumann architecture. More importantly, our chip-implemented classifier uses 2 or more orders of magnitude less energy than current digital machines performing the same classification tasks. These results show for the first time the deployment of a neuromorphic device able to solve a complex task, while meeting the claims of energy efficiency contented by the neuromorphic engineering community for the last few decades. Results We chose pattern classification as an example of a complex task because of the availability of well-established benchmarks. A classifier takes an input, like the image of a handwritten character, and assigns it to one among a set of discrete classes, like the set of digits. To train and evaluate our classifiers we used three different datasets consisting of images of different complexity (see Fig. 1a). We start by describing the architecture of the classifier that we plan to implement on the neuromorphic chip. The classifier is a feed-forward neural network with three layers of neurons, and it can be simulated on a traditional digital computers. We will call this network the ‘neural classifier’ to distinguish it from its final chip implementation, which requires adapting the architecture to the connectivity constraints imposed by the hardware. The neural classifier also differs from the final hardware implementation in that it employs neurons with a continuous activation function, whereas the IBM neuromorphic chip emulates spiking neurons. Despite the differences, the functionality of the neural classifier and its final chip implementation is approximately the same, as we show below. We list the procedure for adapting the architecture of the neural classifier into its chip implementation as a contribution in its own right, since it can be directly extended for the implementation of generic neural systems on other hardware substrates. Architecture of the neural classifier Figure 1b illustrates the three-layer neural classifier. The first layer encodes the preprocessed input and projects to the neurons in the intermediate layer through connections with random weights. Each of these Randomly Connected Neurons (RCNs) receives therefore a synaptic current given by a randomly weighted sum of the inputs, which the RCNs transform into activation levels in a non-linear way—in our case, through a linear rectification function: f (x) = x if x > 0, and 0 otherwise. The combination of a random mixing of the inputs together with a non-linear input-output transformation efficiently expands the dimensionality of the resulting signal (see e.g. [7, 8, 9]), thereby increasing the chances that downstream neurons can MNIST random connections readout connections 0 1 2 3 4 5 6 7 8 9 input MNISTback-image LATEX c output 2 nonlinear units (RCN layer) n neurons (outputs) d n axons (inputs) b a + + + output readout input RCN layer Figure 1. Datasets, architecture of the classifier, architecture of a single core, and chip implementation. a Samples of the three datasets used to evaluate the performance of our classifier. MNIST contains handwritten digits (10 classes); MNIST-back-image contains the digits of the MNIST dataset on a background patch extracted randomly from a set of 20 images downloaded from the Internet; LATEX contains distorted versions of 293 characters used in the LATEX document preparation system. For more details about the datasets, see Methods. b Architecture of the neural network classifier. The images to classify are preprocessed (see Methods) and represented as patterns of activity of a population of Nin input neurons (left, black dots). These input neurons send random projections to a second layer of N Randomly Connected Neurons (RCNs) (green circles), which transform nonlinearly their synaptic inputs into firing activity. The activity of the RCNs is then read out by a third layer of neurons, each of which is trained to respond to only one class (red circles). c Architecture of a single core in the chip. Horizontal lines represent inputs, provided by the axons of neurons that project to the core. Vertical lines represent the dendrites of the neurons in the core (one dendrite per neuron). Active synapses are shown as dots in a particular axon-dendrite junction. The synaptic input collected by the dendrites is integrated and transduced into spike activity at the soma (filled squares on top). The spikes emitted by the neuron are sent via its axon to a particular input line, not necessarily on the same core. Blue lines represent the flow of input and output signals. The panel includes an example of internal connection: the upmost axon carries the output activity of the leftmost neuron in the core (other connections are left unspecified). d Implementation of the neural network classifier in a chip with connectivity constraints. The input is fed into all the cores in the RCN layer (shaded blue), whose neurons project to the input lines of readout cores (shaded yellow) in a one-to-one manner (green curves). The outputs of the readout units are combined together off-line to generate the response of the output neuron (shaded red). See the main text for the description of the different modules. discriminate signals belonging to distinct classes. This discrimination is carried out by a set of output units in the last layer, which compute a weighted sum of the RCNs activity. The weights are trained so that each output unit responds to one separate class (one-vs-all code). Details are given in the Methods. Once the network is trained, a class is assigned to each input patterns according to which output unit exhibits the highest activation. Chip implementation of the neural classifier We implemented the neural classifier on the IBM neuromorphic chip described in [10, 6]. The first step of the conversion of the abstract neural classifier to an explicit chip implementation is the transformation of the input patterns into a format that is compatible with the spike-based coding of the TrueNorth system. For this we simply employ a firing rate coding and convert the integer value of every input component to a spike train with a proportional number of spikes, a prescription that is commonly used in neurocomputational models such as the Neural Engineering framework [11]. Specifically, input patterns are preprocessed and formatted into 256-dimensional vectors representing the firing activity of the input layer (the same preprocessing step was applied in the neural classifier, see Methods). This vector of activities is then used to generate 256 regular-firing spike trains that are fed into a set of cores with random and sparse connectivity. This set of cores constitutes the RCN layer. Like in the neural classifier, the neurons in the RCN layer receive synaptic inputs that consist of randomly weighted combinations of the input, and transform their synaptic inputs into firing activity according to a nonlinear function. On the chip this function is given by the neuronal current-to-rate transduction, which approximates a linear-rectification function [12]. Discriminating the inputs coming from the RCN layer requires each output unit to read from the whole layer of RCNs, which in our implementation contains a number of neurons N that can be as large as 214 . Moreover, all the readout connectitions have to be set at the weights computed by the training procedure. These requirements exceed the constraints set by the chip design, in terms of the maximal number of both incoming and outgoing connections per neuron, as well as the resolution and the freedom with which synaptic weights can be set. In this paragraph we will present a set of prescrip2 tions that will allow us to circumvent these limitations, and successfully instantiate our neural classifier on the IBM system. The prescriptions we are presenting are specific to the TrueNorth architecture, but the types of constraints that they solve are shared by any physical implementation of neural systems, whether it is biological or electronic. It is therefore instructive to discuss the constraints and the prescriptions to obviate them in detail, as they can be easily extended to other more generic settings. 1. Constraints on connectivity. The IBM chip is organized in cores, each of which contains 256 integrate-and-fire neurons and 256 input lines that intersect with one another forming a crossbar matrix of programmable synapses (Fig. 1c). Each neuron can connect to other neurons by projecting its axon (output) to a single input line, either on the same core or on a different core. With this hardware design the maximum number of incoming connections per neuron, or fan in, is 256. Likewise, the maximal number of outgoing connections per neuron, or fan out, is 256, each of which are restricted to target neurons within a single core. 2. Constraints on synaptic weight precision. Synapses can be either inactive or active. The weight of an active synapse can be selected from a set of four values given by signed integers of 9-bit precision. These values can differ from neuron to neuron. Which of the four values is assigned to an active synapse depends on the input line: all synapses on the same input line are assigned an index that determines which of the four values is taken by each synapse (e.g. if the index assigned to the input line is 2, all synapses on the input line take the second value of the set of four available synaptic weights, which may differ from neuron to neuron). The design constraints that we just described can be overcome with the following set of architectural prescriptions. P1. Overcoming the constraints on connectivity. We introduced an intermediate layer of neurons, each of which integrates the inputs from 256 out of the total N RCNs. Accordingly, the firing rates of these intermediate neurons represent a 256/N portion of the total input to an output unit. These partial inputs can then be combined by a downstream neuron, which will have the same activity as the original output P2. Overcoming the constraints on synaptic weight precision. Reducing the weight precision after learning usually only causes moderate drops in classification performance. For example, in the case of random uncorrelated inputs, the scaling properties of the capacity of the classifier (i.e., number of classes that can be correctly classified) remain unchanged, even when the number of states of the synaptic weights is reduced to two [13]. Instead, the performance drop is catastrophically larger when the weight precision is limited also during learning [14, 15] and in some situations the learning problem becomes NP-complete [16] In our case the readout weights are determined off-chip, using digital conventional computers that operate on 64 bit numbers, and then quantized in the chip implementation. The performance drop is almost negligible for a sufficient number of synaptic levels. In our case we quantized the readout weights of the original classifier on an integer scale between −28 and 28. Each quantized weight was then implemented as the sum of four groups of 6 synaptic contacts, where each contact in the group can either be inactive (value 0) or activated at one of the 6 values: ±1, ±2, ±4. The multiplicity of this decomposition (19 can be for instance decomposed as (4) + (1 + 4) + (1 + 4) + (1 + 4) or (2)+(2+4)+(2+4)+(1+4)) is resolved by choosing the decomposition that is closest to a balanced assignment of the weights across the 4 groups (e.g. 19 = (4) + (1 + 4) + (1 + 4) + (1 + 4)). This strategy requires that each original synapse be represented by 24 synapses. We implemented this strategy by replicating each readout neuron 24 times and by distributing each original weight across 24 different dendritic trees. These synaptic inputs are then summed together by the off-line summation of all readout neuron activities that correspond to the partial inputs to a specific output unit (see Methods for details). A similar strategy can be used to implement networks with synaptic weights that have even a larger number of levels and the number of additional synapses would scale only logarithmically with the total number of synaptic levels that is required. However, it is crucial to limit individual synapses to low values, in order to avoid synchronization between neurons. This is why we limited to 4 the maximum synaptic value of individual synapses of the chip. Classification performance and speed-accuracy trade-off Our neuromorphic classifier implemented on the TrueNorth chip was emulated on a simulator developed by IBM. As the TrueNorth chip is entirely digital, the simulator reproduces exactly the behavior of the chip [10]. In Fig. 2a we show the dynamics of two typical runs of the simulator classifying images from the MNIST-back-image dataset. Upon image presentation, the RCNs in the intermediate layer start inte- 0 250 0 − 250 c 0 1 2 3 4 5 6 7 8 9 500 0 time (ms) 500 b time (ms) 0 performance (%) emitted spikes, detrended a performance (%) unit. If the total number of the partial inputs is larger than the total number of incoming connections of the neurons that represent the output units (in our case 256), the procedure can be iterated by introducing additional intermediate layers. The final tree will contain a number of layers that scales only logarithmically with the total number of RCNs. For simplicity we did not implement this tree on chip and we summed off-chip the partial inputs represented by the firing activity of the readout neurons. Notice also that this configuration requires readout neurons to respond approximately linearly to their inputs, which can be easily achieved by tuning readout neurons to operate in the linear regime of their currentto-rate transduction function (i.e., the regime in which their average input current is positive). This procedure strongly relies on the assumption that information is encoded in the firing rates of neurons; if the spiking inputs happen to be highly synchronized and synchronization encodes important information, this approach would not work. 250 100 MNIST MNISTback-image 50 0 500 0 0.5 1 energy consumption (mJ) MNIST MNIST-back-image 97.2 78.4 75.0 87.9 77.9 69.9 0 200 400 classification time spike difference ∞ 80 40 20 10 67.6 59.6 0 200 400 classification time Figure 2. The neuromorphic classifier in action. a Spikes emitted by readout neurons during an easy (top) and a difficult (bottom) classification, after removing the trend caused by the intrinsic constant currents. Each curve corresponds to the readout output associated with the digit indicated by the color code. Samples are drawn from the MNIST-back-image dataset. b Test error as a function of classification time (i.e., the time over which spikes are integrated) and energy. The error is averaged over the first 1000 test samples of the MNIST (red) and MNISTback-image (blue) datasets. Each dashed horizontal line indicates the best test error achieved with support vector classifiers for a given dataset, based on the evaluation of the whole test set. c Classification times for different thresholds in spike difference (as indicated in the legend), for the MNIST and MNIST-back-image datasets. For each threshold we plot all classification times (thin lines) as well as the sample mean (shorter ticks on top). The performances associated with each threshold are indicated in the y -axis. When the threshold in spike difference is infinite (black), the classification is assessed at t = 500 ms (i.e., there is no stopping criterion). In all panels the chip uses N = 16384 RCNs. grating the input signal (not shown) and, a few tens of milliseconds later, they start emitting spikes, which are passed to the readout neurons. The figure shows the total number of spikes emitted by the readout neurons since input activation, after subtracting the overall activity trend caused by baseline activity. For simple classifications, in which the input is easily recognizable, the readout neuron associated with the correct class is activated in less than 100 ms (Fig. 2a, top). More difficult cases require the integration of spikes over longer time intervals, as the average synaptic inputs to different readout neurons can be very similar (Fig. 2a, bottom). This suggests that the performance of the classifier, as measured by the classification error rate on the test set, should improve with longer integration intervals. This trade-off between speed and performance is illustrated in Fig. 2b, which shows the classification performance versus elapsed time for the MNIST and MNIST-back-image datasets. The performance increases monotonically with time until it saturates in about half a second, with a highest performance of 97.27% for MNIST (98.2% with 10-fold bagging), and 77.30% for MNIST-backimage. These performances are not too far from the best classification results achieved so far: 99.06% for MNIST (using maxout networks on the permutation invariant version of the MNIST dataset, which does not exploit any prior knowledge about the two-dimensional structure of the patterns [17]) and 77.39% for MNIST-back-image (with support vector classifiers [18], although methods combining deep nets, feature 3 learning, and feature selection can achieve performances as high as 87.75% [19]). Energy-speed-accuracy trade-off As just discussed, accuracy has a cost in term of energy because longer integration times entail more emitted spikes per classification and a larger baseline energy costs, which in our case is the dominant contribution to the total energy consumption. We estimated the energy consumption as described in section 5 and we found that the energy per classification never exceeds 1 mJ for our network configuration. With the energy needed to keep lit a 100 W light bulb for a second, one could perform 105 classifications, which is equivalent to around one classification per second uninterruptedly for almost one day. Notice that this estimate is based on a classification that lasts 0.5 s and, therefore, does not take into account the fact that most patterns are correctly classified in a significantly shorter time (see Fig. 2a, top). If the integration and emission of spikes is stopped as soon as one of the output units is significantly more active than the others, then the average energy consumption can be strongly reduced. The criterion we used to decide when to stop the integration of spikes (and thus the classification) was based on the spikes emitted by the readout units. Specifically, we monitored the cumulative activity of each output unit by counting all the spikes emitted by the corresponding readout neurons. We stopped the classification when the accumulated activity of the leading unit exceeded that of the second unit by some threshold. The decision was the class associated with the leading output unit. In Fig. 2c we show the performances and the corresponding classification times for several thresholds. Low thresholds allow for faster yet less accurate classifications. In both the MNIST and MNIST-back-image datasets, the patterns that require long classifications times are rare. While the performance barely changes for large enough thresholds, the average classification time can be substantially reduced by lowering the threshold. For example, for the MNIST dataset the classification time drops by a factor of 5 (from 500 ms to 100 ms) and, accordingly, so does the energy consumption (from 1 mJ to 0.2 mJ). Faster classifications are also possible by increasing either the average firing rate or the total number of RCNs, both of which entail an increase in energy consumption, which might be partially or entirely compensated by the decrease in the classification time. These expedients will speed up the integration of spike-counts and, as a result, the output class will be determined faster. In all cases both the energy cost and the classification performance increase with the total number of emitted spikes or, equivalently, with integration time, if the average firing rate is fixed. This is a simple form of a more general energy-speedaccuracy trade-off, a phenomenon that has been described in several biological information-processing systems (e.g. [20]), and that can confer great functional flexibility to our classifier. One advantage of basing the computation on a temporal accumulation of spikes is that the classifier can be interrupted at any time at the cost of reduced performance, but without compromising its function. This is in stark contrast to some conventional clock-based centralized architectures whose mode of computation crucially relies on the completion of entire monolithic sets of instructions. We can then envisage utilization scenarios where a spiking-based chip implementation of our classifier is required to flexibly switch between precise long-latency classifications (like, e.g., those involving the identification of targets of interest) and rapid responses of limited accuracy (like the quick avoidance of imminent danger). Notice that both the simulated and implemented networks, although entirely feed-forward, exhibit complex dy4 namics leading to classification times that depend on the difficulty associated with the input. This is because neurons are spiking and the final decision requires some sort of accumulation of evidence. When a stimulus is ambiguous, the units representing the different decisions receive similar inputs and the competition becomes harder and longer. This type of behavior is also observed in human brains [21]. We will now focus on the comparison of energy consumption and performance between the neuromorphic classifier and more conventional digital machines. Energy consumption and performance: comparison with conventional digital machines We compared both the classification performance and the energy consumption of our neuromorphic classifier to those obtained with conventional digital machines implementing Support Vector Machines (SVMs). SVMs offer a reasonable comparison because they are among the most successful and widespread techniques for solving machine-learning problems involving classification and regression [22, 23, 24], and because they can be efficiently implemented on digital machines. To better understand how the energy consumption scales with the complexity of the classification problem, it is useful to summarize how SVMs work. After training, SVMs classify an input pattern according to its similarity to a set of templates, called the support vectors, which are determined by the learning algorithm to define the boundaries between classes. The similarity is expressed in terms of the scalar product between the input vectors and the support vectors. As argued above, we can improve classification performance by embedding the input vectors in a higher-dimensional space before classifying them. In this case SVMs evaluate similarities by computing classical scalar products in the higher-dimensional space. One of the appealing properties of SVMs is that there is no need to compute explicitly the transformation of inputs into high-dimensional representations. Indeed, one can skip this step and compute directly the scalar product between the transformed vectors and templates, provided that one knows how the distances are distorted by the transformation. This is known as the “kernel trick” because the similarities in a highdimensional space can be computed and optimized over with a kernel function applied to the inputs. Interestingly, the kernel associated with the transformation induced by the RCNs of our neural classifier can be computed explicitly in the limit of a large number of RCNs [18]. This is also the kernel that we used to compare the performance of SVMs against that of our neural classifier. Unfortunately, classifying a test input by computing its similarity to all support vectors becomes unwieldy and computationally inefficient for large datasets, as the number of support vectors typically scales linearly with the size of the training set in many estimation problems [25]. This means that the number of operations to perform, and hence the energy consumption per classification, also scales with the size of the training set. This makes SVMs and kernel methods computationally and energetically expensive in many large-scale tasks. In contrast, our neural network algorithm evaluates a test sample by means of the transformation carried out by the RCNs. If the RCN layer comprises N neurons and the input dimension is Nin , evaluating the output of a test sample requires O(Nin · N ) synaptic events. Thus for large sample sizes, evaluating a test sample in the network requires far fewer operations than when using the “kernel trick”, because the number is effectively independent of the size of training set (cfr. [26, 27]). Systems such as ours may therefore display considerable energy advantages over SVMs when datasets are large. a performance (%) MNIST b 100 100 network chip libsvm SVCperf 80 network chip primalSVC 60 10 1 10 2 10 3 10 60 4 0.01 number of RCNs or support vectors MNISTback-image performance (%) c d 75 network chip 50 libsvm SVCperf 25 10 1 10 2 primalSVC 0.1 10 3 10 4 number of RCNs or support vectors 1 10 average energy consumption (mJ) 100 75 25 libsvm SVCperf 50 network chip primalSVC libsvm SVCperf 80 0.01 primalSVC 0.1 1 10 average energy consumption (mJ) Figure 3. Energy-accuracy trade-off. a,c Dependence of the classification accuracy on the number of Randomly Connected Neurons (RCNs) in the neural classifier and on the number of support vectors (SVs) in the SVC. Panel a shows this dependence for the MNIST dataset, and panel b for the MNIST-back-image. As the number of RCNs increases, the classifier becomes more accurate at the cost of higher energy consumptions (b,d). The energy consumption is based on the average time it takes to the neural classifier to perform the classification (see Fig. 2c). We also show the performance achieved by three different implementations of support vector classifiers (legend code: SVC, libsvm; rSVC, reduced primal; SVC; SVCperf, cutting plane subspace pursuit). The algorithms rSVC, SVCperf minimize the number of support vectors (SVs) with respect to the optimal value and reduce, therefore, the energy consumption levels at test time. The number of SVs used by the standard algorithm (libsvm), on the other hand, can go beyond the optimal value by reducing sufficiently the soft-margin parameter and pushing the classifier to overfit the data. In all cases, the energy consumption increases linearly with the number of SVs, as the number of operations per classification at test time scales linearly with the number of SVs. The vertical thin lines indicate the abscissa at best performance for the IBM chip (red) and SVM implementations (black). For reference we indicate the best performance achieved by the chip with a horizontal dashed line. The horizontal arrow indicates the reduction in energy consumption that would be attained if the efficiency of digital machines reached the theoretical lower bound estimated by [28]. The relation between number of SVs and energy consumption was determined by simulating the i7 Intel chip running a program that implements an SVM at test time. b Same as a, but on the MNIST-back-image dataset. In both cases our neuromorphic classifier exhibits an energy cost per classification that is orders of magnitude smaller. In Fig. 3 we compare the energy consumption and performance of the neuromorphic classifier to those of an SVM implemented on a conventional digital machine. More specifically, we estimated the energy expenditure of a digital SVM using a simulator of the Intel i7 processor, which was the machine with the best energy performance among those that we simulated (see Methods section 5 and Discussion). The energy cost per support vector per pattern was estimated to be around 5.2 µJ, a quantity that is not far above what is considered as a lower bound on energy consumption for digital machines [28]. For both the neuromorphic classifier and the digital SVM we progressively increased the performance of the classifiers by increasing the number of RCNs (in the case of the neuromorphic classifier), and by varying the number of support vectors (in the case of the SVM), see Figures 4a,c. For the SVM we tried three different algorithms to minimize the number of support vectors and hence the energy consumption (for more details, see caption of Fig. 3 and Methods). For the IBM chip we estimated the energy consumption both in the case in which we stopped the classifications with the criterion described in the previous section and in the case in which the classification time was fixed at 500 ms (see Fig. 7 in Suppl. Info.). In both cases the energy consumption is significantly lower for the neuromorphic classifier, being in the former case approximately 2 orders of magnitude smaller for both the MNIST and the MNIST-back-image datasets, while still achieving comparable maximal performances (Fig. 4b,d). Scalability The MNIST dataset only has 10 output classes. We wondered whether the advantage of the neuromorphic classifier in terms of energy consumption is preserved when the number of classes increases and the classification task becomes more complex. To study how the energy consumption scales with the number of classes we used the LATEX dataset, which contains 293 classes of distorted characters. We progressively increased the number of classes to be learned and classified and we studied the performance and the energy consumption of both the digital implementation of the SVM and the neuromorphic classifier. Specifically, given a number of classes that was varied between 2 and 293, we selected a random subset of all the available classes, and we trained both the SVM and the neural classifier on the same subset. The results are averaged over 10 repetitions, each one with a different sample of output classes. To make a meaningful comparison between the the energy consumed by a SVM and the neuromorphic classifier, we equalized all the classification accuracies, as follows. For each classification problem we varied the margin penalty parameter of the standard SVC using grid search and picked the best performance achieved. We then varied the relevant parameters of the other two classifiers so that their classification accuracy matched or exceeded the accuracy of the standard SVC. Specifically, we progressively increased the number of basis functions (in the primalSVC method) and the number of RCNs (in the neural classifier) until both reached the target performance. For each classification problem we averaged over 10 realizations of the random projections of the neural classifier. The results are summarized in Fig. 4. The energy consumption is about two orders of magnitude larger for the SVM throughout the entire range of variation of the number of classes that we considered, although for a very small (2–3) number of classes the advantage of the neuromorphic classifier strongly reduces, most likely because the algorithms to minimize the number of SVs work best when the number 5 of classes is low. This plot indicates that the energy advantage of the neuromorphic classifier over SVMs implemented on conventional digital machines is maintained also for more complex tasks involving a larger number of classes. It is interesting to discuss the expected scaling for growing number of classes. Consider the case of generic C classes multi-class problems solved through reduction with multiple combined binary SVMs. In a one-vs-all reduction scheme, each binary classifier is trained to respond to exactly one of the C classes, and hence C SVMs are required. For each SVM, one needs to compute the scalar products between the test sample to be classified and the NSV support vectors. Each scalar product requires Nin multiplications and sums. In the favorable case in which all binary classifiers happen to share the same support vectors, the scalar products can be computed only once and would require Nin ·NSV operations. These NSV scalar products then need to be multiplied by the corresponding coefficients, which are different for the different SVMs. This requires additional CNSV operations. If NSV scales linearly with C, as in the cases we analyzed, then the total energy E will scale as E ∼ Nin C + C 2 . When C is small compared to Nin , the first term dominates, and the expected scaling is linear. However, for C > Nin the scaling is expected to be at least quadratic. It can grow more rapidly if the support vectors are different for different classifiers. Interestingly the expected scaling for the neural network classifiers that we considered is the same. The energy consumption mostly depends on the number of needed cores. This number will be proportional to the number of RCNs, N , multiplied by the number of classes. Indeed, each core can receive up to 256 inputs, so the total number of needed cores will be proportional to dN/256e, with d·e denoting the ceiling function. Moreover, the number of readout units, which are the output lines of these cores, will be proportional to the number of classes. Hence the N C dependence. In the cases we analyzed N depends linearly on the number of classes, and hence the energy depends quadratically on C, as in the case of the SVMs when C is large enough. Notice that the there is a second term which also scales quadratically with C that contributes to the energy. The second term comes from the necessity of replicating the RCNs C times, due to the limited fan out of the RCNs. Again, under the assumption of N ∼ C, also this term will scale quadratically with C. Given that the scaling with the number of classes is basically the same for the neuromorhic classifier as for the SVMs, it is not unreasonable to hypothesize that the energy consumption advantage of the neuromorphic implementation would be preserved also for a much larger number of classes. Discussion Our results indicate that neuromorphic devices are mature enough to achieve performances on a real-world machinelearning task that are comparable to those of state-of-the-art conventional devices with von Neumann architecture, all just by using a tiny fraction of their energy. Our conclusions are based on a few significant tests, based on a comparison limited to our neuromorphic classifier and a few digital implementations of SVMs. This clearly restricts the generality of our results and does not preclude situations in which the advantage of the neuromorphic approach might be less prominent. In any case, the merit of our study is to offer a solid comparison with implementations on current conventional digital 6 platforms that are energy-efficient themselves. In particular, the algorithm we used on conventional digital machines involves only multiplications between matrices and vectors, the efficiency of which has been dramatically increased in the last decades thanks to optimized parallelization. Furthermore, not only we tried to match the classification performance of the competitors, but we also considered two additional SVM algorithms that minimize the number of support vectors, and hence the final number of operations. Other choices for SVM algorithms would certainly lead to different estimates for energy consumption, but it is rather unlikely that they would change across 2 orders of magnitude. It is possible that full custom unconventional digital machines based, e.g., on field programmable gate arrays (FPGAs) would be more energyefficient, but it is hard to imagine that they would break the predicted energy wall discussed in [28]. If this assumption is right, neuromorphic hardware would always be more efficient when performing the type of tasks that we considered. Moreover, analog neuromorphic VLSI or unreliable digital technologies might allow for a further reduction of energy consumption, probably by another order of magnitude [5, 29, 30]. The current energy consumption levels achieved by analog systems are very close to those of biological brains in terms of energy per spike, although many of these systems are relatively small and it is unclear whether they can ever be extended to brain-scale architectures. Other custom chips that can solve real-world tasks have been designed. An example is the FPGA chip NeuFlow, designed to implement convolutional networks for visual recognition. The chip is digital and uses as little as 4.9 × 1011 operations/W or, equivalently, 2 pJ/operation. It is also interesting to discuss the performance of other conventional digital processors in the benchmarks we examined. Let us consider for example the implementations of SVMs classifying the MNIST digits with about 104 support vectors, which is roughly the number of vectors we need to achieve the best classification accuracy. As we have shown, the Intel i7 takes about 10 ms to perform a classification, at an approximate cost of 50 mJ. The IBM chip, in contrast, required 1 mJ for the longest classification times (500 ms), and 0.2 mJ for the average classification time (100 ms). We also quantified the energy cost of the ARMv7, which is a more energy-efficient yet slower microprocessor often used in mobile technologies. Its energy consumption per classification was substantially higher, around 700 mJ. The main reason for this high consumption is that it takes more than 0.6 seconds to perform a single classification. And the baseline consumption, which increases linearly with the classification time, is a large portion of the total energy needed for a classification. Finally, we considered the recent Xeon Phi, which has a massively parallel architecture and is employed in high performance computing applications. As we do not have a simulator for the Phi, we could only indirectly estimate a lower bound for the energy consumption (see Methods for more details). According to our estimate, a single classification requires only 0.2 µs and uses about 16 mJ, which would be significantly lower than the energy cost of the i7 and very close to the estimated lower limit of energy consumption [28], but still larger than the consumption of the IBM chip. Notice however that both the classification time and the energy consumption of the Xeon Phi processor are very likely to be grossly underestimated, as they are simply derived from the peak performance of 100 Tflop/s. The estimates for the i7 and the ARMv7 are significantly more reliable, because we derived them by simulating the processors. To summarize, our results compellingly suggest that the neuromorphic approach is finally competitive in terms of en- RCN libsvm primalSVC 0.5 1 0.99 10 0 100 10 100 number of classes 10 c RCN primalSVC libsvm number SVs, RCNs b 1 energy consumption (mJ) performance a 1 0.1 0.01 10 100 number of classes 10 10 10 10 4 RCN libsvm primalSVC 3 2 1 10 100 number of classes Figure 4. Dependence of the energy consumption on the number of classes a Classification accuracy for the neural classifier and for two SVM algorithms, as a function of the number C of classes for the LATEX dataset. The parameters of the different classifiers are tuned to have approximately the same classification accuracy. b Energy consumption as a function of the number of classes, for the LATEX dataset. Given a number C of classes, every point in the plot is obtained by training a given classifier on C randomly sampled classes among the 293 available ones. This procedure is repeated 10 times for every value of C and every type of classifier. Each datapoint associated with the neural classifier (’RCN’) was in turn estimated from a sample of 10 realizations of the random connections (squares indicate sample means, errorbars indicate the 0.1 and 0.9 fractile of the sample). c As in b, but number of support vectors and RCNs as a function of the number of classes. Dataset MNIST MNIST-back-image LATEX image size 28 × 28 28 × 28 32 × 32 num. classes size training set 10 10 293 60000 12000 14650 size test set 10000 50000 9376 ergy consumption in useful real-world machine learning tasks and constitutes a promising direction for future scalable technologies. The recent success of deep networks for large-scale machine learning [31, 32] makes neuromorphic approaches particularly relevant and valuable. This will be certainly true for neuromorphic systems with synaptic plasticity, which will enable these devices to learn autonomously from experience. Learning is now available only in small neuromorphic systems [33, 34, 35], but hopefully new VLSI technologies will allow us to implement it also in large-scale neural systems. ACKNOWLEDGMENTS. This work was supported by DARPA SyNAPSE, Gatsby Charitable Foundation, Swartz Foundation and Kavli Foundation. We are grateful to the IBM team led by Dr. D. Modha for their assistance with the IBM chip simulator. In particular we thank John Arthur and Paul Merolla for their help with the estimate of the chip energy consumption. DM acknowledges the support from the FP7 Marie Curie Actions of the European Commission and the ANR-10-LABX-0087 IEC and ANR-10-IDEX-0001-02 PSL grants. Materials and Methods Images sets for classification benchmarksWe used three datasets in our study: MNIST, MNIST-back-image, and LATEX. The MNIST dataset consists of images of handrwitten digits (10 classes) [36]. The MNIST-back-image dataset contains the same digits of MNIST, but in this case the background of each pattern is a random patch extracted from a set of 20 black and white images downloaded from the Internet [37]. Patches with low pixel variance (i.e. containing little texture) are discarded. The LATEX dataset consists of distorted versions of 293 characters used in the LATEX document preparation system [38, 39]. All datasets consist of l × l pixel gray-scale images, and each of such pixel images is associated with one out of C possible classes. The size of the pixel images, the number of classes, and the sizes of the training and test sets depend on the data set (see table below). Preprocessing Every sample image was reshaped as a l2 dimensional vector, and the average gray level of each component was subtracted from the data. The dimensionality of the resulting image vector was then reduced to 256 using PCA. To guarantee that all the selected components contributed uniformly to the patterns, we applied a random rotation to the principal subspace (see, e.g., [40]). We denote by Nin = 256 the dimension of that subspace. The architecture of the network and the training algorithm We map the preprocessed Nin -dimensional vector image, s, into a higher dimensional space through the transformation xi = f (wi · s), i = 1, . . . , N, where wi is an Nin -dimensional sparse random vector and f (·) is a nonlinear function. This is the transformation induced by a neural network with Nin input units and N output units with activation function f (·). More succinctly, x = f (WT s), [1] where W is a weight matrix of dimensions Nin × N formed by adjoining all the column weight vectors wi , and where f (·) acts componentwise, i.e., f (x) ≡ (f (x1 ), . . . , f (xNin ))T . The output of the random nonlinear transformation, x, is used as the input to a linear NC -class discriminant, consistP ing of NC linear functions of the type yj = N J x jk k , with k=1 j = 1, . . . , C. More compactly, y = Jx, [2] where y = (y1 , . . . , yC )T , J is a C×N matrix, and x is given by Eq. [ 1 ]. A pattern x is assigned to class Cj if yj (x) > yk (x) for all j 6= k. The elements of J are learned offline by imposing a 1-of-NC coding scheme on the output: if the target class is j then the target output t is a vector of length NC where all components are zero except component tj , which is 1. For the offline training of weights we use the pseudoinverse, which minimizes the mean squared error of the outputs. This technique has been shown to be a good replacement for empirical minimization problems when the dataset is embedded in a random high-dimensional space, which is our case [41, 26, 42, 27]. Neuromorphic chip implementation The chip is composed of multiple identical cores, each of which consists of a neuromorphic circuit that comprises n = 256 axons, n neurons, and n2 adjustable synapses ([43, 10, 6], see also Fig. 1c). Each axon provides the inputs by feeding the spiking activity of one given neuron that may or not reside in the core. The incoming spiking activity to all n axons in a core is represented by a vector of activity bits (A1 (t), . . . , An (t)) whose elements indicate whether or not the neurons associated with the incoming axons emitted a spike in the previous time step. The intersection of the the n axons with the n neurons forms a matrix of programmable synapses. The weight of active synapses is determined by the type of axon and the type of neuron the synapse lies on. Specifically, each core can contain up to four different types of axon, labeled Gj = {1, 2, 3, 4}, whereas it can accommodate an unlimited 7 number of neuron types, each of which having four associated synaptic weights Si = (Si1, . . . , Si4 ). The strength of an active G synapse connecting axon j with neuron i is Si j , that is, the axon type determines which weight to pick among the weights associated with neuron i. The net input received by neuron i P Gj at time step t is therefore hi (t) = n j=1 Si Bij Aj (t), where Bij is 1 or 0 depending on whether the synapse between axon j and dendrite i is active or inactive. At each time step the membrane potential Vi (t) of neuron i receiving input h(t) is updated according to Vi (t + 1) = Vi (t) − β + hi (t), where β is a constant leak. If Vi (t) becomes negative after an update, it is clipped to 0. Conversely, when Vi (t) reaches the threshold Vthr , the potential is reset to Vreset and the neuron emits a spike, which is sent through the neuron’s axon to the target core and neuron. This design implies that each neuron can connect to at most n neurons, which are necessarily in the same core. The initial voltage of each neuron was initialized by drawing randomly and with equal probability from a set of 4 evenly spaced values from Vreset to Vthr . Signal-to-rate transduction The input to the neuromorphic chip consists of a set of spike trains fed to the neurons of the input layer. To transform the vector signal s into spike trains, we first shifted the signal by s̄ = 3σ, where σ is the standard deviation across all signal components of all patterns. The shifted signal was then scaled by a factor νsc chosen to ensure moderate output rates in the RCN layer, and the result was linear-rectified to positive values. In short, the input rate νi associated with signal si is νi = νsc [si + s̄]+ , i = 1, . . . , Nin , where [x]+ is x if x > 0, or 0 otherwise. The values νi were then used to generate regular spike trains with fixed inter-spike-interval 1/νi . Basic architecture The circuit is divided in two functional groups, or layers, each of which comprises several cores. The first functional group is the RCN layer, which computes the random nonlinear expansion in Eq. [ 1 ]. The second functional group computes the C-class discriminant y = Jx. The output of the classifier is just argmaxj yj , where j runs over the C possible categories. The argmax operation was not computed by the chip, but was determined off-line by comparing the accumulated spike counts across all outputs. In the following, we describe the implementation of the two layers in more detail. RCN layer We first set the dimensionality of the input to the number of available axons per core, i.e., Nin = n = 256. A convenient choice for W is a n × N matrix where each column is vector of zeros except for exactly m < n nonzero entries, which are randomly placed and take a fixed integer value w. We took m = 26, which corresponds to a connectivity level of around 0.1. Lowering the connectivity has the advantage of decreasing energy costs by reducing the number of total spikes and active synapses, without impacting the classification performance. The random expansion was mapped in the chip by splitting the matrix WT into dN/ne submatrices of size n × n, and using each submatrix as the (boolean) connectivity matrix Bij of a core. With this arrangement, each of the N neurons distributed among the dN/ne cores receives a sparse and random linear combination of signals. Specifically, the average current received by each RCN is hi = n X j=1 8 Wji νj , i = 1, . . . , N. A zero-th order approximation of the firing rate of a general vlsi neuron receiving a current hi is ri = [hi − β]+ , Vthr − Vreset [3] where Vthr is the threshold for spike emission and Vreset is the reset potential [12]. We chose the parameters w and β to meet two criteria. First, we required the fraction of RCNs showing any firing activity (i.e., the coding level f ) to be around 0.25. This coding level is a good compromise between the need for discrimination and generalization, and it keeps finite-size effects at bay [9]. Second, we required the distribution of activities across active RCNs to be sufficiently wide. Otherwise the information carried by the spiking activity of the RCNs is too imprecise to discriminate among patterns. All the cores in the RCN layer receive exactly the same n-dimensional input signal. Readout The readout matrix J was trained offline and mapped to the chip architecture as follows. Weight quantization Because the chip can hold only integer-valued synapses, we need to map the set of all components of J into an appropriate finite set of integers. We started clipping the synaptic weights within the bounds (−4σ, 4σ), where σ is the standard deviation of the sample composed of all the components of J. We then rescaled the weights to a convenient magnitude Jmax = 28 (see below), and rounded the weight values to the nearest integer. Weight assignment The TrueNorth connectivity constraints dictate that each RCN can project to only one axon, meaning that there are at most n = 256 synaptic contacts available to encode the C = 10 weights, J0i , . . . , J9i associated with the i-th RCN. We allocated 24 contacts per class and per axon (see Fig. 5). Each of these 24 contacts were divided in four groups comprising 6 weights each, with values 1, 2, 4, −1, −2, −4. This allowed us to represent any integer weight from −28 to 28 (each of the 4 groups encodes a maximum weight of 7, sign aside). To distribute any weight value w across the available synaptic contacts, we decomposed w in a sum of four terms, given by the integer division of w by 4 with the remainder spread evenly across terms (Ex: 19 = 4 + 5 + 5 + 5). Each of such values was assigned to one group, represented in base 2, and mapped to a pattern of active-inactive synapses according to the weight associated with each axon-dendrite intersection. Positive and negative weights, as well as strong and week weights, were balanced along a dendrite by changing the sign and order of the weights in the crossbar (see alternating colors and saturations in Fig. 5). Negative threshold For the readout to work properly, the firing activity of readout neurons must be proportional to the linear sum of the inputs from the RCNs. This requires neurons to operate in the linear regime of their dynamic range, a regime that can be enforced by lowering the threshold βout of readout neurons. We set βout < 0, which is equivalent to adding a constant positive current to each neuron. If the current-to-rate transduction function were the thresholdlinear function of Eq. [ 3 ], the baseline activity induced by this constant current would be |βout |/(Vthr − Vreset ) per readout neuron. The contribution of this background signal should 0 1 + + from RCN 1 2 3 4 5 6 7 8 J13 = −9 Figure 5. Implementation of the readout matrix in a core. The diagram represents the first 8 input lines and first 48 dendrites (two output units) of a typical readout core. Under each axon-dendrite contact is a square that indicates the potential synaptic strength at the site: color indicates whether the connection is excitatory (red) or inhibitory (blue), while the saturation level represents the absolute value of the synaptic strength, which can be 1, 2, or 4 (low, medium, and high saturation, respectively). Only the sites marked with a dot are active. The green frame highlights all the synaptic contacts allocated for an arbitrary weight of the readout matrix, in this case J13 = −9, which is decomposed as the 4-term sum −9 = −2 − 3 − 2 − 2 = −0102 − 0112 − 0102 − 0102 . Note that in this particular axon the ordering of weights is 20 , 21 , 22 (rightmost bit is the most significant). a b 5 · 10 2.5 · 10 8 0.1 8 0.05 0 0 2500 5000 number of SVs 7500 0 running time (s) Estimation of the IBM chip energy consumptionThe energy consumption of the IBM chip was estimated from the TrueNorth specifications [6]. The total energy consumption comprises the baseline energy (15.9 µW per core), the energy to emit spikes (109 pJ per spike), the energy needed to read active synapses (10.7 pJ per active synapse), and the energy necessary to update membrane potentials (1.2 pJ per neuron). We ignored the input-output energy needed to transmit spikes off chip and receive spikes on chip. These numbers provide a reasonable estimate of the energy consumption of systems with a conservative supply voltage of 0.775 V; most chips operate near or below this estimate. For a setup with 214 RCNs, 26 dendrites per class, and 10 classes, the power was about 2.08 mW, 95% of which corresponds to the baseline power. energy consumption (J) Support Vector Machines. We trained SVMs to perform multiclass classifications based on a one-vs-all scheme, so that the number of output units coincides with the number of classes (as in the neural classifier). SVMs were evaluated using arc-cosine kernels, whic mimic the computation of large feedforward networks with one or more layers of hidden nonlinear units [18]. For our particular architecture, based on one hidden layer built with threshold-linear units, the kernel is k(x, y) = kxkkykJ1 (θ), where J1 (θ) = sin θ + (π − θ) cos θ and θ is the angle between the inputs x and y. We considered three types of SVM. For the standard SVM we used the open library libsvm [44], which we patched to include the arccos kernel. The other two SVMs reduce the number of support vectors without sacrificing performance substantially. One of such algorithms is primalSVC, which selects greedily the basis functions by optimizing the primal objective function [45]. The other method is based on the so-called Cutting-Plane Subspace Pursuit algorithm, which reduces the number of support vectors by using basis functions that, unlike standard SVMs, are not necessarily training vectors [46]. Such method is implemented in the library SVMperf. Unlike the other two classifiers, SVMperf used RBF kernels instead of arccos kernels. number of classes C increases, so does the number of readout neurons necessary to perform a classification and, therefore, so does the required number of readout cores. Specifically, if we assign sc synaptic contacts per axon and per class, we will need a total of sc C output lines. These output lines need to be connected to all the N neurons through the input lines of the readout cores . Because each readout core can accomodate 256 output lines, connected to 256 input lines, the total number of readout cores will be dN/256edsc C/256e (d·e indicates the ceiling function). In principle the number of RCN cores will be simply dN/256e. However, each RCN should project to dsc C/256e cores, which implies that each RCN core must be cloned dsc C/256e times due to the fan-out constraint—each RCN can project to only one core. The total number of cores is therefore Ncores = 2dN/256edsc C/256e, where the factor 2 accounts for the contributions of both the readout and the RCN cores. The total number of spikes emitted was estimated from the reference value we got from the chip simulation (for 10 classes, N = 214 , sc = 24, and 500 ms of classification time), scaled appropriately for the new Ncores . More concretely, if we denote by n0sp the number of spikes emitted during our reference simulation, the number of emitted spikes in a general case is nsp = n0sp dsc C/256e(T /500)(N/214 ), where T is the duration of the simulation in milliseconds. We chose this duration to be T = 108 ms, which is the average classification time of the chip implementation the MNIST dataset, when the spike difference is 80 spikes and which yields only 0.1% less in performance than in the fixed-duration case (97.2% vs 97.3%). With T and the estimated values of Ncores and number of operations be subtracted from the readout outputs if one wants to get the equivalent to Eq. [ 2 ], although the step is unnecessary if one only wishes to compare output magnitudes (as we implicitly do in order to find the maximal output). 0.4 V r S s) pe tion J m ifica 3 05 ss 0. cla 0 (1 0.2 0 0 2500 5000 number of SVs 7500 Figure 6. Simulation of a digital support vector machine. a Scaling of the energy with the number of classes The estimation was based on the energy cost of the simulated classifications of the MNIST dataset, and extrapolated to the designs required by an increasing number of classes. As the Number of operations (black circles, left ordinate) and runtime (blue dots, right ordinate) required by a digital SVM to classify 10 test patterns from the MNIST dataset, as a function of the number of support vectors. The SVM performance was estimated with a simulator of the Intel i7 processor. b Energy consumption associated to the datapoints shown in a (squares). The straight line is a least-square fit. 9 b MNIST 100 network chip 60 libsvm SVCperf 80 primalSVC 0.1 1 10 average energy consumption (mJ) 100 performance (%) performance (%) a MNIST- back-image 75 network chip 25 libsvm SVCperf 50 primalSVC 0.1 1 10 average energy consumption (mJ) Figure 7. Performance versus energy consumption at a fixed classification time. Panels are like in Figs. 3b,d, classification time is now fixed at 500 ms, rather than determined by a stopping criterion. nsp , it is straightforward to compute the energy consumption according to the values given in the previous paragraph. Energy consumption in von Neumann digital machines Configuration The runtime and power of microprocessors with von Neumann architectures were estimated with the recently developed simulators GEM5 (gem5.opt 2.0) [47] and McPAT (ver. 1.2) [48]. For the estimation we used an architecture configuration similar to that of the recent Intel CoreTM i7 processors [49], which incorporate state-of-the-art CMOS technology. Specifically, we used an x86 64, O3, single core architecture at 2.66 GHz clock frequency, with 32KB 8-way L1-i and 32KB 8-way L1-d caches, 256KB 8-way L2 cache, 64B cache line size, and 8GB DDR3 1600 DRAM. Channel length was 22 nm, HP type, using long channel if appropriate. VDD was 0.9V, so slightly higher than the 0.775 V used for the IBM chip. However, could we use the same voltage in Intel i7 simulator, the energy consumption would be lower by a factor (0.775/0.9)2 = 0.74. This 26% reduction would not change the main conclusions about the energy consumption gap between the IBM chip and the conventional von Neumann digital machines, which is 2–3 orders of magnitude. Simulations The benchmark was the test phase of the SVMs, already trained. Simulations showed that a modern microprocessor based on a von-Neumann architecture takes 115.5 ms to evaluate the test set with 8087 SVs, while consuming 424.6 mJ (DRAM energy consumption not included). When we varied the number of support vectors from 9 to 8087, both the runtime and energy consumption grew proportionally to the number of SVs, while the power was roughly constant due to the fixed hardware configuration (see Fig 6). To estimate how the energy used by von Neumann digital SVMs scales with the number of classes, we ran another set of simulations with Intel i7 simulator, this time varying both the number of support vectors and the number of classes in the classification problem. This step was necessary to determine the overhead incurred when we increase the number of output units. For a given number of classes, the energy cost per support vector was estimated from the least-square fit of the energies against the number of support vectors. Mobile processor We also investigated the runtime and energy consumption of a more energy-efficient but slower 10 mobile microprocessor performing the same target workload. The architecture configuration was: ARMv7, O3, single core, 1GHz CPU clock frequency, 32kB 4-way L1i and 32kB 4-way L1d caches, and 128kB 8-way L2 cache, which is similar to the architecture of ARM Cortex-A9 [50]. The technology node (22 nm) and simulators were the same as in the experiment with the microprocessor mimicking Intel Core i7. For the benchmark code with the largest number of SVs, the task required 1.2 · 1010 operations that took 6.35 s at a cost of 7.34 J. Discussion on Intel Xeon Phi Massively parallel architectures have gained a significant amount of attention to improve the throughput and power efficiency of the highperformance computing (HPC) technology, in response to the relatively stagnated improvement in clock frequency. The Xeon Phi coprocessor, recently developed by Intel, is one of such efforts [51]. It integrates more than 50 CPU cores together with L1/L2 caches, network-on-chips, GDDR memory controller, and PCIe interface. Each core supports up-to 4thread in-order operation and the 512b SIMD VPU (Vector processing unit). While the runtime and energy-consumption of the coprocessor are highly dependent on the target workloads, several recent investigations quantified the performance and energy-efficiency. In the high-performance configuration, the system integrating Xeon and Xeon Phi shows the throughput of 100 Tera floating-point operations (flop) per second, the power consumption of 72.9 kW, marking the energy efficiency of 0.74 nJ/flop [51]. The classification benchmark codes (with the largest number of SVs) require 0.02235 Gigaflop on the desktop processor configuration similar to Intel Core i7. At a first order approximation, therefore, the Xeon and Xeon Phi-based system takes 0.2235 µs and uses 16.5 mJ per classification. This energy consumption seems significantly lower than the one of the Intel Core i7, and very close to its lower bound, which is approximately 3 mJ. However, one should keep in mind that the energy is grossly underestimated, as not only we ignored the energy needed for the RAM, but we also neglected the cost of the non floating point operations, which are approximately twice as many as the floating point operations. For all these reasons it is difficult to compare the energy consumption for the Xean Phi to the Intel Core i7. In any case, even for our very conservative energy consumption estimate, the IBM chip remains significantly more energy efficient. 1. Mead C (1989) Analog VLSI implementation of neural systems (Addison Wesley Publishing Company). 2. Indiveri G, et al. (2011) Neuromorphic silicon neuron circuits. Front. Neurosci. 5. 3. Livi P, Indiveri G (2009) A current-mode conductance-based silicon neuron for address-event neuromorphic systems pp 2898–2901. 4. Rangan V, Ghosh A, Aparin V, Cauwenberghs G (2010) A subthreshold aVLSI implementation of the Izhikevich simple neuron model pp 4164–4167. 5. Chicca E, Stefanini F, Indiveri G (2014) Neuromorphic electronic circuits for building autonomous cognitive systems. Proceedings of the IEEE PP:1–22. 6. Merolla PA, et al. (2014) A million spiking-neuron integrated circuit with a scalable communication network and interface. Science 345:668–673. 7. Jaeger H, Haas H (2004) Harnessing nonlinearity: predicting chaotic systems and saving energy in wireless communication. Science 304:78–80. 8. Buonomano DV, Maass W (2009) State-dependent computations: spatiotemporal processing in cortical networks. Nat Rev Neurosci 10:113–125. 9. Barak O, Rigotti M, Fusi S (2013) The sparseness of mixed selectivity neurons controls the generalization–discrimination trade-off. J. Neurosci. 33:3844–3856. 10. Arthur JV, et al. (2012) Building block of a programmable neuromorphic substrate: A digital neurosynaptic core (IEEE), pp 1–8. 11. Eliasmith C, et al. (2012) A large-scale model of the functioning brain. Science 338:1202–1205. 12. Fusi S, Mattia M (1999) Collective behavior of networks with linear (VLSI) integrate-and-fire neurons. Neural Comput. 11:633–652. 13. Sompolinsky H (1986) Neural networks with non-linear synapses and static noise. Phys. Rev. A 34:2571. 14. Amit DJ, Fusi S (1994) Learning in neural networks with material synapses. Neural Computation 6:957–982. 15. Fusi S (2002) Hebbian spike-driven synaptic plasticity for learning patterns of mean firing rates. Biological cybernetics 87:459–470. 16. Garey MR, Johnson DS (1979) Computers and intractability: a guide to NP-completeness (WH Freeman New York). 17. Goodfellow I, Warde-farley D, Mirza M, Courville A, Bengio Y (2013) Maxout Networks pp 1319–1327. 18. Cho Y, Saul LK (2010) Large-margin classification in infinite neural networks. Neural Comput. 22:2678–2697. 19. Sohn K, Zhou G, Lee C, Lee H (2013) Learning and Selecting Features Jointly with Point-wise Gated Boltzmann Machines pp 217–225. 20. Lan G, Sartori P, Neumann S, Sourjik V, Tu Y (2012) The energy-speed-accuracy trade-off in sensory adaptation. Nature physics 8:422–428. 21. Tang H, et al. (2014) Spatiotemporal dynamics underlying object completion in human ventral visual cortex. Neuron 83:736–748. 22. Boser BE, Guyon IM, Vapnik VN (1992) A training algorithm for optimal margin classifiers (ACM), pp 144–152. 23. Cortes C, Vapnik V (1995) Support-vector networks. Mach. Learn. 20:273–297. 24. Vapnik V, Golowich SE, Smola A (1997) Support vector method for function approximation, regression estimation, and signal processing pp 281–287. 25. Steinwart I, Christmann A (2008) Support vector machines (Springer). 26. Rahimi A, Recht B (2008) Weighted sums of random kitchen sinks: Replacing minimization with randomization in learning pp 1313–1320. 27. Le Q, Sarlós T, Smola A (2013) Fastfoodapproximating kernel expansions in loglinear time. 28. Hasler J, Marr B (2013) Finding a roadmap to achieve large neuromorphic hardware systems. Front. Neurosci. 7. 29. Arthur JV, Boahen K (2011) Silicon-neuron design: A dynamical systems approach. Circuits and Systems I: Regular Papers, IEEE Transactions on 58:1034–1043. 30. Han J, Orshansky M (2013) Approximate computing: An emerging paradigm for energyefficient design (IEEE), pp 1–6. 31. Krizhevsky A, Sutskever I, Hinton GE (2012) ImageNet classification with deep convolutional neural networks pp 1097–1105. 32. Deng L, Hinton G, Kingsbury B (2013) New types of deep neural network learning for speech recognition and related applications: An overview (IEEE), pp 8599–8603. 33. Mitra S, Fusi S, Indiveri G (2009) Real-time classification of complex patterns using spikebased learning in neuromorphic vlsi. Biomedical Circuits and Systems, IEEE Transactions on 3:32–42. 34. Giulioni M, et al. (2011) Robust working memory in an asynchronously spiking neural network realized with neuromorphic vlsi. Frontiers in neuroscience 5. 35. Arthur J, Boahen K (2006) Learning in silicon: timing is everything. Advances in neural information processing systems 18:75. 36. LeCun Y, Bottou L, Bengio Y, Haffner P (1998) Gradient-based learning applied to document recognition. Proc. IEEE 86:2278–2324. 37. Larochelle H, Erhan D, Courville A, Bergstra J, Bengio Y (2007) An empirical evaluation of deep architectures on problems with many factors of variation, ICML ’07 (ACM, New York, NY, USA), pp 473–480. 38. Amit Y, Geman D (1997) Shape quantization and recognition with randomized trees. Neural Comput. 9:1545–1588. 39. Amit Y (2002) 2D Object Detection and Recognition: Models, Algorithms, and Networks (MIT Press). 40. Raiko T, Valpola H, LeCun Y (2012) Deep Learning Made Easier by Linear Transformations in Perceptrons Vol. 22, pp 924–932. 41. Huang GB, Zhu QY, Siew CK (2006) Extreme learning machine: theory and applications. Neurocomputing 70:489–501. 42. Tapson J, van Schaik A (2013) Learning the pseudoinverse solution to network weights. Neural Netw. 45:94–100. 43. Merolla P, et al. (2011) A digital neurosynaptic core using embedded crossbar memory with 45pJ per spike in 45nm (IEEE), pp 1–4. 44. Chang CC, Lin CJ (2011) LIBSVM: A library for support vector machines. ACM T. Intel. Sys. Techn. 2:27:1–27:27 Software available at http://www.csie.ntu.edu.tw/~cjlin/libsvm. 45. Keerthi SS, Chapelle O, DeCoste D (2006) Building support vector machines with reduced classifier complexity. J. Mach. Learn. Res. 7:1493–1515. 46. Joachims T, Yu CN (2009) Sparse kernel SVMs via cutting-plane training. Mach. Learn. 76:179–193. 47. Binkert N, et al. (2011) The GEM5 simulator. ACM SIGARCH Computer Architecture News 39:1–7. 48. Li S, et al. (2009) McPAT: an integrated power, area, and timing modeling framework for multicore and manycore architectures (IEEE), pp 469–480. 49. (2014) Intel core i7 processor., Technical report http://www.intel.com/content/www/us/en/ processors/core- i7- processor.html. 50. (2014) Arm cortex-a9., Technical report http://www.arm.com/products/processors/cortex-a/ cortex- a9.php. 51. Chrysos G, Engineer SP (2012) Intel Xeon Phi coprocessor (codename knights corner). 11
9cs.NE
arXiv:1610.04920v1 [math.GT] 16 Oct 2016 ON THE MONODROMY GROUP OF THE FAMILY OF SMOOTH PLANE CURVES NICK SALTER Abstract. We consider the space Pd of smooth complex projective plane curves of degree d. There is the tautological family of plane curves defined over Pd , and hence there is a monodromy representation ρd : π1 (Pd ) → Mod(Σg ) into the mapping class group of the fiber. We show two results concerning the image of ρd . First, we show that the presence of an invariant known as a “n-spin structure” constrains the image in ways not predicted by previous work of Beauville [Bea86]. Second, we show that for d = 5, our invariant is the only obstruction for a mapping class to be contained in the image. This requires combining the algebro-geometric work of Lönne [Lön09] with Johnson’s theory [Joh83] of the Torelli subgroup of Mod(Σg ). 1. Introduction Let Pd denote the moduli space of smooth degree-d plane curves.1 The tautological family of plane curves over Pd determines a monodromy representation ρd : π1 (Pd ) → Mod(Σg ),  d−1 2 where g = and Mod(Σg ) is the mapping class group of the surface Σg of genus g. This note concerns the the problem of computing the image of ρd . The first step towards determining the image of ρd has been carried out by A. Beauville in [Bea86], building off of earlier work of W. Janssen [Jan83] and S. Chmutov [Chm82]. Let Ψ : Mod(Σg ) → Sp2g (Z) denote the symplectic representation on H1 (Σg ; Z). Beauville has determined Ψ ◦ ρd ; he shows that for d even it is a surjection, while for d odd it is the (finiteindex) stabilizer of a certain spin structure. A priori, it is therefore possible that ρd could surject onto Mod(Σg ) or a spin mapping class group, depending on the parity of d. The first theorem of the present paper is that in general, this does not happen. We show that a so-called n-spin structure provides an obstruction for f ∈ Mod(Σg ) to be contained in Im(ρd ), and that this obstruction is not detectable on the level of homology, i.e. that Beauville’s “upper bound” on Im(ρd ) is not sharp. Theorem A. For all d ≥ 4, there is a finite-index subgroup Mod(Σg )[φd ] ≤ Mod(Σg ) for which Im(ρd ) ⊆ Mod(Σg )[φd ]. Date: October 16, 2016. 1See Section 2.1 for a review of these algebro-geometric notions. 1 2 NICK SALTER For d ≥ 6, the containment Mod(Σg )[φd ] $ Ψ−1 (Ψ(Mod(Σg )[φd ])) is strict. Consequently, for d ≥ 6, the same is true for Im(ρd ): Im(ρd ) $ Ψ−1 (Ψ(Im(ρd ))). In the statement of the theorem, φd is a cohomology class in H 1 (T ∗,1 Σg ; Z/(d − 3)Z), where T ∗,1 Σg denotes the unit cotangent bundle of Σg , and Mod(Σg )[φd ] denotes the stabilizer of φd in the natural action of Mod(Σg ) on H 1 (Σg ; Z/(d − 3)Z). The class φd is an instance of an n-spin structure for n = d − 3, and is constructed in a natural way from a (d − 3)rd root of the canonical bundle of a plane curve. Such objects, and the subgroups of Mod(Σg ) fixing the set of all n-spin structures, were studied by P. Sipe [Sip82, Sip86]. Theorem A will be proved by giving a construction of φd that makes the invariance of φd under Im(ρd ) transparent. Using a topological interpretation of n-spin structures based on the work of S. Humphries-D. Johnson [HJ89], it will then be possible to see how the invariance of φd provides a strictly stronger constraint on Im(ρd ) than that of Beauville. The second half of the paper concerns the problem of determining sufficient conditions for an element f ∈ Mod(Σg ) to be contained in Im(ρd ). Theorem B. For d = 5, there is an equality Im(ρ5 ) = Mod(Σ6 )[φ5 ]. Here φ5 ∈ H 1 (T ∗,1 Σ6 ; Z/2Z) is a (classical) spin structure of odd parity, and Mod(Σ6 )[φ5 ] denotes its stabilizer within Mod(Σ6 ). Analogous theorems hold for d = 3, 4 as well. The case d = 3 (where g = 1) follows immediately from Beauville’s computation, in light of the fact that Ψ is an isomorphism Ψ : Mod(Σ1 ) → SL2 (Z) for g = 1. This case is also closely related to the work of I. Dolgachev - A. Libgober [DL81]. The case d = 4 (asserting the surjectivity Im(ρ4 ) = Mod(Σ3 )) was established by Y. Kuno [Kun08]. Kuno’s methods are very different from those of the present paper, and make essential use of the fact that the generic curve of genus 3 is a plane curve of degree 4. Theorem B thus treats the first case where planarity is an exceptional property for a curve to possess, and shows that despite this, the monodromy of the family of plane curves of degree 5 is still very large. Theorem B is obtained by a novel combination of techniques from algebraic geometry and the theory of the mapping class group. The starting point is Beauville’s work, which allows one to restrict attention to Im(ρ5 ) ∩ I6 , where I6 is the Torelli group.2 The bridge between algebraic geometry and mapping class groups arises from the work of M. Lönne [Lön09]. The main theorem of [Lön09] gives an explicit presentation for the fundamental group of the space Pn,d of smooth hypersurfaces in CP n of degree d. Picard-Lefschetz theory 2See Section 4.3 for the definition of the Torelli group. MONODROMY OF PLANE CURVES 3 allows one to recognize Lönne’s generators as Dehn twists. Theorem B is then proved by carrying out a careful examination of the configuration of vanishing cycles as simple closed curves on a surface of genus 6. This analysis is used to exhibit the elements of Johnson’s generating set for the Torelli group inside Im(ρ5 ). In genus 6, Johnson’s generating set has 4470 elements. In order to make this computation tractable, we find a new relation in Mod(Σg ) known as the “genus-g star relation”. Using this, we reduce the problem to eight easily-verified cases. An implicit corollary of the proof is a determination of a simple finite set of Dehn twist generators for the spin mapping class group Mod(Σ6 )[φ5 ]. An alternative set of generators was obtained by Hirose [Hir05, Theorem 6.1]. Outline. Section 2 is devoted to the construction of φd . In Section 3, we recall some work of S. Humphries and D. Johnson that relates H 1 (T ∗,1 Σg ; V ) for an abelian group V to the notion of a “generalized winding number function”. We will use this perspective to show that the invariance of φd under Im(ρd ) provides an obstruction to the surjectivity of ρd . The proof of Theorem B is carried out in sections 4 through 7. Section 4 collects a number of results from the theory of mapping class groups. Section 5 recalls Lönne’s presentation and establishes some first properties of Im(ρd ). Section 6 continues the analysis of Im(ρd ). Finally Section 7 collects these results together to prove Theorem B. Acknowledgements. The author would like to thank Dan Margalit for a series of valuable discussions concerning this work. He would also like to thank Benson Farb for alerting him to Lönne’s work and for extensive comments on drafts of this paper, as well as ongoing support in his role as advisor. 2. nth roots of the canonical bundle and generalized spin structures 2.1. Plane curves and Pd . By definition, a (projective) plane curve of degree d is the vanishing locus V (f ) in CP 2 of a nonzero homogeneous polynomial f (x, y, z) of degree d. The space  of all plane curves is identified with CP N , where N = d+2 − 1. A plane curve X of degree d 2  is smooth if X ∼ , and otherwise X is said to be singular. = Σg with g = d−1 2 We define the discriminant as the set Dd = {f ∈ CP N | V (f ) is singular.}. The discriminant Dd is the vanishing locus of a polynomial pd known as the discriminant polynomial, and is therefore a hypersurface in CP N . The space of smooth plane curves is then defined as Pd = CP N \ Dd . The universal family of plane curves is the space Xd ⊂ Pd × CP2 defined via Xd = {(f, [x : y : z]) ∈ Pd × CP2 | f (x, y, z) = 0}. 4 NICK SALTER The projection π : Xd → Pd is the projection map for a C ∞ fiber bundle structure on Xd with fibers diffeomorphic to Σg . 2.2. n-spin structures. Let X be a smooth projective algebraic curve over C and let K ∈ Pic(X) denote the canonical bundle.3 Recall that a spin structure on X is an element L ∈ Pic(X) satisfying L⊗2 = K. This admits an obvious generalization. Definition 2.1. An n-spin structure is a line bundle L ∈ Pic(X) satisfying L⊗n = K. Let T ∗,1 X denote the unit cotangent bundle of X, relative to an arbitrary Riemannian metric on X. Just as ordinary spin structures are closely related to H 1 (T ∗,1 X; Z/2Z), there is an analogous picture of n-spin structures. Proposition 2.2. Let L be an n-spin structure on X. Associated to L are ∗,1 X → T ∗,1 X with deck group Z/nZ, and (1) a regular n-sheeted covering space T^ (2) a cohomology class φL ∈ H 1 (T ∗,1 X; Z/nZ) restricting to a generator of the cohomology H 1 (S 1 ; Z/nZ) of the fiber of T ∗,1 X → X. Proof. In view of the equality L⊗n = K in Pic(X), taking nth powers in the fiber induces a map µ : L → K. Let L◦ denote the complement of the zero section in L, and define K ◦ similarly. Then µ : L◦ → K ◦ is an n-sheeted covering space with deck group Z/nZ induced from the ∗,1 X → T ∗,1 X is obtained multiplicative action of the nth roots of unity. The covering space T^ from L◦ → K ◦ by restriction. ∗,1 X → T ∗,1 X is a regular cover with deck group Z/nZ, the Galois correspondence for As T^ ∗,1 X is associated to some homomorphism φ : π (T ∗,1 X) → covering spaces asserts that T^ L 1 Z/nZ. This gives rise to a class, also denoted φL , in H 1 (T 1,∗ X; Z/nZ). On a given fiber of ∗,1 X → T ∗,1 X restricts to an n-sheeted cover S 1 → S 1 ; this proves T ∗,1 X → X, the covering T^ the assertion concerning the restriction of φL to H 1 (S 1 ; Z/nZ).  Our interest in n-spin structures arises from the fact that degree-d plane curves are equipped with a canonical (d − 3)-spin structure. Fact 2.3. Let X be a smooth degree-d plane curve, d ≥ 3. The canonical bundle K ∈ Pic(X) is induced from the restriction of O(d − 3) ∈ Pic(CP2 ). Consequently, O(1) determines a (d − 3)-spin structure on X for d ≥ 4. Let ̟ : Xd → CP2 denote the projection onto the second factor. Then ̟∗ (O(d − 3)) ∈ Pic(Xd ) restricts to the canonical bundle on each fiber, and ̟∗ (O(1)) determines a (d − 3)-spin structure. Let T ∗,1 Xd denote the S 1 -bundle over Xd for which the fiber over x ∈ X consists of the unit cotangent vectors Tx∗,1 X. 3Recall that the canonical bundle is the line bundle whose underlying R2 bundle is T ∗ X, the cotangent bundle. MONODROMY OF PLANE CURVES 5 Definition 2.4. The cohomology class φd ∈ H 1 (T ∗,1 Xd ; Z/(d − 3)Z) is obtained by applying the construction of Proposition 2.2 to the pair of line bundles ̟∗ (O(1)), ̟∗ (O(d − 3)) ∈ Pic(Xd ). 3. Generalized winding numbers and obstructions to surjectivity In this section, we show that the existence of φd gives rise to an obstruction for a mapping class f ∈ Mod(Σg ) to be contained in Im(ρd ). For any system of coefficients V , there is a natural action of Mod(Σg ) on H 1 (T ∗,1 Σg ; V ) which extends the action of Mod(Σg ) on H 1 (Σg ; V ) via Ψ. To prove Theorem A, it therefore suffices to show that the stabilizer Mod(Σg )[φd ] of each nonzero element of H 1 (T ∗,1 Σg ; Z/(d − 3)Z) is not the full group Ψ−1 (Ψ(Im(ρd ))). The natural setting for what follows is in the unit tangent bundle of a surface, which we write T 1 Σ. Of course, a choice of Riemannian metric on Σ identifies T 1 Σ with T ∗,1 Σ, and a choice of metric in each fiber identifies T ∗,1 Xd with the “vertical unit tangent bundle” T 1 Xd ; we will make no further comment on these matters. The basis for our approach is the work of Humphries-Johnson [HJ89], which gives an interpretation of H 1 (T 1 Σg ; V ) as the space of “V -valued generalized winding number functions”. A basic notion here is that of a Johnson lift. For our purposes, a simple closed curve is a C 1 -embedded S 1 -submanifold. Definition 3.1. Let a be a simple closed curve on the surface Σ given by a unit-speed C 1 embedding a : S 1 → Σ. A choice of orientation on S 1 induces an orientation on a, as well as providing a coherent identification Tx1 S 1 = {−1, 1} for each x ∈ S 1 . The Johnson lift of a, written ~a, is the map ~a : S 1 → T 1 Σ given by ~a(t) = (a(t), Dt a(1)). That is, the Johnson lift of a is simply the curve in T 1 Σ induced from a by tracking the tangent vector. The Johnson lift allows for the evaluation of elements of H 1 (T 1 Σ; V ) on simple closed curves. Let Σ be a surface, V an abelian group, and α ∈ H 1 (T 1 Σ; V ) a cohomology class. Let a be a simple closed curve. By an abuse of notation, we write α(a) for the evaluation of α on the 1-cycle determined by the Johnson lift ~a. In this context we call α a “generalized winding number function”.4 In [HJ89], it is shown that this pairing satisfies the following properties: Theorem 3.2 (Humphries-Johnson). (i) The evaluation α(a) ∈ V is well-defined on the isotopy class of a. 4The terminology “generalized winding number” is inspired by the fact that the twist-linearity property was first encountered in the context of computing winding numbers of curves on surfaces relative to a vector field. 6 NICK SALTER (ii) (Twist-linearity) If b is another simple closed curve and Tb denotes the Dehn twist about b, then α is “twist-linear” in the following sense: α(Tb (a)) = α(a) + ha, biα(b), (1) where ha, bi denotes the algebraic intersection pairing. (iii) Let ζ be a curve enclosing a small null-homotopic disk on Σ, and let S ⊂ Σ be a subsurface with boundary components b1 , . . . , bk . If each bi is oriented so that S is on the left and ζ is oriented similarly, then α(b1 ) + · · · + α(bk ) = χ(S)α(ζ), (2) where χ(S) is the Euler characteristic of S. Remark 3.3. Humprhies-Johnson in fact establish much more: they show that every V -valued twist-linear function arises as a class α ∈ H 1 (T 1 Σ; V ). For what follows we only need the results of Theorem 3.2. Proof of Theorem A. Consider the class φd ∈ H 1 (T ∗,1 Xd ; Z/(d − 3)Z). The above discussion implies that on a given fiber X of Xd → Pd , the restriction of φd determines a generalized winding number function; we write αd ∈ H 1 (T 1 X; Z/(d−3)Z) for this class. Since αd is induced from the globally-defined form φd , it follows that αd is monodromy-invariant: if f ∈ Im(ρd ), then for any simple closed curve a on X, the equation αd (f (a)) = αd (a) (3) must hold. Consequently, Im(ρd ) ⊆ Mod(Σg )[φd ] as claimed. We wish to exhibit a nonseparating simple closed curve b for which αd (b) 6= 0. Given such a b, there is another simple closed curve a satisfying ha, bi = 1. Then the twist-linearity condition (1) will show that αd (Tb (a)) = αd (a) + αd (b) 6= αd (a); this contradicts (3). It follows that the Dehn twist Tb for such a curve cannot be contained in Mod(Σg )[φd ]. In the case when d is even, when Ψ−1 (Ψ(Im(ρd ))) = Mod(Σg ), this will prove Theorem A. 1 ∗,1 For d odd, there is an additional complication. Here, the class d−3 Xd ; Z/2Z) 2 φd ∈ H (T determines an ordinary spin structure, and according to Beauville, the group Ψ(Mod(Σg )[φd ]) is the stabilizer of d−3 2 φd in Sp(2g, Z). We must therefore exhibit a curve b for which αd (b) is d−3 nonzero and 2 -torsion. Equation (1) shows that such a curve does stabilize the spin structure d−3 2 φd , but not the refinement to a (d − 3)-spin structure φd . It remains to exhibit a suitable curve b. It follows easily from the twist-linearity condition (1) that given any subsurface S ⊂ X of genus 1 with one boundary component, there is some (necessarily nonseparating) curve c contained in S with αd (c) = 0. Let S1 , S2 , S3 be a collection MONODROMY OF PLANE CURVES 7 of mutually-disjoint subsurfaces of genus 1 with one boundary component, and let c1 , c2 , c3 be curves satisfying αd (ci ) = 0, and for which ci is contained in Si (recall that d ≥ 6 and so the genus of X is g ≥ 10). Choose b disjoint from all ci so that the collection of curves b, c1 , c2 , c3 encloses a subsurface Σ homeomorphic to a sphere with 4 boundary components. From (2) and the construction of the ci , it follows that when b is suitably oriented, it satisfies αd (b) = χ(Σ)αd (ζ) = −2αd (ζ). Recall that by Proposition 2.2.2, the element αd (ζ) ∈ Z/(d − 3)Z is primitive. Thus αd (b) 6= 0 for any d, but is d−3  2 -torsion when d is odd, as required. 4. Results from the theory of the mapping class group We turn now to the proof of Theorem B. From this section onwards, we adopt the conventions and notations of the reference [FM12]. In particular, the left-handed Dehn twist about a curve c is written Tc , and the geometric intersection number between curves a, b is written i(a, b). We pause briefly to establish some further conventions. We will often refer to a simple closed curve as simply a “curve”, and will often confuse the distinction between a curve and its isotopy class. Unless otherwise specified, we will assume that all intersections between curves are essential. 4.1. The change-of-coordinates principle. The change-of-coordinates principle roughly asserts that if two configurations of simple closed curves and arcs on a surface have the same intersection pattern, then there is a homeomorphism taking one configuration to the other. There are many variants of the change-of-coordinates principle, all based on the classification of surfaces. See the discussion in [FM12, Section 1.3.2]. Basic principle. Suppose c1 , . . . , cn and d1 , . . . , dn are configurations of curves on a surface S all meeting transversely. The surface S \ {ci } has a labeling on segments of its boundary, corresponding to the segments of the curves ci from which the boundary component arises. Suppose there is a homeomorphism f : S \ {ci } → S \ {di } taking every boundary segment labeled by ci to the corresponding di segment. Then f can be extended to a homeomorphsim f : S → S taking the configuration ci to di . We illustrate this in the case of chains. Definition 4.1. Let S be a surface. A chain on S of length k is a collection of curves (c1 , . . . , ck ) for which the geometric intersection number i(ci , cj ) is 1 if |i − j| = 1 and 0 otherwise. If C = (c1 , . . . , ck ) is a chain, the boundary of C, written ∂C, is defined to be the boundary of a small regular neighborhood of c1 ∪ · · · ∪ ck . When k is even, ∂C is a single (necessarily separating) curve, and when k is odd, ∂C = d1 ∪ d2 consists of two curves d1 , d2 whose union separates S. 8 NICK SALTER Lemma 4.2 (Change-of-coordinates for chains). Let (c1 , . . . , ck ) and (d1 , . . . , dk ) be chains of even length k on a surface S. Then there is a homeomorphism f : S → S for which f (ci ) = di , 1 ≤ i ≤ k. Proof. See [FM12, Section 1.3.2].  4.2. Some relations in the mapping class group. Proposition 4.3 (Braid relation). Let S be a surface, and a, b curves on S satisfying i(a, b) = 1. Then Ta Tb Ta = Tb Ta Tb . (4) On the level of curves, Ta Tb (a) = b. Any such a, b are necessarily non-separating. Conversely, if a, b are curves on S in distinct isotopy classes that satisfy the braid relation (4), then i(a, b) = 1. Proof. See [FM12, Proposition 3.11] for the proof of the first assertion, and [FM12, Proposition 3.13] for the second.  The chain relation. The chain relation relates Dehn twists about curves in a chain to Dehn twists around the boundary. We will require a slightly less well-known form of the chain relation for chains of odd length; see [FM12, Section 4.4.1] for details. Proposition 4.4 (Chain relation). Let C = (c1 , . . . , ck ) be a chain with k odd. Let d1 , d2 denote the components of ∂C. Then the following relation holds: (Tc21 Tc2 . . . Tck )k = Td1 Td2 . The genus-g star relation. We will also need to make use of a novel relation generalizing the star relation (setting g = 1 below recovers the classical star relation). Proposition 4.5 (Genus-g star relation). With reference to the curves a1 , a2 , c1 , . . . , c2g , d1 , d2 , d3 on the surface Σg,3 of Figure 1, the following relation holds in Mod(Σg,3 ): (Ta1 Ta2 Tc1 . . . Tc2g )2g+1 = Tdg1 Td2 Td3 . (5) Proof. We will derive the genus-g star relation from a more transparent relation in a braid group. Figure 1 depicts a 2 : 1 covering Σg,3 → Σ0,2 ramified at 2g + 1 points. Number the ramification points clockwise p1 , . . . , p2g+1 , and consider the mapping class group Mod(Σ0,2,2g+1 ) relative to these points. Under the covering, the double-twist Tδ21 lifts to Td1 ∈ Mod(Σg,3 ), and the twist Tδ2 lifts to Td2 Td3 . The twist Tα lifts to Ta1 Ta2 , and the half-twist σi lifts to Tci . Let f ∈ MONODROMY OF PLANE CURVES 9 δ2 p1 a1 d1 c1 c2 d2 p2g+1 c2g−1 p2 α c2g σ2 δ1 a2 d3 Figure 1. The genus-g star relation. Mod(Σ0,2,2g+1 ) be the push map moving each pi clockwise to pi+1 , with subscripts interpreted mod 2g + 1. One verifies the equality . f = Tα σ1 . . . σ2g Tδ−1 1 It follows that −(2g+1) f 2g+1 = (Tα σ1 . . . σ2g )2g+1 Tδ1 , since Tδ1 is central. As f 2g+1 is the push map around the core of the annulus, there is an equality Tδ2 . f 2g+1 = Tδ−1 1 Combining these results, = (Tα σ1 . . . σ2g )2g+1 . Tδ2 Tδ2g 1 (6) Under the lifting described above, the relation (6) in Mod(Σ0,2,2g+1 ) lifts to the relation (5) in Mod(Σg,3 ).  4.3. The Johnson generating set for Ig . There is a natural map Ψ : Mod(Σg ) → Sp2g (Z) taking a mapping class f to the induced automorphism f∗ of H1 (Σg ; Z). The Torelli group Ig is defined to be the kernel of this map: Ig = ker(Ψ). In [Joh83], Johnson produced a finite set of generators for Ig , for all g ≥ 3. Elements of this generating set are known as chain maps. Let C = (c1 , . . . , ck ) be a chain of odd length with boundary ∂C = d1 ∪ d2 . There are exactly two ways to orient the collection of curves c1 , . . . , ck in such a way that the algebraic intersection number ci · ci+1 = +1. Relative to such a choice, , where d1 is distinguished as the chain map associated to C is then the mapping class Td1 Td−1 2 10 NICK SALTER −1 is the boundary component to the left of the curves c1 , c3 , . . . , ck . The mapping class Td1 Td−2 also called the bounding pair map for d1 , d2 . While a complete description of Johnson’s generating set is quite tidy and elegant, it has the disadvantage of requiring several preliminary notions before it can be stated. We therefore content ourselves with a distillation of his work that is more immediately applicable to our situation. β c3 c1 c2g c2g−2 c6 c4 c2 c2g−1 c5 Figure 2. Curves involved in the Johnson generating set. Theorem 4.6 (Johnson). For g ≥ 3, let Γ ≤ Mod(Σg ) be a subgroup that contains the Dehn twists about the curves c1 , . . . , c2g shown in Figure 2. Suppose that Γ contains all chain maps for the odd-length chains of the form (c1 , . . . , ck ) and (β, c5 , . . . , ck ). Then Ig ≤ Γ. Proof. The interested reader should have no trouble deducing Theorem 4.6 from the Main Theorem and Lemma 1(f) of [Joh83].  5. The Lönne presentation In this section, we recall Lönne’s work [Lön09] computing π1 (Pd ), and apply this to derive some first properties of the monodromy map ρd : π1 (Pd ) → Mod(Σg ). 5.1. Picard-Lefschetz theory. Picard-Lefschetz theory concerns the problem of computing monodromies attached to singular points of holomorphic functions f : Cn → C. This then serves as the local theory underpinning more global monodromy computations. Our reference is [AGZV12]. Let U ⊂ C2 and V ⊂ C be open sets for which 0 ∈ V . Let f (u, v) : U → V be a holomorphic function. Suppose f has an isolated critical value at z = 0, and that there is a single corresponding critical point p ∈ C2 . Suppose that p is of Morse type in the sense that the Hessian ! ∂2f ∂2x ∂2f ∂y∂x is non-singular at p. ∂2f ∂x∂y ∂2f ∂2y MONODROMY OF PLANE CURVES 11 In such a situation, the fiber f −1 (z) for z 6= 0 is diffeomorphic to an open annulus. The core curve of such an annulus is called a vanishing cycle. Let γ be a small circle in C enclosing only the critical value at z = 0. Let z1 ∈ γ be a basepoint with corresponding core curve c ⊂ f −1 (z1 ). The Picard-Lefschetz theorem describes the monodromy obtained by traversing γ. Theorem 5.1 (Picard-Lefschetz for n = 2). With reference to the preceding discussion, the monodromy µ ∈ Mod(f −1 (z1 )) attached to traversing γ counter-clockwise is given by a righthanded Dehn twist about the vanishing cycle: µ = Tc−1 . More generally, let D∗ denote the punctured unit disk D∗ = {w ∈ C | 0 < |w| ≤ 1}, and write D = {w ∈ C | |w| ≤ 1} for the closed unit disk. Let f (x, y, z) be a homogeneous polynomial of degree d with the following properties: (1) For c ∈ D, the plane curve cz d − f (x, y, z) is singular only for c = 0. (2) The only critical point for f of the form (x, y, 0) is the point (0, 0, 0). (3) The function f (x, y, 1) has a single critical point of Morse type at (x, y) = (0, 0). In this setting, the local theory of Theorem 5.1 can be used to analyze the monodromy of the family E ⊂ D∗ × CP 2 = {(c, [x : y : z]) | cz d = f (x, y, z)} around the boundary ∂D∗ . Theorem 5.2 (Picard-Lefschetz for plane curve families). Let f ∈ CP N satisfy the properties (1), (2), (3) listed above. Let X = V (z d − f (x, y, z)) denote the fiber above 1 ∈ D∗ . Then there is a vanishing cycle c ⊂ X so that the monodromy µ ∈ Mod(X) obtained by traversing ∂D∗ counter-clockwise is given by a right-handed Dehn twist about the vanishing cycle: µ = Tc−1 . Proof. Condition (2) asserts that the monodromy can be computed by restricting attention to the affine subfamily obtained by setting z = 1. Define E ◦ ⊂ D∗ × C2 = {(c, x, y) | c = f (x, y, 1)}. Define U = {(x, y) ∈ C2 | |f (x, y, 1)| ≤ 1}, and consider f (x, y, 1) as a holomorphic function f : U → D. The monodromy of this family then corresponds to the monodromy of the original family E → D∗ . The result now follows from Condition (3) in combination with Theorem 5.1 as applied to f (x, y, 1).  12 NICK SALTER 5.2. Lönne’s theorem. There are some preliminary notions to establish before Lönne’s theorem can be stated. We begin by introducing the Lönne graphs Γd . Lönne obtains his presentation of π1 (Pd ) as a quotient a certain group constructed from Γd . Definition 5.3. [Lönne graph] Let d ≥ 3 be given. The Lönne graph Γd has vertex set Id = {(a, b) | 1 ≤ a, b ≤ d − 1}. Vertices (a1 , b1 ) and (a2 , b2 ) are connected by an edge if and only if both of the following conditions are met: (1) |a1 − a2 | ≤ 1 and |b1 − b2 | ≤ 1. (2) (a1 − a2 )(b1 − b2 ) ≤ 0. The set of edges of Γd is denoted Ed . Figure 3. The Lönne graph Γ5 . Vertices i, j, k ∈ Γd are said to form a triangle when i, j, k are mutually adjacent. The triangles in the Lönne graph are crucial to what follows. It will be necessary to endow them with orientations. Definition 5.4 (Orientation of triangles). Let i, j, k determine a triangle in Γd . (1) If i = (a, b), j = (a, b + 1), k = (a + 1, b), then the triangle i, j, k is positively-oriented by traversing the boundary clockwise. (2) If i = (a, b), j = (a, b + 1), k = (a − 1, b + 1), then the triangle i, j, k is positively-oriented by traversing the boundary counterclockwise. We say that the ordered triple (i, j, k) of vertices determining a triangle is positively-oriented if traversing the boundary from i to j to k agrees with the orientation specified above. Definition 5.5 (Artin group). Let Γ be a graph with vertex set V and edge set E. The Artin group A(Γ) is defined to be the group with generators σi , i ∈ V, subject to the following relations: MONODROMY OF PLANE CURVES 13 (1) σi σj = σj σi for all (i, j) 6∈ E. (2) σi σj σi = σj σi σj for all (i, j) ∈ E. Theorem 5.6 (Lönne). For d ≥ 3, the group π1 (Pd ) is isomorphic to a quotient of the Artin group A(Γd ), subject to the following additional relations: (3) σi σj σk σi = σj σk σi σj if (i, j, k) forms a positively-oriented triangle in Γd . (4) An additional family of relations Ri , i ∈ Id . e (5) An additional relation R. Remark 5.7. Define the group B(Γd ) as the quotient of the Artin group A(Γd ) by the family of relations (3) in Theorem 5.6. As our statement of Lönne’s theorem indicates, the additional relations will be of no use to us, and our theorem really concerns the lift of the monodromy representation ρ̃d : B(Γd ) → Mod(Σg ). For the analysis to follow, it is essential to understand the mapping classes ρd (σi ), i ∈ Id . Proposition 5.8. For each generator σi of Theorem 5.6, the image ρd (σi ) = Tc−1 i is a right-handed Dehn twist about some vanishing cycle ci on a fiber X ∈ Pd . Proof. The result will follow from Theorem 5.2, once certain aspects of Lönne’s proof are recalled. The generators σi of Theorem 5.6 correspond to specific loops in Pd known as geometric elements. Definition 5.9 (Geometric element). Let D = V (p) be a hypersurface in Cn defined by some polynomial p. An element x ∈ π1 (Cn \ D) that can be represented by a path isotopic to the e is a projective boundary of a small disk transversal to D is called a geometric element. If D n e is said to be a geometric element if it can be hypersurface, an element x ∈ π1 (CP \ D) represented by a geometric element in some affine chart. In Lönne’s terminology, the generators σi , i ∈ Id arise as a “Hefez-Lazzeri basis” - this will require some explanation. Consider the linearly-perturbed Fermat polynomial f (x, y, z) = xd + y d + νx xz d−1 + νy yz d−1 for well-chosen constants νx , νy . Such an f satisfies the conditions (1)-(3) of Theorem 5.2 near each critical point. Moreover, there is a bijection between the critical points of f (x, y, 1) and the set Id of Definition 5.3. If νx , νy are chosen carefully, each critical point lies above a distinct critical value - in this way we embed Id ⊂ C. Each c ∈ C determines a plane curve V (cz d − f ). The values of c for which V (cz d − f ) is not smooth are exactly the critical values of f (x, y, 1). The family H = {V (cz d − f ) | V (cz d − f ) is smooth} 14 NICK SALTER is a subfamily of Pd defined over C \ Id . The Hefez-Lazzeri basis {σi | i ∈ Id } is a carefullychosen set of paths in C \ Id with each σi encircling an individual i ∈ Id . Lönne shows that the inclusions of these paths into Pd via the family H generate π1 (Pd ). The result now follows from an application of Theorem 5.2.  5.3. First properties of ρd . Proposition 5.8 establishes the existence of a collection ci , i ∈ Id of vanishing cycles on X. In this section, we derive some basic topological properties of this must satisfy the relations (1)-(3) configuration arising from the fact that the Dehn twists Tc−1 i of Lönne’s presentation. Lemma 5.10. (1) (2) (3) (4) If the vertices vi , vj are adjacent, then the curves ci , cj satisfy i(ci , cj ) = 1. For d ≥ 4, the curves ci , i ∈ Id are pairwise distinct, and all ci are non-separating. If the vertices vi , vj in Γd are non-adjacent, then the curves ci and cj are disjoint. For d ≥ 4, if the vertices vi , vj , vk form a triangle in Γd , then the curves ci , cj , ck are supported on an essential subsurface5 Sijk ⊂ X homeomorphic to Σ1,2 . Moreover, if (ck )) = 0. the triangle determined by vi , vj , vk is positively oriented, then i(ci , Tc−1 j satisfy the braid and Tc−1 Proof. (1): If vi and vj are adjacent, then the Dehn twists Tc−1 j i relation. It follows from Proposition 4.3 that i(ci , cj ) = 1. (2): Suppose vi and vj are distinct vertices. For d ≥ 4, no two vertices have the same set of adjacent vertices, so that there is some vk adjacent to vi and not vj . By (1) above, it follows and Tc−1 do not, showing that the and Tc−1 satisfy the braid relation, while Tc−1 that Tc−1 j i k k isotopy classes of ci and cj are distinct. Since each ci satisfies a braid relation with some other cj , Proposition 4.3 shows that ci is non-separating. commute. According to and Tc−1 (3): If vi and vj are non-adjacent, then the Dehn twists Tc−1 j i [FM12, Section 3.5.2], this implies that either ci = cj or else ci and cj are disjoint. By (2), the former possibility cannot hold. (4): Via the change-of-coordinates principle, it can be checked that if ci , cj , ck are curves that pairwise intersect once, then ci ∪ cj ∪ ck is supported on an essential subsurface of the form (cj ). It Σ1,b for 1 ≤ b ≤ 3. In the case b = 1, the curve ck must be of the form ck = Tc±1 i follows that if d is a curve such that i(d, ck ) 6= 0, then at least one of i(d, ci ) and i(d, cj ) must also be nonzero. However, as d ≥ 4, there is always some vertex vl adjacent to exactly one of ci , cj , ck . The corresponding curve cl would violate the condition required of d above (possibly after permuting the indices i, j, k). 5A subsurface S ′ ⊂ S is essential if every component of ∂S ′ is not null-homotopic. MONODROMY OF PLANE CURVES 15 It remains to eliminate the possibility b = 3. In this case, the change-of-coordinates principle implies that up to homeomorphism, the curves ci , cj , ck must be arranged as in Figure 4. It can be checked directly (e.g. by examining the action on H1 (Σ1,3 )) that for this configuration, the relation Tc−1 Tc−1 Tc−1 = Tc−1 Tc−1 Tc−1 Tc−1 Tc−1 j i j i j i k k does not hold. This violates relation (3) in Lönne’s presentation of π1 (Pd ). We conclude that necessarily b = 2. (ck )) = 0 for a positivelyHaving shown that b = 2, it remains to show the condition i(ci , Tc−1 j oriented triangle. Let (x, y, z) denote a 3-chain on Σ1,2 . The change-of-coordinates principle implies that without loss of generality, ci = x, cj = y, and ck = Ty±1 (z). We wish to show that necessarily ck = Ty (z). It can be checked directly (e.g. by considering the action on H1 (Σ1,2 )) that only in the case ck = Ty (z) does relation (3) in the Lönne presentation hold.  Figure 4. Lemma 5.10.4: the configuration of ci , cj , ck in the b = 3 case. 6. Configurations of vanishing cycles The goal of this section is to derive an explicit picture of the configuration of vanishing cycles on a plane curve of degree 5. The main result of the section is Lemma 6.1. Lemma 6.1. There is a homeomorphism f : X → Σ6 such that with reference to Figure 5, (1) The curves c1 , . . . , c12 are vanishing cycles; that is, Tci ∈ Im(ρ5 ) for 1 ≤ i ≤ 12. The curves x, y, z are also vanishing cycles. (2) The curve b satisfies Tb2 ∈ Im(ρ5 ). Proof. Lemma 6.1 will be proved in three steps. Step 1: Uniqueness of Lönne configurations. 16 NICK SALTER x c6 b c5 c4 c2 c7 c3 c1 c8 z c13 c9 c12 c11 c10 y Figure 5. The curves of Lemma 6.1. The bottom halves of curves b, x, y, z, and ci for i odd have been omitted for clarity; on the bottom half, each curve follows its mirror image on the top. Lemma 6.2. Suppose d ≥ 5 is odd. Up to homeomorphism, there is a unique configuration of curves ci , i ∈ Id on Σg whose intersection pattern is prescribed by Γd and such that the twists satisfy the relations (1),(2),(3) given by Lönne’s presentation. Tc−1 i A configuration of curves ci , i ∈ Id as in Lemma 6.2 will be referred to as a Lönne configuration. Proof. Let a1,1 , . . . , ad−1,d−1 determine a Lönne configuration on Σg . We will exhibit a homeomorphism of Σg taking each ai,j to a corresponding bi,j in a “reference” configuration {bi,j } to be constructed in the course of the proof. This will require three steps. Step 1: A collection of disjoint chains. Each row in the Lönne graph determines a chain of length d − 1. The change of coordinates principle for chains of even length (Lemma 4.2) asserts that any two chains of length d − 1 are equivalent up to homeomorphism. Considering the odd-numbered rows of Γd , it follows that there is a homeomorphism f1 of Σg that takes each a2i−1,j for 1 ≤ i ≤ d − 1 to a curve b2i−1,j in a standard picture of a chain. We denote the subsurface of Σg determined by the chain a2i−1,1 , . . . , a2i−1,d−1 as Ai , and similarly we define the subsurfaces Bi of the reference configuration. Each Ai , Bi is homeomorphic to Σ(d−1)/2,1 . Step 2: Arcs on Ai . The next step is to show that up to homeomorphism, there is a unique S picture of what the intersection of the remaining curves a2i,j with Ai looks like. Consider a curve a2i,j . Up to isotopy, a2i,j intersects only the subsurfaces Ai and Ai+1 . We claim that MONODROMY OF PLANE CURVES 17 a2i,j can be isotoped so that its intersection with Ai is a single arc, and similarly for Ai+1 . If j = d − 1, then a2i,d−1 intersects only the curve a2i−1,d−1 , and i(a2i,d−1 , a2i−1,d−1 ) = 1. It follows that if a2i,d−1 ∩ Ai has multiple components, exactly one is essential, and the remaining components can be isotoped off of Ai . In the general case where a2i,j intersects both a2i−1,j and a2i−1,j+1 , an analogous argument shows that a2i,j ∩ Ai consists of one or two essential arcs. Consider the triangle in the Lönne graph determined by a2i,j , a2i−1,j , a2i−1,j+1 . According to Lemma 5.10.4, the union a2i,j ∪ a2i−1,j ∪ a2i−1,j+1 is supported on an essential subsurface of the form Σ1,2 . Figure 6 shows that if a2i,j ∩ Ai consists of two essential arcs, then a2i,j ∪ a2i−1,j ∪ a2i−1,j+1 is supported on an essential subsurface of the form Σ1,3 , in contradiction with Lemma 5.10.4. Similar arguments establish that a2i−2,j ∩ Ai is a single essential arc as well. Figure 6. If a2i,j cannot be isotoped onto a single arc inside Ai , then the curve enclosed by the inner strip (shaded) is essential in Σg , causing a2i,j ∪ a2i−1,j ∪ a2i−1,j+1 to be supported on a surface Σ1,3 . We next show that all points of intersection a2i,j ∩ a2i,j+1 can be isotoped to occur on both Ai and Ai+1 . This also follows from Lemma 5.10.4. If some point of intersection a2i,j ∩ a2i,j+1 could not be isotoped onto Ai , then the union a2i,j ∪ a2i,j+1 ∪ a2i−1,j+1 could not be supported on a subsurface homeomorphic to Σ1,2 . An analogous argument applies with Ai+1 in place of Ai . This is explained in Figure 7. Figure 7. If the intersection a2i,j ∩ a2i,j+1 cannot be isotoped to occur on Ai , then both curves indicated by the shaded regions are essential in Σg , causing a2i,j ∪ a2i,j+1 ∪ a2i−1,j+1 to be supported on a surface Σ1,3 . 18 NICK SALTER It follows from this analysis that all crossings between curves in row 2i can be isotoped to occur in a collar neighborhood of ∂Ai . We define A+ i to be a slight enlargement of Ai along such a neighborhood, so that all crossings between curves in row 2i occur in A+ i \ Ai . + We can now understand what the collection of arcs a2i,1 ∩ A+ , . . . , a ∩ A 2i,d−1 i i looks like. To begin with, the change-of-coordinates principle asserts that up to a homeomorphism of Ai fixing the curves {a2i−1,j }, the arc a2i,1 ∩ Ai can be drawn in one of two ways. The first possibility is shown in Figure 8(a), and the second is its mirror-image obtained by reflection through the plane of the page (i.e. the curve with the dotted and solid portions exchanged). In fact, a2i,1 ∩Ai must look as shown. This follows from Lemma 5.10.4. The vertices (a2i−1,1 , a2i−1,2 , a2i,1 ) form (a2i,1 )) = 0. This condition precludes the a positively-oriented triangle, and so i(a2i−1,1 , Ta−1 2i−1,2 other possibility. The pictures for a2i,2 , . . . , a2i,d−1 are obtained by proceeding inductively. In each case, there are exactly two ways to draw an arc satisfying the requisite intersection properties, and Lemma 5.10.4 precludes one of these possibilities. The result is shown in Figure 8(b). It remains to understand how the crossings between curves in row 2i are organized on A+ i . As shown, the arcs a2i,j ∩Ai and a2i,j+1 ∩Ai intersect ∂Ai twice each, and in both instances the intersections are adjacent relative to the other arcs. There are thus apparently two possibilities for where the crossing can occur. However, one can see from Figure 8(c) that once a choice is made for one crossing, this enforces choices for the remaining crossings. Moreover, the two apparently distinct configurations are in fact equivalent: the cyclic ordering of the arcs along ∂A+ i is the same in either case, and the combinatorial type of the cut-up surface A◦i := A+ i \ [ {ak,j | 2i − 1 ≤ k ≤ 2i, 1 ≤ j ≤ d − 1} is the same in either situation. The change-of-coordinates principle then asserts the existence of a homeomorphism of A+ i sending each a2i−1,j to itself, and taking one configuration of arcs to the other. Having seen that the arcs a2i,j ∩A+ i can be put into standard form, it remains to examine the + other collection of arcs on Ai , namely those of the form a2i−2,j . It is easy to see by induction on d that the cut-up surface A◦i is a union of polyhedral disks for which the edges correspond + to portions of the curves a2i−1,j , the arcs a2i,j ∩ A+ i , or else the boundary ∂Ai . It follows that the isotopy class of an arc a2i−2,j ∩ A+ I is uniquely determined by its intersection data with the curves a2i−1,j and a2i,j . For j ≥ 2, the curve a2i−2,j intersects a2i−1,j−1 and a2i−1,j , and is disjoint from all curves a2i,k . As a2i,j−1 has the same set of intersections as a2i−2,j , it follows that a2i−2,j ∩ A+ i must run parallel to a2i,j−1 . The curve a2i−2,1 intersects only a2i,1 ; consequently a2i−2,1 ∩ A+ i is uniquely determined. As can be seen from Figure 8(c), this forces each subsequent a2i−2,j onto a particular side of a2i,j−1 . MONODROMY OF PLANE CURVES 19 (a) (b) (c) Figure 8. The surface A+ i . (a): The correct choice for a2i,1 ∩ Ai . (b): The configuration a2i,j ∩ Ai . (c) The configuration a2i,j ∩ A+ i . Step 3: Arcs on the remainder of Σg . Consider now the subsurface Σ◦g := Σg \ [ Ai . This has (d−1)/2 boundary components ∂k , indexed by the corresponding Ak . The intersection S a2i,j ∩ (Σg \ Ai ) consists of two arcs, each connecting ∂i with ∂i+1 . The strategy for the remainder of the proof is to argue that when all these arcs are deleted from Σ◦g , the result is a union of disks. The change-of-coordinates principle will then assert the uniqueness of such a configuration of arcs, completing the proof. For what follows, it will be convenient to refer to a product neighborhood [0, 1] × [0, 1] ⊂ Σ◦g of some arc a2i,j ∩ Σ◦g as a strip. Our first objective is to compute the Euler characteristic χ ◦ of the surface Σ◦◦ g obtained by deleting strips for all arcs from Σg . Then an analysis of the pattern by which strips are attached will determine the number of components of this surface. To begin, we return to the setting of Figure 7. Above, it was argued that for 2i < (d − 1)/2, the intersection a2i,j ∩ a2i,j+1 can be isotoped onto either Ai or Ai+1 . This means that there is a strip that contains both a2i,j ∩ Σ◦g and a2i,j+1 ∩ Σ◦g . Grouping such strips together, it can be seen that for 1 ≤ i ≤ (d − 3)/2, the 2ith row of the Lönne graph gives rise to d strips. In the last row, there are d − 1 strips. So in total there are 1/2(d + 1)(d − 2) strips, and each strip contributes −1 to the Euler characteristic. Recall the relation g = (d − 1)(d − 2)/2: this means that χ(Σg ) = 2 − (d − 1)(d − 2). 20 NICK SALTER Each Ai has Euler characteristic χ(Ai ) = 2 − d. It follows that (d−1)/2 χ(Σ◦g ) = χ(Σg ) − X χ(Ai ) = 2 − (d − 1)(d − 2) + (d − 1)(d − 2)/2 i=1 = 2 − (d − 1)(d − 2)/2. Therefore, χ(Σ◦◦ g )= χ(Σ◦g ) + 1/2(d + 1)(d − 2) = d. We claim that Σ◦◦ g has d boundary components. This will finish the proof, as a surface of Euler characteristic d and b = d boundary components must be a union of d disks. The claim can easily be checked directly in the case d = 5 of immediate relevance. For general d, this follows from a straightforward, if notationally tedious, verification, proceeding by an analysis of the cyclic ordering of the arcs ai,j around the boundary components ∂A+  k. Step 2: A convenient configuration. Figure 9 presents a picture of a Lönne configuration in the case of interest d = 5. This was obtained by “building the surface” curve by curve, attaching one-handles in the sequence indicated by the numbering of the curves a1 , . . . , a16 . There are other, more uniform depictions of Lönne configurations which arise from Akbulut-Kirby’s picture of a plane curve of degree d derived from a Seifert surface of the (d, d) torus link (see [AK80] or [GS99, Section 6.2.7]), but the analysis to follow is easier to carry out using the model of Figure 9. Step 3: Producing vanishing cycles. The bulk of this step will establish claim (1); claim (2) follows as an immediate porism. The principle is to exploit the fact that if a and b are vanishing cycles, then so is Ta (b). To begin with, curves c1 , c2 , c4 , c8 , and c12 are elements of the Lönne configuration and so are already vanishing cycles. The curve c3 is obtained as (a3 ); c3 = Ta−1 2 similarly, (a4 ). c13 = Ta−1 2 Curve c10 is obtained as c10 = Ta15 (a13 ); c6 is obtained from a14 and a16 analogously. The curve c9 is obtained as (a11 ); c9 = Tc10 Ta−1 10 c7 is obtained from a10 , a12 , and c6 analogously. To obtain c5 , twist a13 along the chain c6 , . . . , c10 : (a13 ). Tc−1 Tc−1 Tc−1 Tc−1 c5 = Tc−1 10 9 8 7 6 MONODROMY OF PLANE CURVES 21 a9 a13 a1 a5 ι a10 a2 a15 a3 a7 a11 a15 a5 a3 a1 a13 a7 a2 a4 a11 a9 a8 a6 a10 a12 a14 a16 Figure 9. A Lönne configuration on Σ6 . Only a portion of the figure has been drawn: the omitted curves are obtained by applying the involution ι to the depicted curves. c11 is obtained by an analogous procedure on a14 . The sequence of twists used to exhibit x as a vanishing cycle is illustrated in Figure 10. Symbolically, (a7 ). Ta−1 Tc−1 Tc−1 Tc5 Tc4 Tc−1 Tc−1 Tc−1 Tc−1 x = Tc−1 9 8 7 6 9 8 7 6 y is produced in an analogous fashion, starting with a8 in place of a6 . To produce z, we appeal to the genus-2 star relation. Applied to the surface bounded by b, y, z, it shows that Tb2 Ty Tz ∈ Im(ρ5 ), and hence Tb2 Tz ∈ Im(ρ5 ) since Ty ∈ Im(ρ5 ) by above. Observe that i(c10 , z) = 1, and that Tc10 ∈ Im(ρ5 ). Making use of the fact that b is disjoint 22 NICK SALTER from both z and c10 , the braid relation gives Tc10 Tb2 Tz (c10 ) = Tc10 Tz (c10 ) = z. This exhibits z as a vanishing cycle, establishing claim (1) of Lemma 6.1. As Tb2 Tz and Tz are now both known to be elements of Im(ρ5 ), it follows that Tb2 ∈ Im(ρ5 ) as well, completing claim (2). Ta−1 9 Tc−1 Tc−1 Tc−1 6 7 8 T c5 T c4 Tc−1 Tc−1 Tc−1 Tc−1 8 9 7 6 Figure 10. The sequence of twists used to obtain x.  7. Proof of Theorem B In this final section we assemble the work we have done so far in order to prove Theorem B. Step 1: Reduction to the Torelli group. The first step is to reduce the problem of determining Im(ρ5 ) to the determination of Im(ρ5 ) ∩ I6 . This will follow from [Bea86]. Recall that Beauville establishes that Im(Ψ ◦ ρ5 ) is the entire stabilizer of an odd-parity spin structure on H1 (Σ6 ; Z). This spin structure was identified as φ5 in Section 2. Therefore Im(Ψ ◦ ρ5 ) = Im(Ψ ◦ Mod(Σ6 )[φ5 ]). It therefore suffices to show that Im(ρ5 ) ∩ ker Ψ = Mod(Σ6 )[φ5 ] ∩ ker Ψ = I6 . (7) Step 2: Enumeration of cases. Equation (7) will be derived as a consequence of Theorem 4.6. Lemma 6.1.1 asserts that the curves c1 , . . . , c12 in the Johnson generating set are contained in Im(ρ5 ), so that the first hypothesis of Theorem 4.6 is satisfied. There are then eight cases MONODROMY OF PLANE CURVES 23 γ k=3 k=6 k=5 k=8 k=7 k = 10 k=9 k = 12 Figure 11. The cases of Step 2 to check: the four straight chain maps of the form (c1 , . . . , ck ) for k = 3, 5, 7, 9, and the four β-chain maps of the form (β, c5 , . . . , ck ) for k = 6, 8, 10, 12. See Figure 11. The verification of the β-chain cases will be easier to accomplish after conjugating by the ∈ Im(ρ5 ). This has the following effect on the curves in the β-chains (the Tc−1 class g = Tx Tc−1 4 5 24 NICK SALTER curve γ is indicated in Figure 11 in the picture for k = 6): g(β) = b, g(c5 ) = c4 , g(c6 ) = γ, g(ck ) = ck for k ≥ 7. Step 3: Producing bounding-pair maps. In this step, we explain the method by which we will obtain the necessary bounding-pair maps. This is an easy consequence of the chain relation. Lemma 7.1. Let C = (c1 , . . . , ck ) be a chain of odd length k and boundary ∂C = d1 ∪ d2 . Suppose that the mapping classes Tc21 , Tc2 , . . . , Tck , Td21 are all contained in some subgroup Γ ≤ Mod(Σg ). Then the chain map associated to C (i.e. ) is also contained in Γ. the bounding pair map Td1 Td−1 2 Proof. The chain relation (Proposition 4.4) implies that Td1 Td2 ∈ Γ. By hypothesis, Td21 ∈ Γ, ∈ Γ as well.  so the bounding pair map Td1 Td−1 2 Step 4: Verification of cases. Lemma 6.1 asserts that the classes Tci , 1 ≤ i ≤ 12, as well as Tb2 are all contained in Im(ρ5 ). The class γ is obtained from c6 by the element g ∈ Im(ρ5 ), so γ is a vanishing cycle as well. Via Lemma 7.1, it remains only to show that in each of the cases in Step 2, one of the boundary components d1 satisfies Td21 ∈ Im(ρ5 ). The straight chain maps are depicted in the left-hand column of Figure 11. For k = 3, one boundary component is b; we have already remarked how Tb2 ∈ Im(ρ5 ). For k = 5, one of the boundary components is x. For k = 7, one uses the methods of Lemma 6.1 to show that the right-hand boundary component c satisfies Tc2 ∈ Im(ρ5 ) (the proof is identical to that for b). Finally, for k = 9, one of the boundary components is y. We turn to the β-chains. The images of the β-chains under the map g are depicted in the right-hand column of Figure 11. For k = 6, 8, 10, 12, let dk denote the boundary component depicted there for the chain (b, c4 , γ, c7 , . . . , ck ). Observe that dk is also a boundary component of the chain map for (c6 , . . . , ck ) (in the case k = 6, the boundary component d6 is just c6 ). Moreover, the chain map for (c6 , . . . , ck ) is conjugate to the chain map for (c1 , . . . , ck−5 ) by an element of Im(ρ5 ) (this is easy to see using the isomorphism between the group generated by c1 , . . . , c12 and the braid group B13 on 13 strands). Via the verification of the straight-chain cases, it follows that Td2k ∈ Im(ρ5 ), and so by Lemma 7.1 the β-chain maps are also contained in Im(ρ5 ).  References [AGZV12] V. I. Arnold, S. M. Gusein-Zade, and A. N. Varchenko. Singularities of differentiable maps. Volume 2. Modern Birkhäuser Classics. Birkhäuser/Springer, New York, 2012. Monodromy and asymptotics of integrals, Translated from the Russian by Hugh Porteous and revised by the authors and James Montaldi, Reprint of the 1988 translation. MONODROMY OF PLANE CURVES 25 [AK80] S. Akbulut and R. Kirby. Branched covers of surfaces in 4-manifolds. Math. Ann., 252(2):111–131, [Bea86] 1979/80. A. Beauville. Le groupe de monodromie des familles universelles d’hypersurfaces et d’intersections [Chm82] Notes in Math., pages 8–18. Springer, Berlin, 1986. S. V. Chmutov. Monodromy groups of critical point of functions. Invent. Math., 67(1):123–131, 1982. complètes. In Complex analysis and algebraic geometry (Göttingen, 1985), volume 1194 of Lecture [DL81] I. Dolgachev and A. Libgober. On the fundamental group of the complement to a discriminant variety. In Algebraic geometry (Chicago, Ill., 1980), volume 862 of Lecture Notes in Math., pages 1–25. Springer, Berlin-New York, 1981. [FM12] B. Farb and D. Margalit. A primer on mapping class groups, volume 49 of Princeton Mathematical Series. Princeton University Press, Princeton, NJ, 2012. [GS99] R. Gompf and A. Stipsicz. 4-manifolds and Kirby calculus, volume 20 of Graduate Studies in Math- [Hir05] ematics. American Mathematical Society, Providence, RI, 1999. S. Hirose. Surfaces in the complex projective plane and their mapping class groups. Algebr. Geom. [HJ89] Topol., 5:577–613 (electronic), 2005. S. Humphries and D. Johnson. A generalization of winding number functions on surfaces. Proc. London Math. Soc. (3), 58(2):366–386, 1989. [Jan83] W. A. M. Janssen. Skew-symmetric vanishing lattices and their monodromy groups. Math. Ann., 266(1):115–133, 1983. [Joh83] D. Johnson. The structure of the Torelli group. I. A finite set of generators for I. Ann. of Math. (2), [Kun08] 118(3):423–442, 1983. Y. Kuno. The mapping class group and the Meyer function for plane curves. Math. Ann., 342(4):923– [Lön09] 949, 2008. M. Lönne. Fundamental groups of projective discriminant complements. Duke Math. J., 150(2):357– 405, 2009. [Sip82] [Sip86] P. Sipe. Roots of the canonical bundle of the universal Teichmüller curve and certain subgroups of the mapping class group. Math. Ann., 260(1):67–92, 1982. P. Sipe. Some finite quotients of the mapping class group of a surface. Proc. Amer. Math. Soc., 97(3):515–524, 1986. E-mail address: [email protected] Department of Mathematics, University of Chicago, 5734 S. University Ave., Chicago, IL 60637
4math.GR
Unrestricted Facial Geometry Reconstruction Using Image-to-Image Translation Matan Sela Elad Richardson Ron Kimmel Department of Computer Science, Technion - Israel Institute of Technology arXiv:1703.10131v2 [cs.CV] 15 Sep 2017 {matansel,eladrich,ron}@cs.technion.ac.il Figure 1: Results of the proposed method. Reconstructed geometries are shown next to the corresponding input images. Abstract It has been recently shown that neural networks can recover the geometric structure of a face from a single given image. A common denominator of most existing face geometry reconstruction methods is the restriction of the solution space to some low-dimensional subspace. While such a model significantly simplifies the reconstruction problem, it is inherently limited in its expressiveness. As an alternative, we propose an Image-to-Image translation network that jointly maps the input image to a depth image and a facial correspondence map. This explicit pixel-based mapping can then be utilized to provide high quality reconstructions of diverse faces under extreme expressions, using a purely geometric refinement process. In the spirit of recent approaches, the network is trained only with synthetic data, and is then evaluated on “in-the-wild” facial images. Both qualitative and quantitative analyses demonstrate the accuracy and the robustness of our approach. 1. Introduction Recovering the geometric structure of a face is a fundamental task in computer vision with numerous applications. For example, facial characteristics of actors in realistic movies can be manually edited with facial rigs that are carefully designed for manipulating the expression [42]. While producing animation movies, tracking the geometry of an actor across multiple frames allows transferring the expression to an animated avatar [14, 8, 7]. Image-based face recognition methods deform the recovered geometry for producing a neutralized and frontal version of the input face in a given image, reducing the variations between images of the same subject [49, 19]. As for medical applications, acquiring the structure of a face allows for fine planning of aesthetic operations and plastic surgeries, designing of personalized masks [2, 37] and even bio-printing facial organs. Here, we focus on the recovery of the geometric structure of a face from a single facial image under a wide range of expressions and poses. This problem has been investigated for decades and most existing solutions involve one or more of the following components. • Facial landmarks [25, 46, 32, 47] - a set of automatically detected key points on the face such as the tip of the nose and the corners of the eyes, which can guide the reconstruction process [49, 26, 1, 12, 29]. • A reference facial model - an average neutral face that is used as an initialization of optical flow or shape from shading procedures [19, 26]. • A three-dimensional morphable model - a prior lowdimensional linear subspace of plausible facial geometries which allows an efficient, yet rough, recovery of a facial structure [4, 6, 49, 36, 23, 33, 43], While using these components can simplify the reconstruction problem, they introduce some inherent limitations. Methods that rely only on landmarks are limited to a sparse set of constrained points. Classical techniques that use a Non-Rigid Registration Fine Detail Reconstruction Image-to-Image Network Figure 2: The algorithmic reconstruction pipeline. reference facial model might fail to recover extreme expressions and non-frontal poses, as optical flows restrict the deformation to the image plane. The morphable model, while providing some robustness, limits the reconstruction as it can express only coarse geometries. Integrating some of these components together could mitigate the problems, yet, the underlying limitations are still manifested in the final reconstruction. Alternatively, we propose an unrestricted approach which involves a fully convolutional network that learns to translate an input facial image to a representation containing two maps. The first map is an estimation of a depth image, while the second is an embedding of a facial template mesh in the image domain. This network is trained following the Image-to-Image translation framework of [22], where an additional normal-based loss is introduced to enhance the depth result. Similar to previous approaches, we use synthetic images for training, where the images are sampled from a wide range of facial identities, poses, expressions, lighting conditions, backgrounds and material parameters. Surprisingly, even though the network is still trained with faces that are drawn from a limited generative model, it can generalize and produce structures far and beyond the limited scope of that model. To process the raw network results, an iterative facial deformation procedure is used which combines the representations into a full facial mesh. Finally, a refinement step is applied to produce a detailed reconstruction. This novel blending of neural networks with purely geometric techniques allows us to reconstruct highquality meshes with wrinkles and details at a mesoscopiclevel from only a single image. While using a neural network for face reconstruction was proposed in the past [33, 34, 43, 48, 24], previous methods were still limited by the expressiveness of the linear model. In [34], a second network was proposed to refine the coarse facial reconstruction, yet, it could not compensate for large geometric variations beyond the given subspace. For example, the structure of the nose was still limited by the span of a facial morphable model. By learning the unconstrained geometry directly in the image domain, we overcome this limitation, as demonstrated by both quantitative and qualitative experimental results. To further analyze the potential of the proposed representation we devise an application for translating images from one domain to another. As a case study, we transform synthetic facial images into realistic ones, enforcing our network as a loss function to preserve the geometry throughout the cross domain mapping. The main contributions of this paper are: • A novel formulation for predicting a geometric representation of a face from a single image, which is not restricted to a linear model. • A purely geometric deformation and refinement procedure that utilizes the network representation to produce high quality facial reconstructions. • A novel application of the proposed network which allows translating synthetic facial images into realistic ones, while keeping the geometric structure intact. 2. Overview The algorithmic pipeline is presented in Figure 2. The input of the network is a facial image, and the network produces two outputs: The first is an estimated depth map aligned with the input image. The second output is a dense map from each pixel to a corresponding vertex on a reference facial mesh. To bring the results into full vertex correspondence and complete occluded parts of the face, we warp a template mesh in the three-dimensional space by an iterative non-rigid deformation procedure. Finally, a fine detail reconstruction algorithm guided by the input image recovers the subtle geometric structure of the face. Code for evaluation is available at https://github.com/ matansel/pix2vertex. 3. Learning the Geometric Representation There are several design choices to consider when working with neural networks. First and foremost is the training data, including the input channels, their labels, and how to gather the samples. Second is the choice of the architecture. A common approach is to start from an existing architecture [27, 39, 40, 20] and to adapt it to the problem at hand. Finally, there is the choice of the training process, including the loss criteria and the optimization technique. Next, we describe our choices for each of these elements. 3.1. The Data and its Representation The purpose of the suggested network is to regress a geometric representation from a given facial image. This representation is composed of the following two components: Depth Image A depth profile of the facial geometry. Indeed, for many facial reconstruction tasks providing only the depth profile is sufficient [18, 26]. Correspondence Map An embedding which allows mapping image pixels to points on a template facial model, given as a triangulated mesh. To compute this signature for any facial geometry, we paint each vertex with the x, y, and z coordinates of the corresponding point on a normalized canonical face. Then, we paint each pixel in the map Figure 3: A reference template face presented alongside the dense correspondence signature from different viewpoints. Figure 4: Training data samples alongside their representations. with the color value of the corresponding projected vertex, see Figure 3. This feature map is a deformation agnostic representation, which is useful for applications such as facial motion capture [44], face normalization [49] and texture mapping [50]. While a similar representation was used in [34, 48] as feedback channel for an iterative network, the facial recovery was still restricted to the span of a facial morphable model. For training the network, we adopt the same synthetic data generation procedure proposed in [33]. Each random face is generated by drawing random mesh coordinates S and texture T from a facial morphable model [4]. In practice, we draw a pair of Gaussian random vectors, αg and αt , and recover the synthetic face as follows S = µg + Ag αg T = µt + At αt . where µg and µt are the stacked average facial geometry and texture of the model, respectively. Ag and At are matrices whose columns are the bases of low-dimensional linear subspaces spanning plausible facial geometries and textures, respectively. Notice that geometry basis Ag is composed to both identity and expression basis elements, as proposed in [10]. Next, we render the random textured meshes under various illumination conditions and poses, generating a dataset of synthetic facial images. As the ground-truth geometry is known for each synthetic image, one readily has the matching depth and correspondence maps to use as labels. Some examples of input images alongside their desired outputs are shown in Figure 4. Working with synthetic data can still present some gaps when generalizing to “in-the-wild” images [9, 33], however it provides much-needed flexibility in the generation process and ensures a deterministic connection from an image to its label. Alternatively, other methods [16, 43] proposed to generate training data by employing existing reconstruction algorithms and regarding their results as ground-truth labels. For example, Güler et al. [16], used a framework similar to that of [48] to match dense correspondence maps to a dataset of facial images, starting from only a sparse set of landmarks. These correspondence maps were then used as training labels for their method. Notice that such data can also be used for training our network without requiring any other modification. 3.2. Image to Geometry Translation Pixel-wise prediction requires a proper network architecture [30, 17]. The proposed structure is inspired by the recent Image-to-Image translation framework proposed in [22], where a network was trained to map the input image to output images of various types. The architecture used there is based on the U-net [35] layout, where skip connections are used between corresponding layers in the encoder and the decoder. Additional considerations as to the network implementation are given in the supplementary. While in [22] a combination of L1 and adversarial loss functions were used, in the proposed framework, we chose to omit the adversarial loss. That is because unlike the problems explored in [22], our setup includes less ambiguity in the mapping. Hence, a distributional loss function is less effective, and mainly introduces artifacts. Still, since the basic L1 loss function favors sparse errors in the depth prediction and does not account for differences between pixel neighborhoods, it is insufficient for producing fine geometric structures, see Figure 5b. Hence, we propose to augment the loss function with an additional L1 term, which penalizes the discrepancy between the normals of the reconstructed depth and ground truth. LN (ẑ, z) = k~n (ẑ) − ~n (z)k1 , (1) where ẑ is the recovered depth, and z denotes the groundtruth depth image. During training we set λL1 = 100 and λN = 10, where λL1 and λN are the matching loss weights. Note that for the correspondence image only the L1 loss was applied. Figure 5 demonstrates the contribution of the LN to the quality of the depth reconstruction provided by the network. 4. From Representations to a Mesh Based on the resulting depth and correspondence we introduce an approach to translate the 2.5D representation to a 3D facial mesh. The procedure is composed of an iterative elastic deformation algorithm (4.1) followed by a fine detail recovery step driven by the input image (4.2). The resulting output is an accurate reconstructed facial mesh with a full vertex correspondence to a template mesh with fixed triangulation. This type of data is helpful for various dynamic facial processing applications, such as facial rigs, which allows creating and editing photo-realistic animations of actors. As a byproduct, this process also corrects the prediction of the network by completing domains in the face which are mistakenly classified as part of the background. 4.1. Non-Rigid Registration Next, we describe the iterative deformation-based registration pipeline. First, we turn the depth map from the network into a mesh, by connecting neighboring pixels. Based on the correspondence map from the network, we compute the affine transformation from a template face to the mesh. This operation is done by minimizing the squared Euclidean distances between corresponding vertex pairs. Next, similar to [28], an iterative non-rigid registration process deforms the transformed template, aligning it with the mesh. Note that throughout the registration, only the template is warped, while the target mesh remains fixed. Each iteration involves the following four steps. 1. Each vertex in the template mesh, vi ∈ V, is associated with a vertex, ci , on the target mesh, by evaluating the nearest neighbor in the correspondence embedding space. This step is different from the method described in [28], which computes the nearest neighbor in the Euclidean space. As a result, the proposed step allows registering a single template face to different facial identities with arbitrary expressions. 2. Pairs, (vi , ci ), which are physically distant and those whose normal directions disagree are detected and ignored in the next step. 3. The template mesh is deformed by minimizing the following energy X E(V, C) = αp2point kvi − ci k22 (vi ,ci )∈J +αp2plane (a) (b) (c) +αmemb X 2 |~n(ci )(vi − ci )| (vi ,ci )∈J X X wi,j kvi − vj k22 , i∈V vj ∈N (vi ) Figure 5: (a) the input image, (b) the result with only the L1 loss function and (c) the result with the additional normals loss function. Note the artifacts in (b). (2) where, wi,j is the weight corresponding to the biharmonic Laplacian operator (see [21, 5]), ~n(ci ) is the normal of the corresponding vertex at the target mesh ci , J is the set of the remaining associated vertex pairs (vi , ci ), and N (vi ) is the set 1-ring neighboring vertices about the vertex vi . Notice that the first term above is the sum of squared Euclidean distances between matches. The second term is the distance from the point vi to the tangent plane at the corresponding point of the target mesh. The third term quantifies the stiffness of the mesh. 4. If the motion of the template mesh between the current iteration and the previous one is below a fixed threshold, we divide the weight αmemb by two. This relaxes the stiffness term and allows a greater deformation in the next iteration. This iterative process terminates when the stiffness weight is below a given threshold. Further implementation information and parameters of the registration process are provided in the supplementary material. The resulting output of this phase is a deformed template with fixed triangulation, which contains the overall facial structure recovered by the network, yet, is smoother and complete, see the third column of Figure 9. 4.2. Fine Detail Reconstruction Although the network already recovers some fine geometric details, such as wrinkles and moles, across parts of the face, a geometric approach can reconstruct details at a finer level, on the entire face, independently of the resolution. Here, we propose an approach motivated by the passive-stereo facial reconstruction method suggested in [3]. The underlying assumption here is that subtle geometric structures can be explained by local variations in the image domain. For some skin tissues, such as nevi, this assumption is inaccurate as the intensity variation results from the albedo. In such cases, the geometric structure would be wrongly modified. Still, for most parts of the face, the reconstructed details are consistent with the actual variations in depth. The method begins from an interpolated version of the deformed template. Each vertex v ∈ VD is painted with the intensity value of the nearest pixel in the image plane. Since we are interested in recovering small details, only the high spatial frequencies, µ(v), of the texture, τ (v), are taken into consideration in this phase. For computing this frequency band, we subtract the synthesized low frequencies from the original intensity values. This low-pass filtered part can be computed by convolving the texture with a spatially varying Gaussian kernel in the image domain, as originally proposed. In contrast, since this convolution is equivalent to computing the heat distribution upon the shape after time dt, where the initial heat profile is the original texture, we Figure 6: Mesoscopic displacement. From left to right: an input image, the shape after the iterative registration, the high-frequency part of the texture - µ(v), and the final shape. propose to compute µ(v) as µ(v) = τ (v) − (I − dt · ∆g )−1 τ (v), (3) where I is the identity matrix, ∆g is the cotangent weight discrete Laplacian operator for triangulated meshes [31], and dt is a scalar proportional to the cut-off frequency of the filter. Next, we displace each vertex along its normal direction such that v 0 = v + δ(v)~n(v). The step size of the displacement, δ(v), is a combination of a data-driven term, δµ (v), and a regularization one, δs (v). The data-driven term is guided by the high-pass filtered part of the texture, µ(v). In practice, we require the local differences in the geometry to be proportional to the local variation in the high frequency band of the texture. For each vertex v, with a normal ~n(v), and a neighboring vertex vi , the data-driven term is given by   P n(v)i| i ,~ α(v,vi ) (µ(v) − µ(vi )) 1 − |hv−v kv−vi k δµ (v) = vi ∈N (v) P , α(v,vi ) vi ∈N (v) (4) where α(v,vi ) = exp (−kv − vi k). For further explanation of Equation 4, we refer the reader to the supplementary material of this paper or the implementation details of [3]. Since we move each vertex along the normal direction, triangles could intersect each other, particularly in domains of high curvature. To reduce the probability of such collisions, a regularizing displacement field, δs (v), is added. This term is proportional to the mean curvature of the original surface, and is equivalent to a single explicit mesh fairing step [11]. The final surface modification is given by v 0 = v + (ηδµ (v) + (1 − η)δs (v)) · ~n(v), (5) for some constant η ∈ [0, 1]. A demonstration of the results before and after this step is presented in Figure 6 5. Experiments Next, we present evaluations on both the proposed network and the pipeline as a whole, and comparison to different prominent methods of single image based facial reconstruction [26, 49, 34]. 5.2. Quantitative Evaluation Figure 7: Network Output. For a quantitative comparison, we used the first 200 subjects from the BU-3DFE dataset [45], which contains facial images aligned with ground truth depth images. Each method provides its own estimation for the depth image alongside a binary mask, representing the valid pixels to be taken into account in the evaluation. Obviously, since the problem of reconstructing depth from a single image is ill-posed, the estimation needs to be judged up to global scaling and transition along the depth axis. Thus, we compute these paramters using the Random Sample Concensus (RANSAC) approach [13], for normalizing the estimation according to the ground truth depth. This significantly reduces the absolute error of each method as the global parameter estimation is robust to outliers. Note that the parameters of the RANSAC were identical for all the methods and samples. The results of this comparison are given in Table 1, where the units are given in terms of the percentile of the ground-truth depth range. As a further analysis of the reconstruction accuracy, we computed the mean absolute error of each method based on expressions, see Table 2. Figure 8: Texture mapping via the embedding. 5.1. Qualitative Evaluation The first component of our algorithm is an Image-toImage network. In Figure 7, we show samples of output maps produced by the proposed network. Although the network was trained with synthetic data, with simple random backgrounds (see Figure 4), it successfully separates the hair and background from the face itself and learns the corresponding representations. To qualitatively assess the accuracy of the correspondence, we present a visualization where an average facial texture is mapped to the image plane via the predicted embedding, see Figure 8, this shows how the network successfully learns to represent the facial structure. Next, in Figure 9 we show the reconstruction of the network, alongside the registered template and the final shape. Notice how the structural information retrieved by the network is preserved through the geometric stages. Figure 10 shows a qualitative comparison between the proposed method and others. One can see that our method better matches the global structure, as well as the facial details. To better perceive these differences, see Figure 11. Finally, to demonstrate the limited expressiveness of the 3DMM space compared to our method, Figure 12 presents our registered template next to its projection onto the 3DMM space. This clearly shows that our network is able to learn structures which are not spanned by the 3DMM model. Figure 9: The reconstruction stages. From left to right: the input image, the reconstruction of the network, the registered template and the final shape. Input Proposed [34] [26] [49] Proposed [34] [26] [49] Figure 10: Qualitative comparison. Input images are presented alongside the reconstructions of the different methods. [26] [49] [34] Ours Mean Err. 3.89 3.85 3.61 3.51 Std Err. 4.14 3.23 2.99 2.69 Median Err. 2.94 2.93 2.72 2.65 90% Err. 7.34 7.91 6.82 6.59 Table 1: Quantitative evaluation on the BU-3DFE Dataset. From left to right: the absolute depth errors evaluated by mean, standard deviation, median and the average ninety percent largest error. Input Proposed [34] [26] [49] Figure 11: Zoomed qualitative result of first and fourth subjects from Figure 10. 5.3. The Network as a Geometric Constraint As demonstrated by the results, the proposed network successfully learns both the depth and the embedding representations for a variety of images. This representation is the key part behind the reconstruction pipeline. However, it can also be helpful for other face-related tasks. As an example, we show that the network can be used as a geometric constraint for facial image manipulations, such as transforming synthetic images into realistic ones. This idea [26] [49] [34] Ours AN 3.47 4.00 3.42 3.67 DI 4.03 3.93 3.46 3.34 FE 3.94 3.91 3.64 3.36 HA 4.30 3.70 3.41 3.01 NE 3.43 3.76 4.22 3.17 SA 3.52 3.61 3.59 3.37 SU 4.19 3.96 4.00 4.41 Table 2: The mean error by expression. From left to right: Anger, Disgust, Fear, Happy, Neutral, Sad, Surprise. is based on recent advances in applying Generative Adversarial Networks (GAN) [15] for domain adaption tasks [41]. In the basic GAN framework, a Generator Network (G) learns to map from the source domain, DS , to the target domain DT , where a Discriminator Network (D) tries to dis- Figure 12: 3DMM Projection. From left to right: the input image, the registered template, the projected mesh and the projection error. tinguish between generated images and samples from the target domain, by optimizing the following objective minmaxV (D, G) = G D Ey∼DT [log D (y)] (6) + Ex∼DS [log (1 − D (G (x)))] . Theoretically, this framework could also translate images from the synthetic domain into the realistic one. However, it does not guarantee that the underlying geometry of the synthetic data is preserved throughout that transformation. That is, the generated image might look realistic, but have a completely different facial structure from the synthetic input. To solve that potential inconsistency, we suggest to involve the proposed network as an additional loss function on the output of the generator. LGeom (x) = kN et (x) − N et (G (x))k1 , (7) where N et(·) represents the operation of the introduced network. Note that this is feasible, thanks to the fact that the proposed network is fully differentiable. The additional geometric fidelity term forces the generator to learn a mapping that makes a synthetic image more realistic while keeping the underlying geometry intact. This translation process could potentially be useful for data generation procedures, similarly to [38]. Some successful translations are visualized in Figure 13. Notice that the network implicitly learns to add facial hair and teeth, and modify the texture the and shading, without changing the facial structure. As demonstrated by this analysis, the proposed network learns a strong representation that has merit not only for reconstruction, but for other tasks as well. Figure 13: Translation results. From top to bottom: synthetic input images, the correspondence and the depth maps recovered by the network, and the transformed result. network represents the solution in the extremely highdimensional image domain. This structure is learned from synthetic examples, and shown to successfully generalize to “in-the-wild” images. Still, facial images that significantly deviate from our training domain are challenging, resulting in missing areas and errors inside the representation maps. More specifically, our network has difficulty handling extreme occlusions such as sunglasses, hands or beards, as these were not seen in the training data. Similarly to other methods, reconstructions under strong rotations are also not well handled. Reconstructions under such scenarios are shown in the supplementary material. Another limiting factor of our pipeline is speed. While the suggested network by itself can be applied efficiently, our template registration step is currently not optimized for speed and can take a few minutes to converge. 7. Conclusion We presented an unrestricted approach for recovering the geometric structure of a face from a single image. Our algorithm employs an Image-to-Image network which maps the input image to a pixel-based geometric representation, followed by geometric deformation and refinement steps. The network is trained only by synthetic facial images, yet, is capable of reconstructing real faces. Using the network as a loss function, we propose a framework for translating synthetic facial images into realistic ones while preserving the geometric structure. 6. Limitations One of the core ideas of this work was a model-free approach, where the solution space is not restricted by a low dimensional subspace. Instead, the Image-to-Image Acknowledgments We would like to thank Roy Or-El for the helpful discussions and comments. References [1] O. Aldrian and W. A. Smith. A linear approach of 3D face shape and texture recovery using a 3d morphable model. In Proceedings of the British Machine Vision Conference, pages, pages 75–1, 2010. [2] I. Amirav, A. S. Luder, A. Halamish, D. Raviv, R. Kimmel, D. Waisman, and M. T. Newhouse. Design of aerosol face masks for children using computerized 3d face analysis. Journal of aerosol medicine and pulmonary drug delivery, 27(4):272–278, 2014. [3] T. Beeler, B. Bickel, P. Beardsley, B. Sumner, and M. Gross. High-quality single-shot capture of facial geometry. In ACM SIGGRAPH 2010 Papers, SIGGRAPH ’10, pages 40:1– 40:9, New York, NY, USA, 2010. ACM. [4] V. Blanz and T. Vetter. A morphable model for the synthesis of 3D faces. In Proceedings of the 26th annual conference on Computer graphics and interactive techniques, pages 187– 194. ACM Press/Addison-Wesley Publishing Co., 1999. [5] M. Botsch and O. Sorkine. On linear variational surface deformation methods. IEEE Transactions on Visualization and Computer Graphics, 14(1):213–230, Jan 2008. [6] P. Breuer, K.-I. Kim, W. Kienzle, B. Scholkopf, and V. Blanz. Automatic 3D face reconstruction from single images or video. In Automatic Face & Gesture Recognition, 2008. FG’08. 8th IEEE International Conference on, pages 1–8. IEEE, 2008. [7] C. Cao, D. Bradley, K. Zhou, and T. Beeler. Real-time highfidelity facial performance capture. ACM Transactions on Graphics (TOG), 34(4):46, 2015. [8] C. Cao, Y. Weng, S. Lin, and K. Zhou. 3D shape regression for real-time facial animation. ACM Transactions on Graphics (TOG), 32(4):41, 2013. [9] W. Chen, H. Wang, Y. Li, H. Su, D. Lischinsk, D. Cohen-Or, B. Chen, et al. Synthesizing training images for boosting human 3D pose estimation. arXiv preprint arXiv:1604.02703, 2016. [10] B. Chu, S. Romdhani, and L. Chen. 3d-aided face recognition robust to expression and pose variations. In 2014 IEEE Conference on Computer Vision and Pattern Recognition, pages 1907–1914. IEEE, 2014. [11] M. Desbrun, M. Meyer, P. Schröder, and A. H. Barr. Implicit fairing of irregular meshes using diffusion and curvature flow. In Proceedings of the 26th Annual Conference on Computer Graphics and Interactive Techniques, SIGGRAPH ’99, pages 317–324, New York, NY, USA, 1999. ACM Press/Addison-Wesley Publishing Co. [12] P. Dou, Y. Wu, S. K. Shah, and I. A. Kakadiaris. Robust 3D face shape reconstruction from single images via two-fold coupled structure learning. In Proc. British Machine Vision Conference, pages 1–13, 2014. [13] M. A. Fischler and R. C. Bolles. Random sample consensus: a paradigm for model fitting with applications to image analysis and automated cartography. Communications of the ACM, 24(6):381–395, 1981. [14] P. Garrido, M. Zollhöfer, D. Casas, L. Valgaerts, K. Varanasi, P. Pérez, and C. Theobalt. Reconstruction of personalized [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] [27] [28] [29] [30] 3D face rigs from monocular video. ACM Transactions on Graphics (TOG), 35(3):28, 2016. I. Goodfellow, J. Pouget-Abadie, M. Mirza, B. Xu, D. Warde-Farley, S. Ozair, A. Courville, and Y. Bengio. Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680, 2014. R. A. Güler, G. Trigeorgis, E. Antonakos, P. Snape, S. Zafeiriou, and I. Kokkinos. Densereg: Fully convolutional dense shape regression in-the-wild. arXiv preprint arXiv:1612.01202, 2016. B. Hariharan, P. Arbeláez, R. Girshick, and J. Malik. Hypercolumns for object segmentation and fine-grained localization. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 447–456, 2015. T. Hassner. Viewing real-world faces in 3d. In Proceedings of the IEEE International Conference on Computer Vision, pages 3607–3614, 2013. T. Hassner, S. Harel, E. Paz, and R. Enbar. Effective face frontalization in unconstrained images. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 4295–4304, 2015. K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. B. T. Helenbrook. Mesh deformation using the biharmonic operator. International journal for numerical methods in engineering, 56(7):1007–1021, 2003. P. Isola, J.-Y. Zhu, T. Zhou, and A. A. Efros. Imageto-image translation with conditional adversarial networks. arXiv preprint arXiv:1611.07004, 2016. L. Jiang, J. Zhang, B. Deng, H. Li, and L. Liu. 3d face reconstruction with geometry details from a single image. arXiv preprint arXiv:1702.05619, 2017. A. Jourabloo and X. Liu. Large-pose face alignment via cnn-based dense 3D model fitting. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. V. Kazemi and J. Sullivan. One millisecond face alignment with an ensemble of regression trees. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1867–1874, 2014. I. Kemelmacher-Shlizerman and R. Basri. 3D face reconstruction from a single image using a single reference face shape. IEEE Transactions on Pattern Analysis and Machine Intelligence, 33(2):394–405, 2011. 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. H. Li. Animation Reconstruction of Deformable Surfaces. PhD thesis, ETH Zurich, November 2010. F. Liu, D. Zeng, J. Li, and Q. Zhao. Cascaded regressor based 3D face reconstruction from a single arbitrary view image. arXiv preprint arXiv:1509.06161, 2015. J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 3431–3440, 2015. [31] M. Meyer, M. Desbrun, P. Schröder, A. H. Barr, et al. Discrete differential-geometry operators for triangulated 2manifolds. Visualization and mathematics, 3(2):52–58, 2002. [32] S. Ren, X. Cao, Y. Wei, and J. Sun. Face alignment at 3000 fps via regressing local binary features. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1685–1692, 2014. [33] E. Richardson, M. Sela, and R. Kimmel. 3D face reconstruction by learning from synthetic data. In 3D Vision (3DV), 2016 International Conference on, pages 460–469. IEEE, 2016. [34] E. Richardson, M. Sela, R. Or-El, and R. Kimmel. Learning detailed face reconstruction from a single image. arXiv preprint arXiv:1611.05053, 2016. [35] O. Ronneberger, P. Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In International Conference on Medical Image Computing and Computer-Assisted Intervention, pages 234–241. Springer, 2015. [36] S. Saito, L. Wei, L. Hu, K. Nagano, and H. Li. Photorealistic facial texture inference using deep neural networks. arXiv preprint arXiv:1612.00523, 2016. [37] M. Sela, N. Toledo, Y. Honen, and R. Kimmel. Customized facial constant positive air pressure (cpap) masks. arXiv preprint arXiv:1609.07049, 2016. [38] A. Shrivastava, T. Pfister, O. Tuzel, J. Susskind, W. Wang, and R. Webb. Learning from simulated and unsupervised images through adversarial training. arXiv preprint arXiv:1612.07828, 2016. [39] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. arXiv preprint arXiv:1409.1556, 2014. [40] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 1–9, 2015. [41] Y. Taigman, A. Polyak, and L. Wolf. Unsupervised crossdomain image generation. arXiv preprint arXiv:1611.02200, 2016. [42] J. Thies, M. Zollhofer, M. Stamminger, C. Theobalt, and M. Nießner. Face2face: Real-time face capture and reenactment of rgb videos. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2387– 2395, 2016. [43] A. T. Tran, T. Hassner, I. Masi, and G. Medioni. Regressing robust and discriminative 3d morphable models with a very deep neural network. arXiv preprint arXiv:1612.04904, 2016. [44] T. Weise, S. Bouaziz, H. Li, and M. Pauly. Realtime performance-based facial animation. In ACM Transactions on Graphics (TOG), volume 30, page 77. ACM, 2011. [45] L. Yin, X. Wei, Y. Sun, J. Wang, and M. J. Rosato. A 3d facial expression database for facial behavior research. In Automatic face and gesture recognition, 2006. FGR 2006. 7th international conference on, pages 211–216. IEEE, 2006. [46] Z. Zhang, P. Luo, C. C. Loy, and X. Tang. Facial landmark detection by deep multi-task learning. In European Conference on Computer Vision, pages 94–108. Springer, 2014. [47] E. Zhou, H. Fan, Z. Cao, Y. Jiang, and Q. Yin. Extensive facial landmark localization with coarse-to-fine convolutional network cascade. In Proceedings of the IEEE International Conference on Computer Vision Workshops, pages 386–391, 2013. [48] X. Zhu, Z. Lei, X. Liu, H. Shi, and S. Z. Li. Face alignment across large poses: A 3d solution. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 146–155, 2016. [49] X. Zhu, Z. Lei, J. Yan, D. Yi, and S. Z. Li. High-fidelity pose and expression normalization for face recognition in the wild. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 787–796, 2015. [50] G. Zigelman, R. Kimmel, and N. Kiryati. Texture mapping using surface flattening via multidimensional scaling. IEEE Transactions on Visualization and Computer Graphics, 8(2):198–207, 2002. Supplementary Material A. Additional Network Details Here, we summarize additional considerations concerning the network and its training procedure. • The proposed architecture is based on the one introduced in [22]. For allowing further refinement of the results, three additional convolution layers with a kernel of size 1 × 1 were concatenated at the end. Following the notations of [22], the encoder architecture is given as C64 − C128 − C256 − C512 − C512 − C512 − C512 − C512, while the decoder is given by CD512 − CD512 − CD512 − C512 − C512 − C256 − C128 − C64 − C ∗ 64 − C ∗ 32 − C ∗ 4, where C ∗ represents a 1 × 1 convolution with stride 1. • The resolution of the input and output training images was 512 × 512 pixels. While this is a relatively large input size for training, the Image-to-Image architecture was able to process it successfully, and provided accurate results. Although, one could train a network on smaller resolutions and then evaluate it on larger images, as shown in [22], we found that our network did not successfully scale up for unseen resolutions. • While a single network was successfully trained to retrieve both depth and correspondence representations, our experiments show that training separated networks to recover the representations is preferable. Note that the architectures of both networks were identical. This can be justified by the observation that during training, a network allocates its resources for a specific translation task and the representation maps we used have different characteristics. • A necessary parameter for the registration step is the scale of the face with respect to the image dimensions. While this can be estimated based on global features, such as the distance between the eyes, we opted to retrieve it directly by training the network to predict the x and y coordinates of each pixel in the image alongside the z coordinate. B. Additional Registration and Refinement Details Next, we provide a detailed version of the iterative deformation-based registration phase, including implementation details of the fine detail reconstruction. B.1. Non-Rigid Registration First, we turn the x,y and z maps from the network into a mesh, by connecting four neighboring pixels, for which the coordinates are known, with a couple of triangles. This step yields a target mesh that might have holes but has dense map to our template model. Based on the correspondence given by the network, we compute the affine transformation from a template face to the mesh. This operation is done by minimizing the squared Euclidean distances between corresponding vertex pairs. To handle outliers, a RANSAC approach is used [13] with 1, 000 iterations and a threshold of 3 millimeters for detecting inliers. Next, similar to [28], an iterative non-rigid registration process deforms the transformed template, aligning it with the mesh. Note, that throughout the registration, only the template is warped, while the target mesh remains fixed. Each iteration involves the following four steps. 11 1. Each vertex in the template mesh, vi ∈ V, is associated with a vertex, ci , on the target mesh, by evaluating the nearest neighbor in the embedding space. This step is different from the method described in [28], which computes the nearest neighbor in the Euclidean space. As a result, the proposed step allows registering a single template face to different facial identities with arbitrary expressions. 2. Pairs, (vi , ci ), which are physically distant by more than 1 millimeter and those with normal direction disagreement of more than 5 degrees are detected and ignored in the next step. 3. The template mesh is deformed by minimizing the following energy X E(V, C) = αp2point kvi − ci k22 (vi ,ci )∈J +αp2plane +αmemb X 2 |~n(ci )(vi − ci )| (vi ,ci )∈J X X wi,j kvi − vj k22 , i∈V vj ∈N (vi ) (8) where, wi,j is the weight corresponding to the biharmonic Laplacian operator (see [21, 5]), ~n(ci ) is the normal of the corresponding vertex at the target mesh ci , J is the set of the remaining associated vertex pairs (vi , ci ), and N (vi ) is the set 1-ring neighboring vertices about the vertex vi . Notice that the first term above is the sum of squared Euclidean distances between matches and its weight αp2point is set to 0.1. The second term is the distance from the point vi to the tangent plane at the corresponding point on the target mesh, and its weight αp2plane is set to 1. The third term quantifies the stiffness of the mesh and its weight αmemb is initialized to 108 . In practice, the energy term given in Equation 8 is minimized iteratively by an inner loop which contains a linear system of equations. We run this loop until the norm of the difference between the vertex positions of the current iteration and the previous one is below 0.01. 4. If the motion of the template mesh between the current outer iteration and the previous one is below 0.1, we divide the weight αmemb by two. This relaxes the stiffness term and allows a greater deformation in the next outer iteration. In addition, we evaluate the difference between the number of remaining pairwise matches in the current iteration versus the previous one. If the difference is below 500, we modify the vertex association step to estimate the physical nearest neighbor vertex, instead of the the nearest neighbor in the space of the embedding given by the network. This iterative process terminates when the stiffness weight αmemb is below 106 . The resulting output of this phase is a deformed template with fixed triangulation, which contains the overall facial structure recovered by the network, yet, is smoother and complete. B.2. Fine Detail Reconstruction Although the network already recovers fine geometric details, such as wrinkles and moles, across parts of the face, a geometric approach can reconstruct details at a finer level, on the entire face, independently of the resolution. Here, we propose an approach motivated by the passive-stereo facial reconstruction method suggested in [3]. The underlying assumption here is that subtle geometric structures can be explained by local variations in the image domain. For some skin tissues, such as nevi, this assumption is inaccurate as the intensity variation results from the albedo. In such cases, the geometric structure would be wrongly modified. Still, for most parts of the face, the reconstructed details are consistent with the actual variations in depth. The method begins from an interpolated version of the deformed template, provided by a surface subdivision technique. Each vertex v ∈ VD is painted with the intensity value of the nearest pixel in the image plane. Since we are interested in recovering small details, only the high spatial frequencies, µ(v), of the texture, τ (v), are taken into consideration in this phase. For computing this frequency band, we subtract the synthesized low frequencies from the original intensity values. This low-pass filtered part can be computed by convolving the texture with a spatially varying Gaussian kernel in the image domain, as originally proposed. In contrast, since this convolution is equivalent to computing the heat distribution upon the shape after time dt, where the initial heat profile is the original texture, we propose to compute µ(v) as µ(v) = τ (v) − (I − dt · ∆g )−1 τ (v), (9) where I is the identity matrix, ∆g is the cotangent weight discrete Laplacian operator for triangulated meshes [31], and dt = 0.2 is a scalar proportional to the cut-off frequency of the filter. Next, we displace each vertex along its normal direction such that v 0 = v + δ(v)~n(v). The step size of the displacement, δ(v), is a combination of a data-driven term, δµ (v), and a regularization one, δs (v). The data-driven term is guided by the high-pass filtered part of the texture, µ(v). In practice, we require the local differences in the geometry to be proportional to the local variation in the high frequency band of the texture. That is for each vertex v, with a normal ~n(v), and a neighboring vertex vi , the data-driven term is given by (µ(v) − µ(vi )) = hv + δµ (v)~n(v) − vi , ~n(v)i. (10) Thus, the step size assuming a single neighboring vertex can be calculated by δµ (v) = γ(µ(v) − µ(vi )) − hv − vi , ~n(v)i. (11) In the presence of any number of neighboring vertices of v, we compute the weighted average of its 1-ring neighborhood P n(v)i] vi ∈N (v) α(v, vi )γ [(µ(v) − µ(vi )) − hv − vi , ~ P , (12) δµ (v) = vi ∈N (v) α(v, vi ) An alternative term can spatially attenuate the contribution of the data-driven term in curved regions for regularizing the reconstruction by   P n(v)i| i ,~ α(v,vi ) (µ(v) − µ(vi )) 1 − |hv−v kv−vi k δµ (v) = vi ∈N (v) P α(v,vi ) , (13) vi ∈N (v) where α(v,vi ) = exp (−kv − vi k). where N (v) is the set 1-ring neighboring vertices about the vertex v, and ~n(v) is the unit normal at the vertex v. Since we move each vertex along the normal direction, triangles could intersect each other, particularly in regions with high curvature. To reduce the probability of such collisions, a regularizing displacement field, δs (v), is added. This term is proportional to the mean curvature of the original surface, and is equivalent to a single explicit mesh fairing step [11]. The final surface modification is given by v 0 = v + (ηδµ (v) + (1 − η)δs (v)) · ~n(v), for a constant η = 0.2. (14) C. Additional Experimental Results We present additional qualitative results of our method. Figure 14 shows the output representations of the proposed network for a variety of different faces, notice the failure cases presented in the last two rows. One can see that the network generalizes well, but is still limited by the synthetic data. Specifically, the network might fail in presence of occlusions, facial hair or extreme poses. This is also visualized in Figure 15 where the correspondence error is visualized using the texture mapping. Additional reconstruction results of our method are presented in Figure 16. For analyzing the distribution of the error along the face, we present an additional comparison in Figure 17, where the absolute error, given in percents of the ground truth depth, is shown for several facial images. Figure 14: Network Output. Figure 15: Results under occlusions and rotations. Input images are shown next to the matching correspondence result, visualized using the texture mapping to better show the errors. Figure 16: Additional reconstruction results. Figure 16: Additional reconstruction results. Figure 16: Additional reconstruction results. Input Proposed [34] [26] Figure 17: Error heat maps in percentile of ground truth depth. [49] Err. % Scale
1cs.CV
HILBERT SERIES OF SYMMETRIC IDEALS IN INFINITE POLYNOMIAL RINGS VIA FORMAL LANGUAGES arXiv:1606.07956v1 [math.AC] 25 Jun 2016 ROBERT KRONE, ANTON LEYKIN, AND ANDREW SNOWDEN Abstract. Let R be the polynomial ring K[xi,j ] where 1 ≤ i ≤ r and j ∈ N, and let I be an ideal of R stable under the natural action of the infinite symmetric group S∞ . Nagel– Römer recently defined a Hilbert series HI (s, t) of I and proved that it is rational. We give a much shorter proof of this theorem using tools from the theory of formal languages and a simple algorithm that computes the series. Contents 1. Introduction 2. Background on regular languages 3. Monomial ideals 4. General ideals 5. An algorithm for Hilbert series 6. Hilbert series of modules References 1 2 3 5 6 7 8 1. Introduction 1.1. Statement of results. Let R be the polynomial ring over the field K in variables xi,j , where i ∈ {1, . . . , r} and j ∈ N. The infinite symmetric group S∞ acts on R (by fixing the first index and moving the second), and a fundamental result, proved originally by Cohen [Co] but subsequently rediscovered [AH, HS], is that R is S∞ -noetherian: that is, any S∞ ideal in R is generated by the S∞ -oribts of finitely many elements. Given this, one can begin to study finer properties of ideals. In this paper, we investigate their Hilbert series. Let I ⊂ R be a homogeneous S∞ -ideal. For n ≥ 1, let Rn ⊂ R be the subalgebra generated by the variables xi,j with 1 ≤ i ≤ r and j ≤ n, and put In = I ∩ Rn . Then In is a finitely generated graded Rn -module, and so its Hilbert series HIn (t) is a well-defined rational function. We define the Hilbert series of I by X HI (s, t) = HIn (t)sn . n≥0 This series was introduced by Nagel–Römer [NR], who proved the following theorem: Theorem 1.1. The series HI (s, t) is a rational function of s and t. Date: June 28, 2016. AL was supported by NSF grant DMS-1151297. AS was supported by NSF grants DMS-1303082 and DMS-1453893. 1 2 ROBERT KRONE, ANTON LEYKIN, AND ANDREW SNOWDEN The purpose of this paper is to give a new proof of this theorem. Our proof is shorter and (in our opinion) conceptually clearer than the one given in [NR]. Remark 1.2. In fact, [NR] work with what we would call HR/I (s, t), but it is a trivial matter to pass between this and our HI (s, t).  Remark 1.3. The result of [NR] gives information about the denominator of HI (s, t). Our method gives some information as well, though we have not carefully traced through everything to see exactly what it yields. In particular, we do not know which method will ultimately say more about the denominator.  1.2. Overview of proof. We now describe the idea of our proof. First, passing to the initial ideal one can reduce to the case where I is a monomial ideal. One then has what is essentially a complicated bookkeeping problem: one must understand which of the monomials in the infinitely many variables xi,j appear in I. Our main idea is to use a sort of encoding scheme to make the problem more finite: more precisely, we establish a bijection between the monomials in R and a certain set of words in a finite alphabet. Thus, in a sense, we trade the infinitely many commuting variables of R for finitely many non-commuting variables. We show that, under this encoding scheme, I (or rather, the set of monomials it contains) corresponds to a regular language. The theorem then follows from standard results on generating functions of regular languages. The idea of using formal languages was motivated by the approach to Hilbert series in [SS2]. However, the result and methods of this paper do not appear to fit into the general setup of [SS2]. 1.3. Outline. In §2 we review background material on regular languages. In §3 we prove the main theorem in the case of monomial ideals; this is really the bulk of the work. In §4 we complete the proof of the theorem by reducing to the monomial case. In §5 we explicitly describe an algorithm for computing HI (s, t), given a set of generators for I. Finally, in §6 we discuss the possibility of treating Hilbert series of R-modules. 1.4. Notation. We write N for the set of non-negative integers. We let Inc(N) be the socalled increasing monoid: this is the set of functions f : N → N satisfying f (n) < f (m) for n < m, using composition as the monoidal operation. Throughout, K denotes an arbitrary field. 2. Background on regular languages In this section we review some well-known material on formal languages, especially regular languages. We refer the reader to the text [HU] for more details. Let Σ be a finite set and let Σ⋆ be the set of words in the alphabet Σ; alternatively, Σ⋆ is the free monoid on Σ. A formal language on Σ is simply a subset of Σ⋆ . Given a formal language L on Σ⋆ , we define the Kleene star L⋆ of L to be the language consisting of all words of the form w1 · · · wn where wi ∈ L; alternatively, L⋆ is the submonoid of Σ⋆ generated by L. Given two formal languages L1 and L2 , we define their concatenation L1 L2 to be the formal language consisting of all words of the form w1 w2 with w1 ∈ L1 and w2 ∈ L2 . We also make use of the standard set-theoretic operations of union, intersection, and complement on formal languages. The class of regular languages on Σ is the smallest class of languages containing the singleton languages {σ} for each σ ∈ Σ, and closed under union, concatenation, and Kleene HILBERT SERIES VIA FORMAL LANGUAGES 3 star. (Actually, the empty language and the language consisting only of the empty word are also counted as regular languages, but do not fit the previous definition.) It turns out that the class of regular languages is also closed under intersection and complement. Let t1 , . . . , tk be a set of formal variables, let M be the set of monomials in these variables, and let ρ : Σ⋆ → M be a monoid homomorphism, which we refer to as the weight function. We note that ρ is determined by its restriction to Σ. Given a language L on Σ, we define its generating function with respect to ρ by X ρ(w), HL,ρ(t1 , . . . , tk ) = w∈L assuming this sum makes sense (i.e., there are only finitely many w ∈ L for which ρ(w) is a given monomial). We consider this as a formal power series in the variables t1 , . . . , tk . For example, suppose k = 1 and ρ is defined by ρ(σ) = t for all σ ∈ Σ. Then for a word w we have ρ(w) = tlen(w) , and so the coefficient of tn in HL,ρ(t) is the number of words in L of length n. We require the following standard result (see, e.g., [St, Theorem 4.7.2], though the terminology there is somewhat different): Proposition 2.1. If L is a regular language then HL,ρ (t1 , . . . , tk ) is a rational function of the ti ’s, for any weight function ρ (for which the series makes sense). 3. Monomial ideals Let R = K[xi,j ] where 1 ≤ i ≤ r and j ∈ N, and let M be the set of monomials in R. Let Σ be the alphabet {τ, ξ1, . . . , ξr }. Let T : M → M be the shift operator, defined by T (xi,j ) = xi,j+1 and extended multiplicatively. We define a function m : Σ⋆ → M inductively using the following three rules: (a) m(∅) = 1; (b) m(ξi w) = xi,0 · m(w); and (c) m(τ w) = T (m(w)). Thus, concretely, to compute m(w) simply change each ξi in w to xi,0 and each τ to T applied to the string following it. Example 3.1. We have m(τ ξ1 τ ξ2 τ ) = T (x1,0 T (x2,0 T (1))) = T (x1,0 x2,1 ) = x1,1 x2,2 .  It is clear that the map m : Σ⋆ → M is surjective, though it is not injective since the variables xi,j commute, e.g., m(ξ1 ξ2 ) = m(ξ2 ξ1 ). We therefore introduce a subset of Σ⋆ to obtain a bijection. We say that a word w in Σ⋆ is standard if it satisfies the condition that every substring ξi ξj of w has i ≤ j. Let Σ⋆std be the set of standard words, and let Σ⋆std,n be the set of standard words in which τ occurs exactly n times. Let Mn be the set of monomials in the variables xi,j with 1 ≤ i ≤ r and 0 ≤ j ≤ n. Proposition 3.2. For each n the map m : Σ⋆std,n → Mn is a bijection. Proof. Let u and w be words in Σ⋆std,n such that m(u) = m(w), and let us prove u = w. Let u′ be the segment of u appearing before the first τ in u, and write u = u′u′′ ; similarly decompose w = w ′ w ′′. Note that u′ , u′′ , w ′ , and w ′′ are all standard. Every variable in m(u′ ) has second index equal to 0, while every variable in m(u′′ ) has second index greater than 0, and similarly for m(w ′ ) and m(w ′′ ). We have m(u′ )m(u′′ ) = m(u) = m(w) = m(w ′ )m(w ′′ ) and so m(u′ ) = m(w ′ ) and m(u′′ ) = m(w ′′ ). Since u′ and w ′ are standard, it is clear that u′ = w ′. If n = 0 then u′′ and w ′′ are empty and thus equal. If n > 0 then u′′ = τ u′′′ and w ′′ = τ w ′′′ and u′′′ , w ′′′ ∈ Σ⋆std,n−1 . Since T is injective on M, we have m(u′′′ ) = m(w ′′′ ). By 4 ROBERT KRONE, ANTON LEYKIN, AND ANDREW SNOWDEN induction on n, u′′′ = w ′′′ , thus u = w. We have thus shown that m : Σ⋆std → M is injective; it is clearly surjective.  We let w : M → Σ⋆std be the right-inverse to the map m which sends monomial m to the minimal length word w such that m(w) = m. The image of w is the set of words in Σ⋆std that do not end in τ . On the other hand m−1 (m) = wτ ∗ , the set of words consisting of w followed by any number of trailing τ s. Given a monomial m ∈ M, let hmi be the set of monomials m′ ∈ M such that σ(m) | m′ for some σ ∈ Inc(N). Given monomials m1 , . . . , mn , let hm1 , . . . , mn i be the union of the hmi i’s. Proposition 3.3. Let m1 , . . . , mn be monomials in R and let I the monomial ideal generated by the Inc(N)-orbits of m1 , . . . , mn . Let ρ be the weight function defined by ρ(τ ) = s and ρ(ξi ) = t for all i = 1, . . . , r. Then HI (s, t) = Hm−1 (hm1 ,...,mn i),ρ (s, t). Proof. Let I ⊂ M be the set of monomials in I. Then I = hm1 , . . . , mn i. The coefficient of sn tm in HI (s, t) is the number of monomials in I ∩ Mn of degree m. This equals the number of words in m−1 (I) in which τ appears exactly n times and which contain exactly m non-τ letters. But this is just the coefficient of sn tm in Hm−1 (I),ρ (s, t) as defined at the end of §2. Thus HI (s, t) = Hm−1 (I),ρ (s, t), and so the result follows from Proposition 2.1.  We say that a word in Σ⋆ is simple if it contains no τ . Proposition 3.4. The set Σ⋆std is a regular language on Σ. Proof. Let L be the language of simple standard words. The identity L = {ξ1 }⋆ · {ξ2 }⋆ · · · {ξn }⋆ shows that L is regular. The identity Σ⋆std = L · (τ L)⋆ now shows that Σ⋆std is regular.  Proposition 3.5. Let m ∈ M. Then m−1 (hmi) is a regular language on Σ. Proof. Write w(m) = w0 τ w1 τ · · · τ wn , where each wi is simple. Let Li be the language consisting of simple standard words w ′ such that m(wi ) | m(w ′ ). One easily sees that Li is a regular language. Let L be the regular language on Σ defined by (3.6) Σ⋆ L0 Σ⋆ τ L1 Σ⋆ τ L2 · · · Σ⋆ τ Ln Σ⋆ . We claim that a monomial m′ belongs to hmi if and only if w(m′ ) ∈ L. This will prove the proposition, as then m−1 (hmi) will coincide with L ∩ Σ⋆std , and Σ⋆std is also regular. First suppose m′ ∈ hmi, so that σ(m) | m′ for some σ ∈ Inc(N). Write m = m0 · · · mn where mj uses only the variables xi,j , and similarly write m′ = m′0 · · · m′t . Then σ(mj ) | m′σ(j) for 0 ≤ j ≤ n. We have w(m′ ) = w0′ τ w1′ τ · · · τ wt′ where τ j wj′ = w(m′j ). We can regroup this expression as ′ ′ ′ (· · · ) · · · (· · · )τ wσ(n) (· · · ) (· · · )τ wσ(1) w(m′ ) = (· · · )wσ(0) ′ ′ ) and so wσ(j) ∈ Lj . Since τ σ(j) wj = w(σ(mj )) and σ(mj ) | m′σ(j) , we see that m(wj ) | m(wσ(j) ′ ′ Thus the above expression shows that w(m ) ∈ L. Finally, if w(m ) is in L then so is the set w(m′ )τ ⋆ = m−1 (m′ ). Now suppose w ′ ∈ L. Write m(w ′ ) = m′0 · · · m′t and w ′ = w0′ τ · · · τ wt′ τ k as above. Since ′ ∈ Lj for 0 ≤ j ≤ n. w(m′ ) ∈ L, we can find σ(0) < σ(1) < · · · < σ(n) such that wσ(j) HILBERT SERIES VIA FORMAL LANGUAGES 5 Extend σ arbitrarily to an element of Inc(N). Then it is clear that σ(m) | m(w ′ ), and so m(w ′ ) ∈ hmi.  Corollary 3.7. Let m1 , . . . , mn ∈ M. Then m−1 (hm1 , . . . , mn i) is a regular language on Σ. Theorem 3.8. Let I ⊂ R be an Inc(N)-stable monomial ideal. Then HI (s, t) is a rational function. Proof. It is known (see [Co] or [HS]) that I is finitely generated up to the action of Inc(N): that is, there exist m1 , . . . , mn ∈ I, which can be taken to be monomials, such that I is the ideal generated by the Inc(N)-orbits of m1 , . . . , mn . By Propositions 3.3 and 2.1, HI (s, t) is rational if m−1 (hm1 , . . . , mn i) is a regular language, which is the result of Corollary 3.7.  Remark 3.9. The above construction can be generalized from the total degree grading to arbitrary Inc(N)-stable (multi-) grading. An Inc(N)-stable multi-grading, deg : M → Zk , is determined by the values of deg(xi,0 ) for i = 1, . . . , r. The series HI is then given by HI (s, t1 , . . . , tk ) = HΣ⋆std ,ρ (s, t1 , . . . , tk ) for weight function ρ with ρ(τ ) = s and ρ(ξi ) = deg(xi,0 ) for i = 1, . . . , r.  4. General ideals Let R be as in the previous section. We define an order ≤ on the monomials in R as follows. First, we order the variables xi,j lexicographically by comparing the second index first: that is, xi,j < xk,ℓ if j < ℓ or j = ℓ and i < k. We then order monomials by lexicographically comparing their exponents. This is a well-ordering of the monomials and compatible with multiplication. We write in(f ) for the initial term of a non-zero element f ∈ R and in(I) for the initial ideal associated to an ideal I ⊂ R. Lemma 4.1. We have in(I) ∩ Rn = in(I ∩ Rn ). Proof. It is clear that in(I ∩ Rn ) ⊂ in(I) ∩ Rn , so let us prove the reverse containment. The ideal in(I) ∩ Rn is monomial, so it suffices to show that if f ∈ I and in(f ) ∈ Rn then f ∈ Rn . But this is clear from how we ordered the variables: indeed, if in(f ) = m ∈ Rn then no monomial appearing in f can contain a variable of the form xi,j with j > n, for then that monomial would exceed m in our ordering and contradict m being the initial term, and so it follows that f ∈ Rn .  Lemma 4.2. We have HI (s, t) = Hin(I) (s, t). Proof. The coefficient of sn in HI (s, t) is equal to HI∩Rn (t). It is a standard fact that passing to the initial ideal does not affect Hilbert series, and so this is equal to Hin(I∩Rn ) (t). By the  lemma, this is equal to Hin(I)∩Rn (t), which is the coefficient of sn in Hin(I) (s, t). Theorem 4.3. Let I be an Inc(N)-stable ideal in R. Then HI (s, t) is a rational function. Proof. This follows from the previous lemma and Theorem 3.8. (Note that our monomial ordering is compatible with the action of Inc(N), and so in(I) is still Inc(N)-stable.)  6 ROBERT KRONE, ANTON LEYKIN, AND ANDREW SNOWDEN 5. An algorithm for Hilbert series We now describe an algorithm for computing HI (s, t) for an Inc(N)-stable ideal I as above. We first recall some additional background material. Suppose that L is a regular language. Then there is a finite-state automaton A that accepts precisely the words in L, see [HU, Ch. 2]. Fix such an A, and suppose that it has N states. For ℓ ∈ Σ let MA,ℓ be the associated transition matrix for A. This is the 0-1, left-stochastic N × N matrix with 1 in entry (i, j) if there is edge labeled byPℓ from state j to state i. Let e1 ∈ K n be the basis vector for the initial state, and let u = i∈F ei ∈ K n be the sum of the basis vectors corresponding to the accept states F. Then for a word w = w1 · · · wn , we have ( 1 if A accepts w t uMA,wn · · · MA,w1 e1 = 0 if A rejects w. Let ρ : Σ⋆ → M be a weight function, where M is the set of monomials in t1 , . . . , tk . Summing the above expression over all words, we find HL,ρ(t1 , . . . , tk ) = (5.1) X w∈L ρ(w) = X n≥0 t X n u ρ(ℓ)MA,ℓ e1 ℓ∈Σ −1  X t ρ(ℓ)MA,ℓ e1 . = u Id − ℓ∈Σ Thus the generating function for L can be computed directly from the automaton A. The following is our algorithm for computing HI (s, t), given as input a set of elements f1 , . . . , fr of I whose Inc(N)-orbits generate I: (1) First compute the initial ideal of I. This can be done using standard equivariant Gröbner basis techniques. We suppose that m1 , . . . , ms are monomials whose Inc(N) orbits generate the initial ideal. (2) Next construct a regular expression for the language L = m−1 (hm1 , . . . , ms i). We note that (3.6) is essentially a regular expression for m−1 (hmi) (and is obviously constructed algorithmically from m), and a regular expression for L can be obtained by “or-ing” the regular expressions for the various m−1 (hmi i). (3) From the regular expression for L, construct an automaton A that accepts L. It is well-understood how to algorithmically pass from a regular expression to an automaton, see [HU, Ch. 2]. (4) Finally, compute the Hilbert series from the automaton via (5.1), using the weight function from Proposition 3.3. This really computes the Hilbert series of the initial ideal, but this coincides with the Hilbert series of the original ideal I by Lemma 4.2. Example 5.2. Let r = 1 and I = hx21,0 i. The language m−1 (I) is detected by the regular expression (ξ1 |τ )⋆ ξ1 ξ1 (ξ1 |τ )⋆ and by the automaton HILBERT SERIES VIA FORMAL LANGUAGES ξ1 , τ τ start 1 7 ξ1 2 ξ1 3 τ where the first two states are rejecting and the last accepting. The automaton has transition matrices     1 1 0 0 0 0 MA,τ = 0 0 0 , MA,ξ1 = 1 0 0 . 0 0 1 0 1 1 We have e1 = (1, 0, 0) and u = (0, 0, 1), and so HI (s, t) = t u(Id −sMA,τ − tMA,ξ1 )−1 e1 = t2 . (1 − s − t)(1 − s − st)  We implemented functions constructing automata corresponding to monomial ideals in R and computing their Hilbert series in Macaulay2 [M2]. These along with some examples are posted at http://rckr.one/eHilbert.html. 6. Hilbert series of modules Let M be a graded R-module equipped with a compatible action of S∞ that is generated by the S∞ orbits of finitely many elements.1 A natural problem is to define a notion of Hilbert series for M and extend Theorem 1.1 to this setting. One can generalize the definition of HI as follows. Let G(n) ⊂ S∞ be the subgroup consisting of permutations that fix each of the elements 0, . . . , n. Then I ∩ Rn is identified with the invariants I G(n) . Thus in the definition of HI we can simply replace I ∩ Rn with M G(n) to obtain a definition for HM , i.e.: X HM (s, t) = HM G(n) (t)sn . n≥0 This is a perfectly well-defined series, and so one can certainly study it and investigate its rationality properties. However, as a definition of Hilbert series it is fatally flawed: formation of G(n) invariants is not exact, and so the above quantity is not additive in short exact sequences of R-modules. (For example, if I = hx1,1 − x1,0 i ⊂ R then RG(−1) is the set of constants where G(−1) = S∞ . Meanwhile (R/I)G(−1) = R/I ∼ = K[y], and therefore (R/I)G(−1) 6= RG(−1) /I G(−1) .) There are various ways one could try to fix this problem: one could substitute invariants with derived invariants, which is known to be well-behaved by [SS, §6.4.4], or with coinvariants, which is known to be exact by [SS, §6.2.11]. However, the best series to study is probably X HM = [Mn ]tn , n≥0 where [Mn ] is the class of the S∞ -representation Mn in the Grothendieck group of finitely generated algebraic representations (in the sense of [SS, §6]). Any reasonable notion of Hilbert 1For technical reasons related to our uses of [SS] below, we assume that every element of M is stabilized by a subgroup of S∞ of the form Aut({n, n + 1, . . .}). This is automatic if M is an ideal in R. 8 ROBERT KRONE, ANTON LEYKIN, AND ANDREW SNOWDEN series for M should factor through the above definition. We note that the Grothendieck group in question is identified with the ring of symmetric functions Λ, so that above series can be considered as a power series in t with coefficients in Λ. We believe there should be some sort of rationality theorem for HM , but leave this as an open problem. References [AH] Matthias Aschenbrenner, Christopher J. Hillar, Finite generation of symmetric ideals, Trans. Amer. Math. Soc., 359 (2007), 5171–5192; erratum, ibid. 361 (2009), 5627–5627. arXiv:math/0411514 [Co] D. E. Cohen, On the laws of a metabelian variety, J. Algebra 5 (1967), 267–273. [HS] Christopher J. Hillar, Seth Sullivant, Finite Gröbner bases in infinite dimensional polynomial rings and applications, Advances in Mathematics, 229 (2012), no. 1, 1–25. arXiv:0908.1777 [HU] John E. Hopcroft, Jeffrey D. Ullman, Introduction to Automata Theory, Languages, and Computation, Addison–Wesley Series in Computer Science, Addison-Wesley Publishing Co., 1979. [M2] D.R. Grayson and M.E. Stillman, Macaulay2, a software system for research in algebraic geometry, Available at http://www.math.uiuc.edu/Macaulay2/ [NR] Uwe Nagel, Tim Roemer, Equivariant Hilbert series in non-noetherian polynomial rings, preprint, 2015. arXiv:1510.02757 [SS] Steven V Sam, Andrew Snowden, Stability patterns in representation theory, Forum. Math. Sigma 3 (2015), e11, 108 pp. arXiv:1302.5859v2 [SS2] Steven V Sam, Andrew Snowden, Gröbner methods for representations of combinatorial categories, J. Amer. Math. Soc., to appear. arXiv:1409.1670v3 [St] Richard P. Stanley, Enumerative Combinatorics. Volume 1, second edition, Cambridge Studies in Advanced Mathematics 49, Cambridge University Press, Cambridge, 2012. Department of Mathematics and Statistics, Queen’s University, Kingston, ON E-mail address: [email protected] URL: http://rckr.one/ School of Mathematics, Georgia Institute of Technology, Atlanta, GA E-mail address: [email protected] URL: http://people.math.gatech.edu/~aleykin3/ Department of Mathematics, University of Michigan, Ann Arbor, MI E-mail address: [email protected] URL: http://www-personal.umich.edu/~asnowden/
0math.AC
arXiv:1609.08900v2 [math.GR] 12 May 2017 GRADIENTS OF SEQUENCES OF SUBGROUPS IN A DIRECT PRODUCT NIKOLAY NIKOLOV, ZVI SHEMTOV, AND MARK SHUSTERMAN Abstract. For a sequence {Un }∞ n=1 of finite index subgroups of a direct product G ··= A × B of finitely generated groups, we show that min{|X| : hXi = Un } =0 lim n→∞ [G : Un ] once [A : A ∩ Un ], [B : B ∩ Un ] → ∞ as n → ∞. Our proof relies on the classification of finite simple groups. For A, B that are finitely presented we show that log |Torsion(Unab )| lim = 0. n→∞ [G : Un ] 1. Introduction With motivation coming from the theory of 3-manifolds, Lackenby defined in [31] the rank gradient of a sequence {Un }∞ n=1 of finite index subgroups of a finitely generated group G to be the following combinatorial invariant (1.1) inf n d(Un ) − 1 [G : Un ] where d(K) is the least cardinality of a generating set for the group K. As can be seen from [2, 3, 4, 5, 19, 20, 23, 30, 34, 40, 41, 48, 50, 51, 52] the rank gradient has been extensively studied, calculated in various cases, and related to the notion of cost from ergodic theory. Furthermore, the rank gradient controls other interesting combinatorial invariants such as the pgradient, and the rate of growth of the first Betti number in finite index subgroups, that were studied, for instance, in [1, 3, 7, 13, 15, 18, 27, 32, 33, 35, 36, 37, 41, 46]. It is one of the main goals of asymptotic and measured group theory to calculate these gradients, and if possible, to show that they coincide for various sequences, and equal to the appropriate analytic and ergodic invariants (such as the first ℓ2 -Betti number and the cost of G). Here we accomplish this task for all the aforementioned gradients and all sequences in case that G is a direct product. Theorem 1.1. Let A, B be finitely generated groups, set G ··= A × B, and let {Un }∞ n=1 be a sequence of finite index subgroups of G. Assume that (1.2) [A : A ∩ Un ], [B : B ∩ Un ] → ∞ 1 2 NIKOLAY NIKOLOV, ZVI SHEMTOV, AND MARK SHUSTERMAN as n → ∞. Then (1.3) lim n→∞ d(Un ) − 1 = 0. [G : Un ] We should note that even the vanishing of the p-gradient (or the Betti gradient) was not previously known for these sequences. An open problem in ergodic theory analogous to Theorem 1.1 is to determine whether the direct product of every pair of finitely generated groups has fixed price. Indeed, the special case of Theorem 1.1 considering normal (or even Farber) chains (nested sequences), is at the focus of [47]. Another special case that was already known is when A, B are torsion-free (and thus G is right-angled, see [2, 26]) and the sequence is Farber. Additional motivation for Theorem 1.1 comes directly from (arithmetic) 3-manifolds. As recent breakthroughs by Agol, Wise (and others) tell us that many 3-manifolds virtually fiber over the circle, we know that their fundamental groups are semidirect products (up to a finite index). Calculating the rank gradient (or the p-gradient) of semidirect products is both notoriously difficult, and interesting from a topological and number-theoretic point of view, so it makes sense to examine the special case of direct products first. Our assumption (1.2) is necessary, since otherwise the gradients may become positive once this is the case for one of the factors A, B. Indeed the sequences we consider are very general, and this allows us to obtain vanishing of gradients for Farber chains in groups (virtually) generated by a pair of commuting infinite subgroups. These are the groups ‘presentable by a product’ that were studied in [16, 17, 28, 29]. Having considered the Betti gradient (measuring the free part of abelianizations in sequences), it is tempting to study the torsion gradient (1.4) lim inf n→∞ log |Torsion(Unab )| [G : Un ] for which we assume that G is finitely presented (otherwise, (1.4) may be infinite). This gradient, having connections to number theory, geometry, and topology, became an object of intensive study, as witnessed by [2, 6, 8, 9, 10, 11, 12, 14, 24, 35, 36, 39, 42, 43, 49, 53, 54]. Theorem 1.2. Let A, B be finitely presented groups, set G ··= A × B, and let {Un }∞ n=1 be a sequence of finite index subgroups of G. Assume that (1.5) [A : A ∩ Un ], [B : B ∩ Un ] → ∞ as n → ∞. Then (1.6) log |Torsion(Unab )| = 0. [G : Un ] Theorem 1.2 provides the first large family of groups for which the torsion gradient vanishes in (almost) all sequences, including some that are not even Farber. GRADIENTS OF SEQUENCES OF SUBGROUPS IN A DIRECT PRODUCT 3 2. Preliminaries Let G be a finitely generated group and let H ≤ G be a finite index subgroup of G. We will be frequently using the bound (2.1) d(H) ≤ d(G)[G : H]. that follows from [45, Theorem 11.44]. Proposition 2.1. Let A, B be groups, set G ··= A × B and let K ≤ G be a subgroup for which BK = G. Then A ∩ K ⊳ A. Proof. Take a ∈ A, x ∈ A ∩ K and note that since A ⊆ BK, there exist b ∈ B, k ∈ K such that a = bk. As A ⊳ G we see that kxk−1 ∈ A ∩ K, and [A, B] = {1} implies that axa−1 = bkxk−1 b−1 = kxk−1 ∈ A ∩ K.  Definition 2.2. Let G be a group and let S, X ⊆ G be subsets. We denote by hSiX the subgroup of G generated by the conjugates of S by elements of X. For a normal subgroup N ⊳G we define dG (N ) to be the least cardinality of a subset S ⊆ N for which hSiG = N . Definition 2.3. Let K be a finite group, let d ∈ N, and let T = {t1 , . . . , td } be a generating multiset of K. Take a free group F on X = {x1 , . . . , xd } and let ϕ : F → K be the unique surjection with ϕ(xi ) = ti for 1 ≤ i ≤ d. We set r(K, T ) ··= dF (Ker(ϕ)) and think of this quantity as the least number of relations needed to present K using the generating multiset T . Proposition 2.4. Let G be a group generated by a finite subset T ⊆ G, let N ⊳ G be a normal subgroup of finite index in G, and define a multiset T ⊆ G/N by T ··= {tN | t ∈ T }. Then dG (N ) ≤ r(G/N, T ). Proof. Let F be the free group on T , and let ϕ : F → G/N be the unique surjection for which ϕ(t) = tN for all t ∈ T . By 2.3 there exists a subset S ⊆ Ker(ϕ) of cardinality r(G/N, T ) such that hSiF = Ker(ϕ). Define a surjection ψ : F → G by ψ|T = IdT , and observe that (2.2) N = ψ(Ker(ϕ)) = ψ(hSiF ) = hψ(S)iG 2.2 so that dG (N ) ≤ |ψ(S)| ≤ |S| = r(G/N, T ) as required.  Let K be a finite group generated by a multiset T = {t1 , . . . , td }, let N be a minimal normal subgroup of K, let S be a finite simple group onto which N surjects, and define the multiset T ··= {t1 N, . . . , td N }. The following bound comes from the argument appearing in the proof of Theorem 1 in [38] and in the discussion following the proof of Theorem 2 therein. (2.3) r(K, T ) ≤ r(K/N, T ) + 6d log2 |N | + r(S, W ) where W is any pair of elements generating S. It follows from [21, Corollary A’, Lemma 2.1, Theorem 4.34] and [38, Theorem 1] that (2.4) r(S, W ) ≤ 8|S|3/7 . 4 NIKOLAY NIKOLOV, ZVI SHEMTOV, AND MARK SHUSTERMAN Corollary 2.5. Let K be a finite group generated by a multiset T . Then (2.5) r(K, T ) ≤ 128|T ||K|3/7 . Proof. Let N be a minimal normal subgroup of K, and let S be a finite simple factor of N . By induction, (2.3), and (2.4), we have (2.6) r(K, T ) ≤ r(K/N, T ) + 6|T | log2 |N | + 8|S|3/7  |K| 3/7 + 6|T | log2 |N | + 8|N |3/7 ≤ 128|T | |N |  |K| 3/7 + 24|T ||N |3/7 + 8|T ||N |3/7 ≤ 128|T | |N | !  |K| 3/7 3 3/7 3/7 = 128|T | + |N | − |N | |N | 4   3 ≤ 128|T | |K|3/7 + 1 − |N |3/7 4   3 ≤ 128|T | |K|3/7 + 1 − 23/7 ≤ 128|T ||K|3/7 . 4  Let E be a finite group with a presentation (2.7) 1 −→ N −→ F −→ E −→ 1 where F is free. The Schur multiplier (see [44, Theorem 10.12]) of E is  (2.8) M (E) = N ∩ [F, F ] /[F, N ]. This is a finite abelian group whose order admits the following bound. Corollary 2.6. Let E be a finite group. Then |M (E)| ≤ |E|log |E| . (2.9) Proof. Let S be the set of primes dividing |E|, and for each p ∈ S fix a p-Sylow subgroup P of E. It follows from [25, Proposition 2.1.1] that Y (2.10) |M (E)| = |M (E) ⊗Z Zp |. p∈S By [25, Theorem 2.1.2], for every p ∈ S we have (2.11) |M (E) ⊗Z Zp | ≤ |M (P )| and by [25, Corollary 3.1.5] (2.12) |M (P )| ≤ |P |log |P | . GRADIENTS OF SEQUENCES OF SUBGROUPS IN A DIRECT PRODUCT 5 Combining everything, we get that (2.13) 2.10 Y 2.11 Y |M (E)| ≤ |M (E) ⊗Z Zp | ≤ |M (P )| p∈S p∈S Y 2.12 Y ≤ |P |log |P | ≤ |P |log |E| = |E|log |E| . p∈S p∈S  In terms of our presentation for E we thus have h i h i h i [F, F ] : [F, N ] ≤ [F, F ] : N ∩ [F, F ] · N ∩ [F, F ] : [F, N ] (2.14) ≤ [F : N ] · |M (E)| ≤ |E|1+log |E| . In a manner similar to Proposition 2.4 one can deduce the following. Corollary 2.7. For a finite index normal subgroup A0 of a group A we have h i (2.15) [A, A] : [A, A0 ] ≤ [A : A0 ]1+log[A:A0] . 3. Upper bounds on the number of generators We establish several bounds on the number of generators of a finite index subgroup of a direct product, and conclude that the rank gradient vanishes. Theorem 3.1. Let A, B be finitely generated groups, and let H be a finite index subgroup of G ··= A × B. Then d(H) is bounded by: (1) d(G)([G : AH] + [AH : H]) (2) d(G)([G : BH] + [BH : H]) (3) d(G)([G : AH] + 130[G : BH][G : H]3/7 ). Proof. For (1) note that (3.1) 2.1 d(H) ≤ d(H/H ∩ A) + d(H ∩ A) ≤ d(AH/A) + d(A)[A : H ∩ A] 2.1 ≤ d(AH) + d(A)[AH : H] ≤ d(G)[G : AH] + d(G)[AH : H] as required. To get (2) just replace A with B in (3.1). For (3) let πA , πB be the projections from G onto A, B and observe that H ≤ πA (H) × πB (H) is a subgroup that complements πB (H) (that is, πB (H)H = πA (H) × πB (H)). By Proposition 2.1, πA (H) ∩ H ⊳ πA (H). We can thus take a subset S ⊆ πA (H) ∩ H of least cardinality, with (3.2) hSiπA (H) = πA (H) ∩ H. Furthermore, take RA (respectively, RB ) to be a subset of H mapped bijectively by πA (respectively, πB ) onto a generating set of πA (H) (respectively, 6 NIKOLAY NIKOLOV, ZVI SHEMTOV, AND MARK SHUSTERMAN πB (H)) of least cardinality. Set L ··= hS ∪ RA ∪ RB i and note that L ≤ H. Since S ⊆ A, conjugation by B does not affect it, so we find that 3.2 Ker(πB |H ) = πA (H) ∩ H = hSiπA (H) (3.3) 2.2 = hSiBπA (H) = hSiBhRA i = hSihRA i ≤ L. On the other hand, πB (H) = πB (hRB i) ≤ πB (L) so in conjunction with (3.3) we conclude that L = H. Thus d(H) = d(L) ≤ |S| + |RA | + |RB | = dπA (H) (πA (H) ∩ H) + d(πA (H)) + d(πB (H)) 2.4 ≤ r(πA (H)/πA (H) ∩ H, πA (RA )) + d(πA (H)) + d(πB (H)) (3.4) 2.5 ≤ 128d(πA (H))[G : H]3/7 + d(πA (H)) + d(πB (H)). Moreover, (3.5) 2.1 d(πA (H)) ≤ d(A)[A : πA (H)] = d(A)[G : BH] ≤ d(G)[G : BH] and similarly, we have d(πB (H)) ≤ d(G)[G : AH]. Combining this inequality, (3.4), and (3.5) we obtain (3).  Let us now deduce Theorem 1.1. Proof. Suppose that our claim is false, so (after passing to a subsequence) we may assume that the limit in (1.6) is positive. By Theorem 3.1 (1),   1 1 d(Un ) ≤ d(G) + (3.6) [G : Un ] [AUn : Un ] [G : AUn ] and the first summand on the right hand side tends to 0 in view of our assumption that [A : A ∩ Un ] → ∞ as n → ∞. Since the left hand side of (3.6) tends to some c > 0, we conclude that [G : AUn ] is bounded as n → ∞. Similarly, [G : BUn ] is bounded. Finally, apply Theorem 3.1 (3) to Un .  4. Lower bounds on the number of generators To which extent are the bounds in Theorem 3.1 tight? Suppose that A and B are isomorphic to a free group F on two generators. Clearly, (1) and (2) are tight up to a constant once H ··= A0 × B0 where A0 , B0 ≤ A, B are subgroups with [A : A0 ] = [B : B0 ]. It is conjectured ([38, Conjecture 2]) that every finite group has a presentation with a logarithmic number of relations. If this improvement of Corollary 2.5 holds, then the argument from the proof of Theorem 3.1 (3) gives a logarithmic bound on the number of generators as a function of the index of H in G. Let us show that such a bound is tight (up to a constant). Fix a prime p, and let {Pn }∞ n=1 be the lower p-central series defined by (4.1) P1 = F, Pn+1 = Pnp [F, Pn ]. GRADIENTS OF SEQUENCES OF SUBGROUPS IN A DIRECT PRODUCT 7 Set (4.2) pan ··= |Pn /Pn+1 |, bn ··= n X ai . i=1 By [22, Corollary 3.4], an = by (4.3) Pn i=1 ri where ri are the Witt numbers given 1X µ ri = i j|i   i 2j . j 2n /n, It is thus easy and in particular radius of conP∞to see nthat rn ∼ P∞ n the 2 vergence of n=1 rn x is 1/2. Multiplying by ( n=0 x ) we deduce that P∞ n has the same radius of convergence, and thus b x n n=1 (4.4) lim sup n→∞ bn bn−1 ≥ 2. Set Un ··= {(x, y) ∈ F × F | xPn = yPn }. We have (4.5) [F × F : Un ] = pbn−1 = [F × {1} : F × {1} ∩ Un ]. We claim that Un maps onto the elementary abelian group Pn /Pn+1 . Let ∆ ≤ (F/Pn+1 ) × (F/Pn+1 ) be the image of Un mod Pn+1 . That is (4.6) ∆ ··= {(xPn+1 , yPn+1 ) ∈ (F/Pn+1 ) × (F/Pn+1 ) | xPn = yPn }. Let L ··= {(xPn+1 , xPn+1 ) | x ∈ F } be the diagonal subgroup of ∆. Clearly, L is a normal subgroup of ∆ that commutes with (Pn /Pn+1 ) × (Pn /Pn+1 ).  Moreover, L∩ (Pn /Pn+1 )×(Pn /Pn+1 ) is the diagonal subgroup isomorphic to Pn /Pn+1 . It follows that (4.7) (Pn /Pn+1 ) × (Pn /Pn+1 ) ∆∼ ∼ = = Pn /Pn+1 . L L ∩ ((Pn /Pn+1 ) × (Pn /Pn+1 )) Hence Un has Pn /Pn+1 as a homomorphic image and therefore d(Un ) ≥ an . At last, note that for any ǫ > 0 we have (4.8) 4.4 d(Un ) an bn ≥ = −1 ≥ 1−ǫ logp [F × F : Un ] bn−1 bn−1 where the last inequality holds for infinitely many values of n (that is, (4.8) holds for a subsequence of {Un }∞ n=1 ). 5. Upper bounds on torsion in the abelianization In the following we give the bound needed to establish Theorem 1.2. The torsion subgroup of an abelian group M is denoted by t(M ). Lemma 5.1. Let A, B be finitely generated groups, and let H be a finite index subgroup of G ··= A × B. Then (5.1) |t(H ab )| ≤ |t(πA (H)ab )| · |t(πB (H)ab )| · [G : H]2(1+log[G:H]). 8 NIKOLAY NIKOLOV, ZVI SHEMTOV, AND MARK SHUSTERMAN Proof. We use the shorthand K ′ to denote the commutator subgroup [K, K] of a group K, and set (5.2) A0 ··= πA (H) ∩ H = A ∩ H, B0 ··= πB (H) ∩ H = B ∩ H. Applying Proposition 2.1, we conclude that A0 ⊳ πA (H), B0 ⊳ πB (H) are normal subgroups of finite index. One shows easily that  (5.3) [πA (H), A0 ] × [πB (H), B0 ] ≤ H ′ ≤ H ∩ πA (H)′ × πB (H)′ so by Corollary 2.7 we have i h  H ∩ πA (H)′ × πB (H)′ : H ′ ≤ h (5.4) h h πA (H)′ × πB (H)′ : H ′ i 5.3 ≤ i πA (H)′ × πB (H)′ : [πA (H), A0 ] × [πB (H), B0 ] = i h i 2.7 πA (H)′ : [πA (H), A0 ] · πB (H)′ : [πB (H), B0 ] ≤ i1+log[πA (H):A0 ] h i1+log[πB (H):B0 ] 5.2 πA (H) : A0 · πB (H) : B0 ≤ h i2(1+log[G:H]) G:H . h In particular, by (5.4), the subgroup   (5.5) M ··= H ∩ πA (H)′ × πB (H)′ /H ′ of H ab is finite, so |t(H/H ′ )| = |M | · |H ab /M | ≤ |M | · t (5.6)  ab  πA (H) × πB (H) 5.4 ≤ [G : H]2(1+log[G:H]) · |t(πA (H)ab )| · |t(πB (H)ab )|.  In order to obtain Theorem 1.2 from Lemma 5.1, one just has to note that our assumption (1.5) on the growth of the indices to infinity in Theorem 1.2, implies that the first two factors in (5.1) grow subexponentially with the index of a subgroup in a sequence, since the torsion in the abelianization of finite index subgroups of a finitely presented group grows at most exponentially with the index. Acknowledgments This work is partially supported by the ERC grant ANALYTIC no. 259527 of Goulnara Arzhantseva. Mark Shusterman is grateful to the Azrieli Foundation for the award of an Azrieli Fellowship. The third author was partially supported by a grant of the Israel Science Foundation with cooperation of UGC no. 40/14. GRADIENTS OF SEQUENCES OF SUBGROUPS IN A DIRECT PRODUCT 9 References [1] M. Abert, N. Bergeron, I. Biringer, T. Gelander, N. Nikolov, J. Raimbault, I. Samet, On the growth of L2 -invariants for sequences of lattices in Lie groups, To appear in Ann. Math. [2] M. Abert, T. Gelander, N. Nikolov, Rank, combinatorial cost and homology torsion growth in higher rank lattices, preprint, 2015. [3] M. Abert, A. Jaikin-Zapirain, N. Nikolov, The rank gradient from a combinatorial viewpoint, Groups, Geom., and Dyn. 5, 2, 213-230, 2011. [4] M. Abert, N. Nikolov, Rank gradient, cost of groups and the rank versus Heegaard genus problem, J. of the Europ. Math. Soc. 14, 5, 1657-1677, 2012. [5] D. J. Allums, R. I. Grigorchuk, The rank gradient and the Lamplighter Group, Involve J. of Math. 4, 3, 297-305, 2011. [6] U. Bader, T. Gelander, R. Sauer, Homology and homotopy complexity in negative curvature, preprint, arXiv:1612.04871, 2016. [7] N. Bergeron, P. Linnell, W. Luck, R. Sauer, On the growth of Betti numbers in p-adic analytic towers, preprint, arXiv:1204.3298. [8] N. Bergeron, M. Lipnowski, Twisted limit formula for torsion and cyclic base change, preprint, arXiv:1409.6749, 2014. [9] N. Bergeron, A. Venkatesh, The asymptotic growth of torsion homology for arithmetic groups, J. Inst. Math. Jussieu, 12(02), 391-447, 2013. [10] N. Bergeron, M. H. Sengun, A. Venkatesh, Torsion homology growth and cycle complexity of arithmetic manifolds, Duke Math. J. 165(9), 1629-1693, 2016. [11] O. Braunling, Torsion homology growth beyond asymptotics, preprint, arXiv:1702.06243, 2017. [12] J. Brock, N. Dunfield, Injectivity radii of hyperbolic integer homology 3-spheres, Geom. & Top. 19(1), 497-523, 2015. [13] F. Calegari, M. Emerton, Mod-p cohomology growth in p-adic analytic towers of 3manifolds, Groups, Geom. Dyn. 5, 2, 355-366, 2011. [14] F. Calegari, A. Venkatesh, A torsion Jacquet–Langlands correspondence, preprint, arXiv:1212.3847, 2012. [15] B. Clair, K. Whyte, Growth of Betti numbers, Topology, 42, 5, 1125-1142, 2003. [16] P. de la Harpe, Brouwer degree, domination of manifolds, and groups presentable by products, preprint arXiv:1609.06637, 2016. [17] P. de la Harpe, D. Kotschick, Presentability by products for some classes of groups, J.Top. Anal. 1-23, 2014. [18] M. Ershov, W. Luck, The First L2 -Betti Number and Approximation in Arbitrary Characteristic, Doc. Math. 19, 313-331, 2014. [19] D. Girao, Rank gradient in co-final towers of certain Kleinian groups, Groups Geom. Dyn. 8, 143-155, 2014. [20] R. Grigorchuk, R. Kravchenko, On the lattice of subgroups of the lamplighter group, Int. J. Alg. Comput. 24, 837, 2014. [21] R. Guralnick, W. Kantor, M. Kassabov, A. Lubotzky, Presentations of finite simple groups: a quantitative approach, J. Amer. Math. Soc. 21, 3, 711-774, 2008. [22] G.T. Helleloid, U. Martin, The automorphism group of a finite p-group is almost always a p-group, Formal Power Series and Algebraic Combinatorics, Nankai University, Tianjin, China, 2007. [23] A. Kar, N. Nikolov, Cost and rank gradient of Artin groups and their relatives, Groups, Geom., and Dyn. 8, 4, 1195-1205, 2014. [24] A. Kar, P. Kropholler, N. Nikolov, On growth of homology torsion in amenable groups, Math. Proc. Camb. Phil. Soc. 162, 2, 2017. [25] G. Karpilovsky, The Schur multiplier, Oxford, 1987. 10 NIKOLAY NIKOLOV, ZVI SHEMTOV, AND MARK SHUSTERMAN [26] A. Kechris, B. Miller, Topics in orbit equivalence, No. 1852. Springer Science & Business Media, 2004. [27] S. Kionke, J. Schwermer, On the growth of the first Betti number of arithmetic hyperbolic 3-manifolds, preprint, arXiv : 1204.3750, 2012. [28] D. Kotschick, C. Loh, Fundamental classes not representable by products, J. London Math. Soc. 79, 545-561, 2009. [29] D. Kotschick, C. Loh, Groups not presentable by products, Groups Geom. Dyn. 7, 181-204, 2013. [30] M. Lackenby, A characterisation of large finitely presented groups, J. Algebra, 287, 458-473, 2005. [31] M. Lackenby, Expanders, rank and graphs of groups, Isr. J. Math. 146, 357-370, 2005. [32] M. Lackenby, Finite covering spaces of 3-manifolds, Proc. ICM, 2, 2010. [33] P. Linnell, W. Luck, R. Sauer, The limit of Fp -Betti numbers of a tower of finite covers with amenable fundamental groups, Proc. Amer. Math. Soc. 139 (2) : 421-434, 2011. [34] C. Loh, Rank gradient vs. stable integral simplicial volume, preprint, arXiv:1704.05222, 2017. [35] W. Luck, L2 -invariants: theory and applications to geometry and K-theory, Vol. 44. Springer Science & Business Media, 2013. [36] W. Luck, Survey on approximating L2 -invariants by their classical counterparts: Betti numbers, torsion invariants and homological growth, preprint, arXiv:1501.07446, 2015. [37] W. Luck, D. Osin, Approximating the first L2 -Betti number of residually finite groups, J. Top. Anal. 3, 2, 153-160, 2011. [38] A. Mann, Enumerating finite groups and their defining relations, J. Group Theory, 59-64, 1998. [39] N. Nikolov, Growth of homology torsion of metabelian groups, preprint, arXiv:1610.05944, 2016. [40] D. Osin, Rank gradient and torsion groups, Bull. Lond. Math. Soc. 43, 1, 10-16, 2011. [41] N. Pappas, Rank Gradient and p-gradient of Amalgamated Free Products and HNN Extensions, Comm. in Alg. 43, 10, 4515-4527, 2015. [42] J. Raimbault, Exponential growth of torsion in abelian coverings, Alg. & Geom. Top. 12(3), 1331-1372, 2012. [43] I. Rivin, Statistics of Random 3-Manifolds occasionally fibering over the circle, preprint, arXiv:1401.5736, 2014. [44] J. Rotman, An introduction to homological algebra, Springer Science & Business Media, 2008. [45] J. Rotman, An introduction to the theory of groups, Vol. 148. Springer Science & Business Media, 2012. [46] R. Sauer, Volume and homology growth of aspherical manifolds, Geom. Top. 20, 2, 1035-1059, 2016. [47] B. Seward, R. Tucker-Drob, Rank gradient of Farber chains of subgroups in a direct product, Unpublished note. [48] J.C. Schlage-Puchta, A p-group with positive Rank Gradient, J. of Group Theory. 15, 2, 261-270, 2012. [49] M. H. Sengun, On the torsion homology of non-arithmetic hyperbolic tetrahedral groups, Inter. J. Number Theory, 8 (02), 311-320, 2012. [50] M. Shusterman, Ranks of subgroups in boundedly generated groups, Bull. Lond. Math. Soc. 48, 3, 539-547, 2016. [51] M. Shusterman, Groups with positive rank gradient and their actions, To appear in Mathematica Slovaca. [52] M. Shusterman, Ascending chains of finitely generated subgroups, J. Alg. 471, 240-250, 2017. GRADIENTS OF SEQUENCES OF SUBGROUPS IN A DIRECT PRODUCT 11 [53] D. Silver, S. Williams, Mahler measure, links and homology growth, Topology, 41(5), 979-991, 2002. [54] H. Sun, Virtual homological torsion of closed hyperbolic 3-manifolds, J. Diff. Geom. 100 (3), 547-583, 2015. University of Oxford, OX2 6GG Oxford, UK E-mail address: [email protected] Raymond and Beverly Sackler School of Mathematical Sciences, Tel-Aviv University, Tel-Aviv, Israel E-mail address: [email protected] Raymond and Beverly Sackler School of Mathematical Sciences, Tel-Aviv University, Tel-Aviv, Israel E-mail address: [email protected]
4math.GR
ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans Anna Lukina1 , Lukas Esterle1 , Christian Hirsch1 , Ezio Bartocci1 , Junxing Yang2 , Ashish Tiwari3 , Scott A. Smolka2 , and Radu Grosu1,2 arXiv:1612.07059v1 [cs.AI] 21 Dec 2016 1 Cyber-Physical Systems Group, Technische Universität Wien, Austria 2 Department of Computer Science, Stony Brook University, USA 3 SRI International, USA Abstract. We introduce ARES, an efficient approximation algorithm for generating optimal plans (action sequences) that take an initial state of a Markov Decision Process (MDP) to a state whose cost is below a specified (convergence) threshold. ARES uses Particle Swarm Optimization, with adaptive sizing for both the receding horizon and the particle swarm. Inspired by Importance Splitting, the length of the horizon and the number of particles are chosen such that at least one particle reaches a next-level state, that is, a state where the cost decreases by a required delta from the previous-level state. The level relation on states and the plans constructed by ARES implicitly define a Lyapunov function and an optimal policy, respectively, both of which could be explicitly generated by applying ARES to all states of the MDP, up to some topological equivalence relation. We also assess the effectiveness of ARES by statistically evaluating its rate of success in generating optimal plans. The ARES algorithm resulted from our desire to clarify if flying in V-formation is a flocking policy that optimizes energy conservation, clear view, and velocity alignment. That is, we were interested to see if one could find optimal plans that bring a flock from an arbitrary initial state to a state exhibiting a single connected V-formation. For flocks with 7 birds, ARES is able to generate a plan that leads to a V-formation in 95% of the 8,000 random initial configurations within 63 seconds, on average. ARES can also be easily customized into a model-predictive controller (MPC) with an adaptive receding horizon and statistical guarantees of convergence. To the best of our knowledge, our adaptive-sizing approach is the first to provide convergence guarantees in receding-horizon techniques. 1 Introduction Flocking or swarming in groups of social animals (birds, fish, ants, bees, etc.) that results in a particular global formation is an emergent collective behavior that continues to fascinate researchers [1, 8]. One would like to know if such a formation serves a higher purpose, and, if so, what that purpose is. One well-studied flight-formation behavior is V-formation. Most of the work in this area has concentrated on devising simple dynamical rules that, when followed by each bird, eventually stabilize the flock to the desired V-formation [12, 2 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu 13, 26]. This approach, however, does not shed very much light on the overall purpose of this emergent behavior. In previous work [35,36], we hypothesized that flying in V-formation is nothing but an optimal policy for a flocking-based Markov Decision Process (MDP) M. States of M, at discrete time t, are of the form (xi (t), v i (t)), 1 6 i 6 N , where xi (t) and v i (t) are N -vectors (for an N -bird flock) of 2-dimensional positions and velocities, respectively. M’s transition relation, shown here for bird i is simply and generically given by xi (t + 1) = xi (t) + v i (t + 1), v i (t + 1) = v i (t) + ai (t), where ai (t) is an action, a 2-dimensional acceleration in this case, that bird i can take at time t. M’s cost function reflects the energy-conservation, velocityalignment and clear-view benefits enjoyed by a state of M (see Section 2). In this paper, we not only confirm this hypothesis, but we also devise a very general adaptive, receding-horizon synthesis algorithm (ARES) that, given an MDP and one of its initial states, generates an optimal plan (action sequence) taking that state to a state whose cost is below a desired threshold. In fact, ARES implicitly defines an optimal, online-policy, synthesis algorithm that could be used in practice if plan generation can be performed in real-time. ARES makes repeated use of Particle Swarm Optimization (PSO) [22] to effectively generate a plan. This was in principle unnecessary, as one could generate an optimal plan by calling PSO only once, with a maximum plan-length horizon. Such an approach, however, is in most cases impractical, as every unfolding of the MDP adds a number of new dimensions to the search space. Consequently, to obtain an adequate coverage of this space, one needs a very large number of particles, a number that is either going to exhaust available memory or require a prohibitive amount of time to find an optimal plan. A simple solution to this problem would be to use a short horizon, typically of size two or three. This is indeed the current practice in Model Predictive Control (MPC) [14]. This approach, however, has at least three major drawbacks. First, and most importantly, it does not guarantee convergence and optimality, as one may oscillate or become stuck in a local optimum. Second, in some of the steps, the window size is unnecessarily large thereby negatively impacting performance. Third, in other steps, the window size may be not large enough to guide the optimizer out of a local minimum (see Fig. 1 (left)). One would therefore like to find the proper window size adaptively, but the question is how one can do it. Inspired by Importance Splitting (IS), a sequential Monte-Carlo technique for estimating the probability of rare events, we introduce the notion of a level-based horizon (see Fig. 1 (right)). Level `0 is the cost of the initial state, and level `m is the desired threshold. By using a state function, asymptotically converging to the desired threshold, we can determine a sequence of levels, ensuring convergence of ARES towards the desired optimal state(s) having a cost below `m = ϕ. The levels serve two purposes. First, they implicitly define a Lyapunov function, which guarantees convergence. If desired, this function can be explicitly ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans Cost 3 Level `0 `0 `1 `1 . . . `i `i `i+1 `i+1 . . . ϕ s0 s1 . . . si ... si+3 State `m s0s1 si si+3 . . . s∗ State Fig. 1. Left: If state s0 has cost `0 , and its successor-state s1 has cost less than `1 , then a horizon of length 1 is appropriate. However, if si has a local-minimum cost `i , one has to pass over the cost ridge in order to reach level `i+1 , and therefore ARES has to adaptively increase the horizon to 3. Right: The cost of the initial state defines `0 and the given threshold ϕ defines `m . By choosing m equal segments on an asympthotically converging (Lyapunov) function (where the number m is empirically determined), one obtains on the vertical cost-axis the levels required for ARES to converge. generated for all states, up to some topological equivalence. Second, the levels help PSO overcome local minima (see Fig. 1 (left)). If reaching a next level requires PSO to temporarily pass over a state-cost ridge, ARES incrementally increases the size of the horizon, up to a maximum length. Another idea imported from IS is to maintain n clones of the initial state at a time, and run PSO on each of them (see Fig. 3). This allows us to call PSO for each clone and desired horizon, with a very small number of particles per clone. Clones that do not reach the next level are discarded, and the successful ones are resampled. The number of particles is increased if no clone reaches a next level, for all horizons chosen. Once this happens, we reset the horizon to one, and repeat the process. In this way, we adaptively focus our resources on escaping from local minima. At the last level, we choose the optimal particle (a V-formation in case of flocking) and traverse its predecessors to find a plan. We asses the rate of success in generating optimal plans in form of an (ε, δ)approximation scheme, for a desired error margin ε, and confidence ratio 1−δ. Moreover, we can use the state-action pairs generated during the assessment (and possibly some additional new plans) to construct an explicit (tabled) optimal policy, modulo some topological equivalence. Given enough memory, one can use this policy in real time, as it only requires a table look-up. To experimentally validate our approach, we have applied ARES to the problem of V-formation in bird flocking (with a deterministic MDP). The cost function to be optimized is defined as a weighted sum of the (flock-wide) clear-view, velocity-alignment, and upwash-benefit metrics. Clear view and velocity alignment are more or less obvious goals. Upwash optimizes energy savings. By flapping its wings, a bird generates a trailing upwash region off its wing tips; by using this upwash, a bird flying in this region (left or right) can save energy. 4 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu Note that by requiring that at most one bird does not feel its effect, upwash can be used to define an analog version of a connected graph. We ran ARES on 8,000 initial states chosen uniformly and at random, such that they are packed closely enough to feel upwash, but not too close to collide. We succeeded to generate a V-formation 95% of the time, with an error margin of 0.05 and a confidence ratio of 0.99. These error margin and confidence ratio dramatically improve if we consider all generated states and the fact that each state within a plan is independent from the states in all other plans. The rest of this paper is organized as follows. Section 2 reviews our work on bird flocking and V-formation, and defines the manner in which we measure the cost of a flock (formation). Section 3 revisits the swarm optimization algorithm used in this paper, and Section 4 examines the main characteristics of importance splitting. Section 5 states the definition of the problem we are trying to solve. Section 6 introduces ARES, our adaptive receding-horizon synthesis algorithm for optimal plans, and discusses how we can extend this algorithm to explicitly generate policies. Section 7 measures the efficiency of ARES in terms of an (ε, δ)approximation scheme. Section 8 compares our algorithm to related work, and Section 9 draws our conclusions and discusses future work. 2 V-Formation MDP We represent a flock of birds as a dynamically evolving system. Every bird in our model [17] moves in 2-dimensional space performing acceleration actions determined by a global controller. Let xi (t), v i (t) and ai (t) be 2-dimensional vectors of positions, velocities, and accelerations, respectively, of bird i at time t, where i ∈ {1, . . . , b}, for a fixed b. The discrete-time behavior of bird i is then xi (t + 1) = xi (t) + v i (t + 1), v i (t + 1) = v i (t) + ai (t). (1) The controller detects the positions and velocities of all birds through sensors, and uses this information to compute an optimal acceleration for the entire flock. A bird uses its own component of the solution to update its velocity and position. We extend this discrete-time dynamical model to a (deterministic) MDP by adding a cost (fitness) function4 based on the following metrics inspired by [35]: – Clear View (CV ). A bird’s visual field is a cone with angle θ that can be blocked by the wings of other birds. We define the clear-view metric by accumulating the percentage of a bird’s visual field that is blocked by other birds. Fig. 2 (left) illustrates the calculation of the clear-view metric. The optimal value in a V-formation is CV ∗ = 0, as all birds have a clear view. – Velocity Matching (VM ). The accumulated differences between the velocity of each bird and all other birds, summed up over all birds in the flock defines VM . Fig. 2 (middle) depicts the values of VM in a velocity-unmatched flock. 4 A classic MDP [28] is obtained by adding sensor/actuator or wind-gust noise. ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans 5 Fig. 2. Illustration of the clear view (CV ), velocity matching (VM ), and upwash benefit (UB ) metrics. Left: Bird i’s view is partially blocked by birds j and k. Hence, its clear view is CV = (α + β)/θ. Middle: A flock and its unaligned bird velocities results in a velocity-matching metric VM = 6.2805. In contrast, VM = 0 when the velocities of all birds are aligned. Right: Illustration of the (right-wing) upwash benefit bird i receives from bird j depending on how it is positioned behind bird j. Note that bird j’s downwash region is directly behind it. The optimal value in a V-formation is VM ∗ = 0, as all birds will have the same velocity (thus maintaining the V-formation). – Upwash Benefit (UB ). The trailing upwash is generated near the wingtips of a bird, while downwash is generated near the center of a bird. We accumulate all birds’ upwash benefits using a Gaussian-like model of the upwash and downwash region, as shown in Fig. 2 (right) for the right wing. The maximum upwash a bird can obtain has an upper bound of 1. For bird i with UB i , we use 1 −UB i as its upwash-benefit metric, because the optimization algorithm performs minimization of the fitness metrics. The optimal value in a Vformation is UB ∗ = 1, as the leader does not receive any upwash. Finding smooth and continuous formulations of the fitness metrics is a key element of solving optimization problems. The PSO algorithm has a very low probability of finding an optimal solution if the fitness metric is not well-designed. Let c(t) = {ci (t)}bi=1 = {xi (t), v i (t)}bi=1 be a flock configuration at time-step t. Given the above metrics, the overall fitness (cost) metric J is of a sum-ofsquares combination of VM , CV , and UB defined as follows: J(c(t), ah (t), h) = (CV (cha (t)) − CV ∗ )2 + (VM (cha (t)) − VM ∗ )2 + (UB (cha (t)) − UB ∗ )2 , (2) where h is the receding prediction horizon (RPH), ah (t) is a sequence of accelerations of length h, and cha (t) is the configuration reached after applying ah (t) to c(t). Formally, we have cha (t) = {xha (t), v ha (t)} = {x(t) + h(t) X τ =1 v(t + τ ), v(t) + h(t) X aτ (t)}, (3) τ =1 where aτ (t) is the τ th acceleration of ah (t). A novelty of this paper is that, as described in Section 6, we allow RPH h(t) to be adaptive in nature. 6 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu The fitness function J has an optimal value of 0 in a perfect V-formation. The main goal of ARES is to compute the sequence of acceleration actions that lead the flock from a random initial configuration towards a controlled Vformation characterized by optimal fitness in order to conserve energy during flight including optimal combination of a clear visual field along with visibility of lateral neighbors. Similar to the centralized version of the approach given in [35], ARES performs a single flock-wide minimization of J at each time-step t to obtain an optimal plan of length h of acceleration actions: opt-ah (t) = {opt-ahi (t)}bi=1 = arg min J(c(t), ah (t), h). (4) ah (t) The optimization is subject to the following constraints on the maximum velocities and accelerations: ||v i (t)|| 6 v max , ||ahi (t)|| 6 ρ||v i (t)|| ∀ i ∈ {1, . . . , b}, where v max is a constant and ρ ∈ (0, 1). The initial positions and velocities of each bird are selected at random within certain ranges, and limited such that the distance between any two birds is greater than a (collision) constant dmin , and small enough for all birds, except for at most one, to feel the UB . In the following sections, we demonstrate how to generate optimal plans taking the initial state to a stable state with optimal fitness. 3 Particle Swarm Optimization Particle Swarm Optimization (PSO) is a randomized approximation algorithm for computing the value of a parameter minimizing a possibly nonlinear cost (fitness) function. Interestingly, PSO itself is inspired by bird flocking [22]. Hence, PSO assumes that it works with a flock of birds. Note, however, that in our running example, these birds are “acceleration birds” (or particles), and not the actual birds in the flock. Each bird has the same goal, finding food (reward), but none of them knows the location of the food. However, every bird knows the distance (horizon) to the food location. PSO works by moving each bird preferentially toward the bird closest to food. ARES uses Matlab-Toolbox particleswarm, which performs the classical version of PSO. This PSO creates a swarm of particles, of size say p, uniformly at random within a given bound on their positions and velocities. Note that in our example, each particle represents itself a flock of bird-acceleration sequences {ahi }bi=1 , where h is the current length of the receding horizon. PSO further chooses a neighborhood of a random size for each particle j, j = {1, . . . , p}, and computes the fitness of each particle. Based on the fitness values, PSO stores two vectors for j: its so-far personal-best position xjP (t), and its fittest neighbor’s position xjG (t). The positions and velocities of each particle j in the particle swarm 1 6 j 6 p are updated according to the following rule: vj (t + 1) = ω · vj (t) + y1 · u1 (t + 1) ⊗ (xjP (t) − xj (t)) + y2 · u2 (t + 1) ⊗ (xjG (t) − xj (t)), (5) ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans 7 where ω is inertia weight, which determines the trade-off between global and local exploration of the swarm (the value of ω is proportional to the exploration range); y1 and y2 are self adjustment and social adjustment, respectively; u1 , u2 ∈ Uniform(0, 1) are randomization factors; and ⊗ is the vector dot product, that is, ∀ random vector z: (z1 , . . . , zb ) ⊗ (xj1 , . . . , xjb ) = (z1 xj1 , . . . , zb xjb ). If the fitness value for xj (t + 1) = xj (t) + vj (t + 1) is lower than the one for xjP (t), then xj (t + 1) is assigned to xjP (t + 1). The particle with the best fitness over the whole swarm becomes a global best for the next iteration. The procedure is repeated until the number of iterations reaches its maximum, the time elapses, or the minimum criteria is satisfied. For our bird-flock example we obtain in this way the best acceleration. 4 Importance Splitting Importance Splitting (IS) is a sequential Monte-Carlo approximation technique for estimating the probability of rare events in a Markov process [7]. The algorithm uses a sequence S0 , S1 , S2 , . . . , Sm of sets of states (of increasing “importance”) such that S0 is the set of initial states and Sm is the set of states defining the rare event. The probability p, computed as P(Sm | S0 ) of reaching Sm from the initial set of states S0 , is assumed to be extremely low (thus, a rare event), and one desires to estimate this probability [16]. Random sampling approaches, such as the additive-error approximation algorithm described in Section 7, are bound to fail (are intractable) in this case, as they would require an enormous number of samples to estimate p with low-variance. Importance splitting is a way of decomposing the estimation of p. In IS, the sequence S0 , S1 , . . . of sets of states is defined so that the conditional probabilities pi = P(Si | Si−1 ) of going from one level, Si−1 , to the next one, Si , are considerably larger than p, and essentially equal to one another. Q The resulting k probability of the rare event is then calculated as the product p = i=1 pi of the intermediate probabilities. The levels can be defined adaptively [23]. To estimate pi , IS uses a swarm of particles of size N , with a given initial distribution over the states of the stochastic process. During stage i of the algorithm, each particle starts at level Si−1 and traverses the states of the stochastic process, checking if it reaches Si . If, at the end of the stage, the particle fails to reach Si , the particle is discarded. Suppose that Ki particles survive. In this case, pi = Ki /N . Before starting the next stage, the surviving particles are resampled, such that IS once again has N particles. Whereas IS is used for estimating probability of a rare event in a Markov process, we use it here for synthesizing a plan for a controllable Markov process, by combining it with ideas from controller synthesis (receding-horizon control) and nonlinear optimization (PSO). 5 Problem Definition Definition 1. A Markov decision process (MDP) M is a sequential decision problem that consists of a set of states S (with an initial state s0 ), a set of 8 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu actions A, a transition model T , and a cost function J. An MDP is deterministic if for each state and action, T : S × A → S specifies a unique state. Definition 2. The optimal plan synthesis problem for an MDP M, an arbitrary initial state s0 of M, and a threshold ϕ is to synthesize a sequence of actions ai of length 1 6 i 6 m taking s0 to a state s∗ such that cost J(s∗ ) 6 ϕ. Section 6 presents our adaptive receding-horizon synthesis algorithm (ARES) for the optimal plan synthesis problem. In our flocking example (Section 2), ARES is used to synthesize a sequence of acceleration-actions bringing an arbitrary bird flock s0 to an optimal state of V-formation s∗ . We assume that we can easily extend such an optimal plan to maintain the cost of successor states below ϕ ad infinitum (optimal stability). 6 The ARES Algorithm for Plan Synthesis As mentioned in Section 1, one could in principle solve the optimization problem defined in Section 5 by calling the PSO only once, with a horizon h in M equaling the maximum length m allowed for a plan. This approach, however, tends to explode the search space, and is therefore in most cases intractable. Indeed, preliminary experiments with this technique applied to our running example could not generate any convergent plan. A more tractable approach is to make repeated calls to PSO with a small horizon length h. The question is how small h can be. The current practice in model-predictive control (MPC) is to use a fixed h, 1 6 h 6 3 (see the outer loop of Fig. 3, where resampling and conditional branches are disregarded). Unfortunately, this forces the selection of locally-optimal plans (of size less than three) in each call, and there is no guarantee of convergence when joining them together. In fact, in our running example, we were able to find plans leading to a V-formation in only 45% of the time for 10, 000 random initial flocks. Inspired by IS (see Fig. 1 (right) and Fig. 3), we introduce the notion of a level-based horizon, where level `0 equals the cost of the initial state, and level `m equals the threshold ϕ. Intuitively, by using an asymptotic cost-convergence function ranging from `0 to `m , and dividing its graph in m equal segments, we can determine on the vertical axis a sequence of levels ensuring convergence. The asymptotic function ARES implements is essentially `i = `0 (m − i)/ m, but specifically tuned for each particle. Formally, if particle k has previously reached level equaling Jk (si−1 ), then its next target level is within the distance ∆k = Jk (si−1 )/(m − i + 1). In Fig. 3, after passing the thresholds assigned to them, values of the cost function in the current state si are sorted in ascending order {Jbk }nk=1 . The lowest cost Jb1 should be apart from the previous level `i−1 at least on its ∆1 for the algorithm to proceed to the next level `i := Jb1 . The levels serve two purposes. First, they implicitly define a Lyapunov function, which guarantees convergence. If desired, this function can be explicitly generated for all states, up to some topological equivalence. Second, the levels `i help PSO overcome local minima (see Fig. 1 (left)). If reaching a next level ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans 9 next states after n clones s0 n applying {ah k }k=1 h si a1 J1 PSO PSO s0 PSO .. . ah 2 I ... J2 ah 3 J3 .. . .. . PSO Resampling ah n Sort {Jbk }n k=1 `i−1 − Jb1 > ∆1 Yes .. . .. . Jn No h ++ h := 1; p += pinc ; i ++ Yes Yes p < pmax h < hmax No No Particle exhaustion Yes i<m No Timeout Yes `i > ϕ `i := Jb1 No Stable state Fig. 3. Graphical representation of ARES. requires PSO to temporarily pass over a state-cost ridge, then ARES incrementally increases the size of the horizon h, up to a maximum size hmax . For particle k, passing the thresholds ∆k means that it reaches a new level, and the definition of ∆k ensures a smooth degradation of its threshold. Another idea imported from IS and shown in Fig. 3, is to maintain n clones {Mk }nk=1 of the MDP M (and its initial state) at any time t, and run PSO, for a horizon h, on each h-unfolding Mhk of them. This results in an action sequence ahk of length h (see Algo. 1). This approach allows us to call PSO for each clone and desired horizon, with a very small number of particles p per clone. Algorithm 1: Simulate (M, h, i, {∆k , Jk (si−1 )}nk=1 ) 1 2 3 4 5 6 7 foreach Mk ∈ M do [ahk , Mhk ] ← particleswarm(Mk , p, h); // use PSO in order to determine best next action for the MDP Mk with RPH h Jk (si ) ← Cost(Mhk , ahk , h); // calculate cost function if applying the sequence of optimal actions of length h if Jk (si−1 ) − Jk (si ) > ∆k then ∆k ← Jk (si )/(m − i); // new level-threshold end end 10 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu Algorithm 2: Resample ({Mhk , Jk (si )}nk=1 ) 1 2 3 4 5 6 7 8 I ← Sort ascending Mhk by their current costs; // find indexes of MDPs whose costs are below the median among all the clones for k = 1 to n do if k ∈ / I then Sample r uniformly at random from I; Mk ← Mhr ; else Mk ← Mhk ; // Keep more successful MDPs unchanged end end To check which particles have overcome their associated thresholds, we sort the particles according to their current cost, and split them in two sets: the successful set, having the indexes I and whose costs are lower than the median among all clones; and the unsuccessful set with indexes in {1, . . ., n} \I, which are discarded. The unsuccessful ones are further replenished, by sampling uniformly at random from the successful set I (see Algo. 2). The number of particles is increased p = p + pinc if no clone reaches a next level, for all horizons chosen. Once this happens, we reset the horizon to one, and repeat the process. In this way, we adaptively focus our resources on escaping from local minima. From the last level, we choose the state s∗ with the minimal cost, and traverse all of its predecessor states to find an optimal plan comprised of actions {ai }16i6m that led MDP M to the optimal state s∗ . In our running example, we select a flock in V-formation, and traverse all its predecessor flocks. The overall procedure of ARES is shown in Algo. 3. Proposition 1 (Optimality and Minimality). (1) Let M be an MDP. For any initial state s0 of M, ARES is able to solve the optimal-plan synthesis problem for M and s0 . (2) An optimal choice of m in function ∆k , for some particle k, ensures that ARES also generates the shortest optimal plan. Proof (Sketch). (1) The dynamic-threshold function ∆k ensures that the initial cost in s0 is continuously decreased until it falls below ϕ. Moreover, for an appropriate number of clones, by adaptively determining the horizon and the number of particles needed to overcome ∆k , ARES always converges, with probability 1, to an optimal state, given enough time and memory. (2) This follows from convergence property (1), and from the fact that ARES always gives preference to the shortest horizon while trying to overcome ∆k . The optimality referred to in the title of the paper is in the sense of (1). One, however, can do even better than (1), in the sense of (2), by empirically determining parameter m in the dynamic-threshold function ∆k . Also note that ARES is an approximation algorithm. As a consequence, it might return nonminimal plans. Even in these circumstances, however, the plans will still lead to an optimal state. This is a V-formation in our flocking example. ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans 11 Algorithm 3: ARES Input : M, ϕ, pstart , pinc , pmax , hmax , m, n Output: {ai }16i6 m // synthesized optimal plans 1 Initialize `0 ← inf; {Jk (s0 )}n k=1 ← inf; p ← pstart ; i ← 1; h ← 1; ∆k ← 0; 2 while (`i > ϕ) ∨ (i < m) do // find and apply best actions with RPH h n [{ahk , Jk (si ), Mhk }n k=1 ] ←Simulate(M, h, i, {∆k , Jk (si−1 )}k=1 ); Jb1 ← sort(J1 (si ), . . . , Jn (si )); // find minimum cost among all the clones if `i−1 − Jb1 > ∆1 then `i ← Jb1 ; // new level has been reached i ← i + 1; h ← 1; p ← pstart ; // reset adaptive parameters h n {Mk }n k=1 ← Resample({Mk , Jk (si )}k=1 ); else if h < hmax then h ← h + 1; // improve time exploration else if p < pmax then h ← 1; p ← p + pinc ; // improve space exploration else break; end end end end Take a clone in the state with minimum cost `i = J(s∗i ) 6 ϕ at the last level i; foreach i do {s∗i−1 , ai } ← P re(s∗i ); // find predecessor and corresponding action end 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 7 Experimental Results To assess the performance of our approach, we developed a simple simulation environment in Matlab. All experiments were run on an Intel Core i7-5820K CPU with 3.30 GHz and with 32GB RAM available. We performed numerous experiments with a varying number of birds. Unless stated otherwise, results refer to 8,000 experiments with 7 birds with the following parameters: pstart = 10, pinc = 5, pmax = 40, `max = 20, hmax = 5, ϕ = 10−3 , and n = 20. The initial configurations were generated independently uniformly at random subject to the following constraints: 1. Position constraints: ∀ i ∈ {1, . . ., 7}. xi (0) ∈ [0, 3] × [0, 3]. 2. Velocity constraints: ∀ i ∈ {1, . . ., 7}. v i (0) ∈ [0.25, 0.75] × [0.25, 0.75]. Table 1 gives an overview of the results with respect to the 8,000 experiments we performed with 7 birds for a maximum of 20 levels. The average fitness across all experiments is at 0.0282 with a standard deviation of 0.1654. We 12 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu Fig. 4. Left: Example of an arbitrary initial configuration of 7 birds. Right: The Vformation obtained by applying the plan generated by ARES. In the figures, we show the wings of the birds, bird orientations, bird speeds (as scaled arrows), upwash regions in yellow, and downwash regions in dark blue. Table 1. Overview of the results for 8,000 experiments with 7 birds Successful No. Experiments Min Cost, J Time, t Plan Length, i RPH, h Total 7573 8000 Max Avg Std Min Max Avg 2.88·10−7 9·10−4 4·10−4 3·10−4 2.88·10−7 1.4840 0.0282 23.14s 310.83s 63.55s 22.81s 23.14s 661.46s 64.85s 7 20 12.80 2.39 7 20 13.13 1 5 1.40 0.15 1 5 1.27 Std 0.1607 28.05s 2.71 0.17 achieved a success rate of 94.66% with fitness threshold ϕ = 10−3 . The average fitness is higher than the threshold due to comparably high fitness of unsuccessful experiments. When increasing the bound for the maximal plan length m to 30 we achieved a 98.4% success rate in 1,000 experiments at the expense of a slightly longer average execution time. The left plot in Fig. 5 depicts the resulting distribution of execution times for 8,000 runs of our algorithm, where it is clear that, excluding only a few outliers from the histogram, an arbitrary configuration of birds (Fig. 4 (left)) reaches V-formation (Fig. 4 (right)) in around 1 minute. The execution time rises with the number of birds as shown in Table 2. In Fig. 5, we illustrate for how many experiments the algorithm had to increase RPH h (Fig. 5 (middle)) and the number of particles used by PSO p (Fig. 5 (right)) to improve time and space exploration, respectively. After achieving such a high success rate of ARES for an arbitrary initial configuration, we would like to demonstrate that the number of experiments Table 2. Average duration for 100 experiments with various number of birds No. of birds 3 5 7 9 Avg. duration 4.58s 18.92s 64.85s 269.33s ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans 13 Fig. 5. Left: Distribution of execution times for 8,000 runs. Middle: Statistics of increasing RPH h. Right: Particles of PSO p for 8,000 experiments performed is sufficient for high confidence in our results. This requires us to determine the appropriate number N of random variables Z1 , ...ZN necessary for the Monte-Carlo approximation scheme we apply to assess efficiency of our approach. For this purpose, we use the additive approximation algorithm as discussed in [17]. If the sample mean µZ = (Z1 + . . . + ZN )/N is expected to be large, then one can exploit the Bernstein’s inequality and fix N to Υ ∝ ln(1/δ)/ε2 . This results in an additive or absolute-error (ε, δ)-approximation scheme: P[µZ − ε ≤ µ eZ ≤ µZ + ε)] ≥ 1 − δ, where µ eZ approximates µZ with absolute error ε and probability 1 − δ. In particular, we are interested in Z being a Bernoulli random variable:  1, if J(c(t), a(t), h(t)) 6 ϕ, Z= 0, otherwise. Therefore, we can use the Chernoff-Hoeffding instantiation of the Bernstein’s inequality, and further fix the proportionality constant to Υ = 4 ln(2/δ)/ε2 , as in [20]. Hence, for our performed 8,000 experiments, we achieve a success rate of 95% with absolute error of ε = 0.05 and confidence ratio 0.99. Moreover, considering that the average length of a plan is 13, and that each state in a plan is independent from all other plans, we can roughly consider that our above estimation generated 80,000 independent states. For the same confidence ratio of 0.99 we then obtain an approximation error ε = 0.016, and for a confidence ratio of 0.999, we obtain an approximation error ε = 0.019. 8 Related Work Organized flight in flocks of birds can be categorized in cluster flocking and line formation [19]. In cluster flocking the individual birds in a large flock seem to be uncoordinated in general. However, the flock moves, turns, and wheels as if it were one organism. In 1987 Reynolds [27] defined his three famous rules describing separation, alignment, and cohesion for individual birds in order to have them flock together. This work has been great inspiration for research in the area of collective behavior and self-organization. 14 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu In contrast, line formation flight requires the individual birds to fly in a very specific formation. Line formation has two main benefits for the long-distance migrating birds. First, exploiting the generated uplift by birds flying in front, trailing birds are able to conserve energy [10, 24, 34]. Second, in a staggered formation, all birds have a clear view in front as well as a view on their neighbors [1]. While there has been quite some effort to keep a certain formation for multiple entities when traveling together [11, 15, 30], only little work deals with a task of achieving this extremely important formation from a random starting configuration [6]. The convergence of bird flocking into V-formation has been also analyzed with the use of combinatorial techniques [8]. Compared to previous work, in [5] this question is addressed without using any behavioral rules but as problem of optimal control. In [35] a cost function was proposed that reflects all major features of V-formation, namely, Clear View (CV), Velocity Matching (VM), and Upwash Benefit (UB). The technique of MPC is used to achieve V-formation starting from an arbitrary initial configuration of n birds. MPC solves the task by minimizing a functional defined as squared distance from the optimal values of CV, VM, and UB, subject to constraints on input and output. The approach is to choose an optimal velocity adjustment, as a control input, at each time-step applied to the velocity of each bird by predicting model behavior several time-steps ahead. The controller synthesis problem has been widely studied [33]. The most popular and natural technique is Dynamic Programming (DP) [4] that improves the approximation of the functional at each iteration, eventually converging to the optimal one given a fixed asymptotic error. Compared to DP, which considers all the possible states of the system and might suffer from state-space explosion in case of environmental uncertainties, approximate algorithms [2, 3, 18, 25, 31, 32] take into account only the paths leading to desired target. One of the most efficient ones is Particle Swarm Optimization (PSO) [22] that has been adopted for finding the next best step of MPC in [35]. Although it is a very powerful optimization technique, it has not yet been possible to achieve a high success rate in solving the considered flocking problem. Sequential Monte-Carlo methods proved to be efficient in tackling the question of control for linear stochastic systems [9], in particular, Importance Splitting (IS) [23]. The approach we propose is, however, the first attempt to combine adaptive IS, PSO, and receding-horizon technique for synthesis of optimal plans for controllable systems. We use MPC to synthesize a plan, but use IS to determine the intermediate fitness-based waypoints. We use PSO to solve the multi-step optimization problem generated by MPC, but choose the planning horizon and the number of particles adaptively. These choices are governed by the difficulty to reach the next level. 9 Conclusion and Future Work In this paper, we have presented ARES, a very general adaptive, receding-horizon synthesis algorithm for MDP-based optimal plans. Additionally, ARES can be readily converted into a model-predictive controller with an adaptive receding ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans 15 horizon and statistical guarantees of convergence. We have also conducted a very thorough performance analysis of ARES based on the problem of V-formation in a flock of birds. For flocks of 7 birds, ARES is able to generate an optimal plan leading to a V-formation in 95% of the 8,000 random initial configurations we considered, with an average execution time of only 63 seconds per plan. The execution time of the ARES algorithm can be even further improved in a number of ways. First, we currently do not parallelize our implementation of the PSO algorithm. Recent work [21, 29, 37] has shown how Graphic Processing Units (GPUs) are very efficient at accelerating PSO computation. Modern GPUs, by providing thousands of cores, are well-suited for implementing PSO as they enable execution of a very large number of particles in parallel, which can improve accuracy of the optimization procedure. Likewise, the calculation of the fitness function can also be run in parallel. The parallelization of these steps should significantly speed up our simulations. Second, we are currently using a static approach to decide how to increase our prediction horizon and the number of particles used in PSO. Specifically, we first increase the prediction horizon from 1 to 5, while keeping the number of c1 satisfying particles unchanged at 10; if this fails to find a solution with fitness J c `i−1 − J1 > ∆1 , we then increase the number of particles by 5. Based on our results, we speculate that in the initial stages, increasing the prediction horizon is more beneficial (leading rapidly to the appearance of cost-effective formations), whereas in the later stages, increasing the number of particles is more helpful. As future work, we will use machine-learning approaches to decide on the prediction horizon and the number of particles deployed at runtime given the current level and state of the MDP. Third, in our approach, we always calculate the number of clones for resampling based on the current state. An alternative approach would rely on statistics built up over multiple levels in combination with the rank in the sorted list to determine whether a configuration should be used for resampling or not. Finally, we are currently using our approach to generate plans for a flock to go from an initial configuration to a final V-formation. Our eventual goal is to achieve formation flight for a robotic swarm of (bird-like) drones. A realworld example is parcel-delivering drones that follow the same route to their destinations. Letting them fly together for a while could save energy and increase flight time. To achieve this goal, we first need to investigate the wind dynamics of multi-rotor drones. Then, the fitness function needs to be adopted to the new wind dynamics. Lastly, a decentralized approach of this method needs to be implemented and tested on the drone firmware. Acknowledgments. The first author and the last author would like to thank Jan Kr̆etı́nský for very valuable feedback. This work was partially supported by the Doctoral Program Logical Methods in Computer Science funded by the Austrian Science Fund (FWF) project W1255-N23, and the Austrian National Research Network (nr. S 11405-N23 and S 11412-N23) SHiNE funded by FWF. 16 Lukina, Esterle, Hirsch, Bartocci, Yang, Tiwari, Smolka, Grosu References 1. Bajec, I.L., Heppner, F.H.: Organized flight in birds. Animal Behaviour 78(4), 777–789 (2009) 2. Bartocci, E., Bortolussi, L., Brázdil, T., Milios, D., Sanguinetti, G.: Policy learning for time-bounded reachability in continuous-time markov decision processes via doubly-stochastic gradient ascent. In: Proc. of QEST 2016: the 13th International Conference on Quantitative Evaluation of Systems. vol. 9826, pp. 244–259 (2016) 3. Baxter, J., Bartlett, P.L., Weaver, L.: Experiments with infinite-horizon, policygradient estimation. J. Artif. Int. Res. 15(1), 351–381 (2011) 4. Bellman, R.: Dynamic Programming. Princeton University Press (1957) 5. Camacho, E.F., Alba, C.B.: Model Predictive Control. Advanced Textbooks in Control and Signal Processing, Springer (2007) 6. Cattivelli, F.S., Sayed, A.H.: Modeling bird flight formations using diffusion adaptation. IEEE Transactions on Signal Processing 59(5), 2038–2051 (2011) 7. Cérou, F., Guyader, A.: Adaptive multilevel splitting for rare event analysis. Stochastic Analysis and Applications 25, 417–443 (2007) 8. Chazelle, B.: The Convergence of Bird Flocking. Journal of the ACM 61(4), 21:1– 21:35 (2014) 9. Chen, Y., Wu, B., Lai, T.L.: Fast Particle Filters and Their Applications to Adaptive Control in Change-Point ARX Models and Robotics. INTECH Open Access Publisher (2009) 10. Cutts, C., Speakman, J.: Energy savings in formation flight of pink-footed geese. Journal of Experimental Biology 189(1), 251–261 (1994) 11. Dang, A.D., Horn, J.: Formation control of autonomous robots following desired formation during tracking a moving target. In: Proceedings of the International Conference on Cybernetics. pp. 160–165. IEEE (2015) 12. Dimock, G., Selig, M.: The Aerodynamic Benefits of Self-Organization in Bird Flocks. Urbana 51, 1–9 (2003) 13. Flake, G.W.: The Computational Beauty of Nature: Computer Explorations of Fractals, Chaos, Complex Systems, and Adaptation. MIT Press (1998) 14. Garcı́a, C.E., Prett, D.M., Morari, M.: Model predictive control: Theory and practice – a survey. Automatica 25(3), 335–348 (1989) 15. Gennaro, M.C.D., Iannelli, L., Vasca, F.: Formation Control and Collision Avoidance in Mobile Agent Systems. In: Proceedings of the International Symposium on Control and Automation Intelligent Control. pp. 796–801. IEEE (2005) 16. Glasserman, P., Heidelberger, P., Shahabuddin, P., Zajic, T.: Multilevel Splitting for Estimating Rare Event Probabilities. Operations Research 47(4), 585–600 (1999) 17. Grosu, R., Peled, D., Ramakrishnan, C.R., Smolka, S.A., Stoller, S.D., Yang, J.: Using statistical model checking for measuring systems. In: Proceedings of the International Symposium Leveraging Applications of Formal Methods, Verification and Validation. LNCS, vol. 8803, pp. 223–238. Springer (2014) 18. Henriques, D., Martins, J.G., Zuliani, P., Platzer, A., Clarke, E.M.: Statistical model checking for markov decision processes. In: Proc. of QEST 2012: the Ninth International Conference on Quantitative Evaluation of Systems. pp. 84–93. QEST’12, IEEE Computer Society (2012) 19. Heppner, F.H.: Avian flight formations. Bird-Banding 45(2), 160–169 (1974) 20. Hérault, T., Lassaigne, R., Magniette, F., Peyronnet, S.: Approximate probabilistic model checking. In: Proceedings of the International Conference on Verification, Model Checking, and Abstract Interpretation (2004) ARES: Adaptive Receding-Horizon Synthesis of Optimal Plans 17 21. Hung, Y., Wang, W.: Accelerating parallel particle swarm optimization via gpu. Optimization Methods and Software 27(1), 33–51 (2012) 22. James, K., Russell, E.: Particle swarm optimization. In: Proceedings of 1995 IEEE International Conference on Neural Networks. pp. 1942–1948 (1995) 23. Kalajdzic, K., Jégourel, C., Lukina, A., Bartocci, E., Legay, A., Smolka, S.A., Grosu, R.: Feedback Control for Statistical Model Checking of Cyber-Physical Systems. In: Proceedings of the International Symposium Leveraging Applications of Formal Methods, Verification and Validation: Foundational Techniques. pp. 46– 61. LNCS, Springer (2016) 24. Lissaman, P., Shollenberger, C.A.: Formation flight of birds. Science 168(3934), 1003–1005 (1970) 25. Mannor, S., Rubinstein, R.Y., Gat, Y.: The cross entropy method for fast policy search. In: ICML. pp. 512–519 (2003) 26. Nathan, A., Barbosa, V.C.: V-like Formations in Flocks of Artificial Birds. Artificial Life 14(2), 179–188 (2008) 27. Reynolds, C.W.: Flocks, herds and schools: A distributed behavioral model. SIGGRAPH Computer Graphics 21(4), 25–34 (1987) 28. Russell, S., Norvig, P.: Artificial Intelligence: A Modern Approach. Prentice-Hall, 3rd edn. (2010) 29. Rymut, B., Kwolek, B., Krzeszowski, T.: GPU-Accelerated Human Motion Tracking Using Particle Filter Combined with PSO. In: Proceedings. of the International Conference on Advanced Concepts for Intelligent Vision Systems. LNCS, vol. 8192, pp. 426–437. Springer (2013) 30. Seiler, P., Pant, A., Hedrick, K.: Analysis of bird formations. In: Proceedings of the Conference on Decision and Control. vol. 1, pp. 118–123 vol.1. IEEE (2002) 31. Stulp, F., Sigaud, O.: Path integral policy improvement with covariance matrix adaptation. arXiv preprint arXiv:1206.4621 (2012), http://arxiv.org/abs/1206. 4621 32. Stulp, F., Sigaud, O.: Policy improvement methods: Between black-box optimization and episodic reinforcement learning (2012), http://hal.upmc.fr/ hal-00738463/ 33. Verfaillie, G., Pralet, C., Teichteil, F., Infantes, G., Lesire, C.: Synthesis of plans or policies for controlling dynamic systems. AerospaceLab (4), p. 1–12 (2012) 34. Weimerskirch, H., Martin, J., Clerquin, Y., Alexandre, P., Jiraskova, S.: Energy Saving in Flight Formation. Nature 413(6857), 697–698 (2001) 35. Yang, J., Grosu, R., Smolka, S.A., Tiwari, A.: Love Thy Neighbor: V-Formation as a Problem of Model Predictive Control. In: LIPIcs-Leibniz International Proceedings in Informatics. vol. 59. Schloss Dagstuhl-Leibniz-Zentrum fuer Informatik (2016) 36. Yang, J., Grosu, R., Smolka, S.A., Tiwari, A.: V-Formation as Optimal Control. In: Proceedings of the Biological Distributed Algorithms Workshop 2016 (2016) 37. Zhou, Y., Tan, Y.: GPU-based Parallel Particle Swarm Optimization. In: Proceedings of the Congress on Evolutionary Computation. pp. 1493–1500. IEEE (2009)
3cs.SY
Make Up Your Mind: The Price of Online Queries in Differential Privacy arXiv:1604.04618v1 [cs.CR] 15 Apr 2016 Mark Bun∗ Thomas Steinke† Jonathan Ullman‡ April 18, 2016 Abstract We consider the problem of answering queries about a sensitive dataset subject to differential privacy. The queries may be chosen adversarially from a larger set Q of allowable queries in one of three ways, which we list in order from easiest to hardest to answer: • Offline: The queries are chosen all at once and the differentially private mechanism answers the queries in a single batch. • Online: The queries are chosen all at once, but the mechanism only receives the queries in a streaming fashion and must answer each query before seeing the next query. • Adaptive: The queries are chosen one at a time and the mechanism must answer each query before the next query is chosen. In particular, each query may depend on the answers given to previous queries. Many differentially private mechanisms are just as efficient in the adaptive model as they are in the offline model. Meanwhile, most lower bounds for differential privacy hold in the offline setting. This suggests that the three models may be equivalent. We prove that these models are all, in fact, distinct. Specifically, we show that there is a family of statistical queries such that exponentially more queries from this family can be answered in the offline model than in the online model. We also exhibit a family of search queries such that exponentially more queries from this family can be answered in the online model than in the adaptive model. We also investigate whether such separations might hold for simple queries like threshold queries over the real line. ∗ Harvard University John A. Paulson School of Engineering and Applied Sciences. Supported by an NDSEG Fellowship and NSF grant CNS-1237235. Part of this work was done while the author was visiting Yale University. [email protected] † Harvard University John A. Paulson School of Engineering and Applied Sciences. Supported by NSF grants CCF-1116616, CCF-1420938, and CNS-1237235. [email protected] ‡ Northeastern University College of Computer and Information Science. [email protected] Contents 1 Introduction 1.1 Our Results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1.2 Techniques . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 2 3 2 Preliminaries 2.1 Datasets and Differential Privacy . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.2 Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2.3 Models of Interactive Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 5 6 6 3 A Separation Between Offline and Online Queries 3.1 Answering Offline Prefix Queries . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.2 A Lower Bound for Online Prefix Queries . . . . . . . . . . . . . . . . . . . . . . 8 9 10 4 A Separation Between Adaptive and Non-Adaptive Online Queries 4.1 Answering Online Correlated Vector Queries . . . . . . . . . . . . . . . . . . . . 4.2 A Lower Bound for Adaptive Correlated Vector Queries . . . . . . . . . . . . . . 14 14 16 5 Threshold Queries 5.1 Separation for Pure Differential Privacy . . . . . . . . . . . . . . . . . 5.2 The BetweenThresholds Algorithm . . . . . . . . . . . . . . . . . . . . . 5.3 The Online Interior Point Problem . . . . . . . . . . . . . . . . . . . . 5.4 Releasing Adaptive Thresholds with Approximate Differential Privacy 18 18 20 26 27 . . . . . . . . . . . . . . . . . . . . . . . . Acknowledgements 30 References 30 A The Fingerprinting Lemma 32 1 Introduction Differential privacy [DMNS06] is a formal guarantee that an algorithm run on a sensitive dataset does not reveal too much about any individual in that dataset. Since its introduction, a rich literature has developed to determine what statistics can be computed accurately subject to differential privacy. For example, suppose we wish to approximate a real-valued query q(x) on some dataset x that consists of the private data of many individuals. Then, this question has a clean answer—we can compute a differentially private estimate of q(x) with error proportional to the global sensitivity of q, and we cannot have smaller error in the worst case. But how much error do we need to answer a large set of queries q1 , . . . , qk ? Before we can answer this question, we have to define a model of how the queries are asked and answered. The literature on differential privacy has considered three different interactive models1 for specifying the queries: • The Offline Model: The sequence of queries q1 , . . . , qk are given to the algorithm together in a batch and the mechanism answers them together. • The Online Model: The sequence of queries q1 , . . . , qk is chosen in advance and then the mechanism must answer each query qj before seeing qj+1 . • The Adaptive Model: The queries are not fixed in advance, each query qj+1 may depend on the answers to queries q1 , . . . , qj . In all three cases, we assume that q1 , · · · , qk are chosen from some family of allowable queries Q, but may be chosen adversarially from this family. Differential privacy seems well-suited to the adaptive model. Arguably its signature property is that any adaptively-chosen sequence of differentially private algorithms remains collectively differentially private, with a graceful degradation of the privacy parameters [DMNS06, DRV10]. As a consequence, there is a simple differentially private algorithm that takes a dataset √ of n individuals and answers Ω̃(n) statistical queries in the adaptive model with error o(1/ n), simply by perturbing each answer independently with carefully calibrated noise. In contrast, the seminal lower bound of Dinur and Nissim and its later refinements [DN03, DY08] shows that there exists a fixed set of O(n) queries that cannot be answered by any differentially private algorithm with such little error, even in the easiest offline model. For an even more surprising example, the private multiplicative weights algorithm of Hardt and Rothblum [HR10] can in many cases answer an exponential number of arbitrary, adaptively-chosen statistical queries with a strong accuracy guarantee, whereas [BUV14] show that the accuracy guarantee of private multiplicative weights is nearly optimal even for a simple, fixed family of queries. These examples might give the impression that answering adaptively-chosen queries comes “for free” in differential privacy—that everything that can be achieved in the offline model can be matched in the adaptive model. Beyond just the lack of any separation between the models, many of the most powerful differentially private algorithms in all of these models use techniques from no-regret learning, which are explicitly designed for adaptive models. Another motivation for studying the relationship between these models is the recent line of work connecting differential privacy to statistical validity for adaptive data analysis [HU14, 1 Usually, the “interactive model” refers only to what we call the “adaptive model.” We prefer to call all of these models interactive, since they each require an interaction with a data analyst who issues the queries. We use the term “interactive” to distinguish these models from one where the algorithm only answers a fixed set of queries. 1 DFH+ 15, SU15b, BNS+ 16], which shows that differentially private algorithms for adaptivelychosen queries in fact yield state-of-the-art algorithms for statistical problems unrelated to privacy. This connection further motivates studying the adaptive model and its relationship to the other models in differential privacy. In this work, we show for the first time that these three models are actually distinct. In fact, we show exponential separations between each of the three models. These are the first separations between these models in differential privacy. 1.1 Our Results Given a dataset x whose elements come from a data universe X, a statistical query on X is defined by a predicate φ on X and asks “what fraction of elements in the dataset satisfy φ?” The answer to a statistical query lies in [0, 1] and our goal is to answer these queries up to some small additive error ±α, for a suitable choice of 0 < α < 1. If the mechanism is required to answer arbitrary statistical queries, then the offline, online, and adaptive models are essentially equivalent — the upper bounds in the adaptive model match the lower bounds in the offline model [DRV10, HR10, BUV14, SU15a]. However, we show that when the predicate φ is required to take a specific form, then it becomes strictly easier to answer a set of these queries in the offline model than it is to answer a sequence of queries presented online. Theorem 1.1 (Informal). There exists a data universe X and a family of statistical queries Q on X such that for every n ∈ N, 1. there is√a differentially private algorithm that takes a dataset x ∈ X n and answers any set of k = 2Ω( n) offline queries from Q up to error ±1/100 from Q, but 2. no differentially private algorithm can take a dataset x ∈ X n and answer an arbitrary sequence of k = O(n2 ) online (but not adaptively-chosen) queries from Q up to error ±1/100. This result establishes that the online model is strictly harder than the offline model. We also demonstrate that the adaptive model is strictly harder than the online model. Here, the family of queries we use in our separation is not a family of statistical queries, but is rather a family of search queries with a specific definition of accuracy that we will define later. Theorem 1.2 (Informal). For every n ∈ N, there is a family of “search” queries Q on datasets in X n such that 1. there is a differentially private algorithm that takes a dataset x ∈ {±1}n and accurately answers any online (but not adaptively-chosen) sequence of k = 2Ω(n) queries from Q, but 2. no differentially private algorithm can take a dataset x ∈ {±1}n and accurately answer an adaptively-chosen sequence of k = O(1) queries from Q. We leave it as an interesting open question to separate the online and adaptive models for statistical queries, or to show that the models are equivalent for statistical queries. Although Theorems 1.1 and 1.2 separate the three models, these results use somewhat contrived families of queries. Thus, we also investigate whether the models are distinct for natural families of queries that are of use in practical applications. One very well studied class of queries is threshold queries. These are a family of statistical queries Qthresh defined on the universe [0, 1] and each query is specified by a point τ ∈ [0, 1] and asks “what fraction of the 2 elements of the dataset are at most τ?” If we restrict our attention to so-called pure differential privacy (i.e. (ε, δ)-differential privacy with δ = 0), then we obtain an exponential separation between the offline and online models for answering threshold queries. Theorem 1.3 (Informal). For every n ∈ N, 1. there is a pure differentially private algorithm that takes a dataset x ∈ [0, 1]n and answers any set of k = 2Ω(n) offline queries from Qthresh up to error ±1/100, but 2. no pure differentially private algorithm takes a dataset x ∈ [0, 1]n and answers an arbitrary sequence of k = O(n) online (but not adaptively-chosen) queries from Qthresh up to error ±1/100. We also ask whether or not such a separation exists for arbitrary differentially private algorithms (i.e. (ε, δ)-differential privacy with δ > 0). Theorem 1.3 shows that, for pure differential privacy, threshold queries have near-maximal sample complexity. That is, up to constants, the lower bound for online threshold queries matches what is achieved by the Laplace mechanism, which is applicable to arbitrary statistical queries. This may lead one to conjecture that adaptive threshold queries also require near-maximal sample complexity subject to approximate differential privacy. However, we show that this is not the case: Theorem 1.4. For every n ∈ N, there is a differentially private algorithm that takes a dataset x ∈ [0, 1]n and answers any set of k = 2Ω(n) adaptively-chosen queries from Qthresh up to error ±1/100. In contrast, for any offline set of k thresholds τ1 , . . . , τk , we can round each element of the dataset up to an element in the finite universe X = {τ1 , . . . , τk , 1} without changing the answers to any of the queries. Then we can use known algorithms for answering all threshold queries over any finite, totally ordered domain [BNS13, BNSV15] to answer the queries using a very small ∗ dataset of size n = 2O(log (k)) . We leave it as an interesting open question to settle the complexity of answering adaptively-chosen threshold queries in the adaptive model. 1.2 Techniques Separating Offline and Online Queries To prove Theorem 1.1, we construct a sequence of queries q1 , · · · , qk such that, for all j ∈ [k], • qj “reveals” the answers to q1 , · · · , qj−1 , but • q1 , · · · , qj−1 do not reveal the answer to qj . Thus, given the sequence q1 , · · · , qk in the offline setting, the answers to q1 , · · · , qk−1 are revealed by qk . So only qk needs to be answered and the remaining query answers can be inferred. However, in the online setting, each query qj−1 must be answered before qj is presented and this approach does not work. This is the intuition for our separation. To prove the online lower bound, we build on a lower bound for marginal queries [BUV14], which is based on the existence of short secure fingerprinting codes [BS98, Tar08]. Consider the data universe {±1}k . Given a dataset x ∈ {±1}n×k , a marginal query is a specific type of statistical query that asks for the mean of a given column of x. Bun et al. [BUV14] showed that unless k  n2 , there is no differentially private algorithm that answers all k marginal queries with non-trivial accuracy. This was done by showing that such an algorithm would violate the security of a short fingerprinting code due to Tardos [Tar08]. We are able to “embed” k marginal 3 queries into the sequence of online queries q1 , · · · , qk . Thus a modification of the lower bound for marginal queries applies in the online setting. To prove the offline upper bound, we use the fact that every query reveals information about other queries. However, we must handle arbitrary sequences of queries, not just the specially-constructed sequences used for the lower bound. The key property of our family of queries is the following. Each element x of the data universe X requires k bits to specify. On the other hand, for any set of queries q1 , · · · , qk , we can specify q1 (x), · · · , qk (x) using only O(log(nk)) bits. Thus the effective size of the data universe given the queries is poly(nk), rather than 2k . Then we can apply a differentially private algorithm that gives good accuracy as long as the data universe has subexponential size [BLR13]. Reducing the size of the data universe is only possible once the queries have been specified; hence this approach only works in the offline setting. Separating Online and Adaptive Queries To prove Theorem 1.2, we start with the classical randomized response algorithm [War65]. Specifically, given a dataset x ∈ {±1}n , randomized response produces a new dataset y ∈ {±1}n where each coordinate yi is independently set to +xi with probability (1 + α)/2 and is set to −xi with probability (1 − α)/2. It is easy to prove that this algorithm is (O(α), 0)-differentially private. What accuracy guarantee does this algorithm satisfy? By design, it outputs a vector y that has correlation approximately α with the dataset x — that is, hy, xi ≈ αn. On the other hand, it is also easy to prove that there is no differentially private algorithm (for any reasonable privacy parameters) that can output a vector that has correlation at least 1/2 with the sensitive dataset. Our separation between the online and adaptive models is based on the observation that, if we can obtain O(1/α 2 ) “independent” vectors y1 , . . . , yk that are each roughly α-correlated with x, then we can obtain a vector z that is (1/2)-correlated with x, simply by letting z be the coordinate-wise majority of the yj s. Thus, no differentially private algorithm can output such a set of vectors. More precisely, we require that hyi , yj i ≈ α 2 n for i , j, which is achieved if each yj is an independent sample from randomized response. Based on this observation, we devise a class of queries such that, if we are allowed to choose k of these queries adaptively, then we obtain a set of vectors y1 , . . . , yk satisfying the conditions above. This rules out differential privacy for k = O(1/α 2 ) adaptive queries. The key is that we can use adaptivity to ensure that each query asks for an “independent” yj by adding the previous answers y1 , · · · , yj−1 as constraints in the search query. On the other hand, randomized response can answer each such query with high probability. If a number of these queries is fixed in advance, then, by a union bound, the vector y output by randomized response is simultaneously an accurate answer to every query with high probability. Since randomized response is oblivious to the queries, we can also answer the queries in the online model, as long as they are not chosen adaptively. At a high level, the queries that achieve this property are of the form “output a vector y ∈ {±1}n that is approximately α-correlated with x and is approximately as uncorrelated as possible with the vectors v1 , . . . , vm .” A standard concentration argument shows that randomized response gives an accurate answer to all the queries simulatneously with high probability. On the other hand, if we are allowed to choose the queries adaptively, then for each query qi , we can ask for a vector yi that is correlated with x but is as uncorrelated as possible with the previous answers y1 , . . . , yi−1 . 4 Threshold Queries For pure differential privacy, our separation between offline and online threshold queries uses a simple argument based on binary search. Our starting point is a lower bound showing that any purely differentially private algorithm that takes a dataset of n points x1 , . . . , xn ∈ {1, . . . , T } and outputs an approximate median of these points requires n = Ω(log(T )). This lower bound follows from a standard application of the “packing” technique of Hardt and Talwar [HT10]. On the other hand, by using binary search, any algorithm that can answer k = O(log(T )) adaptively-chosen threshold queries can be used to find an approximate median. Thus, any purely differentially private algorithm for answering such queries requires a dataset of size n = Ω(k). Using the structure of the lower bound argument, we show that the same lower bound holds for online non-adaptive queries as well. In contrast, using the algorithms of [DNPR10, CSS11, DNRR15], we can answer k offline threshold queries on a dataset with only n = O(log(k)) elements, giving an exponential separation. The basis of our improved algorithm for adaptive threshold queries under approximate differential privacy is a generalization of the sparse vector technique [DNPR10, RR10, HR10] (see [DR14, §3.6] for a textbook treatment). Our algorithm makes crucial use of a stability argument similar to the propose-test-release techniques of Dwork and Lei [DL09]. To our knowledge, this is the first use of a stabiltiy argument for any online or adaptive problem in differential privacy and may be of independent interest. In particular, our algorithm is given an input x ∈ X n , a threshold t ∈ (0, 1), and an adaptive sequence of statistical (or low-sensitivity) queries q1 , · · · , qk : X n → [0, 1] and, for each query qj , it reports (i) qj (x) ≥ t, (ii) qj (x) ≤ t, or (iii) √ t − α ≤ qj (x) ≤ t + α. The sample complexity of this algorithm is n = O( c log(k/εδ)/εα), where k is the total number of queries, c is an upper bound on the number of times (iii) may be reported, and (ε, δ)-differential privacy is provided. We call this the Between Thresholds algorithm. Once we have this algorithm, we can use it to answer adaptively-chosen thresholds using an approach inspired by Bun et al. [BNSV15]. The high-level ideal is to sort the dataset x(1) < x(2) < · · · < x(n) and then partition it into chunks of consecutive sorted elements. For any chunk, and a threshold τ, we can use the between thresholds algorithm to determine (approximately) whether τ lies below all elements in the chunk, above all elements in the chunk, or inside the chunk. Obtaining this information for every chunk is enough to accurately estimate the answer to the threshold query τ up to an error proportional to the size of the chunks. The sample complexity is dominated by the O(log k) sample complexity of our Between Thresholds algorithm multiplied by the number of chunks needed, namely O(1/α). 2 2.1 Preliminaries Datasets and Differential Privacy A dataset x ∈ (x1 , . . . , xn ) ∈ X n is an ordered tuple of n elements from some data universe X. We say that two datasets x, x0 are adjacent if they differ on only a single element and denote this relation by x ∼ x0 . Definition 2.1 (Differential Privacy [DMNS06]). A randomized algorithm M : X n → R is (ε, δ)differentially private if for every two adjacent datasets x ∼ x0 , and every R ⊆ R,   P [M(x) ∈ R] ≤ eε P M(x0 ) ∈ R + δ. 5 We also use the following well known group privacy property of (ε, 0)-differential privacy. We say that two datasets x, x0 are c-adjacent if the differ on at most c-elements, and denote this relation by x ∼c x0 . Lemma 2.2 ([DMNS06]). If M : X n → R is (ε, 0)-differentially private, then for every c ∈ N and every two c-adjacent datasets x ∼c x0 , and every R ⊆ R,   P [M(x) ∈ R] ≤ ecε P M(x0 ) ∈ R . 2.2 Queries In this work we consider two general classes of queries on the dataset: statistical queries, and search queries. Although statistical queries are a very special case of search queries, we will present each of them independently to avoid having to use overly abstract notation to describe statistical queries. Statistical Queries. A statistical query on a data universe X is defined by a Boolean predicate q : X → {0, 1}. Abusing notation, we define the evaluation of a statistical query q on a dataset x = (x1 , . . . , xn ) to be the average of the predicate over the rows n 1X q(x) = q(xi ) ∈ [0, 1]. n i=1 For a dataset x, a statistical query q, and an answer a ∈ [0, 1], the answer is α-accurate for q on x if |q(x) − a| ≤ α. Search Queries. A search query q on X n is defined by a loss function Lq : X n × R → [0, ∞), where R is an arbitrary set representing the range of possible outputs. For a dataset x ∈ X n and an output y ∈ R, we will say that y is α-accurate for q on x if Lq (x, y) ≤ α. In some cases the value of Lq will always be either 0 or 1. Thus we simply say that y is accurate for q on x if Lq (x, y) = 0. For example, if X n = {±1}n , we can define a search query by R = {±1}n , and Lq (x, y) = 0 if hx, yi ≥ αn and Lq (x, y) = 1 otherwise. In this case, the search query would ask for any vector y that has correlation α with the dataset. To see that statistical queries are a special case of search queries, given a statistical query q on X n , we can define a search query Lq with R = [0, 1] and Lq (x, a) = |q(x) − a|. Then both definitions of α-accurate align. 2.3 Models of Interactive Queries The goal of this work is to understand the implications of different ways to allow an adversary to query a sensitive dataset. In each of these models there is an algorithm M that holds a dataset x ∈ X n , and a fixed family of (statistical or search) queries Q on X n , and a bound k on the number of queries that M has to answer. There is also an adversary A that chooses the queries. The models differ in how the queries chosen by A are given to M. 6 Offline In the offline model, the queries q1 , . . . , qk ∈ Q are specified by the adversary A in advance and the algorithm M is given all the queries at once and must provide answers. Formally, we define the following function OfflineA → : X n → Qk × Rk depending A and M. ←M Input: x ∈ X n . A chooses q1 , · · · , qk ∈ Q. M is given x and q1 , · · · , qk and outputs a1 , · · · , ak ∈ R. Output: (q1 , · · · , qk , a1 , · · · , ak ) ∈ Qk × Rk . Figure 1: OfflineA → : X n → Qk × Rk ←M Online Non-Adaptive In the online non-adaptive model, the queries q1 , . . . , qk ∈ Q are again fixed in advance by the adversary, but are then given to the algorithm one at a time, and the algorithm must give an answer to query qj before it is shown qj+1 . We define a function OnlineA → : X n → Qk × Rk ←M depending on the adversary A and the algorithm M as follows. Input: x ∈ X n . A chooses q1 , · · · , qk ∈ Q. M is given x. For j = 1, . . . , k: M is given qj and outputs aj ∈ R.2 Output: (q1 , · · · , qk , a1 , · · · , ak ) ∈ Qk × Rk . Figure 2: OnlineA → : X n → Qk × Rk ←M Online Adaptive In the online adaptive model, the queries q1 , . . . , qk ∈ Q are not fixed, and the adversary may choose each qj based on the answers that the algorithm gave to the previous queries. We define a function AdaptiveA → : X n → Qk × Rk depending on the adversary A and the algorithm M as ←M follows. Definition 2.3 (Differential Privacy for Interactive Mechanisms). In each of the three cases — Offline, Online Non-Adaptive, or Online Adaptive — we say that M is (ε, δ)-differentially private if, for all adversaries A, respectively OfflineA → , OnlineA → , or AdaptiveA → is (ε, δ)←M ←M ←M differentially private. Definition 2.4 (Accuracy for Interactive Mechanisms). In each case — Offline, Online NonAdaptive, or Online Adaptive queries — we say that M is (α, β)-accurate if, for all adversaries A and all inputs x ∈ X n , " # P max Lqj (x, aj ) ≤ α ≥ 1 − β, q1 ,··· ,qk ,a1 ,··· ,ak j∈[k] 7 (1) Input: x ∈ X n . M is given x. For j = 1, . . . , k: A chooses a query qj ∈ Q. M is given qj and outputs aj ∈ R. Output: (q1 , · · · , qk , a1 , · · · , ak ) ∈ Qk × Rk . Figure 3: AdaptiveA → : X n → Qk × Rk ←M where (q1 , · · · , qk , a1 , · · · , ak ) is respectively drawn from one of OfflineA → (x), OnlineA → (x), or ←M ←M AdaptiveA → (x). We also say that M is α-accurate if the above holds with (1) replaced by ←M E " # max Lqj (x, aj ) ≤ α. q1 ,··· ,qk ,a1 ,··· ,ak j∈[k] 3 A Separation Between Offline and Online Queries In this section we prove that online accuracy is strictly harder to achieve than offline accuracy, even for statistical queries. We prove our results by constructing a set of statistical queries that we call prefix queries for which it is possible to take a dataset of size n and accurately answer superpolynomially many offline prefix queries in a differentially private manner, but it is impossible to answer more than O(n2 ) online prefix queries while satisfying differential privacy. We now define the family of prefix queries. These queries are defined on the universe S j 3 ∗ X = {±1}∗ = ∞ j=0 {±1} consisting of all finite length binary strings. For x, y ∈ {±1} , we use y  x to denote that y is a prefix of x. Formally yx ⇐⇒ |y| ≤ |x| and ∀i = 1, . . . , |y| xi = yi . Definition 3.1. For any finite set S ⊆ {±1}∗ of finite-length binary strings, we define the prefix query qS : {±1}∗ → {±1} by qS (x) = 1 ⇐⇒ ∃y ∈ S y  x. We also define Qprefix = {qS | S ⊂ {±1}∗ } B Qprefix = {qS | S ⊂ {±1}∗ , |S| ≤ B} to be the set of all prefix queries and the set of prefix queries with sizes bounded by B, respectively. 3 All of the arguments in this section hold if we restrict to strings of length at most k + log n. However, we allow strings of arbitrary length to reduce notational clutter. 8 3.1 Answering Offline Prefix Queries We now prove that there is a differentially private algorithm that answers superpolynomially many prefix queries, provided that the queries are specified offline. Theorem 3.2 (Answering Offline Prefix Queries). For every α, ε ∈ (0, 1/10), every B ∈ N, and every n ∈ N, there exists a   √ 3 3 k = min 2Ω( α εn) , 2Ω(α εn/ log(B)) B and an (ε, 0)-differentially private algorithm Mprefix : X n × (Qprefix )k → Rk that is (α, 1/100)-accurate B for k offline queries from Qprefix . We remark that it is possible to answer even more offline prefix queries by relaxing to (ε, δ)-differential privacy for some negligibly small δ > 0. However, we chose to state the results for (ε, 0)-differential privacy to emphasize the contrast with the lower bound, which applies even when δ > 0, and to simplify the statement. Our algorithm for answering offline queries relies on the existence of a good differentially private algorithm for answering arbitrary offline statistical queries. For concreteness, the so-called “BLR mechanism” of Blum, Ligett, and Roth [BLR13] suffices, although different parameter tradeoffs can be obtained using different mechanisms. Differentially private algorithms with this type of guarantee exist only when the data universe is bounded, which is not the case for prefix queries. However, as we show, when the queries are specified offline, we can replace the infinite universe X = {±1}∗ with a finite, restricted universe X 0 and run the BLR mechanism. Looking ahead, the key to our separation will be the fact that this universe restriction is only possible in the offline setting. Before we proceed with the proof of Theorem 3.2, we will state the guarantees of the BLR mechanism. Theorem 3.3 ([BLR13]). For every 0 < α, ε ≤ 1/10 and every finite data universe X, if QSQ is the set of all statistical queries on X, then for every n ∈ N, there is a k = 2Ω(α 3 εn/ log |X|) and an (ε, 0)-differentially private algorithm MBLR : X n × QkSQ → Rk that is (α, 1/100)-accurate for k offline queries from QSQ . We are now ready to prove Theorem 3.2. B Proof of Theorem 3.2. Suppose we are given a set of queries qS1 , . . . , qSk ∈ Qprefix and a dataset S k n ∗ x ∈ X where X = {±1} . Let S = j=1 Sj . We define the universe XS = S ∪ {∅} where ∅ denotes the empty string of length 0. Note that this universe depends on the choice of queries, and that |XS | ≤ kB + 1. Since XS ⊂ X, it will be well defined to restrict the domain of each query qSj to elements of XS . Next, given a dataset x = (x1 , . . . , xn ) ∈ X n , and a collection of sets S1 , . . . , Sk ⊂ X, we give a procedure for mapping each element of x to an element of XS to obtain a new dataset xS = (x1S , . . . , xnS ) ∈ XSn that is equivalent to x with respect to the queries qS1 , . . . , qSk . Specifically, define rS : X → XS by rS (x) = arg max |y|. y∈XS ,yx That is, rS (x) is the longest string in XS that is a prefix of x. We summarize the key property of rS in the following claim 9 Claim 3.4. For every x ∈ X, and j = 1, . . . , k, qSj (rS (x)) = qSj (x). Proof of Claim 3.4. First, we state a simple but important fact about prefixes: If y, y 0 are both prefixes of a string x with |y| ≤ |y 0 |, then y is a prefix of y 0 . Formally, ∀x, y, y 0 ∈ {0, 1}∗ (y  x ∧ y 0  x ∧ |y| ≤ |y 0 |) =⇒ y  y 0 . (2) Now, fix any x ∈ X and any query qSj and suppose that qSj (x) = 1. Then there exists a string y ∈ Sj such that y  x. By construction, we have that rS (x)  x and that |rS (x)| ≥ |y|. Thus, by (2), we have that y  rS (x). Thus, there exists y ∈ Sj such that y  rS (x), which means qSj (rS (x)) = 1, as required. Next, suppose that qSj (rS (x)) = 1. Then, there exists y ∈ Sj such that y  rS (x). By construction, rS (x)  x, so by transitivity we have that y  x. Therefore, qSj (x) = 1, as required. xS Given this lemma, we can replace every row xi of x with xiS = rS (xi ) to obtain a new dataset such that for every j = 1, . . . , k, n n i=1 i=1 1X 1X qSj (x ) = qSj (xiS ) = qSj (xi ) = qSj (x). n n S Thus, we can answer qS1 , · · · , qSk on xS ∈ XSn , rather than on x ∈ X n . Note that each row of xS depends only on the corresponding row of x. Hence, for every set of queries qS1 , . . . , qSk , if x ∼ x0 are adjacent datasets, then xS ∼ x0S are also adjacent datasets. Consequently, applying a (ε, δ)-differentially private algorithm to xS yields a (ε, δ)-differentially private algorithm as a function of x. In particular, we can give α-accurate answers to these queries using the algorithm MBLR as long as 3 3 k ≤ 2Ω(α εn/ log |XS |) = 2Ω(α εn/ log(kB+1)) . Rearranging terms gives the bound in Theorem 3.2. We specify the complete algorithm Mprefix in Figure 4. Mprefix (x; qS1 , . . . , qSk ): S Write x = (x1 , . . . , xn ) ∈ X n , S = kj=1 Sj , XS = S ∪ {∅}. For i = 1, . . . , n, let xiS = rS (xi ) and let xS = (x1S , . . . , xnS ) ∈ XSn . Let (a1 , . . . , ak ) = MBLR (xS ; qS1 , . . . , qSk ). Output (a1 , . . . , ak ). Figure 4: Mprefix 3.2 A Lower Bound for Online Prefix Queries Next, we prove a lower bound for online queries. Our lower bound shows that the simple approach of perturbing the answer to each query with independent noise is essentially optimal for prefix queries. Since this approach is only able to answer k = O(n2 ) queries, we obtain an exponential separation between online and offline statistical queries for a broad range of parameters. 10 Theorem 3.5 (Lower Bound for Online Prefix Queries). There exists a function k = O(n2 ) such that for every sufficiently large n ∈ N, there is no (1, 1/30n)-differentially private algorithm M that n takes a dataset x ∈ X n and is (1/100, 1/100)-accurate for k online queries from Qprefix . √ In this parameter regime, our algorithm from Section 3.1 answers k = exp(Ω̃( n)) offline prefix queries, so we obtain an exponential separation. Our lower bound relies on a connection between fingerprinting codes and differential privacy [Ull13, BUV14, SU15a, DSS+ 15]. However, instead of using fingerprinting codes in a black-box way, we will make a direct use of the main techniques. Specifically, we will rely heavily on the following key lemma. The proof appears in Appendix A. Lemma 3.6 (Fingerprinting Lemma). Let f : {±1}n → [−1, 1] be any function. Suppose p is sampled from the uniform distribution over [−1, 1] and c ∈ {±1}n is a vector of n independent bits, where each bit has expectation p. Letting c denote the coordinate-wise mean of c, we have   X   1   (ci − p) + 2 f (c) − c  ≥ . E f (c) ·  3 p,c  i∈[n] Roughly the fingerprinting lemma says that if we sample a vector c ∈ {±1}n in a specific fashion, then for any bounded function f (c), we either have that f (c) has “significant” correlation with ci for some coordinate i, or that f (c) is “far” from c on average. In our lower bound, the vector c will represent a column of the dataset, so each coordinate ci will correspond to the value of some row of the dataset. The function f (c) will represent the answer to some prefix query. We will use the accuracy of a mechanism for answering prefix queries to argue that f (c) is not far from c, and therefore conclude that f (c) must be significantly correlated with some coordinate ci . On the other hand, if ci were excluded from the dataset, then ci is sufficiently random that the mechanism’s answers cannot be significantly correlated with ci . We will use this to derive a contradiction to differential privacy. Proof of Theorem 3.5. First we define the distribution on the input dataset x = (x1 , . . . , xn ) and the queries qS1 , · · · , qSk . Input dataset x: • Sample p1 , · · · , pk ∈ [−1, 1] independently and uniformly at random. • Sample c1 , · · · , ck ∈ {±1}n independently, where each cj is a vector of n independent bits, each with expectation pj . • For i ∈ [n], define xi = (binary(i), ci1 , · · · , cik ) ∈ {±1}dlog2 ne+k , where binary(i) ∈ {±1}dlog2 ne is the binaryrepresentation n of i where 1 is mapped to +1 and 4 dlog ne+k 0 is mapped to −1. Let x = (x1 , . . . , xn ) ∈ {±1} 2 . 4 This choice is arbitrary, and is immaterial to our lower bound. The only property we need is that binary(i) uniquely identifies i and, for notational consistency, we require binary(i) to be a string over the alphabet {±1}. 11 Queries qS1 , · · · , qSk : • For i ∈ [n] and j ∈ [k], define j−1 zi,j = (binary(i), ci1 , · · · , ci , 1) ∈ {±1}dlog2 ne+j . n o n • For j ∈ [k], define qSj ∈ Qprefix by Sj = zi,j | i ∈ [n] . These queries are designed so that the correct answer to each query j ∈ [k] is given by qSj (x) = cj : Claim 3.7. For every j ∈ [k], if the dataset x and the queries qS1 , . . . , qSk are constructed as above, then with probability 1, n n 1X 1X j qSj (x) = qSj (xi ) = ci = cj n n i=1 i=1 Proof of Claim 3.7. We have qSj (xi ) = 1 ⇐⇒ ∃w ∈ Sj (w  xi ) ⇐⇒ ∃` ∈ [n] (z`,j  xi ). j j By construction, we have z`,j  xi if and only if ` = i and xi = ci = 1, as required. Here, we have used the fact that the strings binary(i) are unique to ensure that z`,j  xi if and only if ` = i. We now show no differentially private algorithm M is capable of giving accurate answers to n these queries. Let M be an algorithm that answers k online queries from Qprefix . Suppose we generate an input dataset x and queries qS1 , . . . , qSk as above, and run M(x) on this sequence of queries. Let a1 , . . . , ak ∈ [−1, 1] denote the answers given by M. First, we claim that, if M(x) is accurate for the given queries, then each answer aj is close to P j the corresponding value cj = n1 ni=1 ci . n Claim 3.8. If M is (1/100, 1/100)-accurate for k online queries from Qprefix , then with probability 1 over the choice of x and qS1 , . . . , qSk above,   X  E  aj − c j M j∈[k]   k  .  ≤  10 Proof of Claim 3.8. By Claim 3.7, for every j ∈ [k], qSj (x) = cj . Since, by assumption, M is n (1/100, 1/100)-accurate for k online queries from Qprefix , we have that with probability at least 99/100, 1 1 ∀j ∈ [k] aj − qSj (x) ≤ =⇒ ∀j ∈ [k] aj − cj ≤ 100 100 By linearity of expectation, this case contributes at most k/100 to the expectation. On the other hand, |aj − qSj (x)| ≤ 2, so by linearity of expectation the case where M is inaccurate contributes at most 2k/100 to the expectation. This suffices to prove the claim. The next claim shows how the fingerprinting lemma (Lemma 3.6) can be applied to M. 12 Claim 3.9.    X  X j  j  E  (ci − pj ) + 2 aj − cj a   p,x,q,M  j∈[k] i∈[n]   k   ≥ .  3 Proof. By linearity of expectation, it suffices to show that, for every j ∈ [k],    1  X j   E aj (ci − pj ) + 2 aj − cj  ≥ .  3 p,x,q,M  i∈[n] Since each column cj is generated independently from the columns c1 , . . . , cj−1 , cj and pj are independent from qS1 , · · · , qSj . Thus, at the time M produces the output aj , it does not have any information about cj or pj apart from its private input. (Although M later learns cj when it is asked qSj+1 .) For any fixed values of c1 , . . . , cj−1 and the internal randomness of M, the answer aj is a deterministic function of cj . Thus we can apply Lemma 3.6 to this function to establish the claim. Combining Claims 3.8 and 3.9 gives    2k  X X j   aj E  (ci − pj ) ≥ .  15  p,x,q,M j∈[k] i∈[n] In particular, there exists some i ∗ ∈ [n] such that     X 2k j   aj (ci ∗ − pj ) ≥ E  .  15n p,x,q,M  (3) j∈[k] To complete the proof, we show that (3) violates the differential privacy guarantee unless √ n ≥ Ω( k). k 1 1 k h To i this end, fix any p , . . . , p ∈ [−1, 1], whence ci ∗ , · · · , ci ∗ ∈h {±1} i are independent bits with j j 1 k j E c = p . Let c̃ , · · · , c̃ ∈ {±1} be independent bits with E c̃ = pj . The random variables ci1∗ , · · · , cik∗ have the same marginal distribution as c̃1 , · · · , c̃k . However, c̃1 , · · · , c̃k are independent from a1 , · · · , ak , whereas a1 , · · · , ak depend on ci1∗ , · · · , cik∗ . Consider the quantities X X j Z= aj (ci ∗ − pj ) and Z̃ = aj (c̃j − pj ). j∈[k] j∈[k] Differential privacy implies that Z and Z̃ have similar distributions. Specifically, if M is (1, 1/30n)-differentially private, then Z 2k E [|Z|] = Z 2k  P [|Z| > z] dz ≤ 0 0  h i h i 1 k eP |Z̃| > z + dz = eE |Z̃| + , 30n 15n as |Z|, |Z̃| ≤ 2k with probability 1. 13 Now E [|Z|] ≥ E [Z] ≥ 2k/15n, by (3). On the other hand, aj is independent from c̃j and h i h i E c̃j − pj = 0, so E Z̃ = 0. We now observe that h i2 h i h i X h i X h i E |Z̃| ≤ E Z̃ 2 = Var Z̃ = Var aj (c̃j − pj ) ≤ E (c̃j − pj )2 ≤ k. j∈[k] Thus, we have j∈[k] h i √ k 2k k ≤ E [|Z|] ≤ eE |Z̃| + ≤e k+ . 15n 15n 15n √ The condition 2k/15n ≤ e k+k/15n is a contradiction unless k ≤ 225e2 n2 . Thus, we can conclude that there exists a k = O(n2 ) such that no (1, 1/30n)-differentially private algorithm is accurate n for more than k online queries from Qprefix , as desired. This completes the proof. 4 A Separation Between Adaptive and Non-Adaptive Online Queries In this section we prove that even among online queries, answering adaptively-chosen queries can be strictly harder than answering non-adaptively-chosen queries. Our separation applies to a family of search queries that we call correlated vector queries. We show that for a certain regime of parameters, it is possible to take a dataset of size n and privately answer an exponential number of fixed correlated vector queries, even if the queries are presented online, but it is impossible to answer more than a constant number of adaptively-chosen correlated vector queries under differential privacy. The queries are defined on datasets x ∈ {±1}n (hence the data universe is X = {±1}). For every query, the range R = {±1}n is the set of n-bit vectors.n We fix some o parameters 0 < α < 1 and m ∈ N. A query q is specified by a set V where V = v 1 , . . . , v m ⊆ {±1}n is a set of n-bit vectors. Roughly, an accurate answer to a given search query is any vector y ∈ {±1}n that is approximately α-correlated with the input dataset x ∈ {±1}n and has nearly as little correlation as possible with every v j . By “as little correlation as possible with v j ” we mean that v j may itself be correlated with x, in which case y should be correlated with v j only insofar as this correlation comes through the correlation between y and x. Formally, for a query qV , we define the loss function LqV : X n × X n → {0, 1} by LqV (x, y) = 0 ⇐⇒ hy − αx, xi ≤ α2n α2n ∧ ∀v j ∈ V hy − αx, v j i ≤ . 100 100 We remark√that the choice of α 2 n/100 is somewhat arbitrary, and we can replace this choice with C for any n  C  n and obtain quantitatively different results. We chose to fix this particular choice in order to reduce notational clutter. We let n,α,m Qcorr = {qV | V ⊆ {±1}n , |V | ≤ m} be the set of all correlated vector queries on {±1}n for parameters α, m. 4.1 Answering Online Correlated Vector Queries Provided that all the queries are fixed in advance, we can privately answer correlated vector queries using the randomized response algorithm. This algorithm simply takes the input vector 14 x ∈ {±1}n and outputs a new vector y ∈ {±1}n where each bit yi is independent and is set to xi with probability 1/2 + ρ for a suitable choice of ρ > 0. The algorithm will then answer every correlated vector query with this same vector y. The following theorem captures the parameters that this mechanism achieves. Theorem 4.1 (Answering Online Correlated Vector Queries). For every 0 < α < 1/2, there exists 4 k = 2Ω(α n) such that, for every sufficiently large n ∈ N, there is a (3α, 0)-differentially private n,α,k algorithm Mcorr that takes a dataset x ∈ {±1}n and is (1/k)-accurate for k online queries from Qcorr . Proof Theorem 4.1. Our algorithm based on randomized response is presented in Figure 5 below. Mcorr : Input: a dataset x ∈ {±1}n . Parameters: 0 < α < 1/2. For i = 1, . . . , n, independently set    +xi yi =   −xi with probability with probability 1+α 2 1−α 2 . Let y = (y1 , . . . , yn ) ∈ {±1}n , and answer each query with y. Figure 5: Mcorr To establish privacy, observe that by construction each output bit yi depends only on xi and is independent of all xj , yj for j , i. Therefore, it suffices to observe that if 0 < α < 1/2, 1≤ P[yi = +1 | xi = +1] 1 + α = ≤ e3α P[yi = +1 | xi = −1] 1 − α and similarly 1≥ P[yi = −1 | xi = +1] 1 − α = ≥ e−3α . P[yi = −1 | xi = −1] 1 + α To prove accuracy, observe that since the output y does not depend on the sequence of n,α,k queries, we can analyze the mechanism as if the queries qV1 , . . . , qVk ∈ Qcorr were fixed and given Sk 2 all at once. Let V = j=1 Vj , and note that |V | ≤ k . First, observe that E [y] = αx. Thus we have E [hy − αx, xi] = 0 y and ∀v ∈ V E [hy − αx, vi] = 0 y Since x and every vector in V is fixed independently of y, and the coordinates of y are independent by construction, the quantities hy, xi and hy, vi are each the sum of n independent {±1}-valued random variables. Thus, we can apply Hoeffding’s inequality5 and a union bound 5 We use the following statement of Hoeffding’s Inequality: if Z , . . . , Z are independent {±1}-valued random 1 n P variables, and Z = ni=1 Zi , then   √ 2 P Z − E [Z] > C n ≤ 2e−C /2 15 to conclude # ! −α 4 n α2n ≤ 2 exp P |hy − αx, xi| > y 100 20000 " # ! 2 α n −α 4 n 2 P ∃v ∈ V s.t. |hy − αx, vi| > ≤ 2k exp y 100 20000 " Ω(α Thetheorem  now follows by setting an appropriate choice of k = 2 4 −α n ≤ 1/k. exp 20000 4.2 4 n) such that 2(k 2 + 1) · A Lower Bound for Adaptive Correlated Vector Queries We now prove a contrasting lower bound showing that if the queries may be chosen adaptively, then no differentially private algorithm can answer more than a constant number of correlated vector queries. The key to our lower bound is that fact that adaptively-chosen correlated vector queries allow an adversary to obtain many vectors y 1 , . . . , y k that are correlated with x but pairwise nearly orthogonal with each other. As we prove, if k is sufficiently large, this information is enough to recover a vector x̃ that has much larger correlation with x than any of the vectors y 1 , . . . , y k have with x. By setting the parameters appropriately, we will obtain a contradiction to differential privacy. Theorem 4.2 (Lower Bound for Correlated Vector Queries). For every 0 < α < 1/2, there is a k = O(1/α 2 ) such that for every sufficiently large n ∈ N, there is no (1, 1/20)-differentially private n,α,k algorithm that takes a dataset x ∈ {±1}n and is 1/100-accurate for k adaptive queries from Qcorr We remark that the value of k in our lower bound is optimal up to constants, as there is a (1, 1/20)-differentially private algorithm that can answer k = Ω(1/α 2 ) adaptively-chosen queries of this sort. The algorithm simply answers each query with an independent invocation of randomized response. Randomized response is O(α)-differentially private for each query, and we can invoke the adaptive composition theorem [DMNS06, DRV10] to argue differential privacy for k = Ω(1/α 2 )-queries. Before proving Theorem 4.2, we state and prove the combinatorial lemma that forms the foundation of our lower bound. Lemma 4.3 (Reconstruction Lemma). Fix parameters 0 ≤ a, b ≤ 1. Let x ∈ {±1}n and y 1 , · · · , y k ∈ {±1}n be vectors such that hy j , xi ≥ an ∀1 ≤ j ≤ k ∀1 ≤ j < j 0 ≤ k Then, if we let x̃ = sign( Pk j=1 y j ) ∈ {±1}n 0 |hy j , y j i| ≤ bn. be the coordinate-wise majority of y 1 , . . . , y k , we have ! 2(b − a2 ) 2 hx̃, xi ≥ 1 − 2 − n. a k a2 Proof of Lemma 4.3. Let k 1X j y= y ∈ [−1, 1]n . k j=1 16 By linearity, hy, xi ≥ an and kyk22 = k   1 1 X j j0 1  2 hy , y i ≤ kn + (k − k)bn ≤ + b n. k k2 0 k2 j,j =1 Define a random variable W ∈ [−1, 1] to be xi y i for a uniformly random i ∈ [n]. Then n h i 1X 1 1 1 E [W ] = hx, yi ≥ a and E W 2 = xi2 y 2i = kyk22 ≤ + b n n n k i=1 By Chebyshev’s inequality,  Var[W ] E[W 2 ] − E[W ]2 P [W ≤ 0] ≤ P |W − E [W ] | ≥ a ≤ = ≤ a2 a2  1 k + b − a2 a2 . Meanwhile, n n i=1 i=1 1X 1X 1 1 P [W ≤ 0] = I[xi y i ≤ 0] ≥ I[sign(y i ) , xi ] = − hsign(y), xi. n n 2 2n Thus we conclude  1  k + b − a2   hsign(y), xi ≥ n − 2nP [W ≤ 0] ≥ n − 2n   a2 P To complete the proof, we rearrange terms and note that sign(y) = sign( kj=1 y j ). Now we are ready to prove our lower bound for algorithms that answer adaptively-chosen correlated vector queries. Proof of Theorem 4.2. We will show that the output y 1 , . . . , y k of any algorithm M that takes a dataset x ∈ {±1}n and answers k = 100/α 2 adaptively-chosen correlated vector queries can be used to find a vector x̃ ∈ {±1}n such that hx̃, xi > n/2. In light of Lemma 4.3, this vector will P simply be x̃ = sign( kj=1 y j ). We will then invoke the following elementary fact that differentially private algorithms do not admit this sort of reconstruction of their input dataset. Fact 4.4. For every sufficiently large n ∈ N, there is no (1, 1/20)-differentially private algorithm M : {±1}n → {±1}n such that for every x ∈ {±1}n , with probability at least 99/100, hM(x), xi > n/2. n o The attack works as follows. For j = 1, . . . , k, define the set Vj = y 1 , . . . , y j−1 and ask the query n,α,k qVj (x) ∈ Qcorr to obtain some vector y j . Since M is assumed to be accurate for k adaptively- chosen queries, with probability 99/100, we obtain vectors y 1 , . . . , y k ∈ {±1}n such that ∀1 ≤ j ≤ k hy j , xi ≥ hαx, xi − |hy − αx, xi| ≥ αn − ≥ an, 17 α2n 100 ∀1 ≤ j < j 0 ≤ k 0 0 |hy j , y j i| ≤ |hαx, y j i| + |hy j − αx, y j i| ≤ α|hy j , xi| + α2n 100   α2n ≤ α |hαx, xi| + |hy j − αx, xi| + 100 3 2 α n α n ≤ α2n + + 100 100 51 2 ≤ α n 50 = bn, where a = 99α/100 and b = 51α 2 /50. Thus, by Lemma 4.3, if x̃ = sign( we have ! 2(b − a2 ) 2 hx̃, xi ≥ 1 − 2 − n a k a2 Pk j=1 y j ), and k = 100/α 2 , ! 2(51α 2 /50 − (99α/100)2 ) 2 − n = 1− (99α/100)2 k (99α/100)2 !! (51/50) − (99/100)2 2(100/99)2 n = 1− −2 100 (99/100)2 ≥ 0.89n ≥ n/2. By Fact 4.4, this proves that M cannot be (1, 1/20)-differentially private. 5 Threshold Queries First we define threshold queries, which are a family of statistical queries. Definition 5.1. Let ThreshX denote the class of threshold queries over a totally ordered domain X. That is, ThreshX = {cx : x ∈ X} where cx : X → {0, 1} is defined by cx (y) = 1 iff y ≤ x. 5.1 Separation for Pure Differential Privacy In this section, we show that the sample complexity of answering adaptively-chosen thresholds can be exponentially larger than that of answering thresholds offline. Proposition 5.2 ([DNPR10, CSS11, DNRR15]). Let X be any totally ordered domain. Then there exists a (ε, 0)-differentially private mechanism M that, given x ∈ X n , gives α-accurate answers to k offline queries from ThreshX for ( )! log k + log2 (1/α) log2 k n = O min , αε αε On the other hand, we show that answering k adaptively-chosen threshold queries can require sample complexity as large as Ω(k) – an exponential gap. Note that this matches the upper bound given by the Laplace mechanism [DMNS06]. 18 Proposition 5.3. Answering k adaptively-chosen threshold queries on [2k−1 ] to accuracy α subject to ε-differential privacy requires sample complexity n = Ω(k/αε). The idea for the lower bound is that an analyst may adaptively choose k threshold queries to binary search for an “approximate median” of the dataset. However, a packing argument shows that locating an approximate median requires sample complexity Ω(k). Definition 5.4 (Approximate Median). Let X be a totally ordered domain, α > 0, and x ∈ X n . We call y ∈ X an α-approximate median of x if 1 1 {i ∈ [n] : xi ≤ y} ≥ − α n 2 and 1 1 {i ∈ [n] : xi ≥ y} ≥ − α. n 2 Proposition 5.3 is obtained by combining Lemmas 5.5 and 5.6 below. Lemma 5.5. Suppose M answers k = d1 + log2 T e adaptively-chosen queries from Thresh[T ] with ε-differential privacy and (α, β)-accuracy. Then there exists an ε-differentially private M 0 : [T ]n → [T ] that computes an α-approximate median with probability at least 1 − β. Proof. The algorithm M 0 , formalized in Figure 6, uses M to perform a binary search. Input: x ∈ X n . M is given x. Initialize `1 = 0, u1 = T , and j = 1. While uj − `j > 1 repeat: Let mj = d(uj + `j )/2e. Give M the query cmj ∈ Thresh[T ] and obtain the answer aj ∈ [0, 1]. If aj ≥ 21 , set (`j+1 , uj+1 ) = (`j , mj ); otherwise set (`j+1 , uj+1 ) = (mj , uj ). Increment j. Output uj . Figure 6: M 0 : X n → X We have u1 − `1 = T and, after every query j, uj+1 − `j+1 ≤ d(uj − `j )/2e. Since the process stops when uj − `j = 1, it is easy to verify that M 0 makes at most d1 + log2 (T − 1)e queries to M. Suppose all of the answers given by M are α-accurate. This happens with probability at least 1 − β. We will show that, given this, M 0 outputs an α-approximate median, which completes the proof. We claim that cuj (x) ≥ 12 − α for all j. This is easily shown by induction. The base case is cT (x) = 1 ≥ 12 − α. At each step either uj+1 = uj (in which case the induction hypothesis can be applied) or uj+1 = mj ; in the latter case our accuracy assumption gives cuj+1 (x) = cmj (x) ≥ aj − α ≥ 1 − α. 2 We also claim that c`j (x) < 12 +α for all j. This follows from a similar induction and completes the proof. 19 Lemma 5.6. Let M : [T ]n → [T ] be an ε-differentially private algorithm that computes an αapproximate median with confidence 1 − β. Then ! log T + log(1/β) n≥Ω . αε Proof. Let m = d( 12 − α)ne − 1. For each t ∈ [T ], let xt ∈ [T ]n denote the dataset containing m copies of 1, m copies of T , and n − 2m copies of t. Then for each t ∈ [T ], h i P M(xt ) = t ≥ 1 − β. On the other hand, by the pigeonhole principle, there must exist t∗ ∈ [T − 1] such that h i T h i P M(x ) ∈ [T − 1] β P M(xT ) = t∗ ≤ ≤ . T −1 T −1 The inputs xT and xt∗ differ in at most n − 2m ≤ 2αn + 2 entries. By group privacy, h i h i β 1 − β ≤ P M(xt∗ ) = t∗ ≤ eε(2αn+2) P M(xT ) = t∗ ≤ eε(2αn+2) . T −1 Rearranging these inequalities gives ! (1 − β)(T − 1) ≥ Ω(log(T /β)), O(εαn) ≥ ε(2αn + 2) ≥ log β which yields the result. Remark 5.7. Proposition 5.3 can be extended to online non-adaptive queries, which yields a separation between the online non-adaptive and offline models for pure differential privacy and threshold queries. The key observation behind remark 5.7 is that, while Lemma 5.5 in general requires making adaptive queries, for the inputs xt ∈ [T ]n (t ∈ [T ]) used in Lemma 5.6 the queries are “predictable.” In particular, on input xt , the algorithm M 0 from the proof of Lemma 5.5 will (with probability at least 1 − β) always make the same sequence queries. This allows the queries to be specified in advance in a non-adaptive manner. More precisely, we can produce an algorithm Mt0 that produces non-adaptive online queries by simulating M 0 on input xt and using those queries. Given the answers to these online non-adaptive queries, Mt0 can either accept or reject its input depending on whether the answers are consistent with the input xt ; Mt0 will accept xt 0 with high probability and reject xt for t 0 , t with high probabiliy. The proof of Lemma 5.6 can be carried out using Mt0∗ instead of M 0 at the end. 5.2 The BetweenThresholds Algorithm The key technical novelty behind our algorithm for answering adaptively-chosen threshold queries is a refinement of the “Above Threshold” algorithm [DR14, §3.6], which underlies the ubiquitous “sparse vector” technique [DNR+ 09, RR10, DNPR10, HR10]. The sparse vector technique addresses a setting where we have a stream of k (adaptivelychosen) low-sensitivity queries and a threshold parameter t. Instead of answering all k queries 20 accurately, we are interested in answering only the ones that are above the threshold t – for the remaining queries, we only require a signal that they are below the threshold. Intuitively, one would expect to only pay in privacy for the queries that are actually above the threshold. And indeed, one can get away with sample complexity proportional to the number of queries that are above the threshold, and to the logarithm of the total number of queries. We extend the sparse vector technique to settings where we demand slightly more information about each query beyond whether it is below a single threshold. In particular, we set two thresholds t` < tu , and for each query, release a signal as to whether the query is below the lower threshold, above the upper threshold, or between the two thresholds. As long as the thresholds are sufficiently far apart, whether (the noisy answer to) a query is below the lower threshold or above the upper threshold is stable, in that it is extremely unlikely to change on neighboring datasets. As a result, we obtain an (ε, δ)-differentially private algorithm that achieves the same accuracy guarantees as the traditional sparse vector technique, i.e. sample complexity proportional to log k. Our algorithm is summarised by the following theorem.6 Theorem 5.8. Let α, β, ε, δ, t ∈ (0, 1) and n, k ∈ N satisfy n≥ 1 max {12 log(30/εδ), 16 log((k + 1)/β)} . αε Then there exists a (ε, δ)-differentially private algorithm that takes as input x ∈ X n and answers a sequence of adaptively-chosen queries q1 , · · · , qk : X n → [0, 1] of sensitivity 1/n with a1 , · · · , a≤k ∈ {L, R, >} such that, with probability at least 1 − β, • aj = L =⇒ qj (x) ≤ t, • aj = R =⇒ qj (x) ≥ t, and • aj = > =⇒ t − α ≤ qj (x) ≤ t + α. The algorithm may halt before answering all k queries; however, it only halts after outputting >. Our algorithm is given in Figure 7. The analysis is split into Lemmas 5.9 and 5.10. Input: x ∈ X n . Parameters: ε, t` , tu ∈ (0, 1) and n, k ∈ N. Sample µ ∼ Lap(2/εn) and initialize noisy thresholds t̂` = t` + µ and t̂u = tu − µ. For j = 1, 2, · · · , k: Receive query qj : X n → [0, 1]. Set cj = qj (x) + νj where νj ∼ Lap(6/εn). If cj < t̂` , output L and continue. If cj > t̂u , output R and continue. If cj ∈ [t̂` , t̂u ], output > and halt. Figure 7: BetweenThresholds 6 In Theorem 5.8, only one threshold is allowed. However, our algorithm is more general and permits the setting of two thresholds. We have chosen this statement for simplicity. 21 Lemma 5.9 (Privacy for BetweenThresholds). Let ε, δ ∈ (0, 1) and n ∈ N. Then BetweenThresholds (Figure 7) is (ε, δ)-differentially private for any adaptively-chosen sequence of queries as long as the gap between the thresholds t` , tu satisfies tu − t` ≥ 12 (log(10/ε) + log(1/δ) + 1) . εn Lemma 5.10 (Accuracy for BetweenThresholds). Let α, β, ε, t` , tu ∈ (0, 1) and n, k ∈ N satisfy n≥ 8 (log(k + 1) + log(1/β)) . αε Then, for any input x ∈ X n and any adaptively-chosen sequence of queries q1 , q2 , · · · , qk , the answers a1 , a2 , · · · a≤k produced by BetweenThresholds (Figure 7) on input x satisfy the following with probability at least 1 − β. For any j ∈ [k] such that aj is returned before BetweenThresholds halts, • aj = L =⇒ qj (x) ≤ t` + α, • aj = R =⇒ qj (x) ≥ tu − α, and • aj = > =⇒ t` − α ≤ qj (x) ≤ tu + α. Combining Lemmas 5.9 and 5.10 and setting t` = t − α/2 and tu = t + α/2 yields Theorem 5.8. Proof of Lemma 5.9. Our analysis is an adaptation of Dwork and Roth’s [DR14, §3.6] analysis of the AboveThreshold algorithm. Recall that a transcript of the execution of BetweenThresholds is given by a ∈ {L, R, >}∗ . Let M : X n → {L, R, >}∗ denote the function that simulates BetweenThresholds interacting with a given adaptive adversary (cf. Figure 3) and returns the transcript. Let S ⊂ {L, R, >}∗ be a set of transcripts. Our goal is to show that for adjacent datasets x ∼ x0 ,   P [M(x) ∈ S] ≤ eε P M(x0 ) ∈ S + δ. Let 1 6 2 z∗ = (tu − t` ) − log(10/ε) − 1/n ≥ log(1/δ). 2 εn εn Our strategy will be to show that as long as the noise value µ is under control, in particular if µ ≤ z∗ , then the algorithm behaves in essentially the same way as the standard AboveThreshold algorithm. Meanwhile, the event µ > z∗ which corresponds to the (catastrophic) event where the upper and lower thresholds are too close or overlap, happens with probability at most δ. The following claim reduces the privacy analysis to examining the probability of obtaining any single transcript a: Claim 5.11. Suppose that for any transcript a ∈ {L, R, >}∗ , and any z ≤ z∗ , that   P [M(x) = a|µ = z] ≤ eε/2 P M(x0 ) = a|µ = z + 1/n . Then M is (ε, δ)-differentially private. Proof. By properties of the Laplace distribution, since µ ∼ Lap(2/εn), for any z ∈ R, we have P [µ = z] ≤ eε/2 P [µ = z + 1/n] , 22 and ∗ 1 P [µ > z∗ ] = e−εnz /2 ≤ δ. 2 Fix a set of transcripts S. Combining these properties allows us to write Z P [M(x) ∈ S] = P [M(x) ∈ S|µ = z] P [µ = z] dz R ! Z z∗ ≤ P [M(x) ∈ S|µ = z] P [µ = z] dz + P [µ > z∗ ] −∞ ≤ e ≤ e Z ε/2 ε z∗ !  P M(x ) ∈ S|µ = z + 1/n P [µ = z] dz + δ  Z 0 −∞ z∗ !   0 P M(x ) ∈ S|µ = z + 1/n P [µ = z + 1/n] dz + δ −∞ ε   ≤ e P M(x0 ) ∈ S + δ Returning to the proof of Lemma 5.9, fix a transcript a ∈ {L, R, >}∗ . Our goal is now to show that M satisfies the hypotheses of Claim 5.11, namely that for any z ≤ z∗ ,   P [M(x) = a|µ = z] ≤ eε/2 P M(x0 ) = a|µ = z + 1/n . (4) For some k ≥ 1, we can write the transcript a as (a1 , a2 , . . . , ak ), where aj ∈ {L, R} for each j < k, and ak = >. For convenience, let A = M(x) and A0 = M(x0 ). We may decompose h i P [M(x) = a|µ = z] = P (∀j < k, Aj = aj ) ∧ qk (x) + νk ∈ [t̂` , t̂u ]|µ = z h i h i = P (∀j < k, Aj = aj )|µ = z · P qk (x) + νk ∈ [t̂` , t̂u ]|µ = z ∧ (∀j < k, Aj = aj ) . (5) We upper bound each factor on the right-hand side separately. Claim 5.12. h i P [(∀i < k, Ai = ai )|µ = z] ≤ P (∀i < k, A0i = ai )|µ = z + 1/n Proof. For fixed z, let Az (x) denote the set of noise vectors (ν1 , . . . , νk−1 ) for which (A1 , . . . , Ak−1 ) = (a1 , . . . , ak−1 ) when ν = z. We claim that as long as z ≤ z∗ , then Az (x) ⊆ Az+1/n (x0 ). To argue this, let (ν1 , . . . , νk−1 ) ∈ Az (x). Fix an index j ∈ {1, . . . , k − 1} and suppose aj = L. Then qj (x) + νj < t` + z, but since qj has sensitivity 1/n, we also have qj (x0 ) + νj < t` + (z + 1/n). Likewise, if aj = R, then qj (x) + νj > tu − z, so qj (x0 ) + νj > tu − z − 1/n ≥ t` + (z + 1/n) as long as z ≤ z∗ ≤ 12 (tu − t` ) − 1/n. (This ensures that M(x0 ) does not output L on the first branch of the “if” statement, and proceeds to output R.) 23 Since Az (x) ⊆ Az+1/n (x0 ), this proves that P [(∀i < k, Ai = ai )|µ = z] = P [(ν1 , . . . , νk−1 ) ∈ Az (x)]   ≤ P (ν1 , . . . , νk−1 ) ∈ Az+1/n (x0 ) h i = P (∀i < k, A0i = ai )|µ = z + 1/n . Given Claim 5.12, all that is needed to prove (4) and, thereby, prove Lemma 5.9 is to bound the second factor in (5) — that is, we must only show that h i h i P qk (x) + νk ∈ [t̂` , t̂u ]|µ = z ∧ (∀j < k, Aj = aj ) ≤ eε/2 P qk (x0 ) + νk ∈ [t̂` , t̂u ]|µ = z + 1/n ∧ (∀j < k, A0j = aj ) . (6) Let ∆ = (qk (x0 ) − qk (x)) ∈ [−1/n, 1/n]. Then h i P qk (x) + νk ∈ [t̂` , t̂u ]|µ = z ∧ (∀j < k, Aj = aj ) = P [t` + z ≤ qk (x) + νk ≤ tu − z]   = P t` + z + ∆ ≤ qk (x0 ) + νk ≤ tu − z + ∆   = P t` + (z + 1/n) + (∆ − 1/n) ≤ qk (x0 ) + νk ≤ tu − (z + 1/n) + (∆ + 1/n) h i = P qk (x0 ) + νk ∈ [t̂` + ∆ − 1/n, t̂u + ∆ + 1/n]|µ = z + 1/n h i ≤ eε/2 P qk (x0 ) + νk ∈ [t̂` , t̂u ]|µ = z + 1/n h i = eε/2 P qk (x0 ) + νk ∈ [t̂` , t̂u ]|µ = z + 1/n ∧ (∀j < k, A0j = aj ) where the last inequality follows from Claim 5.13 below (setting η = 2/n, λ = 6/εn, [a, b] = [t̂` , t̂u ], 6 and [a0 , b0 ] = [t̂` + ∆ − 1/n, t̂u + ∆ + 1/n]) and the fact that z ≤ z∗ = 12 (tu − t` ) − εn log(10/ε) − 1/n implies     12 10 1 b − a = t̂u − t̂` = tu − t` − 2µ ≥ log ≥ 2λ log εn ε 1 − e−ε/6 whenever 0 ≤ ε ≤ 1. Claim 5.13. Let ν ∼ Lap(λ) and let [a, b], [a0 , b0 ] ⊂ R be intervals satisfying [a, b] ⊂ [a0 , b0 ]. If η ≥ (b0 − a0 ) − (b − a), then   P ν ∈ [a0 , b0 ] ≤ eη/λ · P [ν ∈ [a, b]] . 1 − e−(b−a)/2λ Proof. Recall that the probability density function of the Laplace distribution is given by 1 −|x|/λ fλ (x) = 2λ e . There are four cases to consider: In the first case, a < b ≤ 0. In the second case, a < 0 < b with |a| ≤ |b|. In the third case, 0 ≤ a < b. Finally, in the fourth case, a < 0 < b with |a| ≥ |b|. Since the Laplace distribution is symmetric, it suffices to analyze the first two cases. 24 Case 1: Suppose a < b ≤ 0. Then   P ν ∈ [a0 , b0 ] ≤ P [ν ∈ [a, b]] + Z b+η b 1 x/λ e dx 2λ 1 = (e(b+η)/λ − ea/λ ) 2 ! 1 eη/λ − e(a−b)/λ = · · (eb/λ − ea/λ ) (a−b)/λ 2 1−e ! η/λ e − e−(b−a)/λ · P [ν ∈ [a, b]] . = 1 − e−(b−a)/λ Case 2: Suppose a < 0 < b and |a| ≤ |b|. Note that this implies b ≥ (b − a)/2. Then   1 a/λ P ν ∈ [a0 , b0 ] ≤ P [ν ∈ [a, b]] + η · e 2λ   a/λ   η e  ≤ P [ν ∈ [a, b]] 1 +  2λ P [ν ∈ [0, b]]  η = P [ν ∈ [a, b]] 1 − e−b/λ + λ ea/λ 1 − e−b/λ 1 + η/λ ≤ P [ν ∈ [a, b]] 1 − e−b/λ eη/λ . ≤ P [ν ∈ [a, b]] 1 − e−(b−a)/2λ Proof of Lemma 5.10. We claim that it suffices to show that with probability at least 1 − β we have ∀1 ≤ j ≤ k |νj | + |µ| ≤ α. To see this, suppose |νj | + |µ| ≤ α for every j. Then, if aj = L, we have cj = qj (x) + νj < t̂` = t` + µ, whence qj (x) < t` + |µ| + |νj | ≤ t` + α. Similarly, if aj = R, then cj = qj (x) + νj > t̂u = tu − µ, whence qj (x) > tu − (|µ| + |νj |) ≥ tu − α. Finally, if aj = >, then cj = qj (x) + νj ∈ [t̂` , t̂u ] = [t` + µ, tu − µ], whence t` − α ≤ qj (x) ≤ tu + α. We now show that indeed |νj | + |µ| ≤ α for every j with high probability. By tail bounds for the Laplace distribution,     h i εαn εαn P [|µ| > α/4] = exp − and P |νj | > 3α/4 = exp − 8 8 25 for all j. By a union bound,   h i εαn ≤ β, P |µ| > α/4 ∨ ∃j ∈ [k] |νj | > 3α/4 ≤ (k + 1) · exp − 8 as required. 5.3 The Online Interior Point Problem Our algorithm extends a result of [BNSV15] showing how to reduce the problem of privately releasing thresholds to the much simpler interior point problem. By analogy, our algorithm for answering adaptively-chosen thresholds relies on solving multiple instances of an online variant of the interior point problem in parallel. In this section, we present the OIP problem and give an (ε, δ)-differentially private solution that can handle k adaptively-chosen queries with sample complexity O(log k). Our OIP algorithm is a direct application of the BetweenThresholds algorithm from Section 5.2. Definition 5.14 (Online Interior Point Problem). An algorithm M solves the Online Interior Point (OIP) Problem for k queries with confidence β if, when given as input any private dataset x ∈ [0, 1]n and any adaptively-chosen sequence of real numbers y1 , · · · , yk ∈ [0, 1], with probability at least 1 − β it produces a sequence of answers a1 , · · · , ak ∈ {L, R} such that ∀j ∈ {1, 2, · · · , k} yj < min xi =⇒ aj = L, i∈[n] yj ≥ max xi =⇒ aj = R . i∈[n] (If mini∈[n] xi ≤ yj < maxi∈[n] xi , then M may output either symbol L or R.) Input: Dataset x ∈ [0, 1]n . Initialize a BetweenThresholds instance (Figure 7) B on dataset x with thresholds t` = 13 , tu = 23 . For j = 1, 2, · · · , k: Receive query yj ∈ [0, 1]. If B already halted on some query qy ∗ , output L if yj < y ∗ and output R if yj ≥ y ∗ . Otherwise, give B the query cyj ∈ Thresh[0,1] . If B returns >, output R. Otherwise, output the answer produced by B. Figure 8: Online Interior Point Algorithm Proposition 5.15. The algorithm in Figure 8 is (ε, δ)-differentially private and solves the OIP Problem with confidence β as long as n≥ 36 (log(k + 1) + log(1/β) + log(10/ε) + log(1/δ) + 1) . ε Proof. Privacy follows immediately from Lemma 5.9, since Algorithm 8 is obtained by postprocessing Algorithm 7, run using thresholds with a gap of size 1/3. To argue utility, let α = 1/3 so that n≥ 8 (log(k + 1) + log(1/β)). εα By Lemma 5.10, with probability at least 1 − β, the following events occur: 26 • If the BetweenThresholds instance B halts when it is queried on cy ∗ , then mini∈[n] xi ≤ y ∗ < maxi∈[n] xi . • If B has not yet halted and yj < mini∈[n] xi , its answer to cyj is L. • If B has not yet halted and yj ≥ maxi∈[n] xi , its answer to cyj is R. Thus, if B has not yet halted, the answers provided are accurate answers for the OIP Problem. On the other hand, when B halts, it has successfully identified an “interior point” of the dataset x, i.e. a y ∗ such that mini∈[n] xi ≤ y ∗ < maxi∈[n] xi . Thus, for any subsequent query y, we have that y < min xi =⇒ y < y ∗ , i∈[n] so Algorithm 8 correctly outputs L. Similarly, y ≥ max xi =⇒ y ≥ y ∗ , i∈[n] so Algorithm 8 correctly outputs R on such a query. 5.4 Releasing Adaptive Thresholds with Approximate Differential Privacy We are now ready to state our reduction from releasing thresholds to solving the OIP Problem. Theorem 5.16. If there exists an (ε, δ)-differentially private algorithm solving the OIP problem for k queries with confidence αβ/8 and sample complexity n0 , then there is a (4ε, (1 + eε )δ)-differentially private algorithm for releasing k threshold queries with (α, β)-accuracy and sample complexity ) ( 0 6n 24 log2.5 (4/α) · log(2/β) , . n = max α αε Combining this reduction with our algorithm for the OIP Problem (Proposition 5.15) yields: Corollary 5.17. There is an (ε, δ)-differentially private algorithm for releasing k adaptively-chosen threshold queries with (α, β)-accuracy for ! log k + log2.5 (1/α) + log(1/βεδ) n=O . αε Proof of Theorem 5.16. Our algorithm and its analysis follow the reduction of Bun et al. [BNSV15] for reducing the (offline) query release problem for thresholds to the offline interior point problem. Let T be an (ε, δ)-differentially private algorithm solving the OIP Problem with confidence αβ/8 and sample complexity n0 . Without loss of generality, we may assume that T is differentially private in “add-or-remove-an-item sense”—i.e. if x ∈ [0, 1]∗ and x0 differs from x up to the addition or removal of a row, then h for every adversary i A and h set S of outcomes of i the interaction ε P Adaptive → (x0 ) ∈ S + δ. Moreover, between A and T , we have P AdaptiveA → (x) ∈ S ≤ e A←T ←T T provides accurate answers to the OIP Problem with probability at least 1 − αβ/8 whenever its input is of size at least n0 . To force an algorithm T to have these properties, we may pad any dataset of size less than n0 with an arbitrary fixed element. On the other hand, we may subsample the first n0 elements from any dataset with more than this many elements. 27 Input: Dataset x ∈ [0, 1]n . Parameter: α ∈ (0, 1). Let (x(1) , . . . , x(M) ) ←R Partition(x1 , . . . , xn , α). Initialize an instance of the OIP algorithm T (m) on each chunk x(m) ∈ [0, 1]∗ , for m ∈ [M]. For each j = 1, · · · , k: Receive query cyj ∈ Thresh[0,1] . (1) (M) Give query yj ∈ [0, 1] to every OIP instance T (m) , receiving answers aj , · · · , aj   (m) 1 · m ∈ [M] : aj = R . Return aj = M ∈ {L, R}. Figure 9: AdaptiveThresholdsT Input: Dataset x ∈ [0, 1]n . Parameter: α ∈ (0, 1). Output: (Random) partition (x(1) , . . . , x(M) ) ∈ ([0, 1]∗ )M of x, where 2/α ≤ M < 4/α. Let M = 2dlog2 (2/α)e . Sort x in nondecreasing order x1 ≤ x2 ≤ · · · ≤ xn . For each 0 ≤ ` ≤ log2 M and s ∈ {0, 1}` , sample νs ∼ Lap((log2 M)/ε) independently. P For each 1 ≤ m ≤ M − 1, let ηm = s∈P (m) νs , where P (m) is the set of all prefixes of the binary representation j kof m. j k n Let t0 = 1, t1 = M + η1 , · · · , tm = m·n M + ηm , · · · , tM = n + 1. Let x(m) = (xtm−1 , . . . , xtm −1 ) for all m ∈ [M]. Figure 10: Partition Consider the algorithm AdaptiveThresholdsT in Figures 9 and 10. The proof of Theorem 5.16 relies on the following two claims about the Partition subroutine, both of which are implicit in the work of Bun et al. [BNSV15, Appendix C] and are based on ideas of Dwork et al. [DNPR10]. Claim 5.18 shows that for neighboring databases x ∼ x0 , the behaviors of the Partition subroutine on x and x0 are “similar” the following sense: for any fixed partition of x, one is roughly as likely (over the randomness of the partition algorithm) to obtain a partition of x0 that differs on at most two chunks, where the different chunks themselves differ only up to the addition or removal of a single item. This will allow us to show that running M parallel copies of the OIP algorithm on the chunks remains roughly (ε, δ)-differentially private. Claim 5.19 shows that, with high probability, each chunk is simultaneously large enough for the corresponding OIP algorithm to succeed, but also small enough so that treating all of the elements in a chunk as if they were the same element still permits us to get α-accurate answers to arbitrary threshold queries. Claim 5.18. Fix neighboring datasets x, x0 ∈ [0, 1]n . Then there exists a (measurable) bijection ϕ : R2M → R2M with the following properties: 1. Let z ∈ R2M be any noise vector. Let x(1) , . . . , x(M) denote the partition of x obtained with random noise set to ν = z. Similarly, let x0(1) , . . . , x0(M) denote the partition of x0 obtained under noise 28 ν = ϕ(z). Then there exist indices i1 , i2 such that: 1) For i ∈ {i1 , i2 }, the chunks x(i) and x0(i) differ up to the addition or removal of at most one item and 2) For every index i < {i1 , i2 }, we have x(i) = x0(i) . 2. For every noise vector z ∈ R2M , we have P [ν = ϕ(z)] ≤ e2ε P [ν = z]. Claim 5.19. With probability at least 1 − β/2, we have that |tm − m · n/M| ≤ αn/24 for all m ∈ [M]. Privacy of Algorithm 9. We first show how to use Claim 5.18 to show that Algorithm 9 is differentially private. Fix an adversary A, and let B = AdaptiveA → simulate the ← AdaptiveThresholdsT interaction between A and Algorithm 9. Let S be a subset of the range of B. Then, by Property (1) of Claim 5.18 and group privacy, we have that for any z ∈ R2M :   P [B(x) ∈ S|ν = z] ≤ e2ε P B(x0 ) ∈ S|ν = ϕ(z) + (1 + eε )δ. By Property (2) of Claim 5.18, we also have Pr[ν = z] ≤ e2ε Pr[ν = ϕ(z)] for every z ∈ R2M . Therefore, Z P [B(x) ∈ S] = P [B(x) ∈ S|ν = z] · P [ν = z] dz 2M R Z    2ε  0 ε ≤ e P B(x ) ∈ S|ν = ϕ(z) + (1 + e )δ · P [ν = z] dz R2M Z   ε ≤ (1 + e )δ + e2ε P B(x0 ) ∈ S|ν = ϕ(z) · e2ε P [ν = ϕ(z)] dz ε R2M 4ε   ≤ (1 + e )δ + e P B(x0 ) ∈ S . Hence, B is (e4ε , (1 + eε )δ)-differentially private, as claimed. Accuracy of Algorithm 9. We now show how to use Claim 5.19 to show that Algorithm 9 produces (α, β)-accurate answers. By a union bound, the following three events occur with probability at least 1 − β: 1. For all m ∈ [M], m M − tnm ≤ α6 . 2. Every chunk x(m) has size |x(m) | = tm − tm−1 ∈ [αn/6, 2αn/3]. 3. Every instance of T succeeds. Now we need to show that if these three events occur, we can produce α-accurate answers to every threshold query cy1 , . . . , cyk . Write the sorted input database as x1 ≤ x2 ≤ · · · ≤ xn . We consider two cases for the j th query: As our first case, suppose xn ≤ yj . Then for every chunk (m) x(m) , we have max{x(m) } ≤ yj . Then the success condition of T (m) guarantees that aj = R. Thus, the answer aj = 1 is (exactly) accurate for the query cj . As our second case, let i be the smallest index for which xi > yj , and suppose the item xi is in some chunk x(mi ) . Note that this means that the true answer to the query cyj is (i − 1)/n and 29 that tmi −1 ≤ i ≤ tmi − 1. Then again, for every m < mi we have max{x(m) } ≤ yj , so every such T (m) (m) instance yields aj aj = = R. Thus,   1 m − 1 tmi α α (i − 1) (m) · m ∈ [M] : aj = R ≥ i ≥ − − ≥ − α, M M n 6 2 n since M ≥ 2/α. On the other hand, for every m > mi , we have min{x(m) } > yj , so every such T (m) instance (m) instead yields aj = L. aj ≤ mi tmi α tmi −1 + 2αn/3 α i 2α α i − 1 ≤ + ≤ + ≤ + + ≤ + α, M n 6 n 6 n 3 6 n since n ≥ 6/α. Acknowledgements We thank Salil Vadhan for many helpful discussions. References [BLR13] Avrim Blum, Katrina Ligett, and Aaron Roth. A learning theory approach to noninteractive database privacy. J. ACM, 60(2):12, 2013. [BNS13] Amos Beimel, Kobbi Nissim, and Uri Stemmer. Private learning and sanitization: Pure vs. approximate differential privacy. In Approximation, Randomization, and Combinatorial Optimization. Algorithms and Techniques - 16th International Workshop, APPROX 2013, and 17th International Workshop, RANDOM 2013, Berkeley, CA, USA, August 21-23, 2013. Proceedings, pages 363–378, 2013. [BNS+ 16] Raef Bassily, Kobbi Nissim, Adam D. Smith, Thomas Steinke, Uri Stemmer, and Jonathan Ullman. Algorithmic stability for adaptive data analysis. In Proceedings of the Forty-Eighth Annual ACM on Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, 2016. [BNSV15] Mark Bun, Kobbi Nissim, Uri Stemmer, and Salil P. Vadhan. Differentially private release and learning of threshold functions. In IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, Berkeley, CA, USA, 17-20 October, 2015, pages 634–649, 2015. [BS98] Dan Boneh and James Shaw. Collusion-secure fingerprinting for digital data. IEEE Trans. Information Theory, 44(5):1897–1905, 1998. [BUV14] Mark Bun, Jonathan Ullman, and Salil P. Vadhan. Fingerprinting codes and the price of approximate differential privacy. In Symposium on Theory of Computing, STOC 2014, New York, NY, USA, May 31 - June 03, 2014, pages 1–10, 2014. 30 [CSS11] T.-H. Hubert Chan, Elaine Shi, and Dawn Song. Private and continual release of statistics. ACM Trans. Inf. Syst. Secur., 14(3):26, 2011. [DFH+ 15] Cynthia Dwork, Vitaly Feldman, Moritz Hardt, Toniann Pitassi, Omer Reingold, and Aaron Leon Roth. Preserving statistical validity in adaptive data analysis. In Proceedings of the Forty-Seventh Annual ACM on Symposium on Theory of Computing, STOC 2015, Portland, OR, USA, June 14-17, 2015, pages 117–126, 2015. [DL09] Cynthia Dwork and Jing Lei. Differential privacy and robust statistics. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009, pages 371–380, 2009. [DMNS06] Cynthia Dwork, Frank McSherry, Kobbi Nissim, and Adam Smith. Calibrating noise to sensitivity in private data analysis. In Theory of Cryptography, Third Theory of Cryptography Conference, TCC 2006, New York, NY, USA, March 4-7, 2006, Proceedings, pages 265–284, 2006. [DN03] Irit Dinur and Kobbi Nissim. Revealing information while preserving privacy. In Proceedings of the Twenty-Second ACM SIGACT-SIGMOD-SIGART Symposium on Principles of Database Systems, June 9-12, 2003, San Diego, CA, USA, pages 202–210, 2003. [DNPR10] Cynthia Dwork, Moni Naor, Toniann Pitassi, and Guy N. Rothblum. Differential privacy under continual observation. In Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, Cambridge, Massachusetts, USA, 5-8 June 2010, pages 715–724, 2010. [DNR+ 09] Cynthia Dwork, Moni Naor, Omer Reingold, Guy N. Rothblum, and Salil P. Vadhan. On the complexity of differentially private data release: efficient algorithms and hardness results. In Proceedings of the 41st Annual ACM Symposium on Theory of Computing, STOC 2009, Bethesda, MD, USA, May 31 - June 2, 2009, pages 381–390, 2009. [DNRR15] Cynthia Dwork, Moni Naor, Omer Reingold, and Guy N. Rothblum. Pure differential privacy for rectangle queries via private partitions. In Advances in Cryptology ASIACRYPT 2015 - 21st International Conference on the Theory and Application of Cryptology and Information Security, Auckland, New Zealand, November 29 - December 3, 2015, Proceedings, Part II, pages 735–751, 2015. [DR14] Cynthia Dwork and Aaron Roth. The algorithmic foundations of differential privacy. Found. Trends Theor. Comput. Sci., 9(3–4):211–407, August 2014. [DRV10] Cynthia Dwork, Guy N. Rothblum, and Salil P. Vadhan. Boosting and differential privacy. In IEEE Symposium on Foundations of Computer Science (FOCS ’10), pages 51–60. IEEE, 23–26 October 2010. [DSS+ 15] Cynthia Dwork, Adam D. Smith, Thomas Steinke, Jonathan Ullman, and Salil P. Vadhan. Robust traceability from trace amounts. In IEEE 56th Annual Symposium on Foundations of Computer Science, FOCS 2015, Berkeley, CA, USA, 17-20 October, 2015, pages 650–669, 2015. 31 [DY08] Cynthia Dwork and Sergey Yekhanin. New efficient attacks on statistical disclosure control mechanisms. In Advances in Cryptology - CRYPTO 2008, 28th Annual International Cryptology Conference, Santa Barbara, CA, USA, August 17-21, 2008. Proceedings, pages 469–480, 2008. [HR10] Moritz Hardt and Guy N. Rothblum. A multiplicative weights mechanism for privacy-preserving data analysis. In 51th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2010, October 23-26, 2010, Las Vegas, Nevada, USA, pages 61–70, 2010. [HT10] Moritz Hardt and Kunal Talwar. On the geometry of differential privacy. In Proceedings of the 42nd ACM Symposium on Theory of Computing, STOC 2010, Cambridge, Massachusetts, USA, 5-8 June 2010, pages 705–714, 2010. [HU14] Moritz Hardt and Jonathan Ullman. Preventing false discovery in interactive data analysis is hard. In 55th IEEE Annual Symposium on Foundations of Computer Science, FOCS 2014, Philadelphia, PA, USA, October 18-21, 2014, pages 454–463, 2014. [RR10] Aaron Roth and Tim Roughgarden. Interactive privacy via the median mechanism. In STOC, pages 765–774. ACM, June 5–8 2010. [SU15a] Thomas Steinke and Jonathan Ullman. Between pure and approximate differential privacy. CoRR, abs/1501.06095, 2015. [SU15b] Thomas Steinke and Jonathan Ullman. Interactive fingerprinting codes and the hardness of preventing false discovery. In Proceedings of The 28th Conference on Learning Theory, COLT 2015, Paris, France, July 3-6, 2015, pages 1588–1628, 2015. [Tar08] Gábor Tardos. Optimal probabilistic fingerprint codes. J. ACM, 55(2), 2008. [Ull13] Jonathan Ullman. Answering n2+o(1) counting queries with differential privacy is hard. In Symposium on Theory of Computing Conference, STOC’13, Palo Alto, CA, USA, June 1-4, 2013, pages 361–370, 2013. [War65] Stanley L. Warner. Randomized response: A survey technique for eliminating evasive answer bias. Journal of the American Statistical Association, 60(309):63–69, 1965. A The Fingerprinting Lemma In this section we prove the fingerprinting lemma (Lemma 3.6). The proof is broken into several lemmata. Lemma A.1. Let f : {±1}n → R. Define g : [±1] → R by g(p) = Then E [f (x)] . x1···n ∼p   X     E f (x) · (xi − p) = g 0 (p) · (1 − p2 ).  x1···n ∼p  i∈[n] 32 A rescaling of this lemma appears in [SU15b]. The following proof is taken from [DSS+ 15]. Proof. We begin by establishing several identities. Since x2 = 1 for x ∈ {±1}, we have the identity d 1 + xp x 1 + xp x − p = = dp 2 2 2 1 − p2 for all x ∈ {±1} and p ∈ (−1, 1). By the product rule, we have ! d Y 1 + xi p X d 1 + xi p Y 1 + xk p X xi − p Y 1 + xk p = = dp 2 dp 2 2 2 1 − p2 i∈[n] i∈[n] k∈[n]\{i} i∈[n] k∈[n] for all x ∈ {±1}n and p ∈ (−1, 1). 1+xp Sampling x ∼ p samples each x ∈ {±1} with probability 2 . Thus sampling x1···n ∼ p, Q 1+x p samples each x ∈ {±1}n with probability i∈[n] 2 i . Now we can write X Y 1+x p i g(p) = E [f (x)] = f (x) . x1···n ∼p 2 n x∈{±1} i∈[n] Using the above identities gives g 0 (p) = X x∈{±1}n f (x) d Y 1 + xi p dp 2 i∈[n] X x −p Y 1+x p i k = f (x) 2 2 1−p x∈{±1}n i∈[n] k∈[n]   X x − p     i = E f (x)  x1···n ∼p  1 − p2  X i∈[n] Lemma A.2. Let g : [±1] → R be a polynomial. Then h i E g 0 (p) · (1 − p2 ) = 2 E [g(p) · p] . p∈[±1] p∈[±1] 33 Proof. Let u(p) = 1 − p2 . By integration by parts and the fundamental theorem of calculus, h i 1Z 1 g 0 (p)(1 − p2 )dp E g 0 (p) · (1 − p2 ) = 2 −1 p∈[±1] Z 1 1 0 g (p)u(p)dp = 2 −1 ! Z 1 1 d = g(p)u(p) − g(p)u 0 (p)dp 2 −1 dp Z 1 1 1 g(p)(−2p)dp = (g(1)u(1) − g(−1)u(−1)) − 2 2 −1 Z1 =0 + g(p)pdp −1 =2 E [g(p) · p] . p∈[±1] Proposition A.3. Let f : {±1}n → R. Then   X   1   (xi − p) + (f (x) − x)2  ≥ . E f (x) ·  3 p∈[±1],x1···n ∼p  i∈[n] Proof. Define g : [±1] → R by g(p) = E [f (x)] . x1···n ∼p By Lemmas A.1 and A.2,   X   h i   (xi − p) = E g 0 (p)(1 − p2 ) = E [2g(p)p] . E f (x) ·  p∈[±1] p∈[±1] p∈[±1],x1···n ∼p  i∈[n] Moreover, by Jensen’s inequality,  !2  h i   2 E (f (x) − x) ≥ E  E [f (x) − x]  p∈[±1],x1···n ∼p p∈[±1] x1···n ∼p h i = E (g(p) − p)2 p∈[±1] h i = E g(p)2 − 2g(p)p + p2 p∈[±1] h i = E g(p)2 − p∈[±1]   X  1    E (xi − p) + . f (x) ·   3 p∈[±1],x1···n ∼p i∈[n] Rearranging yields the result:   X   h i 1 1   E (xi − p) + (f (x) − x)2  ≥ E g(p)2 + ≥ . f (x) ·  p∈[±1] 3 3 p∈[±1],x1···n ∼p  i∈[n] 34 We also have an alternative version of Proposition A.3: Proposition A.4. Let f : {±1}n → R. Then   X   1   2 E (xi − p) + (f (x) − p)  ≥ . f (x) ·   3 p∈[±1],x1···n ∼p i∈[n] Proof. Define g : [±1] → R by g(p) = E [f (x)] . x1···n ∼p By Lemmas A.1 and A.2,   X   h i   E (xi − p) = E g 0 (p)(1 − p2 ) = E [2g(p)p] . f (x) ·  p∈[±1] p∈[±1],x1···n ∼p  p∈[±1] i∈[n] Moreover, E p∈[±1],x1···n ∼p h i (f (x) − p)2 = h i 1 f (x)2 − 2g(p)p + p2 ≥ 0 − E [2g(p)p] + . 3 p∈[±1],x1···n ∼p p∈[±1] E The result follows by combining the above equality and inequality. Finally we restate and prove Lemma 3.6 Lemma A.5 (Fingerprinting Lemma). Let f : {±1}n → [±1]. Then   X   1   (xi − p) + 2 |f (x) − x| ≥ . E f (x) ·   3 p∈[±1],x1···n ∼p i∈[n] Proof. Since |f (x) − x| ≤ 2, we have |f (x) − x|2 ≤ 2 |f (x) − x|. The result thus follows from Proposition A.3. 35
8cs.DS
Frameworks for Designing In-place Graph Algorithms Sankardeep Chakraborty1 , Anish Mukherjee2 , Venkatesh Raman3 , Srinivasa Rao Satti4 arXiv:1711.09859v1 [cs.DS] 27 Nov 2017 1 3 National Institute of Informatics, Tokyo, Japan, [email protected] 2 Chennai Mathematical Institute, Chennai, India, [email protected] The Institute of Mathematical Sciences, HBNI, Chennai, India, [email protected] 4 Seoul National University, Seoul, South Korea, [email protected] Read-only memory (ROM) model is a classical model of computation to study time-space tradeoffs of algorithms. One of the classical results on the ROM model is that any sorting algorithm that uses O(s) words of extra space requires Ω(n2 /s) comparisons for lg n ≤ s ≤ n/ lg n1 and the bound has also been recently matched by an algorithm. However, if we relax the model (from ROM), we do have sorting algorithms (say Heapsort) that can sort using O(n lg n) comparisons using O(lg n) bits of extra space, even keeping a permutation of the given input sequence at any point of time during the algorithm. We address similar questions for graph algorithms. We show that a simple natural relaxation of ROM model allows us to implement fundamental graph search methods like BFS and DFS more space efficiently than in ROM. By simply allowing elements in the adjacency list of a vertex to be permuted, we show that, on an undirected or directed connected graph G having n vertices and m edges, the vertices of G can be output in a DFS or BFS order using O(lg n) bits of extra space and O(n3 lg n) time. Thus we obtain similar bounds for reachability and shortest path distance (both for undirected and directed graphs). With a little more (but still polynomial) time, we can also output vertices in the lex-DFS order. As reachability in directed graphs (even in DAGs) and shortest path distance (even in undirected graphs) are NL-complete, and lex-DFS is P-complete, our results show that our model is more powerful than ROM if L 6= P. En route, we also introduce and develop algorithms for another relaxation of ROM where the adjacency lists of the vertices are circular lists and we can modify only the heads of the lists. Here we first show a linear time DFS implementation using n + O(lg n) bits of extra space. Improving the extra space further to only O(lg n) bits, we also obtain BFS and DFS albeit with a slightly slower running time. Some of these algorithms also translate to improved algorithms for DFS and its applications in ROM. Both the models we propose maintain the graph structure throughout the algorithm, only the order of vertices in the adjacency list changes. In sharp contrast, for BFS and DFS, to the best of our knowledge, there are no algorithms in ROM that use even O(n1− ) bits of extra space; in fact, implementing DFS using cn bits for c < 1 has been mentioned as an open problem. Furthermore, DFS (BFS) algorithms using n + o(n) (o(n)) bits of extra use Reingold’s [JACM, 2008] or Barnes et al’s reachability algorithm [SICOMP, 1998] and hence have high runtime. Our results can be contrasted with the recent result of Buhrman et al. [STOC, 2014] which gives an algorithm for directed st-reachability on catalytic Turing machines using O(lg n) bits with catalytic space O(n2 lg n) and time O(n9 ). All our algorithms are simple but quite subtle, and we believe that these models are practical enough to spur interest for other graph problems in these models. 1 We use lg to denote logarithm to the base 2 1 Contents 1 Introduction 1.1 Previous work in space efficient graph algorithms . . 1.2 In-place model for graph algorithms . . . . . . . . . 1.3 Definitions, computational complexity and notations 1.4 Our Results . . . . . . . . . . . . . . . . . . . . . . . 1.5 Techniques . . . . . . . . . . . . . . . . . . . . . . . 1.6 Consequences of our BFS and DFS results . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 3 5 5 7 8 9 2 DFS algorithms in the rotate model 2.1 Proof of Theorem 1(a) for undirected graphs 2.2 Proof of Theorem 1(a) for directed graphs . . 2.3 Proof of Theorem 1(b) for undirected graphs 2.4 Proof of Theorem 1(b) for directed graphs . . 2.5 Proof of Theorem 1(c) for undirected graphs 2.6 Proof of Theorem 1(c) for directed graphs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 10 10 11 11 12 12 13 . . . . . . . . . . . . . . . . . . . . . . . . 3 BFS algorithms in the rotate model 15 3.1 BFS using n + O(lg n) bits–Proof of Theorem 2(a) . . . . . . . . . . . . . . . . . . . 15 3.2 BFS using O(lg n) bits–Proof of Theorem 2(b) . . . . . . . . . . . . . . . . . . . . . 16 4 Simulation of algorithms for rotate model in the implicit model 17 5 DFS algorithms in the implicit model—proof of Theorem 3 18 6 BFS algorithms in the implicit model—proof of Theorem 4 19 7 Minimum Spanning Tree 20 8 Consequences 8.1 Improved algorithm for DFS and applications in ROM 8.2 Space-efficient approximation algorithms using Baker’s 8.2.1 Baker’s Algorithm . . . . . . . . . . . . . . . . 8.3 Solving NP-hard problems in in-place models . . . . . 21 21 23 23 24 9 Concluding remarks . . . . . . approach . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 24 2 1 Introduction Motivated by the rapid growth of huge data set (“big data”), space efficient algorithms are becoming increasingly important than ever before. The proliferation of specialized handheld devices and embedded systems that have a limited supply of memory provide another motivation to consider space efficient algorithms. To design space-efficient algorithms in general, several models of computation have been proposed. Among them, the following two computational models have received considerable attention in the literature. • In the read-only memory (ROM) model, we assume that the input is given in a read-only memory. The output of an algorithm is written on to a separate write-only memory, and the output can not be read or modified again. In addition to the input and output media, a limited random access workspace is available. Early work on this model was on designing lower bounds [15, 17, 18], for designing algorithms for selection and sorting [27, 45, 52, 61, 62, 64] and problems in computational geometry [6, 9, 13, 26, 32]. Recently there has been interest on space-efficient graph algorithms [7, 11, 12, 23, 24, 44, 53, 54]. • In the in-place model, the input elements are given in an array, and the algorithm may use the input array as working space. Hence the algorithm may modify the array during its execution. After the execution, all the input elements should be present in the array (maybe in a permuted order) and the output maybe put in the same array or sent to an output stream. The amount of extra space usage during the entire execution of the algorithm is limited to O(lg n) bits. A prominent example of an in-place algorithm is the classic heap-sort. Other than in-place sorting [51], searching [49, 63] and selection [57] algorithms, many in-place algorithms have been designed in areas such as computational geometry [19] and stringology [50]. Apart from these models, researchers have also considered (semi)-streaming models [3, 47, 61] for designing space-efficient algorithms. Very recently the following two new models were introduced in the literature with the same objective. • Chan et al. [28] introduced the restore model which is a more relaxed version of read-only memory (and a restricted version of the in-place model), where the input is allowed to be modified, but at the end of the computation, the input has to be restored to its original form. They also gave space efficient algorithms for selection and sorting on integer arrays in this model. This has motivation, for example, in scenarios where the input (in its original form) is required by some other application. • Buhrman et al. [20, 21, 56] introduced and studied the catalytic-space model where a small amount (typically O(lg n) bits) of clean space is provided along with some large additional auxiliary space, with the condition that the additional space is initially in an arbitrary, possibly incompressible, state and must be returned to this state when the computation is finished. The input is assumed to be given in ROM. Thus this model can be thought of as having an auxiliary storage that needs to be ‘restored’ in contrast to the model by Chan et al. [28] where the input array has to be ‘restored’. They show various interesting complexity theoretic consequences in this model and designed significantly better (in terms of space) algorithms in comparison with the ROM model for a few combinatorial problems. 1.1 Previous work in space efficient graph algorithms Even though these models were introduced in the literature with the aim of designing and/or implementing various algorithms space efficiently, space efficient graph algorithms have been designed only in the (semi)-streaming and the ROM model. In the streaming and semi-streaming models, 3 researchers have studied several basic and fundamental algorthmic problems such as connectivity, minimum spanning tree, matching. See [59] for a comprehensive survey in this field. Research on these two models (i.e., streaming and semi-streaming) is relatively new and has been going on for last decade or so whereas the study in ROM could be traced back to almost 40 years. In fact there is already a rich history of designing space efficient algorithms in the read-only memory model. The complexity class L (also known as DLOGSPACE) is the class containing decision problems that can be solved by a deterministic Turing machine using only logarithmic amount of work space for computation. There are several important algorithmic results [35, 40, 41, 42] for this class, the most celebrated being Reingold’s method [67] for checking st-reachability in an undirected graph, i.e., to determine if there is a path between two given vertices s and t. NL is the non-deterministic analogue of L and it is known that the st-reachability problem for directed graphs is NL-complete (with respect to log space reductions). Using Savitch’s algorithm [5], this problem can be solved in nO(lg n) time using O(lg2 n) bits of extra space. Savitch’s algorithm is very space efficient but its running time is superpolynomial. Among the deterministic algorithms running in polynomial time for directed st-reachability, the most space efficient algorithm is due to Barnes et al. [14] who gave a slightly sublinear space (using √ n/2Θ( lg n) bits) algorithm for this problem running in polynomial time. We know of no better polynomial time algorithm for this problem with better space bound. Moreover, the space used by this algorithm matches a lower bound on space for solving directed st-reachability on a restricted model of computation called Node Naming Jumping Automata on Graphs (NNJAGs) [29, 39]. This model was introduced especially for the study of directed st-reachability and most of the known sublinear space algorithms for this problem can be implemented on it. Thus, to design any √ Θ( lg n) polynomial time ROM algorithm taking space less than n/2 bits requires radically new ideas. Recently there has been some improvement in the space bound for some special classes of graphs like planar and H-minor free graphs [8, 22]. A drawback for all these algorithms using small space i.e., sublinear number of bits, is that their running time is often some polynomial of high degree. This is not surprising as Tompa [70] showed that for directed st-reachability, if the number of bits available is o(n) then some natural algorithmic approaches to the problem require super-polynomial time. Motivated by these impossibility results from complexity theory and inspired by the practical applications of these fundamental graph algorithms, recently there has been a surge of interest in improving the space complexity of the fundamental graph algorithms without paying too much penalty in the running time i.e., reducing the working space of the classical graph algorithms to O(n) bits with little or no penalty in running time. Thus the goal is to design space-efficient yet reasonably time-efficient graph algorithms on the ROM model. Generally most of the classical linear time graph algorithms take O(n) words or equivalently O(n lg n) bits of space. Towards this recently Asano et al. [7] gave an O(m lg n) time algorithm using O(n) bits, and another implementation taking n + o(n) bits, using Reingold’s or Barnes et al’s reachability algorithm, and hence have high polynomial running time. Later, time bound was improved to O(m lg lg n) still using O(n) bits in [44]. For sparse graphs, the time bound is further improved in [11, 23] to optimal O(m) using still O(n) bits of space. Improving on the classical linear time implementation of BFS which uses O(n lg n) bits of space, recent space efficient algorithms [11, 44, 53] have resulted in a linear time algorithm using n lg 3 + o(n) bits. We know of no algorithm for BFS using n + o(n) bits and O(m lgc n) (or even O(mn)) √ time for some constant c in ROM. The only BFS algorithm taking sublinear space uses n/2Θ( lg n) bits [14] and has a high polynomial runtime. A few other space efficient algorithms for fundamental graph problems like checking strong connectivity [44], biconnectivity and performing st-numbering [23], recognizing chordal and outerplanar graphs [25, 54] were also designed very recently. 4 1.2 In-place model for graph algorithms In order to break these inherent space bound barriers and obtain reasonably time and space efficient graph algorithms, we want to relax the limitations of ROM. And the most natural and obvious candidate in this regard is the classical in-place model. Thus our main objective is to initiate a systematic study of efficient in-place (i.e., using O(lg n) bits of extra space) algorithms for graph problems. To the best of our knowledge, this has not been done in the literature before. Our first goal towards this is to properly define models for the in-place graph algorithms. As in the case of standard in-place model, we need to ensure that the graph (adjacency) structure remains intact throughout the algorithm. Let G = (V, E) be the input graph with n = |V |, m = |E|, and assume that the vertex set V of G is the set V = {1, 2, · · · , n}. To describe these models, we assume that the input graph representation consists of two parts: (i) an array V of length n, where V [i] stores a pointer to the adjacency list of vertex i, and (ii) a list of singly linked lists, where the i-th list consists of a singly linked list containing all the neighbors of vertex i with V [i] pointing to the head of the list. In the ROM model, we assume that both these components cannot be modified. In our relaxed models, we assume that one of these components can be modified in a limited way. This gives rise to two different model which we define next. Implicit model: The most natural analogue of in-place model allows any two elements in the adjacency list of a vertex to be swapped (in constant time assuming that we have access to the nodes storing those elements in the singly linked list). The adjacency “structure” of the representation does not change; only the values stored can be swapped. (One may restrict this further to allow only elements in adjacent nodes to be swapped. Most of our algorithms work with this restriction.) We call it the implicit model inspired by the notion of implicit data structures [63]. We introduce and develop algorithms for another relaxed model which we call the rotate model. Rotate model: In this model, we assume that only the pointers stored in the array V can be modified, that too in a limited way - to point to any node in the adjacency list, instead of always pointing to the first node. In space-efficient setting, since we do not have additional space to store a pointer to the beginning of the adjacency list explicitly, we assume that the second component of the graph representation consists of a list of circular linked lists (instead of singly linked lists) – i.e., the last node in the adjacency list of each vertex points to the first node (instead of storing a null pointer). See the Figure 1 to get a better visual description. We call the element pointed to by the pointer as the front of the list, and a unit cost rotate operation changes the element pointed to by the pointer to the next element in the list. Thus the rotate model corresponds to keeping the adjacency lists in read-only memory and allowing (limited) updates on the pointer array that points to these lists. And, the implicit model corresponds to the reverse case, where we keep the pointer array in read-only memory and allow swaps on the adjacency lists/arrays. A third alternative especially for the implicit model is to assume that the input graph is represented as an adjacency array, i.e., adjacency lists are stored as arrays instead of singly linked lists (see [23, 44, 54] for some results using this model); and we allow here that any two elements in the adjacency array can be swapped. In this model, some of our algorithms have improved performance in time. 1.3 Definitions, computational complexity and notations We study some basic and fundamental graph problems in these models. In what follows we provide the definitions and state the computational complexity of some these problems. For the DFS problem, there have been two versions studied in the literature. In the lexicographically smallest DFS or lex-DFS problem, when DFS looks for an unvisited vertex to visit in an adjacency list, it picks the “first” unvisited vertex where the “first” is with respect to the appearance order in 5 1 1 2 4 2 1 3 5 4 5 2 3 3 5 4 (a) 2 4 4 1 2 5 1 2 3 5 4 (b) Single Rotation 4 1 2 3 5 4 1 2 3 5 (c) Figure 1: (a) An undirected graph G with 5 vertices and 8 edges. (b) A circular list representation of G. To avoid cluttering the picture, we draw the vertices and the pointers to the next node separately as opposed to a single node having two different fields in the circular list. (c) An illustration of a single clockwise rotation in the circular list of vertex 4. the adjacency list. The resulting DFS tree will be unique. In contrast to lex-DFS, an algorithm that outputs some DFS numbering of a given graph, treats an adjacency list as a set, ignoring the order of appearance of vertices in it, and outputs a vertex ordering T such that there exists some adjacency ordering R such that T is the DFS numbering with respect to R. We say that such a DFS algorithm performs general-DFS. Reif [66] has shown that lex-DFS is P-complete (with respect to log-space reductions) implying that a logspace algorithm for lex-DFS results in the collapse of complexity classes P and L. Anderson et al. [4] have shown that even computing the leftmost root-to-leaf path of the lex-DFS tree is P-complete. For many years, these results seemed to imply that the general-DFS problem, that is, the computation of any DFS tree is also inherently sequential. However, Aggarwal et al. [1, 2] proved that the general-DFS problem can be solved much more efficiently, and it is in RNC. Whether the general-DFS problem is in NC is still open. As is standard in the design of space-efficient algorithms [11, 44], while working with directed graphs, we assume that the graphs are given as in/out (circular) adjacency lists i.e., for a vertex v, we have the (circular) lists of both in-neighbors and out-neighbors of v. We assume the word RAM model of computation where the machine consists of words of size w in Ω(lg n) bits and any logical, arithmetic and bitwise operation involving a constant number of words takes O(1) time. We count space in terms of number of extra bits used by the algorithm other than the input, and this quantity is referred as “extra space” and “space” interchangeably throughout the paper. By a path of length d, we mean a simple path on d edges. By deg(x) we mean the degree of the vertex x. In directed graphs, it should be clear from the context whether that denotes out-degree or in-degree. By a BFS/DFS traversal of the input graph G, as in [7, 11, 23, 44, 53], we refer to reporting the vertices of G in the BFS/DFS ordering, i.e., in the order in which the vertices are visited for the first time. 6 1.4 Our Results Rotate Model: For DFS, in the rotate model, we show the following in Sections 2.1, 2.3 and 2.5. Theorem 1. Let G be a directed or an undirected graph, and ` ≤ n be the maximum depth of the DFS tree starting at a source vertex s. Then in the rotate model, the vertices of G can be output in (a) the lex-DFS order in O(m + n) time using n lg 3 + O(lg2 n) bits, (b) a general-DFS order in O(m + n) time using n + O(lg n) bits, and (c) a general-DFS order in O(m2 /n + m`) time for an undirected graph and in O(m(n + `2 )) time for directed graphs using O(lg n) bits. For this algorithm, we assume that s can reach all other vertices. This is followed by the BFS algorithms where, in the rotate model, we show the following in Sections 3.1 and 3.2. Theorem 2. Let G be a directed or an undirected graph, and ` be the depth of the BFS tree starting at the source vertex s. Then in the rotate model, the vertices of G can be output in a BFS order in (a) O(m + n`2 ) time using n + O(lg n) bits, and (b) O(m` + n`2 ) time using O(lg n) bits. Here we assume that the source vertex s can reach all other vertices. Implicit Model: In the implicit model, we obtain polynomial time implementations for lex-DFS and general-DFS using O(lg n) bits. For lex-DFS, this is conjectured to be unlikely in ROM as the problem is P-complete [66]. In particular, we show the following in Section 5. Theorem 3. Let G be a directed or an undirected graph with a source vertex s and ` ≤ n be the maximum depth of the DFS tree starting at s that can reach all other vertices. Then in the implicit model, using O(lg n) bits the vertices of G can be output in (a) the lex-DFS order in O(m3 /n2 +`m2 /n) time if G is given in adjacency list and in O(m2 lg n/n) time if G is given in adjacency array for undirected graphs. For directed graphs our algorithm takes O(m2 (n + `2 )/n) time if G is given in adjacency list and O(m lg n(n + `2 )) time if G is given in adjacency array; (b) a general-DFS traversal order in O(m2 /n) time if the input graph G is given in an adjacency list and in O(m2 (lg n)/n + m` lg n)) time if it is given in an adjacency array. In the implicit model, we can match the runtime of BFS from rotate model, and do better in some special classes of graphs. In particular, we show the following in Section 6 . Theorem 4. Let G be a directed or an undirected graph with a source vertex that can reach all other vertices by a distance of at most `. Then in the implicit model, using O(lg n) bits the vertices of G can be output in a BFS order in (a) O(m + n`2 ) time; (b) the runtime can be improved to O(m + n`) time if there are no degree 2 vertices; (c) the runtime can be improved to O(m) if the degree of every vertex is at least 2 lg n + 3. 7 In sharp contrast, for space efficient algorithms for DFS in ROM, the landscape looks markedly different. To the best of our knowledge, there are no DFS algorithms in general graphs in ROM that use O(n1− ) bits. In fact, an implementation of DFS taking cn bits for c < 1 has been proposed as an open problem by Asano et al. [7]. Similar to DFS, to the best of our knowledge, there are no polynomial time BFS algorithms in ROM that use even O(n1− ) bits. On the other hand, we don’t hope to have a BFS algorithm (for both undirected and directed graphs) using O(lg n) bits in ROM as the problem is NL-complete [5]. Minimum Spanning Tree (MST). Moving on from DFS and BFS, we also study the problem of reporting a minimum spanning tree (MST) of a given undirected connected graph G. We show the following result in Section 7. Theorem 5. A minimum spanning forest of a given undirected weighted graph G can be found using O(lg n) bits and in (a) O(mn) time in the rotate model, (b) O(mn2 ) time in the implicit model if G is given in an adjacency list, and (b) O(mn lg n) time in the implicit model when G is represented in an adjacency array. Note that by the results of [65, 67], we already know logspace algorithms for MST in ROM but again the drawback of those algorithms is their large time complexity. On the other hand, our algorithms have relatively small polynomial running time, simplicity, making it an appealing choice in applications with strict space constraints. 1.5 Techniques Our implementations follow (variations of) the classical algorithms for BFS and DFS that use three colors (white, gray and black), but avoid the use of stack (for DFS) and queue (for BFS). In the rotate model, we first observe that in the usual search algorithms one can dispense with the extra data structure space of pointers maintaining the search tree (while retaining the linear number of bits and a single bit per vertex in place of the full unvisited/visited/explored array) simply by rotating each circular adjacency lists to move the parent or a (typically the currently explored) child to the beginning of the list to help navigate through the tree during the forward or the backtracking step, i.e. by changing the pointer from the vertex to the list of its adjacencies by one node at a time. This retains the basic efficiency of the search strategies. The nice part of this strategy is that the total number of rotations also can be bounded. To reduce the extra space from linear to logarithmic, it is noted that one can follow the vertices based on the current rotations at each vertex to determine the visited status of a vertex, i.e. these algorithms use the rotate operation in a non-trivial way to move elements within the lists to determine the color of the vertices as well. However, the drawback is that to do so could require moving up (or down) the full height of the implicit search tree. This yields super-linear rather than (near-) linear time algorithms. In the implicit model, we use the classical bit encoding trick used in the development of the implicit data structures [63]. We encode one (or two) bit(s) using a sequence of two (or three respectively) distinct numbers. To encode a single bit b using two distinct values x and y with x < y, we store the sequence x, y if b = 0, and y, x otherwise. Similarly, permuting three distinct values x, y, z with x < y < z, we can represent six combinations. We can choose any of the four combinations to represent up to 4 colors (i.e. two bits). Generalizing this further, we can encode a pointer taking lg n bits using 2 lg n distinct elements where reading or updating a bit takes constant time, and reading or updating a pointer takes O(lg n) time. This also is the reason for the 8 requirement of vertices with (high) degree at least 3 or 2 lg n + 3 for faster algorithms, which will become clear in the description of the algorithms. 1.6 Consequences of our BFS and DFS results There are many interesting and surprising consequences of our results for BFS and DFS in both the rotate and implicit model. In what follows, we mention a few of them. • For directed st-reachability, √ as mentioned previously, the most space efficient polynomial time algorithm [14] uses n/2Θ( lg n) bits. In sharp contrast, we obtain efficient (timewise) log-space algorithms for this problem in both the rotate and implicit models (as a corollary of our directed graph DFS/BFS results). In terms of workspace this is exponentially better than the best known polynomial time algorithm [14] for this problem in ROM. For us, this provides one of the main motivations to study this model. A somewhat incomparable result obtained recently by Buhrman et al. [20, 56] where they designed an algorithm for directed st-reachability on catalytic Turing machines in space O(lg n) with catalytic space O(n2 lg n) and time O(n9 ). • Problems like directed st-reachability [5], distance [68] which asks whether a given G (directed, undirected or even directed acyclic) contains a path of length at most k from s to t, are NL-complete i.e., no deterministic log-space algorithm is known for these problems. But in our (both the rotate and implicit) models, we design log-space algorithms for them. Assuming L 6= NL, these results show that probably both our models with log-space are stronger than NL. • The lex-DFS problem (both in undirected and directed graphs) is P-complete [66], and thus polylogarithmic space algorithms are unlikely to exist in the ROM model. But we show an O(lg n) space algorithm in the implicit model for lex-DFS. This implies that, probably the implicit model is even more powerful than the rotate model. It could even be possible that every problem in P can be computed using log-space in the implicit model. A result of somewhat similar flavor is obtained recently Buhrman et al. [20, 56] where they showed that any function in TC1 can be computed using catalytic log-space, i.e., TC1 ⊆ CSPACE(lg n). Note that TC1 contains L, NL and even other classes that are conjectured to be different from L. • Our bounds for BFS and DFS in the rotate and implicit models immediately imply (with some care) similar bounds, that are improvement over the best space bounds known so far in ROM, for many applications of DFS/BFS. Moreover, as described before, any algorithm in the rotate model can be implemented in ROM using extra O(n lg(m/n)) bits. Thus, our linear time DFS algorithm in the rotate model can be implemented in ROM using O(n lg(m/n)) bits, matching the bound of [23] for DFS. Using this DFS implementation, we can obtain improved space efficient algorithms for various applications of DFS in ROM. This is discussed in Section 8.1. • In Section 8.2 we present Logspace Approximation Scheme or LSAS ((1 ± ) approximation algorithm running in logspace for every  > 0) for a class of MSO-definable optimization problems which are amenable to the Baker’s method [10] in locally bounded treewidth graphs in both of our rotate and implicit models. No such algorithms are known in ROM as Baker’s method requires to compute distance which is NL-complete. As BFS admits logspace algorithms in our models, we can design such LSAS for these problems here. • For a large number of NP-hard graph problems, the best algorithms in ROM run in exponential time and polynomial space. We show that using just logarithmic amount of space, albeit using exponential time, we can design algorithms for those NP-hard problems in both of our models under some restrictions. This gives an exponential improvement over the ROM space bounds 9 for these problems. This is described in Section 8.3. In constrast, note that, no NP-hard problem can be solved in the ROM model using O(lg n) bits unless P=NP. 2 DFS algorithms in the rotate model In this section, we describe our space-efficient algorithms for DFS in the rotate model proving Theorem 1. 2.1 Proof of Theorem 1(a) for undirected graphs We begin by describing our algorithm for undirected graphs, and later mention the changes required for directed graphs. In the normal exploration of DFS (see for example, Cormen et al. [30]) we use three colors. Every vertex v is white initially while it has not been discovered yet, becomes gray when DFS discovers v for the first time, and is colored black when it is finished i.e., all its neighbors have been explored completely. We maintain a color array C of length n that stores the color of each vertex at any point in the algorithm. In the rest of the paper, when we say we scan the adjacency list of some vertex v, what we mean is, we create a temporary pointer pointing to the current first element of the list and move this temporary pointer untill we find the desired element. Once we get that element we actually rotate the list so that the desired element now is at the front of the list. We start DFS at the starting vertex, say s, changing its color from white to gray in the color array C. Then we scan the adjacency list of s to find the first white neighbor, say w. We keep rotating the list to bring w to the front of s’s adjacency list (as the one pointed to by the head V [s]), color w gray in the color array C and proceed to the next step (i.e. to explore w’s adjacency list). This is the first forward step of the algorithm. In general, at any step during the execution of the algorithm, whenever we arrive at a gray vertex u (including the case when u’s color is changed from white to gray in the current step), we scan u’s adjacency list to find the first white vertex. (i) If we find such a vertex, say v, then we rotate u’s list to make v as the first element, and change the color of v to gray. (ii) If we do not find any white vertex, then we change the color of u to black, and backtrack to its parent. To identify u’s parent, we use the following lemma. Lemma 1. Suppose w is a node that just became black. Then its parent p is the unique vertex in w’s adjacency list which is (a) gray and (b) whose current adjacency list has w in the first position. Proof. Among all the neighbors of w, some vertices are w’s children in the DFS tree, and the rest of them are w’s ancestors, and among the ancestors, exactly one vertex is w’s parent in the DFS tree. All the ancestors should have their currently explored (gray) child at the first position in their adjacency list; and this current child would be different from w for all the ancestors except p (as w was discovered from p). So, the second condition is violated for them. All of w’s children have been fully processed earlier and have been colored black, and hence the first condition is violated for them. Observe that, if w has a child, say k, which is a leaf in the DFS tree, it might happen that k also has w at the first position in its current adjacency list, but, fortunately, k is black while scanning w’s list. So for such vertices, the first condition gets violated. Only for w’s parent, which is p here, both the conditions are satisfied. So, the parent can be found by by scanning the w’s list, to find a neighbor p that is colored gray such that the first element in p’s list is u. This completes the description of the backtracking step. Once we backtrack to p, we find the next white vertex (as in the forward step) and continue until all the vertices of G are explored. Other than some constant number of variables, clearly the space usage is only for storing the color array C. Since C is of length n where each element has 3 possible values, C can be encoded using n lg 3 + O(lg2 n) bits, so that the i-th element in C can 10 be read and updated in O(1) time [38]. So overall space required is n lg 3 + O(lg2 n) bits. As the algorithm systematically brings a white vertex to the front, makes it gray, and moves it to the end after it becomes black, at most two full rotations of each of the list may happen (the second one to determine that there are no more white vertices) resulting in a linear time lex-DFS algorithm. We discuss the lex-DFS algorithm for the directed graphs below. 2.2 Proof of Theorem 1(a) for directed graphs Recall that we have access to both the in-adjacency and the out-adjacency lists for each vertex w in a directed graph G, hence we can use these lists separately for performing two steps of DFS. I.e., out-adjacency list is used for the exploration of DFS in the forward direction and the in-adjacency list is used for finding parent of a node during the backtracking step. We provide the details below. Similar to our algorithm for undirected graphs, in the forward direction, we scan the out-neighbor list of w to find the next white neighbor and proceed. Once the out-neighbor list of w is fully processed, we need to backtrack from w. Towards that we first have to identify w’s parent. In order to do so we use the following lemma whose proof follows along the same lines as the Lemma 1 above. Hence we omit the proof. Lemma 2. Suppose w is a node that just became black. Then its parent p is the unique vertex in w’s in-adjacency list which is (a) gray and (b) whose current out-adjacency list has w in the first position. Once we figure out w’s parent p, DFS backtracks to p, finds the next white neighbor (as done in the forward step) and continues until all the vertices are exhausted. It is clear that this procedure performs lex-DFS on a directed graph G correctly in linear time, and this completes the proof of Theorem 1(a). 2.3 Proof of Theorem 1(b) for undirected graphs To improve the space further, we replace the color array C with a bit array visited[1, . . . , n] which stores a 0 for an unvisited vertex (white), and a 1 for a visited vertex (gray or black). First we need a test similar to that in the statement of Lemma 1 without the distinction of gray and black vertices to find the parent of a node. Due to the invariant we have maintained, every internal vertex of the DFS tree will point to (i.e. have as first element in its list) its last child. So the nodes that could potentially have a node w in its first position are its parent, and any leaf vertex. Hence we modify the forward step in the following way. Whenever we visit an unvisited vertex v for the first time from another vertex u (hence, u is the parent of v in the DFS tree and u’s list has v in the first position), we, as before, mark v as visited and in addition to that, we rotate v’s list to bring u to the front (during this rotation, we do not mark any intermediate nodes as visited). Then we continue as before (by finding the first unvisited vertex and bringing it to the front) in the forward step. Now the following invariants are easy to see and are useful. Invariants: During the exploration of DFS, in the (partial) DFS tree 1. any internal vertex has the first element in its list as its current last child; and 2. for any leaf vertex of the DFS tree, the first element in its list is its parent. The first invariant is easy to see as we always keep the current explored vertex (child) as the first element in the list. For leaves, the first time we encounter them, we make its parent as the first element in the forward direction. Then we discover that it has no unvisited vertices in its list, and so we make a full rotation and bring the parent to the front again. The following lemma provides a test to find the parent of a node. 11 Lemma 3. Let w be a node that has just become black. Then its parent p is the first vertex x in w’s list which is marked 1 in the visited array, and whose current adjacency list has w in the first position. Proof. From the invariants we observed, the nodes that can potentially have w in the first position of their lists are its parent and its children that happen to be leaves. But in w’s list, as we began the exploration of its neighbors starting from its parent, its parent will appear first before its children. Hence the first node in w’s list which has w in the first position must be its parent. Once we backtrack to p, we find the next white vertex, and continue until all the vertices of G are explored. Overall this procedure takes linear time. As we rotate the list to bring the parent of a node, before exploring its white neighbors, we are not guaranteed to explore the first white vertex in its original list, and hence we loose the lexicographic property. We provide our DFS algorithm for directed graphs below. 2.4 Proof of Theorem 1(b) for directed graphs For performing DFS in directed graphs using n + O(lg n) bits, we don’t even need to apply the modifications as we did for the undirected graphs during the forward direction, and we can essentially use the same forward step idea as used for lex-DFS in undirected graphs of Section 2.1. We provide the details below. When we arrive at a previously unvisited vertex v from the vertex u (hence u is the parent of v in the DFS tree), we rotate the in-neighbor list of v to bring u to the front and u stays there during the entire course of the exploration. Thus we maintain the invariant that for any visited node v, the first element in its in-neighbor list is its parent in the DFS tree. Now the algorithm scans v’s adjacency list to find its unvisited neighbor. (i) If we find such a vertex, say w, then we rotate v’s list to make w as the first element, and mark w visited. (ii) If we do not find any such unvisited neighbor of v, then DFS needs to backtrack to its parent. From the invariant we maintain in the in-neighbor list of every visited vertex, this is easy. All we need to do is to see the first entry in v’s in-neighbor list to retrieve its parent u and then continue from u. Overall this procedure takes linear time. Upon closer inspection, it can be seen that, as we are not modifying the ordering of the vertices in the out-neighbor lists in the forward direction (in contrast with the undirected graph algorithm of Section 2.3), this procedure actually traverses the directed graph G in lex-DFS ordering. This completes the proof of Theorem 1(b). 2.5 Proof of Theorem 1(c) for undirected graphs Now to decrease the space to O(lg n), we dispense with the color/visited array, and give tests to determine white, gray and black vertices. For now, assume that we can determine the color of a vertex. The forward step is almost the same as before except performing the update in the color array. I.e., whenever we visit a white vertex v for the first time from another vertex u (hence u is the parent of v), we rotate vs list to bring u to the front. Then we continue to find the first white vertex to explore. We maintain the following invariants. (i) any gray vertex has the first element in its list as its last child in the (partial) DFS tree; (ii) any black vertex has its parent as the first element in its list. We also store the depth of the current node in a variable d, which is incremented by 1 every time we discover a white vertex and decremented by 1 whenever we backtrack. We maintain the maximum depth the DFS has attained using a variable max. At a generic step during the execution of the algorithm, assume that we are at a vertex x’s list, let p be x’s parent and let y be a vertex in x’s list. We need to determine the color of y and continue the DFS based on the color of y. We use the following characterization. 12 Lemma 4. Suppose the DFS has explored starting from a source vertex s, up to a vertex x at level d. Let p be x’s parent. Note that both s and x are gray in the normal coloring procedure. Let max be the maximum level of any vertex in the partial DFS exploration. Let y be a vertex in x’s list. Then, 1. y is gray (i.e., (x, y) is a back edge, and y is an ancestor of x) if and only if we can reach y from s by following through the gray child (which is at the front of a gray node’s list) path in at most d steps. 2. y is black (i.e., (x, y) is a back edge, and x is an ancestor of y) if and only if • there is a path P of length at most (max − d) from y to x (obtained by following through the first elements of the lists of every vertex in the path, starting from y), and • let z be the node before x in the path P . The node z appears after p in x’s list. 3. y is white if y is not gray or black. Proof. The test for gray and white vertices is easy to see. The vertex y is black implies that y is a descendant of x in the partially explored DFS tree. This means that there is a path of length at most (max − d) (obtained by following the parent which is in the first element of the adjacency list) from x to y through an already explored child z . By the way we process x’s list, we first bring the parent to the front of the list, and then explore the nodes in sequence, and hence z, the explored neighbor of x must appear after p in x’s list. Conversely, the unexplored neighbors of x appear before p in x’s list. Now, if we use the above claim to test for colors of vertices, testing for gray takes at most d steps. Testing for black takes at most (max − d) steps to find the path, and at most deg(x) steps to determine whether p appears before. Thus for each vertexPin x’s list, we spend time proportional to max + deg(x). So, the overall runtime of the algorithm is v∈V deg(v)(deg(v) + `) = O(m2 /n + m`), where ` is the maximum depth of DFS tree. Maintaining the invariants for the gray and black vertices are also straightforward. We provide the details of our log-space algorithm for directed graphs below. 2.6 Proof of Theorem 1(c) for directed graphs We describe our O(lg n) bits algorithm for directed graphs in the rotate model. More specifically, we give a DFS algorithm to output all vertices reachable by a directed path from the source vertex s. If we assume that s can reach all vertices, we get to output all vertices. In the preprocessing step, the algorithm spends O(m) time to bring the minimum valued neighbor (denote it by min) in the out-neighbor list of every vertex by rotation (hence we loose the lexicographic DFS property). For now assume that we can determine the color of a vertex. Given this, in the forward direction, when DFS arrives at a previously unvisited vertex v from the vertex u (hence u is the parent of v in the DFS tree), we rotate the in-neighbor list of v to bring u to the front and u stays there during the entire course of the exploration. Also in u’s out-neighbor list, v is made the first location. Hence we maintain the following invariants. Invariants: During the exploration of DFS, in the (partial) DFS tree 1. gray vertices have their current last child in the first location of their out-neighbor lists; 2. all the visited (i.e., gray and black) vertices have their parent in the first location of their in-neighbor lists. We also keep track of the depth of the current node (i.e., the last gray vertex in the gray path of the DFS tree) in a variable d, which, as before, is incremented by 1 every time DFS visits a white vertex and decremented by 1 whenever DFS backtracks. We also store the maximum depth the DFS tree has attained so far in a variable max. At a generic step during the execution of the algorithm, assume that we are at a vertex x’s list, let p be x’s parent (which can be found from the way x is 13 visited by a forward or a backtracking step using the invariants being maintained) and let y be a vertex in x’s list. We need to determine the color of y and continue the DFS based on the color of y and maintain the invariants. We use the following characterization. s s y z c x s s z x p y x p x y y (a) d (b) (c) (d) Figure 2: Illustration of the different cases of the possible positions of the vertex y when DFS considers the directed edge (x, y) at some intermediate step. Suppose the root of the DFS tree is the vertex s and the curvy path starting from s and going straight below through x is the current gray path in the DFS tree. Intuitively all the vertices on the left hand side of the path are black, and right hand side are white and yet to be explored. From left to the right are cases when (x, y) is (a) back edge, (b) cross edge, (c) forward edge, and (d) tree edge. Lemma 5. Suppose the DFS has explored starting from a source vertex s up to a vertex x at level d. Let p be x’s parent. Note that both s and x are gray in the normal coloring procedure. Let max be the maximum level of any vertex in the partial DFS exploration. Let y be a vertex in x’s list. Then, 1. y is gray (i.e., (x, y) is a back edge and y is an ancestor of x) if and only if we can reach y from s following the gray child (which is in the first location of each of the out-neighbor lists of gray nodes) path in at most d steps. 2. y is black if and only if any of the following happens. • There is a path P of length at most (max − d) from y to x obtained by following the first elements of the in-neighbor lists of every vertex in the path P starting from y. This happens when (x, y) is a forward edge, and x is an ancestor of y. • There is a path P of length at most max from y to a gray vertex z 6= x (obtained by following through the first elements of the in-neighbor lists of every vertex starting from y) which is the first gray vertex in the path. Let c be the node before z in the path P , then c must appear after min in z’s list (this happens when (x, y) is a cross edge). 3. The vertex y is white if it is not black or gray(i.e., (x, y) is the next tree edge with x being the parent of y in the DFS tree). Proof. See Figure 2 for a picture of all the cases. The test for gray and white vertices is easy to see. From a vertex x, there could be two types of outgoing edges to a black vertex y. When (x, y) is a forward edge, y is a descendant of x and hence there must exist a path P of length at most (max − d) (obtained by following the parent which is in the first location of the in-neighbor list of every vertex in P , starting from y) from y to x through an already explored child t of x. In the 14 other case, when (x, y) is a cross edge, y has already been discovered and explored completely before DFS reaches to x. Hence there must exist a gray ancestor z of x (z could be x) such that y belongs to the subtree rooted at z in the DFS tree. Thus, from y’s in-neighbor list if we follow the path starting with y’s parent for at most max steps, we must hit the gray path and the first vertex we come across is z. Let c be the node before z in the path. By the way we process z’s out-neighbor list, we first bring the min to the front of the list, and then explore the other neighbor nodes in sequence, and hence c, the explored neighbor of z must appear after min in z’s list. For the converse, suppose y is a white vertex. Either we never reach a gray vertex in max steps (and we will correctly determin its color in this case) or we reach x or x’s ancestor z from y following through the (spurious) first vertices of the in-neighbor list of a white vertex y. Note that the parent of a white vertex is white or gray and it can never be black. Hence z’s child in the path is white. Hence that child will appear before min in z’s list. Given the above test, if y turns out to be white, the edge (x, y) is added to the DFS tree, and y now becomes the current gray vertex. Note that maintaining the invariants are straightforward. Also, when any vertex v has been completely explored by DFS, we retrieve its parent from the in-neighbor list to complete the backtracking step. This procedure is continued until DFS comes back to the source vertex s. We stop at this point. This is because, note that, our proof breaks down in the case when DFS in a directed graph produces a forest and some cross edges go across these trees. In that case, if we follow the path starting from y’s parent, we would reach the root of the DFS tree containing y and this is different from the tree where x belongs to. As we cannot maintain informations regarding all such roots of these previously explored DFS trees, we might spuriously conclude that y is unvisited even though it is not the case. Thus our algorithm produces the DFS tree containing only the vertices reachable from the source vertex s via some directed path in G. We leave open the case for desigining such logspace algorithm for the general directed graphs. Given the above lemma, if y turns out to be white, the edge (x, y) is added to the DFS tree, and y now becomes the current gray vertex. Note that maintaining the invariants are easy. When any vertex v has been completely explored by DFS, we retrieve its parent from the in-neighbor list to complete the backtracking step. This procedure is continued until DFS comes back to the source vertex s. We stop at this point and we have outputted all vertices reachable from s. To analyse the running time of our algorithm observe that testing for gray takes at most d steps. Testing for black takes, in the worst case, at most max steps to find the path, and at each step of the path, we take d time to test whether the new node is gray. Once we reach a gray vertex, we spend at most deg(z) steps to determine whether c appears before min. Thus for each vertex in x’s list, we spend time proportional to d + (d.max) + deg(z) time. As z (which P is independent of x) can have degree at most n. Thus, the overall runtime of the algorithm is v∈V deg(v)(d + d` + n) which is O(m(n + (1 + `)`) which is O(m(n + `2 )), where ` is the maximum depth of DFS tree. 3 3.1 BFS algorithms in the rotate model BFS using n + O(lg n) bits–Proof of Theorem 2(a) It is well-known that BFS actually computes the shortest path lengths in unweighted undirected or directed graph G from a given source vertex s ∈ V to every vertex v ∈ V that is reachable from s. I.e., if a vertex v belongs to the d-th level in the BFS tree (assuming the root s is at zero-th level), then we know that the length of the shortest path from s to v is d. We use this crucially to design our BFS algorithms. We use a bit array visited[1, · · · , n] that stores a 0 for an unvisited vertex, and 1 for a visited vertex. We also maintain a counter dist which stores the level of the vertex that is currently being explored in the BFS algorithm. 15 We start by setting visited[s] = 1, and initializing the counter dist to 0. At the next step, for every unvisited neighbor v of s, we rotate their adjacency list so that s appears as the first element in v’s list, set visited[v] = 1, and output v. This step ensures that for each visited vertex, its parent is at the front of its adjacency list. We refer to this front element in the adjacency list of a visited vertex as its parent pointer. (Also, once we set the parent pointer for a vertex, we will not rotate its adjacency list in the remaining part of the algorithm.) Once the root s’s list is fully processed as above, the dist is incremented to 1. The next step in the algorithm is to find all the vertices in the first level and mark all their unvisited neighbors as visited. As we haven’t stored these vertices (in the first level), the challenge is to find them first. We use the following claim, to find the level number of a visited vertex. The proof easily follows from the fact that the parent pointers are set for all the visited vertices, and that all the ancestors of a visited vertex are also visited. Claim 1. If the BFS has been explored till distance d from the source, then for any k ≤ d, a vertex x marked visited is in level k if and only if we can reach the source s in exactly k steps by following through their parent pointers. Thus determining if a visited vertex is in level d takes at most d steps. So now we continue the BFS by scanning through the vertices, finding those vertices in level d (using the above claim by spending d steps for each vertex), and marking their unvisited neighbors visited, and making in their adjacency lists, their parent vertex as the first element, and incrementing dist. We stop our algorithm when we discover no new unvisited vertex while exploring any level. The correctness of the procedure and the space used P by the algorithm are clear. To analyze the runtime, note that the time spent at level d is nd + i∈V (d) deg(i) where V (d) is the set of vertices in level d and deg(i) is the degree of vertex i. Summing over all levels, we get a runtime O(m + n`2 ), where ` is the depth of the BFS tree. To handle directed graphs, we follow the outneighbor list as we go down, and we set up the parent at the first position in the in-neighbor list of every vertex v. To verify if v belongs to the d-th level, we take d steps from v by following the parent pointers in the in-neighbor lists of the (visited) vertices along the path, and check if we reach s at the end. This completes the proof of Theorem 2(a). 3.2 BFS using O(lg n) bits–Proof of Theorem 2(b) To reduce the space to O(lg n) bits, we dispense with the color array and explain how to determine visited and unvisited vertices. Assume that we can determine this in constant time. Our first observation is that Claim 1 is true even for unvisited vertices even though the first vertex in the adjacency list of unvisited vertices can be an arbitrary vertex (not necessarily referring to their parent in the BFS tree). However, we know (by the property of BFS) that no unvisited vertex is adjacent to a vertex in level less than d, and hence they can not reach s by a path at most d. Using the same argument, we can show that Claim 2. If vertices up to level d have been explored and visited, then a vertex x is a visited vertex if and only if by following through the parent pointers, x can reach s by a path of length at most d. Furthermore, a vertex is in level d if and only if we can reach s by a path of length exactly d by following through the parent pointers. Thus, to check whether a vertex is visited, we spend O(d) time when exploring vertices at level d instead of O(1) time P when the visited array was stored explicitly. Hence, the total the time spent at level d is O(nd + d i∈V (d) deg(i)), where the first term gives the time to find all the visited vertices at level d, and the second term gives the time to explore those vertices (i.e., going through their neighbor lists, identifying the unvisited neighbors and setting their parent pointers). Summing over all levels, we get a total runtime of O(n`2 + m`). Note that this algorithm works only when the 16 input undirected graph is connected as Claim 2 breaks down if there are more than one component. The modifications to handle the directed graphs are similar to those for the directed graph BFS algorithm. This proves Theorem 2(b). 4 Simulation of algorithms for rotate model in the implicit model The following result captures the overhead incurred while simulating any rotate model algorithm in the implicit model. Most of our algorithms in the implicit model use these simulations often with some enhancements and tricks to obtain better running time bounds for some specific problems. Theorem 6. Let D be the maximum degree of a graph G. Then any algorithm running in t(m, n) time in the rotate model can be simulated in the implicit model in (i) O(D · t(m, n)) time when G is given in an adjacency list, and (ii) O(lg D · t(m, n)) time when G is given in an adjacency array. Furthermore, let rv (m, n) denote the number of rotations made in v’s (whose degree is dv ) list, and P f (m, n) be the remaining number of operations. Then any algorithm running in t(m, n) = v∈VPrv (m, n) + f (m, n) time in the rotate model can be simulated in the the implicit model P in (i) O( v∈V rv (m, n) · dv + f (m, n)) time when G is given in an adjacency list, and (ii) O( v∈V rv (m, n) lg dv + f (m, n)) time when G is given in an adjacency array. Proof. We can implement a single rotate operation that moves the head of the list by one position (which is assumed to be a unit-cost operation in the rotate model) in the implicit model by moving all the elements in the adjacency list circularly. If dv is the degree of a vertex v, then performing a rotation of the adjacency list of v can be implemented in O(dv ) time in the implicit model. Thus, if we have an algorithm in the rotate model that takes t(m, n) time, then it can be implemented in O(D · t(m, n)) time in the implicit model, where D is the maximum degree of the graph. One can get a better runtime by analysing the algorithm for the rotate model more carefully. In particular, if the runtime of the algorithm in the rotate model can be expressed as r(m, n) + f (m, n), where r(m, n) is the number of rotations performed and f (m, n) is the remaining number of operations, then the algorithm canPbe implemented in the implicit model in O(D · r(m, n)) + f (m, n) time. Furthermore, if r(m, n) ≤ v∈V rv (m, n) where rv (m, n) is the number of rotations P made in v’s list, then the runtime of the algorithm in the implicit model can be bounded by O( v∈V rv (m, n) · dv + f (m, n)). If the input graph is given in the adjacency array representation and if the ordering of the elements in the adjacency array is allowed to be changed, then one can simulate the rotate operation even faster. The main idea is to simulate the algorithm for the rotate model after sorting the adjacency arrays of each vertex. Using an in-place linear time radix sorting algorithm [51], sorting all the adjacency arrays can be done in O(m) time. Next, we note that in the rotate model, the head points to an element in an arbitrary position (called the front element) in the adjacency list of any vertex and the unit operation moves it one position. Thus, it is enough to show how to access the next element in sorted order. We maintain the following invariant: if the first element is the i-th element in sorted order, then the adjacency array consists of the sorted array of all the adjacent vertices, with the first element swapped with the i-th element. To bring the (i + 1)-st element to the front, we first perform a binary search for the i-th element which is in the first position in the ‘almost sorted’ adjacency array to find the position i, and move the elements appropriately to maintain the invariant (with the (i + 1)-st element at the front). This takes O(lg dv ) time to simulate the rotation of the adjacency array of a vertex v with degree dv . Thus, if we have an algorithm in the rotate model that takes t(m, n) time, then it can be implemented in O(lg D · t(m, n)) time in the implicit model. Moreover, if the runtime of the algorithm in the rotate model can be P expressed as v∈V rv (m, n) + f (m, n), where rv (m, n) is an upper bound on the number of rotations performed on vertex v and f (m, n) is the remaining number of operations, then the algorithm can P be implemented in the implicit model in O( v∈V rv (m, n) lg dv + f (m, n)) time. 17 5 DFS algorithms in the implicit model—proof of Theorem 3 To obtain a lex-DFS algorithm, we implement the O(lg n)-bit DFS algorithm in the rotate model, described in Section 2.5, with a simple modification. First, note that in this algorithm (in the rotate model), we bring the parent of a vertex to the front of its adjacency list (by performing rotations) when we visit a vertex for the first time. Subsequently, we explore the remaining neighbors of the vertex in the left-to-right order. Thus, for each vertex, if its parent in the DFS were at the beginning of its adjacency list, then this algorithm would result in a lex-DFS algorithm. Now, to implement this algorithm in the implicit model, whenever we need to bring the parent to the front, we simply bring it to the front without changing the order of the other neighbors. Subsequently, we simulate each rotation by moving all the elements in the adjacency P list circularly. As mentioned in Section 4, this results in an algorithm whose running time P is O( v∈V dv (dv + `) · dv ) = O(m3 /n2 + `m2 /n) if the graph is given in an adjancecy list and in O( v∈V dv (dv + `) · lg dv ) = O(m2 (lg n)/n + m` lg n)) when the graph is given in the form an adjacency array. This proves Theorem 3(a) for undirected graphs. The results for the directed case follow from simulating the corresponding results for the directed graphs. To prove the result mentioned in Theorem 3(b), we implement the linear-time DFS algorithm of Theorem the rotate model that uses n + P O(lg n) bits. This results in an algorithm that runs P 1 for 2 2 in O( v∈V dv + n) = O(m /n) time (or in O( v∈V dv lg dv + n) = O(m lg m + n) time, when the graph is given as an adjacency array representation), using n + O(lg n) bits. We reduce the space usage of the algorithm to O(lg n) bits by encoding the visited/unvisited bit for each vertex with degree at least 2 within its adjacency list (and not maintaining this bit for degree-1 vertices). We describe the details below. Whenever a node is visited for the first time in the algorithm for the rotated list model, we bring its parent to the front of its adjacency list. In the remaining part of the algorithm, we process each of its other adjacent vertices while rotating the adjacency list, untill the parent comes to the front again. Thus, for each vertex v with degree dv , we need to rotate v’s adjacency list O(dv ) times. In the implicit model, we also bring the parent to the front when a vertex is visited for the first time, for any vertex with degree at least 3. We use the second and third elements in the adjacency list to encode the visited/unvisited bit. But instead of rotating the adjacency list circularly, we simply scan through the adjacency list from left to right everytime we need to find the next unvisited vertex in its adjacency list. This requires O(dv ) time for a vertex v with degree dv . We show how to handle vertices with degree at most 2 separately. As before, we can deal with the degree-1 vertices without encoding visited/unvisited bit as we encounter those vertices only once during the algorithm. For degree-2 vertices, we initially (at preprocessing stage) encode the bit 0 using the two elements in their adjacency arrays - to indicate that they are unvisited. When a degree-2 vertex is visited for the first time from a neighbor x, we move to its other neighbor – continuing the process as long as we encounter degree-2 vertices until we reach a vertex y with degree at least 3. If y is already visited, then we output the path consisting of all the degree-2 vertices and backtrack to x. If y is not visited yet, then we output the path upto y, and continue the search from y, and after marking y as visited. In both the cases, we also mark all the degree-2 nodes as visited (by swapping the two elements in each of their adjacency arrays). During the preprocessing, for each vertex with degree at least 3, we ensure that the second and third elements in its adjacency list encode the bit 0 (to mark it unvisited). We maintain the invariant that for any vertex with degree at least 3, as long as it is not visited, the second and third elements in its adjacency array encode the bit 0; and after the vertex is visited, its parent (in the DFS tree) is at the front of its adjacency array, and the second and third elements in its adjacency array encode the bit 1. Thus, when we visit a node v with degree at least 3 for the 18 first time, we bring its parent to the front, and then swap the second and third elements in the adjacency list, if needed, to mark it as visited. The total running time of this algorithm is bounded P by v∈V d2v = O(m2 /n). We can implement the above DFS algorithm even faster when the input graph is given in an adjacency array representation. We deal with vertices with degree at most 2 exactly as before. For a vertex v with degree at least 3, we bring its parent to the front and swap the second and third elements to mark the node as visited (as before) whenever v is visited for the first time. We then sort the remaining elements, if any, in the adjacency array, in-place (using the linear-time in-place radix sort algorithm [51]), and implement the rotations on the remaining part P of the array as described in Section 4. The total running time of this algorithm is bounded by v∈V dv lg dv = O(m lg m + n). This completes the proof of Theorem 3(b). 6 BFS algorithms in the implicit model—proof of Theorem 4 Before getting into the technical details, we first outline the main ideas involved in proving Theorem 4. One can simulate the BFS algorithm of Theorem 2(b) (for the rotate model) in the implicit model using the simulation described in Section 4. Since these BFS algorithms scan through each of the adjacency lists/arrays at most twice during the algorithm, there won’t be any slowdown in the runtime. This results in an algorithm running in O(m` + n`2 ) time, using O(lg n) bits. To improve the running time, we simulate the algorithm of Theorem 2(a) using the trick of encoding the visited bit of each vertex in its adjacency list instead of storing the visited array explicitly. This requires special attention to degree-1 and degree-2 vertices along with few other technical issues which are dealt in the proof given next. Proof. Here we give the full proof of Theorem 4. In particular, we provide all the details of the case when the degree of each vertex is at least 3, and in that case, we show that we can implement the BFS algorithm using 4 colors of [11], by encoding the 4 color of a vertex using the first three elements in its adjacency list, resulting in an algorithm that takes O(m + n`) time. Moreover, when the degree of every vertex is at least 2 lg n + 3, then we show that the above algorithm can be implemented more efficiently, resulting in an algorithm that takes O(m) time. Details follow. One can simulate the BFS algorithm of in Item 2 of Theorem 2 (for the rotate model) in the implicit model using the simulation described in Section 4. Since these BFS algorithms scan through each of the adjacency lists/arrays at most twice during the algorithm, there won’t be any slowdown in the runtime. This results in a BFS algorithm that runs in O(m` + n`2 ) time, using O(lg n) bits. To improve the running time further, we simulate the algorithm of Theorem 2(a). But instead of storing the visited array explicitly, we encode the visited bit of each vertex in its adjacency list, as explained below, resulting in an algorithm that takes O(m + n`2 ) time, using O(lg n) bits. For a vertex x with degree at least 3, we encode its visited bit using the second and third elements in its adjacency list. To set the parent pointer for x (when it is visited for the first time), we bring its parent to the front, and move the second and third elements, if necessary, to encode the visited bit. We now describe how to deal with the degree-1 and degree-2 vertices. First, observe that in the original BFS algorithm, we can simply output any degree-1 vertex, when it is visited for the first time. Thus, we need not store the visited bit for degree-1 vertices. For degree-2 vertices, we encode the visited bit using the two neighbors. We do not bring its parent to the front, as we do for other vertices. Whenever we need to check whether a visited degree-2 vertex is at depth d, we follow parent pointers from both the neighbors - if one of them does not exist, then the other one is its parent - for a distance of length at most d. (While following the parent pointers from a vertex to the root, it is easy to find its parent - since there is only one alternative to follow.) Thus, the first part of the theorem follows from Theorem 2(a), with the above modification. 19 To improve the runtime further, we implement the BFS algorithm using 4 colors by [11], where all the unvisited vertices are white, all the visited, yet unfinished vertices of the two consecutive layers of BFS are gray1 and gray2 respectively, and all the vertices which are completely explored are black. Suppose the degree of every vertex in the given graph is at least three. In this case, we can encode the color of any vertex by permuting the first three elements in its adjacency array appropriately. This enables us to retrieve (or modify) the color of any vertex in constant time by reading (or modifying) the permuted order of the first elements in its adjacency array. Since we haven’t stored the gray1 or gray2 vertices in a queue (as in the standard BFS), we scan through the entire vertex set (in the increasing order of their labels), and when we find any vertex v colored gray1, we color all its white neighbors with gray2, and color v itself with black. We call this an exploration phase. The time taken for each exploration phase is equal to the sum of the degrees of all the gray1 vertices at the beginning of the phase, plus O(n). At the end of each exploration phase, we change the colors of all gray2 vertices to gray1 and also output them, using an additional O(n) time. We call this a consolidation phase. We need to repeat the exploration and consolidation phases for ` times before all the nodes are colored black, where ` is the height of the BFS tree. Thus the overall time taken by this procedure can be bounded by O(m + n`). This proves the second part of the theorem. If every vertex has degree at least 2 lg n + 3, then we can perform BFS in O(m) time (note that m ≥ n lg n in this case) – by encoding the current set of gray1 vertices as a linked list by using 2 lg n vertices to encode (a pointer to) the next vertex in the list. The time to read all the gray1 vertices in a phase when there are k vertices colored gray1 becomes O(k lg n) instead of O(n). This results in O(m + n lg n) time which is O(m). This proves the third part of the theorem. 7 Minimum Spanning Tree In this section, we start by giving an in-place implementation of the Prim’s algorithm [30] to find a minimum spanning tree of a given weighted undirected graph in the rotate model. Here we are given a weight function w : E → Z. We also assume that the weights of non-edges are ∞ and that the weights can be represented using O(lg n) bits. The input representation also changes slightly to accommodate these weights. Now each element of the circular linked list has three fields, (a) the vertex label, (b) the weight, and (c) the pointer to the next vertex respectively. In what follows, when we talk about computing a minimum spanning tree, what we mean is reporting the edges of such a tree. Our result is the following, Theorem 7. A minimum spanning tree of a given undirected weighted graph G can be found using O(lg n) bits and in O(mn) time in the rotate model. Proof. Our rotate model algorithm basically mimics Prim’s algorithm with a few tweaks. Prim’s algorithm starts with initializing a set S with a vertex s. For every vertex v not in S, it finds and maintains d[v] = min{w(v, x) : x ∈ S} and π[v] = x where w(v, x) is the minimum among {w(v, y) : y ∈ S}. Then it repeatedly deletes the vertex with the smallest d value from V − S adding it to S. Then the d values are updated by looking at the neighbors of the newly added vertex. To implement this procedure using just extra O(lg n) bits of space, first we need to find a way to mark/unmark a vertex v if it has been taken into S without using n bits explicitly. The way we do this is as follows. In the preprocessing step, the algorithm spends O(m) time to bring the minimum valued neighbor (denote it by min) in the neighbor list of every vertex v by rotation. Subsequently we would attach the following meaning with the position of min in the list of any vertex v. If the first element in the list of any vertex v is min, this means that v is not taken into S so far during the execution of the algorithm, otherwise it belongs to S. This way we can store the 20 information regarding the status of any vertex v without using any extra space but actually figuring out this information takes time proportional to the degree of v. Note that for vertices having degree one, we cannot determine exactly its status correctly by this method. But a simple fact we can use here. If a vertex z has degree one (say its neighbor is y), then the edge (y, z) is always a part of the minimum spanning tree. Hence, after the preprocessing step, we can output all such edges at once and embark on executing the rest of the algorithm. The algorithm initializes the set S with the starting vertex s, and goes to its list to give a rotation so that min does not stay in the first location in s’s list. We call this step as the marking step. This is followed by finding the smallest weight neighbor (say u) of s. According to Prim’s algorithm, u should now move to S. We achieve the same by marking u i.e., going to u’s list to give a rotation to move min from the first location to indicate that u belongs to S now and subsequently continue to in u’s list find its smallest weight neighbor and repeat. Thus at any generic step of the algorithm, we go over the list of unmarked vertices (i.e., those vertices having min at the first position of their respective lists) and collect the minimum weight vertex (say t), and t is then marked and we continue until all the vertices are marked. Clearly this method returns all the correct edges of a minimum spanning tree of G. Space bound of this algorithm is easily seen to be O(lg n) bits for keeping a few variables. Total time spent by algorithm can be bounded by O(mn) where at the preprocessing step, it spends O(m) time and after the preprocessing, for reporting each edges of the minimum spanning tree, in the worst case, the algorithm spends O(m) time, hence O(mn) is the bound on the running time. As mentioned in Section 4, simulating this algorithm in the implicit model would result in an algorithm having running time O(mn.dv )=O(mn2 ) if the graph is given in an adjacency list and in O(mn. lg dv )=O(mn lg n) when the graph is represented in an adjacency array. Hence, we have the following, Theorem 8. In the implicit model a minimum spanning tree of a given undirected weighted graph G can be found using O(lg n) bits and 1. O(mn2 ) time if the graph is given in an adjacency list, and 2. O(mn lg n) time when the graph is represented in an adjacency array. 8 Consequences In this section, we provide some applications/consequences of our results that we derived in the earlier sections. 8.1 Improved algorithm for DFS and applications in ROM In this section, we show, using a little more space, how to simulate any rotate model algorithm in the read-only model. This results in improved space-efficient algorithms for various fundamental graph problems in the read-only model. Observe that, the only modification of the input that we do in our rotate model algorithm is to make the head pointer point to an arbitrary element in the adjacency list (instead of a fixed element) at various times. To simulate this in read-only memory, we can simply maintain a pointer in each of the lists in the adjacency list. The resources required to store and update such pointers is proven in the following lemma [23]. We provide the proof here for completeness. Lemma 6 ([23]). Given the adjacency list representation of a directed or an undirected graph G on n vertices with m edges, using O(m) time, one can construct an auxiliary structure of size O(n lg(m/n)) bits that can store a “pointer” into an arbitrary index within the adjacency list of each vertex. Also, updating any of these pointers (within the adjacency list) takes O(1) time. 21 Proof. We first scan the adjacency list of each vertex and construct a bitvector B as follows: starting with an empty bitvector B, for 1 ≤ i ≤ n, if di is the length of the adjacencyP array of vertex vi (i.e., its degree), then we append the string 0dlg di e−1 1 to B. The length of B is ni=1 dlg di e, which is bounded by O(n lg(m/n)). We construct auxiliary structures to support select queries on B in constant time [60]. We now construct another bitvector P of the same size as B, which stores the pointers into the adjacency array of each vertex. The pointer into the adjacency array of vertex vi is stored using the dlg di e bits in P from position select(i − 1, B) + 1 to position select(i, B), where select(0, B) is defined to be 0. Now, using select operations on B and using constant time word-level read/write operations, one can access and/or modify these pointers in constant time. To actually get to the element in the list, we need the graph to be represented as what is referred as adjacency array [44]. Here given an index in the list of a vertex, we can access the (adjacent) vertex in that position of the vertex’s adjacency list in constant time. Now if we simulate our rotate model algorithm of Theorem 1 in read-only memory using the auxiliary structure as stated in Lemma 6 as additional storage, then we obtain, Theorem 9. A DFS traversal of an undirected or a directed graph G, represented by an adjacency array, on n vertices and m edges can be performed in O(m + n) time using O(n lg(m/n)) bits, in the read-only model. The above result improves the DFS tradeoff result of Elmasry et al. [44] for relatively sparse graphs in the read-only model. In particular, they showed the following, Theorem 10 ([44]). For every function t : N → N such that t(n) can be computed within the resource bound of this theorem (e.g., in O(n) time using O(n) bits), the vertices of a directed or undirected graph G, represented by adjacency arrays, with n vertices and m edges can be visited in lg n depth first order in O((m + n)t(n)) time with O(n + n lgt(n) ) bits. Thus to achieve O(m + n) time for DFS, their algorithm (Theorem 10) uses O(n lg lg n) bits. This is Ω(n lg(m/n)) for all values of m where m = O(n lg n). Banerjee et al. [11] and Kammer et al. [54] recently provided another DFS implementation taking O(m + n) bits of space and runs in O(m + n) time. Note that, Theorem 9 improves the space bound of the above mentioned DFS implementations from O(m + n) space to O(n lg(m/n)), while maintaining the same linear running time. Chakraborty et al. [23] obtained similar results by a slightly different technique. In what follows, we show that using Theorem 9, we can improve the space bounds of some of the classical applications of DFS in read-only model. To illustrate this, note that, one of the many classical applications of DFS (see [30]) include (i) topological sorting of the vertices of a directed acyclic graph [55], (ii) producing a sparse (having O(n) edges) spanning biconnected subgraph of a undirected biconnected graph G [43], and (iii) given an undirected 2-edge-connected graph G = (V, E), to orient each edge (u, v) ∈ E as an arc (u, v) or (v, u) to obtain D = (V, A) such that D becomes strongly connected. For all of these problems, classical algorithms [55, 43] take linear time and O(n lg n) bits of space. Recently, Banerjee et al. [11] showed the following, Theorem 11. [11] In the read-only model, if the DFS of G on n vertices and m edges, can be performed in t(m, n) time using s(m, n), where s(m, n) = Ω(n), bits of space, then using O(s(m, n)) bits and in O(t(n, m)) time, we can output 1. the vertices of a directed acyclic graph in topologically sorted order, 2. the edges of a sparse spanning biconnected subgraph of a undirected biconnected graph G, and 3. a strongly connected orientation of a undirected 2-edge-connected graph G. 22 Now plugging the improved DFS algorithm of Theorem 9 in the above theorem, we obtain for all the applications an improved (over the classical implementation) space-efficient implementations taking O(m + n) time and O(n lg(m/n)) bits of space. 8.2 Space-efficient approximation algorithms using Baker’s approach In this section we present in-place Logspace Approximation Scheme or LSAS ((1 ± ) approximation algorithm running in logspace for every  > 0) for a class of MSO-definable optimization problems which are amenable to the Baker’s method [10], also known as shifting technique, in locally bounded treewidth graphs. There are two main general approaches for designing PTASs for problems on planar graphs. The first approach is based on planar separators [58]. The approximation algorithms resulting from this approach are impractical in general. To address this, Baker [10] introduced the second approach for PTASs in planar graphs, based on decomposition into overlapping subgraphs of bounded outerplanarity, which are of bounded treewidth. For a general account on these, see [37]. Baker’s method was originally designed to give PTASs for a host of NP-hard optimization problems on planar graphs like minimum vertex cover, minimum dominating set, maximum independent set etc which are hard to approximate in general graphs. Many of these remain NP-hard even in planar graphs. Later the technique was generalized to a broader class of graphs called graphs of bounded local treewidth [46, 36]. For a vertex v of a graph G and integer k ≥ 0, by Gkv we denote the subgraph of G induced by vertices within distance at most k from v in G. A class of graphs G is of bounded local treewidth if there exists function f such that for every graph G ∈ G and every vertex v of G, treewidth(Gkv ) ≤ f (k). 8.2.1 Baker’s Algorithm The main two computational bottlenecks in Bakers approach are 1. decomposing the graph into bounded treewidth graphs, and 2. solving the optimization problem on bounded tree width graphs optimally and combining these solutions. Step (1) requires performing BFS on the graph G and considering the induced subgraphs Gi,j between layers ki + j and k(i + 1) + j (which are of treewidth O(k)) for i ≥ 0 and offset 0 ≤ j ≤ k − 1 by deleting (or including in both the adjacent slices) the vertices/edges in every k = O(1/)-th BFS layer (particular details differ depending on the problem). By choosing the right offset, we can make sure this affects the optimum solution at most by  factor. For Step (2), given an MSO-definable problem, using Boadlander’s [16] and Courcelles theorem [31] on bounded treewidth graphs we can get the optimal solution. Baker’s approach is highly efficient in terms of time complexity as this gives linear time approximation schemes but the scenario changes when considering the efficiency of the approach in terms of the space needed. Though we can use the result of [40] for the second part of the algorithm which proves logspace analogue of Boadlander’s and Courcelles theorem, in the the first part we need to compute distance. BFS can be performed in NL in general graphs and in UL ∩ co-UL for planar graphs [69]. Since UL ⊆ NL is not known (or even believed) to be inside L, the NL bound (UL ∩ co-UL for planar graphs) for Baker’s algorithm is the best known in ROM [33]. Recently [34] has given an LSAS for maximum matching in planar graphs and some more sparse graph classes (a problem amenable to Baker’s method) but a logspace analogue of Baker’s algorithm in general is not yet known. Since in our in-place models (both rotate and implicit ) we can overcome this hurdle by computing distance in L, we obtain the following result. Notice that though our in-place algorithms change the ordering of the vertices in an adjacency list (or array) the graph remains the same and so the 23 distances between vertices. Theorem 12. In both the rotate and the implicit model MSO-definable optimization problems which are amenable to Baker’s method has an LSAS in locally bounded treewidth graphs. 8.3 Solving NP-hard problems in in-place models We show how to solve some NP-hard graph problems using logspace and exponential time in the rotate and implicit models. In particular, this implies that problems such as vertex cover and dominating set can be solved in exponential time using O(lg n) bits in both the models. In constrast, note that, no NP-hard problem can be solved in the ROM model using O(lg n) bits unless P=NP. Similar to Fomin et al. [48], we define a class of graph problems in NP which we call graph subset problems where the goal is to find a subset of vertices satisfying some property. We show a meta theorem showing that a restricted class of graph subset problems that are in NP admit log-space exponential algorithms in the rotate and implicit models. Given a graph G with its adjacency list, we encode a subset of the vertices as follows. For every vertex in the subset, we bring in the minimum labelled vertex among its neighbors to the front of the list, and for others, we keep a vertex with a higher label (than the minimum) at the front of the list. So it takes a linear time to check whether a vertex is in the subset. The algorithm enumerates all subsets (by this encoding) and simply verifies using the NP algorithm whether that subset satisfies the required property until it finds a subset satisfying the property or it has enumerated all the subsets. By a standard theorem in complexity theory [5], every problem in NP is actually verifiable by a log-space ROM and hence the overall space taken by our algorithm is only logarithmic. Note that our algorithm requires that the adjacency list of any vertex has at least two values, i.e. that the degree of any vertex is at least two. Thus we have Theorem 13. Any graph subset problem in NP can be solved using O(lg n) bits of extra space (and exponential time) in the rotate and implicit models in graphs G having minimum degree 2. Remark 1. We remark that the above idea can work for other graph problems that are not necessarily subset problems. For example, for testing hamiltonicity, we can simply explore all neighbors of a vertex (starting at the smallest labelled neighbor so we know when we have explored them all) in a systematic fashion simply encoding them into the adjacency list by moving the current neighbor to the front of the list, and test whether together they form a cycle of length n. If the graphs have larger minimum degree (say at least 2 lg n), we can even encode pointers in each adjacency list and using that we can even test for graph isomorphism in logarithmic space by explicitly maintaining the vertex mapping by these encoding pointers. Remark 2. The minimum degree 2 restriction in the above theorem is not a serious restriction as for many problems (like vertex cover, dominating set and traveling salesperson problem), there are preprocessing routines that can handle (not necessarily in our model) and eliminate degree 1 vertices. 9 Concluding remarks Our initial motivation was to get around the limitations of ROM to obtain a reasonable model for graphs in which we can obtain space efficient algorithms. We achieved that by introducing two new frameworks and obtained efficient (of the order of O(n3 lg n)) algorithms using O(lg n) bits of space for fundamental graph search procedures. We also discussed various applications of our DFS/BFS results, and it is not surprising that many simple corollaries would follow as DFS/BFS being the backbone of so many graph algorithms. We showed that some of these results also translate to improved space efficient algorithms in ROM (by simulating the rotate model algorithms in ROM 24 with one pointer per list). With some effort, we can obtain log space algorithm for minimum spanning tree. These results can be contrasted with the state of the art results in ROM that take almost linear bits for some of these problems other than having large runtime bounds. All our algorithms are conceptually simple, and as they don’t use any heavy data structures, we believe that they are also practical to implement. Still, there are plenty of algorithmic graph problems to be studied in these models. We believe that our work is the first step towards this and will inspire further investigation into designing in-place algorithms for other graph problems. One future direction would be to improve the running time of our algorithms to make them more practical. Surprisingly we could design log-space algorithm for some P-complete problems, and so it is important to understand the power of our models. Towards that we discovered that we can even obtain log-space algorithms for some NP-hard graph problems. More specifically, we defined graph subset problems and obtained log-space exponential time algorithms for problems belonging to this class. One interesting future direction would be to determine the exact computational power of these models along with exploring the horizon of interesting complexity theoretic consequences of problems in these models. References [1] A. Aggarwal and R. J. Anderson. A random NC algorithm for depth first search. Combinatorica, 8(1):1–12, 1988. [2] A. Aggarwal, R. J. Anderson, and M. Kao. Parallel depth-first search in general directed graphs. SIAM J. Comput., 19(2):397–409, 1990. [3] N. Alon, Y. Matias, and M. Szegedy. The space complexity of approximating the frequency moments. J. Comput. Syst. Sci., 58(1):137–147, 1999. [4] R. J. Anderson and E. W. Mayr. Parallelism and the maximal path problem. Inf. Process. Lett., 24(2):121–126, 1987. [5] S. Arora and B. Barak. Computational Complexity - A Modern Approach. Cambridge University Press, 2009. [6] T. Asano, K. Buchin, M. Buchin, M.Korman, W. Mulzer, G. Rote, and A. Schulz. Reprint of: Memory-constrained algorithms for simple polygons. Comput. Geom., 47(3):469–479, 2014. [7] T. Asano, T. Izumi, M. Kiyomi, M. Konagaya, H. Ono, Y. Otachi, P. Schweitzer, J. Tarui, and R. Uehara. Depth-first search using O(n) bits. In 25th ISAAC, pages 553–564, 2014. √ [8] T. Asano, D. G. Kirkpatrick, K. Nakagawa, and O. Watanabe. Õ( n)-space and polynomialtime algorithm for planar directed graph reachability. In 39th MFCS LNCS 8634, pages 45–56, 2014. [9] T. Asano, W. Mulzer, G. Rote, and Y. Wang. Constant-work-space algorithms for geometric problems. JoCG, 2(1):46–68, 2011. [10] B. S. Baker. Approximation algorithms for np-complete problems on planar graphs. J. ACM, 41(1):153–180, 1994. [11] N. Banerjee, S. Chakraborty, and V. Raman. Improved space efficient algorithms for BFS, DFS and applications. In 22nd COCOON, 2016. 25 [12] N. Banerjee, S. Chakraborty, V. Raman, S. Roy, and S. Saurabh. Time-space tradeoffs for dynamic programming in trees and bounded treewidth graphs. In 21st COCOON, volume 9198, pages 349–360. springer, LNCS, 2015. [13] L. Barba, M. Korman, S. Langerman, K. Sadakane, and R. I. Silveira. Space-time trade-offs for stack-based algorithms. Algorithmica, 72(4):1097–1129, 2015. [14] G. Barnes, J. Buss, W. Ruzzo, and B. Schieber. A sublinear space, polynomial time algorithm for directed s-t connectivity. SIAM J. Comput., 27(5):1273–1282, 1998. [15] Paul Beame. A general sequential time-space tradeoff for finding unique elements. SIAM J. Comput., 20(2):270–277, 1991. [16] H. L. Bodlaender. A linear-time algorithm for finding tree-decompositions of small treewidth. SIAM J. Comput., 25(6):1305–1317, 1996. [17] A. Borodin and S. A. Cook. A time-space tradeoff for sorting on a general sequential model of computation. SIAM J. Comput., 11(2):287–297, 1982. [18] A. Borodin, M. J. Fischer, D. G. Kirkpatrick, N. A. Lynch, and M. Tompa. A time-space tradeoff for sorting on non-oblivious machines. J. Comput. Syst. Sci., 22(3):351–364, 1981. [19] H. Brönnimann, T. M. Chan, and E. Y. Chen. Towards in-place geometric algorithms and data structures. In Proceedings of the 20th ACM Symposium on Computational Geometry, Brooklyn, New York, USA, June 8-11, 2004, pages 239–246, 2004. [20] H. Buhrman, R. Cleve, M. Koucký, B. Loff, and F. Speelman. Computing with a full memory: catalytic space. In Symposium on Theory of Computing, STOC 2014, New York, NY, USA, May 31 - June 03, 2014, pages 857–866, 2014. [21] H. Buhrman, M.l Koucký, B. Loff, and F. Speelman. Catalytic space: Non-determinism and hierarchy. In 33rd STACS 2016, February 17-20, 2016, Orléans, France, pages 24:1–24:13, 2016. [22] D. Chakraborty, A. Pavan, R. Tewari, N. V. Vinodchandran, and L. Yang. New time-space upperbounds for directed reachability in high-genus and h-minor-free graphs. In FSTTCS, pages 585–595, 2014. [23] S. Chakraborty, V. Raman, and S. R. Satti. Biconnectivity, chain decomposition and stnumbering using O(n) bits. In 27th ISAAC, pages 22:1–22:13, 2016. [24] S. Chakraborty, V. Raman, and S. R. Satti. Biconnectivity, st-numbering and other applications of DFS using O(n) bits. J. Comput. Syst. Sci., 90:63–79, 2017. [25] S. Chakraborty and S. R. Satti. Space-efficient algorithms for maximum cardinality search, stack bfs, queue BFS and applications. In Computing and Combinatorics - 23rd International Conference, COCOON 2017, Hong Kong, China, August 3-5, 2017, Proceedings, pages 87–98, 2017. [26] T. M. Chan and E. Y. Chen. Multi-pass geometric algorithms. Discrete & Computational Geometry, 37(1):79–102, 2007. 26 [27] T. M. Chan, J. I. Munro, and V. Raman. Faster, space-efficient selection algorithms in read-only memory for integers. In Algorithms and Computation - 24th International Symposium, ISAAC 2013, Hong Kong, China, December 16-18, 2013, Proceedings, pages 405–412, 2013. [28] T. M. Chan, J. I. Munro, and V. Raman. Selection and sorting in the ”restore” model. In 25th-SODA, pages 995–1004, 2014. [29] S. A. Cook and C. Rackoff. Space lower bounds for maze threadability on restricted machines. SIAM J. Comput., 9(3):636–652, 1980. [30] T. H. Cormen, C. E. Leiserson, R. L. Rivest, and C. Stein. Introduction to Algorithms (3. ed.). MIT Press, 2009. [31] B. Courcelle and M. Mosbah. Monadic second-order evaluations on tree-decomposable graphs. Theor. Comput. Sci., 109(1&2):49–82, 1993. [32] O. Darwish and A. Elmasry. Optimal time-space tradeoff for the 2d convex-hull problem. In 22th ESA, pages 284–295, 2014. [33] S. Datta and R. Kulkarni. Space complexity of optimization problems in planar graphs. In 11th Annual Conference, TAMC 2014, Chennai, India, April 11-13, 2014. Proceedings, pages 300–311, 2014. [34] S. Datta, R. Kulkarni, and A. Mukherjee. Space-efficient approximation scheme for maximum matching in sparse graphs. In 41st MFCS 2016, August 22-26, 2016 - Kraków, Poland, pages 28:1–28:12, 2016. [35] S. Datta, N. Limaye, P. Nimbhorkar, T. Thierauf, and F. Wagner. Planar graph isomorphism is in log-space. In 24th CCC, pages 203–214, 2009. [36] E. D. Demaine and M. Taghi Hajiaghayi. Equivalence of local treewidth and linear local treewidth and its algorithmic applications. In Fifteenth SODA 2004, New Orleans, Louisiana, USA, January 11-14, 2004, pages 840–849, 2004. [37] E. D. Demaine and M. Taghi Hajiaghayi. Approximation Schemes for Planar Graph Problems, pages 1–99. Springer US, Boston, MA, 2008. [38] Y. Dodis, M. Patrascu, and M. Thorup. Changing base without losing space. In Proceedings of the 42nd ACM Symposium on Theory of Computing (STOC), pages 593–602, 2010. [39] J. Edmonds, C. K. Poon, and D. Achlioptas. Tight lower bounds for st-connectivity on the NNJAG model. SIAM J. Comput., 28(6):2257–2284, 1999. [40] M. Elberfeld, A. Jakoby, and T. Tantau. Logspace versions of the theorems of bodlaender and courcelle. In 51th FOCS, pages 143–152, 2010. [41] M. Elberfeld and K. Kawarabayashi. Embedding and canonizing graphs of bounded genus in logspace. In Symposium on Theory of Computing, STOC 2014, New York, NY, USA, May 31 June 03, 2014, pages 383–392, 2014. [42] M. Elberfeld and P. Schweitzer. Canonizing graphs of bounded tree width in logspace. In 33rd Symposium on Theoretical Aspects of Computer Science, STACS 2016, February 17-20, 2016, Orléans, France, pages 32:1–32:14, 2016. 27 [43] A. Elmasry. Why depth-first search efficiently identifies two and three-connected graphs. In 21st ISAAC, pages 375–386, 2010. [44] A. Elmasry, T. Hagerup, and F. Kammer. Space-efficient basic graph algorithms. In 32nd STACS, pages 288–301, 2015. [45] A. Elmasry, D. D. Juhl, J. Katajainen, and S. R. Satti. Selection from read-only memory with limited workspace. Theor. Comput. Sci., 554:64–73, 2014. [46] D. Eppstein. Diameter and treewidth in minor-closed graph families. Algorithmica, 27(3):275– 291, 2000. [47] J. Feigenbaum, S. Kannan, A. McGregor, S. Suri, and J. Zhang. On graph problems in a semi-streaming model. Theor. Comput. Sci., 348(2-3):207–216, 2005. [48] F. V. Fomin, S. Gaspers, D. Lokshtanov, and S. Saurabh. Exact algorithms via monotone local search. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 764–775, 2016. [49] G. Franceschini and J. Ian Munro. Implicit dictionaries with O(1) modifications per update and fast search. In Proceedings of the Seventeenth Annual ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 404–413, 2006. [50] G. Franceschini and S. Muthukrishnan. In-place suffix sorting. In Automata, Languages and Programming, 34th International Colloquium, ICALP 2007, Wroclaw, Poland, July 9-13, 2007, Proceedings, pages 533–545, 2007. [51] G. Franceschini, S. Muthukrishnan, and M. Patrascu. Radix sorting with no extra space. In Algorithms - ESA 2007, 15th Annual European Symposium, Eilat, Israel, October 8-10, 2007, Proceedings, pages 194–205, 2007. [52] G. N. Frederickson. Upper bounds for time-space trade-offs in sorting and selection. J. Comput. Syst. Sci., 34(1):19–26, 1987. [53] T. Hagerup and F. Kammer. Succinct choice dictionaries. CoRR, abs/1604.06058, 2016. [54] F. Kammer, D. Kratsch, and M. Laudahn. Space-efficient biconnected components and recognition of outerplanar graphs. In 41st MFCS, 2016. [55] Donald E. Knuth. The Art of Computer Programming, Volume I: Fundamental Algorithms, 2nd Edition. Addison-Wesley, 1973. [56] M. Koucký. Catalytic computation. Bulletin of the EATCS, 118, 2016. [57] T. W. Lai and D. Wood. Implicit selection. In SWAT 88, 1st Scandinavian Workshop on Algorithm Theory, Halmstad, Sweden, July 5-8, 1988, Proceedings, pages 14–23, 1988. [58] R. J. Lipton and R. E. Tarjan. Applications of a planar separator theorem. SIAM J. Comput., 9(3):615–627, 1980. [59] A. McGregor. Graph stream algorithms: a survey. SIGMOD Record, 43(1):9–20, 2014. [60] J. I. Munro. Tables. In FSTTCS, pages 37–42, 1996. 28 [61] J. I. Munro and M. Paterson. Selection and sorting with limited storage. Theor. Comput. Sci., 12:315–323, 1980. [62] J. I. Munro and V. Raman. Selection from read-only memory and sorting with minimum data movement. Theor. Comput. Sci., 165(2):311–323, 1996. [63] J. Ian Munro. An implicit data structure supporting insertion, deletion, and search in O(log2 n) time. J. Comput. Syst. Sci., 33(1):66–74, 1986. [64] J. Pagter and T. Rauhe. Optimal time-space trade-offs for sorting. In 39th Annual Symposium on Foundations of Computer Science, FOCS ’98, November 8-11, 1998, Palo Alto, California, USA, pages 264–268, 1998. [65] J. H. Reif. Symmetric complementation. J. ACM, 31(2):401–421, 1984. [66] J. H. Reif. Depth-first search is inherently sequential. Inf. Process. Lett., 20(5):229–234, 1985. [67] O. Reingold. Undirected connectivity in log-space. J. ACM, 55(4), 2008. [68] T. Tantau. Logspace optimization problems and their approximability properties. Theory Comput. Syst., 41(2):327–350, 2007. [69] T. Thierauf and F. Wagner. The isomorphism problem for planar 3-connected graphs is in unambiguous logspace. Theory Comput. Syst., 47(3):655–673, 2010. [70] M. Tompa. Two familiar transitive closure algorithms which admit no polynomial time, sublinear space implementations. SIAM J. Comput., 11(1):130–137, 1982. 29
8cs.DS
DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY IN HECKE ALGEBRAS arXiv:1508.06817v3 [math.GR] 31 Mar 2016 FRANÇOIS DIGNE AND THOMAS GOBET Abstract. We study the rational permutation braids, that is the elements of an Artin-Tits group of spherical type which can be written x−1 y where x and y are prefixes of the Garside element of the braid monoid. We give a geometric characterization of these braids in type An and Bn and then show that in spherical types different from Dn the simple elements of the dual braid monoid (for arbitrary choice of Coxeter element) embedded in the braid group are rational permutation braids (we conjecture this to hold also in type Dn ). This property implies positivity properties of the polynomials arising in the linear expansion of their images in the Iwahori-Hecke algebra when expressed in the Kazhdan-Lusztig basis. In type An , it implies positivity properties of their images in the Temperley-Lieb algebra when expressed in the diagram basis. Contents 1. Introduction 2 2. Classical braid monoid 4 3. Dual braid monoids 4 3.1. Coxeter elements 4 3.2. Dual braid monoids 6 3.3. Hurwitz action on reduced decompositions 7 3.4. Groups of fractions of dual braid monoids are Artin-Tits groups 7 3.5. A formula for dual atoms 8 4. Rational permutation braids 9 4.1. Square-free braids 9 4.2. Rational permutation braids 9 5. Mikado braids of type An 11 5.1. Square-free braids 11 5.2. Mikado braids 11 5.3. Simple dual braids are Mikado braids 13 6. Mikado braids of type Bn 18 6.1. Coxeter and Artin-Tits groups of type Bn 18 6.2. Mikado braids of type Bn 18 6.3. Simple dual braids are Mikado braids 19 7. Dihedral and exceptional types 20 8. Positivity properties 21 8.1. Iwahori-Hecke algebra of a Coxeter system 21 8.2. Positivity properties of simple dual braids 21 8.3. Temperley-Lieb algebra and monomial basis 22 8.4. Projection of the canonical basis 23 1 2 FRANÇOIS DIGNE AND THOMAS GOBET 8.5. Zinno basis 8.6. Positivity consequences References 23 24 25 1. Introduction This paper is motivated by positivity properties arising when expanding simple dual braids in the canonical basis of the Iwahori-Hecke algebra. More precisely, a dual braid monoid associated to a finite Coxeter group and a choice of Coxeter element is a Garside monoid ([16]) whose group of fractions is isomorphic to the corresponding Artin-Tits group. The dual braid monoids were introduced by Bessis [4], extending definitions by BirmanKo-Lee [6] and Bessis-Michel and the first author [5]. As Garside monoids, they possess a finite set of simple elements which generates the whole monoid and forms a lattice under the left-divisibility order and they embed into their group of fractions. Similar constructions have been made for some infinite Coxeter groups and for complex reflection groups, but in this paper, unless explicitely stated, “dual braid monoid” will mean a dual braid monoid associated with a finite Coxeter group. In the framework of Artin-Tits groups, the standard example of a Garside monoid is the braid or Artin-Tits monoid, also known as positive or classical braid monoid. Its set of simple elements is the canonical positive lift of the Coxeter group in the Artin-Tits group. The embedding property in this specific case was shown by Brieskorn-Saito ([8]) and by Deligne ([17]). In the dual approach, the set of simple generators of the Coxeter group is replaced in the spherical case by the whole set of reflections, that is, by the conjugates of the simple generators. A key tool in this approach is an action of the braid group on the set of reduced factorizations of a Coxeter element as a product of reflections, called the Hurwitz action. This action is known to be transitive ([4], [3]), providing an analogue in the dual approach of the Tits-Matsumoto property. The dual braid monoid is then an analogue to the classical braid monoid, but having as set of generators a copy of the set of reflections of the Coxeter group. In the classical setting, the lattice of simple elements is isomorphic to the lattice obtained by endowing the Coxeter group with the left weak order defined by the classical length function. By mimicking this approach in the dual setting, that is, by replacing the classical length function by the length function with respect to the whole set of reflections, one obtains an order called reflection or absolute order on the Coxeter group. The absolute order does not in general endow the Coxeter group with a lattice structure, but by restricting such an order to the order ideal of a Coxeter element, one obtains a lattice ([4], [11]). The dual braid monoid is built using this property. Its lattice of simple elements is isomorphic to the order ideal of a given Coxeter element ordered by the restriction of the absolute order ([4]). There is a morphism from the Artin-Tits group to the group of invertible elements of the Iwahori-Hecke algebra attached to the corresponding Coxeter group. The images of the simple elements of the classical braid monoid DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 3 through this morphism yield a basis of the Iwahori-Hecke algebra, the socalled standard basis. It is therefore natural to ask about properties of the images of the simple elements of the dual Garside structure of an Artin-Tits group in the associated Iwahori-Hecke algebra. In type An , it is known that their images in the Temperley-Lieb algebra yield a basis ([40], [32], [39]) such that the base change to the diagram basis is triangular ([40], [25]). One of the main points of this paper consists of understanding how one can express the simple dual braids in terms of the classical braid group generators. Indeed, the isomorphism between the group of fractions of a dual braid monoid and the Artin-Tits group is proven by a case-by-case analysis, and there is no known general formula for the simple dual braids in the braid group, even for the atoms. We recall the construction of the classical and dual braid monoids in Sections 2 and 3 where we also prove some new results on dual Coxeter systems. In particular we give a formula for the reflections in terms of the simple reflections (Proposition 3.4) which lifts well to the Artin-Tits group, allowing us to get a uniform formula for the dual atoms in terms of the classical generators (Proposition 3.13) and this with a case-free proof. We then introduce in Section 4 a finite set of braids, which we call rational permutation braids. These braids already appear in a paper by Dehornoy ([14]) in type An and in unpublished work of Dyer ([19]) for Artin-Tits groups attached to arbitrary (not necessarily finite) Coxeter groups. They may be defined in spherical types as the braids of the form xy −1 where x and y are simple braids for the classical Garside structure. The images of such braids in the Iwahori-Hecke algebra turn out to have positive KazhdanLusztig expansions; this is shown by Dyer-Lehrer ([20]) for finite Weyl groups using perverse sheaves and by Dyer ([18]) for arbitrary finite Coxeter groups using Soergel bimodules. These braids are closely related to the so-called mixed braid relations introduced by Dyer ([19]). We give uniform Garside-theoretic characterizations of the rational permutation braids in the spherical case in Proposition 4.3, and then turn to a case-by-case analysis in types An (Section 5) and Bn (Section 6) to characterize them in terms of geometrical braids (Propositions 5.7 and 6.2). In these cases, they turn out to be what we call the Mikado braids, that is, the braids where one can inductively remove a strand which is above all the other strands. With this geometric characterization, we can show that all the simple dual braids, for any choice of Coxeter element, are rational permutation braids (Theorems 5.12 and 6.6)–the argument given here is therefore topological. We also prove the same result for dihedral groups and, by computer, for exceptional types (Theorem 7.1); we conjecture the result to also hold in type Dn (Conjecture 8.7). It follows that the simple dual braids have a positive Kazhdan-Lusztig expansion in all types except possibly type Dn (Theorem 8.6). Positivity results in the Temperley-Lieb algebra (of type An ) can also be derived (Theorem 8.16). 4 FRANÇOIS DIGNE AND THOMAS GOBET Acknowledgments. We thank Patrick Dehornoy, Matthew Dyer and Jean Michel for useful discussions. We also thank the anonymous referee for his careful reading of the manuscript and many interesting comments and remarks. 2. Classical braid monoid Starting with a finite Coxeter System (W, S), one can define the associated Artin-Tits monoid or classical braid monoid B + (W ) and for each choice of a Coxeter element c an associated dual braid monoid Bc∗ (W ) ([4]). The classical braid monoid is defined by the following presentation: B + (W ) = hS | s1 s2 . . . = s2 s1 . . . for s1 , s2 ∈ Si+ | {z } | {z } ms1 ,s2 ms1 ,s2 where S is a set in bijection s 7→ s with S and ms1 ,s2 is the order of s1 s2 in W. The monoid B + (W ) is a Garside monoid (see for instance [15, I, 2.1] for the definition), hence it satisfies the Ore conditions and embeds in its group of fractions, the braid group B(W ) of W . This group has the same presentation as B + (W ) but as a group: B(W ) = hS | s1 s2 . . . = s2 s1 . . . for s1 , s2 ∈ Si. | {z } | {z } ms1 ,s2 ms1 ,s2 The group W is a quotient of B(W ) by the normal subgroup generated by the squares of the elements of S. We denote by p : B(W ) → W this surjective morphism. It has a set-wise section obtained by lifting S-shortest expressions. We denote by W the image of this section. This set W is the set of simples of the Garside monoid B + (W ). The Garside element of B + (W ) is the lift ∆ = w0 of the longest element w0 of W . By definition of Garside monoids the left- (resp. right-) divisibility gives a lattice structure to B + (W ) which restricts to a lattice structure on W . Moreover by construction of W , the map p provides an isomorphism of lattices from W to W endowed with the Coxeter theoretic left- (resp. right-) weak order. 3. Dual braid monoids 3.1. Coxeter elements. The dual braid monoids are defined using Coxeter elements. Before defining these monoids we prove some properties of the Coxeter elements that we will need. Definition 3.1. Let (W, S) be a Coxeter system. An element c ∈ W is a standard Coxeter element of (W, S) if it is a product of the elements of S in someSorder. An element c ∈ W is a Coxeter element if there exists S ′ ⊂ T = w∈W wSw−1 such that (W, S ′ ) is a Coxeter system and c is the product of the elements of S ′ in some order, that is, c is a standard Coxeter element of (W, S ′ ). The set T is the set of reflections of (W, S). Remark 3.2. If S ′ is as above then by [9, Lemma 3.7] one has T = S ′ −1 ′ w∈W wS w . Moreover if W is finite and S is as above, then by [9, Theorem 3.10], the Coxeter systems (W, S) and (W, S ′ ) are isomorphic. In DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 5 particular, the type of (W, S) depends only on T . If (W, S) is infinite irreducible with no infinite entry in its Coxeter matrix, a stronger property holds: any S ′ such that (W, S ′ ) is a Coxeter system is conjugate to S ([24, Theorem 1]). The example of the dihedral group I2 (5) with S = {s, t} and S ′ = {s, ststs} shows that when W is finite S and S ′ need not be conjugate. Definition 3.3. Let (W, S) be a Coxeter system. (1) We write ℓS , resp. ℓT , for the length function on W with respect to S, resp. T . (2) We say that x ∈ W divides y ∈ W , written x 4T y, if ℓT (x−1 y) + ℓT (x) = ℓT (y). We write Div(y) := {x ∈ W | x 4T y} and call the elements of Div(y) the divisors of y. Note that the definitions of ℓS and ℓT use the fact that each one of the sets S and T positively generates W . Note also that, since T is invariant under conjugation, the relation ℓT (x−1 y) + ℓT (x) = ℓT (y) is equivalent to ℓT (yx−1 ) + ℓT (x) = ℓT (y): there is no need to distinguish between left- and right-divisibility. The following proposition shows how to recover all reflections from a Coxeter element when W is finite. Recall that if c is a Coxeter element in a Coxeter system of rank n, one has ℓT (c) = n (see e.g., [3, Lemma 1.2]). Proposition 3.4. Let (W, S) be a finite Coxeter system with S = {s1 , . . . , sn }. Let c = s1 s2 · · · sn . Then the set of reflections of W is given by {ck s1 s2 . . . si si−1 . . . s1 c−k | k ∈ N, 1 ≤ i ≤ n}. Proof. Let Tc be the set of the statement and T be the set of reflections of (W, S). We have Tc ⊂ T . If c is such that ℓS (ci ) = iℓS (c) for any i ≤ |T |/h, where h = 2|T |/n is the Coxeter number (the order of c), then Tc is equal to T (this is a consequence of e.g., the proof of [12, 3.9]; see also [7, Chapter V, §6 exercise 2] in the case where c is bipartite), whence the result holds in that case. We now remark that if c′ = si+1 . . . sn s1 . . . si , with 1 ≤ i ≤ n − 1 then Tc′ contains (si . . . s2 s1 )Tc (si . . . s2 s1 )−1 so has cardinality at least |Tc |, whence the result holds: indeed, since W is finite, all standard Coxeter elements of (W, S) are cyclically conjugate (that is by a sequence of conjugations like the one deriving c′ from c above): see e.g., [23, Theorem 3.1.4].  We take from [3, Section 1] the second item of the following definition. Definition 3.5. (1) A parabolic subgroup W ′ of a Coxeter system (W, S) is a subgroup generated by a conjugate S ′ of a subset of S. We shall say that (W ′ , S ′ ) is a parabolic subsystem of (W, S). (2) Let (W, S) be a Coxeter system with set of reflections T . Let x ∈ W . Then x is a parabolic Coxeter element in W if there exists a subset S ′ = {s′1 , . . . , s′n } ⊂ T such that x = s′1 · · · s′m for some m ≤ n and (W, S ′ ) is a Coxeter system. Corollary 3.6. Let (W, S) be a finite Coxeter system and let x ∈ W . The following are equivalent: (1) There exists a Coxeter element c ∈ W such that x 4T c. 6 FRANÇOIS DIGNE AND THOMAS GOBET (2) The element x is a parabolic Coxeter element. Proof. Assume that x4T c for some Coxeter element c. Let S ′ = {s1 , . . . , sn } be a simple Coxeter system of (W, S) such that c = s1 . . . sn and let T be the set of reflections of W . We argue by reverse induction on ℓT (x). First assume that ℓT (x) = n−1, so that there exists a decomposition of c into a product of n reflections c = t1 . . . tn such that x = t2 . . . tn . By the above proposition we k have t1 = c s1 ...si si+1 for some k ∈ N and some 1 ≤ i ≤ n − 1, where for two elements a and b in a group, we write ab for aba−1 . Let y = si . . . s1 c−k ; we have y c = si+1 . . . sn s1 . . . si and yt1 = si+1 . Then yx = si+2 . . . sn s1 . . . si is a standard Coxeter element in the standard parabolic subgroup W1 generated by S1 = {s1 , . . . , si , si+2 , . . . sn }) so that x is a standard Coxeter element in −1 the parabolic subsystem y (W1 , S1 ). Since a conjugate of a simple system is again a simple system, we deduce that x is a parabolic Coxeter element. Now the reflections of a parabolic subgroup are precisely the reflections of W which lie in this subgroup, so that the induction can go on: a divisor of x in W is in the parabolic subsystem of which x is a standard Coxeter element. The converse is immediate.  Remark 3.7. In his case, that is for finite Coxeter groups, Bessis gives [4, Section 1.4] an alternative definition of parabolic Coxeter elements and shows [4, Lemma 1.4.3] that an element x of W is a parabolic Coxeter element in his sense if and only if there exists a bipartite Coxeter element c such that x 4T c. Since in finite Coxeter groups any Coxeter element is conjugate to a bipartite one, one can drop the word bipartite from this definition. This last fact and the above lemma show that Bessis approach and the one of [3], that is of Definition 3.5 (2), actually lead to equivalent definitions for finite Coxeter groups; this equivalence is not obvious if we compare the definitions from Bessis and [3]. 3.2. Dual braid monoids. The dual braid monoids are defined as follows: let (W, S) be a Coxeter system and let T denote the set of reflections of (W, S). Let c be a standard Coxeter element. The dual braid monoid Bc∗ associated to c is defined by generators and relations as follows. Let D c be a set in one-to-one correspondence with the set Div(c) of divisors of c. Then Bc∗ (W ) is generated by Dc with only relations xy = z for x, y, z in D c such that xy = z ∈ Div(c) and ℓT (z) = ℓT (x) + ℓT (y), where x, y, z ∈ Div(c) are the elements corresponding to x, y, z respectively. The canonical bijection D c → Div(c) extends to a (surjective) morphism of monoids from Bc∗ (W ) to W . The above definition is valid for any Coxeter system but in the sequel we study only dual braid monoids associated to finite Coxeter groups. In the spherical case the monoid Bc∗ (W ) is a Garside monoid with D c as its set of simples. In this case the monoid Bc∗ (W ) has a presentation with a generating set smaller than D c : first it can be shown that any reflection divides c (see [4, Lemma 1.3.3]); if we denote by T c the lift of T in D c ⊂ Bc∗ (W ) we have Proposition 3.8 ([4], Theorem 2.1.4). In the spherical case the dual braid monoid has the following presentation: Bc∗ (W ) = hT c | t1 t2 = t2 t3 for t1 , t2 , t3 in T c with t1 t2 = t2 t3 4T ci+ . DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 7 The relations in the above presentation of Bc∗ (W ) are called the dual braid relations. Proof. We recall the proof. To this end, we need to recall a few facts on the Hurwitz action on sets of T -reduced decompositions of elements. 3.3. Hurwitz action on reduced decompositions. We write Bn for the Artin braid group on n strands, that is, the Artin-Tits group B(W ) where W is of type An−1 . Definition 3.9 (Hurwitz action). Let G be a group and g be in G; the braid group Bn acts on the set of n-tuples of elements of G whose product is equal to g as follows: if σ1 , . . . , σn−1 are the generators of the braid group Bn , the Hurwitz action of σi maps a sequence (t1 , . . . , tn ) such that g = t1 t2 . . . tn to the sequence (t1 , . . . , ti−1 , ti ti+1 t−1 i , ti , ti+2 , . . . , tn ). When considering the Hurwitz action, we will always denote the generators of Bn by σ1 , . . . , σn−1 . Otherwise we write the generators of B(W ) for W of type An−1 as s1 , . . . , sn−1 . In the case of reduced factorizations of a Coxeter element into reflections we have: Theorem 3.10 ([3], Theorem 1.3). Let (W, S) be a (not necessarily finite) Coxeter system with T its set of reflections. If x is a parabolic Coxeter element in W , then the Hurwitz action is transitive on the set of decompositions of x into a product of ℓT (x) reflections. Note that for finite Coxeter groups, the assumption that x is a parabolic Coxeter element can be replaced by x 4T c for some Coxeter element c of (W, S) thanks to Corollary 3.6. Let c be a standard Coxeter element in a Coxeter system (W, S) of rank n. By definition of Bc∗ , any decomposition c = t1 . . . tn into a product of n reflections is lifted in Bc∗ (W ) to c = t1 . . . tn where c is the lift of c in Dc . Hence if x divides c, writing x = t1 . . . tℓT (x) with ti ∈ T and c = t1 . . . tn , we see that the lift of x is a product of ℓT (x) elements of T c , so that T c generates Bc∗ (W ). Moreover by Theorem 3.10 and Corollary 3.6 one can pass from any decomposition of x ∈ D c to any other one by dual braid relations. This gives Proposition 3.8.  3.4. Groups of fractions of dual braid monoids are Artin-Tits groups. The following is proved in [4]: Proposition 3.11. The group of fractions of Bc∗ (W ) is isomorphic to B(W) and the restriction of the projection p : B(W ) → W is the canonical surjection of the dual braid monoid onto W . We explain how this isomorphism is defined and sketch a proof that it is an isomorphism. Sketch of proof. Let us enumerate the elements s1 , . . . , sn of S in such a way that c = s1 . . . sn . We have S ⊂ T and an easy computation using the dual braid relations shows that the lift S ′ of S in T c ⊂ Bc∗ (W ) satisfies the braid relations. This gives a morphism of monoids B + (W ) → Bc∗ (W ) mapping si to s′i where s′i is the lift of si in S ′ . This extends to a group morphism from B(W ) to the group of fractions of Bc∗ (W ). 8 FRANÇOIS DIGNE AND THOMAS GOBET Since c = s1 . . . sn , whence c = s′1 . . . s′n , Theorem 3.10 implies that all elements of T c can be obtained from S ′ using dual braid relations, so that S ′ generates the group of fractions of Bc∗ (W ), hence the above morphism from B(W ) to this group is surjective. To show that it is injective one first considers the particular case of a Coxeter element c which is bipartite, that is, such that either for m = ⌊n/2⌋ or for m = ⌊(n + 1)/2⌋ the elements s1 , s2 , . . . , sm pairwise commute and so do sm+1 , . . . , sn . Bessis [4] proves that in this case the set ∪k∈Z ck Sc−k is a lift in B(W ) of T and that its elements satisfy the dual braid relations (this last fact by a case by case analysis, see [4, Fact 2.2.4]). Hence we get a morphism in the other direction such that the composition from B(W ) to itself is the identity (since it is the identity on S). To get the result for an arbitrary standard Coxeter element, one can use the fact that the lifts in B + (W ) of all Coxeter elements of a given Coxeter system are conjugate in B(W ) (see [7, Chapter V, §6 Lemme 1]) and that the Hurwitz action commutes with conjugation.  We will now identify Bc∗ (W ) with its image in B(W ) and S ′ with S. We then see T c as a subset of B(W ). Using this identification, we note that, by the above proof, the lift of the Coxeter element c = s1 . . . sn in Bc∗ (W ) is the same as its lift to the classical braid monoid, that is c = s1 . . . sn ∈ W . Theorem 3.10 implies: Corollary 3.12. The set of decompositions of c into a product of rank(W ) elements of T c in B(W ) is a single orbit under the Hurwitz action and the restriction of π : B(W ) → W to T c induces a bijection from this Hurwitz orbit to the set of decompositions of c into rank(W ) reflections. We recall the proof for sake of completeness. Proof. Let Decn (c) (resp. Decn (c)) be the set of decomposition of c (resp. c) into n reflections (resp. into n elements of T c ) where n = rank(W ). The morphism π bijectively maps T c to T , hence maps Decn (c) to Decn (c). By definition of Bc∗ (W ) a decomposition (t1 , . . . , tn ) ∈ Decn (c) is lifted in B(W ) to (t1 , . . . , tn ) ∈ Decn (c). Hence π induces a bijection from Decn (c) to Decn (c). By the dual braid relations, the Hurwitz action in B(W ) preserves Decn (c). Since π is compatible with the Hurwitz action and by Theorem 3.10 Decn (c) is a single orbit, we get the result.  A question is then to understand which elements of B(W ) correspond to the subset D c of Bc∗ (W ) through the embedding of Bc∗ (W ) into B(W ). This may be of interest for both computational reasons and for a possible case-free proof of Proposition 3.11. We will address this question in Sections 5 and 6 when W is of type An or Bn . In the case of reflections the following subsection gives an answer. 3.5. A formula for dual atoms. The following proposition is the analog for the braid monoid of Proposition 3.4 and the proof is parallel. DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 9 Proposition 3.13. Let c = s1 . . . sn be a standard Coxeter element, then, through the embedding of Bc∗ (W ) into B(W ), we have −1 −1 T c = {s1 s2 . . . si si+1 s−1 i si−1 . . . s1 , | 0 ≤ i < 2|T |}, where the index i in si is taken modulo n. −1 −1 Proof. Let T ′c be the set of elements s1 s2 . . . si si+1 s−1 i si−1 . . . s1 with i ≥ 0. ′ The elements of T c are components of the elements of the Hurwitz orbit of (s1 , . . . , sn ): this is clear if i ≤ n and the elements with i > n are conjugates from the previous ones by a power of c. Hence by Corollary 3.12 we have T ′c ⊂ T c . Since by definition |T c | = |T |, for proving T c = T ′c it is sufficient to prove |T ′c | ≥ |T |. If c is a Coxeter element such that ℓS (ci ) = iℓS (c) for any i ≤ |T |/h, where h = 2|T |/n is the Coxeter number (the order of c), e.g., if c is bipartite, then the image in W of T ′c is the full set T of reflections of W as seen in the proof of Proposition 3.4, so that the result holds in that case. We now remark that if c = s1 . . . sn and c′ = si . . . sn s1 . . . si−1 then T ′c′ contains (si . . . sn )T ′c (si . . . sn )−1 so has cardinality at least |T ′c |, whence the result holds, using the fact that all standard Coxeter elements of a given Coxeter system are cyclically conjugate. By [7, Chapter V, §6 exercise 2] if c is bipartite, we have ch = w20 , where w0 is the lift in B + (W ) of the longest element of W . Since w 20 is central in B(W ), one gets the same set T ′c of −1 −1 elements s1 s2 . . . si si+1 s−1  i si−1 . . . s1 for 0 ≤ i < 2|T | as for i ∈ N. 4. Rational permutation braids 4.1. Square-free braids. Let (W, S) be a finite Coxeter system. Recall that we denote by p : B(W ) → W the canonical surjection. Definition 4.1. An element β ∈ B(W ) is a square-free braid if it can be represented by a braid word sεi11 · · · sεikk with εj ∈ {−1, 1} such that k = ℓS (p(β)). We denote by B(W )per ⊂ B(W ) the set of square-free braids. One has W = B + (W ) ∩ B(W )per which is also the set of prefixes of the Garside element ∆ (see [16, Example 1]). It follows from the definition that any square-free braid is obtained by replacing the various sij for j = 1, . . . , k in a reduced S-decomposition si1 · · · sik of an element w ∈ W by s±1 ij . 4.2. Rational permutation braids. As any group of fractions of a cancellative monoid B(W ) is endowed with a left-invariant partial order that we denote by 4 defined by u 4 v if u−1 v ∈ B + (W ) which extends the leftdivisibility relation on B + (W ). Definition 4.2. An element β ∈ B(W ) is a rational permutation braid if it lies in the interval [∆−1 , ∆] for the partial order 4. The following proposition can be seen as a particular case of [14, Proposition 5.3]. It explains the terminology as the elements of W are usually called permutation braids. Proposition 4.3. Let β ∈ B(W ). The following are equivalent: 10 FRANÇOIS DIGNE AND THOMAS GOBET (1) The braid β is a rational permutation braid, (2) There exist x, y ∈ W such that β = x−1 y, (3) There exist x, y ∈ W such that β = xy −1 . Proof. We prove the equivalence of (1) and (2). The equivalence of (1) and (3) is similar. Since B + (W ) satisfies the Ore conditions, any element of B(W ) can be uniquely written as x−1 y with x and y in B + (W ) having no common leftdivisor. We have ∆−1 4 x−1 y 4 ∆ if and only if x−1 y = ∆−1 a = ∆b−1 with a, b in B + (W ). So (1) implies that a is a divisor of ∆2 which by the general properties of Garside monoids (see [15, V, Proposition 3.24]) means that −1 a = a1 a2 with a1 , a2 ∈ W , whence x−1 y = (a−1 1 ∆) a2 . The Ore conditions imply then that x and y are right-divisors of respectively a−1 1 ∆ and a2 in B + (W ), so that x and y are in W . Conversely, if x and y are in W , that is divide ∆, then x−1 y 4 x−1 ∆ 4 ∆ and ∆−1 4 ∆−1 y 4 x−1 y.  We thank Matthew Dyer for having pointed to us the property stated in the following lemma which is a particular case of [19, Section 9.4]. We reprove it here in our particular case. Lemma 4.4. If β is a rational permutation braid and if s1 s2 · · · sk is any reduced expression of its image in W , then for i = 1, . . . , k there exists εi = ±1 such that β = sε11 s2ε2 · · · sεkk . In particular, any rational permutation braid is a square-free braid. Proof. We prove by induction on k that if s1 s2 . . . sk is a reduced decomposition of an element of W , then for y ∈ W the element sε11 . . . sεkk y, where εi = 1 if ℓS (si si+1 . . . sk y) = ℓS (si+1 . . . sk y) + 1 and εi = −1 otherwise is in W . This concludes the proof, since if β = xy −1 is a rational permutation braid with x and y in W and if s1 . . . sk is a reduced decomposition of the image of β in W , then sε11 . . . sεkk y is in W and has same image as x, hence is equal to x, so that β = xy −1 = sε11 . . . sεkk is a square-free braid. By induction hypothesis x′ = sε21 . . . sεkk y is in W . If ε1 = 1 then s1 x′ is in W . If ε1 = −1 then, by the exchange lemma, x′ has a reduced expression  of the form s1 s′2 . . . s′m so that sε11 x′ = s′2 . . . s′m is again in W . Example 4.5. Let W be of type A2 , with simple generating reflections s1 and s2 ; the element w := s1 s2 s1 in W has exactly two reduced expressions s1 s2 s1 = s2 s1 s2 . There are six square-free braids having w as image. For example, β = s−1 1 s2 s1 . Here the reduced expression s1 s2 s1 has been lifted to the braid word s−1 1 s2 s1 ; Lemma 4.4 says that we can lift any reduced expression, in particular we can also lift the reduced expression s2 s1 s2 of w in which case one has β = s2 s1 s−1 2 . Remark 4.6. Note that the set of rational permutation braids is the set of braids where "one can apply (mixed) braid relations in reduced words as in the Coxeter group". Let us be more precise: if β is a rational permutation braid, then one can pass from any shortest expression of β with respect to S∪ S −1 to any other one by mixed braid relations as defined in [19], that is, braid relations possibly involving inverses. Moreover, to any reduced expression of the image of β corresponds a shortest braid word for β. Precisely given any two reduced expressions of the image of a braid β in W which differ by DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 11 a braid relation, then by Lemma 4.4 both reduced expressions can be lifted to reduced braid words for β which differ by a mixed braid relation. For example the relation s1−1 s2 s1 = s2 s1 s−1 2 in Example 4.5 is a mixed braid relation. 5. Mikado braids of type An In this section (W, S) is a Coxeter system of type An . The group W is identified with the symmetric group Sn+1 on {1, 2 . . . , n + 1} and S with the set of simple transpositions, writing si := (i, i + 1). The Artin-Tits group B(W ) is identified with Bn+1 . 5.1. Square-free braids. We give some geometrical properties of squarefree braids of type An . Firstly, notice that β ∈ Bn+1 is a square-free braid if and only if there is a braid diagram for β where any two strands cross at most once. We call a braid diagram reduced if it has the minimal number of crossings. Lemma 5.1. Removing any strand in a diagram of a square-free braid β ∈ Bn+1 gives a diagram for a square-free braid β ′ ∈ Bn . Proof. Let D be a diagram for β and D ′ be the diagram obtained by removing a given strand. Since β is a square-free braid, there is an isotopy which allows e where any two strands cross at most one to pass from D to a diagram D once. If we forget the strand we want to remove, our isotopy deforms D ′ in e ′ obtained from D e by removing the strand, and in D e ′ any two a diagram D strands among the remaining n strands cross each other at most once since e they were crossing each other at most once in D.  5.2. Mikado braids. Definition 5.2. A strand of a given reduced diagram D of a braid β ∈ Bn+1 which is over the other strands it crosses is called good. per Remark 5.3. A strand is good in a reduced diagram for a braid β ∈ Bn+1 if and only if it is good in any reduced diagram for β: indeed, we first claim that the number of crossing between any two strands is constant on the set of reduced diagrams of a square-free braid. To see this, notice that this property holds for the reduced diagrams of the permutation obtained as image of β in the symmetric group, and that the reduced diagrams for the various square-free braids having this permutation as image are obtained by replacing the crossings in the permutation diagrams by positive or negative crossings. Hence the claim holds. Now since β is a square-free braid, any two strands cross at most once, and obviously one cannot continuously deform a positive crossing in a negative one. Hence the number and type of crossing between any two strands is constant on the set of reduced diagrams for β. It follows that a strand which is above all the other in some reduced diagram must be above all the others in all the reduced diagrams. Definition 5.4. We define Mikado braids recursively as (1) The braid e is a Mikado braid in B1 . 12 FRANÇOIS DIGNE AND THOMAS GOBET (2) A braid β ∈ Bn+1 is a Mikado braid if in any reduced diagram for β, there exists at least one good strand and if removing any such strand yields a Mikado braid in Bn . Mik the set of Mikado braids. An example of a Mikado We denote by Bn+1 braid in B7 is given in Figure 1. Remark 5.5. Notice that Definition 5.4 is equivalent to the definition of an f -realizable braid from [14, Section 2]. b b b b b b b b b b b b b b Figure 1. A mikado braid in B7 . per Remark 5.6. If β ∈ Bn+1 with good ith strand such that removing it yields Mik (i.e., we can assume that the inductive ′ Mik a braid β ∈ Bn , then β ∈ Bn+1 condition in point (2) of Definition 5.4 is true for one strand instead of any strand). We prove it by induction on rank: indeed, assume that β has another good j th strand. We must show that βe ∈ Bn obtained by removing the j th strand is in BnMik . The ith and j th strand do not cross. The j th strand of β may have become the (j − 1)th strand of β ′ but it is still good. Mik . But β ′′ is also In particular, we can remove it, yielding a braid β ′′ ∈ Bn−1 obtained from βe by removing the strand corresponding to the ith strand in e hence by induction βe ∈ B Mik β (which may be the (i − 1)th strand of β), n Mik is. since β ′′ ∈ Bn−1 Proposition 5.7. Let β ∈ Bn+1 . Then β is a Mikado braid if and only if β = x−1 y for some x, y ∈ W , hence by Proposition 4.3 if and only if β a rational permutation braid. Proof. First, assume that β is a rational permutation braid. We argue by induction on n. The trivial braid e has the claimed form. Now assume Mik and consider any reduced braid diagram for it. Then there exists β ∈ Bn+1 at least one good strand. Removing the rightmost such strand we get a braid β ′ ∈ BnMik which by induction can be written as x′−1 y ′ for x′ , y ′ ∈ W ′ , where W ′ = hs1 , . . . , sn−1 i. Assuming that the strand removed joins the ith point of the sequence above to the j th point of the sequence below, one then has −1 −1 ′−1 y ′ s s ′ that β = s−1 n n−1 . . . sj (see Figure 2), where x and i si+1 . . . sn x y ′ are seen in Bn+1 under the embedding ιn : Bn ֒→ Bn+1 . But for any k, the parabolic Coxeter element sn sn−1 . . . sk is left-reduced with respect to W ′ . In particular for k = i, j, it implies that both y ′ sn sn−1 . . . sj and x′ sn sn−1 . . . si lie in W . DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY b b b b b b b b b b b b b b b b b 13 b −1 −1 s−1 i si+1 · · · sn β′ b b b b b b b b b b b b b b ι(β ′ ) b b b b sn sn−1 · · · sj Figure 2. Illustration of the inductive process used in the proof of Proposition 5.7. Conversely, assume that β = x−1 y with x, y ∈ W . Note that in a reduced braid diagram for a (positive) permutation braid, i.e., an element of W , for all i the ith strand is above the stands numbered 1 to i − 1. Hence in x−1 the strand which ends at position n + 1 is above all the others, the one ending at position n is just below, and so on. It implies that when concatenating reduced diagrams for x−1 and y, in the resulting diagram, the (n + 1)th strand of y is above all the others, the nth strand of y is just below, and so on. Hence the Mikado property is satisfied, so that β is a Mikado braid.  This gives in particular a non-inductive algebraic characterization of rational permutation braids. To summarize, putting Propositions 4.3, 5.7 and Remark 5.5 together we get: Theorem 5.8. Let β ∈ Bn+1 . The following are equivalent: (1) (2) (3) (4) (5) The braid β is a Mikado braid. The braid β is a rational permutation braid. There exist x, y ∈ W such that β = x−1 y. There exist x, y ∈ W such that β = xy −1 . The braid β is f -realizable in the sense of [14]. Remark 5.9. If one is interested in enumerative combinatorics, it is natural to ask for the number Mik(n) of Mikado braids in Bn . Using Theorem 5.8, we see that counting Mikado braids is equivalent to counting pairs of permutations (x, y) ∈ Sn × Sn with no common left descents. Indeed, there may be distinct pairs (x, y) and (x′ , y ′ ) ∈ W ×W such that x−1 y = x′−1 y ′ , but taking x and y with no common left divisor in B(W )+ gives unicity. These pairs have been counted in [13] and correspond to the coefficients of a power series given by a Bessel function. The first values are Mik(1) = 1, Mik(2) = 3, Mik(3) = 19, Mik(4) = 211, . . . . There does not seem to exist a simple closed formula for Mik(n). 5.3. Simple dual braids are Mikado braids. The aim of this Section is to show that the images in Bn+1 of the simple elements of a dual braid monoid Bc∗ , where c is a standard Coxeter element, are Mikado braids. To this end we first describe a model for the group of fractions of Bc∗ using braids in a cylinder and then explain how the embedding of Bc∗ into the Artin braid group Bn+1 can be viewed using this model. 14 FRANÇOIS DIGNE AND THOMAS GOBET 5.3.1. Noncrossing partitions. Given a standard Coxeter element c, we graphically describe the elements of Div(c) as follows. The Coxeter elements in W are exactly the (n+1)-cycles; a Coxeter element c is standard if and only if it is an (n+1)-cycle c = (i1 , i2 , . . . , ik , . . . in+1 ) with i1 = 1, ik = n+1, with the property that the sequence i1 i2 · · · ik increasing and the sequence ik · · · in in+1 decreasing (see [27, Lemma 8.2]). To represent the elements of Div(c) we use n + 1 points labeled by i1 , i2 , . . . , ik , . . . in+1 in clockwise order on a circle. Like in the case where c = s1 s2 · · · sn , the elements of Div(c) can be represented as a union of polygons having vertices the marked points as follows: to each cycle occurring in the decomposition of x ∈ Div(c) into a product of disjoint cycles, one associates the polygon obtained as convex hull of the set of points on the circle labeled by the elements in the support of the cycle (in particular a polygon can be reduced to an edge or even a single point). Such a polygon with vertices labelled (i1 , i2 , . . . , ik ) in clockwise order corresponds to the cycle (i1 , i2 , . . . , ik ) which is the unique cycle dividing c with set of vertices {i1 , . . . , ik }. The polygons obtained are pairwise disjoint; equivalently the partition defined by the cycle decomposition of x is noncrossing for this choice of labeling of the circle depending on c. To emphasize that the property to be a noncrossing partition depends on the labeling we will speak of a noncrossing partition of the sequence (i1 , i2 , . . . , ik , . . . in+1 ). So we have defined a bijection between Div(c) and the set of noncrossing partitions of the sequence (i1 , i2 , . . . , ik , . . . in+1 ). It will be convenient for the proofs to draw the point with label 1 at the top of the circle, the point with label n + 1 at the bottom, the points with label in ik · · · in in+1 on the left and the points with label in i1 i2 · · · ik on the right, each point having a specific height depending on its label: that is, if P , Q are two points with respective labels i, j ∈ {1, . . . , n + 1}, i < j, then P is higher than Q. An example is given in Figure 3. In case we represent a noncrossing partition we may use curvilinear polygons instead or regular polygons for a more comfortable reading (see Figure 6 on the left). 1 b 1 b 3 b 2 b 2 b b 5 3 b 4 5 b b b 4 bb 6 b 6 Figure 3. Example of a labeling of the vertices given by the standard Coxeter element c = s2 s1 s3 s5 s4 = (1, 3, 4, 6, 5, 2). 5.3.2. Dual braids and graphical representation. We follow in this part [5], in particular loc. cit. Section 1 and Corollary 3.5, and refer to it for the results. Definition 5.10. A dual braid is an element of the group of fractions of Bc∗ . A simple dual braid is a dual braid which is a simple element of Bc∗ ⊂ Frac(Bc∗ ) as described in Section 3.2. DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 15 To describe the simple dual braids we consider braids where the starting points and the ending points of the strands are on two parallel circles. The points of the two circles are labeled as in Section 5.3.1. More precisely, we consider one unit circle in a plane with one complex coordinate at level t = 0 and a second unit circle in another such plane at level t = 1. So the starting points of the strands have coordinates (zk , 0)k=1,...,n+1 with |zk | = 1, and the ending points have coordinates (zk , 1). The Coxeter element is c = (i1 , . . . , in+1 ) as in Section 5.3.1, when along the circle in clockwise order starting from (zi1 , 0) the startpoints of the strands appear in the order (zi1 , 0), (zi2 , 0), . . . , (zin+1 , 0), and the same for the endpoints, replacing the second coordinate by 1. For each pair {i, j} one lifts the reflection (i, j) to the braid δi,j where the strands starting with (zk , 0) for k 6= i, j has fixed first coordinate and the strands starting with zi (resp. zj ) is represented by the path t 7→ (t, (zi + zj )/2 + (zi − zj )/2(cos(πt) + iε sin(πt)) (resp. same with i and j exchanged) where ε is small enough (see Figure 4). We draw the figures with the level t = 0 above and the level t = 1 below. i j i j Figure 4. Braid diagram for the dual braid δi,j . These braids statisfy the relations in the dual presentation of Proposition 3.8 for the braid group Bn+1 , that is δi,j δj,k = δj,k δk,i when zi , zj , zk are in clockwise order and δi,j δk,l = δk,l δi,j when i, j, k, l are 4 distinct points with [i, j] and [k, l] noncrossing (these are exactely the cases where the product of two reflections divide the Coxeter element). The simple dual braids are in one-to-one correspondence with the noncrossing partitions of the sequence (i1 , . . . , in+1 ) as described in Section 5.3.1. The braid diagram associated to a simple dual braid represented by a polygon (zj1 , . . . , zjk ) where the points are in clockwise ordering is the product δj1 ,j2 δj2 ,j3 . . . δjk−1 ,jk . In the resulting braid diagram the strand starting with (zjm , 0) ends with (zjm−1 , 1) for 1 < m ≤ k while the strand starting with (zj1 , 0) ends with (zjk , 1). (see Figure 5). If the Coxeter element is standard the dual braids δi,i+1 satisfy the usual braid relations and the identification of the group of fractions of the dual braid monoid with the braid group Bn+1 maps δi,i+1 to σi . Graphically to 16 FRANÇOIS DIGNE AND THOMAS GOBET Figure 5. The braid associated to a quadrangle. recover the usual braid diagram of the image in Bn+1 of a simple dual braid β, one has to put the points zi1 , . . . zin+1 on the circle in such a way that the imaginary parts are in decreasing order and “look from the right” to the braid. This gives a diagram for an Artin braid, which is a horizontal mirror diagram of a diagram for the image in Bn+1 of β. Equivalently starting from the noncrossing partition representation of β, one orders the polygons in counterclockwise order and then projects everything to the right; this gives the braid seen from the bottom (see Figure 6). The point in this description of the embedding which will be crucial later and follows from our graphical descriptions of the embedding above is that if a polygon in the noncrossing partition representation of β has no polygon at its right (we assume that an edge and a single point are polygons), then the strands from this polygon are above all the strands coming from other polygons in the classical Artin braid representation of the image of β, as one can see in Figure 6 with the polygon reduced to the edge labeled by 4: on the very right, the strand labeled by 4 appears above all the other strands. Remark 5.11. Note that the point where the Coxeter element needs to be standard is the identification of δi,i+1 with σi . If the Coxeter element is not standard the braids δi,i+1 do not satisfy the braid relations. 1 b 2 b b 3 b b 4 b 5 b 6 b b b b b b b b b b b b b b b b b 1 2 3 4 5 6 Figure 6. Passing from a dual to a classical braid. DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 17 5.3.3. Removing the strands of simple dual braids. The aim here is to use the graphical representation of simple elements from the previous section to show that simple elements of dual braid monoids are rational permutation braids. The argumentation is therefore topological. Any u ∈ D c always has at least one polygon. The polygons of the graphical representation correspond to the cycles (or blocks) of the corresponding permutation (or noncrossing partition). Consider any block represented by either a polygon or a point which we denote by P and which is right to any other polygon or point, that is, with no other block at its right in the picture (with our conventions described above). It always exists, since the polygons are disjoint and with vertices on the circle. One can then inductively remove all the strands corresponding to edges of P one after the other such that the removed strand at each step is good, starting with any strand having no other strand from P at its right (it always exists and one can keep going inductively since P is a polygon): such a strand is necessarily good. After having removed it one can find a strand which is good at this step, and so on. After having removed all the strands from P , we go on with another polygon Q which is right to all the remaining polygons, and so on, until all the strands have been removed. Hence we showed: Theorem 5.12. Let c be a Coxeter element in a Coxeter group (W, S) of type An . Any element of Dc ⊂ Bc∗ ⊂ B(W ) is a Mikado braid, and thus a rational permutation braid. 5.3.4. Additional properties in case the Coxeter element is linear. We denote by < the Bruhat order on W . In the next proposition, we show that in case c = s1 s2 · · · sn , one can always remove a strand in a braid representing u ∈ D c such that the resulting braid v lies in Dc′ for c′ = s1 s2 · · · sn−1 ; this allows us to say a bit more in that case. Proposition 5.13. Let c = s1 s2 · · · sn , u ∈ D c . Then u 6= e can be written in the form x−1 y with x, y ∈ W and p(x) < p(y). Proof. We argue by induction on the rank. We prove the statement with the inequality < replaced by ≤. It is then clear that the inequality is an equality if and only if u = e. The result is trivially true for n = 1. Assume n > 1. With our choice of Coxeter element, all indices lie on the right part of the circle. If there is a block of u reduced to a single index i, then the ith strand of u must be unbraided, and moreover since all the points lie on the right of the circle, the ith strand lies over all the other strands. We then argue as in the proof of Proposition 5.7; that is, one has u = −1 ′ −1 ′ s−1 i si+1 . . . sn u sn sn−1 . . . si where u ∈ Bn is the braid obtained from u by removing the ith strand. But u′ is then in D c′ , where c′ = s1 · · · sn−1 : indeed, it is graphically obtained from the noncrossing representation of u by removing the point with label i and subtracting 1 from each label larger than i, still yielding a diagram of a simple element u′ for the smaller linear Coxeter element c′ . By induction u′ = x′−1 y ′ with p(x′ ) < p(y ′ ). Since sn · · · si is left-reduced with respect to the parabolic subgroup hs1 , . . . , sn−1 i we get that p(x′ sn · · · si ) < p(y ′ sn · · · si ), hence we have the claimed property with x = x′ sn · · · si , y = y ′ sn · · · si . 18 FRANÇOIS DIGNE AND THOMAS GOBET Hence we can assume that there is no unbraided strand. But in that case, since the Coxeter element is linear, there must be a polygon in the graphical representation of u having an edge (i − 1, i), that is an ith strand ending at i − 1 which is over all the other strands that it crosses. We argue as above, −1 ′ −1 ′ writing this time u = s−1 i si+1 . . . sn u sn sn−1 . . . si−1 . The element u is the simple element for c′ obtained by contracting the edge (i − 1, i), hence also identifying the points with labels i and i − 1 and subtracting 1 from any point with label bigger than i. Arguing as above we get the claim.  6. Mikado braids of type Bn 6.1. Coxeter and Artin-Tits groups of type Bn . The Coxeter group W of type Bn is the group of fixed points in the Coxeter group W ′ of type A2n−1 under the diagram automorphism τ which exchanges si and s2n−i . This fact lifts to the corresponding Artin-Tits groups (see e.g., [33, Corollary 4.4]). So we shall see the Artin-Tits group B(W ) of type Bn as the group of fixed points in the Artin-Tits group of type A2n−1 under the diagram automorphism which we still denote by τ , that is, B(W ′ )τ = B(W ). Topologically this means that the Artin-Tits group B(W ) can be seen as the group of symmetric braids in B2n (the symmetry exchanges the ith and the (2n + 1 − i)th strands and exchanges under-/over-crossings). B for the braids of type B identified with B τ . For conveWe write B2n n 2n B consists of symmetric braids, we label the strands of B nience, since B2n 2n by −n, −n+1, . . . , −1, 1, . . . , n rather than by 1, 2, . . . , 2n. We write t0 , . . . , tn−1 for the Coxeter generators of W with relations t0 t1 t0 t1 = t1 t0 t1 t0 , ti ti+1 ti = ti+1 ti ti+1 if 1 ≤ i ≤ n − 2, ti tj = tj ti if |i − j| > 1. ′ Inside W one has t0 = sn and ti = si s2n−i for i = 1, . . . , n − 1, where s1 = (−n, −n + 1), s2 = (−n + 1, −n + 2), . . . , sn = (−1, 1), sn+1 = (1, 2), . . . , s2n−1 = (n − 1, n) in S2n seen as the group of permutations of {−n, . . . , −1, 1, . . . , n}. This lifts to the braid groups: the generators of B(W ) seen in B2n are t0 = sn and ti = si s2n−i for i = 1, . . . , n − 1. 6.2. Mikado braids of type Bn . B is a Mikado braid (of type B ) if when Definition 6.1. A braid β ∈ B2n n viewed in B2n , starting from any diagram D for β one can inductively remove pairs of symmetric strands, one being above all the other strands (so that its symmetric is under all the other strands). B,Mik We write B2n for the set of Mikado braids of type Bn . It follows from B,Mik B ∩ B Mik . Hence we can use the geometric the definition that B2n = B2n 2n properties of Mikado braids of type An given in Section 5.2. B ; then β is a Mikado braid of type B if and Proposition 6.2. Let β ∈ B2n n −1 only if β = x y for some x, y ∈ W , hence by Proposition 4.3 if and only if β a rational permutation braid. Note that here W refers to the lift of the Coxeter group W of type Bn in the braid group of type Bn . DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 19 B,Mik Proof. A braid β ∈ B2n is in B2n if and only if it is a Mikado braid in B2n and it is fixed by τ . By Proposition 5.7, this is equivalent to β being of the form x−1 y with x and y in W ′ and β fixed by τ . Since there are gcds in Artin-Tits monoids of spherical type, the expression x−1 y is unique under the condition that x and y have no common left-divisor (in the Artin-Tits monoid of type A2n−1 ). Since τ induces an automorphism of the monoid, if x and y satisfy the unicity condition, then x−1 y is τ -fixed if and only if each one of x and y is τ -fixed, that is, is in W ′τ = W .  This gives in particular a non-inductive algebraic characterization of rational permutation braids of type Bn . To summarize, putting Propositions 4.3 and 6.2 together we get: B . The following are equivalent: Theorem 6.3. Let β ∈ B(W ) ∼ = B2n (1) (2) (3) (4) The braid β is a Mikado braid. The braid β is a rational permutation braid. There exist x, y ∈ W such that β = x−1 y. There exist x, y ∈ W such that β = xy −1 . Problem 6.4. What is the number of Mikado braids of type Bn ? Unlike in type An (see Remark 5.9), we have no hint towards an answer to this question. 6.3. Simple dual braids are Mikado braids. 6.3.1. Graphical representation of simple elements. Through the embbeding W = W ′τ ⊂ W ′ , the standard Coxeter elements of W identify with the τ -fixed standard Coxeter elements of W ′ . Moreover if T ′ denotes the set of reflections of W ′ and T the set of reflections of W , and if c is a τ -fixed standard Coxeter element of W ′ , then for x and y in W one has x 4T y 4T c if and only if x 4T ′ y 4T ′ c (see [10, Lemma 4.8]). Remark 6.5. Note that a reflection of W is not a reflection of W ′ in general. Since the dual braid monoid of type A2n−1 is defined by a presentation with generators the left-divisors of the chosen Coxeter element c and with relations given by ℓT ′ -shortest decompositions of c, the above observations imply that the dual braid monoid of type Bn identifies with the fixed points of τ in the dual braid monoid of type A2n−1 for the same Coxeter element. The τ -fixed standard Coxeter elements of W ′ are the 2n-cycles of the form c = (i1 , i2 , . . . , in , −i1 , −i2 , . . . , −in ) with {i1 , i2 , . . . , in } = {1, 2, . . . , n} and the sequence i1 i2 · · · in first increasing, then decreasing. We also get that the elements of Div(c) for a Coxeter element c ∈ W are in one-to-one correspondence with the τ -fixed noncrossing partitions of 2n points labelled −n, . . . , −1, 1, 2, . . . , n on a circle with the clockwise order on the labels in the order given by c (see Figure 7). These symmetric partitions are called noncrossing partitions of type Bn associated to c (see [35]). Such a partition corresponds to a τ -fixed braid in B2n by the same process as explained in Subsection 5.3.2. 20 FRANÇOIS DIGNE AND THOMAS GOBET −5 b −3 −4 b b −2 b b −1 1 b b 2 4 5 b b 3 b Figure 7. Example of a labeling of the vertices given by the Coxeter element c = t1 t2 t0 t4 t3 and of a noncrossing partition of type B5 for this Coxeter element. The corresponding element of Div(c) is (−5, −4, −1)(5, 4, 1)(2, 3, −2, −3). 6.3.2. Removing pairs of strands of simple dual braids. The argumentation to show inductively that any simple dual braid x ∈ D c of type Bn is a Mikado braid can be led as in type An , that is, by looking at the graphical representation of x, equivalently the number of blocks of the noncrossing partition x ∈ Div(c), and removing pairs of strands. We start from a polygon P which is to the right of any other polygon. Either P has a symmetric polygon P̄ such that j indexes a vertex of P if and only if −j indexes a vertex of P̄ ; or P is its own symmetric, in particular P has vertices on both sides of the circle and an index j indexes a vertex of P if and only if −j indexes a vertex of P . In the first case, we remove inductively pairs of strands of P , one corresponding to an edge of P and its symmetric which is an edge of P̄ as we did in type An , in such an order that at each step, the removed strand from P is above all the others (which implies that the corresponding symmetric strand which is also removed is below all the others), that is, the corresponding edge should be right to any other edge of P . In the second case, we do exactly the same, except that pairs of strands of P are removed simultaneously. After having removed all the strands from P , we go on with another polygon Q which is right to all the remaining polygons, and so on, until all the strands have been removed. Hence we showed: Theorem 6.6. Let c be a Coxeter element in a Coxeter group (W, S) of type Bn . Any element of D c ⊂ Bc∗ ⊂ B(W ) is a Mikado braid of type Bn , and thus a rational permutation braid. 7. Dihedral and exceptional types Theorem 7.1. Let c be a Coxeter element in a Coxeter system (W, S) of type H3 , H4 , I2 (m) (m ≥ 3), En (n = 6, 7, 8) or F4 ; any element of D c ⊂ Bc∗ ⊂ B(W ) is a rational permutation braid. Proof. For exceptional types we have checked the result using the program CHEVIE ([34]). Let us prove it for dihedral types. By Proposition 4.3., it suffices to show that any element in D c has the form xy −1 for x, y ∈ W . Since S = {s, t} there are only two possible choices of Coxeter element. Let c = st. Then the elements of D c are the identity element, c and the elements DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 21 of T c . By considering the Hurwitz action on (s, t) we see that the elements −1 of T c are exactly the (sts | {z· ·}·)(sts | {z· ·}·) with 1 ≤ k ≤ m, which concludes k k−1 the proof.  8. Positivity properties The whole paper is motivated by a positivity conjecture on the expansion of the images of simple dual braids in a canonical basis of the Iwahori-Hecke algebra of the Coxeter group. Using work from the previous sections we prove these properties here for finite irreducible Coxeter groups of type other than type Dn . 8.1. Iwahori-Hecke algebra of a Coxeter system. Definition 8.1. Let (W, S) be a Coxeter system. For s, t ∈ S, recall that ms,t denotes the order of st in W . The Iwahori-Hecke algebra H(W ) = H(W, S) of (W, S) is the associative, unital Z[v, v −1 ]-algebra generated by a copy {Ts | s ∈ S} of S with relations Ts2 = (v −2 − 1)Ts + v −2 ∀s ∈ S, ∀s, t ∈ S. T Tt · · · = Tt Ts · · · , | {z } } | s {z ms,t copies ms,t copies The algebra H(W ) has a standard basis {Tw }w∈W where Tw is the image of w ∈ W under the unique group morphism a : B(W ) → H(W )× such that s 7→ Ts for all s ∈ S. It also has two canonical bases {Cw }w∈W and {Cw′ }w∈W defined in [31]. The algebra H(W ) has a unique semilinear involution jH such that jH (Ts ) = −v 2 Ts for all s ∈ S and jH (v) = v −1 . The two canonical bases are then related by the equalities (8.2) Cw = (−1)ℓS (w) jH (Cw′ ), ∀w ∈ W. A reference for this material is [29, Section 7.9]. 8.2. Positivity properties of simple dual braids. There are many positivity statements involving the canonical bases of H(W ). In this section we prove positivity results on the expansion of images of simple dual braids in H(W ) when they are expressed in the basis {Cw }. This comes as a corollary of the results of the previous sections and of the following: Theorem 8.3 ([20, Corollary 2.9]). Let (W, S) be a finite Weyl group, then for all x, y ∈ W , one has X Tx−1 Ty ∈ N[v, v −1 ]Cw . w∈W Remark 8.4. Dyer and Lehrer showed that in case (W, S) is a finite Coxeter group, the statement of the above theorem (for fixed x, y) is equivalent to the statement that Cx′ −1 Ty has a positive expansion in the standard basis; they then show that this last statement holds for Weyl groups ([20, Proposition 2.7 and Theorem 2.8]). Dyer later showed in [18, Conjecture 7(b)]1 (using partially unpublished results) that the Kazhdan-Lusztig positivity conjecture 1The authors thank Matthew Dyer for pointing out this fact to the second author. 22 FRANÇOIS DIGNE AND THOMAS GOBET (now proven in [21] as a corollary of Soergel conjecture [36]) implies the positivity of the expansion of Cx′ −1 Ty in the standard basis for all finite Coxeter groups. Hence we can assume that Theorem 8.3 holds for all finite Coxeter groups. Theorem 8.3 together with Proposition 4.3 yields: Proposition 8.5. Let β ∈ B(W ) be a rational permutation braid. Then X a(β) ∈ N[v, v −1 ]Cw . w∈W Proof. This is an immediate consequence of Theorem 8.3, Proposition 4.3 and the fact that a(w) = Tw for any w ∈ W .  Theorem 8.6. Let (W, S) be a finite irreducible Coxeter system of type other than Dn and let c be any Coxeter element in W ; then for any u ∈ Dc , one has that X a(u) ∈ N[v, v −1 ]Cw . w∈W Proof. This follows from Theorems 5.12, 6.6, 7.1 and Proposition 8.5.  Notice that the proof of this theorem required to prove that simple dual braids can be written in the form x−1 y, which was done in types An and Bn by using the geometry of Artin braids. We are not able to prove this property for type Dn , but both computations and the fact that it holds in any other spherical type leads us to conjecture that it again holds: Conjecture 8.7. Let (W, S) be a Coxeter system of type Dn . Let c be any Coxeter element in W ; then any element of D c ⊂ Bc∗ ⊂ B(W ) is a rational permutation braid. Note that if this conjecture is true we will have the same positivity property for type Dn as for all other spherical types. Problem 8.8. Does there exist a model for the braid group of type Dn by Artin-like braids which could be used to prove that simple elements of dual braid monoids are rational permutation braids? A model for type Dn can be found in [1], but the analogues of the Mikado braids in this model are not the expected ones. Problem 8.9. Is there a uniform approach to show that simple elements of dual braid monoids are rational permutation braids? 8.3. Temperley-Lieb algebra and monomial basis. Since elements of W , that is, images of the simple elements for the classical Garside structure provide a basis of the Iwahori-Hecke algebra, one might investigate the linear independence of images of elements of Dc in H(W ). The set Dc is too small to give a basis of H(W ): indeed, the algebra H(W ) has rank |W | while Div(c) is in general a strict subset of W counted by the generalized Catalan number of type W (see for instance [2]). Nevertheless, in type An , the set Dc gives a basis of a remarkable quotient of H(W ), the Temperley-Lieb algebra. From now on, (W, S) is a Coxeter system of type An . DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 23 Definition 8.10. The Temperley-Lieb algebra TLn is the associative, unital Z[v, v −1 ]-algebra obtained as quotient of H(W ) by the two-sided ideal generated by the elements X Tw , w∈hsi ,si+1 i for i = 1, . . . , n − 1, where si = (i, i + 1). We write θ : H(W ) ։ TLn for the quotient map. Alternatively, one gets an isomorphic algebra by taking the quotient by the two-sided ideal generated by the elements X (−1)ℓS (w) v 2ℓS (w) Tw , w∈hsi ,si+1 i for i = 1, . . . , n − 1 (see e.g., [28, Section 2.3 and Remark 2.4]). We write θ ′ : H(W ) ։ TLn for this alternative quotient map. The algebra TLn tions bsi bsi±1 bsi = bs i bs j = b2si = has a presentation by generators bs1 , . . . , bsn and relabsi bsj bsi (v + v −1 )bsi ∀i, i ± 1 ∈ {1, . . . , n}, ∀i, j ∈ {1, . . . , n} with |i − j| > 1, ∀i ∈ {1, . . . , n}. We have (see [28, Section 2.3 and Remark 2.4]) (8.11) θ(Tsi ) = v −1 bsi − 1, θ ′ (Tsi ) = v −2 − v −1 bsi . Definition 8.12. An element w ∈ W is fully commutative if one can pass from any reduced S-decomposition of w to any other one by applying only relations of the form si sj = sj si for |i − j| > 1. We denote by Wf the set of fully commutative elements. For details on fully commutative elements we refer to [37]. The algebra TLn has a basis indexed by the elements of Wf . It is built as follows; given any w ∈ Wf with reduced expression st · · · u, the above presentation shows that the product bs bt · · · bu does not depend on the choice of the reduced expression and therefore we can denote it by bw . The set {bw }w∈Wf turns out to yield a basis of TLn (see [30, Corollary 5.32]). 8.4. Projection of the canonical basis. The basis {bw }w∈Wf turns out to be related to the canonical basis {Cw′ }w∈W of H(W ) as follows: Theorem 8.13 ([22], Section 3). The basis {bw }w∈Wf is the projection of {Cw′ }w∈W by θ. In symbols, for w ∈ Wf , one has θ(Cw′ ) = bw while θ(Cw′ ) = 0 for w ∈ / Wf . 8.5. Zinno basis. The Temperley-Lieb algebra comes equipped with a semilinear involution jTLn such that jTLn (v) = v −1 and jTLn (bs ) = bs for any s ∈ S. To realize the algebra TLn as a quotient of Z[v, v −1 ][Bn ], we use the composition of a′ : B(W ) → H(W ), s 7→ vTs with θ ′ , that is, by (8.11) any generator si ∈ Bn is mapped to v −1 − bsi . We set ω := θ ′ ◦ a′ . Theorem 8.14 ([40], Theorem 2, [32], Theorem 1). Let c = sn sn−1 · · · s1 ; then ω(D c ) yields a basis of TLn . 24 FRANÇOIS DIGNE AND THOMAS GOBET The above Theorem is stated differently in [40] since dual braid monoids had not been introduced when that paper appeared. Notice that the conventions used in [40] correspond to the quotient map θ ◦ a, which sends si to v −1 bsi − 1. Since one passes from one to the other by composing with a semilinear automorphism of Z[v, v −1 ]-modules and we are here interested in bases, this does not affect the result. This result is also generalized to arbitrary standard Coxeter elements in [39, Corollary 5.2.9] and [25, Theorem 3.8.28 and Remark 3.8.29]: Theorem 8.15. For any standard Coxeter element c, the set ω(D c ) yields a basis of TLn . Hence the images of the simple elements of the Garside monoids Bc∗ yield a basis of TLn , in much the same way that the images of the simple elements of the Garside monoid B + (W ) yield the standard basis of H(W ). Note that one may have x ∈ Div(c) ∩ Div(c′ ) for some c′ 6= c, in which case the corresponding elements of D c and Dc′ , hence also the corresponding basis elements of TLn are not equal in general. For example, in type A2 with c = s1 s2 , c′ = s2 s1 , the reflection s1 s2 s1 lies in Div(c) ∩ Div(c′ ) (as any reflection). The corresponding element of D c , resp. Dc′ is s1 s2 s−1 1 , resp. s−1 s s . The two elements are not equal. 2 1 1 8.6. Positivity consequences. The two quotient maps from Section 8.3 are related by θ = jTLn ◦ θ ′ ◦ jH . Using this fact together with Theorems 8.6, 8.13 and Equality (8.2) we get: Theorem 8.16. Let c be any standard Coxeter element, let {Zx }x∈Div(c) be the corresponding basis of TLn , i.e., Zx := ω(x) for x ∈ Div(c). Then for any x ∈ Div(c), one has X N[v, v −1 ](−1)ℓS (w) bw . Zx ∈ w∈Wf One can show that there exist total orders on the sets Div(c) and Wf such that the base change from {bw }w∈Wf to {Zx }x∈Div(c) is upper triangular. Zinno shows it for c = s1 s2 · · · sn in [40] and the result is extended in the second author’s thesis [25] to arbitrary c. As noticed in [26], for c = s1 s2 · · · sn , the order given by Zinno can be refined into the Bruhat order on Div(c), which is studied extensively and combinatorially in [27], where the orders to consider for other choices of Coxeter elements are also described. Closed formulas for some of the coefficients (in the inverse matrix) are given in [26] in case the Coxeter element is c = s1 s2 · · · sn (which can be obviously adapted for c = sn sn−1 · · · s1 ), but we do not have a closed formula for them in full generality. Remark 8.17. In type Bn , Theorem 8.15 also holds (see [38]). In that case, the diagram basis of the Temperley-Lieb quotient is not the projection of the canonical basis of the corresponding Iwahori-Hecke algebra (see [22]), hence there is no analogue of Theorem 8.16 in that case. In type Dn , the cardinality of |D c | is bigger than the dimension of the Temperley-Lieb algebra, but the images of the elements of D c in it still generate the whole algebra, as shown in [39]. DUAL BRAID MONOIDS, MIKADO BRAIDS AND POSITIVITY 25 References [1] D. Allcock, Braid pictures for Artin groups, Trans. Amer. Math. Soc. 354 (2002), 345–3474. [2] D. Armstrong, Generalized noncrossing partitions and combinatorics of Coxeter groups, Mem. Amer. Math. Soc. 202 (2009), no. 949. [3] B. Baumeister, M. Dyer, C. Stump, and P. Wegener, A note on the transitive Hurwitz action on decompositions of parabolic Coxeter elements, Proc. Amer. Math. Soc., Ser. B, 1 (2014), 149–154. [4] D. Bessis, The dual braid monoid, Ann. Sci. École Normale Supérieure 36 (2003), 647–683. [5] D. Bessis, F. Digne, and J. Michel, Springer theory in braid groups and the BirmanKo-Lee monoid, Pacific J. Math. 205 (2002), 287–309. [6] J. Birman, K.H. Ko, and S.J. Lee, A New Approach to the Word and Conjugacy Problems in the Braid Groups, Adv. in Math. 139 (1998), 322–353. [7] N. Bourbaki, Groupes et algèbres de Lie, chapitres 4,5 et 6, Masson (1981). [8] E. Brieskorn and K. Saito, Artin-Gruppen und Coxeter-Gruppen, Invent. Math. 17 (1972), 245–271. [9] N. Brady, J. McCammond, B. Mühlherr, and W. Neumann, Rigidity of Coxeter groups and Artin groups, Geom. Dedicata 94 (2002), 91–109. [10] T. Brady and C. Watt, K(π, 1)’s for Artin groups of finite type, Geom. Dedicata 94 (2002), 225–230. [11] T. Brady and C. Watt, Noncrossing partitions lattices in finite real reflection groups, Trans. Amer. Math. Soc. 360 (2008), 1983–2005. [12] M. Broué and J. Michel, Sur certains éléments réguliers des groupes de Weyl et les variétés de Deligne-Lusztig associées, Prog. Math. 141 (1997), 73–139. [13] L. Carlitz, R. Scoville, and T. Vaughan, Enumeration of pairs of permutations and sequences, Bull. Amer. Math. Soc. 80 (1974), 881–884. [14] P. Dehornoy, Three-dimensional realizations of braids, J. London Math. Soc. 60 (1999), 108–132. [15] P. Dehornoy, F. Digne, D. Krammer, E. Godelle, and J. Michel. Foundations of Garside theory, Tracts in Mathematics 22, Europ. Math. Soc. (2015). [16] P. Dehornoy and L. Paris, Gaussian groups and Garside groups, two generalizations of Artin groups, Proc. London Math. Soc. 79 (1999), 569–604. [17] P. Deligne, Les immeubles des groupes de tresses généralisés, Invent. Math. 17 (1972), 273–302. [18] M.J. Dyer, Representation theories from Coxeter groups, Representations of groups (Banff, AB, 1994), CMS Conf. Proc. 16, (1995), 105–139 Amer. Math. Soc., Providence, RI. [19] M.J. Dyer, Modules for the dual nil Hecke ring, http://www3.nd.edu/~dyer/papers/nilhecke.pdf. [20] M.J. Dyer and G.I. Lehrer, On positivity in Hecke algebras, Geom. Dedicata 35 (1990), 115–125. [21] B. Elias and G. Williamson, The Hodge theory of Soergel bimodules, Ann. of Math. 180 (2014), 1089–1136. [22] C.K. Fan and R.M. Green, Monomials and Temperley-Lieb algebras, J. Algebra 190 (1997), 498–517. [23] M. Geck and G. Pfeiffer, Characters of finite Coxeter groups and Iwahori-Hecke algebras, London Math. Soc. Monographs, New Series 21, Oxford University Press (2000). [24] W.N. Franzsen, R.B. Howlett, and B. Mühlherr Reflections in abstracts Coxeter groups Comment. Math. Helv. 81 (2006) 665–697 [25] T. Gobet, Bases of Temperley-Lieb algebras, PhD thesis, Université de Picardie, (2014), http://www.mathematik.uni-kl.de/fileadmin/AGs/agag/gobet/files/these.pdf. [26] T. Gobet, Noncrossing partitions, fully commutative elements and bases of the Temperley-Lieb algebra, accepted in Journal of Knot Theory and its Ramifications, http://arxiv.org/abs/1409.6500. 26 FRANÇOIS DIGNE AND THOMAS GOBET [27] T. Gobet and N. Williams, Noncrossing partitions and Bruhat order, European Journal of Combinatorics 53 (2016), 8-34. [28] T. Halverson, M. Mazzocco and A. Ram, Commuting families in Hecke and Temperley-Lieb algebras, Nagoya Math. J. 195 (2009), 125–152. [29] J. Humphreys, Reflection groups and Coxeter groups, Cambridge Studies in Advanced Mathematics 29, Cambridge University Press (1990). [30] C. Kassel, V. Turaev, Braid groups, Graduate Texts in Mathematics 247 (2008), Springer, New York. [31] D. Kazhdan and G. Lusztig, Representations of Coxeter Groups and Hecke Algebras, Invent. Math. 53 (1979), 165–184. [32] E.K. Lee and S.J. Lee, Dual presentation and linear basis of the Temperley-Lieb algebras, J. Korean Math. Soc. 47 (2010), 445–454. [33] J. Michel, A note on words in braid monoids, J. Algebra 215 (1999), 366–377. [34] J. Michel, The development version of the CHEVIE package of GAP3, J. Algebra 435 (2015), 308–336. [35] V. Reiner, Non-crossing partitions for classical reflection groups, Discrete Math. 177 (1997), 195–222. [36] W. Soergel, Kazhdan-Lusztig polynomials and indecomposable bimodules over polynomial rings, J. Inst. Math. Jussieu 6 (2007), 501–525. [37] J.R. Stembridge, On the fully commutative elements of Coxeter groups J. of Algebraic Comb. 5 (1996), 353–385. [38] C. Vincenti, Algèbre de Temperley-Lieb de type B, C. R. Math. Acad. Sci. Paris 342 (2006), 233–236. [39] C. Vincenti, Monoïde dual, antichaînes de racines et algèbres de Temperley-Lieb, PhD thesis, Université de Picardie, (2007). [40] M.G. Zinno, A Temperley-Lieb basis coming from the braid group, J. Knot Theory Ramifications 11 (2002), 575–599. LAMFA, Université de Picardie Jules Verne, 33 Rue Saint-Leu, 80039 Amiens Cedex 1, France. E-mail address: [email protected] TU Kaiserslautern, Fachbereich Mathematik, Postfach 3049, 67653 Kaiserslautern, Germany. E-mail address: [email protected]
4math.GR
1 Analysis of Feedback Error in Automatic Repeat reQuest Saeed R. Khosravirad and Harish Viswanathan arXiv:1710.00649v1 [cs.IT] 2 Oct 2017 Nokia - Bell Labs Abstract The future wireless networks envision ultra-reliable communication with efficient use of the limited wireless channel resources. Closed-loop repetition protocols where retransmission of a packet is enabled using a feedback channel has been adopted since early days of wireless telecommunication. Protocols such as automatic repeat request (ARQ) are used in today’s wireless technologies as a mean to provide the link with reduced rate of packet outage and increased average throughput. The performance of such protocols is strongly dependent to the feedback channel reliability. This paper studies the problem of feedback error and proposes a new method of acknowledging packet delivery for retransmission protocols in unreliable feedback channel conditions. The proposed method is based on backwards composite acknowledgment from multiple packets in a retransmission protocol and provides the scheduler of the wireless channel with additional parameters to configure ultra-reliable communication for a user depending on channel quality. Numerical analysis are presented which show orders of magnitude increase in reliability of the proposed method as compared to ARQ at the cost of a small increase in average experienced delay. I. I NTRODUCTION Repetition of a packet over non-deterministic channel conditions is a prominent approach to reliable packet delivery. Wireless telecommunications technologies such as high speed packet access (HSPA), worldwide interoperability for microwave access (WiMax) and long term evolution (LTE), to mention a few, have relied on the performance boost provided by retransmission techniques such as ARQ and hybrid automatic repeat request (HARQ) [1]. Such retransmission protocols add to the robustness of transmission and increase link throughput. In LTE, and as expected for the 5th generation mobile networks (5G) [2], ARQ is used in the radio link control (RLC) layer while HARQ in the lower Media Access Control (MAC) and upper physical layer (PHY) layer. Performing together, these retransmission protocols provide the system with high October 3, 2017 DRAFT 2 reliability where failure in the MAC layer HARQ operation is compensated for by the RLC layer ARQ in acknowledged mode at the expense of extra experienced latency for the packet [3]. The role of feedback channel is to limit repetitions to only when the initial attempt is failed thus, increasing data channel efficiency. However, inevitable feedback channel impairments may cause unreliability in packet delivery. A decoding failure report, i.e. negative acknowledgement (NAK), falsely received as positive acknowledgement (ACK) results in undesirable packet outage. Attempts to increase feedback reliability, e.g., by means of repetition coding, is costful to the receiver node while erronoeus feedback detection may cause an increased packet delivery latency and diminish throughput and reliability key performance indicators (KPIs). E.g., in LTE a single-bit ACK/NAK spans over multiple resource element (RE) up to a physical resource block (PRB) in up-link (UL) and down-link (DL) HARQ respectively to reduce false feedback detection [4], making feedback bits too costly to the network. In newer releases of LTE, blind HARQ retransmissions of a packet is considered as a solution to avoid feedback complexity of broadcast HARQ and increase reliability [5]. Such approach, despite the offered simplicity, can severely decrease resource utilization efficiency of the system considering that typically a high percentage of transmissions are successfully decoded in the initial attempt in typical link adaptation configurations. The core question this paper tries to answer is how to reliably design a feedback-based retransmission protocol in unreliabile feedback conditions. We first study the effect of erroneous feedback on performance of retransmission protocols. We assume a simple stop-and-wait (SAW) mode of operation in a narrow-band wireless link where the receiver node is a low-cost and low-energy device with limited power for feedback channel acknowledgement reports. Such model portrays well the unreliable feedback channel problem where the straight-forward solution to acquire reliable packet delivery is by either adding diversity gain to the feedback link or relaxing the dependency to feedback channel and performing blind or conservative retransmission of the packet. Specifically, for low-cost narrow-band communication such diversity gain can be achieved by increasing time diversity order of the feedback channel. We study different approaches of increasing feedback channel time diversity and establish achievable reliability regions with respect to feedback channel error rate. We show that in reasonably reliable feedback channel conditions where the product of packet error rate and feedback error rate is comparable to packet outage rate, conservative asymmetric feedback detection can provide the required October 3, 2017 DRAFT 3 reliability level by slightly increasing false NAK rate while reducing false ACK rate. Further, in extremely un-reliable feedback channel conditions we see that blind retransmission of packet is the viable solution in terms of reliability while it zeros the receiver node’s energy consumption over feedback channel. Next, we propose a new method of backwards composite acknowledgment that helps improves reliability of repetition process without the need to increase time diversity order of the feedback channel. The proposed scheme relies on collaboration between transmitter and receiver nodes to provide ultra-reliable communication of packets even in poor feedback channel conditions. Furthermore, thanks to the additional design parameters provided by the proposed method, the scheduler of wireless network is able to configure each communication node with desirable ultrareliability only using one layer of retransmission protocol. This enables the wireless technologies such as LTE to adopt one layer of retransmission protocol with configurable reliability level as opposed to stacked two-layer ARQ/HARQ operation that is currently deployed. The rest of this paper is organized as follows: in Sec. II the unreliability problem of retransmission protocols caused by feedback channel unreliability feedback error problem is studied; Sec. III introduces the backwards composite feedback solution for reliable packet delivery; in Sec. IV numerical results are presented; to evaluate the performance of the proposed solution; finally, Sec. V covers the concluding remarks. II. P ROBLEM DESCRIPTION In this study we adopt the SAW mode of operation for retransmission protocols which works as follows. First, at time i the jth packet arrived from a higher layer application denoted by Pji is transmitted by transmitter node for the first time. Next, receiver node attempts decoding on the observed packet denoted by P̃ji . Using a feedback channel, receiver node sends the decoding success report Ai at corresponding feedback instance i, where Ai = 1 in case of ACK and Ai = 0 in case of NAK (respectively, decoding success and decoding failure). Feedback transmission, similar to the data transmission, is assumed to be subject to channel impairments. We use Ãi to denote the feedback observed by the transmitter node at feedback time instance i. In case of observing a NAK the same data packet 1 is retransmitted at the next transmit time instance i + 1 1 In practice the same message can be conveyed in different set of coded bits called redundancy versions. October 3, 2017 DRAFT 4 (i.e., Pji+1 ), otherwise, transmission of a new data packet is initiated (i.e., Pj+1 i+1 ). Retransmission of a NAKed packet continues until ACK is observed over the feedback channel or maximum M transmission attempts for the packet is reached. Therefore, at transmitter node a packet is only regarded as delivered if ACK is observed and otherwise it is regarded as failed. The transmitter node sends a single-bit new data indicator (NDI) message per transmit data packet P. The singlebit NDI is toggled every time a packet is transmitted for the first time. We assume that receiver is able to detect NDI error-free. The duration between transmit occasions i and i + 1 is denoted by round trip time (RTT) where only one packet transmit occasion and one feedback occasion are considered in each RTT. Reliability of packet delivery in SAW operation with feedback channel is limited by both packet transmission block error probability (BLEP) and feedback detection error rate. We use pe = p1e and pm e for integer m to denote BLEP of a packet after one and m transmission attempts respectively where, by definition p0e = 1. We assume independent and identically distributed m (i.i.d.) block fading channel model for packet transmission. Therefore, we have pm e ≤ (pe ) where equality holds only if the decoder utilizes no combining gain (e.g., in case of ARQ operation). Feedback channel is assumed to follow the binary asymmetric channel (BAC) model where error probability varies depending on the input symbol to the channel. Error probabilities for such channel model are described as follows. n o p0 = Pr Ãi = 1|Ai = 0 n o p1 = Pr Ãi = 0|Ai = 1 (1) (2) We assume that instances of the feedback channel are independent from each other and from data channel. Such model for the feedback channel is simplified as compared to real-life feedback channel where an extra message (e.g., discontinued transmission (DTX)) may also be considered as input to the feedback channel. E.g., in case of LTE technology, DTX may indicate failure in detection of the scheduling grant for data transmission [3]. Throughout this paper we reserve the notation ā to denote ā = 1 − a for any real valued a where a ∈ [0, 1]. In a retransmission protocol where retransmissions are triggered by NAK feedback, in case of NAK→ACK error the transmitter node will mistakenly drop the packet assuming it is successfully decoded at the receiver. Therefore, it is crucial to reduce the effective chances of a packet October 3, 2017 DRAFT 5 being discarded as a result of false ACK. The straightforward solution to reduce chances of NAK→ACK is to increase reliability of the feedback channel (i.e., reducing p0 ) e.g., by increasing repetition order of feedback transmission by factor of L > 1. However, such solution stretches feedback message in time, frequency or power domains, requiring extra resources. Specifically, in scenarios where receiver node has limited power and bandwidth for feedback transmission (e.g., narrow-band and low-cost massive machine type of communication (mMTC) receivers) the cost of increasing feedback reliability is additional time diversity for feedback which in turn increases the experienced delay and receiver node power consumption. We use T to denote the number of feedback occasions utilized for a packet before it is dropped at the transmitter (either considered delivered or failed). The average number of feedback occasions utilized per packet is then denoted by T̄ = E{T } which, in time diversity scenario for feedback, is equivalent to the average delay experienced by the higher-layer application per packet. Further, we denote the events of decoding failure and success for Pj in maximum m transmission attempts by Fjm and Sjm respectively. Outage probability, Pout , is defined as the probability of decoding failure  after maximum M attempts, i.e., Pout = Pr FjM . Data channel utilization is measured by the average number of transmission attempts per packet and is denoted by N̄ . We use τ to denote the packet delivery latency defined as the time duration it takes from the first transmission attempt of a packet until it is correctly decoded at the receiver. Assuming zero processing time at the receiver node we have τ = TTI + k × RTT where k > 0. In the following we first study the effects of feedback error on Pout performance of retransmission protocols. Later in the next section we proposes a new feedback reporting scheme that suits low-cost and low-energy narrow-band wireless devices in ultra-reliable packet delivery. We start by investigating different feedback reporting approaches and analyze the trade-off between reliability and feedback time diversity order L. 1) Regular SAW (Reg-SAW): We assume the binary symmetric channel (BSC) model with p0 = p1 = p for feedback channel. As shown in Fig. 1, in a SAW process, packet Pji is initially transmitted over ith (blue color) transmit occasion which has duration of a transmission time interval (TTI). The numbers inside the transmit occasion blocks indicates data packet index j from Pji where j is a positive integer. Followed by transmission of the packet, after a given propagation and receiver processing time [6], acknowledgement for the packet arrives. Next, transmitter node transmits the next packet Pj+1 i+1 in case of ACK (green color blocks) or retransmits October 3, 2017 DRAFT 6 a version of the same packet Pji+1 (grey color blocks) in case of NAK (red color blocks). NDI is transmitted with each packet transmit occasion to notify the receiver of whether a new packet is transmitted (toggled NDI) or the same packet is retransmitted (un-toggled NDI). In principle ACK observance can be result of either a successful packet decoding followed by correct feedback detection or decoding failure followed by false feedback. In order to make it simple to follow the illustrations the packet index corresponding to each feedback occasion is shown inside the feedback occasion blocks. The duration between transmit occasions i and i + 1 is denoted by RTT. Without loss of generality, the propagation and processing time duration will be skipped in the illustrations after Fig. 1. Therefore, acknowledgement of each packet will be shown below it while the next transmit occasion starts immediately after. RTT transmit occasion feedback occasion j+1 j j j+1 j+1 j+1 j +1 j+2 j+1 j +2 Figure 1: Stop-and-wait operation. 2) Increased feedback repetition order (L-Rep-ACK): To increase feedback reliability for a receiver node with narrow-band low-energy feedback transmission a simple solutions is to increase time diversity of feedback transmission by L > 1. In this model each feedback transmission is stretched over L feedback occasions where packet is declared as delivered at the transmitter node only if all L observances of feedback are ACK. Otherwise, the packet is retransmitted by the L-Rep-ACK process. Therefore, probability of false ACK reduces to pL0 compared to that of p0 in case of Reg-SAW. Further, due to feedback repetition, RTT of L-Rep-ACK is L times that of Reg-SAW. NDI is used in similar way as in Reg-SAW to notify receiver node about retransmissions. 3) L required ACK per packet (L-ACK-SAW): In this approach, the acknowledgment generated for a packet is repeated over feedback occasions by the receiver node until L > 1 number of ACK observances are made at the transmitter node which in turn will trigger initiating the transmission of a new packet. A retransmission of the same packet is followed immediately if October 3, 2017 DRAFT 7 transmit occasion 1 feedback observation 1 1 1 1 1 2 1 1 2 Figure 2: L-Rep-ACK operation for L = 3. NAK is observed while using NDI receiver is notified about the retransmission. Note that in this approach transmitter node keeps counting the number of ACK observances for a packet and L required ACK observances may be received in non-consecutive occasions unlike L-Rep-ACK approach where L observances of ACK must be counted consecutively. transmit occasion 1 feedback observation 1 1 1 1 2 1 2 Figure 3: L-ACK-SAW operation for L = 3. 4) Retransmission until L ACKs are observed (ReTx-L-ACK): In this approach, similar to L-ACK-SAW, transmitter node requires L observance of ACK before considering a packet as delivered. However, transmitter continues retransmission of the packet while observing the feedback channel. Therefore, ReTx-L-ACK transmits each packet at least L times and stops retranmission when L times ACK observances are made or maximum M transmission attempts is reached. Fig. 4 depicts ReTx-L-ACK process for L = 3 where retransmission of packet P1 is continued until 3 non-consecutive ACKs are detected. transmit occasion 1 1 1 1 2 feedback observation 1 1 1 1 2 Figure 4: ReTx-L-ACK operation for L = 3. 5) Asymmetric feedback detection for SAW (Asym-SAW): A different approach to decrease the false ACK rate is by using asymmetric detection of the binary feedback channel. For instance, let’s assume an additive white Gaussian noise (AWGN) feedback channel and a binary phase shift October 3, 2017 DRAFT 8 keying (BPSK) symbol that conveys the single-bit feedback acknowledgement, where the binary 0 and 1 inputs of the feedback channel are represented in the signal constellation for BPSK in √ √ terms of energy per bit Eb respectively by − Eb and Eb . Assuming coherent detection and perfect recovery of the carrier frequency and phase, from signal modulation and detection theory we know that the bit error probability (BEP) with symmetric decision regions [7] is as follows, r  Eb 1 , (3) p = erfc 2 N0 where p denotes detection error probability, N0 denotes the additive noise power spectral density R∞ and the complementary error function erfc (·) is defined as, erfc (x) = π2 x exp(−t2 ) dt. Asymmetric decision regions, e.g., by moving the detection threshold in the BPSK constellation from √ √ √ origin to the point α× Eb (closer to Eb than − Eb for α > 0), decreases the modified chances of false ACK detection q0 , while the modified false NAK rate q1 increases accordingly. This reduces the chances of discarding unsuccessful packets at the transmitter while in turn increases chances of unnecessary retransmissions. The modified error probabilities for such asymmetric detection is then as follows. r   Eb 1 q0 = erfc (1 + α) 2 N0 r   Eb 1 q1 = erfc (1 − α) 2 N0 (4) (5) Asym-SAW follows similar algorithm as in Reg-SAW where NDI signal is utilized to notify receiver node of retransmissions. For performance evaluation of this approach we assume BPSK modulation is used for the feedback channel where Eb is chosen based on a given p in (3). Then, the detection threshold is adjusted using parameter α in (4) and (5) to provide the required q0 . 6) Blind retransmission (Blind-ReTx): We further investigate the performance of blind retransmission without feedback. In such approach each packet is transmitted M times by the transmitter node without requiring a feedback message from the receiver node. Closed-form formulation for Pout , N̄, T̄ and cumulative density function (cdf) of packet delivery latency are shown in Table I, Table II, Table III and Table IV respectively for the approaches described in this section. For an infinite allowed number of transmission attempts (M → ∞) and assuming zero m combining gain at the receiver (i.e., pm e = (pe ) ), in Fig. 5 the outage probability Pout of October 3, 2017 DRAFT 9 Table I: Outage probability, Pout for different feedback approaches. M →∞ finite M Reg-SAW M −1 P m−1 M −1 pm + pM e p0 p¯0 e p¯0 m=1 L-Rep-ACK M −1 P m=1 L-ACK-SAW L L m−1 L M −1 pm + pM e p0 (1 − p0 ) e (1 − p0 ) PM −1 m=1 L m−1 pm e p0 p¯0 L+m−2 m−1 PL−1 l+M −2 M −2 M −1 pM e p¯0 ReTx-L-ACK PM −1 m=L M −1 P PL−1 l=0 m−1 L−1 ( pp¯00 )l +   + M −1 l  m−1 M −1 pm + pM e q0 q¯0 e q¯0 m=1 Blind Retx pl0 L m−L pm e p0 p¯0 M −1 pM e p¯0 Asym-SAW l=0  pM e ≤ pe p0 1−p1 p¯0 e ≤ pe pL0 1−p 1 L e (1−p0 ) ≈ pe pL0 1 +  pe p¯0 (L−1)! (1−pe p¯0 )L ≈ pLe pL0 1 + pe p¯0 (L−1)! (1−pe p¯0 )L  ≤ pe q0 1−p1 q¯0 e →0 the above-listed feedback approaches is illustrated. Reliability of Reg-SAW is proportional to feedback reliability metric p even in unbounded M scenario. Specifically, the operation regions on Fig. 5 that are labeled by R1, ..., R6 for Pout below 10−4 and 10−5 are not achievable using Reg-SAW. Therefore, for ultra-reliable communication it is required to either increase feedback diversity order L or to perform blind retransmission without reliance on unreliable feedback channel. By increasing feedback time diversity order by L = 2, reliability regions R1 and R4 are achievable with proper choice of M. However, achieving regions R2 and R5 requires L > 2. Interestingly, Blind-ReTx with M = 5 and 6 can achieve reliability in regions R2 and R5 respectively by refusing the dependency on feedback channel. However, as we see later in this paper such approach can be harmfully inefficient in resource utilization. Nevertheless, for highly unreliable feedback channel conditions such as in region R6, very large feedback diversity order L >> 4 can have reverse effect on the performance efficiency parameters such as channel utilization and average delay. This makes Blind-ReTx a viable solution for when the feedback channel is unable to offer a reasonable level of reliability. Further, Asym-SAW feedback operation requires stringent q0 adjustment of, e.g., q0 < 10−4 for Pout < 10−5 . In highly October 3, 2017 DRAFT 10 Table II: Average number of transmission attempt per packet, N̄ M →∞ finite M M P pm−1 p¯0 m−1 + e m=1 M −1 P Reg-SAW m=1 L-Rep-ACK M P m=1 M −1 P m=1 m−1 (pm−1 − pm p e e )p¯0 < −m 1−pM 1 1 p¯1 (1 − pL0 )m−1 + pm−1 e < L M −m L m−1 (pm−1 − pm (1 − p¯1 L ) 1−(1−pp¯¯11L ) e e )(1 − p0 ) p¯1 +p¯e p1 p¯1 (1−pe p¯0 ) p¯1 L +p¯e (1−p¯1 L ) p¯1 L (1−pe (1−pL 0 )) 1 + gM XLM −1 + g¯M YLM −1 where, ∀l ∈ {1, ..., L} and ∀m ∈ {1, ..., M − 1}, L-ACK-SAW Xlm = p¯0 l P  ĺ pl− 1 + gm Xĺm−1 + g¯m Yĺm−1 , 0 ĺ=1 Ylm = p1 l P < 1+ pe (1−p¯0 L )+p¯e (1−p¯1 L ) p¯1 L p¯1 l−ĺ (1 + Yĺm ) ĺ=1 and, Xl0 , Yl0 = 0, X0m , Y0m = 0, and gm = M P peM −m+1 −m pM e mηm , where, m=L L m−L ηm = pm e p0 p¯0 ReTx-L-ACK ̺m,l = m−1 L−1 min{l−1,L−1} P  k=max{L−m+l−1,0} + m P (pl−1 − ple )̺m,l , with e l=1  m−l  pk0 p¯0 l p¯1 L pm+k+1 l−1 1 L+l k+1 k k L−k−1 p¯0 p¯1 p1 ... and, ̺M,l = min{l−1,n} P L−1 P n=0 k=max{n−M +l,0} Asym-SAW M P Blind Retx October 3, 2017 pm−1 q¯0 m−1 + e m=1 M −1 P m=1 +k   pk0 p¯0 l p¯1 n pM l−1 M −l 1 l+n k n−k p¯0 k+1 p¯1 k p1 m−1 (pm−1 − pm q1 e e )q¯0 M 1−q1M −m q¯1 < q¯1 +p¯e q1 q¯1 (1−pe q¯0 ) ∞ DRAFT 11 Table III: Average experienced delay, T̄ , in number of RTT. assuming one feedback occasion per RTT N̄ Reg-SAW N̄ ∗ L L-Rep-ACK 1 + gM XLM −1 + g¯M YLM −1 where, ∀l ∈ {1, ..., L} and ∀m ∈ {1, ..., M − 1}, Xlm = p¯0 L-ACK-SAW l P ĺ=1 Y l m = p1 l P ´ l=1  ĺ pl− l − ´l + 1 + gm Xĺm−1 + g¯m Yĺm−1 , 0 p¯1 l−ĺ (1 + Yĺm ) and, Xl0 , Yl0 = 0, X0m , Y0m = 0, and gm = ReTx-L-ACK N̄ Asym-SAW N̄ Blind Retx M peM −m+1 −m pM e Table IV: cdf of packet delivery latency τ . Pr {τ ≤ TTI + k ∗ RTT} Reg-SAW L-Rep-ACK L-ACK-SAW p¯0 k (pke − pk+1 e ), (1 − pL0 )n (pne − pn+1 ), e min{k,M P −1} m=max{1,k−L+1} ReTx-L-ACK n = k ∗ L, ∀k ∈ {0, ..., M − 1} p¯0 k (pke − pk+1 )p0k−m e l−1 m−1  , ∀k ∈ {0, ..., M + L − 2} (pke − pk+1 e ) for k ∈ {0, ..., L − 1}, and k P (pke − pk+1 )p0k−m p¯0 m e max{1,k−L+1} Asym-SAW q¯0 k (pke − pk+1 e ), Blind Retx pke − pk+1 , e October 3, 2017 ∀k ∈ {0, ..., M − 1} k m  for k ∈ {L, ..., M − 1} ∀k ∈ {0, ..., M − 1} ∀k ∈ {0, ..., M − 1} DRAFT 12 10-1 Reg-SAW 2-Rep-ACK 4-Rep-ACK 2-ACK-SAW 4-ACK-SAW Asym-SAW, q0 = min{10−3 , p} Asym-SAW, q0 = min{10−4 , p} ReTx-2-ACK ReTx-4-ACK 10-2 PSfrag replacements Pout 10-3 10-4 R2 R3 R1 10-5 10-6 R4 R5 R6 10-1 10-2 10-3 10-4 p Figure 5: Outage probability for M → ∞ against a range of p = p0 = p1 values with pe = 0.1. unreliable feedback channel conditions, with q0 → 0, false NAK rate increases drastically (i.e., q1 → 1) which increases number of transmission attempts resulting in similar performance as Blind-ReTx approach. Moreover, from Fig. 5 it is observed that reliability performance of L-Rep-ACK and LACK-SAW approaches are tightly similar in practical range of feedback diversity order L. The downside of increasing feedback diversity order is the increased energy consumption at the receiver to report more than one feedback per packet transmission (i.e., T̄ ). In particular, for use cases where battery life-time is of critical importance, less energy consumption over feedback reports is desirable. Thus, it is required to reduce feedback energy consumption while configuring high reliability for the retransmission protocol. This motivates next section of this paper where we propose a variant of the L-ACK-SAW approach which similarly requires L observances of ACK for a data packet to be considered as delivered. However, the new solution reduces number October 3, 2017 DRAFT 13 of average feedback occasions used per packet thanks to the proposed backwards composite feedback operation. This way, T̄ improves compared to L-ACK-SAW while thanks to the required multiple ACK observance per packet, a higher reliability of operation is expected compared to Reg-SAW. III. BACKWARDS COMPOSITE FEEDBACK In this section we propose a composite feedback solution to provide highly-reliable SAW operation in unreliable feedback channel condition, which can be applied to retransmission protocols such as ARQ/HARQ. In the proposed backwards composite feedback (BCF) solution, the aim is to observe a given L > 1 times ACK for a packet before the packet is labeled reliably as delivered. In order to avoid drastic increase in T̄ , in the proposed BCF solution we suggest to repeat the feedback for each packet in a composite manner. We assume that a BCF process has at most L active packets in its buffers at each time instance. An active packet is identified as a packet that has been transmitted m times, where 1 ≤ m < M, and ACK feedback is observed for it less than L times. We define composite feedback at the receiver node at time i as follows, where l denotes index of the active packets set.      l  1 A = 1, ∀l Ci = &Al = l      0 otherwise (6) Therefore, an observed composite feedback C̃i = 1 at the transmitter is counted as ACK for all active packets. In the case C̃i = 0 is observed, a retransmission phase cycle starts which attempts on retransmitting active packets one after another following a given order of packets. The retransmission phase then continues until C̃ = 1 is observed or the maximum transmission attempt is reached for all active packets. The propose BCF-SAW (BCF-SAW) operation at transmitter and receiver nodes is as follows. A. Operation at the transmitter Alg. 1 presents the BCF algorithm at the transmitter side. We assume that all the active packets are stored in separate buffers at the transmitter for in case a retransmission is needed. An active packet is then represented by Buffer(l) for l ∈ [0, ..., L − 1]. The variable NDItoggle stores the October 3, 2017 DRAFT 14 Algorithm 1: Operation at the transmitter 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 Input : observed composite feedback C̃i Output: transmit packet Pi ; new data indicator NDIi if C̃i == 1 then ACKcounter(l) + + ∀l; NDIi+1 ← toggle(NDIi ); NDItoggle + + mod L; Buffer(NDItoggle) ←get new packet ; ACKcounter(NDItoggle) = 0; NAKcounter(NDItoggle) = 0; Pi+1 ← Buffer(NDItoggle); TXcountre(NDItoggle) = 1; clear Indx; else if TXcounter(l) == 0 or M ∀l, then go to 3 else NDIi+1 ← NDIi ; NAKcounter(l) + + ∀l;  Indx ← look up reTx index TXcounter, ACKcounter, NAKcounter ; Pi+1 ← Buffer(Indx); TXcountre(Indx) + +; end end i + +; return Pi , NDIi ; go to 1; index l of the last active packet which was transmitted for the first time (i.e., NDI was toggled for it). When transmitter node observes ACK over the feedback channel it increments counters ACKcounter(l) by one for all l. Then, NDI is toggled and NDItoggle index is incremented by one mod L. The updated NDItoggle points either to an empty buffer or to an active packet where ACKcounter(NDItoggle) = L. Buffer(NDItoggle) is therefore reset and substituted by a new packet taken from the higher layer application (this process is denoted by function get new packet). Next transmit occasion is then utilized to transmit the newly initiated active packet. A toggle in NDI bit informs the receiver node about transmission of a new packet. In the case where NAK is observed, the retransmission phase of the operation starts where active packets are retransmitted one after another following a given order until ACK is observed or the maximum transmission attempt is reached for all active packets. The order in which active packets are retransmitted in this phase is given in a look up table that is pre-shared between receiver and transmitter nodes. The look-up table identifies the next active packet index denoted by variable Indx that is to be retransmitted. This process is denoted by function look up October 3, 2017 DRAFT 15 reTx index which inputs counters TXcounter(l), ACKcounter(l) and NAKcounter(l) respectively denoting number of transmission attempts, observed NAKs and observed ACKs for active packet l. NDI signal remains untoggled during retransmission phase. Algorithm 2: Operation at the receiver 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 Input : observed NDI; received packet P̃i Output: composite feedback Ci if NDI is toggled then ACKcounter(l) + + ∀l ∈ [0, ..., L − 1]; NDItoggle + + mod L; Buffer(NDItoggle) ← P̃i ; RXcountre(NDItoggle) = 1; ANDItoggle ← decode success(P̃i ) else NAKcounter(l) + + ∀l;  Indx ← look up reTx index RXcounter, ACKcounter, NAKcounter ; RXcountre(Indx) + +; AIndx ← decode success(P̃i , Buffer(Indx)); Buffer(Indx) ← combine(P̃i , Buffer(Indx)); end i + +; Ci ← &Al where l = NDItoggle or, RXcounter(l) 6= 0, M ; l 16 17 return Ci ; go to 1; B. Operation at the receiver Receiver node follows Alg. 2 where firstly it detects whether the received packet is a new transmission or it is retransmission of one of the earlier received active packets. This is done at each time i by observing NDIi signal and comparing it with NDIi−1 . The variable NDItoggle ∈ [0, ..., L − 1] store the index of the active packet which is most recently received for the first time. If NDI is detected to be toggled, NDItoggle index at the receiver is incremented by one mod L. Then, Buffer(NDItoggle) is substituted with the newly received packet. Function decode success outputs the feedback generated from decoding lth active packet, denoted using upper case index by Al . We assume zero chance of error detection failure where the acknowledgement for a packet is generated based on error detection for the packet, e.g., using cyclic redundancy check (CRC). In case NDI signal is detected as untoggled, the algorithm follows retransmission phase operation where the pre-shared look-up table is used to find the index of the active packet that is being retransmitted (denoted by Indx). Decoding in such case may be based on the received October 3, 2017 DRAFT 16 retransmission and the stored version of the active packet from previous (re)transmission attempts to provide the decoder with combing gain. Similarly, the buffer content may be updated (e.g., in case of AIndx = 0) after combining the two versions of the packet. Composite feedback Ci is generated using Al for all the active packet indexes l according to (6). The retransmission phase order of packets follows a pre-shared look-up table. As discussed above we assume that both nodes keep track of the number of transmission attempts and the number of observed ACK and NAK for each active packet. Given the value of these counters the next packet to be retransmitted in case of NAK is found. C. Example case for L = 2 The proposed BCF operation is explained below for the case of L = 2, i.e., twice ACK observances required for a packet to be considered as delivered). The cases of larger L will follow a similar approach. Operation in case of observed composite ACK, C̃i = 1: As depicted in Fig. 6, two active packets are assumed at the transmitter each having a separate TXcounter and ACKcounter. The process starts by transmitting packet P11 thus, the first feedback occasion only acknowledges decoding status for packet 1, C1 = A1 . Transmitter then initiates the second active packet by transmitting packet P22 in the following transmit occasion. We assume that receiver is notified of the new packet using a single-bit NDI signal. In the second feedback occasion, receiver composites acknowledgement the two active packets resulting in composite NAK due to decoding failure for P22 , C2 = A1 &A2 = 0. The observed composite feedback at time i = 2 is however erroneously detected as ACK, i.e., C̃2 = 0. The observed ACK feedback counts as one ACK for both active packets resulting. As a result, ACKcounter for packet 1 reaches L = 2 and the packet is regarded as delivered and thus discarded from BCF-SAW process. Note that for ease of following the illustration, TXcounter blocks in Fig. 6 show the counter value and the corresponding packet number in brackets. Next, P33 is transmitted and decoded successfully. However, since A2 = 0, the composite feedback at time i = 3 is C3 = 0. A second feedback error at time i = 3 results in C̃3 = 1 and as a result P2 is discarded from the transmitter buffer even though it failed in decoding. Such outage case requires L = 2 times NAK→ACK errors during the time a packet is in an active packet buffer of the transmitter node. October 3, 2017 DRAFT 17 transmit occasion 1 2 3 4 5 composite feedback 1 1&2 2&3 3&4 4&5 feedback observation 1 1&2 2&3 3&4 4&5 1(1) 1(1) 1(3) 1(3) 1(5) transmitter ACKcounter(1) 1 2 1 2 1 transmitter TXcounter(2) 0 1(2) 1(2) 1(4) 1(4) transmitter ACKcounter(2) 0 1 2 1 2 transmitter TXcounter(1) Figure 6: Backwards feedback bundling operation in case of composite ACK. Operation in case of observed composite NAK, C̃i = 0: An observed composite NAK initiates retransmission phase where active packets are retransmitted one after another according to a preshared order of packets. NDI remains un-toggled during retransmission phase. The retransmission phase continues until ACK is observed or the transmit counter for all active packets reaches M. In Fig. 7 we assume similar events have encountered as in Fig. 6 up to feedback occasion i = 3. Let’s assume that at i = 3 in Fig. 7 composite feedback is correctly detected, C̃3 = 0. From transmitter point of view, observed composite NAK may be caused by several events including decoding failure of one of the active packets or feedback channel error. For instance, the observed composite NAK C̃3 in Fig. 7 may be the result of any of the following events. • E1: F31 &S21 followed by successful feedback detection at i = 3 • E2: F21 &S31 with successful feedback detection at i = 3 and feedback error at i = 2 • E3: F21 &F31 with successful feedback detection at i = 3 and feedback error at i = 2 • E4: S21 &S31 followed by feedback error at i = 3 The likelihood of such events can be evaluated as it was explained in Sec. ??. E.g., for packet transmission with target pe = 0.1 and feedback channel reliability of p = 0.001, E1 is the more likely event making P3 the best candidate for retransmission in next transmit occasion. Nevertheless, the retransmission packet order as a function of TXcounter, ACKcounter and NAKcounter can be established prior to start of the communication process and shared between communicating nodes. October 3, 2017 DRAFT 18 In Fig. 7, retransmission of P34 is performed at i = 4. Due to failure of P22 , NAK composite feedback C4 = 0 is generated at the receiver node and correctly detected at the transmitter. Therefore, retransmission phase continues and transmitter uses the look-up table to pull the next index of active packet that must be retransmitted. Thus, at time i = 5, P25 is retransmitted resulting in S22 . transmit occasion 1 2 3 3 2 composite feedback 1 1&2 2&3 2&3 2&3 feedback occasion 1 1&2 2&3 2&3 2&3 1(1) 1(1) 1(3) 2(3) 2(3) transmitter ACKcounter(1) 1 2 0 0 1 transmitter TXcounter(2) 0 1(2) 1(2) 1(2) 2(2) transmitter ACKcounter(2) 0 1 1 1 2 transmitter TXcounter(1) Figure 7: Backwards composite feedback operation in case of observed NAK. Feedback error has occurred in the second feedback occasion. The proposed BCF-SAW uses the same number of feedback occasions per packet transmit occasions as in Reg-SAW in Fig. 1 without the need to increase time diversity of feedback channel. However, each packet is ACKed L times over the feedback channel which in turn increases the reliability of packet delivery. IV. N UMERICAL RESULTS In this section we evaluate the packet outage probability of the proposed BCF-SAW against the range of feedback channel reliability metrics p and compare it with benchmark approaches introduced in Sec. II. All the results are presented for the case of M = 4 for repeated Monte m−1 g Carlo analysis where pe = 0.1 and the combining gain is modeled by g in pm ) for e = (pe m > 1. For the case of ARQ operation, combining gain is set to g = 1 while for the case of HARQ operation we assume g = 1.2. The retransmission protocols are allowed to transmit only one packet (either initial transmission or retransmission) per transmit occasion. We further October 3, 2017 DRAFT 10-1 Asym-HARQ, q0 = min{10−5 , p} Asym-HARQ, q0 = min{10−4 , p} BCF-ARQ, L = 2 BCF-ARQ, L = 4 BCF-HARQ, L = 2 BCF-HARQ, L = 4 2-ACK-ARQ 4-ACK-ARQ 10-2 outage probability, Pout g replacements 19 10 2-ACK-HARQ 4-ACK-HARQ -3 10-4 R2 R3 R1 10-5 10-6 R4 R5 R6 10-1 10-2 10-3 10-4 p Figure 8: Outage probability for p0 = p1 = p. The four black-colored markers from top to bottom represent Reg-SAW for ARQ and HARQ and Blind-ReTx for ARQ and HARQ. adopt the assumption of an error-free NDI detection at the receiver node to solely focus on the effects of unreliable feedback channel. Performance of the proposed BCF-SAW is evaluated for different number of required ACK observances, L. We assume a simple retransmission phase packet order where upon observing a composite NAK the last active packet is retransmitted until an ACK is observed. Otherwise, when transmit counter reaches M for the packet retransmission phase order switches to the next last active packet and repeats the same process until all active packets reach M transmission attempts or an ACK is observed. Best case outage probability for HARQ and ARQ operations reaches Q m pm e resulting in 4.285e − 6 and 1e − 4 limits respectively as shown in Fig. 8. The proposed BCF-SAW reduces October 3, 2017 DRAFT 20 7 Reg-SAW BCF, L = 2 BCF, L = 4 6 L-ACK-SAW, L = 2 L-ACK-SAW, L = 4 L-Rep-ACK, L = 2 T̄ [× RTT] 5 L-Rep-ACK, L = 4 Asym, q0 = min{10−5 , p} Asym, q0 = min{10−4 , p} 4 Blind-ReTx ag replacements 3 2 1 10-1 10-2 10-3 10-4 p Figure 9: Average number of feedback occasions utilized per packet packets T̄ for p0 = p1 = p and combining gain g = 1.2. outage probability by orders of magnitude e.g., for L = 2 and L = 4 as compared to Reg-SAW even in highly unreliable feedback cases while its outage performance is bounded by L-ACKSAW. The latter performs more reliably because the L observances of ACK are separately received for a given packet and a NAK feedback will trigger retransmission of the same packet. On the other hand, NAK observance in BCF-SAW may be followed by retransmission of a packet other than the failed packet incurring additional feedback occasions which may increase the false ACK rate. The better outage performance of L-ACK-SAW and L-Rep-ACK is thanks to the increased number of channel uses per packet N̄ as shown in Fig. 10. However, the penalty paid for improved reliability by the two latter approaches, as shown in Fig. 9, is an increased average October 3, 2017 DRAFT 21 number of feedback occasions per packet T̄ which is equivalent to the average experienced delay by higher layer application. T̄ increases almost linearly by increasing L for those two methods resulting in a significantly higher penalty as compared to the the proposed BCF-SAW. In Fig. 11, complementary cumulative density function (ccdf) of packet delivery latency is shown for all the approaches achieving Pout ≤ 10−5 in R5 from Fig. 8. The best case latency performance is achieved using Blind-ReTx and Asym-SAW with q0 = 10−5 . While L-ACK- SAW with L = 4 provides a better latency statistic than BCF-SAW, it fails in the average delay experienced by the higher layer application. This increases number of feedback reporting per packet transmit occasion roughly by L. On the other hand, BCF-SAW uses roughly the same average number of feedback reporting per packet as compared to Reg-SAW while providing higher reliability. By comparison of the presented numerical results in different ultra-reliability operation regions the following observations can be made. • In fairly reliable feedback channel conditions, e.g., lower p regime in region R4, AsymSAW provides high reliability with low T̄ which makes it a viable choice for only when p is ideally low. • In unreliable feedback conditions, e.g., region R5 and higher p regime in R4, BCF-SAW is the most viable solution for ultra-reliable communication with low energy and low cost receiver type where low T̄ is required. For use cases with low latency requirement, LACK-SAW approach performs better if L < M however, it requires relaxed limitations on receiver node energy consumption and assuming low traffic channel (i.e., where high T̄ is tolerated). Otherwise, for L ≥ M, Blind-ReTx performs more efficiently than L-ACK-SAW with less energy consumption for feedback and guaranteed ultra reliability. • In extremely unreliable feedback channel conditions, e.g., region R6, Blind-ReTx is the better choice over Asym-SAW, providing similar performance without the need for feedback channel. V. C ONCLUSIONS We proposed a new method of acknowledging packet delivery for unreliable feedback channel conditions. The proposed method, dubbed BCF-SAW, relies on backwards composite acknowledgement and provides the retransmission protocols with configurable ultra-reliability. It further October 3, 2017 DRAFT 22 ag replacements average number of channel use per packet, N̄ 4 Reg-SAW BCF, L = 2 BCF, L = 4 L-ACK-SAW, L = 2 L-ACK-SAW, L = 4 L-Rep-ACK, L = 2 L-Rep-ACK, L = 4 Asym, q0 = min{10−5 , p} Asym, q0 = min{10−4 , p} 3.5 3 2.5 Blind-ReTx 2 1.5 1 10-1 10-2 10-3 p Figure 10: Average channel use per packet in number of transmit occasions for M = 4, p0 = p1 = p and pe = 0.1. provides the scheduler of the wireless system with new degrees of freedom to configure the communication link in order to meet the desirable reliability requirement even in highly-unreliable feedback channel conditions. The presented numerical analysis show orders of magnitude increase in reliability of the retransmission protocols over the practical range of target block error rate only at the cost of a negligible increase in average experienced packet delay. System-level performance analysis of the proposed method in more realistic multi-user communication systems with time-varying channel conditions will be studied as future work. October 3, 2017 DRAFT 23 100 BCF, L = 4 L-ACK-SAW, L = 4 L-Rep-ACK, L = 4 ag replacements 10-1 Asym-SAW, q0 = 10−5 Blind-ReTx ccdf 10-2 10-3 10-4 10-5 t0 t1 t2 t3 t4 t5 t6 t7 t8 t9 t10 t11 t12 t13 t14 t15 packet delivery latency Figure 11: ccdf of the packet delivery latency at p = 2e − 2 with combining gain g = 1.2, where tk = TTI + k ∗ RTT. R EFERENCES [1] S. Lin et al., “Automatic-repeat-request error-control schemes,” Comm. Mag., vol. 22, no. 12, pp. 5–17, Dec. 1984. [2] “3GPP TR 38.802; study on new radio access technology physical layer aspects,” 3GPP, Tech. Rep., Mar. 2017. [3] “3GPP TS 36.212; evolved universal terrestrial radio access (E-UTRA); multiplexing and channel coding,” 3GPP, Tech. Spec., Dec. 2016, release 10. [4] “3GPP TS 36.213; evolved universal terrestrial radio access (E-UTRA); physical layer procedures,” 3GPP, Tech. Spec., Jan. 2015, release 10. [5] “3GPP TR 36.877; LTE device to device (D2D) proximity services (ProSe),” 3GPP, Tech. Rep., Mar. 2015, release 12. [6] S. R. Khosravirad et al., “Enhanced HARQ design for 5G wide area technology,” in IEEE Vehicular Technology Conference (VTC’16), May 2016. [7] A. Goldsmith, Wireless Communications. October 3, 2017 Cambridge University Press, Aug. 2007. DRAFT
7cs.IT
Under review as a conference paper at ICLR 2017 A RECURRENT NEURAL NETWORK WITHOUT CHAOS James von Brecht Department of Mathematics California State University, Long Beach Long Beach, CA 90840, USA [email protected] arXiv:1612.06212v1 [cs.NE] 19 Dec 2016 Thomas Laurent Department of Mathematics Loyola Marymount University Los Angeles, CA 90045, USA [email protected] A BSTRACT We introduce an exceptionally simple gated recurrent neural network (RNN) that achieves performance comparable to well-known gated architectures, such as LSTMs and GRUs, on the word-level language modeling task. We prove that our model has simple, predicable and non-chaotic dynamics. This stands in stark contrast to more standard gated architectures, whose underlying dynamical systems exhibit chaotic behavior. 1 I NTRODUCTION Gated recurrent neural networks, such as the Long Short Term Memory network (LSTM) introduced by Hochreiter & Schmidhuber (1997) and the Gated Recurrent Unit (GRU) proposed by Cho et al. (2014), prove highly effective for machine learning tasks that involve sequential data. We propose an exceptionally simple variant of these gated architectures. The basic model takes the form ht = θt tanh(ht−1 ) + ηt tanh(W xt ), (1) where stands for the Hadamard product. The horizontal/forget gate (i.e. θt ) and the vertical/input gate (i.e. ηt ) take the usual form used in most gated RNN architectures. Specifically θt := σ (Uθ ht−1 + Vθ xt + bθ ) and ηt := σ (Uη ht−1 + Vη xt + bη ) (2) where σ(x) := (1 + e−x )−1 denotes the logistic sigmoid function. The network (1)–(2) has quite intuitive dynamics. Suppose the data xt present the model with a sequence  10 if t = T (W xt )(i) = (3) 0 otherwise, where (W xt )(i) stands for the ith component of the vector W xt . In other words we consider an input sequence xt for which the learned ith feature (W xt )(i) remains off except at time T . When initialized from h0 = 0, the corresponding response of the network to this “impulse” in the ith feature is  if t < T 0 ht (i) ≈ ηT if t = T (4)  αt if t > T with αt a sequence that relaxes toward zero. The forget gate θt control the rate of this relaxation. Thus ht (i) activates when presented with a strong ith feature, and then relaxes toward zero until the data present the network once again with strong ith feature. Overall this leads to a dynamically simple model, in which the activation patterns in the hidden states of the network have a clear cause and predictable subsequent behavior. Dynamics of this sort do not occur in other RNN models. Instead, the three most popular recurrent neural network architectures, namely the vanilla RNN, the LSTM and the GRU, have complex, irregular, and unpredictable dynamics. Even in the absence of input data, these networks can give rise to chaotic dynamical systems. In other words, when presented with null input data the activation patterns in their hidden states do not necessarily follow a predictable path. The proposed network (1)–(2) has rather dull and minimalist dynamics in comparison; its only attractor is the zero state, 1 Under review as a conference paper at ICLR 2017 and so it stands at the polar-opposite end of the spectrum from chaotic systems. Perhaps surprisingly, at least in the light of this comparison, the proposed network (1) performs as well as LSTMs and GRUs on the word level language modeling task. We therefore conclude that the ability of an RNN to form chaotic temporal dynamics, in the sense we describe in Section 2, cannot explain its success on word-level language modeling tasks. In the next section, we review the phenomenon of chaos in RNNs via both synthetic examples and trained models. We also prove a precise, quantified description of the dynamical picture (3)–(4) for the proposed network. In particular, we show that the dynamical system induced by the proposed network is never chaotic, and for this reason we refer to it as a Chaos-Free Network (CFN). The final section provides a series of experiments that demonstrate that CFN achieve results comparable to LSTM on the word-level language modeling task. All together, these observations show that an architecture as simple as (1)–(2) can achieve performance comparable to the more dynamically complex LSTM. 2 C HAOS IN R ECURRENT N EURAL N ETWORKS The study of RNNs from a dynamical systems point-of-view has brought fruitful insights into generic features of RNNs (Sussillo & Barak, 2013; Pascanu et al., 2013). We shall pursue a brief investigation of CFN, LSTM and GRU networks using this formalism, as it allows us to identify key distinctions between them. Recall that for a given mapping Φ : Rd 7→ Rd , a given initial time t0 ∈ N and a given initial state u0 ∈ Rd , a simple repeated iteration of the mapping Φ ut+1 = Φ(ut ) t > t0 , ut0 = u0 t = t0 , defines a discrete-time dynamical system. The index t ∈ N represents the current time, while the point ut ∈ Rd represents the current state of the system. The set of all visited states O+ (u0 ) := {ut0 , ut0 +1 , . . . , ut0 +n , . . .} defines the forward trajectory or forward orbit through u0 . An attractor for the dynamical system is a set that is invariant (any trajectory that starts in the set remains in the set) and that attracts all trajectories that start sufficiently close to it. The attractors of chaotic dynamical systems are often fractal sets, and for this reason they are referred to as strange attractors. Most RNNs generically take the functional form ut = Ψ(ut−1 , W1 xt , W2 xt , . . . , Wk xt ), (5) th where xt denotes the t input data point. For example, in the case of the CFN (1)–(2), we have W1 = W , W2 = Vθ and W3 = Vη . To gain insight into the underlying design of the architecture of an RNN, it proves usefull to consider how trajectories behave when they are not influenced by any external input. This lead us to consider the dynamical system ut = Φ(ut−1 ) Φ(u) := Ψ(u, 0, 0, . . . , 0), (6) which we refer to as the dynamical system induced by the recurrent neural network. The timeinvariant system (6) is much more tractable than (5), and it offers a mean to investigate the inner working of a given architecture; it separates the influence of input data xt , which can produce essentially any possible response, from the model itself. Studying trajectories that are not influenced by external data will give us an indication on the ability of a given RNN to generate complex and sophisticated trajectories by its own. As we shall see shortly, the dynamical system induced by a CFN has excessively simple and predictable trajectories: all of them converge to the zero state. In other words, its only attractor is the zero state. This is in sharp contrast with the dynamical systems induced by LSTM or GRU, who can exhibit chaotic behaviors and have strange attractors. The learned parameters Wj in (5) describe how data influence the evolution of hidden states at each time step. From a modeling perspective, (6) would occur in the scenario where a trained RNN has learned a weak coupling between a specific data point xt0 and the hidden state at that time, in the sense that the data influence is small and so all Wj xt0 ≈ 0 nearly vanish. The hidden state then transitions according to ut0 ≈ Ψ(ut0 −1 , 0, 0, . . . , 0) = Φ(ut0 −1 ). We refer to Bertschinger & Natschläger (2004) for a study of the chaotic behavior of a simplified vanilla RNN with a specific statistical model, namely an i.i.d. Bernoulli process, for the input data as well as a specific statistical model, namely i.i.d. Gaussian, for the weights of the recurrence matrix. 2 Under review as a conference paper at ICLR 2017 Figure 1: Strange attractor of a 2-unit LSTM. Successive zooms (from left to right) reveal the selfrepeating, fractal nature of the attractor. Colored boxes depict zooming regions. 2.1 C HAOTIC BEHAVIOR OF LSTM AND GRU IN THE ABSENCE OF INPUT DATA In this subsection we briefly show that LSTM and GRU, in the absence of input data, can lead to dynamical systems ut = Φ(ut−1 ) that are chaotic in the classical sense of the term (Strogatz, 2014). Figure 1 depicts the strange attractor of the dynamical system:     h o tanh (f c + i g) ut = t u 7→ Φ(u) = (7) ct f c+i g i := σ(Wi h + bi ) f := σ(Wf h + bf ) o := σ(Wo h + bo ) g := tanh(Wg h + bg ) induced by a two-unit LSTM with weight matrices      −1 −4 4 1 −2 Wi = Wo = Wf = −3 −2 −9 −7 0 6 −6   Wg = −1 6  −6 −9 (8) (9) and zero bias for the model parameters. These weights were randomly generated from a normal distribution with standard deviation 5 and then rounded to the nearest integer. Figure 1(a) was obtained by choosing an initial state u0 = (h0 , c0 ) uniformly at random in [0, 1]2 × [0, 1]2 and plotting the h-component of the iterates ut = (ht , ct ) for t between 103 and 105 (so this figure should be regarded as a two dimensional projection of a four dimensional attractor, which explain its tangled appearance). Most trajectories starting in [0, 1]2 × [0, 1]2 converge toward the depicted attractor. The resemblance between this attractor and classical strange attractors such as the Hénon attractor is striking (see Figure 5 in the appendix for a depiction of the Hénon attractor). Successive zooms on the branch of the LSTM attractor from Figure 1(a) reveal its fractal nature. Figure 1(b) is an enlargement of the red box in Figure 1(a), and Figure 1(c) is an enlargement of the magenta box in Figure 1(b). We see that the structure repeats itself as we zoom in. The most practical consequence of chaos is that the long-term behavior of their forward orbits can exhibit a high degree of sensitivity to the initial states u0 . Figure 2 provides an example of such behavior for the dynamical system (7)–(9). An initial condition u0 was drawn uniformly at random in [0, 1]2 × [0, 1]2 . We then computed 100, 000 small amplitude perturbations û0 of u0 by adding a small random number drawn uniformly from [−10−7 , 10−7 ] to each component. We then iterated (7)–(9) for 200 steps and plotted the h-component of the final state û200 for each of the 100, 000 trials on Figure 2(a). The collection of these 100, 000 final states essentially fills out the entire attractor, despite the fact that their initial conditions are highly localized (i.e. at distance of no more than 10−7 ) around a fixed point. In other words, the time t = 200 map of the dynamical system will map a small neighborhood around a fixed initial condition u0 to the entire attractor. Figure 2(b) additionally illustrates this sensitivity to initial conditions for points on the attractor itself. We take an initial condition u0 on the attractor and perturb it by 10−7 to a nearby initial condition û0 . We then plot the distance kût − ut k between the two corresponding trajectories for the first 200 time steps. After an initial phase of agreement, the trajectories strongly diverge. The synthetic example (7)–(9) illustrates the potentially chaotic nature of the LSTM architecture. We now show that chaotic behavior occurs for trained models as well, and not just for synthetically generated instances. We take the parameter values of an LSTM with 228 hidden units trained on the 3 Under review as a conference paper at ICLR 2017 (a) Final state û200 for 105 trials (b) Distance kût − ut k between 2 trajectories Figure 2: (a): A small neighborhood around a fixed initial condition u0 , after 200 iterations, is mapped to the entire attractor. (b): Two trajectories starting starting within 10−7 of one another strongly diverge after 50 steps. (a) No input data (b) With input data Figure 3: 228-unit LSTM trained on Penn Treebank. (a): In the absence of input data, the system is chaotic and nearby trajectories diverge. (b): In the presence of input data, the system is mostly driven by the external input. Trajectories starting far apart converge. Penn Treebank corpus without dropout (c.f. the experimental section for the precise procedure). We then set all data inputs xt to zero and run the corresponding induced dynamical system. Two trajectories starting from nearby initial conditions u0 and û0 were computed (as before û0 was obtained by adding to each components of u0 a small random number drawn uniformly from [−10−7 , 10−7 ]). Figure 3(a) plots the first component h(1) of the hidden state for both trajectories over the first 1600 time steps. After an initial phase of agreement, the forward trajectories O+ (u0 ) and O+ (û0 ) strongly diverge. We also see that both trajectories exhibit the typical aperiodic behavior that characterizes chaotic systems. If the inputs xt do not vanish, but come from actual word-level data, then the behavior is very different. The LSTM is now no longer an autonomous system whose dynamics are driven by its hidden states, but a time dependent system whose dynamics are mostly driven by the external inputs. Figure 3(b) shows the first component h(1) of the hidden states of two trajectories that start with initial conditions u0 and û0 that are far apart. The sensitivity to initial condition disappears, and instead the trajectories converge toward each other after about 70 steps. The memory of this initial difference is lost. Overall these experiments indicate that a trained LSTM, when it is not driven by external inputs, can be chaotic. In the presence of input data, the LSTM becomes a forced system whose dynamics are dominated by external forcing. Like LSTM networks, GRU can also lead to dynamical systems that are chaotic and they can also have strange attractors. The depiction of such an attractor, in the case of a two-unit GRU, is provided in Figure 6 of the appendix. 2.2 C HAOS - FREE BEHAVIOR OF THE CFN The dynamical behavior of the CFN is dramatically different from that of the LSTM. In this subsection we start by showing that the hidden states of the CFN activate and relax toward zero in a predictable fashion in response to input data. On one hand, this shows that the CFN cannot produce non-trivial dynamics without some influence from data. On the other, this leads to an interpretable model; any non-trivial activations in the hidden states of a CFN have a clear cause emanating from 4 Under review as a conference paper at ICLR 2017 data-driven activation. This follows from a precise, quantified description of the intuitive picture (3)–(4) sketched in the introduction. We begin with the following simple estimate that sheds light on how the hidden states of the CFN activate and then relax toward the origin. Lemma 1. For any T, k > 0 we have   H |hT +k (i)| ≤ Θk |hT (i)| + max |(W xt )(i)| 1 − Θ T ≤t≤T +k where Θ and H are the maximum values of the ith components of the θ and η gate in the time interval [T, T + k], that is: Θ= max T ≤t≤T +k θt (i) and H= max T ≤t≤T +k ηt (i). This estimate shows that if during a time interval [T1 , T2 ] one of (i) the embedded inputs W xt have weak ith feature (i.e. maxT ≤t≤T +k |(W xt )(i)| is small), (ii) or the input gates ηt have their ith component close to zero (i.e. H is small), occurs then the ith component of the hidden state ht will relaxes toward zero at a rate that depends on the value of the ith component the the forget gate. Overall this leads to the following simple picture: ht (i) activates when presented with an embedded input W xt with strong ith feature, and then relaxes toward zero until the data present the network once again with strong ith feature. The strength of the activation and the decay rate are controlled by the ith component of the input and forget gates. The proof of Lemma 1 is elementary — Proof of Lemma 1. Using the non-expansivity of the hyperbolic tangent, i.e. | tanh(x)| ≤ |x|, and the triangle inequality, we obtain from (1) |ht (i)| ≤ Θ |ht−1 (i)| + H max T ≤t≤T +k |(W xt )(i)| whenever t is in the interval [T, T + k]. Iterating this inequality and summing the geometric series then gives   1 − Θk |hT +k (i)| ≤ Θk |hT (i)| + H max |(W xt )(i)| T ≤t≤T +k 1−Θ from which we easily conclude. We now turn toward the analysis of the long-term behavior of the the dynamical system ut = ht , u 7→ Φ(u) := σ (Uθ u + bθ ) tanh(u). (10) induced by a CFN. The following lemma shows that the only attractor of this dynamical system is the zero state. Lemma 2. Starting from any initial state u0 , the trajectory O+ (u0 ) will eventually converge to the zero state. That is, limt→+∞ ut = 0 regardless of the the initial state u0 . Proof. From the definition of Φ we clearly have that the sequence defined by ut+1 = Φ(ut ) satisfies −1 < ut (i) < 1 for all t and all i. Since the sequence ut is bounded, so is the sequence vt := Uθ ut + bθ . That is there exists a finite C > 0 such that (Uθ ut )(i) + bθ (i) < C for all t and i. Using the non-expansivity of the hyperbolic tangent, we then obtain that |ut (i)| ≤ σ(C)|ut−1 (i)|, for all t and all i. We conclude by noting that 0 < σ(C) < 1. Lemma 2 remains true for a multi-layer CFN, that is, a CFN in which the first layer is defined by (1) and the subsequent layers 2 ≤ ` ≤ L are defined by: (`) (`) ht = θt (`) (`) tanh(ht−1 ) + ηt (`−1) tanh(W (`) ht ). Assume that W xt = 0 for all t > T , then an extension of the arguments contained in the proof of the two previous lemmas shows that (`) |hT +k | ≤ C(1 + k)(`−1) Θk 5 (11) Under review as a conference paper at ICLR 2017 where 0 < Θ < 1 is the maximal values for the input gates involved in layer 1 to ` of the network, and C > 0 is some constant depending only on the norms kW (j) k∞ of the matrices and the sizes (j) |hT | of the initial conditions at all previous 1 ≤ j ≤ ` levels. Estimate (11) shows that Lemma 2 remains true for multi-layer architectures. (a) First layer (b) Second layer Figure 4: A 2-layer, 224-unit CFN trained on Penn Treebank. All inputs xt are zero after t = 1000, i.e. the time-point indicated by the dashed line. At left: plot of the 10 “slowest” units of the first layer. At right: plot of the 10 slowest units of the second layer. The second layer retains information much longer than the first layer. Inequality (11) shows that higher levels (i.e. larger `) decay more slowly, and remain non-trivial, while earlier levels (i.e. smaller `) decay more quickly. We illustrate this behavior computationally with a simple experiment. We take a 2-layer, 224-unit CFN network trained on Penn Treebank and feed it the following input data: The first 1000 inputs xt are the first 1000 words of the test set of Penn Treebank; All subsequent inputs are zero. In other words, xt = 0 if t > 1000. For each of the two layers we then select the 10 units that decay the slowest after t > 1000 and plot them on Figure 4. The first layer retains information for about 10 to 20 time steps, whereas the second layer retains information for about 100 steps. This experiment conforms with the analysis (11), and indicates that adding a third or fourth layer would potentially allow a multi-layer CFN architecture to retain information for even longer periods. 3 E XPERIMENTS In this section we show that despite its simplicity, the CFN network achieves performance comparable to the much more complex LSTM network on the word level language modeling task. We use two datasets for these experiments, namely the Penn Treebank corpus (Marcus et al., 1993) and the Text8 corpus (Mikolov et al., 2014). We consider both one-layer and two-layer CFNs and LSTMs for our experiments. We train both CFN and LSTM networks in a similar fashion and always compare models that use the same number of parameters. We compare their performance with and without dropout, and show that in both cases they obtain similar results. We also provide results published in Mikolov et al. (2014), Jozefowicz et al. (2015) and Sukhbaatar et al. (2015) for the sake of comparison. For concreteness, the exact implementation for the two-layer architecture of our model is (0) = W (0) xt (0) = Drop(ht , p) (1) = θt (1) = Drop(ht , p) (2) = θt (2) = Drop(ht , p) ht ĥt ht ĥt ht ĥt (0) (1) (1) (1) tanh(W (1) ĥt ) (2) (2) tanh(W (2) ĥt ) tanh(ht−1 ) + ηt (0) (1) (2) tanh(ht−1 ) + ηt (1) (2) (2) yt = LogSoftmax(W (3) ĥt + b) 6 (12) Under review as a conference paper at ICLR 2017 Table 1: Experiments on Penn Treebank without dropout. Model Vanilla RNN GRU LSTM LSTM (1 layer) CFN (2 layers) Size 5M parameters 5M parameters 5M parameters 5M parameters 5M parameters Training Jozefowicz et al. (2015) Jozefowicz et al. (2015) Jozefowicz et al. (2015) Trained by us Trained by us Val. perp. 108.4 109.3 Test perp. 122.9 108.2 109.7 105.1 106.3 Table 2: Experiments on Text8 without dropout Model Vanilla RNN SCRN LSTM MemN2N LSTM (2 layers) CFN (2 layers) Size 500 hidden units 500 hidden units 500 hidden units 500 hidden units 46.4M parameters 46.4M parameters Training Mikolov et al. (2014) Mikolov et al. (2014) Mikolov et al. (2014) Sukhbaatar et al. (2015) Trained by us Trained by us Perp. on development set 184 161 156 147 139.9 142.0 where Drop(z, p) denotes the dropout operator with a probability p of setting components in z to zero. We compute the gates according to     (`) (`) (`) (`) (`−1) (`) (`) (`−1) θt := σ Uθ h̃t−1 + Vθ h̃t + bθ and ηt := σ Uη(`) h̃t−1 + Vη(`) h̃t + bη (13) where (`) (`) h̃t−1 = Drop(ht−1 , q) and (`−1) h̃t (`−1) = Drop(ht , q), (14) and thus the model has two dropout hyperparameters. The parameter p controls the amount of dropout between layers; the parameter q controls the amount of dropout inside each gate. We use a similar dropout strategy for the LSTM, in that all sigmoid gates f, o and i receive the same amount q of dropout. To train the CFN and LSTM networks, we use a simple online steepest descent algorithm. We update the weights w via ∇w L , (15) w(k+1) = w(k) − lr · p~ where p~ = k∇w Lk2 and ∇w L denotes the approximate gradient of the loss with respect to the weights as estimated from a certain number of presented examples. We use the usual backpropagation through time approximation when estimating the gradient: we unroll the net T steps in the past and neglect longer dependencies. In all experiments, the CFN and LSTM networks are unrolled for T = 35 steps and we take minibatches of size 20. In the case of an exact gradient, the update (15) simply corresponds to making a step of length lr in the direction of steepest descent. As all search directions p~ have Euclidean norm k~ pk2 = 1, we perform no gradient clipping during training. We initialize all the weights in the CFN, except for the bias of the gates, uniformly at random in [−0.07, 0.07]. We initialize the bias bθ and bη of the gates to 1 and −1, respectively, so that at the beginning of the training θt ≈ σ(1) ≈ 0.73 and ηt ≈ σ(−1) ≈ 0.23. We initialize the weights of the LSTM in exactly the same way; the bias for the forget and input gate are initialized to 1 and −1, and all the other weights are initialized uniformly in [−0.07, 0.07]. This initialization scheme favors the flow of information in the horizontal direction. The importance of a careful initialization of the forget gate was first pointed out in Gers et al. (2000) and further emphasized in Jozefowicz et al. (2015). Finally, we initialize all hidden states to zero for both models. Dataset Construction. The Penn Treebank Corpus has 1 million words and a vocabulary size of 10,000. We used the code from Zaremba et al. (2014) to construct and split the dataset into a training set (929K words), a validation set (73K words) and a test set (82K words). The Text8 corpus has 100 million characters and a vocabulary size of 44,000. We used the script from Mikolov et al. (2014) to 7 Under review as a conference paper at ICLR 2017 Table 3: Experiments on Penn Treebank with dropout. Model Vanilla RNN GRU LSTM LSTM (2 layers) CFN (2 layers) LSTM (2 layers) CFN (2 layers) Size 20M parameters 20M parameters 20M parameters 20M parameters 20M parameters 50M parameters 50M parameters Training Jozefowicz et al. (2015) Jozefowicz et al. (2015) Jozefowicz et al. (2015) Trained by us Trained by us Trained by us Trained by us Val. perp. 103.0 95.5 83.3 78.4 79.7 75.9 77.0 Test perp. 97.7 91.7 78.8 74.3 74.9 71.8 72.2 construct and split the dataset into a training set (first 99M characters) and a development set (last 1M characters). Experiments without Dropout. Tables 1 and 2 provide a comparison of various recurrent network architectures without dropout evaluated on the Penn Treebank corpus and the Text8 corpus. The last two rows of each table provide results for LSTM and CFN networks trained and initialized in the manner described above. We have tried both one and two layer architectures, and reported only the best result. The learning rate schedules used for each network are described in the appendix. We also report results published in Jozefowicz et al. (2015) were a vanilla RNN, a GRU and an LSTM network were trained on Penn Treebank, each of them having 5 million parameters (only the test perplexity was reported). Finally we report results published in Mikolov et al. (2014) and Sukhbaatar et al. (2015) where various networks are trained on Text8. Of these four networks, only the LSTM network from Mikolov et al. (2014) has the same number of parameters than the CFN and LSTM networks we trained (46.4M parameters). The vanilla RNN, Structurally Constrained Recurrent Network (SCRN) and End-To-End Memory Network (MemN2N) all have 500 units, but less than 46.4M parameters. We nonetheless indicate their performance in Table 2 to provide some context. Experiments with Dropout. Table 3 provides a comparison of various recurrent network architectures with dropout evaluated on the Penn Treebank corpus. The first three rows report results published in (Jozefowicz et al., 2015) and the last four rows provide results for LSTM and CFN networks trained and initialized with the strategy previously described. The dropout rate p and q are chosen as follows: For the experiments with 20M parameters, we set p = 55% and q = 45% for the CFN and p = 60% and q = 40% for the LSTM; For the experiments with 50M parameters, we set p = 65% and q = 55% for the CFN and p = 70% and q = 50% for the LSTM. 4 C ONCLUSION Despite its simple dynamics, the CFN obtains results that compare well against LSTM networks and GRUs on word-level language modeling. This indicates that it might be possible, in general, to build RNNs that perform well while avoiding the intricate, uninterpretable and potentially chaotic dynamics that can occur in LSTMs and GRUs. Of course, it remains to be seen if dynamically simple RNNs such as the proposed CFN can perform well on a wide variety of tasks, potentially requiring longer term dependencies than the one needed for word level language modeling. The experiments presented in Section 2 indicate a plausible path forward — activations in the higher layers of a multi-layer CFN decay at a slower rate than the activations in the lower layers. In theory, complexity and long-term dependencies can therefore be captured using a more “feed-forward” approach (i.e. stacking layers) rather than relying on the intricate and hard to interpret dynamics of an LSTM or a GRU. Overall, the CFN is a simple model and it therefore has the potential of being mathematically wellunderstood. In particular, Section 2 reveals that the dynamics of its hidden states are inherently more interpretable than those of an LSTM. The mathematical analysis here provides a few key insights into the network, in both the presence and absence of input data, but obviously more work is needed before a complete picture can emerge. We hope that this investigation opens up new avenues of inquiry, and that such an understanding will drive subsequent improvements. 8 Under review as a conference paper at ICLR 2017 R EFERENCES Nils Bertschinger and Thomas Natschläger. Real-time computation at the edge of chaos in recurrent neural networks. Neural computation, 16(7):1413–1436, 2004. Kyunghyun Cho, Bart Van Merriënboer, Caglar Gulcehre, Dzmitry Bahdanau, Fethi Bougares, Holger Schwenk, and Yoshua Bengio. Learning phrase representations using rnn encoder-decoder for statistical machine translation. arXiv preprint arXiv:1406.1078, 2014. Felix A Gers, Jürgen Schmidhuber, and Fred Cummins. Learning to forget: Continual prediction with lstm. Neural computation, 12(10):2451–2471, 2000. Michel Hénon. A two-dimensional mapping with a strange attractor. Communications in Mathematical Physics, 50(1):69–77, 1976. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 9(8): 1735–1780, 1997. Rafal Jozefowicz, Wojciech Zaremba, and Ilya Sutskever. An empirical exploration of recurrent network architectures. In Proceedings of the 32nd International Conference on Machine Learning, 2015. Mitchell P Marcus, Mary Ann Marcinkiewicz, and Beatrice Santorini. Building a large annotated corpus of english: The penn treebank. Computational linguistics, 19(2):313–330, 1993. Tomas Mikolov, Armand Joulin, Sumit Chopra, Michael Mathieu, and Marc’Aurelio Ranzato. Learning longer memory in recurrent neural networks. arXiv preprint arXiv:1412.7753, 2014. Razvan Pascanu, Tomas Mikolov, and Yoshua Bengio. On the difficulty of training recurrent neural networks. ICML (3), 28:1310–1318, 2013. Steven H Strogatz. Nonlinear dynamics and chaos: with applications to physics, biology, chemistry, and engineering. Westview press, 2014. Sainbayar Sukhbaatar, Jason Weston, Rob Fergus, et al. End-to-end memory networks. In Advances in neural information processing systems, pp. 2440–2448, 2015. David Sussillo and Omri Barak. Opening the black box: low-dimensional dynamics in highdimensional recurrent neural networks. Neural computation, 25(3):626–649, 2013. Wojciech Zaremba, Ilya Sutskever, and Oriol Vinyals. Recurrent neural network regularization. arXiv preprint arXiv:1409.2329, 2014. 9 Under review as a conference paper at ICLR 2017 A PPENDIX Strange attractor of the Hénon map. For the sake of comparison, we provide in Figure 5 a depiction of a well-known strange attractor (the Hénon attractor) arising from a discrete-time dynamical system. We generate these pictures by reproducing the numerical experiments from Hénon (1976). The discrete dynamical system considered here is the two dimensional map xt+1 = yt + 1 − ax2t , yt+1 = bxt , with parameters set to a = 1.4 and b = 0.3. We obtain Figure 5(a) by choosing the initial state (x0 , y0 ) = (0, 0) and plotting the iterates (xt , yt ) for t between 103 and 105 . All trajectories starting close to the origin at time t = 0 converge toward the depicted attractor. Successive zooms on the branch of the attractor reveal its fractal nature. The structure repeats in a fashion remarkably similar to the 2-unit LSTM in Section 2. Figure 5: Strange attractor of the Hénon map. From left to right: The Hénon attractor, enlargement of the red box, enlargement of the magenta box. Strange attractor of a 2-unit GRU. As with LSTMs, the GRU gated architecture can induce a chaotic dynamical system. Figure 6 depicts the strange attractor of the dynamical system ut = ht , u 7→ Φ(u) := (1 − z) u + z tanh (U (r z := σ (Wz u + bz ) r := σ (Wr u + br ) , u)) induced by a two-dimensional GRU, with weight matrices       0 1 0 1 −5 −8 Wz = Wr = U= 1 1 1 0 8 5 and zero bias for the model parameters. Here also successive zooms on the branch of the attractor reveal its fractal nature. As in the LSTM, the forward trajectories of this dynamical system exhibit a high degree of sensitivity to initial states. Figure 6: Strange attractor of a two-unit GRU. Successive zooms reveal the fractal nature of the attractor. 10 Under review as a conference paper at ICLR 2017 Network sizes and learning rate schedules used in the experiments. In the Penn Treebank experiment without dropout (Table 1), the CFN network has two hidden layers of 224 units each for a total of 5 million parameters. The LSTM has one hidden layer with 228 units for a total of 5 million parameters as well. We also tried a two-layer LSTM with 5 million parameters but the result was worse (test perplexity of 110.6) and we did not report it in the table. For the Text8 experiments (Table 2), the LSTM has two hidden layers with 481 hidden units for a total 46.4 million parameters. We also tried a one-layer LSTM with 46.4 million parameters but the result was worse (perplexity of 140.8). The CFN has two hidden layers with 495 units each, for a total of 46.4 million parameters as well. For both experiments without dropout (Table 1 and 2), we used a simple and aggressive learning rate schedule: at each epoch, lr is divided by 3. For the CFN the initial learning rate was chosen to be lr0 = 5.5 for PTB and lr0 = 5 for Text8. For the LSTM we chose lr0 = 7 for PTB and lr0 = 5 for Text8. In the Penn Treebank experiment with dropout (Table 3), the CFN with 20M parameters has two hidden layers of 731 units each and the LSTM with 20M parameters trained by us has two hidden layers of 655 units each. We also tried a one-layer LSTM with 20M parameters and it led to similar but slightly worse results than the two-layer architecture. For both network, the learning rate was divided by 1.1 each time the validation perplexity did not decrease by at least 1%. The initial learning rate were chosen to be lr0 = 7 for the CFN and lr0 = 5 for the LSTM. 11
9cs.NE
Hall polynomials for the torsion free nilpotent groups of Hirsch length at most 5 arXiv:1605.01591v2 [math.GR] 1 Sep 2016 Bettina Eick and Ann-Kristin Engel November 30, 2017 Abstract A theorem by Hall asserts that the multiplication in torsion free nilpotent groups of finite Hirsch length can be facilitated by polynomials. In this note we exhibit explicit Hall polynomials for the torsion free nilpotent groups of Hirsch length at most 5. 1 Introduction Let T denote the class of torsion free finitely generated nilpotent groups. By [7, p. 137], each T -group has a central series with infinite cyclic quotients. The length of such a central series is the Hirsch length of the group; see [7, p. 152] for background. Let G be a group. We say that a sequence of elements (g1 , . . . , gn ) is a T -basis for G if the subgroups Gi = hgi , . . . , gn i for 1 ≤ i ≤ n + 1 define a central series G = G1 > G2 > . . . > Gn > Gn+1 = {1} with infinite quotients Gi /Gi+1 for 1 ≤ i ≤ n. The construction implies that each quotient Gi /Gi+1 is cyclic and generated by gi Gi+1 . It is not difficult to observe that a group G has a T -basis of length n if and only if G is T -group of Hirsch length n. We note that a T -basis (g1 , . . . , gn ) of a T -group G is a polycyclic sequence for G in the sense of [5, Sec. 8.1]. Thus as in [5, Lemma 8.3], it follows that each element g of G can be written uniquely as g = g1a1 · · · gnan for certain a1 , . . . , an ∈ Z. Hence the T -basis induces a bijection β : Zn → G : (a1 , . . . , an ) → g1a1 · · · gnan . The bijection β is not a group homomorphism in general. More precisely, β translates the multiplication in G to certain functions pi : Zn × Zn → Z for 1 ≤ i ≤ n with p (a,b) (g1a1 · · · gnan ) · (g1b1 · · · gnbn ) = g1 1 · · · gnpn (a,b) . A fundamental theorem by Hall [3, 4] asserts that each function pi (a, b) can be described by a polynomial. These polynomials are nowadays called Hall polynomials. Our aim here is to determine Hall polynomials for all T -groups of Hirsch length at most 5. Methods to compute Hall polynomials for a fixed T -group given by a consistent polycyclic presentation have been exhibited by Sims [8, page 441ff] and by Leedham-Green & Soicher [6]. Our method is based on the approach by Sims and uses this in a generic form so that it applies to the infinitely many T -groups of Hirsch length at most 5 simultaneously. An application of the Hall polynomials determined here is the classification of the torsion free nilpotent groups of Hirsch length at most 5 as described in [2]. 1 2 Nilpotent presentations and consistency As a first step towards our aim we exhibit consistent nilpotent presentations for the T groups of Hirsch length at most 5. We refer to [5, Sec. 8.1] for details on this type of n presentation. For n ∈ N and t = (tijk | 1 ≤ i < j < k ≤ n) ∈ Z( 3 ) we denote t t i,j,j+1 G(t) = hg1 , . . . , gn | [gj , gi ] = gj+1 · · · gni,j,n for 1 ≤ i < j ≤ ni. Then the presentation defining G(t) is a polycyclic presentation and the relation imply that G(t) is a nilpotent group of Hirsch length at most n. This presentation is consistent if and only if G(t) has Hirsch length precisely n, or, equivalently, if the generators of the presentation form a T -basis for G(t). 1 Lemma: Let G be a T -group of Hirsch length 5 and let (h1 , . . . , h5 ) be a T -basis for G. Then there exist a unique t ∈ Z10 so that the map G(t) → G : gi 7→ hi extends to an isomorphism. This t satisfies the relations t123 t345 = 0 and t124 t345 + t145 t234 = t134 t245 . Proof: We first construct a suitable t ∈ Z10 . The definition of T -basis implies directly that [hj , hi ] ∈ Gj+1 for each 1 ≤ i < j ≤ 5. As each element of Gj+1 can be written (uniquely) aj+1 as hj+1 · · · ha55 , this yields that there exist (unique) tijk with t t i,j,j+1 [hj , hi ] = hj+1 · · · h5i,j,5 for 1 ≤ i < j ≤ 5. Using this constructed t ∈ Z10 then induces that the map G(t) → G : gi 7→ hi is an epimorphism. It is an isomorphism, as G has Hirsch length 5 and G(t) has at most Hirsch length 5. We now observe that the restrictions on t are satisfied. For this purpose we evaluate the equation (h4 h2 )h1 = h4 (h2 h1 ) in G and obtain that (h4 h2 )h1 = (h2 h4 ht5245 )h1 = h1 hh2 1 hh4 1 ht5245 = h1 h2 ht3123 ht4124 ht5125 h4 ht5145 ht5245 = h1 h2 ht3123 ht4124 +1 ht5125 +t145 +t245 and h4 (h2 h1 ) = h4 (h1 h2 ht3123 ht4124 ht5125 ) = h1 h4 h2 ht3123 ht4124 ht5125 +t145 = h1 h2 h4 ht3123 ht4124 ht5125 +t145 +t245 = h1 h2 ht3123 ht4124 +1 h5t125 +t145 +t245 +t123 t345 . Comparison of the two results yields that t123 t345 = 0. Evaluating the equation (h3 h2 )h1 = h3 (h2 h1 ) in a similar form yields that t124 t345 + t145 t234 = t134 t245 . • As a next step, we show that the restrictions on t in Lemma 1 yield that the presentation defining G(t) is consistent. n 2 Lemma: Let n ∈ {1, . . . , 5} and t ∈ Z( 3 ) . (a) Let n ≤ 4. Then the presentation defining G(t) is consistent. 2 (b) Let n = 5. Then the presentation defining G(t) is consistent if and only if t123 t345 = 0 and t124 t345 + t145 t234 = t134 t245 . Proof: We prove (b) only and note that (a) follows by a similar (and easier) calculation. ⇒: Suppose that G(t) is consistent. Then the generators of this presentation form a T basis for G(t). Thus Lemma 1 yields the result. ⇐: Suppose that t ∈ Z10 with t123 t345 = 0 and t124 t345 + t145 t234 = t134 t245 is given. We show that G(t) is consistent in this case. For this purpose we evaluate the finitely many consistency relations, see [8, page 424] (or [1, Lemma 2.10]). In the case considered here, these consistency relations have the form (gk gj )gi = gk (gj gi ) for 1 ≤ i < j < k ≤ 5, and gk = (gk gi−1 )gi for 1 ≤ i < k ≤ 5. It is not difficult to observe that these relations always hold if k = 5, since g5 is central in G. Hence it remains to consider the relations (R1) (g4 g3 )g1 = g4 (g3 g1 ), (R2) (g4 g2 )g1 = g4 (g2 g1 ), (R3) (g3 g2 )g1 = g3 (g2 g1 ), (R4) (g4 g3 )g2 = g4 (g3 g2 ), (R5) g2 = (g2 g1−1 )g1 , (R6) g3 = (g3 g1−1 )g1 , (R7) g4 = (g4 g1−1 )g1 , (R8) g3 = (g3 g2−1 )g2 , (R9) g4 = (g4 g2−1 )g2 , (R10) g4 = (g4 g3−1 )g3 . The relations (R1) - (R4) can be evaluated similar to the proof of Lemma 1 and are satisfied due to the equations imposed on the exponents tijk . For the relations (R5) (R10) we note that g4 g1−1 = g1−1 g4 g5−t145 , g3 g1−1 = g1−1 g3 g4−t134 g5t134 t145 −t135 , g2 g1−1 = g1−1 g2 g3−t123 g4t123 t134 −t124 g5−t123 t134 t145 +t123 t135 +t124 t145 −t125 , g4 g2−1 = g2−1 g4 g5−t245 , g3 g2−1 = g2−1 g3 g4−t234 g5t234 t245 −t235 , g3 g2−1 = g2−1 g3 g5−t235 . These conjugates allow to evaluate the relations (R5)-(R10) and thus to determine that the presentation of G(t) is consistent. • 3 3 Hall polynomials Next, we consider Hall polynomials for the T -groups of Hirsch length at most 5. We assume that the considered groups are given by consistent presentations of the form G(t) as exhibited in Section 2. We denote s2 (x) = x(x − 1)/2 and s3 (x) = x(x − 1)(x − 2)/6. 3 Theorem: Let t ∈ Z10 so that G(t) is consistent. Then the multiplication in G(t) can be described by Hall polynomials pi (a, b) with 1 ≤ i ≤ 5 and such polynomials are given by p 1 = a 1 + b1 , p 2 = a 2 + b2 , p3 = a3 + b3 + t123 a2 b1 , p4 = a4 + b4 + t124 a2 b1 + t134 a3 b1 + t234 a3 b2 +t123 t134 a2 s2 (b1 ) + t123 t234 s2 (a2 )b1 + t123 t234 a2 b1 b2 , p5 = a5 + b5 + t345 a4 b3 + t245 a4 b2 + t235 a3 b2 + t145 a4 b1 + t135 a3 b1 + t125 a2 b1 +t234 t345 s2 (a3 )b2 + t234 t245 a3 s2 (b2 ) + t134 t345 s2 (a3 )b1 + t134 t145 a3 s2 (b1 ) +t234 t345 a3 b2 b3 + t134 t345 a3 b1 b3 + t134 t245 a3 b1 b2 + t124 t345 a2 b1 b3 +t124 t345 a2 a3 b1 + (t123 t235 + t124 t245 )a2 b1 b2 +(t123 t235 + t124 t245 )s2 (a2 )b1 + (t123 t135 + t124 t145 )a2 s2 (b1 ) +t123 t234 t245 a2 b1 s2 (b2 ) + t123 t134 t245 s2 (a2 )s2 (b1 ) + t123 t234 t245 s3 (a2 )b1 +t123 t134 t145 a2 s3 (b1 ) + t123 t234 t245 s2 (a2 )b1 b2 + t123 t134 t245 a2 s2 (b1 )b2 . Proof: We use the approach of Sims [8, page 441ff] to determine the desired polynomials. As a first step, we determine the polynomials ri,j,k with r i,j,i+1 gix gjy = gjy gix gi+1 (x,y) r · · · gni,j,n (x,y) for 1 ≤ j < i ≤ 5 and all x, y ∈ Z. Using [7, 5.1.5], we note that the following conditions hold for arbitrary group elements g, h and x ∈ Z: (1) [[g, h], g] = 1 implies that [g x , h] = [g, h]x , (2) [[g, h], h] = 1 implies that [g, hx ] = [g, h]x , (3) [[g, h], g] = [[g, h], h] = 1 implies that (gh)x = gx hx [g, h]s2 (x) . As [g4 , gi ] is central in G(t), we thus obtain that g4x g1y = g1y g4x [g4x , g1y ] = g1y g4x [g4 , g1y ]x = g1y g4x [g4 , g1 ]xy = g1y g4x g5xyt145 , g4x g2y = g2y g4x g5xyt245 , g4x g3y = g3y g4x g5xyt345 . 4 Next, we compute the equations for g3x g1y and g3x g2y in two steps. First, we show that induction on y yields that gy yt135 +s2 (y)t134 t145 (∗) g31 = g3 g4yt134 g5 . This equation is clearly valid for y = 0 and y = 1. Assume that it is valid for y − 1. Then gy g31 g y−1 g1 = (g31 ) (y−1)t134 (y−1)t235 +s2 (y−1)t134 t145 g1 g5 ) g1 g1 (y−1)t134 g1 (y−1)t135 +s2 (y−1)t134 t145 g3 (g4 ) (g5 ) t134 t135 t145 (y−1)t134 (y−1)t134 +s2 (y−1)t134 t145 g3 g4 g5 (g4 g5 ) g5 (y−1)t134 (y−1)t134 t145 (y−1)t135 +s2 (y−1)t134 t145 g3 g4t134 g5t135 g4 g5 g5 yt134 yt135 +s2 (y−1)t134 t145 +(y−1)t134 t145 g3 g4 g5 yt +((y−2)(y−1)/2)t134 t145 +(y−1)t134 t145 g3 g4yt134 g5 135 yt +(y(y−1)/2)t134 t135 g3 g4yt134 g5 135 yt +s (y)t t g3 g4yt134 g5 135 2 134 135 . = (g3 g4 = = = = = = = gy This proves the desired formula for y ≥ 0. An analogue computation leads to g31 = yt +s (y)t t g3 g4yt134 g5 135 2 134 145 for y ≤ 0. gy y Next note that (g3x )g1 = (g31 )x holds. Hence (3) and (∗) yield y (g3x )g1 gy = (g31 )x yt135 +s2 (y)t134 t145 x = (g3 g4yt134 g5 = = = ) xyt +xs (y)t t (g3 g4yt134 )x g5 135 2 134 145 xyt +xs (y)t t g3x g4xyt134 [g3 , g4 ]s2 (x)yt134 g5 135 2 134 145 s (x)yt134 t345 +xyt135 +xs2 (y)t134 t145 g3x g4xyt134 g52 . Using this and the similar calculation for g3x g2y we obtain that s (x)yt134 t345 +xyt135 +xs2 (y)t134 t145 g3x g1y = g1y g3x g4xyt134 g52 g3x g2y = , s (x)yt234 t345 +xyt235 +xs2 (y)t234 t245 g2y g3x g4xyt234 g52 . We have now determined all polynomials rijk in the subgroup G2 = hg2 , . . . , g5 i. Based on this, we can use collection to determine the Hall polynomials of G2 with this: ga gb = g2a2 g3a3 g4a4 g5a5 g2b2 g3b3 g4b4 g5b5 = g2a2 g3a3 g2b2 g4a4 g5a4 b2 t245 g5a5 g3b3 g4b4 g5b5 s (a3 )b2 t234 t345 +a3 b2 t235 +a3 s2 (b2 )t134 t245 a4 b2 t245 +a5 b3 b4 b5 g5 g3 g4 g5 a2 +b2 a3 +b3 a3 b2 t234 +a4 b3 a3 b2 t234 t345 +b3 a4 t345 g2 g3 g4 g5 s2 (a3 )b2 t234 t345 +a3 b2 t235 +a3 s2 (b2 )t134 t245 +a4 b2 t245 +a5 b4 b5 g5 g4 g5 a2 +b2 a3 +b3 a3 b2 t234 +a4 +b4 g2 g3 g4 b3 a3 b2 t234 t345 +b3 a4 t345 +s2 (a3 )b2 t234 t345 +a3 b2 t235 +a3 s2 (b2 )t134 t245 +a4 b2 t245 +a5 +b5 g5 . = g2a2 +b2 g3a3 g4a3 b2 t234 +a4 g52 = = 5 Thus the the multiplication in G2 is given by f (a,b) g2a2 · · · g5a5 · g2b2 · · · g5b5 = g22 f (a,b) · · · g55 with f2 (a, b) = a2 + b2 , f3 (a, b) = a3 + b3 , f4 (a, b) = a4 + b4 + a3 b2 t234 , f5 (a, b) = a5 + b5 + a3 b2 t235 + a4 b2 t245 + a4 b3 t345 +a3 s2 (b2 )t234 t245 + s2 (a3 )b2 t234 t345 + a3 b2 b3 t234 t345 . Further, these multiplication polynomials allow to determine powering polynomials for G2 . The resulting polynomials with k (a,x) (g2a2 · · · g5a5 )x = g2 2 k (a,x) · · · g5 5 are given by k2 (a, x) = f2 (k2 (a, x − 1), a) = k2 (a, x − 1) + a2 .. . = k2 (a, 1) + (x − 1)a2 = xa2 , k3 (a, x) = f3 (k3 (a, x − 1), a) = k3 (a, x − 1) + a3 .. . = k3 (a, 1) + (x − 1)a3 = xa3 , k4 (a, x) = f4 (k4 (a, x − 1), a) = k4 (a, x − 1) + a4 + k3 (a, x − 1)a2 t234 = k4 (a, x − 1) + a4 + (x − 1)a3 a2 t234 = k4 (a, x − 2) + 2a4 + (x − 1 + x − 2)a3 a2 t234 .. . x−1 X i)a3 a2 t234 = k4 (a, 1) + (x − 1)a4 + ((x − 1)x − i=1 = xa4 + s2 (x)a2 a3 t234 , k5 (a, x) = f5 (k5 (a, x − 1)) 6 = k5 (a, x − 1) + a5 + k3 (a, x − 1)a2 t235 + k4 (a, x − 1)a2 t245 +k4 (a, x − 1)a3 t345 + k3 (a, x − 1)s2 (a2 )t234 t245 +s2 (k3 (a, x − 1))a2 t234 t345 + k3 (a, x − 1)a2 a3 t234 t345 = k5 (a, x − 1) + a5 + (x − 1)a3 a2 t235 + ((x − 1)a4 + s2 (x − 1)a2 a3 t234 )a2 t245 +((x − 1)a4 + s2 (x − 1)a2 a3 t234 )a3 t345 + (x − 1)a3 s2 (a2 )t234 t245 +(a23 s2 (x − 1) + (x − 1)s2 (a3 ))a2 t234 t345 + (x − 1)a3 a2 a3 t234 t345 = k5 (a, x − 2) + 2a5 + (x − 1 + x + 1)(a2 a3 t235 + a2 a4 t245 + a3 a4 t345 ) +(s2 (x − 2) + s2 (x − 2))(a22 a3 t234 t245 + a2 a23 t234 t345 + a23 a2 t234 t345 ) +(x − 1 + x − 2)(s2 (a3 )a2 t234 t345 + a2 a23 t234 t345 + s2 (a2 )t234 t345 ) = ··· .. . = k5 (a, 1) + (x − 1)a5 s2 (x)(a2 a3 t235 + a2 a4 t245 + a3 a4 t345 ) +s3 (x)(a22 a3 t234 t245 + a2 a23 t234 t345 + a23 a2 t234 t345 ) +s2 (x)(s2 (a3 )a2 t234 t345 + a2 a23 t234 t345 + s2 (a2 )t234 t345 ) = xa5 + s2 (x)(a2 a3 t235 + a2 a4 t245 + a3 a4 t345 ) +s2 (x)a2 a3 t234 (t245 ((2x − 1)a2 − 3) + t345 ((4x + 1)a3 − 3))/6. We now consider the computation for g2x g1y . This is done in two steps. At first we invesgy r(y) s(y) t(y) tigate the conjugate g21 and write this as g2 g3 g4 g5 for polynomials r(y), s(y), t(y). We determine these recursively using the polynomials f2 , . . . , f5 : y (g2 )g1 y−1 = ((g2 )g1 )g1 r(y−1) s(y−1) t(y−1) g1 g4 g5 ) g1 g1 r(y−1) g1 s(y−1) g1 t(y−1) g2 (g3 ) (g4 ) (g5 ) t123 t124 t125 r(y−1) r(y−1)t134 s2 (r(y−1))t134 t345 +r(y−1)t135 s(y−1) s(y−1)t145 g2 g3 g4 g5 g3 g4 g5 g4 g5 t(y−1) g5 r(y−1) r(y−1)t134 +s(y−1) (g2 g3t123 g4t124 g5t125 )(g3 g4 s2 (r(y−1))t134 t345 +r(y−1)t135 +s(y−1)t145 +t(y−1) g5 ) t +r(y−1) t124 +r(y−1)t134 +s(y−1) g21+0 g3123 g4 t125 +t(y−1)+s2 (r(y−1))t134 t345 +r(y−1)t135 +s(y−1)t145 +t124 r(y−1)t345 g5 . = (g2 g3 = = = = We obtain the following conditions: r(y) = r(y − 1) + t123 , s(y) = s(y − 1) + t124 + r(y − 1)t134 , t(y) = t(y − 1) + t125 + s2 (r(y − 1))t134 t345 + r(y − 1)(t124 t345 + t135 ) + s(y − 1)t145 . Solving these recursions and using that t123 t345 = 0 yields r(y) = r(y − 1) + t123 7 = r(y − 2) + t123 + t123 .. . = r(1) + (y − 1)t123 = yt123 , s(y) = s(y − 1) + t124 + (y − 1)t123 t134 = s(y − 2) + 2t124 + (y − 1 + y − 2)t123 t134 .. . y−1 X i)t123 t134 = s(1) + (y − 1)t124 + ((y − 1)y − i=1 = yt124 + (y(y − 1)/2)t123 t134 = yt124 + s2 (y)t123 t134 , t(y) = t(y − 1) + t125 + (t2123 s2 (y − 1) + (y − 1)s2 (t123 ))t134 t345 +(y − 1)t123 (t124 t345 + t135 ) + (y − 1)t124 t145 + s2 (y − 1)t123 t134 t145 = t(y − 2) + 2t125 + (s2 (y − 1) + s2 (y − 2))t2123 t134 t345 +(y − 1 + y − 2)s2 (t123 )t134 t345 + (y − 1 + y − 2)t123 (t124 t345 + t135 ) +(y − 1 + y − 2)t124 t145 + (s2 (y − 1) + s2 (y − 2))t123 t134 t145 = ··· .. . = t(1) + (y − 1)t125 +(y(y − 1)/2)(s2 (t123 )t134 t345 + t123 (t124 t345 + t135 ) + t124 t145 ) y−1 X s2 (i))t123 t134 (t123 t345 + t145 ) +( i=1 = yt125 + s2 (y)(s2 (t123 )t345 t134 + t123 (t124 t345 + t135 ) + t124 t145 ) +s3 (y)t123 t134 (t123 t345 + t145 ) = yt125 + s2 (y)(t123 t135 + t124 t145 ) + s3 (y)t123 t134 t145 . Using the polynomials k2 , . . . , k5 we now determine gy r(y) s(y) t(y) x g4 g5 ) g2x g1y = g1y (g21 )x = g1y (g2 g3 R(x,y) S(x,y) T (x,y) g4 g5 = g1y g2x g3 with R(x, y) = xr(y) = xyt123 , S(x, y) = xs(y) + s2 (x)r(y)t234 = xyt124 + xs2 (y)t123 t134 + s2 (x)yt123 t234 , T (x, y) = xt(y) + s2 (x)(r(y)t235 + s(y)t245 + r(y)s(y)t345 ) +s2 (x)r(y)t234 (t245 ((2x − 1) − 3) + t345 ((4x + 1)r(y) − 3))/6. 8 Thus we have determined all polynomials ri,j,k . Based on these, one can use the following GAP program to perform a symbolic collection and thus obtain p1 , . . . , p5 . This program assumes that r and t are global variables so that r[i][j][k] contains the polynomial rijk and t[i][j][k] is the indeterminate tijk . CollectSymbolic := function( ) local a, b, v, stack, c, i, j, k, m; # initiate variables a := List([1..5], x -> Indeterminate(Rationals, Concatenation("a",String(x)))); b := List([1..5], x -> Indeterminate(Rationals, Concatenation("b",String(x)))); v := StructuralCopy(a); v[5] := v[5] + b[5]; stack := Reversed(List([1..4], x -> [x, b[x]])); # perform collection until stack is empty while Length(stack) > 0 do c := stack[Length(stack)]; Unbind(stack[Length(stack)]); if c[2] <> 0*c[2] then i := c[1]; v[i] := v[i] + c[2]; for j in Reversed([i+1..4]) do for k in Reversed([1..Length(r[i][j])]) do m := StructuralCopy(r[i][j][k]); m[2] := Value(m[2], [x,y], [v[j], c[2]]); if m[1] = 5 then v[5] := v[5] + m[2]; elif m[2] <> 0*m[2] then Add(stack, m); fi; od; v[j] := 0; od; fi; od; # divide by consistency relations to simplify polynomial v[5] := PolynomialReduction(v[5], [t[1][2][3]*t[3][4][5]], MonomialLexOrdering())[1]; return v; end; • 9 If G is a T -group of Hirsch length n < 5, then Hall polynomials for G can also be read off from Theorem 3: These are given by p1 , . . . , pn . References [1] B. Eick. Algorithms for polycyclic groups. Habilitationsschrift, Universität Kassel, 2001. [2] B. Eick and A.-K. Engel. The torsion free nilpotent groups of hirsch length at most 5. Submitted, 2016. [3] P. Hall. The Edmonton notes on nilpotent groups. Queen Mary College Mathematics Notes. Mathematics Department, Queen Mary College, London, 1969. [4] P. Hall. The collected works of Philip Hall. Oxford Science Publications. The Clarendon Press Oxford University Press, New York, 1988. Compiled and with a preface by K. W. Gruenberg and J. E. Roseblade, With an obituary by Roseblade. [5] D. F. Holt, B. Eick, and E. A. O’Brien. Handbook of computational group theory. Discrete Mathematics and its Applications (Boca Raton). Chapman & Hall/CRC, Boca Raton, FL, 2005. [6] C. R. Leedham-Green and L. H. Soicher. Symbolic collection using Deep Thought. LMS J. Comput. Math., 1:9 – 24, 1998. [7] D. J. S. Robinson. A course in the theory of groups. Springer, Graduate texts in mathematics 80, 1982. [8] C. C. Sims. Computation with finitely presented groups. Cambridge University Press, Cambridge, 1994. 10
4math.GR
Logical Methods in Computer Science Vol. 1 (1:4) 2005, pp. 1–22 www.lmcs-online.org Submitted Published Sep. 17, 2004 Apr. 21, 2005 CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED ALAN JEFFREY a AND JULIAN RATHKE b a Bell Labs, Lucent Technologies, and CTI, DePaul University e-mail address: [email protected] b School of Informatics, University of Sussex e-mail address: [email protected] A BSTRACT. The higher-order π-calculus is an extension of the π-calculus to allow communication of abstractions of processes rather than names alone. It has been studied intensively by Sangiorgi in his thesis where a characterisation of a contextual equivalence for higher-order π-calculus is provided using labelled transition systems and normal bisimulations. Unfortunately the proof technique used there requires a restriction of the language to only allow finite types. We revisit this calculus and offer an alternative presentation of the labelled transition system and a novel proof technique which allows us to provide a fully abstract characterisation of contextual equivalence using labelled transitions and bisimulations for higher-order π-calculus with recursive types also. 1. I NTRODUCTION It is evident that there is growing interest in the study of mobile code in process languages [3, 1, 9, 15]. It is also clear that there is some relationship between the use of higher-order features and mobility. Indeed, code mobility can be expressed as communication of process abstractions. For this reason then it is important for us to develop a clear understanding of the use of higher-order features in process languages. Work towards this began several years ago with various proposals for higher-order versions of known calculi [14, 4], including the higher-order π-calculus or HOπ [10]. This calculus was studied intensively by Sangiorgi and one of his achievements was to provide a translation of the higherorder language which supports code mobility, to a first-order π-calculus which supports only name mobility. This translation is proved to be fully abstract with respect to barbed congruence, but with the restriction to a language of finite types. While the translation is of interest in its own right, it also turned out to be very useful for providing a powerful fully abstract characterisation of barbed congruence in terms of labelled transition systems and normal bisimulations. Providing direct proof techniques for contextual equivalences in higher-order process languages is often considered to be hard [13]. In this paper, the difficulty 2000 ACM Subject Classification: D.3.1. Key words and phrases: Higher-order languages, concurrency, full abstraction. a This material is based upon work supported by the National Science Foundation under Grant No. 0430175. b Research partially funded by the Nuffield Foundation. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-1 (1:4) 2005 CC A. Jeffrey and J. Rathke Creative Commons 2 A. JEFFREY AND J. RATHKE arises in establishing soundness of the proof technique, which is tantamount to establishing some sort of contextuality property. It has been seen that the use of a translation of higher- to first-order communication can alleviate this problem and such translations have been employed to this effect [11, 7]. However, due to the restriction to finite types for the correctness of these translations, the soundness of the proof technique is only guaranteed for finite types. Given that recursive types are used extensively in π-calculus, for encodings of datatypes and functions, this poses a significant restriction. Sangiorgi has shown that by studying various subcalculi, such as the asynchronous πcalculus, he is able to remove the restriction to finite types [13]. To date, there has been no proof of full abstraction for full HOπ in the presence of recursive types. In this paper we present an alternative description of labelled transition systems and normal bisimulations for HOπ, which is informed by Sangiorgi’s translation of higher-order to first-order communication. Our alternative presentation allows a direct proof of soundness for contextual equivalence which makes no use of the translation to first-order π-calculus and, more importantly, makes no restriction on types. The innovation here lies in the introduction of operators τk and hk ⇐ vi which simulate the triggers Trk and meta-notation {k := v} of Sangiorgi [11] where k is a unique identifier for the trigger and v is a process abstraction. The crucial difference is that where Sangiorgi gives definitions as HOπ terms for these devices: Trk = (x)khxi and {k := v} = ∗k(x)v · x where khxi represents an output on name k and ∗k(x)P represents a replicated input on name k, we leave the operators uninterpreted. There are no interactions between the operators τk and hk ⇐ vi. Rather, we just mimic the behaviour of triggers in the labelled transition systems. The benefit of doing this is that it allows us to obtain a direct soundness proof that (normal) bisimilarity implies contextual equivalence without recourse to any translation in its correctness proof. A challenge of approaching the problem in this way is that it is not immediately clear that bisimilarity will be complete for contextual equivalence in HOπ. That is to say, it is not obvious whether each transition has a genuine HOπ context which validates it. At this point however we can interpret the operators τk and hk ⇐ vi as HOπ terms exactly as Sangiorgi does. It is then a simple matter to demonstrate completeness following familiar techniques [3, 7, 5]. The real payoff is that not only do we obtain a direct soundness proof but the postponement of interpreting the triggers allows us to finesse any restrictions to finite types. The remainder of the paper is organised as follows: in Section 2 we recall the syntax and semantics of HOπ along with the definition of contextual equivalence which we will be using. This is followed in Section 3 by a presentation of the novel labelled transition system using the operators τk and hk ⇐ vi. We prove that bisimilarity over this labelled transition system is sound for contextual equivalence in Section 4 and conversely, that it is complete for contextual equivalence in Section 5. We conclude in Section 6 with some closing remarks. 2. H IGHER - ORDER π CALCULUS Except for small changes in notation the language is as can be found in [13] with three main differences: (1) We assume two distinct countably infinite sets of identifiers, V and N , for variables and channel names respectively. In general we will use x, y, z to range over variables and a, b, c to range over channel names. This variable/name distinction makes the algebraic properties CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED T, U ::= · ch[T ] T →⋄ Z rec Z.T Value Types Unit type Channel type Abstraction type Type variable Recursive type v·w v(x : T )P vhwiP if v = w then P else Q ν(a : T ) . (P) PkQ ∗P 0 Terms Application Input Output Matching Name creation Concurrency Repetition Termination · a x (x : T )P Values Unit value Channel name Variable Abstractions P, Q ::= v, w ::= 3 Figure 1: The Syntax of the language a little cleaner and we are confident that the techniques proposed here would also be applicable if we identified these sets. (2) Since we have adopted a variable/name distinction, we have used Honda and Yoshida’s definition of observational equivalence [6] in Section 2.4 rather than Sangiorgi’s. See [2] for a discussion of this issue. (3) We allow communication of channel names as well as process abstractions so that there is a core π-calculus as a direct subcalculus of HOπ. 2.1. Syntax. We present the syntax of HOπ in Figure 1. The grammar of types for values includes: • (·): a singleton type just containing the value (·). • ch[T ]: the type of channels which can be used for communicating data of type T . Note that in this paper we are not considering input-only or output-only channels. • T → ⋄: the type of an abstraction (x : T )P. Such an abstraction can be applied to a value v of type T to return a well-typed process P[v/x]. • Z and rec Z.T : these allow recursive types, such as the type for monomorphic π-calculus channels rec Z.ch[Z]. We require Z to be guarded: any free occurrence of Z lies within a subexpression of T of the form ch[U ] or U → ⋄. The grammar of process terms includes: 4 A. JEFFREY AND J. RATHKE • v · w: the application of abstraction v to argument w. During execution, v will be instantiated by an abstraction of the form (x : T )P, and β-reduction will give the process P[w/x]. • v(x : T )P and vhwiP, which are the standard synchronous input and output of the π-calculus, except that since abstractions are first-class values, we can communicate higher-order data as well as first-order data. • if v = w then P else Q: an equality test on values, where the type system will ensure that v and w are channels, and so we will never compare abstractions for syntactic identity. • ν(a : T ) . (P), P k Q, ∗P and 0: the standard π-calculus processes for channel generation, concurrency, replication and termination. The grammar of values includes: • (·): the only value of type (·). • a and x: channel names and variables respectively. • (x : T )P: an abstraction, which can be applied to a value v to return a process P[v/x]. Since abstractions are considered first-class values, they can be communicated on channels, or passed as arguments to other abstractions. This feature gives HOπ its higher-order power. 2.2. Reduction semantics. The reduction semantics for the language is defined in a standard manner: we first introduce the evaluation contexts E ::= [ · ] | E k P | νa . E Structural equivalence, ≡ is defined to be the least congruence with respect to E contexts such that it makes (k, 0) into a commutative monoid and moreover satisfies νa . (P k Q) ≡ νa . P k Q ∗P ≡ ∗P k P if a 6∈ fn(P) We will now consider processes up to structural equivalence throughout the remainder. We define the reduction relation → as the least precongruence with respect to E contexts such that the following axioms hold (comm) ahviP k a(x)Q → P k (x)Q · v (β − redn) (x)P · v → P[v/x] (cond—tt) if a = a then P else Q → P (cond—ff) if a = b then P else Q → Q (a 6= b) In a standard notation we write ==⇒ to denote the reflexive, transitive closure of → . 2.3. Type system. We introduce a simple type system for the language which comprises types for channels and abstractions, together with recursive types. To allow us to infer recursive types for terms we make use of type isomorphism. We define this by letting ∼iso be the least congruence on types which includes rec Z.T ∼iso T [rec Z.T /Z] A type environment Γ is a finite set of mappings from identifiers (channel names or variables) to types with the restriction that channel names a must be mapped to channel types of the form ch[T ]. We write Γ, n : T to represent the environment made up of the disjoint union of Γ and the mapping n to T . We will call an environment closed if it contains mappings of channel names only and will CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED Γ⊢·:· Γ(v) = T Γ⊢v:T Γ, x : T ⊢ P Γ ⊢ (x : T )P : T → ⋄ Γ ⊢ v : ch[T ], w : ch[T ] Γ⊢P Γ⊢Q Γ ⊢ if v = w then P else Q Γ⊢v:T →⋄ Γ⊢w:T Γ ⊢ v·w Γ, a : T ⊢ P Γ ⊢ ν(a : T ) . (P) Γ, x : T ⊢ P Γ ⊢ v : ch[T ] Γ ⊢ v(x : T )P 5 Γ ⊢ v : T T ∼iso U Γ⊢ v:U Γ ⊢ P, Q Γ ⊢ P k Q, ∗P, 0 Γ ⊢ P Γ ⊢ w : T Γ ⊢ v : ch[T ] Γ ⊢ vhwiP Figure 2: The Typing Rules write ∆ to indicate this. Type inference rules for the calculus are given in Figure 2. We will call a well-typed process, P, closed if it can be typed as ∆ ⊢ P for some closed ∆. It is easily shown that subject reduction holds for closed terms for the reduction relation and type inference system given. 2.4. Contextual equivalence. We will now define an appropriate notion of behavioural equivalence based on contexts and barbs. Contexts are defined by extending the syntax of processes by allowing typed holes [ ·Γ ] in terms. The type inference system is extended to contexts by using the rule Γ, Γ′ ⊢ [ ·Γ ] We write C[] to denote contexts with at most one hole and C[P] for the term which results from substituting P into the hole. For any given channel name a such that ∆ ⊢ a : ch[·] we write ∆ |= P ⇓ a if there exists some P′ , P′′ such that P ==⇒ ν∆′ . (ah·iP′′ k P′ ) with a 6∈ ∆′ . We use type-indexed families of relations {R ∆ } between closed process terms to describe equivalence. We will write R to refer to the whole family of relations and ∆ |= P R Q to indicate that P and Q are well-typed with respect to ∆ and related by R ∆ . For general process terms we define the open extension R o of a typed relation R as ∆, x1 : T1 , . . . , xn : Tn |= P R o Q holds if for every ∆′ disjoint from ∆ and every vi such that ∆, ∆′ ⊢ vi : Ti (for 1 ≤ i ≤ n) we have ∆, ∆′ |= P[v1 , . . . , vn /x1 , . . . , xn ] R Q[v1 , . . . , vn /x1 , . . . , xn ] Note that, in general, for closed terms ∆ |= P R Q is not equivalent to ∆ |= P R o Q as R o enjoys the weakening property that ∆, ∆′ |= P R o Q whenever ∆ |= P R o Q, even when R does not. However, the contextual equivalence which we study in this paper is defined as an open extension and therefore will satisfy this weakening. There are a number of properties of type-indexed relations that we must define: Symmetry:: A type-indexed relation R is symmetric whenever ∆ |= P R Q implies ∆ |= Q R P. 6 A. JEFFREY AND J. RATHKE Reduction closure:: A type-indexed relation R is reduction-closed whenever ∆ |= P R Q and P → P′ implies there exists some Q′ such that Q ==⇒ Q′ and ∆ |= P′ R Q′ . Contextuality:: A type-indexed relation R is contextual whenever Γ′ |= P R o Q and Γ ⊢ C[·Γ′ ] implies Γ |= C[P] R o C[Q]. Barb preservation:: A type-indexed relation R is barb-preserving if ∆ |= P R Q and ∆ |= P ⇓ a implies ∆ |= Q ⇓ a. Definition 2.1 (Contextual equivalence). Let ∼ = be the open extension of the largest type-indexed relation which is symmetric, reduction-closed, contextual and barb-preserving. 2 For technical convenience it will be useful to work with a lighter definition of contextuality. We say that a relation R is k-contextual if it is preserved by all contexts of the form [ ·Γ ] k R and we let ∼ = p denote the open extension of the largest typed relation over processes which is symmetric, k-contextual, reduction-closed and barb-preserving. The following lemma demonstrates that this lighter definition is sufficient. Lemma 2.2 (Context lemma). Γ |= P ∼ =Q if and only if Γ |= P ∼ =p Q Proof. In Appendix A. 3. F ULL ABSTRACTION In this section, we will present a bisimulation equivalence for HOπ, and show that this equivalence is fully abstract for contextual equivalence. 3.1. Labelled transitions. We will use a labelled transition system to characterize ∼ = over higherorder π-calculus terms. The style of the labelled transition system differs a little from previous transition systems offered for HOπ. Most notably, the nodes of the transition system are described using an augmented syntax rather than process terms alone. Specifically, for each k drawn from a countable set of names disjoint from N and V , we introduce two new operators: τk hk ⇐ vi and with the intuitive reading that τk is an indirect reference to an abstraction and hk ⇐ vi stores the abstraction to which k refers so that access to v is provided through interaction with k. The augmented syntax for nodes is given the grammar of configurations C obtained by extending Figure 1 with: v ::= . . . (as Figure 1) . . . | τk C ::= P | hk ⇐ vi | νa : T . (C) | C k C We impose a syntactic restriction on the augmented syntax so that in any configuration C for any given k then hk ⇐ vi appears at most once in C. Structural equivalence and reduction lift to C in the obvious manner — note that there are no reduction rules given for τk and hk ⇐ vi though. We augment the type rules by considering judgements of the form Γ; Θ⊢v:T and Γ ; Θ ⊢C where Θ represents a set of mappings from reference names to types T . The rules in Figure 2 are easily decorated with the extra Θ environment. The further rules required are given by Θ(k) = T Γ ; Θ ⊢ τk : T → ⋄ Θ(k) = T Γ ; Θ ⊢ v : T → ⋄ Γ ; Θ ⊢ hk ⇐ vi CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 7 Nodes of our labelled transition system then are well-typed closed terms of the augmented language of the form (∆ ; Θ ⊢ C) α τ The transitions are of the form (∆ ; Θ ⊢ C) → (∆ ; Θ ⊢ C) or (∆ ; Θ ⊢ C) → (∆ ; Θ ⊢ C) where visible labels α are given by the grammar: α ::= νa . α | νk . dhτk i! | νk . dhτk i? | dhvi? | dhvi! where write d to mean either a channel name a or an indirect reference name k. The transitions are presented in Figures 3,4,5. The intuition for these transitions is (eliding types for readability): ahvi? • P → P′ : indicates that P is prepared to input a value v on channel a and then perform as P′ . The type system enforces that v is a first-order value, and not an abstraction. Moreover, in this case both a and v are pre-existing values, and were not generated fresh for this transition. khvi? • P → P′ : indicates that P has provided a named abstraction reference k to the environment, and that the environment is calling the abstraction with pre-existing argument v. νb.ahbi? • P → P′ : indicates that P is prepared to input a fresh channel b on channel a and then ahbi? perform as P′ . This is the same as P → P′ , except that b is now a fresh channel generated by the environment, and has not been seen before by the process. νb.khbi? • P → P′ : indicates that P has provided a named abstraction reference k to the environment, and that the environment is calling the abstraction with fresh argument b. νl.ahτl i? → P′ : indicates that P is prepared to input an abstraction l on channel a and then • P perform as P′ . In this case, we do not record the abstraction itself in the label, but instead we just generate a fresh reference l to the abstraction. νl.khτl i? → P′ : indicates that P has provided a named abstraction reference k to the environ• P ment, and that the environment is calling that abstraction with argument l. In this case, k must be a higher-order abstraction, so is expecting an abstraction as an argument. Rather than recording the abstraction itself in the label, we instead generate a fresh reference l to the abstraction. • Each of the above input transitions has a dual output transition, where the role of the process and environment are exchanged. We write ᾱ to denote the complement of an action α, which is defined to be the action α with the input/output annotation inversed. We will often write ==⇒ to mean the reflexive transitive closure τ α α of → and ==⇒ to mean ==⇒ → ==⇒ . The following proposition states that the labelled transition system is well-defined in the sense that the transition relation only relates well-typed terms. α Proposition 3.1. If ∆ ; Θ ⊢ C and (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ) then ∆, ∆′ ; Θ, Θ′ ⊢ C′ is a valid typing judgement. Proof. Straightforward induction. 8 A. JEFFREY AND J. RATHKE α (∆ ; Θ ⊢ C) → (∆′ ; Θ′ ⊢ C′ ) C → C′ τ α (∆ ; Θ ⊢ C) → (∆ ; Θ ⊢ C′ ) (∆ ; Θ ⊢ C k D) → (∆′ ; Θ′ ⊢ C′ k D) α (∆, a : T ; Θ ⊢ C) → (∆, a : T, ∆′ ; Θ, Θ′ ⊢ C′ ) (a 6∈ fn(α)) α (∆ ; Θ ⊢ νa : T .C) → (∆, ∆′ ; Θ, Θ′ ⊢ νa : T .C′ ) (∆, b : T ; Θ ⊢ C) dhbi! → (∆, b : T ; Θ ⊢ C′ ) (d 6= b) (∆ ; Θ ⊢ νb : T .C) (∆, b : T ; Θ ⊢ C) (∆ ; Θ ⊢ C) νb.dhbi! → (∆, b : T ; Θ ⊢ C′ ) dhbi? → (∆, b : T ; Θ ⊢ C′ ) (d 6= b) νb.dhbi? → (∆, b : T ; Θ ⊢ C′ ) Figure 3: Structural labelled transition rules 3.2. Bisimilarity. We use a standard definition of (weak) bisimilarity to provide our characterisation of ∼ = for HOπ: Definition 3.2. We call a symmetric relation, R , between nodes of the labelled transition system a bisimulation if whenever (n, m) ∈R we have τ • n → n′ implies there exists some m′ such that m ==⇒ m′ and (n′ , m′ ) ∈R α α • n → n′ implies there exists some m′ such that m ==⇒ m′ and (n′ , m′ ) ∈R Let bisimulation equivalence, or bisimilarity, ≈ be the largest bisimulation relation. 2 We will write ∆ ; Θ |= C ≈ D to mean that ∆ ; Θ ⊢ C and ∆ ; Θ ⊢ D are valid typing judgements and moreover, they are related by ≈ as nodes of the lts. In order to provide a bisimulation characterisation of ∼ = over HOπ we will consider a subrelation of ≈ by restricting our attention to nodes of the form (∆ ; ⊢ P) whose terms are clearly definable in HOπ. We will simply write (when Θ is empty) ∆ |= P ≈ Q to indicate bisimilarity between such terms of HOπ considered as nodes of the labelled transition system. 3.3. Soundness of bisimilarity for contextual equivalence. We need to demonstrate that bisimilarity implies contextual equivalence for all HOπ processes. In particular, because of Lemma 2.2, we need only show that bisimilarity is contained in some symmetric, reduction-closed, barb preserving and k-contextual relation. The key to achieving this is to study the k-context closure of bisimilarity. If we can demonstrate that this is reduction-closed then we have our result. To do this we must establish a decomposition theorem for interactions. For instance, if P and Q are bisimilar and we compose each of them with a process R then suppose PkR →S CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED T ∼iso U νk.ahτk i? (∆ ; Θ ⊢ a(x : T )P) 9 →⋄ → (∆ ; Θ, k : U ⊢ (x : T )P · τk ) Θ(k) ∼iso T → ⋄ (∆ ; Θ ⊢ hk ⇐ vi) νl.khτl i? → (∆ ; Θ, l : T ⊢ v · τl k hk ⇐ vi) ∆; Θ⊢v:T →⋄ (∆ ; Θ ⊢ ahviP) νk.ahτk i! → (∆ ; Θ, k : T ⊢ hk ⇐ vi k P) Θ(k) ∼iso T → ⋄ (∆ ; Θ ⊢ τk · v) νl.khτl i! → (∆ ; Θ, l : T ⊢ hl ⇐ vi) Figure 4: Basic higher-order labelled transition rules represents an interaction between P and R. We decompose this into complementary actions α P → P′ and ᾱ R → R′ respectively. Note however that S is not necessarily obtained by a parallel composition of the targets of the transitions: P′ k R′ . Instead, P′ and R′ may contain indirect references and their corresponding resources. These need to be matched up correctly to obtain S. We achieve this by introducing the merge (partial) operator hh·ii which will match up these terms and replace every indirect reference to an abstraction with the abstraction itself. We write C[v/τk ] to denote the substitution of the value v for every instance of the indirect reference τk . We define hhCii then as the operator on terms of the augmented syntax (up to ≡) such that hhCii = C if C doesn’t contain hk ⇐ vi for any k, v hhν(~a : ~T ) . (hk ⇐ vi k C)ii = hhν(~a : ~T ) . (C[v/τk ])ii if τk 6∈ v Intuitively, this says that we substitute any values stored at a hk ⇐ vi through for the corresponding τk . Note that this need not substitute for all the indirect reference identifiers in C. It is clear that the above definitions are only partial. For example, if C contains an occurrence of hk ⇐ vi for which τk occurs in v, then hhCii is undefined. In order to identify for which terms the merge is defined we make use of the notion of reference graph: For a term C we define the graph rg(C) to be the graph which has nodes as the indirect reference identifiers k in C and edges k 7→ l if τl ∈ v for hk ⇐ vi in C Proposition 3.3. hh·ii is a well-defined partial function such that hhCii is defined if and only if rg(C) is acyclic. Proof. Given in Appendix B. 10 A. JEFFREY AND J. RATHKE ∆ ⊢ v : T a base type (∆ ; Θ ⊢ a(x : T )P) Θ(k) = T (∆ ; Θ ⊢ hk ⇐ vi) ahvi? → (∆ ; Θ ⊢ (x : T )P · v) ∆ ⊢ w : T a base type khwi? → (∆ ; Θ ⊢ v · w k hk ⇐ vi) ∆ ⊢ v : T a base type (∆ ; Θ ⊢ ahviP) Θ(k) = T ahvi! → (∆ ; Θ ⊢ P) T a base type (∆ ; Θ ⊢ τk · v) khvi! → (∆ ; Θ ⊢ 0) Figure 5: Basic first-order labelled transition rules Lemma 3.4 (Composition/Decomposition). For ∆ ; Θ ⊢ C, D (i) If hhC k Dii ≡ E and α (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ) and ᾱ (∆ ; Θ ⊢ D) → (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) then there exists a E ′ such that E ==⇒ E ′ and hhν∆′ . (C′ k D′ )ii = E ′ (ii) If hhCii ≡ E and C → C′ then there exists a E ′ such that E → E ′ and hhC′ ii ≡ E ′ (iii) If hhC k Dii ≡ E and E → E ′ then one of the following hold C → C′ with hhC′ k Dii ≡ E ′ or D → D′ with hhC k D′ ii ≡ E ′ α ᾱ or (∆ ; Θ ⊢ C) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ C′ ) and (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) with hhν∆′ . (C′ k D′ )ii ≡ E ′ . Proof. Part (ii) is straightforward as the merge operator hh ii simply removes subterm of the form hk ⇐ vi, which can’t be involved in reductions, and substitutes higher-order values through for variables of higher-order type. Reductions are based on structure alone except for the conditionals which can be affected by first-order substitutions of channel names only. To show (i) we must consider all the possible cases for α. By symmetry there are four distinct pairs of complementary actions. We only consider the cases where α is νk . ahτk i? and νl . khτl i? as the first-order actions can be treated similarly. νk.ahτk i? Case: ∆ ; Θ ⊢ C we see that – – – – → ∆ ; Θ, k : U ⊢ C′ and ∆ ; Θ ⊢ D νk.ahτk i! C ≡ ν∆′ . (a(x : T )P k C′′ ) with T ∼iso U → ⋄ C′ ≡ ν∆′ . ((x : T )P · τk k C′′ ) D ≡ ν∆′′ . (ahviQ k D′′ ) D′ ≡ ν∆′′ . (hk ⇐ vi k Q k D′′ ) → ∆ ; Θ, k : U ⊢ D′ . By inspection CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 11 It is easy to see that hhC k Dii → hhν∆′ , ∆′′ . ((x : T )P · v k C′′ k Q k D′′ )ii let us call the target of this reduction E ′ . We simply need to check E ′ ≡ hhν∆′ , ∆′′ . ((x : T )P · v k C′′ k Q k D′′ )ii (τk 6∈ v) ≡ hhν∆′ . ((x : T )P · τk k C′′ ) k ν∆′′ . (hk ⇐ vi k Q k D′′ )ii ≡ hhC′ k D′ ii νl.khτl i? → ∆ ; Θ, l : T ⊢ C′ and ∆ ; Θ ⊢ D Case: ∆ ; Θ ⊢ C inspection we see that – – – – νl.khτl i! → ∆ ; Θ, l : T ⊢ D′ . Again, by C ≡ ν∆′ . (hk ⇐ vi k C′′ ) C′ ≡ ν∆′ . (v · τl k hk ⇐ vi k C′′ ) D ≡ ν∆′′ . (τk · w k D′′ ) D′ ≡ ν∆′′ . (hl ⇐ wi k D′′ ) Note that the previous proposition tells us that rg(C k D) must be acyclic — in particular, τk 6∈ v. Here we see that hhC k Dii ≡ (τk 6∈ v) ≡ (τl 6∈ v, w,C′′ , D′′ ) ≡ ≡ hhν∆′ , ∆′′ . (hk ⇐ vi k C′′ k τk · w k D′′ )ii hhν∆′ , ∆′′ . (hk ⇐ vi k C′′ k v · w k D′′ )ii hhν∆′ , ∆′′ . (hk ⇐ vi k C′′ k v · τl k hl ⇐ wi k D′′ )ii hhC′ k D′ ii So by letting E ′ be hhC′ k D′ ii we note that hhC k Dii ==⇒ E ′ as required. To show (iii) we suppose hhC k Dii ≡ E and that E → E ′ . We must consider all possible ways in which this reduction can occur. If the reduction arises from a conditional then it is clear that we must have C → C′ or D → D′ for some C′ or D′ . Moreover it is easy to check that hhC′ k Dii (resp hhC k D′ ii) ≡ E ′ . There are two more possibilities to consider: Case: the reduction arises from a β-reduction. In this case either C → C′ or D → D′ as above and the result follows easily, or v is (x : U )P and – C ≡ ν∆′ . (τk · w k C′′ ) with all names in ∆′ appearing in w – D ≡ ν∆′′ . (hk ⇐ vi k D′′ ) with τk 6∈ v ′ ′ ′′ ′′ – E ≡ hhν∆ , ∆ . (P[w/x] k C k hk ⇐ vi k D′′ )ii or a symmetric version of these with the roles of C and D reversed. So we notice that if U ∼iso T → ⋄, we have ∆ ; Θ ⊢C νl.khτl i! → ∆ ; Θ, l : T ⊢ C′ and νl.khτl i? ∆ ; Θ ⊢ D ====⇒ ∆ ; Θ, l : T ⊢ D′ where C′ ≡ ν∆′ . (hl ⇐ wi k C′′ ) and D′ ≡ ν∆′′ . (P[τl /x] k hk ⇐ vi k D′′ ). We check: (τl 6∈ v, w,C′′ , D′′ ) hhC′ k D′ ii ≡ hhν∆′ . (hl ⇐ wi k C′′ ) k ν∆′′ . (P[τk /x]) k hk ⇐ vi k D′′ ii ≡ hhν∆′ , ∆′′ . (C′′ k P[w/x] k hk ⇐ vi k D′′ )ii ≡ E′ as required. Alternatively, it could be that U is a base type, in which case ∆ ; Θ⊢C ν∆′ .khwi! → ∆, ∆′ ; Θ ⊢ C′ and ν∆′ .khwi? ∆ ; Θ ⊢ D ====⇒ ∆, ∆′ ; Θ ⊢ D′ where C′ ≡ C′′ and D′ ≡ ν∆′′ .(P[w/x] k hk ⇐ vi k D′′ ). It is easy to check that hhC′ k D′ ii ≡ E ′ as required. 12 A. JEFFREY AND J. RATHKE Case: the reduction arises from communication. Again we see that either C → C′ or D → D′ , in which case we easily obtain the result, or – C ≡ ν∆′ . (ahviP k C′′ ) – D ≡ ν∆′′ . (a(x : T )Q k D′′ ) – E ′ ≡ hhν∆′ . (P k C′′ ) k ν∆′′ . ((x : T )Q · v k D′′ )ii or a symmetric version of this with the roles of C and D reversed. Again we must consider whether the type T is a base type or higher-order. We omit the details of the former case. Suppose then that ∆ ; Θ ⊢ v : T ∼iso U → ⋄ we know ∆; Θ⊢C νk.ahτk i! → ∆ ; Θ, k : U ⊢ C′ and ∆; Θ⊢D νk.ahτk i? → ∆ ; Θ, k : U ⊢ D′ where C′ ≡ ν∆′ . (hk ⇐ vi k P k C′′ ) and D′ ≡ ν∆′′ . ((x : T )Q · τk k D′′ ). We check: (τk 6 v, P,C′′ , D′′ ) ∈ hhC′ k D′ ii ≡ hhν∆′ . (hk ⇐ vi k P k C′′ ) k ν∆′′ . ((x : T )Q · τk k D′′ )ii ≡ hhν∆′ , ∆′′ . (P k C′′ k (x : T )Q · v k D′′ )ii ≡ E′ as required. Definition 3.5. Let ≈m be defined to be ∆ ; Θ |= hhC1 k Dii ≈m hhC2 k Dii if and only if ∆ ; Θ |= C1 ≈ C2 and ∆; Θ⊢D whenever hhC1 k Dii and hhC2 k Dii are defined. 2 Note that in the case where Θ is empty we have that hhCi k Dii = Ci k D, and hence ≈m and ∼ =p coincide. Lemma 3.6. ≈m is reduction-closed. Proof. Follows easily from the previous lemma. Take ∆ ; Θ |= hhC1 k Dii ≈m hhC2 k Dii and suppose hhC1 k Dii → E. We must show that hhC2 k Dii → E ′ for some E ′ such that ∆ ; Θ |= E ≈m E ′ . We know from Part (iii) of the previous lemma that one of three cases must hold. Either, C1 → C1′ , D → D′ or there are complementary actions from both C1 and D. We only deal with the last case as the others follow easily from the hypothesis that ∆ ; Θ |= C1 ≈ C2 and Part (ii) of the previous lemma. α ᾱ We have then that ∆ ; Θ ⊢ C1 =⇒ ∆, ∆′ ; Θ, Θ′ ⊢ C1′ and ∆ ; Θ ⊢ D =⇒ ∆, ∆′ ; Θ, Θ′ ⊢ D′ such that E ≡ hhC1′ k D′ ii. We know by hypothesis that there must exist some α ∆ ; Θ ⊢ C2 ==⇒ ∆, ∆′ ; Θ, Θ′ ⊢ C2′ such that ∆, ∆′ ; Θ, Θ′ |= C1′ ≈ C2′ . (†) We can now use Parts (i) and (ii) of the previous lemma to see that hhC2 k Dii ==⇒ E ′ such that E ′ ≡ hhC2′ k D′ ii. Note that (†) guarantees ∆ ; Θ |= E ≈m E ′ to finish. CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 13 Theorem 3.7. For all closed terms P, Q of HOπ: ∆ |= P ≈ Q implies ∆ |= P ∼ =p Q Proof. We let ≈ p denote the relation ∆, ∆′ |= (P k R) ≈ p (Q k R) iff ∆ |= P ≈ Q and ∆, ∆′ ⊢ R It is easy to see that ≈ p is a k-contextual relation over terms of HOπ. It is also easy to see that ≈ p is symmetric and barb preserving and coincides with ≈m for closed terms of HOπ, thus Lemma 3.6 can be instantiated to demonstrate that ≈ p is reduction-closed and, given that ∼ = p is defined to be the largest symmetric, k-contextual, reduction-closed, and barb-preserving relation over terms of HOπ, then we have our result. Corollary 3.8 (Soundness). For all terms P, Q of HOπ: Γ |= P ≈o Q implies Γ |= P ∼ =Q Proof. Follows from the previous theorem and Lemma 2.2. 3.4. Completeness of bisimilarity for contextual equivalence. The interactions described by the labelled transition system are not obviously derived by genuine contextual observations in HOπ because of the use of the extra syntax for indirect references. In order to show completeness of our bisimilarity for contextual equivalence we must demonstrate that the indirect references are in fact definable as terms of the language proper. Following Sangiorgi [13], we implement the implicit protocol outlined by the indirect references by using the following translation of the augmented terms into HOπ: [[k1 : T1 , . . . , kn : Tn ]] = k1 : ch[T1 ], . . . , kn : ch[Tn ] [[Γ ; Θ ⊢ C]] = Γ, [[Θ]] ⊢ [[C]]Θ [[τk ]]Θ = (x : T )khxi0 if Θ(k) = T [[hk ⇐ vi]]Θ = ∗k[[v]]Θ The translation acts homomorphically on all other terms. We abuse notation here by using identifiers k as channel names in the translation. It is evident that this translation is well-defined in the sense that the translation of well-typed augmented terms are indeed well-typed terms of HOπ. We would now like to prove a correspondence between reductions from the terms of the augmented syntax and reductions between their translations. However, we note that in translating a term containing both hk ⇐ vi and τk we provide matching input and output prefixes, which, in HOπ may create a communication which was not possible in the source term. This turns out not to be of particular concern to us though as we see that if we starting with terms of HOπ, then terms reachable by transitions are balanced in the following sense: we call a term C of the augmented language balanced if for each k then C contains at most one of τk (possible multiple times) or hk ⇐ vi. Unfortunately the translation may introduce extra reductions which aren’t present in the source term. These arise through the translation of terms of the form τk · v. Note that τ [[τk · v]] = (x : T )khxi0 · [[v]] → kh[[v]]i0 but τk · v has no corresponding reduction. We will identify these rogue reductions as housekeeping h reductions and indicate them with → defined as any reduction which can be derived using the axiom (h − redn) (x : T )khxi0 · v → khvi0 Lemma 3.9. If ∆ ; Θ ⊢ C is balanced then 14 A. JEFFREY AND J. RATHKE (1) If C ==⇒ C′ then [[C]]Θ ==⇒ [[C′ ]]Θ h (2) If [[C]]Θ ==⇒ P then [[C]]Θ ==⇒ [[D]]Θ →∗ P for some ∆ ; Θ ⊢ D such that C ==⇒ D. Proof. We will omit mention of the environment Θ in the proof as it plays no role. Part 1 is straightforward. For Part 2 we use induction on the length of the reductions. If there are no reductions then we are done. We examine the base case in which [[C]] → P. If this reduction happens to be a h housekeeping move, that is, [[C]] → P then there is nothing to prove. Suppose otherwise, then it is not too difficult to check that P ≡ [[D]] for some D such that C → D. For the inductive case suppose that [[C]] → ==⇒ P (†) By inspecting the translation [[·]] and using the fact that C is balanced we see that h [[C]] → → Q h [[C]] → → Q implies h thus we may assume that the first reduction in (†) above is not of the form → . This means that [[C]] → [[C′ ]] ==⇒ P for some C′ such that C → C′ . It is clear that C′ is also balanced so we may apply the inductive hypothesis to [[C′ ]] ==⇒ P h to obtain a D such that C′ ==⇒ D′ and [[C′ ]] ==⇒ [[D]] →∗ P. Putting these together we obtain C → C′ ==⇒ D h [[C]] → [[C′ ]] ==⇒ [[D]] →∗ P and as required. When ∆′ is of length at most one, we shall write δh∆′ i as shorthand, defined: / = δh·i δha : T i = δhai δh0i α Moreover, note that whenever (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ), we have that ∆′ has at length most one, and so δh∆′ i is well-defined. Proposition 3.10. For each α, ∆ and fresh channels δ, δ′ of appropriate type given by α and ∆, there exists a process T α∆ (defined in Figure 6) in HOπ such that if α ∆ ; Θ ⊢ C → ∆, ∆′ ; Θ, Θ′ ⊢ C′ then ∆,[[Θ]] ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] ⊢ T α and moreover, for balanced D α (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) if and only if ∆ ; Θ ⊢ D and T α∆,[[Θ]] k [[D]]Θ ==⇒ ν∆′ . (δh∆′ i k P) with h [[D′ ]]Θ,Θ′ →∗ P. CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 15 Proof. It is straightforward to check that ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] ⊢ T α∆ whenever α ∆ ; Θ ⊢ C → ∆, ∆′ ; Θ, Θ′ ⊢ C′ . For the remainder, to show the ‘only if’ direction we use Lemma 3.9 Part 1 to reduce our obligation α to the case of a single transition → , and we must consider each label α. By way of example we show the case for α = νl . khτl i! (the other cases can be treated similarly). Suppose: α (∆ ; Θ ⊢ D) → (∆ ; Θ, l : U ⊢ D′ ). then we know that D ≡ ν∆′′ . (τk · v k D′′ ) and D′ ≡ ν∆′′ . (hl ⇐ vi k D′′ ). We see that for T ∼iso U → ⋄ T α∆,[[Θ]] k [[D]]Θ ≡ k(x : T )(∗l(y : U )x · y k (δhi ⊕ δ′ hi)) k ν∆′′ . (((z : T )khzi0) · [[v]]Θ k [[D′′ ]]Θ ) ==⇒ (δhi ⊕ δ′ hi) k ν∆′′ . (∗l(y : U )[[v]]Θ · y k [[D′′ ]]Θ ) ==⇒ δhi k [[D′ ]]Θ,l:U as required. For the converse direction we suppose that T α∆,[[Θ]] k [[D]]Θ ==⇒ ν∆′ . (δh∆′ i k P) Again, we must perform a case analysis on α. We show the case in which α is νl . khτl i? (the other ∆,[[Θ]] cases can be treated similarly). We know ∆′ is empty so T α k [[D]]Θ ==⇒ δhi k P. Note that ∆,[[Θ]] Tα has no reductions of its own and can only interact with [[D]]Θ so we can detail the assumed reductions as T α∆,[[Θ]] k [[D]]Θ ==⇒ T α∆,[[Θ]] k P0 → (δhi ⊕ δ′ hi) k P1 ==⇒ δhi k P where [[D]] ==⇒ P0 and P1 ==⇒ P. We assumed that D is balanced so Lemma 3.9 Part 2 applied to h [[D]] ==⇒ P0 tells us that [[D]] ==⇒ [[D0 ]]Θ →∗ P0 for some D0 such that D ==⇒ D0 . We know that P0 is obtained from [[D0 ]]Θ by housekeeping reductions and that it interacts with T α∆ . This tells us that we must have the forms P0 ≡ ν∆′′ . (∗k[[v]]Θ k P0′ ) and P1 ≡ ν∆′′ . ([[v]]Θ · [[τl ]]Θ,l:U k ∗k[[v]]Θ k P0′ ) This in turn tells us that D0 ≡ ν∆′′ . (hk ⇐ vi k D′0 ) h such that [[D′0 ]]Θ →∗ P0′ . Now it is clear that (∆ ; Θ ⊢ D0 ) νl.khτl i? → (∆ ; Θ, l : U ) ⊢ D1 ) 16 ∆ T dhvi? ∆ T dhvi! ∆ T νb.dhbi? ∆ T νb.dhbi! ∆ T νk.dhτ k i? ∆ T νk.dhτ k i! A. JEFFREY AND J. RATHKE = = = = = = dhvi(δhi ⊕ δ′ hi) d(x : T )if x = v then (δhi ⊕ δ′ hi) else 0 νb : T . (dhbi(δhbi ⊕ δ′ hi)) d(x : T )if x 6∈ ∆ then (δhxi ⊕ δ′ hi) else 0 dh(x : U )khxi0i(δhi ⊕ δ′ hi) d(x : T )(∗l(y : U )x · y k (δhi ⊕ δ′ hi)) where ∆(d) = ch[T ] where ∆(d) = ch[T ] where ∆(d) = ch[T ] where ∆(d) = ch[T ] and T ∼iso U → ⋄ where ∆(d) = ch[T ] and T ∼iso U → ⋄ ⊕ represents an encoding of internal choice in HOπ if x 6∈ 0/ then P else Q = P if x 6∈ (a : T, ∆) then P else Q = if x = a then Q else if x 6∈ ∆ then P else Q Figure 6: Testing processes for labelled transitions where D1 ≡ ν∆′′ . (v · τl k hk ⇐ vi k D′0 ). We check [[D1 ]]Θ,l:U ≡ h →∗ ≡ ==⇒ ν∆′′ . ([[v]]Θ · [[τl ]]Θ,l:U k ∗k[[v]] k [[D′0 ]]Θ ) ν∆′′ . ([[v]]Θ · [[τl ]]Θ,l:U k ∗k[[v]] k P0′ ) P1 P h Therefore [[D1 ]] =⇒ P and we can apply Lemma 3.9 Part 2 to this to see that [[D1 ]] =⇒ [[D′ ]] →∗ P for some D′ such that D1 ==⇒ D′ . By collecting the above together we obtain α (∆ ; Θ ⊢ D) ==⇒ (∆ ; Θ ⊢ D0 ) → (∆ ; Θ, l : U ⊢ D1 ) ==⇒ (∆ ; Θ, l : U ⊢ D′ ) h with [[D′ ]]Θ,l:U →∗ P as required. Lemma 3.11 (Extrusion). If ∆ |= ν∆′ . (δh∆′ i k P) ∼ = p ν∆′ . (δh∆′ i k Q) then ∆, ∆′ |= P ∼ = p Q. Proof. Follows a similar argument found in [7]: define a relation R such that ∆, ∆′ |= P R Q iff ∆ |= ν∆′ . (δh∆′ i k P) ∼ = p ν∆′ . (δh∆′ i k Q) and show that R is barb-preserving, reduction-closed and k-contextual. These properties follow from the corresponding property for ∼ = p and an extra piece of context to interact with δh∆′ i. Theorem 3.12 (Completeness). For all closed terms P, Q of HOπ: ∆ |= P ∼ implies ∆ |= P ≈ Q =p Q Proof. We define R over terms of the augmented language to be ∆ ; Θ |= C R D iff ∆, [[Θ]] |= [[C]]Θ ∼ = p [[D]]Θ and show that R is a bisimulation. Take ∆ ; Θ |= C R D and suppose that α (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ). We know from Proposition 3.10 that ∆,[[Θ]] ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] ⊢ T α and that T α∆,[[Θ]] k [[C]]Θ ==⇒ ν∆′ . (δh∆′ i k P) CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 17 h with [[C′ ]]Θ,Θ′ →∗ P. We know that ∆, [[Θ]] |= [[C]]Θ ∼ = p [[D]]Θ by the definition of R , and hence, by contextuality we also have ∆,[[Θ]] ∆, [[Θ, Θ′ ]], δ : ch[T0 ], δ′ : ch[·] |= T α This tells us that such that ∆,[[Θ]] k [[C]]Θ ∼ k [[D]]Θ =p T α T α∆,[[Θ]] k [[D]]Θ ==⇒ Q′ ∆, [[Θ, Θ′ ]] |= ν∆′ . (δh∆′ i k P) ∼ = p Q′ . (†) ∆,[[Θ]] of T α But by the construction we notice that ν∆′ .(δh∆′ i k P) barbs on δ but not on δ′ . Therefore, by the preservation of barbs property of ∼ = p , we know that Q′ must also barb on δ but not on δ′ . This ∆,[[Θ]] constrains Q′ so that Q′ ≡ ν∆′ . (δh∆′ i k Q). We apply Lemma 3.9 Part 2 to T α ∆,[[Θ]] to see that there is some D′′ such that T α k [[D]]Θ ==⇒ Q′ h k [[D]]Θ =⇒ [[D′′ ]]Θ,Θ′ →∗ ν∆′ . (δh∆′ i k Q) from which h it clearly follows that D′′ ≡ ν∆′ . (δh∆′ i k D′ ) and [[D′ ]]Θ,Θ′ →∗ Q. We use Proposition 3.10 again to see that α (∆ ; Θ ⊢ D) ==⇒ (∆, ∆′ ; Θ, Θ′ ⊢ D′ ) and we now must show that ∆, ∆′ ; Θ, Θ′ |= C′ R D′ . To do this we use Lemma 3.11 on (†) (note that Q′ ≡ ν∆′ . (δh∆′ i k Q)) to see that ∆, ∆′ , [[Θ, Θ′ ]] |= P ∼ = p Q. It is also easy to check that hreductions are confluent with respect to all other reductions and hence preserve contextual equivah h lence, that is →∗ ⊆∼ = p , so we also have ∆, ∆′ , [[Θ, Θ′ ]] |= [[C′ ]]Θ,Θ′ ∼ = p [[D′ ]]Θ,Θ′ because [[C′ ]]Θ,Θ′ →∗ P h and [[D′ ]]Θ,Θ′ →∗ Q. This allows us to conclude ∆, ∆′ ; Θ, Θ′ |= C′ R D′ as required. We must also consider transitions of the form τ (∆ ; Θ ⊢ C) → (∆, ∆′ ; Θ, Θ′ ⊢ C′ ). These can be dealt with as above but in this case no T α∆ is needed. Corollary 3.13 (Full abstraction). For all terms P, Q of HOπ: Γ |= P ≈o Q if and only if Γ |= P ∼ =Q Proof. Follows from Corollary 3.8, Lemma 2.2, and the previous theorem. 4. C ONCLUDING REMARKS We have re-examined the use of labelled transitions to characterise contextual equivalence in the higher-order π calculus. The technique of augmenting the core syntax with extra operators to assist in the definition of the labelled transitions allows use to give a direct proof of soundness of bisimilarity for contextual equivalence. This advances Sangiorgi’s analagous result by allowing recursive types also. We believe that the technique of using extra operators to describe the points of interaction with the environment in the lts is fairly robust and should be applicable to many higher-order languages. Indeed, this was the approach that the authors developed for their work on concurrent objects [8]. We have only concerned ourselves with the characterisation of contextual equivalence in HOπ and so far have not studied Sangiorgi’s translation of higher-order to first-order mobility. Thus, the restriction to finite types for his translation is still necessary. It would be interesting to investigate whether the current work could be of use in removing this type restriction for his translation also. 18 A. JEFFREY AND J. RATHKE A PPENDIX A. P ROOF OF T HE C ONTEXT L EMMA We recall the statement of Lemma 2.2 and detail its proof here. Γ |= P ∼ = Q if and only if Γ |= P ∼ = p Q. The force of this lemma is to show that the simplified form of observational testing allowed by ∼ =p is sufficient to capture the power of full contextual testing. In order to prove this we essentially need to show that ∼ = p is preserved by the operators of HOπ. For the most part, this can be done directly and is stated in Lemma A.1 below. Lemma A.1. ∼ p (x : T )Q · v. (1) If ∆, x : T |= P ∼ = p Q and ∆ ⊢ v : T then ∆ |= (x : T )P · v = (2) If ∆, x : T |= P ∼ = p a(x : T )Q. = p Q and ∆ ⊢ a : ch[T ] then ∆ |= a(x : T )P ∼ (3) If ∆ |= P ∼ = p ahwiQ. = p Q, ∆ ⊢ w : T and ∆ ⊢ a : ch[T ] then ∆ |= ahwiP ∼ ∼ ∼ (4) If ∆ |= P1 = p Q1 and ∆ |= P2 = p Q2 then ∆ |= if v = w then P1 else P2 ∼ = p if v = w then Q1 else Q2 . (5) If ∆, a : T |= P ∼ = p ν(a : T ) . (Q). = p Q then ∆ |= ν(a : T ) . (P) ∼ (6) If ∆ |= P1 ∼ = p Q1 and ∆ |= P2 ∼ = p Q2 then ∆ |= P1 k P2 ∼ = p Q1 k Q2 . (7) If ∆ |= P ∼ = p Q then ∆ |= ∗P ∼ = p ∗Q. Proof. The majority of these are straightforward by exhibiting appropriate symmetric, reductionclosed, k-contextual, barb-preserving relations. As an example of this we show the case for input prefixing (Case 2). We define R so that ∼ = p ⊆ R and moreover ∆ |= a(x : T )P k R R a(x : T )Q k R for any ∆ ⊢ R (†) It is clear that R is symmetric, barb-preserving and k-contextual so if we can show that it is reduction-closed then we may conclude that R coincides with ∼ = p and we have our result. Suppose that (†) holds and a(x : T )P k R → P′ . We know then that either R → R′ and P′ ≡ a(x : T )P k R′ or the reduction came about by interaction, that is R ≡ ν∆′ . (ahviR′′ k R′′′ ) with a 6∈ ∆′ and by writing R′ for R′′ k R′′′ we have P′ ≡ ν∆′ . (P[v/x] k R′ ) for some ∆, ∆′ ⊢ v and ∆, ∆′ ⊢ R′ . If the former is true then we see immediately that a(x : T )Q k R → a(x : T )Q k R′ where ∆ |= a(x : T )P k R′ R a(x : T )Q k R′ . If instead the latter is true then we use the fact that ∆, x : T |= P ∼ =p Q to see that ∆, ∆′ |= P[v/x] ∼ = p Q[v/x] and note that a(x : T )Q k R → ν∆′ . (Q[v/x] k R′ ) where (using k-contextuality and Case 5) ∆ |= ν∆′ . (P[v/x] k R′ ) ∼ = p ν∆′ . (Q[v/x] k R′ ) as required. CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 19 Notice that there are two particular cases which are not covered by this lemma: application of a function to, and output of higher-order ∼ = p -related values (c.f. Corollary A.11). Establishing that ∼ is preserved in these cases can be done directly but is a little more involved. We notice that the =p property we require in both cases follows immediately from Substitutivity (cf. Corollary A.10) , that is (ignoring types): if P ∼ = p Q then R[(x)P/y] ∼ = p R[(x)Q/y]. The remainder of the appendix is devoted to achieving this. The proof follows a very similar scheme to the proof of Proposition 4.2.6 in [10] but simplified to avoid any use of induction on type as appeared there. Lemma A.2. If ∆ ⊢ (x : T )P · w then ∆ |= (x : T )P · w ∼ = p P[w/x]. In the following we will make use of a “bisimulation up to” argument [12]. ∼ p ) whenever ∆ |= P R Q Definition A.3. A type-indexed relation R is reduction-closed up to (=, = 2 and P → P′ implies there exists some Q′ such that Q ==⇒ Q′ and ∆ |= P′ R ∼ = p Q′ . Lemma A.4. For any type-indexed relation R which is symmetric, reduction-closed up to (=, ∼ = p ), k-contextual and barb-preserving, R ⊆ ∼ . =p Definition A.5. We say that x is (un)guarded in P whenever: (1) if x 6∈ P then x is (un)guarded in P, (2) if x 6∈ w then x is unguarded in x · w, (3) if v 6= x then x is guarded in v · w, (4) x is guarded in v(y : T )P, vhwiP, and if v = w then P else Q, and (5) if x is (un)guarded in P and Q then x is (un)guarded in ν(a : T ) . (P), P k Q and ∗P. 2 Lemma A.6. For any ∆, y : T → ⋄ ⊢ R with y guarded in R and for any ∆ ⊢ v : T → ⋄ and ∆ ⊢ w : T → ⋄, if R[v/y] → R′ then R′ = R′′ [v/y] for some R′′ and moreover, R[w/y] → R′′ [w/y]. Proof. We first observe that as ∆ ⊢ v : T → ⋄ it must be the case that v is an abstraction and not a channel name. From this it is routine to check that the required property holds for the reduction axioms. Furthermore, if y is guarded in E [P] then y is guarded in P and so the required property is preserved by reduction in evaluation contexts. Lemma A.7. For any P and x we can find Q and y such that x is guarded in Q, y is unguarded in Q and P = Q[x/y]. Proof. A routine induction on P. Lemma A.8 (Unguarded Substitutivity). If ∆, x : T |= P ∼ = p Q and ∆, y : T → ⋄ ⊢ R and y is un∼ guarded in R then ∆ |= R[(x : T )P/y] = p R[(x : T )Q/y]. Proof. We proceed by induction on the structure of R. If y 6∈ R then the result is immediate. If R is not of the form v·w, the result follows easily by induction by making use of Lemma A.1. Otherwise, since y is unguarded in R we must have that R is of the form y · w with y 6∈ w. Hence: ∆ |= R[(x : T )P/y] as required. = ∼ =p ∼ =p ∼ =p = (x : T )P · w P[w/x] Q[w/x] (x : T )Q · w R[(x : T )P/y] (as R = y · w and y 6∈ w) (by Lemma A.2) (by hypothesis) (by Lemma A.2) (as R = y · w and y 6∈ w). 20 A. JEFFREY AND J. RATHKE Lemma A.9 (Guarded Substitutivity). If ∆, x : T |= P ∼ = p Q and ∆, y : T → ⋄ ⊢ R and y is guarded in R then ∆ |= R[(x : T )P/y] ∼ = p R[(x : T )Q/y]. Proof. Let R be defined as ∆ |= R′ [(x : T )P/y] R R′ [(x : T )Q/y] whenever ∆, y : T → ⋄ ⊢ R′ and y is guarded in R′ We show that R is symmetric, reduction-closed up to (=, ∼ = p ), k-contextual, and barb-preserving and so the result follows by Lemma A.4. Symmetry, k-contextuality, and barb-preservation are direct. For reduction-closure up to (=, ∼ = p ) we suppose: R′ [(x : T )P/y] → R′′ By Lemma A.6 we have that R′′ = R′′′ [(x : T )P/y] and moreover: R′ [(x : T )Q/y] → R′′′ [(x : T )Q/y] We use Lemma A.7 to find a R′′′′ and z such that y is guarded in R′′′′ , z is unguarded in R′′′′ and R′′′ = R′′′′ [z/y]. Hence: R′′ = = R ∼ =p = R′′′ [(x : T )P/y] R′′′′ [(x : T )P/y, (x : T )P/z] R′′′′ [(x : T )Q/y, (x : T )P/z] R′′′′ [(x : T )Q/y, (x : T )Q/z] R′′′ [(x : T )Q/y] (from above) (from above) (from definition of R and y guarded in R′′′′ [(x : T )P/z]) (from Lemma A.8 and z unguarded in R′′′′ [(x : T )Q/y]) (from above) as required. Corollary A.10. If ∆, x : T |= P ∼ = p Q and ∆, y : T → ⋄ ⊢ R then ∆ |= R[(x : T )P/y] ∼ = p R[(x : T )Q/y]. Proof. Follows from Lemmas A.7, A.8 and A.9. Corollary A.11. ∼ p v · (x : T )Q. (1) If ∆, x : T |= P ∼ = p Q and ∆ ⊢ v : T → ⋄ then ∆ |= v · (x : T )P = (2) If ∆, x : T |= P ∼ = p Q, ∆ ⊢ a : ch[T → ⋄] and ∆ ⊢ R then ∆ |= ah(x : T )PiR ∼ = p ah(x : T )QiR. Proof. Follows from Corollary A.10. Proof of Lemma 2.2: The ‘only if’ direction is immediate. For the converse it is sufficient to show that ∼ = p is preserved by each process operator of HOπ as demonstrated by Lemma A.1 and Corollary A.11. A PPENDIX B. M ERGE IS A PARTIAL FUNCTION Proof of Proposition 3.3: We consider the rewriting relation ։ which we will define as the one-step rewriting used to define the merge operation: C ։ X if C doesn’t contain hk ⇐ vi for any k, v ν(~a : ~T ) . (hk ⇐ vi k C) ։ ν(~a : ~T ) . (C[v/τk ]) if τk 6∈ v It is easy to see that ։ is a terminating rewriting relation. Moreover, the rewriting will terminate with a X from C (so that hhCii is defined) exactly when rg(C) is acyclic. To see this we consider the effect of ։ on reference graphs: for hk ⇐ vi k C ։ C[v/τk ] CONTEXTUAL EQUIVALENCE FOR HIGHER-ORDER π-CALCULUS REVISITED 21 the reference graph of hk ⇐ vi k C has the node k removed and any edges such that l ′ 7→ k 7→ l for l ′ , l 6= k, are replaced with an edge l ′ 7→ l all other edges involving k are removed. So if node k is involved in a cycle before rewriting occurs, that is l 7→∗ k 7→∗ l for some l, then either it is a tight loop, that is l = k and k 7→ k, or l 6= k and the cycle still exist after rewriting as l 7→∗ l. The side-condition on the rewrite rule forbids tight loops hence we see that ։ preserves cyclicity. That is: if C ։ C′ then rg(C) is acyclic if and only if rg(C′ ) is acyclic. Now, suppose that hhCii is defined. We know that there exists a finite sequence C ։ C1 ։ · · · ։ Cn ։ X with hhCii = Cn . We know that rg(Cn ) is acyclic as it contains no edges. Thus, rg(C) is acyclic also. Conversely, suppose that rg(C) is acyclic. Then as ։ is terminating there must be a finite sequence C ։ C1 ։ · · · ։ Cn such that Cn cannot be rewritten. There are two possibilities for this: either rg(Cn ) contains a tight loop, or Cn is X. We see that rg(C) is acyclic, so Cn is acyclic too and therefore cannot contain a tight loop. Thus Cn is X and hhCii is defined. To show that hh·ii is a well-defined partial function it suffices to show that it is strongly confluent for acyclic terms. Note that if νa : T . (C) ։ C′ then either C′ is X or C′ ≡ νa : T . (C′′ ) such that C ։ C′′ . So without loss of generality suppose that C ։ C1 and C ։ C2 C ≡ C1′ k hk1 ⇐ v1 i and C ≡ C2′ k hk2 ⇐ v2 i for so that C1 ≡ C1′ [v1 /τk1 ] and C2 ≡ C2′ [v2 /τk2 ]. So either, k1 = k2 in which case C1 ≡ C2 or k1 6= l2 and C1′ ≡ C3′ k hk2 ⇐ v2 i and C2′ ≡ C3′ k hk1 ⇐ v1 i We notice that C1 (acyclicity implies τk2 6∈ v2 [v1 /τk1 ]) (acyclicity) (def) ≡ ≡ ≡ ։ ≡ ≡ ≡ C1′ [v1 /τk1 ] (C3′ k hk2 ⇐ v2 i)[v1 /τk1 ] C3′ [v1 /τk1 ] k hk2 ⇐ v2 [v1 /τk1 ]i C3′ [v1 /τk1 ][v2 [v1 /τk1 ]/τk2 ] C3′ [v1 [v2 [v1 /τk1 ]/τk2 ]/τk1 , v2 [v1 /τk1 ]/τk2 ] C3′ [v1 [v2 /τk2 ]/τk1 , v2 [v1 /τk1 ]/τk2 ] C3 By a symmetric argument we see that C2 ։ C3′ [v2 [v1 /τk1 ]/τk2 , v1 [v2 /τk2 ]/τk1 ] and, by definition, this is just C3 so we have C2 ։ C3 . Thus ։ is strongly confluent for acyclic terms and hence hh·ii is well-defined. 22 A. JEFFREY AND J. RATHKE R EFERENCES [1] L. Cardelli and A. Gordon. Mobile ambients. In Proc. Foundations of Software Science and Computation Structures (FoSSaCS), Lecture Notes in Computer Science. Springer-Verlag, 1998. [2] C. Fournet and G. Gonthier. A hierarchy of equivalences for asynchronous calculi. In Proc. Int. Conf. Automata, Languages and Programming (ICALP), volume 1443 of Lecture Notes in Computer Science. Springer-Verlag, 1998. [3] C. Fournet, G. Gonthier, J-J. Levy, L. Maranget, and D. Remy. A calculus of mobile agents. In Proc. CONCUR, volume 1119 of Lecture Notes in Computer Science. Springer-Verlag, 1996. [4] A. Giacalone, P. Mishra, and S. Prasad. Facile: A symmetric integration of concurrent and functional programming. In Proc. TAPSOFT, volume 352 of Lecture Notes in Computer Science, pages 184–209. Springer-Verlag, 1989. [5] M. Hennessy and J. Rathke. Typed behavioural equivalences for processes in the presence of subtyping. In Proc. Computing: the Australasian Theory Symposium (CATS), Electronic Notes in Theoretical Computer Science. Elsevier, 2002. [6] K. Honda and N. Yoshida. On reduction-based process semantics. Theoretical Computer Science, 152(2):437–486, 1995. [7] A.S.A Jeffrey and J. Rathke. A theory of bisimulation for a fragment of Concurrent ML with local names. In Proc. IEEE Symp. Logic in Computer Science (LICS), pages 311–321. Computer Society Press, 2000. [8] A.S.A Jeffrey and J. Rathke. A fully abstract may testing semantics for concurrent objects. In Proc. IEEE Symp. Logic in Computer Science (LICS), pages 101–112. Computer Society Press, 2002. [9] J. Riely and M. Hennessy. A typed language for distributed mobile processes. In Proc. ACM Conf. Principles of Programming Languages (POPL). ACM Press, 1998. [10] D. Sangiorgi. Expressing Mobility in Process Algebras: First-Order and Higher-Order Paradigms. PhD thesis, University of Edinburgh, 1993. [11] D. Sangiorgi. Bisimulation for higher-order process calculi. Information and Computation, 131(2):141–178, 1996. [12] D. Sangiorgi and R. Milner. On the problem of ‘weak bisimulation up to’. In Proc. CONCUR, volume 630 of Lecture Notes in Computer Science, pages 32–46. Springer-Verlag, 1992. [13] D. Sangiorgi and D. Walker. The pi-calculus: A Theory of mobile processes. Cambridge University Press, 2001. [14] B. Thomsen. Calculi for Higher-Order Communicating Systems. PhD thesis, University of London, 1990. [15] J. Vitek and G. Castagna. Seal: A framework for secure mobile computations. In Internet Programming Languages, volume 1686 of Lecture Notes in Computer Science. Springer-Verlag, 1999. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
6cs.PL
Discrepancy Analysis of a New Randomized Diffusion Algorithm for Weighted Round Matrices Takeharu Shiraga∗ arXiv:1802.06532v2 [cs.DS] 21 Feb 2018 February 22, 2018 Abstract For an arbitrary initial configuration of indivisible (discrete) loads over vertices of a distributed network (graph), we consider the problem of minimizing the discrepancy between the maximum and minimum load among all vertices. For this problem, diffusion-based algorithms are well studied because of its simplicity. In diffusion-based algorithms, each vertex distributes its loads as evenly as possible among its neighbors in each synchronous round. This paper presents a new randomized diffusion-based algorithm inspired by multiple random walks. In multiple random walks, at each vertex, each token (load) generates a random variable in [0, 1), and move to a vertex corresponding to the given probability distribution (transition matrix). In our algorithm, at each vertex, each token k (k ∈ {0, 1, . . . , X −1}) generate a random number in [k/X, (k+1)/X), and moves to a vertex corresponding to the given probability distribution. Our algorithm is adaptive to any transition transition probabilities while almost all previous works are concerned with uniform transition probabilities. For this algorithm, we analyze the discrepancy between the token configuration and its expected √ value, and give an upper bound depending on the local 2-divergence of the transition matrix and log n, where n is the number of vertices. The local 2-divergence is a measure which often appeared in previous works. We also give an upper bound of the local-2 divergence for any reversible and lazy transition matrix. √ These yield the following specific results. First, our algorithm achieves O( d log n) discrepancy for any d regular graph, which matches the best result on previous works of diffusion model. Note that our algorithm does not need any assumption of the number of tokens such as negative loads which are often assumed in previous works. Second, for general graphs with maximum degree dmax , our √ algorithm achieves O( dmax log n) discrepancy using the transition matrix based on the metropolis hasting algorithm. Note that this algorithm does not need information of dmax while almost all previous works use it. Key words: Load balancing, Diffusion, Markov chain 1 Introduction This paper is concerned with the load balancing algorithms on distributed networks. Let G = (V, E) be an undirected and connected network (graph), and X (0) ∈ Zn≥0 be an initial configuration of loads (tokens) over V , where n = |V |. Then, we consider a distributed and iterative algorithm to balance the tokens over vertices, i.e., each vertex moves its tokens to its neighbors iteratively at each discrete and synchronous time step to minimize the discrepancy between the maximum and minimum tokens among all vertices. ∗ Department of Information and System Engineering, Faculty of Science and Engineering, Chuo University, Tokyo, Japan [email protected] 1 1.1 Previous works Load balancing algorithms studied in previous works are classified as diffusion-based algorithms and matchingbased algorithms. Roughly speaking, each vertex sends its tokens to neighbors as evenly as possible (according to round matrix) at each round in diffusion-based algorithms. Matching-based algorithms generate a (different) matching of the graph in a distributed way at each round, and the endpoints of each matching balances tokens as evenly as possible. Rabani et al. [10] studied deterministic diffusion-based algorithms and matching-based algorithms, and gave a framework of the analysis of these models. They introduced the local 1-divergence and show that the discrepancy is upper bounded by the local 1-divergence within O(log(Kn)/(1 − λ)) step, where K = (0) (0) maxx,y |Xx − Xy | is the initial discrepancy and λ is the second largest eigenvalue of the round matrix. They also showed that the local 1-divergence is upper bounded by O(d log n/(1 − λ)) for any d regular graph. Randomization is a natural approach to get smaller discrepancy. Friedrich and Sauerwald [6] studied randomized version√of matching models. They showed that the discrepancy is upper bounded by the local 2-divergence times log n with in O(log(Kn)/(1 − λ)) step and the local 2-divergence is upper bounded p by O( d/(1 − λ)). Berenbrink et al. [3] studied a√randomized diffusion-based algorithm. They showed that the discrepancy is upper bounded by O(d max{ log n, log log n/(1 − λ)}) within O(log(Kn)/(1 − λ)) step for any d regular graph. Akbari and Berenbrink [1] studied randomized and deterministic diffusion algorithm based on rotorrouter mechanism. They gave same bound of [3] for their randomized diffusion algorithm using fewer random bits compared to [3]. Furthermore, they gave upper bounds of deterministic diffusion algorithm on specific graphs, O(d1.5 ) for hypercube and O(1) for constant-dimensional tori. The results of Sauerwald and Sun [11] is the best result of the discrepancy so far. They showed that constant discrepancy within O(log(Kn)/(1 − λ)) step for a randomized matching model. Recently, Berenbrink et al. [4] studied deterministic diffusion based algorithms. They showed that O(d) discrepancy within O((log(Kn) + d log2 n)/(1 − λ)) step. This result improves [10, 1]. There are some other results concerned with the randomized diffusion-based algorithms which use negative loads [5, 2, 11]. In [11], authors showed that O(dmax log n) discrepancy within O(log(Kn)/(1 − λ)) step for any graphs. 1.2 This work In this paper, we consider the following diffusion-based algorithm. Let P be an arbitrary transition matrix over V , which is related to the round matrix in previous works. For example, Px,y = 1/dx if (x, y) ∈ E, (t) where dx is the degree size of x. Now, let Xv denote the number of tokens on v at time t in our algorithm. (t) Algorithm. At each time step t and at each vertex v ∈ V , each token k (k ∈ {0, 1, . . . , Xv − 1}) (t) (t) generates a random number in [k/Xv , (k + 1)/Xv ) uniformly at random. Then, each token moves to its corresponding neighbor. See Figure 1 for an example. There are 5 tokens (k = 0, 1, 2, 3, 4) on v and (Pv,v0 , Pv,v1 , Pv,v2 , Pv,v3 ) = (1/10, 3/5, 1/5, 1/10). In this example, token 0 moves to v0 (v1 ) with probability 1/2, token 1 (2) moves to v1 with probability 1, token 3 moves to v1 (v2 ) with probability 1/2, and token 4 moves to v2 (v3 ) with probability 1/2. More precisely, we assume that for each v ∈ V , each u is mapped into a interval in [0, 1) whose length (t) (t) is Pv,u . Then each token k moves to u if the generated random number in [k/Xv , (k + 1)/Xv ) is in the interval of u. (See equation (1) in Section 2.2 for the concrete definition). 2 𝑘: 0 1 2 3 4 𝑣𝑖 : 𝑣0 𝑣1 𝑣2 𝑣3 𝑃𝑣,𝑣𝑖 : 1Τ10 3Τ5 1Τ5 1Τ10 Figure 1: This algorithm is quite simple. At each round, each vertex only sends its tokens using the number of tokens on it and the probability distribution around it (e.g., its degree size), does not need to communicate to neighbors or use the number of tokens of its neighbor. Furthermore, this algorithm allows to use arbitrary transition matrix. Almost all previous works are corresponding to “uniform” transition matrices, i.e., Pv,x = Pv,y holds for any x, y in the neighboring set of v (x, y 6= v). The main result of this paper is the following general upper bound. Main results in general form. First, we introduce the local p-divergence of P . Definition 1.1 (local p-divergence, [10, 6]). For any p ∈ Z≥0 , the local-p divergence of P is defined by 1/p  ∞ X Ψp (P ) := max   w∈V X t=0 (v,u)∈V ×V :Pv,u >0  t t |Pv,w − Pu,w |p   . Then, we show the following main theorem. Theorem 1.2. For any initial configuration X (0) and transition matrix P ,   √ 2 (T ) (0) T Pr max Xw − (X P )w ≤ 4Ψ2 (P ) ln n ≥ 1 − w∈V n holds for each time T ∈ Z≥0 . Note that X (0) P T is the expected value of X (T ) (See Section 3.2 for details). X (0) P T is converge to 1 1 π, where π is the stationary distribution of P (See Appendix A for details). Second, we obtain the following upper bound of the local 2-divergence for weighted P . kX (0) k Theorem 1.3. Suppose that P is reversible 2 and lazy 3 . Then, s 2 maxw∈V πw Ψ2 (P ) ≤ min(v,u)∈E◦P πv Pv,u holds, where E◦P = {(v, u) ∈ V × V | Pv,u > 0 and v 6= u}. 1 Probability distribution such that πP = π holds. P is reversible if the detailed balance equation πv Pv,u = πu Pu,v holds for any u, v ∈ V . 3 P is lazy if Pv,v ≥ 1/2 holds for any v ∈ V . 2 3 This is a generalized version of the previous result [11], which is corresponding to uniform P . These results in general form give the following specific result. Contribution for regular graphs. Now, we consider the lazy transition matrix PL on d-regular graph: (PL )x,x = 1/2, (PL )x,y = 1/2d if (x, y) ∈ E and (PL )x,y = 0 otherwise. For this transition matrix, we obtain the following. Corollary 1.4. Suppose that G = (V, E) is an arbitrary connected d-regular graph and the transition matrix is PL . Then, for each T ≥ log(2Kn) 1−λ , it holds that  Pr max x,y∈V |Xx(T ) − Xy(T ) |  √ 2 ≤ 16 d ln n ≥ 1 − . n This upper bound improves the previous result of [3]. Corollary 1.4 achieves the same upper bound of the diffusion model in [11] without negative loads. Contribution for general graphs. Since our algorithm allows to use any transition matrix, we can use the Metropolis chain PM for general graphs, where (PM )x,y = (1/2) min{1/dx , 1/dy } if (x, y) ∈ E, (PM )x,y = 0 if (x, y) ∈ / E and the self loop is equal to the remaining probability [9]. For this transition matrix, we obtain the following. Corollary 1.5. Suppose that G = (V, E) is an arbitrary connected graph and the transition matrix is PM . Then, for each T ≥ log(2Kn) 1−λ , it holds that  Pr max x,y∈V |Xx(T ) − Xy(T ) |  p 2 ≤ 16 dmax ln n ≥ 1 − . n This also matches the previous result of the diffusion model on general graph [11] without negative loads. Furthermore, each vertex only needs the degree of its neighbors to calculate (PM )x,y = (1/2) max{dx , dy }, while previous work [11] needs dmax , which is the maximum value of the degree among all vertices. 2 Notations and Model description In this section we describe our model precisely. 2.1 Notations P Let V be a vertex set, and let n = |V |. Let P ∈ [0, 1]n×n be a transition matrix on V , i.e., u∈V Pv,u = 1 t denotes (v, u) entry of P t . In this paper we holds for any v ∈ V , where Pv,u denotes (v, u) entry of P . Pv,u assume that P 0 is the identity matrix. Let NvP be the set of neighbors of v ∈ V , i.e., NvP := {u ∈ V | Pv,u > 0}. In this paper, we assume an arbitrary ordering on NvP , i.e., we denote NvP = {v0 , v1 , . . . , vdPv −1 }, where dPv = |NvP |. Let E P be the set of edges of transition diagram of P , i.e., E P := {(v, u) ∈ V × V | Pv,u > 0}. Note that E P may contain self-loop edges. 2.2 Model description Let X (0) ∈ Zn≥0 be a initial configuration of M tokens over V , and let X (t) ∈ Zn≥0 denote the configuration of M tokens over V at time t ∈ Z≥0 in our algorithm. In an update from X (t) to X (t+1) of our algorithm, (t) (t) (t) (t) (t) at each vertex v ∈ V , we generate Xv random numbers rv (0), rv (1), . . . , rv (Xv − 1), where each 4 (t) rv (k) is picked from operators (t) Dv (k) h k k+1 (t) , (t) Xv Xv  uniformly at random. From these random numbers, we define destination such that   i−1 i X X Dv(t) (k) = vi if rv(t) (k) ∈  Pv,vj , Pv,vj  . j=0 (1) j=0 (t) Dv (k) denotes the destination of (k + 1)-th token on v ∈ V at time t. Then, let (t) Xv(t+1) u −1 X XX  := 1 Du(t) (k) = v . u∈V (2) k=0 (t) According to the above definition, destination operators Dv (k) satisfy the following properties. (t) Observation 2.1. Suppose that X (t) is fixed. Then, for any v, x ∈ V , k ∈ {0, 1, . . . Xv − 1} and ` ∈ (t) (t) (t) {0, 1, . . . Xx − 1}, Dv (k) and Dx (`) are independent if v 6= x or k 6= `. Observation 2.2. h Pr Dv(t) (k) = vi | Xv(t) i =   " ! i−1 i X X k + 1 k  , (t) · Xv(t) Pv,vj , Pv,vj  ∩ (t) X X v v j=0 j=0 (t) This paper is concerned with the behavior of X (t) defined by destination operators Dv (k) satisfying Observation 2.1 and 2.2. 3 Proof of Theorem 1.2 This section gives the proof of Theorem 1.2. Theorem 3.1 (Theorem 1.2). For any initial configuration X (0) and transition matrix P ,   √ 2 (T ) (0) T Pr max Xw − (X P )w ≤ 4Ψ2 (P ) ln n ≥ 1 − w∈V n holds for each time T ∈ Z≥0 . 3.1 Framework of the proof First, we introduce some notations for the proof. Let V = {0, 1, . . . , n − 1}. For any t ∈ {0, 1, . . . , T − 1}, v ∈ V , and k ∈ {0, 1, . . . , M − 1}, let lv(t) (k) := (M n)t + (M )v + k, (3) and let Dl(t) (k) v ( (t) Dv (k) := −1 (if k ∈ {0, 1, . . . , M − 1}) . (otherwise) 5 (4) (t) (t) This definition means that Pr[Dl(t) (k) = u | Xv ] = 0 for any k ≥ Xv v convenience, let and u ∈ V . For the notational D` := (Dl )l<` = D0 , D1 , . . . , D`−1 , (5) which is a sequence of random variables. Then, we observe the following from the definition of the configuration of tokens (2). Observation 3.2. For any t ∈ Z≥0 , X (t) is determined by X (0) and DM nt = D0 , D1 , . . . , Dl(t−1) (M −1) . n−1 Now, let h i Y` = Y` (w, T ) = E Xw(T ) − (X (0) P T )w | D` . (6) (T ) We define Y0 := E[Xw − (X (0) P T )w ]. Note that Y0 , Y1 , . . . is a martingale with respect to D0 , D1 , . . ., thus " # MX nT −1   2 2 (c` ) (7) Pr |YM nT − Y0 | ≥ η ≤ 2 exp −η /2 `=0 holds from Azuma-Hoeffding inequality (See Appendix A), where c` is a value satisfies |Y`+1 − Y` | ≤ c` . (T ) (T ) Since YM nT = Xw − (X (0) P T )w from Observation 3.2 and Y0 = E[Xw − (X (0) P T )w ] = 0 (See Lemma 3.4 and (17) in Section 3.2 for the detail), v   uM nT −1 u X 2 Pr |Xw(T ) − (X (0) P T )w | ≥ 2t (8) (c` )2 ln n ≤ 2 n `=0 q P nT −1 (c` )2 ln n2 . Thus, using the union bound to (8) and apply the following holds by taking η = 2 M `=0 lemma, we obtain Theorem 1.2. Lemma 3.3. For any T ∈ Z≥0 and w ∈ V , it holds that MX nT −1 2 2 Y`+1 (w, T ) − Y` (w, T ) ≤ 4 Ψ2 (P ) . `=0 To complete the proof, we prove Lemma 3.3 in the following subsection. 3.2 Proof of Lemma 3.3 For the notational convenience, let ( ∅ e k I(X, k) := k+1 X, X  (if X = 0) (otherwise) (9) and Pev,vi   i i−1 X X :=  Pv,vj , Pv,vj  . j=0 (10) j=0 First, we introduce the following lemma inspired by Lemma 4.1 in [12]. We use the definition of our algorithm (2) to prove Lemma 3.4. 6 Lemma 3.4. For any P , X (0) , w ∈ V and T ∈ Z≥0 , it holds that Xw(T ) − (X (0) P T )w = T −1 X X −1   X M X   T −t−1 T −t−1 e (t) , k) 1 Dl(t) (k) = u − Xv(t) Pev,u ∩ I(X Pu,w − Pv,w . v v t=0 v∈V u∈NvP k=0 Proof. It is not difficult to see that T −1  X T −1    X X (t+1) − X (t) P P T −t−1 = X (t+1) P T −t−1 − X (t) P T −t t=0 t=0 (T ) = X P 0 − X (0) P T = X (T ) − X (0) P T . (11) From (11) we obtain Xw(T ) − (X (0) T −1 X T P )w = X  T −t−1 Xu(t+1) − (X (t) P )u Pu,w . (12) t=0 u∈V Then, from the definitions (2) and (4) we have (t) Xu(t+1) v −1 X XX  = 1 Dv(t) (k) = u v∈V k=0 (X (t) P )u = X = −1 XM X  1 Dl(t) (k) = u . v (13) v∈V k=0 We also have X Xv(t) Pv,u = v∈V Xv(t) v∈V M −1 X e (t) , k) Pev,u ∩ I(X v (14) k=0 from the definitions (9) and (10). Finally, we have  X  (t) (t) e e 1 Dl(t) (k) = u − Xv Pv,u ∩ I(Xv , k) Pv,w = 0 v (15) u∈NvP since X  1 Dl(t) (k) = u v u∈NvP = X e (t) , k) = 1. Xv(t) Pev,u ∩ I(X v (16) u∈NvP Combining (12), (13) and (14) and subtracting (15), we obtain the claim. Note that from Observation 2.2 and the chain rule of the conditional expectation, h  h h  i ii E 1 Dl(t) (k) = u = E E 1 Dl(t) (k) = u | Xv(t) v v h h ii = E Pr Dl(t) (k) = u | Xv(t) v h i e (t) , k) = E Xv(t) Pev,u ∩ I(X v (T ) holds, thus we have Y0 = E[Xw − (X (0) P T )w ] = 0. Next, we show the following lemma using Lemma 3.4. 7 (17) (τ ) Lemma 3.5. For any τ ∈ {0, 1, . . . , T − 1}, ν ∈ V and κ ∈ {0, 1, . . . , Xν − 1}, it holds that  X    T −τ −1 T −τ −1 e (τ ) , κ) 1 Dl(τ ) (κ) = u − Xν(τ ) Peν,u ∩ I(X Pu,w − Pν,w . Yl(τ ) (κ)+1 − Yl(τ ) (κ) = ν ν ν ν u∈NνP Proof. From the definition of Y` (6) and Lemma 3.4, we have Yl(τ ) (κ)+1 − Yl(τ ) (κ) = T −1 n−1 −1 X XM X X ν ν  T −t−1 T −t−1 (∗) Pu,w − Pv,w , (18) t=0 v=0 k=0 u∈NvP where h  i ∗ = E 1 Dl(t) (k) = u | Dl(τ ) (κ)+1 ν h v i (t) e (t) e − E Xv Pv,u ∩ I(X , k) | D (τ ) v l (κ)+1 h  iν − E 1 Dl(t) (k) = u | Dl(τ ) (κ) v ν i h (t) e (t) e v , k) | D (τ ) . + E Xv Pv,u ∩ I(X l (κ) (19) ν To obtain the claim, let we start with showing h  i E 1 Dl(t) (k) = u | Dl(τ ) (κ) ν v h i  (t) (τ ) E Xv(t) Pev,u ∩ I(X e v(t) , k) | D (τ ) if l (k) ≥ l (κ) v ν lν (κ) = .  1 D (t) = u (otherwise) l (k) (20) v h  i  (t) (τ ) Obviously, E 1 Dl(t) (k) = u | Dl(τ ) (κ) = 1 Dl(t) (k) = u holds if lv (k) < lν (κ). Hence we v consider if (t) lv (k) ν v (τ ) lν (κ) ≥ holds. In this case, from the chain rule of the conditional expectation, h  i h h  i i E 1 Dl(t) (k) = u | Dl(τ ) (κ) = E E 1 Dl(t) (k) = u | Dl(t) (k) | Dl(τ ) (κ) v ν v v ν (21) holds. From Observation 2.1, we have h h  i i (21) = E E 1 Dl(t) (k) = u | Dl(t) (0) | Dl(τ ) (κ) v ν 0 i h h i = E Pr Dl(t) (k) = u | DM nt | Dl(τ ) (κ) . v ν (22) (t) Observation 3.2 says that DM nt determines Xv . Using Observation 2.2, we have h i e v(t) , k) . Pr Dl(t) (k) = u | DM nt = Xv(t) Pev,u ∩ I(X (23) Thus combining equations (21)-(23), we obtain (20). Note that Observation 3.2 also says that h i e v(t) , k) | D (τ ) e v(t) , k) (if t ≤ τ ) E Xv(t) Pev,u ∩ I(X = Xv(t) Pev,u ∩ I(X l (κ) (24) v ν holds. Now we prove the lemma using above discussion. We consider the following 3 cases. 8 case 1. [t ≤ τ − 1] or [t = τ and v ≤ ν − 1] or [t = τ , v = ν and k ≤ κ − 1 ]: (t) (τ ) In this case, lv (k) ≥ lν (κ) + 1 holds. Using (20), we have (∗) = 0 (25) in case 1. case 2. [t = τ , v = ν and k ≥ κ + 1] or [t = τ and v ≥ ν + 1] or [t ≥ τ + 1]: (t) (τ ) In this case, we have lv (k) ≤ lν (κ) − 1. From (20), we have h  i h  i E 1 Dl(t) (k) = u | Dl(τ ) (κ)+1 = E 1 Dl(t) (k) = u | Dl(τ ) (κ) . v ν v (26) ν Furthermore, i i h h (t) e (t) e e v(t) , k) | D (τ ) | D = E X P ∩ I(X , k) E Xv(t) Pev,u ∩ I(X (τ ) v,u v v l (κ) l (κ)+1 ν ν (27) holds from (24). Thus (∗) = 0 (28) in case 2. case 3. [t = τ , v = ν and k = κ]: First, we have h i h i (t) e (t) e v(t) , k) | D (τ ) e = E X P ∩ I(X , k) | D E Xv(t) Pev,u ∩ I(X (τ ) v,u v v l (κ)+1 l (κ) ν ν (29) from (24). We also have h  i  E 1 Dl(τ ) (κ) = u | Dl(τ ) (κ)+1 = 1 Dl(τ ) (κ) = u ν ν (30) ν and h  i h i e ν(τ ) , κ) | D (τ ) E 1 Dl(τ ) (κ) = u | Dl(τ ) (κ) = E Xν(τ ) Peν,u ∩ I(X l (κ) ν ν ν = Xν(τ ) Peν,u ∩ e (τ ) , κ) I(X ν (31) from (20). Thus  e ν(τ ) , κ) (∗) = 1 Dl(τ ) (κ) = u − Xν(τ ) Peν,u ∩ I(X ν (32) in case 3. Combining (18), (25), (28) and (32), we obtain the claim. Proof of Lemma 3.3. First, we observe that  1 Dl(τ ) (κ) = u − ν (τ ) since Xν Xν(τ ) Peν,u ∩ e (τ ) , κ) I(X ν  e ν(τ ) , κ) = Pr D (τ ) Peν,u ∩ I(X l (κ) ν X = ( 1−1=0 (τ ) (if Xν e ν(τ ) , κ) = 1) Peν,u ∩ I(X e ν(τ ) , κ) = 0) Peν,u ∩ I(X (33) (τ ) 0 − 0 = 0 (if Xν (τ )  = u | Xν from Observation 2.2. Furthermore, we have  e ν(τ ) , κ) 1 Dl(τ ) (κ) = u − Xν(τ ) Peν,u ∩ I(X ν u∈NνP ≤ X  1 Dl(τ ) (κ) = u ν + u∈NνP X e ν(τ ) , κ) Xν(τ ) Peν,u ∩ I(X u∈NνP = 1 + 1 = 2. (34) 9 Now, let o n e (τ ) , κ) < 1 . Sν(τ ) (κ) = u ∈ NvP | 0 < Xν(τ ) Peν,u ∩ I(X ν (35)  (τ ) (τ ) e ν(τ ) , κ) = 0 since (33) holds. Combining Note that if u 6= Sν (κ), then 1 Dl(τ ) (κ) = u − Xν Peν,u ∩ I(X ν Lemma 3.5, Cauchy–Schwarz and (34), we have  2 Yl(τ ) (κ)+1 − Yl(τ ) (κ) ν ν  2  X    T −τ −1 T −τ −1  e (τ ) , κ) =  1 Dl(τ ) (κ) = u − Xν(τ ) Peν,u ∩ I(X Pu,w − Pν,w ν ν u∈NνP 2  X     T −τ −1 T −τ −1 e (τ ) , κ) =  1 Dl(τ ) (κ) = u − Xν(τ ) Peν,u ∩ I(X Pu,w − Pν,w 1 u ∈ Sν(τ ) (κ)  ν  ν u∈NνP ≤ 2 X  2 X     T −τ −1 T −τ −1 e (τ ) , κ) Pu,w − Pν,w 1 u ∈ Sν(τ ) (κ) 1 Dl(τ ) (κ) = u − Xν(τ ) Peν,u ∩ I(X ν ν u∈NνP u∈NνP ≤ X  e (τ ) , κ) 1 Dl(τ ) (κ) = u − Xν(τ ) Peν,u ∩ I(X ν X ν u∈NνP ≤ 2 X T −τ −1 T −τ −1 Pu,w − Pν,w 2  1 u ∈ Sν(τ ) (κ) u∈NνP   T −τ −1 T −τ −1 2 Pu,w − Pν,w 1 u ∈ Sν(τ ) (κ) . (36) u∈NνP  (τ ) e ν(τ ) , κ) ≤ 1. Thus The second inequality holds since 1 Dl(τ ) (κ) = u − Xν Peν,u ∩ I(X ν MX nT −1 (Y`+1 − Y` ) 2 = T −1 n−1 −1  X XM X Yl(τ ) (κ)+1 − Yl(τ ) (κ) ν 2 ν τ =0 ν=0 κ=0 `=0 ≤ T −1 n−1 −1 X XM X τ =0 ν=0 κ=0 = 2 T −1 n−1 X X X 2 T −τ −1 T −τ −1 Pu,w − Pν,w u∈NνP X T −τ −1 Pu,w −  T −τ −1 2 Pν,w τ =0 ν=0 u∈NνP ≤ 4 T −1 n−1 X X 2  1 u ∈ Sν(τ ) (κ) X M −1 X  1 u ∈ Sν(τ ) (κ) κ=0 T −τ −1 T −τ −1 Pu,w − Pν,w 2 τ =0 ν=0 u∈NνP = 4 T −1 X X τ τ Pu,w − Pν,w 2 τ =0 (u,ν)∈E P ≤ 4(Ψ2 (P ))2 holds, and we obtained the claim. Note that the second inequality holds since for each u ∈ NνP , the number (τ ) (τ ) e ν(τ ) , κ) < 1) holds is at most two. (For example, see of κ such that Sν (κ) 3 u (0 < Xν Peν,u ∩ I(X Figure 1. If u = v1 , such κ is 0 and 3.) 10 4 Upper bound of the local 2-divergence and specific results This section shows Theorem 1.3 and other specific results. Theorem 4.1 (Theorem 1.3). Suppose that P is reversible and lazy. Then, s 2 maxw∈V πw Ψ2 (P ) ≤ min(v,u)∈E◦P πv Pv,u holds, where E◦P = {(v, u) ∈ V × V | Pv,u > 0 and v 6= u}. 4.1 Proof of Theorem 1.3 To prove Theorem 1.3, we introduce the following lemma. We use the reversibility of P to prove Lemma 4.2. Lemma 4.2. For any reversible P , it holds that X X t t 2t 2t+1 πv Pv,u (Pu,w − Pv,w )2 = 2πw (Pw,w − Pw,w ). v∈V u∈NvP Proof. From the definition of NvP , we have X X XX t t t t πv Pv,u (Pu,w − Pv,w )2 = πv Pv,u (Pu,w − Pv,w )2 v∈V u∈NvP v∈V u∈V = XX t t t t πv Pv,u (Pu,w )2 + (Pv,w )2 − 2Pu,w Pv,w  v∈V u∈V = XX v∈V u∈V −2 XX t πv Pv,u (Pu,w )2 + t πv Pv,u (Pv,w )2 v∈V u∈V XX t t πv Pv,u Pu,w Pv,w . (37) v∈V u∈V Then, from the reversibility of P , XX XX XX XX t t t t πv Pv,u (Pu,w )2 + πv Pv,u (Pv,w )2 = πu Pu,v (Pu,w )2 + πv Pv,u (Pv,w )2 v∈V u∈V v∈V u∈V v∈V u∈V = X u∈V = X + X t πv (Pv,w )2 v∈V t t πw Pw,u Pu,w + u∈V = v∈V u∈V t πu (Pu,w )2 X t t πw Pw,v Pv,w v∈V 2t 2πw Pw,w , (38) and XX t t πv Pv,u Pu,w Pv,w = πw v∈V u∈V = holds. Thus we obtain the claim. 11 XX v∈V u∈V 2t+1 πw Pw,w t t Pw,v Pv,u Pu,w (39) Proof of Theorem 1.3. From Lemma 4.2, we have ∞ X X X t πv Pv,u (Pu,w − t Pv,w )2 t=0 v∈V u∈NvP ∞ X 2t 2t+1 ) = 2πw (Pw,w − Pw,w (40) t=0 ∞ X 2t 2t+2 (Pw,w − Pw,w ) ≤ 2πw (41) t=0 ≤ 2πw . (42) t t+1 holds for lazy P . Thus we obtain the claim from (42). Note that Pw,w ≥ Pw,w 4.2 Specific results 4.2.1 Lazy chain on regular graphs Let G = (V, E) be an undirected and connected graph. Additionally, we assume G is d-regular graph. Then, we consider the following transition matrix  1   2d (if (v, u) ∈ E) . (43) (PL )v,u = 12 (if v = u)   0 (othrwise) Then, the following corollary is obtained from Theorem 1.2 and Theorem 1.3. Corollary 4.3. Suppose that G = (V, E) is an arbitrary d-regular graph and the transition matrix is PL . Then, for each T ∈ Z≥0 , it holds that   √ 2 (T ) (0) T Pr max |Xw − (X PL )w | ≤ 8 d ln n ≥ 1 − . w∈V n Combining Corollary 4.3 and Proposition A.2, we obtain Corollary 1.4. 4.2.2 Metropolis chain on general graphs Now, we consider an arbitrary undirected and connected graph G = (V, E). We do not assume the regularity of G. Let dv be the degree of v ∈ V , i.e., dv = |{u ∈ V | (v, u) ∈ E}|. Then, we consider the following transition matrix on V  n o 1 1 1  min , (if (v, u) ∈ E)  dv du 2 P (PM )v,u = 1 − u:(v,u)∈E (PM )v,u (if v = u) . (44)   0 (othrwise) (PM ) is known as the Metropolis chain [9]. Let dmax = maxv∈V dv . Then, the following corollary is obtained from Theorem 1.2 and Theorem 1.3. Corollary 4.4. Suppose that G = (V, E) is an arbitrary graph and the transition matrix is PM . Then, for each T ∈ Z≥0 , it holds that   p 2 (T ) (0) T Pr max |Xw − (X PM )w | ≤ 8 dmax ln n ≥ 1 − . w∈V n Combining Corollary 4.4 and Proposition A.2, we obtain Corollary 1.5. 12 Acknowledgements This work is supported by JSPS KAKENHI Grant Number 17H07116. References [1] H. Akbari and P. Berenbrink, Parallel rotor walks on finite graphs and applications in discrete load balancing, Proc. SPAA 2013, 186–195. [2] H. Akbari, P. Berenbrink and T. Sauerwald, A simple approach for adapting continuous load balancing processes to discrete settings, Distributed Computing, 29(2) (2016), 143–161. [3] P. Berenbrink, C. Cooper, T. Friedetzky, T. Friedrich, T. Sauerwald, Randomized diffusion for indivisible loads, Journal of Computer and System Sciences 81(1) (2015), 159–185. [4] P. Berenbrink, R. Klasing, A. Kosowski, F. Mallmann-Trenn, and P. Uznanski, Improved analysis of deterministic load-balancing schemes, Proc. PODC 2015, 301–310. [5] T. Friedrich, M. Gairing, and T. Sauerwald, Quasirandom load balancing, SIAM Journal on Computing, 41 (2012), 747–771. [6] T. Friedrich and T. Sauerwald, Near-perfect load balancing by randomized rounding, Proc. STOC 2009, 121–130. [7] D. A. Levin and Y. Peres, Markov Chain and Mixing Times: Second Edition, The American Mathematical Society, 2017. [8] M. Mitzenmacher and E. Upfal, Probability and Computing Randomization and Probabilistic Techniques in Algorithms and Data Analysis 2nd edition, Cambridge University Press, 2017. [9] Y. Nonaka, H. Ono, K. Sadakane, M. Yamashita, The hitting and cover times of Metropolis walks, Theoretical Computer Science, 411 (2010), 1889–1894. [10] Y. Rabani, A. Sinclair, and R. Wanka, Local divergence of Markov chains and analysis of iterative load balancing schemes, Proc. FOCS 1998, 694–705. [11] T. Sauerwald and H. Sun, Tight bounds for randomized load balancing on arbitrary network topologies, Proc. FOCS 2012, 341–350. [12] T. Shiraga, Y. Yamauchi, S. Kijima, and M. Yamashita, Deterministic random walks for rapidly mixing chains, arXiv:1311.3749. A A.1 APPENDIX Preliminaries of Markov chains Proposition A.1. Suppose that P is reversible. Then, for any X (0) , w ∈ V and    M 1 log , T ≥ 1−λ πmin ε it holds that (X (0) P T )w − M πw ≤ ε. 13 Proof. We have (X (0) P T )w − M πw = X T T Xv(0) (Pv,w − πw ) ≤ M max |Pv,w − πw |. v∈V v∈V Then, from Theorem 12.4 in [7], we obtain the claim. Proposition A.2. Suppose that P is symmetric. Then, for any X (0) , w ∈ V and   1 2Kn T ≥ , log 1−λ ε it holds that (X (0) P T )w − M ≤ ε, n (0) (0) where K := maxx,y∈V |Xx − Xy |. Proof. We have (X (0) P T )w − M/n = X T Xv(0) (Pv,w − 1/n) v∈V = X T Xv(0) (Pw,v − 1/n) v∈V = X T (Xv(0) − Xx(0) )(Pw,v − 1/n) v∈V ≤ 2K· 1X T |Pw,v − 1/n|. 2 v∈V Then, from Theorem 12.4 in [7], we obtain the claim. A.2 Concentration inequality Theorem A.3 (Asuma-Hoeffding Inequality, [8]). Let X0 , . . . , Xn be a martingale such that |Xk − Xk−1 | ≤ ck . Then, for all t ≥ 1 and any λ > 0, " λ2 # Pr [|Xt − X0 | ≥ λ] ≤ 2 exp − Pt . 2 k=1 (ck )2 14
8cs.DS
Real Options for Project Schedules (ROPS) Lester Ingber Lester Ingber Research Ashland Oregon [email protected], [email protected] http://www.ingber.com/ Abstract Real Options for Project Schedules (ROPS) has three recursive sampling/optimization shells. An outer Adaptive Simulated Annealing (ASA) optimization shell optimizes parameters of strategic Plans containing multiple Projects containing ordered Tasks. A middle shell samples probability distributions of durations of Tasks. An inner shell samples probability distributions of costs of Tasks. PATHTREE is used to develop options on schedules. Algorithms used for Trading in Risk Dimensions (TRD) are applied to develop a relative risk analysis among projects. KEYWORDS: options; simulated annealing; risk management; copula; nonlinear; statistical † L. Ingber, “Real Options for Project Schedules (ROPS)”, Report 2007:ROPS, Lester Ingber Research, Ashland, OR, 2007. URL http://www.ingber.com/markets07_rops.pdf. $Id: markets07_rops,v 1.22 2007/04/01 14:32:24 ingber Exp ingber $ Lester Ingber -2- Real Options for Project Schedules (ROPS) 1. Introduction This paper is a brief description of a methodology of developing options (in the sense of financial options, e.g., with all Greeks), to be applied in collaboration with Michael Bowman, as a first example to scheduling a massive US Army project, Future Combat Systems (FCS) [1]. The major focus is to develop Real Options for non-financial projects, as discussed in other earlier papers [3,4,12]. Data and some guidance on its use has been reported in a previous study of FCS [2,5]. The need for tools for fairly scheduling and pricing such a complex project has been emphasized in Recommendations for Executive Action in a report by the U.S. General Accounting Office (GAO) on FCS [14], and they also emphasize the need for management of FCS business plans [13]. 2. Goals A given Plan results in S(t), money allocated by the client/government is defined in terms of Projects S i(t), S(t) = Σ S i(t) i where ai(t) may be some scheduled constraints. PATHTREE processes a probability tree developed over the life of the plan T , divided into N nodes at times {t n }, each with mean epoch length dt [11]. Options, including all Greeks, familiar to financial markets, are calculated for quite arbitrary nonlinear means and variances of multiplicative noise [6,9]. This ability to process nonlinear functions in probability distributions is essential for real-world applications. Each Task has a range of durations, with nonzero Ai , with a disbursement of funds used, defining S i(t n ). Any Task dependent on a Task completion is slaved to its precursor(s). We develop the Plan conditional probability density (CPD) in terms of differenced costs, dS, P(S ± dS; t n + dt|S; t n) P is modeled/cast/fit into the functional form − P(S ± dS; t n + dt|S; t n ) = (2π g2 dt) L= 1 2 exp(−Ldt) (dS − fdt)2 (2g2 dt 2) where f and g are nonlinear function of cost S and time t. The g2 variance function absorbs the multiple Task cost and schedule statistical spreads, to determine P(dS, t), giving rise to the stochastic nature of dollars spent on the Plan. A given Project i with Task k has a mean duration i ik , with a a mean cost S ik . The spread in dS has two components arising from: (1) a stochastic duration around the mean duration, and (2) a stochastic spread of mean dollars around a deterministic disbursement at a given time. Different finite-width asymmetric distributions are used for durations and costs. For example, the distribution created for Adaptive Simulated Annealing (ASA) [8], originally called Very Fast Simulated Re-annealing [7], is a finite-ranged distribution with shape determined by a parameter “temperature” q. For each state (whether duration or cost): (a) A random binary choice can be made to be higher or lower than the mean, using any ratio of probabilities selected by the client. (b) Then, an ASA distribution is used on the chosen side. Each side has a different q, each falling off from the mean. This is illustrated and further described in Fig. 1. At the end of the tree at a time T (T also can be a parameter), there is a total cost at each node S(T ), called a final “strike” in financial language. (A final strike might also appear at any node before T due to cancellation of the Project using a particular kind of schedule alternative.) Working backwards, options are calculated at time t0 . Greeks (functional derivatives of the option) assess sensitivity to various variables, e.g., like those discussed in previous papers [12], but here we deliver precise numbers based on as much real-world information available. Lester Ingber -3- 2 Real Options for Project Schedules (ROPS) 1/(2 * (abs(y) + q) * log(1 + 1/q)) 1.8 1.6 1.4 1.2 1 0.8 0.6 0.4 0.2 ASA (q = 0.1) 0 -1 -0.5 0 0.5 1 Fig. 1. The ASA distribution can be used to develop finite-range asymmetric distributions from which a value can be chosen for a given state of duration or cost. (a) A random binary distribution is selected for a lower-than or higher-than mean, using any ratio of probabilities selected by the client. Each side of the mean has its own temperature q. Here an ASA distribution is given for q = 0.1. The range can be scaled to any finite interval and the mean placed within this range. (b) A uniform random distribution selects a value from [-1,1], and a normalized ASA value is read off for the given state. 3. Data The following data are used to develop Plan CPD. Each Task i has (a) a Projected allocated cost, C i (b) a Projected time schedule, T i (c) a CPD with a statistical width of funds spent, SW S i (d) a distribution with a statistical width of duration, SW T i (e) a range of durations, RT i (f) a range of costs, R S i Expert guesses need to be provided for (c)-(f) for the prototype study. A given Plan must be constructed among all Tasks, specified the ordering of Tasks, e.g., obeying any sequential constraints among Tasks. 4. Three Recursive Shell 4.1. Outer Shell There may be several parameters in the Project, e.g., as coefficients of variables in means and variances of different CPD. These are optimized in an outer shell using ASA [8]. This end product, including MULTI_MIN states returned by ASA, gives the client flexibility to apply during a full Project [12]. We may wish to minimize Cost/T , or (CostOverrun - CostInitial)/T , etc. Lester Ingber -4- Real Options for Project Schedules (ROPS) 4.2. Middle Shell To obtain the Plan CPD, an middle shell of Monte Carlo (MC) states are generated from recursive calculations. A Weibull or some other asymmetric finite distribution might be used for Task durations. For a given state in the outer middle, a MC state has durations and mean cost disbursements defined for each Task. 4.3. Inner Shell At each time, for each Task, the differenced cost ( S ik (t + dt) − S ik (t))) is subjected to a inner shell stochastic variation, e.g., some asymmetric finite distribution. The net costs dS ik (t) for each Project i and Task k are added to define dS(t) for the Plan. The inner shell cost CPD is re-applied many times to get a set of {dS} at each time. 5. Real Options 5.1. Plan Options After the Outer MC sampling is completed, there are histograms generated of the Plan’s dS(t) and dS(t)/S(t − dt) at each time t. The histograms are normalized at each time to give P(dS, t). At each time t, the data representing P is “curve-fit” to the form of Eq. (0), where f and g are functions needed to get good fits, e.g., fitting coefficients of parameters {x} f = x f 0 + x f 1 S + x f 2 S 2 + ... g = x g0 + x g1 S + x g2 S 2 + ... At each time t, the functions f and g are fit to the function ln(( P(dS, t)), which includes the prefactor containing g and the function L which may be viewed as a Padé approximate of these polynomials. Complex constraints as functions of S ik (t) can be easily incorporated in this approach, e.g., due to regular reviews by funding agencies or executives. These P’s are input into PATHTREE to calculate options for a given strategy or Plan. 5.2. Risk Management of Project Options If some measure of risk among Projects is desired, then during the MC calculations developed for the toplevel Plan, sets of differenced costs for each Project, dS i(t) and dS i(t)/S i(t − dt), stored from each of the Project’s Tasks. Then, histograms and Project CPDs are developed, similar to the development of the Plan CPD. A copula analysis, coded in TRD for risk management of financial markets, are applied to develop a relative risk analysis among these projects [10]. In such an analysis, the Project marginal CPDs are all transformed to Gaussian spaces, where it makes sense to calculate covariances and correlations. An audit trail back the original Project spaces permits analysis of risk dependent on the tails of the Project CPDs. 6. Generic Applications ROPS can be applied to any complex scheduling of tasks similar to the FCS project. The need for government agencies to plan and monitor such large projects is becoming increasingly difficult and necessary [15]. Many large businesses have similar projects and similar requirements to manage their complex projects. Lester Ingber -5- Real Options for Project Schedules (ROPS) References [1] [2] [3] [4] [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] M. Bowman and L. Ingber, ‘‘Real Options for US Army Future Combat Systems,’’ Report 2007:ROFCS, Lester Ingber Research, Ashland, OR, 2007. G.G. Brown, R.T. Grose, and R.A. Koyak, ‘‘Estimating total program cost of a long-term, hightechnology, high-risk project with task durations and costs that may increase over time,’’ Military Operations Research 11, 41-62 (2006). [URL http://www.nps.navy.mil/orfacpag/resumePages/papers/Brownpa/Estimating_total_ program_cost.pdf] T.E. Copeland and P.T. Keenan, ‘‘Making real options real,’’ McKinsey Quarterly 128-141 (1998). [URL http://faculty.fuqua.duke.edu/˜charvey/Teaching/BA456_2006/McK98_3.pdf] G. Glaros, ‘‘Real options for defense,’’ Transformation Trends June, 1-11 (2003). [URL http://www.oft.osd.mil/library/library_files/trends_205_transformation_trends_9_june%202003_issue.pdf] R. Grose, ‘‘Cost-constrained project scheduling with task durations and costs that may increase over time: Demonstrated with the U.S. Army future combat systems,’’ Thesis, Naval Postgraduate School, Monterey, CA, 2004. [URL http://www.stormingmedia.us/75/7594/A759424.html] J.C. Hull, Options, Futures, and Other Derivatives, 4th Edition (Prentice Hall, Upper Saddle River, NJ, 2000). L. Ingber, ‘‘Very fast simulated re-annealing,’’ Mathl. Comput. Modelling 12, 967-973 (1989). [URL http://www.ingber.com/asa89_vfsr.pdf] L. Ingber, ‘‘Adaptive Simulated Annealing (ASA),’’ Global optimization C-code, Caltech Alumni Association, Pasadena, CA, 1993. [URL http://www.ingber.com/#ASA-CODE] L. Ingber, ‘‘Statistical mechanics of portfolios of options,’’ Report 2002:SMPO, Lester Ingber Research, Chicago, IL, 2002. [URL http://www.ingber.com/markets02_portfolio.pdf] L. Ingber, ‘‘Trading in Risk Dimensions (TRD),’’ Report 2005:TRD, Lester Ingber Research, Ashland, OR, 2005. L. Ingber, C. Chen, R.P. Mondescu, D. Muzzall, and M. Renedo, ‘‘Probability tree algorithm for general diffusion processes,’’ Phys. Rev. E 64, 056702-056707 (2001). [URL http://www.ingber.com/path01_pathtree.pdf] K.J. Leslie and M.P. Michaels, ‘‘The real power of real options,’’ McKinsey Quarterly 4-22 (1997). [http://faculty.fuqua.duke.edu/˜charvey/Teaching/BA456_2006/McK97_3.pdf] General Accounting Office, ‘‘Future Combat System Risks Underscore the Importance of Oversight,’’ Report GAO-07-672T, GAO, Washington DC, 2007. [URL http://www.gao.gov/cgibin/getrpt?GAO-07-672T] General Accounting Office, ‘‘Key Decisions to Be Made on Future Combat System,’’ Report GAO-07-376, GAO, Washington DC, 2007. [URL http://www.gao.gov/cgibin/getrpt?GAO-07-376] B. Wysocki, Jr, ‘‘Is U.S. Government ’Outsourcing Its Brain’?,’’ Wall Street Journal March 30, 1 (2007).
5cs.CE
arXiv:0806.2735v2 [quant-ph] 21 Jul 2008 QPL/DCM 2008 Preliminary version An overview of QML with a concrete implementation in Haskell Jonathan Grattage Laboratoire d’Informatique de Grenoble, CNRS, France [email protected] Abstract This paper gives an introduction to and overview of the functional quantum programming language QML. The syntax of this language is defined and explained, along with a new QML definition of the quantum teleport algorithm. The categorical operational semantics of QML is also briefly introduced, in the form of annotated quantum circuits. This definition leads to a denotational semantics, given in terms of superoperators. Finally, an implementation in Haskell of the semantics for QML is presented as a compiler. The compiler takes QML programs as input, which are parsed into a Haskell datatype. The output from the compiler is either a quantum circuit (operational), an isometry (pure denotational) or a superoperator (impure denotational). Orthogonality judgements and problems with coproducts in QML are also discussed. Keywords: QML, language, functional, teleport, denotational semantics, operational semantics, Haskell. 1 Introduction and motivation Language development for quantum computation is a rapidly developing research area [4], motivated by the application of established formal reasoning and verification techniques within a quantum framework, understanding the behaviour of quantum computation, aiding the development of new algorithms and gaining a deeper understanding of how they work. This paper discusses the syntax and features of, and gives a compiler for, a language allowing both classical and quantum control: QML [1,5]. The syntax and semantics for QML is a complete redevelopment of that presented previously [1], as the language has been changed to remove a problematic interpretation of coproducts (section 2.2); the interpretation of orthogonality has also been updated (section 2.1). In addition, in this work the operational semantics is made concrete by a compiler for QML programs implemented in Haskell. QML has a syntax similar to other functional languages [4], and is based on strict linear logic: i.e. linear logic with contraction, but without implicit weakening (in contrast, Selinger’s QPL uses affine linear logic [8], which allows weakening but 1 The author gratefully acknowledges Thorsten Altenkirch in the development of QML and the operational semantics. Ellie D’Hondt is also thanked for her constructive suggestions. Grattage not contraction). QML also integrates reversible and irreversible computations in a single language, where weakenings (which can give rise to the collapse of superpositions and entanglement) must be explicit. Contractions are allowed and are modelled as a form of sharing, analogous to the behaviour of classical functional languages. Differences between QML and other languages include the use of a quantum control operation, provided by the quantum-if construct if ◦ . To use the if ◦ operation, the branches of the computation must be orthogonal (distinguishable), the proof of which is supplied automatically by the type checker at compilation, and hence the programmer need not supply the condition, nor need it appear in the syntax of terms. Classical control is provided by a second classical-if construct if , which measures the term being branched over. QML has both an operational and denotational semantics [5], supporting formal reasoning principles with an algebra for equational reasoning and a normal form [2]. The operational semantics of QML is presented using a categorical formalisation of the quantum circuit model, which is realised by a compiler that translates QML programs into ‘typed’ quantum circuits. The denotational semantics is also implemented, which translates QML terms, via the operational semantics category FQC, into either isometries Q◦ or superoperators Q. Recent developments in QML include a fully operational compiler, with a type inference algorithm for QML terms, and the automatic derivation and extension of the orthogonality judgements and circuits required for quantum control, which have all been implemented. The implementation of the orthogonality judgements is such that it can be easily expanded as new rules for proving the orthogonality of terms are added to QML. This short paper outlines the new syntax of QML and its semantics. A new and faithful interpretation of the quantum teleportation algorithm in QML is also presented as an example of using QML. Details for using the compiler, and the output it generates, are then provided. Finally, the future development of the language, the semantics and compiler, and the uses of the compiler are described. 2 The syntax of QML This section introduces the syntax for QML (see also ref. [5]). The symbols σ, τ are used to vary over QML types, given by σ = Q1 | Q2 | σ ⊗ τ , where the type constructor is the tensor product ⊗ corresponding to a product type and Q2 is a qubit type. x, y, z are used to vary over names. Typing contexts (Γ, ∆) are given by Γ = • | Γ, x : σ where • is the empty context. Contexts correspond to functions from a finite set of variables to types. Constants κ, ι ∈ C are also used to define the syntax of expressions. Function variables are used to refer to previously defined QML programs. The terms of QML consist of those of a first-order functional language, extended with quantum data, a quantum control structure, and a measurement operator. The vector notation y is used for sequence variables to be measured (weakened). The grammar of QML terms is defined thus: (Variables) x , y, ... ∈ Vars (Prob amplitudes) κ, ι, ... ∈ C (Patterns) p, q ::= x | (x , y) 2 Grattage (Terms) ::= x | x y | () | (t, u) | let p = t in u | if t then u else u ′ | if ◦ t then u else u ′ | qfalsey | qtruey | κ × t | t + u Quantum data is modelled using the constructs κ × t and t + u. The term κ × t, associates the probability amplitude κ with the term t. The term t + u describes a quantum superposition of t and u. Quantum superpositions are first class values, and can be used in conditional expressions to provide quantum control. For example: if ◦ (qtrue + qfalse) then t else u evaluates both t and u and combines the results in a quantum superposition. Note that the term λ0 × t + λ1 × u, where t, u are not qubits, is syntactic-sugar for if ◦ (λ0 × qtrue + λ1 × qfalse) then t else u. The type-checker and orthogonality judgements ensure that this is a valid operation, by providing a proof that t and u are orthogonal (distinguishable in some way), that their types match, and that they are strict terms (they produce no garbage). In a quantum control operation, the two branches must be orthogonal, otherwise the type system would accept terms that implicitly perform measurements. Without this restriction “valid” programs could be written in QML that are not physically realisable by a quantum computer. Orthogonality judgements are inferred automatically by static analysis of terms (see section 2.1). As an example of superposition formation, the term ( √12 )×qfalse+( √12 )×qtrue is an equal superposition of qfalse and qtrue. Normalisation factors that are equal may be omitted. Finally, a QML program is a sequence of function definitions, where a function definition is given by f Γ = t : τ . A Haskell-style syntax is used to present program examples. For example, the QML function below (left) is equivalent to the following Haskell-like code (right): t, u f (x1 : σ1 , x2 : σ2 , . . , xn : σn ) =t :τ 2.1 f : σ1 ⊸ σ2 . . ⊸ σn ⊸ τ f x1 x2 . . xn = t QML orthogonality judgements QML has a basic type system that tracks the use of variables, preventing them from being weakened inappropriately. However, the type system still accepts terms which implicitly perform measurements. As a consequence QML would accept programs which are not realisable as quantum computations. Consider the expression if ◦ x then qtrue else qtrue. This expression returns qtrue without using any information about x . In order to maintain the invariant that all measurements are explicit, the type system should reject the above expression. More precisely, the expression if ◦ x then t else u should only be accepted if t ⊥ u. This notion intuitively ensures that the conditional operator does not implicitly discard any information about x during the evaluation. The branches of a superposition should also be orthogonal for similar reasons. Mathematically, two terms, t, u, are orthogonal if their inner-product is equal to zero, ht|ui = 0. If this is the case then the judgement t ⊥ u is true, but if the innerproduct yields any other value then t is not orthogonal to u. In the presentation of an equational theory for QML [2] the orthogonality judgements are replaced by an inner-product judgement on terms, to much the same effect. However, the inner3 Grattage product approach is more informative and flexible, and gives a method of reasoning about orthogonality, hence in future this method may be adopted for all terms. The following rules give the current QML orthogonality judgements: qtrue ⊥ qfalse t ⊥u (t, v ) ⊥ (u, w ) qfalse ⊥ qtrue t ⊥u ⊥ pair0 (v , t) ⊥ (w , u) λ∗0 κ0 = −λ∗1 κ1 t⊥u λ0 × t + λ1 × u ⊥ κ0 × t + κ1 × u ⊥ pair1 ⊥ sup λ∗0 κ0 = −λ∗1 κ1 t ⊥u ◦ ◦ if (λ0 × qtrue + λ1 × qfalse) then t else u ⊥ if (κ0 × qtrue + κ1 × qfalse) then t else u t ⊥u t ⊥ u′ t ⊥ if ◦ c then u else u ′ ⊥ t ⊥u if ◦0 t ⊥ u′ if ◦ c then u else u ′ ⊥ t ⊥ supif ◦ ⊥ if ◦1 The first two axioms state that the basic states of qtrue and qfalse are orthogonal. The third and fourth rules state that pairs of terms can be orthogonal, provided that one component of a pair is orthogonal to the other pair’s corresponding component. The two sup rules state when superpositions of terms can be orthogonal; the second is a restatement of the first, translating superpositions using if ◦ . The final two rules state that if ◦ statements can be orthogonal if all the component terms are. The use of if ◦ in QML programs is valid only if the two branches are orthogonal. Hence, for the Hadamard operation (section 4), it is required that −qtrue+qfalse ⊥ qtrue + qfalse, with the appropriate renormalisation. In this case the ⊥ sup rule verifies orthogonality. The rules for orthogonality given so far are incomplete, and may be extended. Orthogonality judgements must also be interpreted by the operational semantics, discussed in ref [5]. 2.2 Removing coproducts from QML In a previous version of QML [1], here referred to as QML⊕ , the language included the notion of a tensorial coproduct, denoted by ⊕. This coproduct has now been removed. The types of QML⊕ were generated by Q1 , σ ⊗ τ , and σ ⊕ τ . Qubits were not primitive, but defined as Q2 = Q1 ⊕ Q1 . The coproduct allowed any finite type to be directly represented in this way; not just limited to Q2 . The introduction rules used for ⊕ were the usual coproduct rules of a left and a right injection: Γ ⊢a s : σ Γ ⊢a inl s : σ ⊕ τ Γ ⊢a t : τ +introl +intror Γ ⊢a inr t : σ ⊕ τ The coproduct type was interpreted as σ ⊕ τ = Q2 ⊗ |σ ⊔ τ |, where |σ ⊔ τ | could store a value of either |σ| or |τ |, by padding the smaller type. Using the coproduct and injection rules, qfalse and qtrue were defined in QML⊕ as inl() : Q2 and qfalse = inr() : Q2 , respectively, omitting the weakening property of QML⊕ . Instead of if and if ◦ rules, QML⊕ implemented two ⊕-elimination rules: case, providing classical-control (a generalisation of if ), and a quantum-control operation 4 Grattage case◦ (generalising if ◦ ). The quantum (non-measuring) ⊕-elimination rule is similar to the standard coproduct elimination rule, and is given as: Γ ⊢a c : σ ⊕ τ ∆, x : σ ⊢◦ t : ρ ∆, y : τ ⊢◦ u : ρ a t⊥u ◦ Γ ⊗ ∆ ⊢ case c of {inl x ⇒ t | inr y ⇒ u} : ρ ⊕elim◦ The non-strict (measuring) case removes the orthogonality requirement, and does not require sub-terms to be strict. The if a rules (a ∈ {◦, − }; if a = ◦ then the rules are strict, i.e. measurement-free) would then be derived as: if a b then t else u = casea b of {inl ⇒ t | inr ⇒ u } The branches of a case◦ operation can be of different sizes, and this was dealt with in the semantics of QML⊕ by padding the type of the smaller branch. The padding of one type in this way can lead to the garbage becoming entangled with the useful output in some way. This happens, for example, if branching over Q1 ⊗ Q2 . The garbage created by padding may indirectly measure the qubit which is being branched over. Consequently, this approach is not compositional, and has therefore been rejected. This version of QML resolves this issue by removing the coproduct. Qubits are now primitive, as are if and if ◦ . Additionally, the strict if ◦ does not allow any garbage to be produced. Coproducts may be reintroduced, possibly limited to classical types. 3 An operational semantics for QML The new operational semantics for QML is briefly discussed here, which is an updated version of that presented in [1]. This semantics is defined by giving a translation from QML terms into morphisms in the category FQC. FQC morphisms consist of a reversible quantum circuit φ, the input context Γ, the output type σ, and the size of the auxiliary heap h and any garbage g. Any heap qubits are initially set to 0 (false) in the computational basis, and garbage qubits can be removed by the partial trace operation at the end of the computation. A full development of FQC is given in references [5,6]. As an example, the classical if construct is defined by the following typing rule and operational semantic: Γ ⊢ c : Q2 ∆ ⊢ t, u : σ c ∈ FQC Γ Q2 t ∈ FQC ∆ σ u ∈ FQC ∆ σ if ifOp c t u ∈ FQC (Γ ⊗ ∆) σ ifOp c t u = (hC + hc + ht|u , gc + 1, φ) Γ ⊗ ∆ ⊢ if c then t else u : σ where φ in the operational semantics is the following circuit: Γ⊗∆ :: ::  ∆ Γ φC  φc   Q2 33 33 >> >> φt |φu 33 33  σ Q2  with φC as a “context-splitting” operation that copies any variables used by both subterms. φt |φu denotes a conditional circuit which performs φt if the result of the conditional circuit c is true (|1i) and φu if it is false (|0i). 5 Grattage In this way, the semantics of QML is defined recursively over the syntax of terms, and results in a valid FQC morphism for a valid QML term. Given a QML term, the QML compiler follows the operational semantics and outputs an FQC morphism represented as a typed circuit, which can then either be displayed, exported for use with other programs, or used to directly implement the program on a quantumcircuit based quantum computer. The FQC morphism can be further evaluated via the denotational semantics, producing a unitary matrix Q≃ (for strict-QML terms without heap), an isometry Q◦ (for strict-QML terms), or a superoperator Q (for QML terms that produce garbage). In addition, orthogonality judgements and circuits for quantum control and superpositions of terms are automatically inferred by the compiler at compile-time, so there can be no orthogonality errors during runtime. The relationships between QML without measurement (QML◦ ), full QML (QML), typed quantum circuits (FQC), and isometries (Q◦ ) and superoperators (Q), is shown in the following diagram: QML◦ Γ σ rr rrr r r xrrr  FQC◦ ΓLσ LLL LLL J·Kd LL L& ◦  J·K◦ Op Q Γσ b . / / QML Γ σ JJ JJJ·KOp JJ JJ J$ / FQC Γ σ t tt tt t t J·Kd ztt /QΓσ where J·KOp denotes the operational semantics, and J·KD denotes the additional translation from quantum circuits into the denotational semantics. The full semantics can be found in reference [5]. 4 Example: Teleportation in QML The quantum teleportation describes how to transport a quantum state using a small amount of classical communication. A QML interpretation of the teleportation circuit with deferred measurement has previously been presented, along with a full description of the algorithm [5]. However, this circuit relies on the existence of a quantum channel. In order to demonstrate and explain the syntax of QML and the compiler, a new, faithful, implementation of the quantum teleport algorithm, which explicitly makes use of measurement, is presented. 2 This algorithm is similar to that developed by Selinger and Valiron [9], and also in reference [3], which includes a relevant discussion of teleportation, both with and without deferred measurement. These examples show the elegance of allowing quantum control via the quantum if ◦ construct (CNot) and term superpositions (Epr ), in writing functions. For simple one qubit functions (Had ), the branches of the quantum control are the columns from the unitary matrices that describe the operation. A simple measurement operation, using classical control, is also defined in the following example which implements the teleportation algorithm (Tele): 2 Had, Qnot, Meas ∈ Q2 ⊸ Q2 Had b = if ◦ b then qfalse + − qtrue else qfalse + qtrue -- The Hadamard operation Qnot b = if ◦ b then qfalse else qtrue Meas b = if b then qtrue else qfalse CNot ∈ Q2 ⊸ Q2 ⊸ Q2 ⊗ Q2 -- The Not operation (Pauli X) -- A measurement operator, using if -- A quantum cnot operation The code is included with the compiler as teleport.qml, see section 5. 6 Grattage CNot s t = if ◦ s then (qtrue, Qnot t) else (qfalse, t) Epr ∈ Q2 ⊗ Q2 -- The EPR pair, |00i + |11i Epr = (qtrue, qtrue) + (qfalse, qfalse) Bmeas ∈ Q2 ⊸ Q2 ⊸ Q2 ⊗ Q2 -- The Bell-measurement operation Bmeas x y = let (x ′ , y ′ ) = CNot x y in (Meas (Had x ′ ), Meas y ′ ) U ∈ Q2 ⊸ Q2 ⊗ Q2 ⊸ Q2 -- The unitary correction operations U q xy = let (x , y) = xy in if x then (if y then U11 q else U10 q) else (if y then U01 q else q) U01 , U10 , U11 ∈ Q2 ⊸ Q2 ◦ U01 x = if x then qfalse else qtrue U10 x = if ◦ x then − qtrue else qfalse U11 x = if ◦ x then − qfalse else qtrue -- The quantum teleportation algorithm Tele ∈ Q2 ⊸ Q2 Tele q = let (a, b) = Epr -- a is given to Alice, b to Bob f = Bmeas q a -- Result of Alice’s Bell-measurement is classical data in U b f -- Bob applies U to his qubit, using classical data f 5 The QML compiler This section briefly describes the design and operation of the Haskell QML compiler, which can be found on the project website. 3 The objective is to take a file containing a QML program, consisting of QML function definitions, and output an annotated (typed) quantum circuit which realises the QML program as an FQC object. This is achieved by implementing the operational semantics in Haskell. Additionally, the circuit produced by the compiler can be further processed to produce either a unitary matrix (Q≃ ), isometry (Q◦ ), or superoperator (Q), as appropriate, giving an implementation of the denotational semantics of QML, as factored through the operational semantics. The compiler has a modular design, giving a clear logical structure. For example, the QOrth module contains all the code for generating the orthogonality judgements and circuits, while QCirc contains the definition of the circuit datatypes and associated functions. The compiler exploits advanced Haskell features, such as monads and pattern matching, and making use of the ideas put forward by Vizzotto et al [10]. The operational semantics is realised in the QComp (Q ML Compilation) module. To compile QML functions into the operational semantics (FQC morphisms, represented as typed circuits), the “run typed circuit” command is used: runTC "#filename" "#function". For example, to evaluate the typed circuit of the function Epr (from section 4) the command is runTC "teleport.qml" "Epr". This outputs the following typed circuit (as a Haskell datatype):  H  • Q2 X Q2 where there is no input context, the heap is two qubits (marked ⊢), and a pair 3 Instructions for downloading the QML compiler can be found on the QML compiler website http://fop.cs.nott.ac.uk/qml/compiler. The Haskell compiler GHC is also required. To use the compiler, the QML system must be loaded into GHC via the command “ghci qml”. This will initialise the system with all the modules required to interpret and evaluate QML programs. 7 Grattage of qubits are the output. H and X are the Hadamard and Pauli-X operations. As heap is initialised to qfalse, this circuit describes the function |00i → |00i + |11i, producing an EPR pair. The compilation of a QML term into a circuit is efficient; each QML term is recursively translated directly into an FQC morphism (an annotated circuit), as described in section 3. No quantum computation is simulated, so this does not effect the efficiency of the compiler - it is a simple recursive translation into circuits. The output is further optimised after compilation, by collapsing identities and permutations and other simple circuit manipulations which do not effect the action of the circuit (see QCirc). There are three main options for further evaluation of a QML term: • The QML term could be evaluated to a unitary matrix (Q≃ ), interpreting only the reversible circuit φ from the FQC morphism. As this option classically computes the full mathematical interpretation of the program it is inherently inefficient. The output is actually a triple (h, g, φ) ∈ (Int, Int ,Unit), where h, g gives the size of any heap required or garbage produced. The command for producing a unitary matrix is runM ; • The function could be evaluated to an isometry (Q◦ ), which initialises any required heap, and is the full description for terms that produce no garbage. This option is no less efficient than the runM option, and is the preferred evaluation option. The output is actually a pair (g, φ) ∈ (Int , Q◦ ), where g gives the size of any garbage (if the QML function is impure). The command for evaluating to an isometry is runI ; • Thirdly, the QML term can be interpreted as a superoperator (Q), which initialises heap and traces out any garbage, using the command runS . This option is substantially less efficient than the previous two options, as the state space is doubled and the partial trace is a computationally expensive operation. Together, the options runI and runS give an interpretation of the denotational semantics of QML factored through the category FQC, as shown in the diagram in section 3. A direct implementation of the denotational semantics, without using the operational semantics, is an extension currently being developed. Please refer to the project website for full details. 6 Conclusions and further work This paper introduces the language QML and presents its semantics with a compiler and example programs. The semantics and compiler give a realisable interpretation of QML programs as quantum circuits in a formal, categorical, setting. The semantics can be extended in many ways, such as expanding the current orthogonality judgements, or by the addition of non-linear, classical, data. The algebra for the pure fragment of QML [2] is currently being extended to include measurement, following work on van Tonder’s quantum lambda calculus [3]. It would be instructive to implement this algebra, especially the normal form, as part of the QML compiler. Future possibilities for the development of the language also including developing a notion of higher-order functions for QML, and adding iteration to the language. The development of QML and the compiler is an ongoing project which has 8 Grattage already reached a functional state. As the language and semantics evolve, extensions and new features can be incorporated into the compiler; which also provides a useful testbed for the development of new language features and capabilities. For example, an extension of the orthogonality circuits given in [5] was developed using the compiler in this way. The compiler also facilitates the testing and development of new QML algorithms, such as the described teleportation algorithm. It has also been useful in allowing others to experiment with quantum programming and get immediate feedback on the behaviour of their functions, in a style that is familiar to computer scientists, logicians, and physicists with functional programming experience. Further extensions to the compiler include adding the ability to export typed circuits as images, or in notation compatible with tools such as MatLab and Mathematica. Possible relationships with the measurement calculus, the Haskell QIO monad [7], and other formalisms are being studied, and may provide new insights. This will lead to new features being developed, such as basis independence, and further useful abstractions. References [1] Altenkirch, T. and J. Grattage, A functional quantum programming language, in: LICS 2005 proceedings (2005), pp. 249–258, also arXiv:quant-ph/0409065. URL http://fop.cs.nott.ac.uk/qml [2] Altenkirch, T., J. Grattage, J. K. Vizzotto and A. Sabry, An algebra of pure quantum programming, ENTCS 170 (2007), pp. 23–47, also arXiv:quant-ph/0506012v1. URL http://fop.cs.nott.ac.uk/qml [3] Dı́az-Caro, A., P. Arrighi, M. Gadella and J. Grattage, Measurements and confluence in quantum lambda calculi with explicit qubits (2008), accepted by DCM/QPL (ICALP 2008). URL http://equipes-lig.imag.fr/capp/qcg/people/jgrattage/papers/adc-lambdameas-qpl.pdf [4] Gay, S. J., Quantum programming languages: Survey and bibliography, Mathematical Structures in Computer Science 16 (2006). URL http://www.dcs.gla.ac.uk/~ simon/publications/QPLsurvey.pdf [5] Grattage, J., “QML: A functional quantum programming language,” Ph.D. thesis, School of Computer Science and School of Mathematical Physics, The University of Nottingham (2006). URL http://etheses.nottingham.ac.uk/archive/00000250/ [6] Green, A. and T. Altenkirch, From reversible to irreversible computations, in: P. Selinger, editor, QPL 2006 proceedings, ENTCS (2006). URL http://fop.cs.nott.ac.uk/qml [7] Green, A. and T. Altenkirch, Shor in Haskell: The quantum IO monad (2008), accepted by Trends in Functional Programming 2008. URL http://www.cs.nott.ac.uk/~ asg/pdfs/tfp08.pdf [8] Selinger, P., Towards a Quantum Programming Language, Mathematical Structures in Computer Science 14 (2004), pp. 527–586. URL http://www.mathstat.dal.ca/~ selinger/papers.html#qpl [9] Selinger, P. and B. Valiron, A lambda calculus for quantum computation with classical control, in: TLCA 2005 proceedings, LNCS 3461 (2005). URL http://www.mathstat.dal.ca/~ selinger/papers.html#qlambda [10] Vizzotto, J. K., T. Altenkirch and A. Sabry, Structuring Quantum Effects: Superoperators as Arrows (2005), also arXiv:quant-ph/0501151. 9
6cs.PL
arXiv:1211.0734v1 [math.AC] 4 Nov 2012 ON TEST MODULES FOR FLAT DIMENSION JAVIER MAJADAS Abstract. A ring with a test module of finite upper complete intersection dimension is complete intersection. 1. Introduction Let (A, m, k) be a noetherian local ring. We say that an A-module of finite type M is a test module if for any local homomorphism of noetherian local rings A → B, any B-module of finite type N such that T oriA (M, N ) = 0 for all i ≫ 0 has finite flat dimension over A. A well known example of a test module is the residue field k. When A is regular, then any A-module of finite type is a test module. Over a hypersurface, Huneke and Wiegand [7, Theorem 1.9] prove that test modules are precisely the ones of infinite projective dimension (alternative proofs of this fact were obtained also by Miller [9, Theorem 1.1] and Takahashi [11, Corollary 7.2]). More generally, if A is a complete intersection, Celikbas, Dao and Takahashi [5, Proposition 2.7] prove that test modules are those of maximal complexity. To be precise, all these characterizations were obtained with a slightly different definition of test modules, but we will show in Proposition 4 that they also hold in our case. Some characterizations of these properties of rings in terms of test modules also exist. First, the Auslander-Buchsbaum-Serre theorem can be stated in terms of test modules as follows: Theorem R. If (and only if) there exists a test module of finite projective dimension then A is regular. A similar criterion for Gorensteinness was obtained in [5, Corollary 3.4] in terms of the Gorenstein dimension of Auslander and Bridger [1] (related criteria also appear in [12]): Theorem G. Assume that A has a dualizing complex. If (and only if) there exists a test module of finite Gorenstein dimension, then A is Gorenstein. The same authors ask for a similar criterion for complete intersection rings [5, Question 3.5] in terms of the complete intersection dimension of [4]: Question CI. If (and only if) there exists a test module of finite complete intersection dimension, must A be a complete intersection? Avramov [2] introduces the virtual projective dimension as follows (with a slight modification when the residue field of A is finite). Let A →  be the completion homomorphism (for the topology of the maximal ideal). An A-module of finite type Key words and phrases. Test modules, complete intersection, regular local ring, Gorenstein ring, flat dimension. 2010 Mathematics Subject Classification. 13D05, 13D07, 13H05, 13H10. 1 2 JAVIER MAJADAS M is said of finite virtual projective dimension if there exists a deformation Q →  (that is, a surjective homomorphism of noetherian local rings with kernel generated by a regular sequence) such that the projective dimension pdQ ( ⊗A M ) is finite. A noetherian local ring A is complete intersection if and only if its residue field is of finite virtual projective dimension if and only if any module of finite type is of finite virtual projective dimension. Subsequently a modification of this concept, the complete intersection dimension, was introduced in [4]. The definition is similar, but instead of the completion homomorphism A → Â, any flat local homomorphism of noetherian local rings A → A′ is allowed. Complete intersection dimension shares many of the good properties with virtual projective dimension. In particular, a noetherian local ring A is complete intersection if and only if its residue field has finite complete intersection dimension if and only if any module of finite type has finite complete intersection dimension. Moreover it behaves well with respect to localization. An intermediate definition, the upper complete intersection dimension, was given in [10]. It allows only flat local homomorphism of noetherian local rings (A, m, k) → (A′ , m′ , k ′ ) with regular closed fiber A′ ⊗A k. The difficulty of the above Question CI, is that the property of being a test module does not ascend by local flat extensions. For instance, if (A, m, k) → (A′ , m′ , k ′ ) is a flat local homomorphism of noetherian local rings with A regular and A′ singular, and M is a test module for A, then A′ ⊗A M is never a test module for A′ , ′ since T oriA (A′ ⊗A M, k ′ ) = T oriA (M, k ′ ) = 0 for all i ≫ 0. However, we circumvent this difficulty by switching to upper complete intersection dimension, giving in this context an affirmative answer to Question CI (Theorem 7). There are no surprises in the proof. On the contrary, the crucial step is in the definition of test module. Since the involved functor is T or, we modify a little the definition of test module used in [5] allowing modules to test not only for projectivity (of finite type modules) but also for flatness (of modules which are finite over a local homomorphism). Nevertheless, in Proposition 4 we prove that our definition is equivalent to the one used in [5] at least over complete intersection rings. In the last section, we see how this modification in the definition of test module, allows us also to remove easily the supplementary hypothesis that the ring has a dualizing complex in Theorem G. 2. Complete intersection Definition 1. A local homomorphism of noetherian local rings (A, m, k) → (A′ , m′ , k ′ ) is weakly regular if it is flat and the closed fiber A′ ⊗A k is a regular local ring. Let f : A → B be a local homomorphism of noetherian local rings. A Cohen factorization of f is a factorization A → A′ → B such that A → A′ is weakly regular and A′ → B is surjective. If B is complete, a Cohen factorization of f always exists [3]. A surjective homomorphism of noetherian local rings with kernel generated by a regular sequence is called a deformation. Definition 2. Let (A, m, k) be a noetherian local ring. We say that an A-module of finite type M is a test module (for A) if for any local homomorphism of noetherian local rings A → B and any B-module of finite type N , T oriA (M, N ) = 0 for all i ≫ 0 implies that the flat dimension of N over A, fdA (N ), is finite. TEST MODULES FOR FLAT DIMENSION 3 Examples 3. (i) For any noetherian local ring (A, m, k), the residue field k is a test module. (ii) If A → B is a finite local homomorphism of local rings and B is regular, then the change of rings spectral sequence 2 A Epq = T orpB (T orqA (B, N ), l) ⇒ T orp+q (N, l) (where l is the residue field of B) shows that B is a test module for A. Note that our definition of test module is, a priori, more restrictive than the one used in [5]: in that paper, an A-module of finite type M is called a Test module if for any A-module of finite type N , T oriA (M, N ) = 0 for all i ≫ 0 implies that fdA (N ) < ∞. Over a complete intersection ring, we will see that Test modules and test modules are the same thing. The complexity of an A-module of finite type M , cxA (M ), is defined as the least integer c ≥ 0 such that there exists some real number α verifying dimk (T ornA (M, k)) ≤ αnc−1 for all n ≫ 0 [4, 5.1]. Over a complete intersection ring A, the possible complexities of A-modules of finite type are those values between 0 and codim(A) := edim(A) - dim(A) [4, 5.6, 5.7]. If A is a complete intersection ring, a finite type A-module M is a Test module if and only if cxA (M ) = codim(A). The “if” part is a direct consequence of a result of C. Miller [9, Proposition 2.2] and was also obtained in [8, Corollary 1.2]: if cxA (M ) = codim(A), and N is a finite type A-module such that T oriA (M, N ) = 0 for all i ≫ 0, then T oriA (M, Ωt N ) = 0 for all i > 0 for some syzygy Ωt N of N . By [9, loc.cit.], cxA (M ⊗A Ωt N ) = cxA (M ) + cxA (Ωt N ) which means, since the complexity of M is maximal, that cxA (Ωt N ) = 0, that is, pdA (Ωt N ) < ∞ where pd denotes projective dimension. Thus pdA (N ) < ∞. The “only if” part was proved in [5, Proposition 2.7]. Proposition 4. Let A be a complete intersection ring, and M an A-module of finite type. Then M is a test module if and only if it is a Test module. Proof. Since test ⇒ Test ⇒ maximal complexity, we only have to prove that if cxA (M ) = codim(A) then M is a test module. So let A → B be a local homomorphism of noetherian local rings and N a B-module of finite type such that T oriA (M, N ) = 0 for all i ≫ 0. Let A → R → B̂ be a Cohen factorization where B̂ is the completion of B. By flat base change, T oriR (R ⊗A M, N̂ ) = T oriA (M, N̂ ) = T oriA (M, N ) ⊗B B̂ = 0 for all i ≫ 0. Since A → R is weakly regular, codim(A) = codim(R). Also, cxA (M ) = cxR (R ⊗A M ) by [4, Proposition 5.2]. That is, cxR (R ⊗A M ) = codim(R), so as we have seen above, R ⊗A M is a Test module for R, and then T oriR (R ⊗A M, N̂ ) = 0 for all i ≫ 0 implies pdR (N̂ ) < ∞. Since A → R is flat, we have fdA (N̂ ) < ∞ and then fdA (N ) < ∞.  Lemma 5. Let (A, m, k) → (A′ , m′ , k ′ ) be a weakly regular homomorphism. If M is a test module for A, then A′ ⊗A M is a test module for A′ . Proof. Let A′ → B be a local homomorphism of noetherian local rings and N a ′ finite B-module such that T oriA (A′ ⊗A M, N ) = 0 for all i ≫ 0. Since A′ is A-flat, we have T oriA (M, N ) = 0 for all i ≫ 0, and then by hypothesis fdA (N ) < ∞. Consider the change of rings spectral sequence ′ ′ ′ 2 A Epq = T orpA ⊗A k (T orqA (A′ ⊗A k, N ), k ′ ) ⇒ T orp+q (N, k ′ ). 4 JAVIER MAJADAS ′ The ring A′ ⊗A k is regular and so T orpA ⊗A k (−, −) = 0 for all p ≫ 0. Also, ′ 2 T orqA (A′ ⊗A k, N ) = T orqA (k, N ) = 0 for all q ≫ 0. That is Epq = 0 for all A′ ′ p + q ≫ 0, and so T orn (N, k ) = 0 for all n ≫ 0. Therefore fdA′ (N ) < ∞.  Definition 6. [10] We say that a finite module M 6= 0 over a noetherian local ring A has finite upper complete intersection dimension and denote it by CI*dimA (M ) < ∞ if there exist a weakly regular homomorphism A → A′ and a deformation Q → A′ such that pdQ (A′ ⊗A M ) < ∞. Theorem 7. Let M be a test A-module. If (and only if ) CI*-dimA (M ) < ∞ then A is a complete intersection ring. Proof. Consider a weakly regular homomorphism A → A′ and a deformation Q → A′ such that pdQ (A′ ⊗A M ) < ∞. Since A′ ⊗A M is a test module for A′ by Lemma 5, then A′ is a Test module for Q [5, Corollary 2.6]. Since n := pdQ (A′ ) < ∞, T oriQ (A′ , N ) = 0 for all i > n, and then pdQ (N ) ≤ n for any Q-module N of finite type. Therefore Q is a regular local ring. Then A′ is a complete intersection and by flat descent so is A.  3. Gorenstein Definition 8. [1] Let A be a noetherian local ring and M an A-module of finite type. We say that G-dimA (M ) = 0 if the following three conditions hold: (i) The canonical homomorphism M → HomA (HomA (M ,A),A) is an isomorphism. (ii) ExtiA (M, A) = 0 for all i > 0. (iii) ExtiA (HomA (M, A), A) = 0 for all i > 0. We say that G-dimA (M ) < ∞ if there exists an exact sequence 0 → Tn → ... → T0 → M → 0 where G-dimA (Ti ) = 0 for i = 0, ..., n. Theorem 9. Let M be a test A-module. If (and only if ) G-dimA (M ) < ∞ then A is a Gorenstein ring. Proof. Using that for a homomorphism A → A′ and an A-module T , HomA′ (A′ ⊗A T, A′ ) = HomA (T, A′ ), and that if T is of finite type and A′ is A-flat we have also HomA (T, A′ ) = A′ ⊗A HomA (T, A), it is easy to prove that if  is the completion of A, then G-dim (M̂ ) ≤ G-dimA (M ) < ∞ (a more general result can be seen in [6, Corollary 5.11]). By Lemma 5, M̂ is a test Â-module. So from [5, Corollary 3.4] we deduce that  is Gorenstein, and then so is A.  References [1] M. Auslander, M. Bridger. Stable module theory, Memoirs of the American Mathematical Society, No. 94, 1969. [2] L. L. Avramov. Modules of finite virtual projective dimension, Invent. Math. 96 (1989), no. 1, 71-101. [3] L. L. Avramov, H.-B. Foxby, B. Herzog, Structure of local homomorphisms, J. Algebra 164 (1994), no. 1, 124-145. TEST MODULES FOR FLAT DIMENSION 5 [4] L. L. Avramov, V. N. Gasharov, I. V. Peeva. Complete intersection dimension, Inst. Hautes Études Sci. Publ. Math. No. 86 (1997), 67-114. [5] O. Celikbas, H. Dao, R. Takahashi. Modules that detect finite homological dimensions, arXiv:1207.5869v1. [6] L. W. Christensen. Semi-dualizing complexes and their Auslander categories, Trans. Amer. Math. Soc. 353 (2001), no. 5, 1839-1883. [7] C. Huneke, R. Wiegand. Tensor products of modules, rigidity and local cohomology, Math. Scand. 81 (1997), no. 2, 161-183. [8] D. A. Jorgensen. Tor and torsion on a complete intersection, J. Algebra 195 (1997), no. 2, 526-537. [9] C. Miller. Complexity of tensor products of modules and a theorem of Huneke-Wiegand, Proc. Amer. Math. Soc. 126 (1998), no. 1, 53-60. [10] R. Takahashi. Upper complete intersection dimension relative to a local homomorphism, Tokyo J. Math. 27 (2004), no. 1, 209-219. [11] R. Takahashi. Classifying thick subcategories of the stable category of Cohen-Macaulay modules, Adv. Math. 225 (2010), no. 4, 2076-2116. [12] A. Tehranian, M. Tousi, S. Yassemi. Characterizing local rings via test modules, Comm. Algebra 35 (2007), no. 8, 2524-2532. Departamento de Álgebra, Facultad de Matemáticas, Universidad de Santiago de Compostela, E15782 Santiago de Compostela, Spain E-mail address: [email protected]
0math.AC
arXiv:1607.00062v1 [math.AG] 30 Jun 2016 LOCAL COHOMOLOGY AND BASE CHANGE KAREN E. SMITH f Abstract. Let X −→ S be a morphism of Noetherian schemes, with S reduced. For any closed subscheme Z of X finite over S, let j denote the open immersion X \ Z ֒→ X. Then for any coherent sheaf F on X \ Z and any index r ≥ 1, the sheaf f∗ (Rr j∗ F ) is generically free on S and commutes with base change. We prove this by proving a related statement about local cohomology: Let R be Noetherian algebra over a Noetherian domain A, and let I ⊂ R be an ideal such that R/I is finitely generated as an A-module. Let M be a finitely generated R-module. Then there exists a non-zero g ∈ A such that the local cohomology modules HIr (M )⊗A Ag are free over Ag and for any ring map A → L factoring through Ag , we have r HIr (M ) ⊗A L ∼ (M ⊗A L) for all r. = HI⊗ AL 1. Introduction In his work on maps between local Picard groups, Kollár was led to investigate the behavior of certain cohomological functors under base change [Kol]. The following theorem directly answers a question he had posed: f Theorem 1.1. Let X → S be a morphism of Noetherian schemes, with S reduced. Suppose that Z ⊂ X is closed subscheme finite over S, and let j denote the open embedding of its complement U. Then for any coherent sheaf F on U, the sheaves f∗ (Rr j∗ F ) are generically free and commute with base change for all r ≥ 1. Our purpose in this note is to prove this general statement. Kollár himself had proved a special case of this result in a more restricted setting [Kol, Thm 78]. We pause to say precisely what is meant by generically free and commutes with base change. Suppose H is a functor which, for every morphism of schemes X → S and every quasi-coherent sheaf F on X, produces a quasi-coherent sheaf H(F ) on S. We say H(F ) is generically free if there exists a dense open set S 0 of S over which Date: July 4, 2016. Thanks to János Kollár for encouraging me to write this paper, for his insistence that I establish the more general version of the theorem, and for sharing his insight as to why my arguments should go through more generally, especially the idea to reduce to the affine case in Section 2. I’d also like to thank Mel Hochster for listening to my arguments, Karl Schwede for reading a draft and suggesting the reference [DGI], and Barghav Bhatt for his interest. Financial support partially from NSF DMS-1501625. 1 2 KAREN E. SMITH p the OS -module H(F ) is free. If in addition, for every change of base T −→ S 0 , the natural map p∗ H(F ) → H(p∗X F ) of quasi-coherent sheaves on T is an isomorphism (where pX is the induced morphism X ×S T → X), then we say that H(F ) is generically free and commutes with base change. See [Kol, §72]. Remark 1.2. We do not claim the r = 0 case of Theorem 1.1; in fact, it is false. For a counterexample, consider the ring homomorphism splitting Z ֒→ Z × Q ։ Z. The corresponding morphism of Noetherian schemes Z = Spec(Z) ֒→ X = Spec(Z × Q) → S = Spec Z satisfies the hypothesis of Theorem 1.1. The open set U = X \ Z is the component Spec Q of X. The coherent sheaf determined by the module Q on U is not generically free over Z, since there is no open affine subset Spec Z[ n1 ] over which Q is a free module. [In this case, the map j is affine, so the higher direct image sheaves Rp j∗ F all vanish for p > 0.] On the other hand, if f is a map of finite type, then the r = 0 case of Theorem 1.1 can be deduced from Grothendiecks’s Lemma on Generic freeness; see Lemma 4.1. For the commutative algebraists, we record the following version of the main result, which is essentially just the statement in the affine case: Corollary 1.3. Let A be a reduced Noetherian ring. Let R be a Noetherian Aalgebra with ideal I ⊂ R such that the induced map A → R/I is finite. Then for any Noetherian R module M, the local cohomology modules HIi (M) are generically free and commute with base change over A for all i ≥ 0. Explicitly, this means that there exists element g not in any minimal prime of A such that the modules HIi (M) ⊗A Ag are free over Ag , and that for any algebra L over Ag , the natural map HIi (M) ⊗A L → HIi (M ⊗A L) is an isomorphism. Some version of Theorem 1.1 may follow from known statements in the literature, but looking through works of Grothendieck ([RD], [LC], [SGA2]) and [Conrad], I am not able to find it; nor presumably could Kollár. After this paper was written, I did find a related statement due to Hochster and Roberts [HR, Thm 3.4] in a special case, not quite strong enough to directly answer Kollár’s original question; furthermore, my proof is different and possibly of independent interest. In any case, there may be value in the self-contained proof here, which uses a relative form of Matlis duality proved here using only basic results about local cohomology well-known to most commutative algebraists. LOCAL COHOMOLOGY AND BASE CHANGE 3 2. Restatement of the Problem In this section, we show that Theorem 1.1 reduces to the following special statement: Theorem 2.1. Let A be a Noetherian domain. Let R = A[[x1 , . . . , xn ]] be a power series ring over A, and M a finitely generated R-module. Denote by I the ideal (x1 , . . . , xn ) ⊂ R. Then the local cohomology modules HIi (M) are generically free over A and commute with base change for all i. For basic definitions and properties of local cohomology modules, we refer to [LC]. For the remainder of this section, we show how Theorem 1.1 and Corollary 1.3 follow from Theorem 2.1. First, Theorem 1.1 is local on the base. Because the scheme S is reduced, it is the finite union of its irreducible components, each of which is reduced and irreducible, so it suffices to prove the result on each of them. Thus we can immediately reduce to the case where S = Spec A, for some Noetherian domain A. We now reduce to the case where X is affine as well. The coherent sheaf F on the open set U extends to a coherent sheaf on X, which we also denote by F . To simplify notation, let us denote the sheaf Rr j∗ F by H, which we observe vanishes outside the closed set Z. Each section is annihilated by a power of the ideal IZ of Z, so that although the sheaf of abelian groups H on Z is not an OZ -module, it does have the structure of a module over the sheaf of OS -algebras limt OI Xt , which we ←− Z bZ \ denote OX,Z ; put differently, H can be viewed as sheaf on the formal scheme X 0 i [ [ over S. Observe that i∗ O X,Z |X 0 = OX,Z , where X ֒→ X is the inclusion of any open set X 0 ⊂ X containing the generic points of all the components of Z. This means that H is generically free as an OS -module if and only if H|X 0 is, and there is no loss of generality in replacing X by any such open set X0 . In particular, we can choose such X 0 to be affine, thus reducing the proof of Theorem 1.1 to the case where both X and S are affine. We can now assume that X → S is the affine map of affine schemes corresponding to a ring homomorphism A → T . In this case the closed set Z is defined by some ideal I of T . Because Z is finite over S = Spec A, the composition A → T → T /I is a finite integral extension of A. The coherent sheaf F on U extends to a coherent sheaf F on X, which corresponds to a finitely generated T -module M. Since X = Spec T is affine, we have natural identifications for r ≥ 1 Rr j∗ F = H r (X \ Z, F ) = HIr+1 (M) 4 KAREN E. SMITH of modules over T [LC, Cor 1.9]. Thus we have reduced Theorem 1.1 to showing that if T is a Noetherian ring over a Noetherian domain A and I is any ideal such that T /I is finitely generated as an A-module, then for any finitely generated T -module M, the modules HIr+1(M) are generically free and commute with base change over A for r ≥ 1. In fact, we will be able to show this for all indices r ≥ −1. To get to the power series case, we first observe that for all i, every element of HIi (M) is annihilated by some power of I. This means that HIi (M) has the structure of a module over the I-adic completion T̂ I . There is no loss of generality in replacing T and M by their I-adic completions T̂ I and M̂ I —the module HIi (M) is canonically identified with HIi T̂ I (M̂ I ). So with out loss of generality, we assume that T is Iadically complete. Now, Lemma 2.2 below guarantees that T is a module-finite algebra over a power series ring A[[x1 , . . . , xn ]]. So the finitely generated T -module M is also a finitely generated module over A[[x1 , . . . , xn ]], and the computation of local cohomology is the same viewed over either ring. This means that to prove Theorem 1.1, it would suffice to prove Theorem 2.1. It only remains to prove Lemma 2.2. Lemma 2.2. Let A be a Noetherian ring. Let T be a Noetherian A-algebra containing an ideal I such that the composition of natural maps A → T ։ T /I is finite. Then there is a natural ring homomorphism from a power series ring A[[x1 , . . . , xn ]] → T̂ I := lim T /I t ←− t which is also finite. Proof of Lemma. Fix generators y1 , . . . , yn for the ideal I of T . Consider the Aalgebra homomorphism A[x1 , . . . , xn ] → T xi 7→ yi . We will show that this map induces a ring homomorphism A[[x1 , . . . , xn ]] → T̂ I which is finite. First note that for each natural number t, there is a naturally induced ring homomorphism (1) A[x1 , . . . , xn ] T → t t (x1 , . . . , xn ) I sending the class xi to the class yi . Claim: For every t, the map (1) is finite. Indeed, if t1 , . . . , td are elements of T whose classes modulo I are A-module generators for T /I, then the classes of t1 , . . . , td modulo I t are generators for T /I t as a module over A[x1 , . . . , xn ]/(x1 , . . . , xn )t . LOCAL COHOMOLOGY AND BASE CHANGE 5 The claim is straightforward to prove using induction on t and the exact sequence 0 → I t /I t+1 → T /I t+1 → T /I t → 0. We leave these details to the reader. Now to prove the lemma, we take the direct limit of the maps (1). Since at every stage, the target is generated over the source by the classes of t1 , . . . , td , also in the limit, T̂ I will be generated over A[[x1 , . . . , xn ]] by the images of t1 , . . . , td . So the induced ring homomorphism A[[x1 , . . . , xn ]] → T is finite.  Having reduced the proof of the main results discussed in the introduction to Theorem 2.1, the rest of the paper focuses on the local cohomology statement in the special case. Our proof of Theorem 2.1 uses an A-relative version of Matlis duality to convert the problem to an analagous one for finitely generated modules over a power series ring, where it will follow from the theorem on generic freeness. This relative version of Matlis duality might be of interest to commutative algebraists in other contexts, and holds in greater generality than what we develop here. To keep the paper as straightforward and readable as possible, we have chosen to present it only in the case we need to prove the main result. Some related duality is worked out in [DGI]. 3. A Relative Matlis Dual Functor 3.1. Matlis Duality. We first recall the classical Matlis duality in the complete local (Noetherian) case. Let (R, m) be a complete local ring, and let E be an injective hull of its residue field R/m. The Matlis dual functor HomR (−, E) is an exact contravariant functor on the category of R-modules. It takes each Noetherian R-module (i.e., one satisfying the ascending chain condition) to an Artinian R-module (i.e., one satisfying the descending chain condition) and vice-versa. Moreover, for any Artinian or Noetherian R-module H, we have a natural isomorphism H → HomR (HomR (H, E), E). That is, the Matlis dual functor defines an equivalence of categories between the category of Noetherian and the category of Artinian R-modules. See [LC], [BH, Thm 3.2.13] or [Hoch] for more on Matlis duality. 3.2. A relative version of Matlis duality. Let A be a domain. Let R be an Aalgebra, with ideal I ⊂ R such that R/I is finitely generated as an A-module. Define the relative Matlis dual functor to be the functor {R − modules} → {R − modules} M 7→ M ∨A := lim HomA (M/I t M, A). −→ t 6 KAREN E. SMITH We also denote M ∨A by Homcts A (M, A), since it is the submodule of HomA (M, A) consisting of maps continuous in the I-adic topology. That is, Homcts A (M, A) is the R-submodule of HomA (M, A) consisting of maps φ : M → A satisfying φ(I t M) = 0 for some t. Proposition 3.1. Let R be a Noetherian algebra over a Noetherian domain A, with ideal I ⊂ R such that R/I is finitely generated as an A-module. (1) The functor Homcts A (−, A) is naturally equivalent to the functor M 7→ HomR (M, Homcts A (R, A)). (2) The functor preserves exactness of sequences 0 → M1 → M2 → M3 → 0 of finitely generated R-modules, provided that the modules M3 /I n M3 are (locally) free A-modules for all n ≫ 0. Remark 3.2. If A = R/I is a field, then the relative Matlis dual specializes to the usual Matlis dual functor HomR (−, E), where E is the injective hull of the residue field of R at the maximal ideal I (denoted here now m). Indeed, one easily checks that Homcts A (R, A) is an injective hull of R/m. To wit, the R-module homomorphism ( R→A R/m → Homcts sending r mod m 7→ A (R, A) s 7→ rs mod m is a maximal essential extension of R/m. Proof of Proposition. Statement (1) follows from the adjointness of tensor and Hom, which is easily observed to restrict to the corresponding statement for modules of continuous maps. For (2), we need to show the sequence remains exact after applying the relative Matlis dual functor. The functor HomA (−, A) preserves left exactness: that is, (2) 0 → HomA (M3 , A) → HomA (M2 , A) → HomA (M1 , A) is exact. We want to show that, restricting to the submodules of continuous maps, we also have exactness at the right. That is, we need the exactness of (3) cts cts 0 → Homcts A (M3 , A) → HomA (M2 , A) → HomA (M1 , A) → 0. The exactness of (3) at all spots except the right is easy to verify using the description of a continuous map as one annihilated by a power of I. To check exactness of (3) at the right, we use the Artin Rees Lemma [AM, 10.10]. n Take φ ∈ Homcts A (M1 , A). By definition of continuous, we φ is annihilated by I for sufficiently large n. By the Artin-Rees Lemma, there exists t such that for all n ≥ t, we have I n+t M2 ∩ M1 ⊂ I n M1 . This means we have a surjection M1 /(I n+t M2 ∩ M1 ) ։ M1 /I n M1 . LOCAL COHOMOLOGY AND BASE CHANGE 7 Therefore the composition M1 /I n+t M2 ∩ M1 ։ M1 /I n M1 → A gives a lifting of φ to an element φ′ in HomA (M1 /I n+t M2 ∩ M1 , A). Now note that for n ≫ 0, we have exact sequences 0 → M1 /M1 ∩ I n+t M2 → M2 /I n+t M2 → M3 /I n+t M3 → 0, which are split over A by our assumption that M3 /I n+t M3 is projective. Thus (4) 0 → HomA (M3 /I n+t M3 , A) → HomA (M2 /I n+t M2 , A) → HomA (M1 /M1 ∩ I n+t M2 , A) → 0 is also split exact. This means we can pull φ′ ∈ HomA (M1 /I n+t M2 ∩ M1 , A) back to φ some element φ̃ in HomA (M2 /I n+t M2 , A). So our original continuous map M1 → A φ̃ is the restriction of some map M2 → A which satisfies φ̃(I n+t M2 ) = 0. This exactly says the continuous map φ on M1 extends to a continuous map φ̃ of M2 . That is, the sequence (3) is exact.  Remark 3.3. If M3 is a Noetherian module over a Noetherian algebra R over the Noetherian domain A, then the assumption that M3 /I n M3 is locally free for all n holds generically on A—that is, after inverting a single element of A. See Lemma 4.2. 4. Generic Freeness We briefly review Grothendieck’s idea of generic freeness, and use it to prove that the relative Matlis dual of a Noetherian R-module is generically free over A (under suitable Noetherian hypothesis on R and A). Let M be a module over a commutative domain A. We say that M is generically free over A if there exists a non-zero g ∈ A, such that M ⊗A Ag is a free Ag -module, where Ag denotes the localization of A at the element g. Likewise, a collection M of A-modules is simultaneously generically free over A if there exists a non-zero g ∈ A, such that M ⊗A Ag is a free for all modules M ∈ M. Note that any finite collection of generically free modules is always simultaneously generically free, since we can take g to be the product the gi that work for each of the Mi . Of course, finitely generated A-modules are always generically free. Grothendieck’s famous Lemma on Generic Freeness ensures that many other modules are as well: Lemma 4.1. [EGA, 6.9.2] Let A be a Noetherian domain. Let M be any finitely generated module over a finitely generated A-algebra T . Then M is generically free over A. We need a version of Generic Freeness for certain infinite families of modules over more general A-algebras: 8 KAREN E. SMITH Lemma 4.2. Let A be any domain. Let T be any Noetherian A-algebra, and I ⊂ T any ideal such that T /I is finite over A. Then for any Noetherian T -module M, the family of modules {M/I n M | n ≥ 1} is simultaneously generically free over A. That is, after inverting a single element of A, the modules M/I n M for all n ≥ 1 become free over A. Remark 4.3. We will make use of Lemma 4.2 in the case where T = A[[x1 , . . . , xn ]]. Proof. If M is finitely generated over T , then the associated graded module grI M = M/IM ⊕ IM/I 2 M ⊕ I 2 M/I 3 M ⊕ . . . is finitely generated over the associated graded ring grI T = T /I ⊕ I/I 2 ⊕ I 2 /I 3 ⊕ . . . , which is a homomorphic image of a polynomial ring over T /I. Hence grI T is a finitely generated A-algebra. Applying the Lemma of generic freeness to the grI T -module grI M, we see that after inverting a single non-zero element of g of A, the module grI M becomes A-free. Since grI M is graded over grI T and A acts in degree zero, clearly its graded pieces are also free after tensoring with Ag . We can thus replace A by Ag for suitable g, and assume that the I n M/I n+1 M are Ag -free for all n ≥ 0. Now consider the short exact sequences (5) 0 → I n M/I n+1 M → M/I n+1 M → M/I n M → 0, for each n ≥ 1. We already know that M/I 1 M and I n M/I n+1 M for all n ≥ 1 are free (over Ag ), so by induction, we conclude that the sequences (5) are all split over Ag for every n. In particular, the modules M/I n M are also free over Ag for all n ≥ 1. The lemma is proved.  Proposition 4.4. Let A be a Noetherian domain. Let R be any Noetherian Aalgebra with ideal I ⊂ R such that R/I is a finitely generated A-module. Then for any Noetherian R-module M, the relative Matlis dual Homcts A (M, A) is a generically free A-module. Furthermore, if g ∈ A is a non-zero element such that Ag ⊗A Homcts A (M, A) is free over Ag , then for any base change A → L factoring through Ag , the natural map cts Homcts A (M, A) ⊗A L → HomL (M ⊗A L, L) is an isomorphism of R ⊗A L-modules, functorial in M. Proof. We can invert one element of A so that each M/I t M is free over A; replace A by this localization. We now claim that the A-module   M cts HomA (M, A) = lim HomA ,A −→ I tM t LOCAL COHOMOLOGY AND BASE CHANGE 9 t is free. Indeed,  since each M/I M is free and has finite rank over A, its A-dual M HomA I t M , A is also free of finite rank. The direct limit is also A-free because the maps in the limit system are all split over A and injective. Indeed, if some finite A-linear combination of fi ∈ Homcts combination is A (M, A) is zero, then that same  , A of homomorphisms zero considered as elements of the free-submodule HomA IM tM in Homcts (M, A) killed by a large power of I. It follows that Homcts A A (M, A) is free over A, as desired. The result on base change follows as well, since tensor commutes with direct limits and with dualizing a finitely generated free module.  Remark 4.5. We can interpret Proposition 4.4 as saying that generically on A, the relative Matlis dual functor (applied to Noetherian R-modules) is exact and commutes with base change. 5. Relative Local Duality and the Proof of the Main Theorem The proof Theorem 2.1 and therefore of our main result answering Kollár’s question, follows from a relative version of Local Duality: Theorem 5.1. Let R be a power series ring A[[x1 , . . . , xn ]] over a Noetherian domain A, and let M be a finitely generated R-module. Then, after replacing A by its localization at one element, there is a functorial isomorphism for all i H i (M) ∼ = [Extn−i (M, R)]∨A . I R To prove Theorem 5.1, we need the following lemma. Lemma 5.2. Let R be a power series ring A[[x1 , . . . , xn ]] over a ring A. There is a ∼ n natural R-module isomorphism Homcts A (R, A) = HI (R), where I = (x1 , . . . , xn ). In particular, the relative Matlis dual functor can also be expressed M 7→ HomR (M, HIn (R)). Proof. We recall that HIi (R) is the i-th cohomology of the extended Čech complex K • on the elements x1 , . . . , xn . This is the complex M δ1 δn 0→R→ Rxi xj → · · · −→ Rx1 ⊕ Rx2 · · · ⊕ Rxn → Rx1 x2 ···xn → 0 i<j where the maps are (sums of) suitably signed localization maps. In particular, HIn (R) is the cokernel of δn , which can be checked to be the free A-module on (the classes of) the monomials xa11 . . . xann with all ai < 0. 1 L page 226 of [Hart], although I have included one extra map δ1 : R → Rxi sending f 7→ ( f1 , . . . , f1 ) in order to make the complex exact on the left, and my ring is a power series ring over A instead of a polynomial rings over a field. This is also discussed in [LC] page 22. 1See 10 KAREN E. SMITH Now define an explicit R-module isomorphism Φ from HIn (R) to Homcts A (R, A) by sending the (class of the) monomial xα to the map φα ∈ Homcts (R, A): A φα R −→ A ( xb11 +a1 +1 . . . xnbn +an +1 b1 bn x1 . . . xn 7→ 0 otherwise mod I if αi + βi ≥ −1 for all i Since {xβ | β ∈ Nn } is an A-basis for R, the map φα is a well-defined A-module map from R to A, and since it sends all but finitely many xβ to zero, it is I-adically continΦ uous. Thus the map HIn (R) −→ Homcts A (R, A) is is an A-module homomorphism; in fact, Φ is an A-module isomorphism, since it defines a bijection between the A-basis {xα | αi < 0} for HIn (R) and {πβ | βi ≥ 0} for Homcts A (R, A) (meaning the dual basis β on the free basis x for R over A) matching the indices αi ↔ βi = −αi − 1. It is easy to check that Φ is also R-linear, by thinking of it as “premultiplication by xα+1 ” on the cokernel of δn . Thus Φ identifies the R-modules HIn (R) and Homcts  A (R, A). Proof of Theorem 5.1. We proceed by proving that both modules are generically ison morphic to a third, namely TorR n−i (M, HI (R)). First, recall how to compute HIi (M). Let K • be the extended Čech complex on the elements x1 , . . . , xn M δ1 δn 0→R→ Rxi xj → · · · −→ Rx1 ⊕ Rx2 · · · ⊕ Rxn → Rx1 x2 ···xn → 0. i<j This is a complex of flat R-modules, all free over A, exact at every spot except the right end. Thus it is a flat R-module resolution of the local cohomology module HIn (R). The local cohomology module HIi (M) is the cohomology of this complex after tensoring over R with M, that is n HIi (M) = TorR n−i (M, HI (R)). n−i On the other hand, let us compute the relative Matlis dual of ExtR (M, R). Let P• • be a free resolution of M over R. The module ExtR (M, R) is the cohomology of the complex HomR (P• , R). We would like to say that the computation of the cohomology of this complex commutes with the relative Matlis dual functor, but the best we can say is that this is true generically on A. To see this, we will apply Lemma 4.2 to the following finite set of R-modules: • For i = 0, . . . , n, the image Di of the i-th map of the complex HomR (P• , R); n−i • For i = 0, . . . , n, the cohomology ExtR (M, R) of the same complex. Lemma 4.2 guarantees that the modules Di /I t Di and n−i n−i ExtR (M, R)/I t ExtR (M, R) LOCAL COHOMOLOGY AND BASE CHANGE 11 are all simultaneously generically free over A for all t ≥ 1. This allows us to break up the complex Ag ⊗A HomR (P• , R) into many short exact sequences, split over Ag , which satisfy the hypothesis of Proposition 3.1(2) (using Ag in place of A and Ag ⊗A R in place of R). It follows that the computation of cohomology of HomR (P• , R) commutes with the relative Matlis dual functor (generically on A). n−i Thus, after replacing A by a localization at one element, ExtR (M, R)]∨A is the cohomology of the complex HomR (HomR (P• , R), HIn (R)). In general, for any finitely generated projective module P and any module H (over any Noetherian ring R), the natural map P ⊗ H → Hom(Hom(P, R), H) sending a simple tensor x ⊗ h to the map which sends f ∈ Hom(P, R) to f (x)h, is an isomorphism, functorially in P and H. Thus we have a natural isomorphism of complexes P• ⊗ HIn (R) ∼ = HomR (HomR (P• , R), HIn (R)), and so [Extn−i (M, R)]∨A is identified with Torn−i (M, HIn (R)), which as we saw is identified with HIi (M). Since all identifications are functorial, we have proven the relative local duality ∼ = [Extn−i (M, R)]∨A , generically on A. HIi (M)  We can finally finish the proof of Theorem 1.1, and hence the main result: Proof of Theorem 2.1. Let R be a power series ring over a Noetherian domain A, and let M be any Noetherian R-module. We need to show that the local cohomology modules HIi (M) are generically free and commute with base change over A. In light of Corollary 4.4 , we can accomplish this by showing that HIi (M) is the relative Matlis dual of a Noetherian R-module, generically on A. But this is guaranteed by the relative local duality theorem Theorem 5.1, which guarantees that H i (M) ∼ = Extn−i (M, R)∨A I R generically on A.  Remark 5.3. One could obviously develop the theory of relative Matlis duality, especially Theorem 5.1, further; I wrote down only the simplest possible case and the simplest possible statements needed to answer Kollár’s question as directly as possible. 12 KAREN E. SMITH References [AM] M. F. Atiyah and I. G. MacDonald, Introduction to Commutative Algebra, Addison Wesley Series in Mathematics, Addison Wesley, London, (1969). [BH] Winfred Burns and Jürgen Herzog, Cohen-Macaulay Rings, Cambridge series in Advanced Mathematics, v 39. Cambridge University Press, (1993). [Conrad] Brian Conrad, Grothendieck Duality and Base Change, Lecture Notes in Mathematics 1750, Springer (2001). [DGI] W.G. Dwyer, J.P.C. Greenlees and S. Iyengar, Duality in algebra and topology, Advances in Mathematics Volume 200, Issue 2, 1 March 2006, Pages 357D402. [Eisen] David Eisenbud, Commutative Algebra with a view towards Algebraic Geometry, Graduate Texts in Mathematics 150, Springer (1995). [EGA] Alexander Grothendieck and Jean Dieudonné, Éléments de Geométrie Algébrique Chapter IV, part 2, Inst. Hautes Études Sci. Pub. Math. 24 (1965). [SGA2] Alexander Grothendieck and Michele Raynaud, Cohomologie locale des faisceaux cohérents et théorèmes de Lefschetz locaux et globaux (SGA 2), Documents Mathèmatiques (Paris) 4, Paris: Sociéité Mathèmatique de France, (2005) [1968], Laszlo, Yves, ed., arXiv:math/0511279, ISBN 978-2-85629-169-6, MR 2171939 [LC] Robin Hartshorne, Local cohomology. A seminar given by A. Grothendieck, Harvard University, Fall, 1961, Lecture notes in mathematics 41, Berlin, New York: Springer-Verlag, (1967). MR0224620 [RD] Robin Hartshorne, Residues and Duality: Lecture Notes of a Seminar on the Work of A. Grothendieck, Given at Harvard 1963 /64, Springer Verlag Lecture Notes in Mathematics, vol 20 (1966). [Hart] Robin Hartshorne, Algebraic Geometry Graduate Texts in Mathematics 52 Springer-Verlag, (2006). [Hoch] Mel Hochster, Lecture notes on Local Cohomology, unpublished, from his University of Michigan website http://www.math.lsa.umich.edu/ hochster/615W11/loc.pdf [HR] Mel Hochster and Joel Roberts, The Purity of Frobenius and Local Cohomology, Advances in Mathematics 21 117–172 (1976). [Kol] János Kollár, Maps between local Picard groups, arXiv:1407.5108v2 (preprint) 2014.
0math.AC
TOPOLOGICAL RIGIDITY FAILS FOR QUOTIENTS OF THE DAVIS COMPLEX arXiv:1610.08699v2 [math.GT] 13 Sep 2017 EMILY STARK Abstract. A Coxeter group acts properly and cocompactly by isometries on the Davis complex for the group; we call the quotient of the Davis complex under this action the Davis orbicomplex for the group. We prove the set of finite covers of the Davis orbicomplexes for the set of oneended Coxeter groups is not topologically rigid. We exhibit a quotient of a Davis complex by a one-ended right-angled Coxeter group which has two finite covers that are homotopy equivalent but not homeomorphic. We discuss consequences for the abstract commensurability classification of Coxeter groups. 1. Introduction The notion of topological rigidity has its roots in the setting of manifolds. A closed manifold M is called topologically rigid if every homotopy equivalence from M to another closed manifold is homotopic to a homeomorphism. A well-known example of this phenomenon is the Poincaré Conjecture, which states that the 3-sphere is topologically rigid and was proven by Perelman. Many lens spaces are examples of 3-manifolds that are not topologically rigid. The Borel conjecture states that closed aspherical manifolds are topologically rigid. The conjecture was proven for manifolds of dimension at least five whose fundamental group is either Gromov hyperbolic or CAT(0) by Bartels and Lück [BL12], building on the techniques of Farrell and Jones [FJ89]. The definition of topological rigidity extends from manifolds to orbifolds and to classes of topological spaces. Background on orbifolds and orbifold homeomorphisms is given by Kapovich [Kap09, Chapter 6] and Ratcliffe [Rat06, Chapter 13]. An orbicomplex is the union of orbifolds identified along homeomorphic suborbifolds, and the notion of homeomorphism extends to these spaces as well. Definition 1.1. Let X be a class of topological spaces, orbifolds, or orbicomplexes. The class X is said to be topologically rigid if for all X1 , X2 ∈ X , if π1 (X1 ) ∼ = π1 (X2 ), then X1 and X2 are homeomorphic. Simplicial graphs provide a simple example of a class of spaces that is not topologically rigid. More generally, for graphs of spaces with one-ended universal covers the presence of topological rigidity is more subtle. Lafont proved that simple, thick, n-dimensional hyperbolic piecewisemanifolds are topologically rigid for n ≥ 2 [Laf04][Laf06][Laf07]. In dimension two, these spaces decompose as graphs of spaces with vertex spaces that are compact hyperbolic surfaces with boundary, edge spaces that are circles, and edge-to-vertex space inclusions that identify the Date: March 11, 2018. 2010 Mathematics Subject Classification. Primary 51F15; Secondary 20E07; 20F55; 20F67. 1 boundary components of the surfaces so that each boundary component is identified to at least two others; the higher-dimensional analogues are similar. The orbicomplexes considered in this paper also have hyperbolic fundamental groups and codimension-1 singularities along embedded locally geodesic 1-complexes; we show that finite covers of these spaces do not exhibit topological rigidity. The spaces studied in this paper have fundamental groups of the following form. If Γ is a finite simplicial graph with vertex set V Γ and edge set EΓ, the right-angled Coxeter group WΓ with defining graph Γ has generating set V Γ and relations s2 = 1 for all s ∈ V Γ and st = ts whenever {s, t} ∈ EΓ. If WΓ is a right-angled Coxeter group, then WΓ acts properly and cocompactly by isometries on its Davis complex ΣΓ . The quotient of this space under the action of the right-angled Coxeter group WΓ is called the Davis orbicomplex DΓ := WΓ \\ΣΓ . Background on Coxeter groups and the Davis complex is given by Davis [Dav08]. A description of reflection orbicomplexes related to those described here can be found in [Sta17, Section 5.2] and [DST16, Section 3]. A natural setting for questions of topological rigidity for spaces with fundamental groups rightangled Coxeter groups and their finite-index subgroups is the set of Davis orbicomplexes and their finite-sheeted covers, as these spaces have a natural orbicomplex structure. If the graph Γ has no edges, so that WΓ is a free product of groups isomorphic to Z/2Z, then the set of Davis orbicomplexes and their finite-sheeted covers is not topologically rigid: such a group is the fundamental group of an orbicomplex which is finitely covered by a finite simplicial graph. So, one may ask if topological rigidity holds if one restricts to one-ended right-angled Coxeter groups. The main result of this paper is the following. Theorem 1.2. Let X be the set of finite covers of the Davis orbicomplexes for the set of one-ended right-angled Coxeter groups. The set X is not topologically rigid. To prove Theorem 1.2, we construct an example of a one-ended right-angled Coxeter group WΓ so that if D is its Davis orbicomplex, then there exist two finite covers of D that have the same fundamental group but are not homeomorphic. The orbicomplex D contains a singular subspace that is finitely covered by a graph; we find two non-homeomorphic covers of the graph that extend to covers of D so that the covers have the same fundamental group. The construction of WΓ and D is given in Section 2, and the finite covers are described in Section 3. In Proposition 3.2, we employ similar ideas to produce further finite covers of D that are quotients of the Davis complex by isomorphic torsion-free subgroups of WΓ and so that these covers are not homeomorphic. As shown by Crisp–Paoluzzi [CP08] using the work of Lafont [Laf07], there are one-ended rightangled Coxeter groups which are not virtually manifold groups for which the Davis orbicomplex together with its finite-sheeted covers is topologically rigid. So, we state the following question. Question 1.3. For which set W of Coxeter groups is the set of Davis orbicomplexes for groups in W together with their finite-sheeted covers topologically rigid? Relatedly, Xie [Xie06] proved the set of quotients of Fuchsian buildings by the action of a cocompact lattice is topologically rigid. An interesting problem is to determine the set of lattices 2 in the isometry group of a hyperbolic building which have a set of quotients that is topologically rigid. Definition 1.4. A class of spaces X is said to be closed under finite covers if whenever X ∈ X , all finite-sheeted covering spaces of X are in X . Topological rigidity of X , a class of spaces closed under finite covers, has applications in the study of the abstract commensurability classes of the fundamental groups of spaces in X . Recall that two groups are abstractly commensurable if they contain finite-index subgroups that are isomorphic. If X is a topologically rigid class of spaces closed under finite covers and X1 , X2 ∈ X , then π1 (X1 ) and π1 (X2 ) are abstractly commensurable if and only if X1 and X2 have homeomorphic finite-sheeted covering spaces. Thus, in this setting, topological invariants can be used to distinguish abstract commensurability classes. For example, this technique was employed by Crisp–Paoluzzi [CP08] and Dani-Stark-Thomas [DST16] for certain right-angled Coxeter groups and by the author for related surface group amalgams [Sta17]. A survey on the use of orbifolds in the study of commensurability classes is given by Walsh [Wal11], and background on commensurability classification is given by Paoluzzi [Pao13]. This paper was motivated by an interest in understanding the abstract commensurability classes of Coxeter groups. Dani–Thomas [DT14] provide a quasi-isometry classification within a class of hyperbolic one-ended right-angled Coxeter groups, and in joint work with Dani and Thomas [DST16], we refine their work to give an abstract commensurability classification for a subclass of these groups. In particular, it was of interest to determine whether topological rigidity holds for finite covers of the Davis orbicomplex, which are natural spaces for right-angled Coxeter groups and their finite-index subgroups. Acknowledgments. The author thanks Pallavi Dani and Anne Thomas for enlightening conversations during our work on [DST16] and for comments on a draft of this paper. The author thanks the anonymous referee for helpful comments. The author was partially supported by the Azrieli Foundation. 2. The Davis orbicomplex v3 v1 v2 Figure 2.1. The graph Γ defining the group WΓ Definition 2.1 (The group W ). Let W = WΓ be the right-angled Coxeter group with defining graph Γ given in Figure 2.1. 3 4 4 4 4 P 2 4 D 2 4 4 4 4 2 4 2 2 4 4 4 4 4 4 4 4 2 4 4 4 2 2 2 2 4 4 4 4 2 4 4 4 4 4 4 4 4 4 4 4 4 2 2 2 4 4 4 4 4 4 4 4 4 4 2 4 4 4 4 4 4 4 4 4 Figure 2.2. Pictured on the above right is the Davis orbicomplex D for the right-angled Coxeter group with defining graph Γ given in Definition 2.1. On the left is illustrated the collection P of six right-angled reflection orbifolds that are glued to each other by local isometries to form the Davis orbicomplex. Each edge of these orbifolds is a reflection edge except for the two edges which are glued to other orbifolds as indicated by the arrows. The numbers indicate the order of the isotropy group at the orbifold point. Construction 2.2 (The Davis orbicomplex D for W ). Let W be the right-angled Coxeter group given in Definition 2.1. The Davis orbicomplex D for W has the following form, which is illustrated in Figure 2.2. The space D is an orbicomplex whose underlying space is topologically the cone on the defining graph Γ. The space D may be viewed as a graph of spaces with vertex spaces 2-dimensional right-angled reflection orbifolds with boundary, and these orbifolds are identified along their boundary components as follows. Let P be the following collection of orbifolds, which will be the vertex spaces of D. Define a branch of the graph Γ to be an embedded path connecting two vertices of valence four. For a branch β, let nβ be the number of vertices of the branch including the endpoints. So, Γ has six branches, and if β is a branch of Γ, then nβ ∈ {5, 7}. The right-angled Coxeter group with defining graph a branch β is the orbifold fundamental group of the following orbifold Pβ . The orbifold Pβ has underlying space a right-angled hyperbolic (nβ + 1)-gon, nβ reflection edges, and one non-reflection edge of length L > 0. Let P = {Pβ | β is a branch of Γ}; the six orbifolds in P are illustrated on the left of Figure 2.2. Identify the orbifolds in P along convex suborbifolds to form the orbicomplex D as follows. For each orbifold in P, attach a 0-cell at the midpoint of each non-reflection edge, creating two non-reflection edges of length L2 . Label these non-reflection edges as follows. First, label the three vertices of Γ of valence four {v1 , v2 , v3 } as illustrated in Figure 2.1. Then, label a non-reflection edge ei if the edge is incident to the reflection edge corresponding to the vertex vi ; this labeling is indicated using arrows in Figure 2.2. To build the Davis orbicomplex D, identify the middle 4 2 2 2 2 2 2 π 2 2 2 2 2 2 2 2 2 2 2 2 2 2 2 4 2 4 2 2 4 2 4 2 4 2 2 2 2 4 Figure 3.1. Illustrated above are two orbifold covers. On the left, the group Z/2Z acts by reflection, identifying the yellow and black vertices, and with quotient space a reflection orbifold in P. On the right, Z/2Z acts by rotation by π. vertex of the two non-reflection edges in each polygon in P and all non-reflection edges of the same label as shown on the right of Figure 2.2. It remains to check that the orbifold fundamental group of D is the right-angled Coxeter group WΓ . Indeed, gluing non-reflection edges with the same label to form a single edge creates a single reflection wall perpendicular to this edge; this gluing corresponds to identifying the endpoints of the branches of Γ to form Γ. The claim then follows from arguments similar to those found in [DST16, Section 3]. 3. The set of finite-sheeted covers of D is not topologically rigid. The covers of D restricted to the reflection orbifolds in P are given by the following two maps, which are illustrated in Figure 3.1. Lemma 3.1. Let D2 ( 2, . . . , 2 ) denote the orbifold with underlying space a disk and with ramifi| {z } n cation locus n cone points of order 2. (a) Each orbifold in P with n reflection edges is covered by D2 ( 2, . . . , 2 ). | {z } n−1 (b) The orbifold D2 ( 2, . . . , 2 ) double covers D2 ( 2, . . . , 2 ). | {z } | {z } 2m m+1 Proof. The first covering map is realized by reflection: arrange the cone points along a diameter of the disk and reflect across this segment. The second covering map is realized by rotation: arrange the 2m cone points symmetrically about a central (non-orbifold) point in the disk and rotate by π.  5 2 2 2 2 2 2 2 Figure 3.2. Non-homeomorphic covers of the singular subspace, a 1-dimensional orbicomplex with ramification points of order two. The three graph covering maps can be realized by rotation by π about a center point in the embedding of the graph in the plane, and the orbifold covering map can be realized by reflection about a vertical line in the Θ-graph. Proof of Theorem 1.2. Let D ∈ X be the Davis orbicomplex defined in Construction 2.2 and illustrated in Figure 2.2. To prove the class of spaces X is not topologically rigid, we will exhibit two covers of D with the same fundamental group that are not homeomorphic. The orbicomplex D has a singular subspace with underlying space a tripod formed by gluing together the non-reflection edges of the orbifolds in P; to prove the finite covers constructed are not homeomorphic, we prove the covers restricted to the singular subspace are not homeomorphic. The singular subspace of D is a 1-dimensional orbicomplex with underlying space a star on three vertices and so that each vertex of valence one is a ramification point of order two. The singular subspace and the covers restricted to the singular subspace are drawn in Figure 3.2. We prove that these graph coverings can be extended to finite coverings of the Davis orbicomplex D. To construct two covers of D that are not homeomorphic, we first construct covers of degree 2 2 2 2 two, X2 → − X1 → − D, and then two further covers of degree two, Y → − X2 and Z → − X2 so that Y and Z are not homeomorphic but are homotopy equivalent. 2 We begin by describing the cover X1 → − D. This cover is illustrated in Figure 3.3. The space 2 X1 consists of two copies of D (2, 2, 2, 2, 2, 2), labeled D1 and D2 , and four copies of D2 (2, 2, 2, 2), labeled D3 , D4 , D5 , D6 . To define the identification of these orbifolds, label the boundary circle of Di by first subdividing it into two segments of equal length by adding vertices xi and yi . Label one oriented edge {xi , yi } by di and the other by d0i . To form X1 , identify all vertices in {xi | 1 ≤ i ≤ 6} to form a vertex x and identify all vertices in {yi | 1 ≤ i ≤ 6} to form a vertex y. Identify edges {d1 , d2 , d3 , d4 } to form a single edge c1 ; identify edges {d01 , d02 , d05 , d06 } to form a single edge c2 ; and, identify edges {d03 , d04 , d5 , d6 } to form a single edge c3 . Then, for each i, the orbifold Di ⊂ X1 covers an orbifold Pβ ⊂ D, so that if the boundary of Di is labeled cj c−1 k , then −1 this curve double-covers the non-reflection edge of Pβ labeled ej ek . These covering maps agree along the intersection of the set {Di | 1 ≤ i ≤ 6} in X1 , and hence the union of these spaces covers D, the union of the Pβ , by degree two. The remaining covering maps may be realized by rotation in R3 ; these are illustrated in Figure 3.4. First, observe that the singular subspace of X1 is the Θ-graph, with two vertices of valence 6 2 X1 c3 2 2 2 2 c3 2 c3 c3 c1 2 c2 2 4 2 4 4 2 e3 e3 e1 4 2 4 e2 2 4 2 e3 4 2 4 2 D 2 e1 4 2 2 2 2 e3 c2 c1 4 4 4 4 2 2 2 4 4 2 2 c1 c2 2 2 2 2 2 c1 2 c2 2 2 4 4 4 2 2 2 2 e1 e2 4 2 4 e2 4 e1 e2 4 4 4 4 4 4 2 2 4 2 2 c1 c2 e1 2 e3 c3 2 e2 2 Figure 3.3. Illustrated on the top row is the degree-2 cover X1 → D. The space X1 contains six orbifolds, each with underlying space a disk and with either four or six cone points of order two. The orbifolds are glued along the boundary of the disks as illustrated with the labeled arrows; all yellow vertices are identified, and all black vertices are identified. The cover restricted to the singular subspaces is illustrated below; the covering map is given by reflection through a vertical line through the left-hand graph. three and the three directed edges {c1 , c2 , c3 } connecting the two vertices. This graph embeds in −1 the plane and the boundary curves of the disk orbifolds Di are the three curves c1 c−1 2 , c1 c3 , and 3 3 c2 c−1 3 . Then, the space X1 embeds in the 3-ball B ⊂ R as illustrated in Figure 3.4 so that the Θ-graph embeds in the equatorial xy-plane. The copies of D2 (2, 2, 2, 2) with boundary c1 c−1 3 may 2 be viewed as the two hemispheres of the unit sphere. The copies of D (2, 2, 2, 2) with boundary c2 c−1 3 may be viewed as the two hemispheres of a sphere embedded inside the unit sphere; likewise for the copies of D2 (2, 2, 2, 2, 2, 2). The remaining covering maps may be realized by rotations by π about the z-axis in Euclidean space. The covering map restricted to each copy of D2 (2, . . . , 2) is either exactly 2-to-1 or is the rotational covering map given in Lemma 3.1. The two covers given in Figure 3.4 are not homeomorphic since their singular subspaces are not homeomorphic. It remains to show that these spaces are homotopy equivalent and hence have the same orbifold fundamental group. To see this, take a regular neighborhood of the singular locus of Y and Z in the xy-plane to form a surface with genus zero and with six boundary components. The homotopy from the embedded graph to its regular neighborhood in the plane extends to homotopies from Y to a space Y 0 and from Z to a space Z 0 , where the homotopy is the identity on the complement of the singular subspace. That is, the space Y 0 contains a surface of genus zero 7 Y Z 2 2 X2 2 X1 c1 c2 c3 Figure 3.4. Two coverings of an orbicomplex8 that are not homeomorphic, but which have the same orbifold fundamental group. The covering maps are each given by a Z/2Z action of rotation about the z-axis. All of the blue points are orbifold points of order 2. Λ 2 d3 2 d4 d1 d6 d5 d2 Figure 3.5. On the left are degree-2 covers given by rotation by π about a vertical axis positioned through the surface or orbifold. The blue points represent cone points of order 2. On the right is the singular subspace of the orbicomplex Y. and with six boundary components B1 , . . . , B6 . For 1 ≤ i ≤ 4, two copies of D2 (2, 2, 2, 2, 2, 2) are identified to Bi by homeomorphisms of the boundary curve of the disk orbifolds; for 5 ≤ i ≤ 6, two copies of D2 (2, 2, 2, 2, 2, 2, 2, 2, 2, 2) are identified to Bi by a homeomorphisms of the boundary curve of the disk orbifolds. The space Z 0 is homeomorphic to Y 0 . Thus, the orbicomplexes Y and Z are homotopy equivalent, so their orbifold fundamental groups are isomorphic.  3.1. Torsion-free covers. Proposition 3.2. Let Y and Z be the orbicomplexes described in the proof of Theorem 1.2 and b and π1 (Z) b are shown in Figure 3.4. There exist finite covers Yb → Y and Zb → Z so that π1 (Y) b ∼ b and Yb and Zb are not homeomorphic. torsion-free, π1 (Y) = π1 (Z), Proof. We first describe the finite cover Yb → Y. The orbicomplex Y has a singular subspace the planar graph Λ, shown in Figure 3.5. Let d1 . . . , d6 denote the boundary curves of the six planar regions in the complement of Λ ⊂ R2 as marked in Figure 3.5. Glued to d1 and d2 are two copies of D2 (2, 2, 2, 2, 2, 2, 2, 2, 2, 2), and glued to each of d3 , . . . , d6 are two copies of D2 (2, 2, 2, 2, 2, 2). As shown in Figure 3.5, the surface Sg,4 of genus g and four boundary components forms a degree-4 cover of D2 ( 2, . . . , 2 ), where g = 3 if n = 6 and g = 7 if n = 10. Indeed, embed the surface in | {z } n R3 so that the boundary components are arranged symmetrically in pairs about a vertical axis and the holes of the surface lie along the axis. Rotate by π about the vertical axis to produce an orbifold with underlying space an annulus and with 2g + 2 cone points of order 2. Arrange the cone points symmetrically along a core curve of the annulus and rotate by π about an axis that b take four skewers the core curve in two non-singular points to obtain D2 ( 2, . . . , 2 ). To form Y, | {z } n copies of the graph Λ; for i = 1, 2, glue to the four copies of di the four boundary curves of S7,4 by homeomorphisms; and, for i = 3, . . . , 6, glue to the four copies of di the boundary curves of S3,4 by homeomorphisms. Since each boundary curve of Sg,4 covers the boundary of D2 ( 2, . . . , 2 ) by | {z } n degree-1, Yb forms a degree-4 cover of Y. The finite cover Zb → Z is constructed similarly. By analogous arguments to those in the proof of Theorem 1.2, Yb and Zb are homotopy equivalent. The singular subspace of Yb is homeomorphic to four copies of the singular subspace of Y; likewise, the singular subspace of Zb is homeomorphic to four copies of the singular subspace of Z. Thus, Yb and Zb are not homeomorphic.  9 References [BL12] [CP08] [Dav08] [DST16] [DT14] [FJ89] [Kap09] [Laf04] [Laf06] [Laf07] [Pao13] [Rat06] [Sta17] [Wal11] [Xie06] Arthur Bartels and Wolfgang Lück. The Borel conjecture for hyperbolic and CAT(0)-groups. Ann. of Math. (2), 175(2):631–689, 2012. John Crisp and Luisa Paoluzzi. Commensurability classification of a family of right-angled Coxeter groups. Proc. Amer. Math. Soc., 136(7):2343–2349, 2008. Michael W. Davis. The geometry and topology of Coxeter groups, volume 32 of London Mathematical Society Monographs Series. Princeton University Press, Princeton, NJ, 2008. Pallavi Dani, Emily Stark, and Anne Thomas. Commensurability classification for certain right-angled Coxeter groups and geometric amalgams of free groups. arXiv:1610.06245, 2016. Pallavi Dani and Anne Thomas. Bowditch’s JSJ tree and the quasi-isometry classification of certain Coxeter groups. arXiv:1402.6224, 2014. F. T. Farrell and L. E. Jones. A topological analogue of Mostow’s rigidity theorem. J. Amer. Math. Soc., 2(2):257–370, 1989. Michael Kapovich. Hyperbolic manifolds and discrete groups. Modern Birkhäuser Classics. Birkhäuser Boston, Inc., Boston, MA, 2009. Reprint of the 2001 edition. Jean-François Lafont. Rigidity result for certain three-dimensional singular spaces and their fundamental groups. Geom. Dedicata, 109:197–219, 2004. Jean-François Lafont. Strong Jordan separation and applications to rigidity. J. London Math. Soc. (2), 73(3):681–700, 2006. Jean-François Lafont. Diagram rigidity for geometric amalgamations of free groups. J. Pure Appl. Algebra, 209(3):771–780, 2007. Luisa Paoluzzi. The notion of commensurability in group theory and geometry. RIMS Kkyroku, 1836:124137, 2013. John G. Ratcliffe. Foundations of hyperbolic manifolds, volume 149 of Graduate Texts in Mathematics. Springer, New York, second edition, 2006. Emily Stark. Abstract commensurability and quasi-isometry classification of hyperbolic surface group amalgams. Geom. Dedicata, 186:39–74, 2017. Genevieve S. Walsh. Orbifolds and commensurability. In Interactions between hyperbolic geometry, quantum topology and number theory, volume 541 of Contemp. Math., pages 221–231. Amer. Math. Soc., Providence, RI, 2011. Xiangdong Xie. Quasi-isometric rigidity of Fuchsian buildings. Topology, 45(1):101–169, 2006. 10
4math.GR
arXiv:1307.6894v1 [math.CT] 25 Jul 2013 THE OPERAD OF TEMPORAL WIRING DIAGRAMS: FORMALIZING A GRAPHICAL LANGUAGE FOR DISCRETE-TIME PROCESSES DYLAN RUPEL AND DAVID I. SPIVAK Abstract. We investigate the hierarchical structure of processes using the mathematical theory of operads. Information or material enters a given process as a stream of inputs, and the process converts it to a stream of outputs. Output streams can then be supplied to other processes in an organized manner, and the resulting system of interconnected processes can itself be considered a macro process. To model the inherent structure in this kind of system, we define an operad W of black boxes and directed wiring diagrams, and we define a W-algebra P of processes (which we call propagators, after [RS]). Previous operadic models of wiring diagrams (e.g. [Sp2]) use undirected wires without length, useful for modeling static systems of constraints, whereas we use directed wires with length, useful for modeling dynamic flows of information. We give multiple examples throughout to ground the ideas. Contents 1. Introduction 2. W, the operad of directed wiring diagrams 3. P, the algebra of propagators on W 4. Future work References 1 5 18 34 36 1. Introduction Managing processes is inherently a hierarchical and self-similar affair. Consider the case of preparing a batch of cookies, or if one prefers, the structurally similar case of manufacturing a pharmaceutical drug. To make cookies, one generally follows a recipe, which specifies a process that is undertaken by subdividing it as a sequence of major steps. These steps can be performed in series or in parallel. The notion of self-similarity arises when we realize that each of these major steps can itself be viewed as a process, and thus it can also be subdivided into smaller steps. For example, procuring the materials necessary to make cookies involves getting oneself to the appropriate store, selecting the necessary materials, paying for them, etc., and each of these steps is itself a simpler process. Perhaps every such hierarchy of nesting processes must touch ground at the level of atomic detail. Hoping that the description of processes within processes would not continue ad infinitum may have led humanity to investigate matter and motion at the smallest level possible. This investigation into atomic and quantum physics has yielded tremendous technological advances, such as the invention of the microchip. Working on the smallest possible scale is not always effective, however. It appears that the planning and execution of processes benefits immensely from hierarchical chunking. To write Spivak acknowledges support by ONR grant N000141310260. 1 2 DYLAN RUPEL AND DAVID I. SPIVAK a recipe for cookies at the level of atomic detail would be expensive and useless. Still, when executing our recipe, the decision to add salt will initiate an unconscious procedure, by which signals are sent from the brain to the muscles of the arm, on to individual cells, and so on until actual atoms move through space and “salt has been added”. Every player in the larger cookie-making endeavor understands the current demand (e.g. to add salt) as a procedure that makes sense at his own level of granularity. The decision to add salt is seen as a mundane (low-level) job in the context of planning to please ones girlfriend by baking cookies; however this same decision is seen as an abstract (high-level) concept in the context of its underlying performance as atomic movements. For designing complex processes, such as those found in manufacturing automobiles or in large-scale computer programming, the architect and engineers must be able to change levels of abstraction with ease. In fact, different engineers working on the same project are often thinking about the same basic structures, but in different terms. They are most effective when they can chunk the basic structures as they see fit. A person who studies a supply chain in terms of the function played by each chain member should be able to converse coherently with a person who studies the same supply chain in terms of the contracts and negotiations that exist at each chain link. These are two radically different viewpoints on the same system, and it is useful to be able to switch fluidly between them. Similarly, an engineer designing a system’s hardware must be able to converse with an engineer working on the system’s software. Otherwise, small perturbations made by one of them will be unexpected by the other, and this can lead to major problems. The same types of issues emerge whether one is concerned with manufacturers in a supply chain, neurons in a functional brain region, modules in a computer program, or steps in a recipe. In each case, what we call propagators (after [RS]) are being arranged into a system that is itself a propagator at a higher level. The goal of this paper is to provide a mathematical basis for thinking about this kind of problem. We offer a formalism that describes the hierarchical and self-similar nature of a certain kind of wiring diagram. A similar kind of wiring diagram was described in [Sp2], the main difference being that the present one is built for time-based processes whereas the one in [Sp2] was built for static relations. In the present work we take the notion of time (or one may say distance) seriously. We go through considerable effort to integrate a notion of time and distance into the fundamental architecture of our description, by emphasizing that communication channels have a length, i.e. that communication takes time. Design choices such as these greatly affect the behavior of our model, and ours was certainly not the only viable choice. We hope that the basic idea we propose will be a basis upon which future engineers and mathematicians will improve. For the time being, we may at least say that the set of rules we propose for our wiring diagrams roughly conform with the IDEF0 standard set by the National Institute of Standards and Technology [NIST]. The main differences are that in our formalism, • wires can split but not merge (each merging must occur within a particular box), • feedback loops are allowed, • the so-called control and mechanism arrows are subsumed into input and output arrows, and • the rules for and meaning of hierarchical composition is made explicit. THE OPERAD OF TEMPORAL WIRING DIAGRAMS 3 The basic picture to have in mind for our wiring diagrams is the following: (1) flour sugar dry mix salt milk eggs wet mix cookie batter egg yolks egg yolks In this picture we see an exterior box, some interior boxes, and a collection of directed wires. These directed wires transport some type of product from the export region of some box to the import region of some box. In (1) we have a supply chain involving three propagators, one of whom imports flour, sugar, and salt and exports dry mixture, and another of whom imports eggs and milk and exports egg yolks and wet mixture. The dry mixture and the wet mixture are then transported to a third propagator who exports cookie batter. The whole system itself constitutes a propagator that takes five ingredients and produces cookie batter and egg yolks. The formalism we offer in this paper is based on a mathematical structure called an operad (more precisely, a symmetric colored operad), chosen because they capture the self-similar nature of wiring diagrams. The rough idea is that if we have a wiring diagram and we insert wiring diagrams into each of its interior boxes, the result is a new wiring diagram. (2) We will make explicit what constitutes a box, what constitutes a wiring diagram (WD), and how inserting WDs into a WD constitutes a new WD. Like Russian dolls, we may have a nesting of WDs inside of WDs inside of WDs, etc. We will prove an associativity law that guarantees that no matter how deeply our Russian dolls are nested, the resulting WD is well-defined. Once all this is done, we will have an operad W. To make this directed wiring diagrams operad W useful, we will take our formalism to the next logical step and provide an algebra on W. This algebra P encodes our application to process management by telling us what fits in the boxes and how to use wiring diagrams to build more complex systems out of simpler components. More precisely, the algebra P makes explicit • the set of things that can go in every box, namely the set of propagators, and • a method for taking a wiring diagram and a propagator for each of its interior boxes and producing a propagator for the exterior box. To prove that we have an algebra, we will show that no matter how one decides to group the various internal propagators, the behavior of the resulting system is unchanged. Operads were invented in the 1970s by [May] and [BV] in order to encode the relationship between various operations they noticed taking place in the mathematical field of algebraic topology. At the moment we are unconcerned with topological properties of our operads, but the formalism grounds the picture we are trying to get across. For more on operads, see [Lei]. 4 DYLAN RUPEL AND DAVID I. SPIVAK 1.1. Structure of the paper. In Section 2 we discuss operads. In Section 2.1 we give the mathematical definition of operads and some examples. In Section 2.2 we propose the operad of interest, namely W, the operad of directed wiring diagrams. We offer an example wiring diagram in Section 2.3 that will run throughout the paper and eventually output the Fibonacci sequence. In Section 2.4 we prove that W has the required properties so that it is indeed an operad. In Section 3 we discuss algebras on an operad. In Section 3.1 we give the mathematical definition of algebras. In Sections 3.2 we discuss some preliminaries on lists and define our notion of historical propagators, which we will then use in 3.3 where we propose the W-algebra of interest, the algebra of propagators. In Section 3.5 we prove that P has the required properties so that it is indeed a W-algebra. We expect the majority of readers to be most interested in the running examples sections, Sections 2.3 and 3.4. Readers who want more details, e.g. those who may wish to write code for propagators, will need to read Sections 2.2, 3.3. The proof that our algebra satisfies the necessary requirements is technical; we expect only the most dedicated readers to get through it. Finally, in Section 4 we discuss some possibilities for future work in this area. The remainder of the present section is devoted to our notational conventions (Section 1.2) and our acknowledgments (1.3). 1.2. Notation and background. Here we describe our notational conventions. These are only necessary for readers who want a deep understanding of the underlying mathematics. Such readers are assumed to know some basic category theory. For mathematicians we recommend [Awo] or [Mac], for computer scientists we recommend [Awo] or [BW], and for a general audience we recommend [Sp1]. We will primarily be concerned only with the category of small sets, which we denote by Set, and some related categories. We denote by Fin ⊆ Set the full subcategory spanned by finite sets. We often use the symbol n ∈ Ob(Fin) to denote a finite set, and may speak of elements i ∈ n. The cardinality of a finite set is a natural number, denoted |n| ∈ N. In particular, we consider 0 to be a natural number. Suppose given a finite set n and a function X : n → Ob(Set), and let ∐i∈I X(i) be the disjoint union. Then there is a canonical function πX : ∐i∈n X(i) −→ n which we call the component projection. We use almost the same symbol in a different context; namely, for any function s : m → n we denote the s-coordinates projection by Y Y X(s(j)). X(i) −→ πs : i∈n j∈m In particular, if i ∈ n is an element, we consider it as a function i : {∗} → n and write Q πi : i∈n X(i) → X(i) for the usual ith coordinate projection. A pointed set is a pair (S, s) where S ∈ Ob(Set) is a set and s ∈ S is a chosen element, called the base point. In particular a pointed set cannot be empty. Given another pointed set (T, t), a pointed function from (S, s) to (T, t) consists of a function f : S → T such that f (s) = t. We denote the category of pointed sets by Set∗ . There is a forgetful functor Set∗ → Set which forgets the basepoint; it has a left adjoint which adjoins a free basepoint X 7→ X ∐ {∗}. We often find it convenient not to mention basepoints; if we speak of a set X as though it is pointed, we are actually speaking of X ∐ {∗}. If S, S ′ are pointed sets then the product S × S ′ is also naturally pointed, with basepoint (∗, ∗), again denoted simply by ∗. We often speak of functions n → Ob(Set∗ ), where n is a finite set. Of course, Ob(Set∗ ) is not itself a small set, but using the theory of Grothendieck universes [Bou], this is not a problem. It will be even less of a problem in applications. THE OPERAD OF TEMPORAL WIRING DIAGRAMS 5 1.3. Acknowledgements. David Spivak would like to thank Sam Cho as well as the NIST community, especially Al Jones and Eswaran Subrahmanian. Special thanks go to Nat Stapleton for many valuable conversations in which substantial progress was made toward subjects quite similar to the ones we discuss here. Dylan Rupel would like to thank Jason Isbell and Kiyoshi Igusa for many useful discussions. 2. W, the operad of directed wiring diagrams In this section we will define the operad W of black boxes and directed wiring diagrams (WDs). It governs the forms that a black box can take, the rules that a WD must follow, and the formula for how the substitution of WDs into a WD yields a WD. There is no bound on the depth to which wiring diagrams can be nested. That is, we prove an associative law which roughly says that the substitution formula is well-defined for any degree of nesting, shallow or deep. We will use the operad W to discuss the hierarchical nature of processes. Each box in our operad will be filled with a process, and each wiring diagram will effectively build a complex process out of simpler ones. However, this is not strictly a matter of the operad W but of an algebra on W. This algebra will be discussed in Section 3. The present section is organized as follows. First, in Section 2.1 we give the technical definition of the term operad and a few examples. In Section 2.2 we propose our operad W of wiring diagrams. It will include drawings that should clarify the matter. In Section 2.3 we present an example that will run throughout the paper and end up producing the Fibonacci sequence. This section is recommended especially to the more category-theoretically shy reader. Finally, in Section 2.4 we give a technical proof that our proposal for W satisfies the requirements for being a true operad, i.e. we establish the well-definedness of repeated substitution as discussed above. 2.1. Definition and basic examples of operads. Before we begin, we should give a warning about our use of the term “operad”. Warning 2.1.1. Throughout this paper, we use the word operad to mean what is generally called a symmetric colored operad or a symmetric multicategory. This abbreviated nomenclature is not new, for example it is used in [Lur]. Hopefully no confusion will arise. For a full treatment of operads, multicategories, and how they fit into a larger mathematical context, see [Lei]. Most of Section 2.1 is recycled material, taken almost verbatim from [Sp2]. We repeat it here for the convenience of the reader. Definition 2.1.2. An operad O is defined as follows: One announces some constituents (A. objects, B. morphisms, C. identities, D. compositions) and proves that they satisfy some requirements (1. identity law, 2. associativity law). Specifically, A. one announces a collection Ob(O), each element of which is called an object of O. B. for each object y ∈ Ob(O), finite set n ∈ Ob(Fin), and n-indexed set of objects x : n → Ob(O), one announces a set On (x; y) ∈ Ob(Set). Its elements are called morphisms from x to y in O. C. for every object x ∈ Ob(O), one announces a specified morphism denoted idx ∈ O1 (x; x) called the identity morphism on x. D. Let s : m → n be a morphism in Fin. Let z ∈ Ob(O) be an object, let y : n → Ob(O) be an n-indexed set of objects, and let x : m → Ob(O) be an m-indexed set of objects. 6 (3) DYLAN RUPEL AND DAVID I. SPIVAK For each element i ∈ n, write mi := s−1 (i) for the pre-image of s under i, and write xi = x|mi : mi → Ob(O) for the restriction of x to mi . Then one announces a function Y Omi (xi ; y(i)) −→ Om (x; z), ◦ : On (y; z) × i∈n called the composition formula for O. Given an n-indexed set of objects x : n → Ob(O) and an object y ∈ Ob(O), we sometimes abuse notation and denote the set of morphisms from x to y by O(x1 , . . . , xn ; y). 1 We may write HomO (x1 , . . . , xn ; y), in place of O(x1 , . . . , xn ; y), when convenient. We can denote a morphism φ ∈ On (x; y) by φ : x → y or by φ : (x1 , . . . , xn ) → y; we say that each xi is a domain object of φ and that y is the codomain object of φ. We use infix notation for the composition formula, e.g. writing ψ ◦ (φ1 , . . . , φn ). These constituents (A,B,C,D) must satisfy the following requirements: 1. for every x1 , . . . , xn , y ∈ Ob(O) and every morphism φ : (x1 , . . . , xn ) → y, we have φ ◦ (idx1 , . . . , idxn ) = φ s and idy ◦ φ = φ; t 2. Let m − → n − → p be composable morphisms in Fin. Let z ∈ Ob(O) be an object, let y : p → Ob(O), x : n → Ob(O), and w : m → Ob(O) respectively be a p-indexed, n-indexed, and m-indexed set of objects. For each i ∈ p, write ni = t−1 (i) for the pre-image and xi : ni → Ob(O) for the restriction. Similarly, for each k ∈ n write mk = s−1 (k) and wk : mk → Ob(O); for each i ∈ p, write mi,− = (t ◦ s)−1 (i) and wi,− : mi,− → Ob(O); for each j ∈ ni , write mi,j := s−1 (j) and wi,j : mi,j → Ob(O). Then the diagram below commutes: Q Q Q Op (y; z) × i∈p Oni (xi ; y(i)) × i∈p, ❚❚❚❚j∈ni Omi,j (wi,j ; xi (j)) ❥ ❚❚❚❚ ❥❥❥ ❥ ❥ ❥ ❚❚❚❚ ❥❥ ❥ ❥ ❥ t❥ Q Q❚* Q Q Omi,− (wi,− ; y(i)) O (y; z) × (w ; x(k)) On (x; z) × k∈n Om p i∈p ❙❙k❙ k ❙❙❙ ❦❦❦❦ ❙❙❙ ❦❦❦ ❦ ❙❙❙ ❦ ❦ u❦❦ ) Om (w; z) Remark 2.1.3. In this remark we will discuss the abuse of notation in Definition 2.1.2 and how it relates to an action of a symmetric group on each morphism set in our definition of operad. We follow the notation of Definition 2.1.2, especially following the use of subscripts in the composition formula. Suppose that O is an operad, z ∈ Ob(O) is an object, y : n → Ob(O) is an n-indexed set of objects, and φ : y → z is a morphism. If we linearly order n, enabling us to write φ : (y(1), . . . , y(|n|)) → z, then changing the linear ordering amounts to finding an isomorphism  of finite sets σ : m − → n, where |m| = |n|. Let x = y ◦ σ and for each i ∈ n, note that mi = σ −1 ({i}) = {σ −1 (i)}, so xi = x|σ−1 (i) = y(i). Taking idxi ∈ Omi (xi ; y(i)) for each i ∈ n, and using the identity law, we find that the composition formula induces a bijection  On (y; z) − → Om (x; z), which we might denote by  σ : O(y(1), y(2), . . . , y(n); z)  O y(σ(1)), y(σ(2)), . . . , y(σ(n)); z . 1There are three abuses of notation when writing O(x , . . . , x ; y), which we will fix one by one. First, it n 1 confuses the set n ∈ Ob(Fin) with its cardinality |n| ∈ N. But rather than writing O(x1 , . . . , x|n| ; y), it would be more consistent to write O(x(1), . . . , x(|n|); y), because we have assigned subscripts another meaning in D. However, even this notation unfoundedly suggests that the set n has been endowed with a linear ordering, which it has not. This may be seen as a more serious abuse, but see Remark 2.1.3. THE OPERAD OF TEMPORAL WIRING DIAGRAMS 7 In other words, there is an induced group action of Aut(n) on On (y(1), . . . , y(n); z), where Aut(n) is the group of permutations of an n-element set. Throughout this paper, we will permit ourselves to abuse notation and speak of morphisms φ : (x1 , x2 , . . . , xn ) → y for a natural number n ∈ N, without mentioning the abuse inherent in choosing an order, so long as it is clear that permuting the order of indices would not change anything up to canonical isomorphism. Example 2.1.4. We define the operad of sets, denoted Sets, as follows. We put Ob(Sets) := Ob(Set). Given a natural number n ∈ N and objects X1 , . . . , Xn , Y ∈ Ob(Sets), we define Sets(X1 , X2 , . . . , Xn ; Y ) := HomSet (X1 × X2 × · · · × Xn , Y ). For any X ∈ Ob(Sets) the identity morphism idX : X → X is the same identity as that in Set. The composition formula is as follows. Suppose given a set Z ∈ Ob(Set), a finite set n ∈ Ob(Fin), for each i ∈ n a set Yi ∈ Ob(Set) and a finite set mi ∈ Ob(Fin), and for each j ∈ mi a setQXi,j ∈ Ob(Set). Suppose furthermore that we Qhave composable morphisms: a function g : i∈n Yi → Z and for each i ∈ n a function fi : j∈mi Xi,j → Yi . Let m = ∐i mi . Q We need a function j∈m Xj → Z, which we take to be the composite Q Y Y Y fi g i∈n Yi −−−→ Z. Xi,j −−−−−−−−→ i∈n j∈mi i∈n It is not hard to see that this composition formula is associative. Example 2.1.5. The commutative operad E has one object, say Ob(E) = {N}, and for each n ∈ N it has a single n-ary morphism, En (N, . . . , N; N) = {µn }. 2.2. The announced structure of the wiring diagrams operad W. To define our operad W, we need to announce its structure, i.e. • define what constitutes an object of W, • define what constitutes a morphism of W, • define the identity morphisms in W, and • the formula for composing morphisms of W. For each of these we will first draw and describe a picture to have in mind, then give a mathematical definition. In Section 2.4 we will prove that the announced structure has the required properties. Objects are black boxes. Each object X will be drawn as a box with input arrows entering on the left of the box and output arrows leaving from the right of the box. The arrows will be called wires. All input and output wires will be drawn across the corresponding vertical wall of the box. in(X) out(X) (4) Each wire is also assigned a set of values that it can carry, and this set can be written next to the wire, or the wires may be color coded. See Example 2.2.2 below. As above, we often leave off the values assignment in pictures for readability reasons. Announcement 2.2.1 (Objects of W). An object X ∈ Ob(W) is called a black box, or box for short. It consists of a tuple X := (in(X), out(X), vset), where • in(X) ∈ Ob(Fin) is a finite set, called the set of input wires to X, • out(X) ∈ Ob(Fin) is a finite set, called the set of output wires from X, and 8 DYLAN RUPEL AND DAVID I. SPIVAK • vset(X) : in(X) ∐ out(X) → Ob(Set∗ ) is a function, called the values assignment for X. For each wire i ∈ in(X) ∐ out(X), we call vset(i) ∈ Ob(Set∗ ) the set of values assigned to wire i, and we call its basepoint element the default value on wire i. ♦ Example 2.2.2. We may take X = ({1}, {2, 3}, vset), where vset: {1, 2, 3} → Ob(Set∗ ) is given by vset(1) = N, vset(2) = N, and vset(3) = {a, b, c}. 2 We would draw X as follows. X {a, b, c} N N The input wire carries natural numbers, as does one of the output wires, and the other output wire carries letters a, b, c. Morphisms are directed wiring diagrams. Given black boxes Y1 , . . . , Yn ∈ Ob(W) and a black box Z ∈ Ob(W), we must define the set Wn (Y ; Z) of wiring diagrams (WDs) of type Y1 , . . . , Yn → Z. Such a wiring diagram can be taken to denote a way to wire black boxes Y1 , . . . , Yn together to form a larger black box Z. A typical such wiring diagram is shown below: ψ : (Y1 , Y2 , Y3 ) → Z Y1 Y3 in(Z) out(Z) Y2 (5) Here n = 3, and for example Y1 has two input wire and three outputs wires. Each wire in a WD has a specified directionality. As it travels a given wire may split into separate wires, but separate wires cannot come together. The wiring diagram also includes a finite set of delay nodes; in the above case there are four. One should think of a wiring diagram ψ : Y1 , . . . , Yn → Z as a rule for managing material (or information) flow between the components of an organization. Think of ψ as representing this organization. The individual components of the organization are the interior black boxes (the domain objects of ψ) and the exterior black box (the codomain object of ψ). Each component supplies material to ψ as well as demands material from ψ. For example component Z supplies material on the left side of ψ and demands it on the right side of ψ. On the other hand, each Yi supplies material on its right side and demands material on its left. Like the IDEF0 standard for functional modeling diagrams [NIST], we always adhere to this directionality. We insist on one perhaps surprising (though seemingly necessary rule), namely that the wiring diagram cannot connect an output wire of Z directly to an input wire of Z. Instead, each output wire of Z is supplied either by an output wire of some Y (i) or by a delay node. 2 The functor vset is supposed to assign pointed sets to each wire, but no base points are specified in the description above. As discussed in Section 1.2, in this case we really have vset(1) = N ∐ {∗}, vset(2) = N ∐ {∗}, and vset(3) = {a, b, c} ∐ {∗}, where ∗ is the default value. THE OPERAD OF TEMPORAL WIRING DIAGRAMS 9 Announcement 2.2.3 (Morphisms of W). Let n ∈ Ob(Fin) be a finite set, let Y : n → Ob(W) be an n-indexed set of black boxes, and let Z ∈ Ob(W) be another black box. We write (6) in(Y ) = ∐i∈n in(Y (i)), out(Y ) = ∐i∈n out(Y (i)). We take vset: in(Y ) ∐ out(Y ) → Ob(Set∗ ) to be the induced map. A morphism ψ : Y (1), . . . , Y (n) → Z in Wn (Y ; Z) is called a temporal wiring diagram, a wiring diagram, or a WD for short. It consists of a tuple (DNψ , vset, sψ ) as follows. 3 • DNψ ∈ Ob(Fin) is a finite set, called the set of delay nodes for ψ. At this point we can define the following sets: Dmψ := out(Z) ∐ in(Y ) ∐ DNψ Spψ := in(Z) ∐ out(Y ) ∐ DNψ the set of demand wires in ψ, and the set of supply wires in ψ. • vset: DNψ → Ob(Set) is a function, called the value-set assignment for ψ, such that the diagram idDNψ / Dmψ ●● ●●vset ●● idDNψ vset ●● ●#   Spψ vset / Set∗ DNψ commutes (meaning that every delay node demands the same value-set that it supplies). • sψ : Dmψ → Spψ is a function, called the supplier assignment for ψ. The supplier assignment sψ must satisfy two requirements: (1) The following diagram commutes: Dmψ ●● ●●vset ●● ●● #  Spψ vset / Set∗ sψ meaning that whenever a demand wire is assigned a supplier, the set of values assigned to these wires must be the same. (2) If z ∈ out(Z) then sψ (z) < in(Z). Said another way, sψ |out(Z) ⊆ out(Y ) ∐ DNψ , meaning that a global output cannot be directly supplied by a global input. We call this the non-instantaneity requirement. We have functions vset : in(Z) ∐ out(Z) → Set∗ , vset: in(Y (i)) ∐ out(Y (i)) → Set∗ , and vset : DNψ → Set∗ . It should not cause confusion if we use the same symbol to denote the induced functions vset : Dmψ → Set∗ and vset: Spψ → Set∗ . ♦ 3A morphism ψ : Y → Z is in fact an isomorphism class of this data. That is, given two tuples (DN , vset, s ) ψ ψ ′ , vset′ , s′ ) as above, with a bijection DN  DN ′ making all the appropriate diagrams commute, and (DNψ ψ ψ ψ we consider these two tuples to constitute the same morphism ψ : Y → Z. 10 DYLAN RUPEL AND DAVID I. SPIVAK Remark 2.2.4. We have taken the perspective that W is an operad. One might more naturally think of W as the underlying operad of a symmetric monoidal category whose objects are again black boxes and whose morphisms are again wiring diagrams, though now a morphism connects a single internal domain black box to the external codomain black box. From this perspective one should merge the many isolated black boxes occurring in the domain of a multicategory wiring diagram into a single black box as the domain of the monoidal category wiring diagram. Though mathematically equivalent and though we make use of this perspective in the course of our proofs, it is somewhat unnatural to perform this grouping in applications. For example, though it makes some sense to view ourselves writing this paper and you reading this paper as black boxes inside a single “information conveying” wiring diagram it would be rather strange to conglomerate all of our collective inputs and outputs so that we become a single metainformation entity. For reasons of this sort we choose to take the perspective of the underlying operad rather than of a monoidal category. On the other hand, the notation of monoidal categories is convenient, so we introduce it here. Given a finite set n and an n-indexed set of objects Y : n → Ob(W), we discussed in (6) what should be seen as a tensor product O Y (i) = (∐i∈n in(Y (i)), ∐i∈n out(Y (i)), vset), i∈n which we write simply as Y = (in(Y ), out(Y ), vset). Similarly, given an n-indexed set of morphisms φi : Xi → Y (i) in W, we can form their tensor product O O O Y (i), Xi → φi : i∈n i∈n i∈n which we write simply as φ : X → Y , in a similar way. That is, we form a set of delay nodes DNφ = ∐i∈n DNφi , supplies Spφ = ∐i∈n Spφi , demands Dmφ = ∐i∈n Dmφi , and a supplier assignment sφ = ∐i∈n sφi , all by taking the obvious disjoint unions. Example 2.2.5. In the example below, we see a big box with three little boxes inside, and we see many wires with arrowheads placed throughout. It is a picture of a wiring diagram φ : (X1 , X2 , X3 ) → Y . The big box can be viewed as Y , which has some number of input and output wires; however, when we see the big box as a container of the little boxes wired together, we are actually seeing the morphism φ. φ : (X1 , X2 , X3 ) → Y flour sugar salt milk eggs X1 dry mix X3 cookie batter wet mix X2 egg yolks We aim to explain our terminology of demand and supply, terms which interpret the organization forced on us by the mathematics. Each wire has a demand side and a supply side; when there are no feedback loops, as in the picture above, supplies are on the left side of the wire and demands are to the right, but this is not always the case. Instead, the distinction to make is whether an arrowhead is entering the big box or leaving it: those that enter the big box are supplies to φ, and those that are leaving the big box are demands upon φ. The five left-most arrowheads are entering the big box, so flour, sugar, etc. are being supplied. But flour, sugar, THE OPERAD OF TEMPORAL WIRING DIAGRAMS 11 and salt are demands when they leave the big box to enter X1 . Counting, one finds 9 supply wires and 9 demand wires (though the equality of these numbers is just a coincidence due to the fact that no wire splits or is wasted). Identity morphisms are identity supplier assignments. Let Z = (in(Z), out(Z), vset). The identity wiring diagram idZ : Z → Z might be drawn like this: Z Z Even though the interior box is of a different size than the exterior box, the way they are wired together is as straightforward as possible. Announcement 2.2.6 (Identity morphisms in W). Let Z = (in(Z), out(Z), vsetZ ). The identity wiring diagram idZ : Z → Z has DNidZ = ∅ with the unique function vset : ∅ → Ob(Set), so that DmidZ = out(Z) ∐ in(Z) and SpidZ = in(Z) ∐ out(Z). The supplier assignment sidZ : SpidZ → DmidZ is given by the identity function, which satisfies the noninstantaneity requirement. ♦ Composition of morphisms is achieved by removing intermediary boxes and associated arrowheads. We are interested in substituting a wiring diagram into each black box of a wiring diagram, to produce a more detailed wiring diagram. The basic picture to have in mind is the following: φ1 ψ φ2 ω = ψ ◦ (φ1 , φ2 ) 12 DYLAN RUPEL AND DAVID I. SPIVAK On the top we see a wiring diagram ψ in which each internal box, say Y (1) and Y (2), has a corresponding wiring diagram φ1 and φ2 respectively. Dropping them into place and then removing the intermediary boxes leaves a single wiring diagram ω. One can see that every input of Y (i) plays a dual role. Indeed, it is a demand from the perspective of ψ, and it is a supply from the perspective of φi . Similarly, every output of Y (i) plays a dual role as supply in ψ and demand in φi . In Announcement 2.2.8 we will provide the composition formula for W. Namely, we will be given morphisms φi : Xi → Y (i) and ψ : Y → Z. Each of these has N its own delay nodes, DNφi and DNψ as well as its own supplier assignments. Write φ = i φi : X → Y as in Remark 2.2.4. For the reader’s convenience, we now summarize the demands and supplies for each of the given morphisms φi : Xi → Y (i) and ψ : Y → Z, as well as their (not-yet defined) composition ω : X → Z. Let DNω = DNφ ∐ DNψ . (7) Morphism φi φ ψ ω Summary of notation for composition in W Dm− Sp− out(Y (i)) ∐ in(Xi ) ∐ DNφi in(Y (i)) ∐ out(Xi ) ∐ DNφi out(Y ) ∐ in(X) ∐ DNφ in(Y ) ∐ out(X) ∐ DNφ out(Z) ∐ in(Y ) ∐ DNψ in(Z) ∐ out(Y ) ∐ DNψ out(Z) ∐ in(X) ∐ DNω in(Z) ∐ out(X) ∐ DNω φ ψ Lemma 2.2.7. Suppose given morphisms X − → Y and Y − → Z in W, as above. That is, we are given sets of delay nodes, DNφ and DNψ , as well as supplier assignments sφ : Dmφ → Spφ sψ : Dmψ → Spψ and each of which is subject to a non-instantaneity requirement, (8) sφ out(Y ) ⊆ out(X) ∐ DNφ and sψ out(Z) ⊆ out(Y ) ∐ DNψ . Let sω be as in Table 7. It follows that the diagram below is a pushout h Spφ O x / Spω O g f in(Y ) ∐ out(Y ) / Spψ e where (9) e = sψ in(Y ) ∐ idout(Y ) f = idin(Z) ∐ sφ out(Y ) g = idin(Y ) ∐ sφ out(Y ) h = (f ◦ sψ ) in(Y ) ∐ idDNψ ∐ idout(X) ∐ idDNφ . Moreover, each of e, f, g, and h commute with the appropriate functions vset. Proof. We first show that the diagram commutes; here are the calculations on each component: f ◦e f ◦e in(Y ) = f ◦ sψ out(Y ) = sφ in(Y ) out(Y ) =h◦g =h◦g in(Y ) out(Y ) . THE OPERAD OF TEMPORAL WIRING DIAGRAMS 13 We now show that the diagram is a pushout. Suppose given a set Q and a commutative solid-arrow diagram (i.e. with h′ ◦ g = f ′ ◦ e): ❦/5 Q h′ ❦❦ J ❦ ❦ ❦ ❦α ❦ ❦ h / in(Z) ∐ out(X) ∐ DNφ ∐ DNψ in(Y ) ∐ out(X) ∐ DNφ O O x g f in(Y ) ∐ out(Y ) f′ / in(Z) ∐ out(Y ) ∐ DNψ e Looking at components on which f and h are identities, we see that if we want the equations α ◦ f = f ′ and α ◦ h = h′ to hold, there is at most one way to define α : Spω → Q. Namely, α := f ′ in(Z)∐DNψ ∐ h′ out(X)∐DNφ . To see that this definition works, it remains to check that α ◦ f α◦h in(Y ) =h ′ in(Y ) α◦f out(Y ) = f′ out(Y ) and that . For the first we use a non-instantaneity requirement (8) to calculate: out(Y ) = α ◦ sφ out(Y ) =α out(X)∐DNφ ◦ sφ out(Y ) ′ = h ◦ sφ out(Y ) ′ =h ◦g out(Y ) = f′ ◦ e out(Y ) = f′ out(Y ) Now we have shown that α ◦ f = f ′ and the second calculation follows: α◦h in(Y ) = α ◦ f ◦ sψ in(Y ) = f ′ ◦ sψ in(Y ) = f′ ◦ e in(Y ) = h′ ◦ g in(Y ) = h′ in(Y ) Each of e, f, g, h commute with the respective functions vset because each is built solely out of identity functions and supplier assignments. This completes the proof.  Announcement 2.2.8 (Composition formula for W). Let m, n ∈ Ob(Fin) be finite sets and let t : m → n be a function. Let Z ∈ Ob(W) be a black box, let Y : n → Ob(O) be an n-indexed set of black boxes, and let X : m → Ob(O) be an m-indexed set of black boxes. For each element i ∈ n, write mi := t−1 (i) for the pre-image of i under t, and write Xi = X mi : mi → Ob(O) for the restriction of X to mi . Then the composition formula Y Wmi (Xi ; Y (i)) −→ Wm (X; Z), ◦ : Wn (Y ; Z) × i∈n is defined as follows. Suppose that we N are given morphisms φi : Xi → Y (i) for each i ∈ n, which we gather into a morphism φ = i φi : X → Y as in Remark 2.2.4, and that we are also given a morphism ψ : Y → Z. Then we have finite sets of delay nodes DNφ and DNψ , and supplier assignments sφ : Dmφ → Spφ and sψ : Dmψ → Spψ as in Announcement 2.2.3. We are tasked with defining a morphism ω := ψ ◦ φ : X → Z. The set of demand wires and supply wires for ω are given in Table (7). Thus our job is to define a set DNω and a supplier assignment sω : Dmω → Spω . We put DNω = DNφ ∐ DNψ . It suffices to find a function sω : out(Z) ∐ in(X) ∐ DNω −→ in(Z) ∐ out(X) ∐ DNω , 14 DYLAN RUPEL AND DAVID I. SPIVAK which satisfies the two requirements of being a supplier assignment. We first define the function by making use of the following diagram, where the pushout is as in Lemma 2.2.7: sφ in(X) ∐ DNφ (10) in(X)∐DNφ h / Spφ O x g / Spω O f in(Y ) ∐ out(Y ) e / Spψ O sψ out(Z)∐DNψ out(Z) ∐ DNψ Thus we can define a function sω = h ◦ sφ (11) in(X)∐DNφ ∐ f ◦ sψ out(Z)∐DNψ . We need to show that sω satisfies the two requirements of being a supplier assignment (see Announcement 2.2.3). (1) The fact that sω commutes with the appropriate functions vset follows from the fact that sφ , sψ , f, and h do so (by Lemma 2.2.7). (2) The fact that the non-instantaneity requirement holds for sω , i.e. that sω (out(Z)) ⊆ out(X) ∐ DNω , follows from the fact that it holds for sψ and sψ (see (8)), as follows. sω (out(Z)) = f ◦ sψ (out(Z)) ⊆ f (out(Y ) ∐ DNψ ) = sφ (out(Y )) ∐ DNψ ⊆ out(X) ∐ DNφ ∐ DNψ = out(X) ∐ DNω . ♦ 2.3. Running example to ground ideas and notation regarding W. In this section we will discuss a few objects of W (i.e. black boxes), a couple morphisms of W (i.e. wiring diagrams), and a composition of morphisms. We showed objects and morphisms in more generality above (see Examples 2.2.2 and 2.2.5). Here we concentrate on a simple case, which we will take up again in Section 3.4 and which will eventually result in a propagator that outputs the Fibonacci sequence. First, we draw three objects, X, Y, Z ∈ Ob(W). aX bX X Y cX aY Z cY cZ (12) These objects are not complete until the pointed sets associated to each wire are specified. Let N := (N, 1) be the set of natural numbers with basepoint 1, and put vset(aX ) = vset(bX ) = vset(cX ) = vset(aY ) = vset(cY ) = vset(cZ ) = N. THE OPERAD OF TEMPORAL WIRING DIAGRAMS 15 Now we draw two morphisms, i.e. wiring diagrams, φ : X → Y and ψ : Y → Z: aY X− →Y φ Y − →Z Y Z aX ψ cX X cY Y aY cY cZ dψ bX (13) To clarify the notion of inputs, outputs, supplies, and demands, we provide two tables that lay out those sets in the case of (13). Objects shown above Object in(−) out(−) X {aX , bX } {cX } Y {aY } {cY } Z {} {cZ } Morphisms shown above Morphism DN− Dm− Sp− φ {} {cY , aX , bX } {aY , cX } ψ {dψ } {cZ , aY , dψ } {cY , dψ } To specify the morphism φ : X → Y (respectively ψ : Y → Z), we are required not only to provide a set of delay nodes DNφ , which we said was DNφ = ∅ (respectively, DNψ = {dψ }), but also a supplier assignment function sφ : Dmφ → Spφ (resp., sψ : Dmψ → Spψ ). Looking at the picture of φ (resp. ψ) above, the reader can trace backward to see how every demand wire is attached to some supply wire. Thus, the supplier assignment sφ for φ : X → Y is cY 7→ cX , aX 7→ aY , bX 7→ cX , and the supplier assignment sψ for ψ : Y → Z is cZ 7→ dψ , aY 7→ dψ , dψ 7→ cY . We now move on to the composition of ψ and φ. The idea is that we “plug the φ diagram into the Y -box of the ψ diagram, then erase the Y -box”. We follow this in two steps below: on the left, we shrink down a copy of φ and fit it into the Y -box of ψ. On the right, we erase the Y -box: ψ φ ψ◦φ X− →Z →Y − X −−→ Z Z Z Y X X The pushout (10) ensures that wires of Y connect wires inside (i.e. from φ) to wires outside (i.e. from ψ). In other words, when we erase box Y , we do not erase the connections it made for us. We compute the pushout of the diagram aY 7→aY , cY 7→cX aY 7→dψ , cY 7→cY {aY , cX } ←−−−−−−−−−−− {aY , cY } −−−−−−−−−−−→ {cY , dψ }, 16 DYLAN RUPEL AND DAVID I. SPIVAK defining Spω , to be isomorphic to {dψ , cX }. The supplier assignment sω : Dmω = {cZ , aX , bX , dψ } → {dψ , cZ } = Spω is given by (14) cZ 7→ dψ , aX 7→ dψ , bX 7→ cX , dψ 7→ cX . We take this example up again in Section 3.4, where we show that installing a “plus” function into box X yields the Fibonacci sequence. 2.4. Proof that the operad requirements are satisfied by W. We need to show that the announced operad W satisfies the requirements set out by Definition 2.1.2. There are two such requirements: the first says that composing with the identity morphism has no effect, and the second says that composition is associative. Proposition 2.4.1. The identity law holds for the announced structure of W. Proof. Let X1 , . . . , Xn and Y be black boxes and let φ : X1 , . . . , Xn → Y be a morphism. We need to show that the following equations hold: ? φ ◦ (idx1 , . . . , idxn ) = φ ? idy ◦ φ = φ. and We are given a set DNφ and a function vset : DNφ → Ob(Set). Let idX = form in(X) and out(X) as in Remark 2.2.4. Thus we have Spφ = in(Y ) ∐ out(X) ∐ DNφ and N i∈n idXi , and Dmφ = out(Y ) ∐ in(X) ∐ DNφ and a supplier assignment sφ : Dmφ → Spφ . For each i ∈ n we have SpidXi = DmidXi , and the supplier assignments are the identity, so we have SpidX = DmidX = in(X) ∐ out(X) The supplier assignment sidX is the identity function. Similarly, SpidY = DmidY = in(Y ) ∐ out(Y ), and the supplier assignment sidY is the identity function. Let ω = φ ◦ (idX1 , . . . , idXn ) and ω ′ = idY ◦ φ. Then the relevant pushouts become id in(X) in(X) sφ in(X)∐id / Spid X out(X) x / Spω O / Spφ O in(X) ∐ out(X) sφ out(Y )∐DNφ out(Y ) ∐ DNφ sφ in(X) ∐ DNφ in(X)∐DNφ / Spφ O x / Spω′ O id in(Y ) ∐ out(Y ) in(Y ) ∐sφ SpidY O id out(Y ) out(Y ) out(Y ) THE OPERAD OF TEMPORAL WIRING DIAGRAMS 17 The pushout of an isomorphism is an isomorphism so we have isomorphisms Spφ  Spω and Spφ  Spω′ . 4 In both the case of ω and ω ′ , one checks using (9) that the induced supplier assignments are also in agreement (up to isomorphism), sω = sφ = sω′ .  Proposition 2.4.2. The associativity law holds for the announced structure of W. Proof. Suppose we are given morphisms τ : W → X, φ : X → Y and ψ : Y → Z. We must check that (ψ ◦ φ) ◦ τ = ψ ◦ (φ ◦ τ ). With notation as in Lemma 2.2.7, pushout square defining φ ◦ τ and then ψ ◦ (φ ◦ τ ) are these: SpO τ hφ,τ x / Spφ◦τ O gφ,τ eφ,τ / Spψ◦(φ◦τ ) O x gψ,φ◦τ fφ,τ in(X) ∐ out(X) hψ,φ◦τ Spφ◦τ O / Spφ fψ,φ◦τ in(Y ) ∐ out(Y ) eψ,φ◦τ / Spψ whereas the pushout square defining ψ ◦ φ and then (ψ ◦ φ) ◦ τ are these: Spφ O hψ,φ x gψ,φ / Spψ◦φ O eψ,φ / Sp(ψ◦φ)◦τ O x gψ◦φ,τ fψ,φ in(Y ) ∐ out(Y ) hψ◦φ,τ SpO τ / Spψ fψ◦φ,τ in(X) ∐ out(X) eψ◦φ,τ / Spψ◦φ One checks directly from the formulas (9) that eψ◦φ,τ = hψ,φ ◦ eφ,τ as functions in(X) ∐ out(X) → Spψ◦φ , and that gψ,φ◦τ = fφ,τ ◦ gψ,φ as functions in(Y ) ∐ out(Y ) → Spφ◦τ . We combine them into the following pushout diagram: SpO τ hφ,τ x gφ,τ in(X) ∐ out(X) / Spφ◦τ O hψ,φ◦τ x / Spψ◦φ◦τ O fφ,τ eφ,τ / Spφ O fψ◦φ,τ hψ,φ x / Spψ◦φ O gψ,φ in(Y ) ∐ out(Y ) fψ,φ eψ,φ / Spψ The pasting lemma for pushout squares ensures that the set labeled Spψ◦φ◦τ is isomorphic to Spψ◦(φ◦τ ) and to Sp(ψ◦φ)◦τ , so these are indeed isomorphic to each other. It is also easy to check using the formulas provided in (11) and (9) that the supplier assignments Dmψ◦φ◦τ = out(Z) ∐ in(W ) ∐ DNτ ∐ DNφ ∐ DNψ −→ Spψ◦φ◦τ agree regardless of the order of composition. This proves the result.  4Note that a morphism (e.g. ω) in W are defined only up to isomorphism class of tuples (DN , vset, s ), see ω ω Announcement 2.2.3. 18 DYLAN RUPEL AND DAVID I. SPIVAK 3. P, the algebra of propagators on W In this section we will introduce our algebra of propagators on W. This is where form meets function: the form called “black box” is a placeholder for a propagator, i.e. a function, that carries input streams to output streams, and the form called “wiring diagram” is a placeholder for a circuit that links propagators together to form a larger propagator. To formalize these ideas we introduce the mathematical notion of operad algebra in Section 3.1. In Section 3.2 we discuss some preliminaries on lists and streams, and define our notion of historical propagator. In Section 3.3 we announce our algebra of these propagators and in Section 3.4 we ground it in our running example. Finally in Section 3.5 we prove that the announced structure really satisfies the requirements of being an algebra. 3.1. Definition and basic examples of algebras. In this section we give the formal definition for algebras over an operad. Definition 3.1.1. Let O be an operad. An O-algebra, denoted F : O → Sets, is defined as follows: One announces some constituents (A. map on objects, B. map on morphisms) and proves that they satisfy some requirements (1. identity law, 2. composition law). Specifically, A. one announces a function Ob(F ) : Ob(O) → Ob(Sets). B. for each object y ∈ Ob(O), finite set n ∈ Ob(Fin), and n-indexed set of objects x : n → Ob(O), one announces a function Fn : On (x; y) → HomSets (F x; F y). As in B. above, we often denote Ob(F ), and also each Fn , simply by F . These constituents (A,B) must satisfy the following requirements: 1. For each object x ∈ Ob(O), the equation F (idx ) = idF x holds. 2. Let s : m → n be a morphism in Fin. Let z ∈ Ob(O) be an object, let y : n → Ob(O) be an n-indexed set of objects, and let x : m → Ob(O) be an m-indexed set of objects. Then, with notation as in Definition 2.1.2, the following diagram of sets commutes: Q ◦ / Om (x; z) On (y; z) × i∈n Omi (xi ; y(i)) (15) F F HomSets (F y; F z) × Q  i∈n HomSets (F xi ; F y(i)) ◦  / HomSets (F x; F z) Example 3.1.2. Let E be the commutative operad of Example 2.1.5. An E-algebra S : E → Sets consists of a set M ∈ Ob(Set), and for each natural number n ∈ N a morphism µn : M n → M . It is not hard to see that, together, the morphism µ2 : M × M → M and the element µ0 : {∗} → M give M the structure of a commutative monoid. Indeed, the associativity and unit axioms are encoded in the axioms for operads and their morphisms. The commutativity of multiplication arises by applying the commutative diagram (15) in the case s : {1, 2} → {1, 2} is the non-identity bijection, as discussed in Remark 2.1.3. 3.2. Lists, streams, and historical propagators. In this section we discuss some background on lists. We also develop our notion of historical propagator, which formalizes the idea that a machine’s output at time t0 can depend only on what has happened previously, i.e. for time t < t0 . While strictly not necessary for the development of this paper, we also discuss the relation of historical propagators to streams. Given a set S, an S-list is a pair (t, ℓ), where t ∈ N is a natural number and ℓ : {1, 2, . . . , t} → S is a function. We denote the set of S-lists by List(S). We call t the length of the list; in THE OPERAD OF TEMPORAL WIRING DIAGRAMS 19 particular a list may be empty because we may have t = 0. Note that there is a canonical bijection a S t. List(S)  t∈N We sometimes denote a list simply by ℓ and write |ℓ| to denote its length; that is we have the component projection |·| : List(A) → N. We typically write-out an S-list as ℓ = [ℓ(1), ℓ(2), . . . , ℓ(t)], where each ℓ(i) ∈ S. We denote the empty list by [ ]. Given a function f : S → S ′ , there is an induced function List(f ) : List(S) → List(S ′ ) sending (t, ℓ) to (t, f ◦ ℓ); in the parlance of computer science List(f ) is the function that “maps f over Q ℓ”. Given sets X1 , . . . , Xk ∈ Ob(Set), an element in List( 1≤i≤k Xi ) is a list of k-tuples. Given sets A and B there is a bijection   : List(A) ×N List(B) −−−→ List(A × B), |·| |·| where on the left we have formed the fiber product of the diagram List(A) −→ N ←− List(B). We call this bijection zipwith, following the terminology from modern functional programming languages. The idea is that an A-list ℓA can be combined with a B-list ℓB , as long as they have the same length |ℓA | = |ℓB |; the result will be an (A × B)-list ℓA  ℓB again of the same length. We will usually abuse this distinction and freely identify List(A × B)  List(A) ×N List(B) with its image in List(A) × List(B). For example, we may consider the N × N-list [(1, 2), (3, 4), (5, 6)] = [1, 3, 5]  [2, 4, 6] as an element of List(N) × List(N). Hopefully this will not cause confusion. Let List≥1 (S) ⊆ List(S) denote the set ∐t≥1 S t . We write ∂S : List≥1 (S) → List(S) to denote the function that drops off the last entry. More precisely, for any integer t ≥ 1 if we consider ℓ as a function ℓ : {1, 2, . . . , t} → S, then the list ∂S ℓ is given by pre-composition with the subset consisting of the first t − 1 elements, ℓ {1, 2, . . . , t − 1} ֒→ {1, 2, . . . , t} − → S. For example we have ∂[0, 1, 4, 9, 16] = [0, 1, 4, 9]. Definition 3.2.1. Let R, S be pointed sets and let n ∈ N. A n-historical propagator f from R to S is a function f : List(R) → List(S) satisfying the following conditions: (1) If a list ℓ ∈ List(R) has length |ℓ| = t, then |f (ℓ)| = t + n, (2) If ℓ ∈ List(R) is a list of length t ≥ 1, then ∂S f (ℓ) = f (∂R ℓ). We denote the set of n-historical propagators from R to S by Histn (R, S). If f is n-historical for some n ≥ 0 we say that f is historical. We usually drop the subscript from the symbol ∂− , writing e.g. ∂f (ℓ) = f (∂ℓ). Example 3.2.2. Let S be a pointed set and let n ∈ N be a natural number. Define an n-historical propagator δ n ∈ Histn (S, S) as follows for ℓ ∈ List(S): ( ∗ if 1 ≤ i ≤ n δ n (ℓ)(i) = ℓ(i − n) if n + 1 ≤ i ≤ t + n We call δ n the n-moment delay function. For example if n = 3, S = {a, b, c, d} ∐ {∗}, and ℓ = [a, a, b, ∗, d] ∈ S 5 then δ 3 (S) = [∗, ∗, ∗, a, a, b, ∗, d] ∈ S 8 . The following Lemma describes the behavior of historical functions. 20 DYLAN RUPEL AND DAVID I. SPIVAK Lemma 3.2.3. Let S, S ′ , S ′′ , T, T ′ ∈ Set∗ be pointed sets. (1) Let f : S → T be a function. The induced function List(f ) : List(S) → List(T ) is 0-historical. (2) Given n-historical propagators q ∈ Histn (S, S ′ ) and r ∈ Histn (T, T ′ ), there is an induced n-historical propagator q × r ∈ Histn (S × T, S ′ × T ′ ). (3) Given q ∈ Histm (S, S ′ ) and q ′ ∈ Histn (S ′ , S ′′ ), then q ′ ◦ q : List(S) → List(S ′′ ) is (m + n)-historical. (4) If n ≥ 1 is an integer and q ∈ Histn (S, S ′ ) is n-historical then ∂q : List(S) → List(S ′ ) is (n − 1)-historical. Proof. We show each in turn. (1) Let ℓ ∈ List(S) be a list of length t. Clearly, List(f ) sends ℓ to a list of length t. If t ≥ 1 then the fact that ∂List(f )(ℓ) = List(f )(∂ℓ) follows by associativity of composition in Set. That is, List(f )(ℓ) is the right-hand composition and ∂ℓ is the left-hand composition below: ℓ f {1, . . . , t − 1} ֒→ {1, . . . , t} − →S− → T. q×r (2) On the length t component we use the function (S × T )t = S t × T t −−→ S t+n × T t+n = (S × T )t+n . As necessary, we have ∂ ◦ (q × r) = ∂q × ∂r = q∂ × r∂ = (q × r) ◦ ∂. (3) This is straightforward; for example the second condition is checked ∂q ′ (q(ℓ)) = q ′ (∂q(ℓ)) = q ′ (q(∂ℓ)). (4) On lengths we indeed have |∂q(ℓ)| = |q(ℓ)| − 1 = |ℓ| + n − 1. If |ℓ| = t ≥ 1 then ∂(∂q)(ℓ) = ∂(∂q(ℓ)) = ∂q(∂ℓ) because q is historical.  Definition 3.2.4. Let S be a pointed set. An S-stream is a function σ : N≥1 → S. We denote the set of S-streams by Strm(S). For any natural number t ∈ N, let σ [1,t] ∈ List(S) denote the list of length t corresponding σ → S and call it the t-restriction of S. to the composite {1, 2, . . . , t} ֒→ N≥1 − Lemma 3.2.5. Let S be a pointed set, let {∗} be a pointed set with one element, and let n ∈ N be a natural number. There is a bijection  Histn ({∗}, S) − → Strm(S). Proof. For any natural number t ∈ N, let t = {1, 2, . . . , t} ∈ Ob(Set). Let [N] be the poset (considered as a category) with objects {t | t ∈ N}, ordered by inclusion of subsets. For any n ∈ N there is a functor [N] → Set sending t ∈ Ob([N]) to {1, 2, . . . , t + n} ∈ Ob(Set). For any n ∈ N, there is a bijection N  colimt∈[N] {1, 2, . . . , t + n}. Thus we have a bijection Strm(S) = HomSet (N≥1 , S)  lim HomSet ({1, 2, . . . , t + n}, S). t∈[N] On the other hand, an n-historical function f : List({∗}) → List(S) acts as follows. For each t ∈ N and list [∗, . . . , ∗t ] of length t, it assigns a list f ([∗, . . . , ∗t ]) ∈ List(S) of length t + n, i.e. a function {1, . . . , t + n} → S, such that f ([∗, . . . , ∗t−1 ]) is the restriction to the subset {1, . . . , t + n − 1}. The fact that these notions agree follows from the construction of limits in the category Set.  THE OPERAD OF TEMPORAL WIRING DIAGRAMS 21 Below we define an awkward-sounding notion of n-historical stream propagator. The idea is that a function carrying streams to streams is n-historical if, for all t ∈ N, its output up to time t + n depends only on its input up to time t. In Proposition 3.2.7 we show that this notion of historicality for streams is equivalent to the notion for lists given in Definition 3.2.1. Definition 3.2.6. Let S and T be pointed sets, and let n ∈ N be a natural number. A function f : Strm(S) → Strm(T ) is called an n-historical stream propagator if, given any natural number t ∈ N and any two streams σ, σ ′ ∈ Strm(S), if σ [1,t] = σ ′ [1,t] then f (σ) [1,t+n] = f (σ ′ ) [1,t+n] . Let Histnstrm (S, T ) denote the set of n-historical stream propagators Strm(S) → Strm(T ). Proposition 3.2.7. Let S and T be pointed sets. There is a bijection  Histn (S, T ) − → Histnstrm (S, T ). Proof. We construct two functions α : Histn (S, T ) → Histnstrm (S, T ) and β : Histnstrm (S, T ) → Histn (S, T ) that are mutually inverse. Given an n-historical function f : List(S) → List(T ) and a stream σ ∈ Strm(S), define the stream α(f )(σ) : N≥1 → T to be the function whose (t + n)-restriction (for any t ∈ N) is given by α(f )(σ) [1,t+n] = f (σ [1,t] ). Because f is historical, this construction is well defined. Given an n-historical stream propagator F : Strm(S) → Strm(T ) and a list ℓ ∈ List(S) of length |ℓ| = t, let ℓ∗ ∈ Strm(S) denote the stream N≥1 → S given on i ∈ N≥1 by ( ℓ(i) if 1 ≤ i ≤ t ℓ∗ (i) = ∗ if i ≥ t + 1. Now define the list β(F )(ℓ) ∈ List(T ) by β(F )(ℓ) = F (ℓ∗ ) One checks directly that for all F ∈ f ∈ Histn (S, T ) we have β ◦ α(f ) = f . . [1,t+n] Histnstrm (S, T ) we have α ◦ β(F ) = F and that for all  The above work shows that the notion of historical propagator is the same whether one considers it as acting on lists or on streams. Throughout the rest of this paper we work solely with the list version. However, we sometimes say the word “stream” (e.g. “a propagator takes a stream of inputs and returns a stream of outputs”) for the image it evokes. 3.3. The announced structure of the propagator algebra P. In this section we will announce the structure of our W-algebra of propagators, which we call P. That is, we must specify • the set P(Y ) of allowable “fillers” for each black box Y ∈ Ob(W), • how a wiring diagram ψ : Y1 , . . . , Yn → Z and a filler for each Yi serves to produce a filler for Z. In this section we will explain in words and then formally announce mathematical definitions. In Section 2.4 we will prove that the announced structure has the required properties. As mentioned above, the idea is that each black box is a placeholder for (i.e. can be filled with) those propagators which carry the specified local input streams to the specified local output streams. Each wiring diagram with propagators installed in each interior black box will constitute a new propagator for the exterior black box, which carries the specified global input 22 DYLAN RUPEL AND DAVID I. SPIVAK streams to the specified global output streams. We now go into more detail and make these ideas precise. Black boxes are filled by historical propagators. Let Z = (in(Z), out(Z), vset) be an object in W. Recall that each element w ∈ in(Z) is called an input wire, which carries a set vset(w) of possible values, and that element w′ ∈ out(Z) is called an output wire, which also carries a set vset(w′ ) of possible values. This terminology is suggestive of a machine, which we call a historical propagator (or propagator for short), which takes a list of values on each input wire, processes it somehow, and emits a list of values on each output wire. The propagator’s output at time t0 can depend on the input it received for time t < t0 , but not on input that arrives later. Announcement 3.3.1 (P on objects). Let Z = (in(Z), out(Z), vset) be an object in W. For any subset I ⊆ in(Z) ∐ out(Z) we define Y vsetI = vset(i). i∈I In particular, if I = ∅ then vsetI is a one-element set. We define P(Z) ∈ Ob(Set) to be the set of 1-historical propagators of type Z, P(Z) := Hist1 (vsetin(Z) , vsetout(Z) ). ♦ Consider the propagator below, which has one input wire and one output wire, say both carrying integers. “Σ” The name “Σ” suggests that this propagator takes a list of integers and returns their running total. But for it to be 1-historical, its input up to time t determines its output up to time t + 1. Thus for example it might send an input list ℓ := [1, 3, 5, 7, 10] of length 5 to the output list “Σ”(ℓ) = [0, 1, 4, 9, 16, 26] of length 6. Remark 3.3.2. As in Remark 2.2.4 the following notation is convenient. Given a finite set N Y n ∈ Ob(Fin) and black boxes Yi ∈ Ob(W) for i ∈ n, we can form Y = i∈n i , with for example in(Y ) = ∐i∈n in(Yi ). Similarly, given N a 1-historical propagator gi ∈ P(Yi ) for each i ∈ n weQcan form a 1-historical propagator g := i∈n gi ∈ Hist1 (vsetin(Y ) , vsetout(Y ) ) simply by g = i∈n gi . Wiring diagrams shuttle value streams between propagators. Let Z ∈ Ob(W) be a black box, let n ∈ Ob(Fin) be a finite set, and let Y : n → Ob(W) be an n-indexed set of black boxes. A morphism ψ : Y → Z in W is little more than a supplier assignment sψ : Dmψ → Spψ . In other words, it connects each demand wire to a supply wire carrying the same set of values. Therefore, if a propagator is installed in each black box Y (i), then ψ tells us how to take each value stream being produced by some propagator and feed it into the various propagators that it supplies. Announcement 3.3.3 (P on morphisms). Let Z ∈ Ob(W) be a black box, let n ∈ Ob(Fin) be a finite set, let Y : n → Ob(W) be an n-indexed set of black boxes, and let ψ : Y → Z be a morphism in W. We must construct a function P(ψ) : P(Y (1)) × · · · × P(Y (n)) → P(Z). THE OPERAD OF TEMPORAL WIRING DIAGRAMS 23 That is, given a historical propagator gi ∈ Hist1 (vsetin(Y (i)) , vsetout(Y (i)) ) for each i ∈ n, we need to produce a historical propagator P(ψ)(g1 , . . . , gn ) ∈ Hist1 (vsetin(Z) , vsetout(Z) ). N Define g ∈ Hist1 (vsetin(Y ) , vsetout(Y ) ) by g := i∈n gi , as in Remark 3.3.2. Let inDmψ = in(Y ) ∐ DNψ and inSpψ = out(Y ) ∐ DNψ , denote the set of internal demands of ψ and the set of internal supplies of ψ, respectively. We will define P(ψ)(g) by way of five helper functions: Sψ ∈ Hist0 (vsetSpψ , vsetDmψ ), Sψ′ ∈ Hist0 (vsetSpψ , vsetinDmψ ), Sψ′′ ∈ Hist0 (vsetinSpψ , vsetout(Z) ), Eψ,g ∈ Hist1 (vsetinDmψ , vsetinSpψ ), Cψ,g ∈ Hist0 (vsetin(Z) , vsetSpψ ), where we will refer to the Sψ , Sψ′ , Sψ′′ as “shuttle”, Eψ,g as “evaluate”, and Cψ,g as “cascade”. We will abbreviate by in(Z) the set List(vsetin(Z) ), and similarly for Spψ , inDmψ , etc. By Announcement 2.2.3, a morphism ψ : Y → Z in W is given by a tuple (DNψ , vset, sψ ), where in particular we remind the reader of a commutative diagram Dmψ ●● ●●vset ●● ●● #  Spψ vset / Set∗ sψ where we require sψ (out(Z)) ⊆ inSpψ . The function sψ : Dmψ → Spψ induces the coordinate projection function πsψ : vsetSpψ → vsetDmψ (see Section 1.2). Applying the functor List gives a 0-historical function (see Lemma 3.2.3), List(πsψ ) which we abbreviate as Sψ : Spψ → Dmψ . This is the function that shuttles a list of tuples from where they are supplied directly along a wire to where they are demanded. We define a commonly-used projection, Sψ′ := πinDmψ ◦ Sψ : Spψ → inDmψ . The purpose of defining the set inDmψ of internal demands above is that the supplier assignment sends out(Z) into it, i.e. we have sψ out(Z) : out(Z) → inSpψ by the non-instantaneity requirement. It induces π : vsetinSpψ → vsetout(Z) . Applying List gives a 0-historical sψ function List(π sψ out(Z) ) which we abbreviate as out(Z) S ′′ : inSpψ → out(Z). Thus S ′ and S ′′ first shuttle from supply lines to all demand lines, and then focus on only a subset of them. Let δψ1 ∈ Hist1 (vsetDNψ , vsetDNψ ) be the 1-moment delay. Note that if DNψ = ∅ then δψ1 : {∗} → {∗} carries no information and can safely be ignored. We now define the remaining helper functions: (16) Eψ,g := (g × δψ1 ), ( [] Cψ,g (ℓ) := (ℓ, Eψ,g ◦ Sψ′ ◦ Cψ,g (∂ℓ)) if |ℓ| = 0 if |ℓ| ≥ 1. 24 DYLAN RUPEL AND DAVID I. SPIVAK The last is an inductive definition, which we can rewrite for |ℓ| ≥ 1 as  Cψ,g = idin(Z) × (Eψ,g ◦ Sψ′ ◦ Cψ,g ◦ ∂) ◦ ∆, where ∆ : in(Z) → in(Z) × in(Z) is the diagonal map. Intuitively it says that a list of length t on the input wires will produces a list of length t on all supply wires. By Lemma 3.2.3 Eψ,g is 1-historical and Cψ,g is 0-historical. We are ready to define the 1-historical function P(ψ)(g) = Sψ′′ ◦ Eψ,g ◦ Sψ′ ◦ Cψ,g . (17) ♦ Remark 3.3.4. The definitions of Sψ′ and Eψ,g above implicitly make use of the “zipwith” functions   : in(Z) ×N inDmψ −−−→ Dmψ and   : in(Y ) ×N DNψ −−−→ inDmψ , respectively. In section 3.5 we will make similar abuses in the calculations; however, when commutative diagrams are given, the zipwith is made “explicit” by writing an equality between products of streams and streams of products when we mean that  should be applied to a product of streams. 3.4. Running example to ground ideas and notation regarding P. In this section we compose elementary morphisms and apply them to a simple “addition” propagator to construct a propagator that outputs the Fibonacci sequence. Let X, Y, Z ∈ Ob(W) and φ : X → Y and ψ : Y → Z be as in (12) and (13). Let N = (N, 1) ∈ Set∗ denote the set of natural numbers with basepoint 1. We recall the shapes of X, Y , and Z here, but draw them with different labels: aX bX “+” “1 + Σ” cX aY “F ib” cY cZ We have replaced the symbol X with the symbol “+ ” because we are about to define an X-shaped propagator “+” ∈ P(X). Given an incoming list of numbers on wire aX and another incoming list of numbers on wire bX , it will create a list of their sums and output that on cX . More precisely, we take “+” : List(N × N ) → List(N ) to be the 1-historical propagator defined as follows. Suppose given a list ℓ ∈ List(N × N ) of length t, say     ℓ = ℓa (1), ℓa (2), . . . , ℓa (t),  ℓb (1), ℓb (2), . . . , ℓb (t) Define “+”(ℓ) ∈ List(N ) to be the list whose nth entry (for 1 ≤ n ≤ t + 1) is ( 1 if n = 1 “+”(ℓ)(n) = ℓa (n − 1) + ℓb (n − 1) if 2 ≤ n ≤ t + 1 So for example “ + ”([4, 5, 6, 7]  [1, 1, 3, 7]) = [1, 5, 6, 9, 14]. We will use only this “+” propagator to build our Fibonacci sequence generator. To do so, we will use wiring diagrams φ and ψ, whose shapes we recall here from (13) above. THE OPERAD OF TEMPORAL WIRING DIAGRAMS “1 + Σ” = P(φ)(“+”) “F ib” = P(ψ)(“1 + Σ”) “1 + Σ” “F ib” aX aY 25 “+” cX cY aY “1 + Σ” cY cZ dψ bX The Y -shaped propagator “1 + Σ” = P(φ)(“+”) ∈ P(Y ) will have the following behavior: given an incoming list of numbers on wire aY , it will return a list of their running totals, plus 1. More precisely “1 + Σ” : List(N ) → List(N ) is the 1-historical propagator defined as follows. Suppose given a list ℓ ∈ List(N ) of length t, say ℓ = [ℓ1 , ℓ2 , . . . , ℓt ]. Then “1 + Σ”(ℓ) will be the list whose nth entry (for 1 ≤ n ≤ t + 1) is (18) “1 + Σ”(ℓ)(n) = 1 + n−1 X ℓi . i=1 But this is not by fiat—it is calculated using the formula given in Announcement 3.3.3. We begin with the following table. Calculating “1 + Σ” ℓ ∈ aY [] [ℓ1 ] [ℓ1 , ℓ2 ] [ℓ1 , ℓ2 , ℓ3 ] [ℓ1 , . . . , ℓt ] Cφ,“+” (ℓ) ∈ {aY , cX } [] [ℓ1 ]  [1] [ℓ1 , ℓ2 ]  [1, 1 + ℓ1 ] [. . . , ℓ3 ]  [. . . , 1 + ℓ1 + ℓ2 ] Pt−1 [. . . , ℓt ]  [. . . , 1 + i=1 ℓi ] Sφ′ Cφ,“+” (ℓ) ∈ {aX , bX } [] [ℓ1 ]  [1] [ℓ1 , ℓ2 ]  [1, 1 + ℓ1 ] [. . . , ℓ3 ]  [. . . , 1 + ℓ1 + ℓ2 ] Pt−1 [. . . , ℓt ]  [. . . , 1 + i=1 ℓi ] Eφ,“+” Sφ′ Cφ,“+” (ℓ) ∈ cX [1] [1, 1 + ℓ1 ] [1, 1 + ℓ1 , 1 + ℓ1 + ℓ2 ] [. . . , 1 + ℓ1 + ℓ2 + ℓ3 ] Pt [. . . , 1 + i=1 ℓi ] where the last row can be established by induction. The ellipses (. . .) in the later boxes indicate that the beginning part of the sequence is repeated from the row above, which is a consequence of the fact that the formulas in Announcement 3.3.3 are historical. We need only calculate “1 + Σ”(ℓ) = P(φ)(“+”)(ℓ) = Sφ′′ ◦ Eφ,“+” ◦ Sφ′ ◦ Cφ,“+” (ℓ) " = 1, 1 + ℓ1 , 1 + ℓ1 + ℓ2 , . . . , 1 + t X i=1 # ℓi , just as in (18). The Z-shaped propagator “F ib” = P(ψ)(“1 + Σ”) ∈ P(Z) will have the following behavior: with no inputs, it will output the Fibonacci sequence “F ib”() = [1, 1, 2, 3, 5, 8, 13 . . .]. Again, this is calculated using the formula given in Announcement 3.3.3. We note first that since in(Z) = ∅ we have vsetin(Z) = {∗}, so in(Z) = List(vsetin(Z) ) = List({∗}). 26 DYLAN RUPEL AND DAVID I. SPIVAK As above we provide a table that shows the calculation given the formula in Announcement 3.3.3. Cψ,“1+Σ” (ℓ) ∈ {cY , dψ } [] [1]  [1] [1, 2]  [1, 1] [1, 2, 3]  [1, 1, 2] [1, 2, 3, 5]  [1, 1, 2, 3] ℓ∈∅ [] [∗] [∗, ∗] [∗, ∗, ∗] [∗, ∗, ∗, ∗] Calculating “F ib” Sψ′ Cψ,“1+Σ” (ℓ) ∈ {aY , dψ } [] [1]  [1] [1, 1]  [1, 2] [1, 1, 2]  [1, 2, 3] [1, 1, 2, 3]  [1, 2, 3, 5] Eψ,“1+Σ” Sψ′ Cψ,“1+Σ” (ℓ) ∈ {cY , dψ }  [1] [1] [1, 2]  [1, 1] [1, 2, 3]  [1, 1, 2] [1, 2, 3, 5]  [1, 1, 2, 3] [1, 2, 3, 5, 8]  [1, 1, 2, 3, 5] In the case of a list ℓ ∈ List({∗}) of length t, we have " “F ib”(n) = P(ψ)(“1 + Σ”)(ℓ) = 1, 1, 2, 3, . . . , 1 + t−2 X i=1 # “F ib”(i) . Thus we have achieved our goal. Note that, while unknown to the authors, the fact that Pt−2 “F ib”(t) = 1 + i=1 “F ib”(i) was known at least as far back as 1891, [Luc]. For us it appeared not by any investigation, but merely by cordoning off part of our original wiring diagram for “F ib”, “F ib” + Above in (14) we computed the supplier assignment for the composition WD, ω := ψ◦φ : X → Z. In case the above tables were unclear, we make one more attempt at explaining how propagators work by showing a sequence of images with values traversing the wires of ω applied to “+”. The wires all start with the basepoint on their supply sides, at which point it is shuttled to the demand sides. It is then processed, again giving values on the supply sides that are again shuttled to the demand sides. This is repeated once more. “F ib”–Supply (iter. 1) + 1 1 “F ib”–Demand (iter. 1) 1 1 + 1 “F ib”–Supply (iter. 2) 1 + 2 1 THE OPERAD OF TEMPORAL WIRING DIAGRAMS “F ib”–Demand (iter. 2) 1 2 “F ib”–Supply (iter. 3) 1 + + 3 27 “F ib”–Demand (iter. 3) 2 2 3 2 + 2 3 One sees the first three elements of the Fibonacci sequence [1, 1, 2], as demanded, emerging from the output wire. 3.5. Proof that the algebra requirements are satisfied by P. Below we prove that P, as announced, satisfies the requirements necessary for it to be a W-algebra. Unfortunately, the proof is quite technical and not very enlightening. Given a composition ω = ψ ◦ φ, there is a correspondence between the wires in ω with the wires in ψ and φ, as laid out in Announcement 2.2.8. The following proof essentially amounts to checking that, under this correspondence, the way Announcement 3.3.3 instructs us to shuttle information along the wires of ω is in agreement with the way it instructs us to shuttle information along the wires of ψ and φ. Theorem 3.5.1. The function P : Ob(W) → Ob(Sets) defined in Announcement 3.3.1 and the function P : W(Y ; Z) → HomSets (P(Y ); P(Z)) given in Announcement 3.3.3 satisfy the requirements for P to be a W-algebra. Proof. We must show that both the identity law and the composition law hold. This will require several technical lemmas, which for the sake of flow we have included within the current proof. We begin with the identity law. Let Z = (in(Z), out(Z), vsetZ ) be an object. The supplier assignment for idZ : Z → Z is given by the identity function id sidZ : out(Z) ∐ in(Z) −−−→ in(Z) ∐ out(Z). Let f ∈ P(Z) = Hist1 (vsetin(Z) , vsetout(Z) ) be a historical propagator. We need to show that P(idZ )(f ) = f . Recall the maps SidZ : SpidZ → DmidZ , EidZ ,f : in(Z) → inSpidZ , ′ Sid : SpidZ → inDmidZ , Z CidZ ,f : in(Z) → SpidZ , ′′ Sid : inSpidZ → out(Z), Z from Announcement 3.3.3, where inSpidZ = out(Z). Lemma 3.5.2. Suppose given a list ℓ ∈ in(Z). We have ( []  CidZ ,f (ℓ) = ℓ, f (∂ℓ) if |ℓ| = 0, if |ℓ| ≥ 1. Proof. We work by induction. The result holds trivially for the empty list. Thus we may assume that the result holds for ∂ℓ (i.e. that CidZ ,f (∂ℓ) = (∂ℓ, f (∂∂ℓ) holds) and deduce that 28 DYLAN RUPEL AND DAVID I. SPIVAK ′ it holds for ℓ. Note that Sid ([ ]) = [ ] and EidZ ,f ([ ]) = f ([ ]). By the formulas (16) we have Z  ′ CidZ ,f (ℓ) = idin(Z) × (EidZ ,f ◦ Sid ◦ CidZ ,f ◦ ∂) ◦ ∆(ℓ) Z  ′ = idin(Z) × (EidZ ,f ◦ Sid ◦ CidZ ,f ◦ ∂) (ℓ, ℓ) Z  ′ = idin(Z) (ℓ), EidZ ,f ◦ Sid ◦ CidZ ,f ◦ ∂(ℓ) Z  ′ (∂ℓ, f (∂∂ℓ)) = ℓ, EidZ ,f ◦ Sid Z  = ℓ, EidZ ,f ◦ πinDmid ◦ SidZ (∂ℓ, f (∂∂ℓ)) Z  = ℓ, EidZ ,f ◦ πinDmid (∂ℓ, f (∂∂ℓ)) Z  = ℓ, EidZ ,f (∂ℓ)  = ℓ, f (∂ℓ) .  Expanding the definition of P(idZ )(f )(ℓ) we now complete the proof that the identity law holds for P: ′ ′′ ◦ CidZ ,f (ℓ) ◦ EidZ ,f ◦ Sid P(idZ )(f )(ℓ) = Sid Z Z ′ ′′ (ℓ, f (∂ℓ)) ◦ EidZ ,f ◦ Sid = Sid Z Z ′′ ◦ EidZ ,f ◦ πinDmid ◦ SidZ (ℓ, f (∂ℓ)) = Sid Z Z ′′ ◦ EidZ ,f ◦ πinDmid (ℓ, f (∂ℓ)) = Sid Z Z ′′ ◦ EidZ ,f (ℓ) = Sid Z  ′′ = SidZ f (ℓ) = f (ℓ). We now move on to the composition law. Let s : m → n be a morphism in Fin. Let Z ∈ Ob(W) be a black box, let Y : n → Ob(W) be an n-indexed set of black boxes, and let x : m → Ob(W) be an m-indexed set of black boxes. We must show that the following diagram of sets commutes: Q ◦W / Wm (X; Z) Wn (Y ; Z) × i∈n Wmi (Xi ; Y (i)) P P  Setsn (P(Y ); P(Z)) × i∈n Setsmi (P(Xi ); P(Y (i))) ◦Sets / Setsm (P(X); P(Z)) N Suppose given ψ : Y → Z and φi : Xi → Y (i) for each i, and let φ = i φi : X → Y . We can trace through the diagram to obtain P(ψ)◦Sets P(φ) and P(ψ◦W φ), both in Setsm (P(X); P(Z))) and we want to show they are equal as functions. From here on, we drop the subscripts on ◦− , i.e. we want to show P(ψ) ◦ P(φ) = P(ψ ◦ φ). Let ω = ψ ◦ φ. An element f ∈ P(X) = Hist1 (vsetin(X) , vsetout(X) ) is a 1-historical propagator, f : in(X) → out(X). We are required to show that the following equation holds in P(Z): Q  (19) ? P(ψ) ◦ P(φ)(f ) = P(ω)(f ). THE OPERAD OF TEMPORAL WIRING DIAGRAMS 29 Expanding using the definition (17) of P(ψ)◦P(φ)(f ) and P(ω)(f ) we see that this translates into proving the commutativity of the following diagram: ′′ Sψ inSpψ O / out(Z) o ′′ Sω inSp O ω Eψ,g Eω,f inDmψ O inDm O ω ? ′ Sψ ′ Sω Cψ,g Spψ o in(Z) Cω,f / Spω where we abbreviated g = P(φ)(f ). To do so, we must prove some technical results (Lemmas 3.5.3, 3.5.4, and 3.5.5) which assert the equality of various demand and supply streams flowing on the composed wiring diagram ω = ψ ◦ φ. The ultimate proof of (19) will be inductive in nature. That is, to prove that the result holds for a nonempty list ℓ of length t ≥ 1, we will assume that it holds for the list ∂ℓ of length t − 1. More precisely, to prove (19) we will need to know the following equality of functions in(Z) → inDmω (20) Sω′ ◦ Cω,f = (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g and this is proven by induction on the length of ℓ ∈ in(Z). The base of the induction is clear after recalling that definition (16) gives Cω,f ([ ]) = [ ], Cφ,f ([ ]) = [ ] and Cψ,g ([ ]) = [ ], and that Sψ′ and s′ω are 0-historical. The next three lemmas carry out the induction step and assume the following induction hypothesis regarding the equality of functions in(Z) → inDmω (21) Sω′ ◦ Cω,f ◦ ∂ = (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g ◦ ∂. Lemma 3.5.3. If we assume that equation (21) holds then the following diagram commutes: in(Z) Cψ,P(φ)(f ) Cω,f / Spω in(Z) × inSpφ × DNψ ′′ id×Sφ ×id  Spψ  in(Z) × out(Y ) × DNψ in other words, we have the following equality between functions in(Z) → Spψ : (22) Cψ,P(φ)(f ) = (id × Sφ′′ × id) ◦ Cω,f . Proof. For convenience we will abbreviate g = P(φ)(f ). It follows from our induction hypothesis (21), the internal square in the following diagram (when composed with (id × ∂) ◦ ∆ : in(Z) → 30 DYLAN RUPEL AND DAVID I. SPIVAK in(Z) × in(Z)) commutes: Cω,f in(Z) ❖❖❖(id×∂)◦∆ ❖❖❖ ❖' id×Cω,f in(Z) × in(Z) id×Cψ,g Cψ,g / / ′ id×Sω in(Z) × Spω  Spψ id×Eψ,g in(Z) × inDmφ × DNψ id×S ′ ×id φ id×Cφ,f ×id  in(Z) × inDmψ  id×Eω,f / in(Z) × inDmω in(Z) × inSpω id×Eφ,f ×δ1 ψ in(Z) × Spψ id×S ′ ψ / Spω in(Z) × in(Y ) × DNψ / O in(Z) × Spφ × DNψ  / in(Z) × inSpφ × DNψ id×S ′′ ×id φ  in(Z) × inSpψ in(Z) × out(Y ) × DNψ The top square and left square commute by definition of Cω,f and Cψ,f respectively, see (16). The square Eω,f = Eφ,f × δψ1 commutes also by definition (16). The commutativity of the bottom-right corner of the diagram translates into the following identity between functions inDmψ → out(Y ) × DNψ : Eψ,P(φ)(f ) = (Sφ′′ × id) ◦ (Eφ,f × δψ1 ) ◦ (Sφ′ × id) ◦ (Cφ,f × id). But this is a direct consequence of the definitions Eψ,P(φ)(f ) = P(φ)(f ) × δψ1 and P(φ)(f ) = Sφ′′ ◦ Eφ,f ◦ Sφ′ ◦ Cφ,f . It follows that the outer square commutes.  Lemma 3.5.4. If we assume that equation (21) holds, then so does the following equality of functions in(Z) → inSpφ : 5 (23) πinSpφ ◦ Cω,f = πinSpφ ◦ Cφ,f ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g . Proof. We will use the following three “forgetful” equations, (24) (25) (26) (27) Eφ,f ◦ πinDmφ ◦ Sω′ = πinSpφ ◦ (Eφ,f × δψ1 ) ◦ Sω′ ,  πinSpφ ◦ Eω,f ◦ Sω′ ◦ Cω,f ◦ ∂ = πinSpφ ◦ idin(Z) × (Eω,f ◦ Sω′ ◦ Cω,f ◦ ∂) ◦ ∆,  Eφ,f ◦ Sφ′ ◦ Cφ,f ◦ ∂ = πinSpφ ◦ idin(Y ) × (Eφ,f ◦ Sφ′ ◦ Cφ,f ◦ ∂) ◦ ∆, Sφ′ ◦ Cφ,f ◦ πin(Y ) = πinDmφ ◦ (Sφ′ × id) ◦ (Cφ,f × id). which are “obvious” in the sense that they are simply a matter of tracking coordinate projections. The proof will go as follows. We apply Eφ,f ◦ πinDmψ to both sides of the assumed equality (21) and simplify. On the left-hand side we use (24) then the fact that by definition we have (28) Eω,f = Eφ,f × δψ1 , then (25), then the definition of Cω,f which we reproduce here: (29)  Cω,f = idin(Z) × (Eω,f ◦ Sω′ ◦ Cω,f ◦ ∂) ◦ ∆ 5It is possible for one to draw a diagram representing this equation as we did in the preceding lemma, however we did not find such a diagram enlightening in this case. THE OPERAD OF TEMPORAL WIRING DIAGRAMS 31 to obtain the following equality of functions in(Z) → inSpφ : Eφ,f ◦ πinDmφ ◦ Sω′ ◦ Cω,f ◦ ∂ =(24) πinSpφ ◦ (Eφ,f × δψ1 ) ◦ Sω′ ◦ Cω,f ◦ ∂ =(28) πinSpφ ◦ Eω,f ◦ Sω′ ◦ Cω,f ◦ ∂  =(25) πinSpφ ◦ idin(Z) × (Eω,f ◦ Sω′ ◦ Cω,f ◦ ∂) ◦ ∆ =(29) πinSpφ ◦ Cω,f . On the right hand side we use (27), then commute the ∂, then apply (26), and then the definition of Cφ,f which we reproduce here:  (30) Cφ,f = idin(Y ) × (Eφ,f ◦ Sφ′ ◦ Cφ,f ◦ ∂) ◦ ∆ to obtain the following equality of functions in(Z) → inSpφ : Eφ,f ◦ πinDmφ ◦ (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g ◦ ∂ =(27) Eφ,f ◦ Sφ′ ◦ Cφ,f ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g ◦ ∂ = Eφ,f ◦ Sφ′ ◦ Cφ,f ◦ ∂ ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g  =(26) πinSpφ ◦ idin(Y ) × (Eφ,f ◦ Sφ′ ◦ Cφ,f ◦ ∂) ◦ ∆ ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g =(30) πinSpφ ◦ Cφ,f ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g . Combining these computations with the induction hypothesis (21) gives the result: πinSpφ ◦ Cω,f = Eφ,f ◦ πinDmφ ◦ Sω′ ◦ Cω,f ◦ ∂ = Eφ,f ◦ πinDmφ ◦ (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g ◦ ∂ = πinSpφ ◦ Cφ,f ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g .  Lemma 3.5.5 (Main Induction Step). If we assume that equation (21), reproduced here (21) Sω′ ◦ Cω,f ◦ ∂ = (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g ◦ ∂, holds, then equation (21) holds without the precomposed ∂, i.e. we have the following equality of functions in(Z) → inDmω : Sω′ ◦ Cω,f = (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g . Proof. To keep the notation from becoming too cluttered we adopt the following convention: an identity map written as the right hand term of a product will always mean idDNψ , while an identity map written as the left hand term of a product will mean one of idin(Y ) , idout(Y ) , idin(Z) , or idout(Z) , which one should be clear from the context. The proof will be by cases, we show for each j ∈ inDmω that  πj ◦ (Sφ′ × id ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g = πj ◦ Sω′ ◦ Cω,f , i.e. we show that the two ways of producing internal demand streams agree by checking wire by wire. Since inDmω = inDmφ ∐ DNψ , there are three main cases to consider: j ∈ DNψ , 32 DYLAN RUPEL AND DAVID I. SPIVAK j ∈ inDmφ with sφ (j) ∈ in(Y ), and j ∈ inDmφ with sφ (j) ∈ inSpφ . We go through these in turn below. Most of the necessary equalities will use that shuttling streams between outputs and inputs does not change the value stream. (1) Suppose j ∈ DNψ . We use Lemma 3.5.3 and the fact that the right hand identity maps are idDNψ to see πj ◦ (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g =(22) πj ◦ (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ (id × Sφ′′ × id) ◦ Cω,f = πj ◦ Sψ′ ◦ (id × Sφ′′ × id) ◦ Cω,f = πsψ (j) ◦ (id × Sφ′′ × id) ◦ Cω,f . (∗) Now there are two cases depending on what has supplied wire j. • Suppose sψ (j) ∈ in(Z) ∐ DNψ . Notice that in this case (11) gives sψ (j) = sω (j). Then (∗) above becomes πsψ (j) ◦ (idin(Z) × Sφ′′ × idDNψ ) ◦ Cω,f = πsψ (j) ◦ Cω,f = πsω (j) ◦ Cω,f = πj ◦ Sω′ ◦ Cω,f . • Suppose sψ (j) ∈ out(Y ). In this case (11) gives sφ ◦ sψ (j) = sω (j). Because Sφ′′ = π : inSpφ → out(Y ), we see that (∗) simplifies as sφ out(Y ) πsψ (j) ◦ (id × Sφ′′ × id) ◦ Cω,f = πsψ (j) ◦ Sφ′′ ◦ πinSpφ ◦ Cω,f = πsφ ◦sψ (j) ◦ Cω,f = πsω (j) ◦ Cω,f = πj ◦ Sω′ ◦ Cω,f . (2) Suppose j ∈ inDmφ and sφ (j) ∈ in(Y ). We will use Lemma 3.5.3 and the equation πj ◦ (Sφ′ × id) = πsφ (j) . We will also use the fact that πsφ (j) ◦ (Cφ,f × id) = πsφ (j) , which holds because sφ (j) ∈ in(Y ) and Cφ,f is the identity on in(Y ). With these in hand we compute: πj ◦ (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g =(22) πj ◦ (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ (id × Sφ′′ × id) ◦ Cω,f = πsφ (j) ◦ (Cφ,f × id) ◦ Sψ′ ◦ (id × Sφ′′ × id) ◦ Cω,f = πsφ (j) ◦ Sψ′ ◦ (id × Sφ′′ × id) ◦ Cω,f , (∗∗) = πsψ ◦sφ (j) ◦ (id × Sφ′′ × id) ◦ Cω,f , There are again two cases to consider depending on what has supplied wire j: • Suppose sψ ◦ sφ (j) ∈ in(Z) ∐ DNψ . Then we get πsψ ◦sφ (j) ◦ (idin(Z) × Sφ′′ × idDNψ ) = πsψ ◦sφ (j) . THE OPERAD OF TEMPORAL WIRING DIAGRAMS 33 Now (11) implies the identity sψ ◦ sφ (j) = sω (j) and thus (∗∗) becomes πsψ ◦sφ (j) ◦ (id × Sφ′′ × id) ◦ Cω,f = πsψ ◦sφ (j) ◦ Cω,f = πsω (j) ◦ Cω,f = πj ◦ Sω′ ◦ Cω,f . • Suppose sψ ◦ sφ (j) ∈ out(Y ). Then notice that by (11) we have sω (j) = sφ ◦ sψ ◦ sφ (j) and (∗∗) simplifies as πsψ ◦sφ (j) ◦ (id × Sφ′′ × id) ◦ Cω,f = πsψ ◦sφ (j) ◦ Sφ′′ ◦ πinSpφ ◦ Cω,f = πsφ ◦sψ ◦sφ (j) ◦ Cω,f = πsω (j) ◦ Cω,f = πj ◦ Sω′ ◦ Cω,f . (3) Suppose j ∈ inDmφ and sφ (j) ∈ inSpφ . As usual we have πj ◦ Sφ′ = πsφ (j) , but noting that vsetj = vsetsφ (j) , the assumptions on j imply that we have πj ◦ Sφ′ = πsφ (j) ◦ πinSpφ . In this case (11) gives sω (j) = sφ (j) and thus by Lemma 3.5.4, πj ◦ (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g = πj ◦ Sφ′ ◦ Cφ,f ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g = πsφ (j) ◦ πinSpφ ◦ Cφ,f ◦ πin(Y ) ◦ Sψ′ ◦ Cψ,g =(23) πsφ (j) ◦ πinSpφ ◦ Cω,f = πsω (j) ◦ Cω,f = πj ◦ Sω′ ◦ Cω,f .  To complete the proof of Theorem 3.5.1 recall that we have been given morphisms φ : X → Y and ψ : Y → Z and ω = ψ ◦ φ in W with notation as in Announcement 2.2.8. These have corresponding supplier assignments sφ , sψ , and sω . Abbreviate g = P(φ)(f ) : in(Y ) → out(Y ). Consider the following diagram of sets: 34 DYLAN RUPEL AND DAVID I. SPIVAK ′′ Sψ inSpψ ◆ O ◆◆◆◆ ◆◆◆ ◆◆◆ Eψ,g out(Y ) × DNψ o O / out(Z) o ′′ Sφ ×id ′′ Sω inSpω ♣♣ O ♣ ♣ ♣ ♣♣♣ ♣♣♣ Eω,f inSpφ × DNψ O 1 g×δψ inDmψ ◆ O ◆◆◆◆ ◆◆◆ ◆◆◆ ′ Sψ Spψ o 1 Eφ,f ×δψ inDmω ♣♣ O ♣ ♣ ♣♣♣ ♣♣♣ ♣ ♣ S ′ ×id Cφ,f ×id ′ / Spφ × DNψ φ / inDmφ × DNψ Sω in(Y ) × DNψ Cψ,g in(Z) Cω,f / Spω Recall that our goal was to show that the outermost square commutes. We will see that each inner square is commutative in the sense that the following equations hold: Sω′′ = Sψ′′ ◦ (Sφ′′ × id) : inSpφ × DNψ −→ out(Z) Eψ,g = g × δψ1 : inDmψ −→ out(Y ) × DNψ g × δψ1 = (Sφ′′ × id) ◦ (Eφ,f × δψ1 ) ◦ (Sφ′ × id) ◦ (Cφ,f × id) : in(Y ) × DNψ → out(Y ) × DNψ Eφ,f × δψ1 = Eω,f : inDmφ × DNψ −→ inSpω Sω′ ◦ Cω,f = (Sφ′ × id) ◦ (Cφ,f × id) ◦ Sψ′ ◦ Cψ,g : in(Z) −→ inDmω The first follows from Lemma 2.2.7, especially (9), and Announcement 2.2.8, especially (11). The next three follow directly from definitions (16). The last equality has been proven in Lemma 3.5.5. It follows that the equation below holds for functions in(Z) −→ out(Z): P(ω)(f ) = Sω′′ ◦ Eω,f ◦ Sω′ ◦ Cω,f = Sψ′′ ◦ Eψ,g ◦ Sψ′ ◦ Cψ,g = P(ψ)(g) = P(ψ) ◦ P(φ)(f ) Indeed, the left-hand equality and the second-to-last equality are by definition of P on morphisms, as given in (17). The second equality is found by a diagram chase using the six equations above.  4. Future work The authors hope that this work can be put to use rather directly in modeling and design applications. The relationship between the operad W and its algebra P is quite explicitly a relationship between form and function. The ability to zoom in and out, i.e. to change levels of abstraction with ease is a facility which we believe is essential to any good theory of the brain, computer programs, cyber-physical systems, etc. Below we will discuss some possibilities for future work. We see three major directions in which to go. The first is to connect this work to other work on wiring diagrams. The second is to consider applications, e.g. to computer science and cognitive neuroscience. The third is to THE OPERAD OF TEMPORAL WIRING DIAGRAMS 35 investigate the notion of dependency, or cause and effect, in our formalism. We discuss these in turn below. 4.1. Connecting to other work on wiring diagrams. While wiring diagrams have been useful in engineering for many years, there are a few mathematical approaches that should connect to our own, including [AADF], [BB], [DL], and [Sp2]. The work by [AADF] studies dynamics inside of strongly connected (transitive) networks of identical units. Their main aim is to relate the dynamics on the network to properties of the underlying network architecture. The underlying network should be viewed as analogous to a morphism ψ in W, while the dynamics lying over the network should be viewed as analogous to the morphism P(ψ). The cells in their networks are considered to have internal states which collude with the inputs to produce the output of a cell. There exists an algebra over W of “propagators with internal states” and a retract from this algebra to P, which should allow the transfer of results of [AADF] to our framework. Arguably one of the main aims of [AADF] is to introduce a notion of inflation for these networks. A careful comparison, see for example [AADF, Figure 15] and [AADF, Figure 29], reveals that their inflation procedure is a special case of the composition of morphisms in W where the black boxes being inserted into a wiring diagram come from a special class called inflations. In [BB], the authors investigate reaction networks and in particular stochastic Petri nets. There, various species (e.g. chemicals or populations) interact in prescribed ways, and the dynamics of their changing populations are studied. A similar but more complex situation is studied in [DL]. Both of these papers work with continuous time processes, whereas we work with discrete time processes. Still, we plan to investigate the relationship between these ideas in the future. The only other place, other than the present paper, where operads are explicitly mentioned in the context of wiring diagrams seems to be [Sp2], where the author studies systems of interacting relations using an operad T . One might think that an operad functor would appropriately relate it to the present operad W, but that does not appear to be the case because of the delay nodes that exist in W but not T . Instead, these two operads need to be compared via a third, in which delay nodes do not occur, but wires are still directed. We hope to make this precise in the future. 4.2. Applications, e.g. to computer science and cognitive neuroscience. The authors’ primary purposes in the above work was to formalize what we considered fundamental principles in the relation of form and function in both computers and brains. On the operad/form level we are speaking of hierarchical chunking; on the algebra/function level we are speaking of historical propagators. One can ask several interesting questions at this point. For example, can we create from W and P a viable computer programming language? We would hope that the propagators given by computable functions are closed in, i.e. form a subalgebra of, P. But perhaps one could ask for more as well. For example, if each transistor in a computer acts like a NOR gate, one could ask whether or not the subalgebra generated by NOR gates is Turing complete. We conjecture that something like this is true. If so, we believe our language will provide a simple, grounded, and useful perspective on the actual operation of computers. There are also many interesting questions on the neuroscience side that motivated this work. These essentially amount to a question of “what”. What is a neuron? What is a brain? What is the relationship between the actions of individual neurons and the brain as a whole? It is easy to imagine that a neuron is simply a black box where we assign certain multisets of neurotransmitters to each input and output, the historical propagators would then record 36 DYLAN RUPEL AND DAVID I. SPIVAK activity patterns of discretized neurons. If this turns out to be the case then the distinction between neuron and brain becomes blurred, each is simply a black box with some specified inputs and outputs. From this perspective the questions of how the activity of individual neurons relates to the activity of a functional brain region or of the entire brain becomes subsumed by the operad formalism where we can think of each as a different choice of chunking within a single (massively complex) wiring diagram representing the connections occurring within an entire brain. Deep questions regarding precisely how the actions of neurons in one part of the brain influence the activity in other areas will rely on the work of neuroscientists’ understanding of the precise wiring pattern of the brain and remain to be understood. We will speak more on these questions of dependency within our formalism in the next section. 4.3. Investigating the notion of dependency. Given a propagator with m-inputs and noutputs, one may ask about the relation of dependency between them. When one says that the outcome of a process is dependent on the inputs, this should mean that changing the inputs will cause a change in the outputs. In one form or another, the ability to track changes as they propagate through a network of processes is one of the basic questions in almost any field of research. Indeed, concern with notions of cause and effect is an essential characteristic of human thought. Making mathematical sense of this notion would presumably be immensely valuable. In particular, it should have direct applications to neuroscience and computer programming disciplines. It is not clear that there exists a reasonable notion of causality that is algebraic in nature, i.e. one that can be formulated as a W-algebra receiving a morphism from P. In that case we may look to other approaches, e.g. that of Bayesian networks as in [Pea] and [Fon]. Whether Bayesian networks also form an algebra on W or a related operad, and how such an algebra compares with P should certainly be investigated. References [Awo] S. Awodey. (2010) Category theory. Second edition. Oxford Logic Guides, 52. Oxford University Press, Oxford. [AADF] Aguiar, M., Ashwin, P., Dias, A., Field, M. (2010) “Dynamics of coupled cell networks: synchrony, heteroclinic cycles, and inflation”. Journal of nonlinear science, Springer. [Bou] Bourbaki, N. (1972) “Univers”. In M. Artin et al. eds. SGA 4 - vol 1, Lecture Notes in Mathematics 269 (in French). Springer-Verlag pp. 185–217. [BB] Baez, J.C., Biamonte, J. (2012). “A Course on Quantum Techniques for Stochastic Mechanics”. Available online, http://arxiv.org/abs/1209.3632. [BV] Boardman, M.; Vogt, R. (1973) “Homotopy invariant algebraic structures on topological spaces.” Lecture notes in mathematics 347. Springer-Verlag. [BW] Barr M., Wells, C. (1990) Category theory for computing science. Prentice Hall International Series in Computer Science. Prentice Hall International, New York. [DL] Deville, L., Lerman, E. (2013) “Dynamics on networks of manifolds”. Available online: http://arxiv.org/pdf/1208.1513v2.pdf. [Fon] Fong, B. (2013) “Causal Theories: A Categorical Perspective on Bayesian Networks”. Available online http://arxiv.org/abs/1301.6201 [Lei] Leinster, T. (2004) Higher Operads, Higher Categories. London Mathematical Society Lecture Note Series 298, Cambridge University Press. [Luc] Lucas, É. (1891), Théorie des nombres (in French) 1, Gauthier-Villars. [Lur] Lurie, J. (2012) “Higher algebra”. http://www.math.harvard.edu/˜ lurie/papers/HigherAlgebra.pdf. [Mac] (1998) Mac Lane, S. Categories for the working mathematician. Second edition. Graduate Texts in Mathematics, 5. Springer-Verlag, New York. [Man] Manzyuk, O. (2009) “Closed categories vs. closed multicategories”. http://arxiv.org/abs/0904.3137 [May] May, P. (1972). The geometry of iterated loop spaces. Springer-Verlag. [NIST] National Institute of Standards and Technology (1993). IDEF0: functional modeling method. THE OPERAD OF TEMPORAL WIRING DIAGRAMS [Pea] [Pen] [RS] [Sp1] [Sp2] 37 Pearl, J. (2009) Causality: Models, reasoning, and inference. Cambridge University Press. Penrose, R. (2011). Cycles of time: An extraordinary new view of the universe. Random House. Radul, A.; Sussman, G.J. (2009). “The art of the propagator”. MIT Computer science and artificial intelligence laboratory technical report. Spivak, D.I. (2013) Category theory for scientists. http://arxiv.org/abs/1302.6946 Spivak, D.I. (2013) “The operad of wiring diagrams: Formalizing a graphical language for databases, recursion, and plug-and-play circuits.” ePrint available: http://arxiv.org/abs/1305.0297 Department of Mathematics, Northeastern University, Boston, MA 02115 E-mail address: [email protected] Department of Mathematics, Massachusetts Institute of Technology, Cambridge MA 02139 E-mail address: [email protected]
6cs.PL
Simple, Scalable and Accurate Posterior Interval Estimation Cheng Li arXiv:1605.04029v2 [stat.CO] 24 Dec 2016 1 ∗1 , Sanvesh Srivastava †2 , and David B. Dunson ‡3 Department of Statistics and Applied Probability, National University of Singapore 2 Department of Statistics and Actuarial Science, The University of Iowa 3 Department of Statistical Science, Duke University Abstract There is a lack of simple and scalable algorithms for uncertainty quantification. Bayesian methods quantify uncertainty through posterior and predictive distributions, but it is difficult to rapidly estimate summaries of these distributions, such as quantiles and intervals. Variational Bayes approximations are widely used, but may badly underestimate posterior covariance. Typically, the focus of Bayesian inference is on point and interval estimates for one-dimensional functionals of interest. In small scale problems, Markov chain Monte Carlo algorithms remain the gold standard, but such algorithms face major problems in scaling up to big data. Various modifications have been proposed based on parallelization and approximations based on subsamples, but such approaches are either highly complex or lack theoretical support and/or good performance outside of narrow settings. We propose a simple and general posterior interval estimation algorithm, which is based on running Markov chain Monte Carlo in parallel for subsets of the data and averaging quantiles estimated from each subset. We provide strong theoretical guarantees and illustrate performance in several applications. Key words: Bayesian; Big data; Credible interval; Embarrassingly parallel; Markov chain Monte Carlo; Quantile estimation; Wasserstein barycenter. 1 Introduction We propose a posterior interval estimation algorithm for uncertainty quantification in massive data settings in which usual Bayesian sampling algorithms are too slow. Bayesian models quantify uncertainty via the joint posterior distribution of the model parameters and predictive distributions of new observations. As joint posteriors and predictives are difficult to visualize and use in practice, the focus is almost always on posterior summaries of one-dimensional functionals. For example, it is typical to report 95% posterior credible intervals for a variety of onedimensional functionals of interest. In practice, by far the most common approach to estimate ∗ [email protected] [email protected][email protected] † 1 credible intervals relies on running a Markov chain Monte Carlo algorithm to obtain samples from the joint posterior, based on which estimating intervals for different one-dimensional functionals is trivial. Traditional Markov chain Monte Carlo algorithms are too slow to be practically useful in massive data applications. However, given their rich history and broad use, it would be appealing to be able to incorporate a simple fix-up, which would allow trivial modifications of existing code, solve the computational bottleneck, and enable provably accurate estimation of posterior quantiles for any one-dimensional functional of interest. Current classes of analytic approximations, such as Gaussian/Laplace, variational Bayes [12, 5, 24], and expectation propagation [29], clearly do not provide a generally useful alternative to sampling methods in terms of accurate estimation of posterior credible intervals. Hence, in comparing with the literature, we focus on scalable sampling algorithms. There has been a recent interest in scaling up Bayesian sampling in general and Markov chain Monte Carlo algorithms in particular, with many different threads considered. Three of the most successful include (i) approximating expensive Markov chain Monte Carlo transition kernels with easier to sample surrogates; (ii) running Markov chain Monte Carlo on a single machine but with different subsets of the data used as sampling proceeds [28, 17]; and (iii) running Markov chain Monte Carlo in parallel for different data subsets and then combining [21, 20, 18, 23, 27]. Motivated by our goal of defining a very simple and theoretically supported algorithm, we focus on embarassingly parallel Markov chain Monte Carlo following strategy (iii). The key question in embarassingly parallel Markov chain Monte Carlo is how to combine samples from the different subset posteriors. If each subset posterior were approximately Gaussian, then weighted averaging is well justified, motivating the consensus Monte Carlo algorithm [21]. Outside of this restrictive setting, one can instead rely on the product equation representation to combine using kernel smoothing [20] or multi-scale histograms [27]. Such approaches have theory support in terms of accuracy as the number of samples increases, but rely heavily on the accuracy of density estimators for the subset posteriors, suffering badly when subset posteriors have even slightly non-overlapping supports. Moreover, the product equation representation obtained by splitting the prior is not invariant to model reparameterization. An alternative approach is to use data subsamples to define noisy approximations to the full data posterior, and then take an appropriate notion of geometric center, such as geometric median [18] or mean [23] of these approximations. These later approaches are invariant to model reparameterization, but they require a somewhat conceptually and computationally complex combining algorithm. In this article, we propose a new scalable algorithm for posterior interval estimation. Our algorithm first runs Markov chain Monte Carlo or any alternative posterior sampling algorithm in parallel for each subset posterior, with the subset posteriors proportional to the prior multiplied by the subset likelihood raised to the full data sample size divided by the subset sample size. To obtain an accurate estimate of a posterior quantile for any one-dimensional functional of interest, we simply calculate the quantile estimates in parallel for each subset posterior and then average these estimates. Hence, our combining step is completely trivial conceptually and computationally. We also provide theory justifying the performance of the quantile estimates. We emphasize that we are not proposing a new Markov chain Monte Carlo algorithm, but we are instead developing a simple approach to scale up existing algorithms to datasets with large numbers of observations. 2 Our approach is related to the frequentist Bag of Little Bootstraps [14] and provides a Bayesian interpretation. Bag of Little Bootstraps divides massive data into small subsets and obtains bootstrap confidence intervals for a one-dimensional parameter on every subset from weighted bootstrap samples. Then the confidence interval of the one-dimensional parameter based on the whole data is constructed by averaging lower and upper bounds of the bootstrap confidence intervals across all subsets. Similarly, our algorithm averages quantiles from all subset posteriors. Our theory leads to new insights into Bag of Little Bootstraps, showing that its confidence intervals correspond to the confidence intervals of the Wasserstein barycenter of bootstrap distributions across all subsets. 2 2.1 Preliminaries Wasserstein Distance and Barycenter Our algorithm is related to the concept of Wasserstein barycenter of subset posteriors [23], which depends on the notions of Wasserstein distance and Wasserstein barycenter. Suppose Θ ∈ Rd and kθ1 − θ2 k is the Euclidean distance between any θ1 , θ2 ∈ Θ. For any two measures ν1 , ν2 on Θ, their Wasserstein-2 distance is defined as  W2 (ν1 , ν2 ) = Z 1/2 kθ1 − θ2 k dγ(ν1 , ν2 ) , 2 inf γ∈Γ(ν1 ,ν2 ) Θ×Θ where Γ(ν1 , ν2 ) is the set of all probability measures on Θ × Θ with marginals ν1 and ν2 ,  R respectively. If we let P2 (Θ) = ν : Θ kθk2 dν(θ) < ∞ , then the W2 distance is well defined for every pair of measures in P2 (Θ). The topological space {Θ, P2 (Θ)} is a Polish space, and the W2 distance metricizes the weak convergence of measures on P2 (Θ). Convergence in W2 distance on P2 (Θ) is equivalent to weak convergence plus convergence of the second moment; see for example, Lemma 8.3 in [4]. Given N different measures ν1 , . . . , νN in P2 (Θ), their Wasserstein barycenter is defined as the solution to the following optimization problem [2]: ν = arg min N X W22 (µ, νj ) , (1) µ∈P2 (Θ) j=1 which can be viewed as the geometric center of the N measures ν1 , . . . , νN . 2.2 Wasserstein Posterior and Posterior Interval Estimation Consider n observations that are conditionally independent given model parameters and can be partitioned into K non-overlapping subsets. For ease of presentation, we assume that all subsets have the same sample size m, such that n = Km. The data in the jth subset are denoted Xj = {X1j , X2j , . . . , Xmj } for j = 1, . . . , K, and the whole dataset is denoted X = ∪K j=1 Xj . The model P (x | θ), or for short Pθ , describes the distribution of X, with parameter θ ∈ Θ ⊆ Rd , where d is the dimension of θ. Suppose P (x | θ) is absolutely continuous with respect to dominating measure λ such that dP (x | θ) = p(x | θ)dλ(x). For theory development, we assume the existence of a true parameter θ0 ∈ Θ, such that the data X are generated from Pθ0 . Given a 3 prior distribution Π(θ) over Θ with density π(θ), define the overall posterior density of θ given X and the jth subset posterior density of θ given Xj , j = 1, . . . , K, as Q K Qm i=1 p(Xij j=1 πn (θ | X) = R QK Qm | θ)π(θ)dθ j=1 i=1 p(Xij | θ)π(θ)dθ Qm { i=1 p(Xij | θ)}K π(θ)dθ πm (θ|Xj ) = R Q , K m Θ { i=1 p(Xij | θ)} π(θ)dθ Θ (2) and we denote their corresponding distribution functions as Πn (θ | X) and Πm (θ | Xj ), respectively. In the definition of subset posterior density πm (θ | Xj ), we have raised the subset likelihood function to the Kth power. As a stochastic approximation to the overall posterior πn (θ | X), this modification rescales the variance of each subset posterior given Xj to be roughly of the same order as the variance of the overall posterior Πn (θ | X), as in [18] and [23]. Based on (2), [23] runs Markov chain Monte Carlo algorithms on the K subsets in parallel, producing draws from each Πm (θ | Xj ), j = 1, . . . , K. Empirical estimates of Πm (θ | Xj ) for all K subsets are obtained from the Markov chain Monte Carlo draws, their Wasserstein barycenter is estimated via a linear program, and used as an approximation of the overall posterior Πn (θ | X). Suppose we are interested in a scalar parameter ξ = h(θ) ∈ Ξ with h : Θ 7→ Ξ ⊆ R. We denote the overall posterior for ξ by Πn (ξ | X) and the jth subset posterior for ξ by Πm (ξ | Xj ). For theory development, we mainly focus on the linear functional ξ = h(θ) = a> θ + b for some fixed a ∈ Rd and b ∈ R, which includes the individual components in θ as special cases. We can define the W2 distance and the set of measures P2 (Ξ) on the univariate space Ξ. If Πm (ξ | Xj ) ∈ P2 (Ξ) for all j = 1, . . . , K, then the one-dimensional Wasserstein posterior Πn (ξ | X) is defined as the Wasserstein barycenter of Πm (ξ | Xj ) as in (1): Πn (ξ | X) = arg min K X W22 {µ, Πm (ξ | Xj )} . (3) µ∈P2 (Ξ) j=1 In the one-dimensional case, the Wasserstein posterior has an explicit relation with the K subset posteriors. Let F −1 (u) = inf{x : F (x) ≥ u} be the quantile function of a generic univariate distribution function F (x). Let F1 and F2 be two univariate distributions in P2 (Ξ), with quantile functions F1−1 (u) and F2−1 (u), for any u ∈ (0, 1), respectively. Then the W2 distance between F1 and F2 has an explicit expression by Lemma 8.2 of [4]: Z W2 (F1 , F2 ) = 0 1 F1−1 (u) − F2−1 (u) 2 1/2 du . Therefore, Πn (ξ | X) in (3) is explicitly related to the subset posteriors Πm (ξ | Xj ) by −1 Πn (u | X) = K 1 X −1 Πm (u | Xj ) , K j=1 −1 where Π−1 m (u | Xj ) and Πn (u | X) are the quantile functions of Πm (ξ | Xj ) and Πn (ξ | X), respectively. This expression for the one-dimensional W2 barycenter has been derived in [2] from an optimal transport perspective. The relation indicates that for a scalar functional ξ, the average of subset posterior quantiles produces another quantile function that corresponds 4 exactly to the one-dimensional Wasserstein posterior. Therefore, in our algorithm, to evaluate the Wasserstein posterior of ξ, we simply take the empirical quantiles based on posterior draws from each Πm (ξ | Xj ) and then average them over j = 1, . . . , K. Our algorithm is summarized in Algorithm 1. Algorithm 1 Posterior Interval Estimation Input: K subsets of data X1 , . . . , XK , each with sample size m. Output: Posterior credible intervals [q α/2 , q 1−α/2 ], for α ∈ (0, 1). For j = 1 to K # Parallel in K subsets For t = 1 to T Draw θtj from Πm (θ | Xj ), using an appropriate posterior sampler. Calculate ξtj = h(θtj ). End for  Sort {ξ1j , . . . , ξT j } into ξ(1)j ≤ . . . ≤ ξ(T )j ; Obtain the empirical α/2 and 1 − α/2 quantiles qα/2,j = ξ(bT α/2c)j and q1−α/2,j = ξ(bT (1−α/2)c)j , where bxc denotes the integer part of x. End for P 1 PK Set q α/2 = K1 K j=1 qα/2,j and q 1−α/2 = K j=1 q1−α/2,j . Return: [q α/2 , q 1−α/2 ]. 3 Main Results In this section, we develop theory supporting our approach. Under mild regularity conditions, we show that the one-dimensional Wasserstein posterior Πn (ξ | X) is an accurate approximation to the overall posterior Πn (ξ | X). Essentially, as the subset sample size m increases, the W2 distance between them diminishes at a faster than parametric rate op (m−1/2 ). Their biases, variances and quantiles are only different in high orders of m. This rate can be improved to op (n−1/2 ) when the maximum likelihood estimator of ξ is unbiased. Our results are improved relative to previous papers relying on combining subset posteriors, such as [18] and [23], with more detailed description of the limiting behavior of the estimated posterior and weaker restrictions on the growth rate of the number of subsets K. Our theory relies on the parametric Bernstein-von Mises theorem. The consensus Monte Carlo algorithm in [21] also leverages approximate normality in their asymptotic justification and can be viewed as a different way of averaging subset posteriors. They used weighted averages of subset posterior samples as an approximate sample from the true posterior, where the weights were taken as the inverse covariance matrices based on each subset posterior samples. Their weighting strategy relies more heavily on the normality assumption than our strategy of averaging quantiles. In contrast to the heuristic arguments in [21], we provide formal justification for using normal approximations on a large number of subsets, and quantify the asymptotic orders of the induced approximation errors. P We first define some useful notation. Let `j (θ) = m i=1 log p(Xij | θ) be the log-likelihood PK 0 in the j subset, and `(θ) = j=1 `j (θ) be the overall log-likelihood. Let `j (θ) = ∂`j (θ)/∂θ 5 and `00j (θ) = −∂ 2 `j (θ)/∂θ∂θ> be the first and second derivatives of `j (θ) with respect to θ. Let θ̂j = arg maxθ∈Θ `j (θ) be the maximum likelihood estimator of θ based on the jth subset Xj , j = 1, . . . , K. Similarly let θ̂ = arg maxθ∈Θ `(θ) be the maximum likelihood estimator of P θ based on the full dataset X. Let θ = K j=1 θ̂j /K denote the average of maximum likelihood estimators across subsets. We make the following assumptions on the data generating process, the prior and the posterior. Assumption 1. θ0 is an interior point of Θ ∈ Rd , where d is a fixed positive integer and does not depend on n. Pθ = Pθ0 almost everywhere if and only if θ = θ0 . X contains independent and identically distributed observations generated from Pθ0 . Assumption 2. The support of p(x | θ) is the same for all θ ∈ Θ. Assumption 3. log p(x | θ) is three times differentiable with respect to θ in a neighborhood Bδ0 (θ0 ) ≡ {θ ∈ Θ : kθ−θ0 k ≤ δ0 } of θ0 , for some constant δ0 > 0. EPθ0 {p0 (X | θ0 )/p(X | θ0 )} = 0. Furthermore, there exists an envelope function M (x) such that supθ∈Bδ (θ0 ) |∂ log p(x | θ)/∂θl1 | ≤ 0 M (x), supθ∈Bδ (θ0 ) ∂ 2 log p(x | θ)/∂θl1 ∂θl2 ≤ M (x), supθ∈Bδ (θ0 ) ∂ 3 log p(x | θ)/∂θl1 ∂θl2 ∂θl3 ≤ 0 0 M (x) for all l1 , l2 , l3 = 1, . . . , d, for all values of x, and EPθ0 M (X)4 < ∞.   Assumption 4. I(θ) = EPθ0 {−∂ 2 p(X | θ)/∂θ∂θ> } = EPθ0 {∂p(X | θ)/∂θ}{∂p(X | θ)/∂θ}> . −`001 (θ)/m is positive definite with eigenvalues bounded from below and above by constants, for all θ ∈ Θ, all values of X1 , and all sufficiently large m. Assumption h 5. For any δ > 0, there exists an  i> 0 such that limm→∞ Pθ0 sup|θ−θ0 |≥δ {`1 (θ) − `1 (θ0 )} /m ≤ − = 1. Assumption 6. The prior density π(θ) is continuous, bounded from above in Θ and bounded R below at θ0 . The prior has finite second moment Θ kθk2 π(θ)dθ < ∞. Assumption 7. Let ψ(X1 ) = EΠm (θ|X1 ) Kmkθ − θ̂1 k2 , where EΠm (θ|X1 ) is the expectation with respect to θ under the posterior Πm (θ | X1 ). Then there exists an integer m0 ≥ 1, such that {ψ(X1 ) : m ≥ m0 , K ≥ 1} is uniformly integrable under Pθ0 . In other words, limC→+∞ supm≥m0 ,K≥1 EPθ0 ψ(X1 )I{ψ(X1 ) ≥ C} = 0, where I(·) is the indicator function. Assumptions 1-5 are standard and mild regularity conditions on the model P (x | θ), which are similar to the assumptions of Theorem 8.2 in Chapter 6 of [16] and Theorem 4.2 in [11] for showing the asymptotic normality of posteriors. Assumption 6 requires the prior to have a finite second moment, such that with high probability all the posterior distributions are in the P2 (Θ) space and the W2 distance is well defined. In models with heavy tailed priors, such as our example in Section D.1, one can replace Assumption 6 by assuming that the posterior distribution conditional on a fixed number of initial observations has finite second moment; see Example 8.5 in Chapter 6 of [16] and our Proposition 3 in the Appendix. The uniform integrability of subset posteriors in Assumption 7 is an extra mild technical assumption that helps us to generalize the usual Bernstein-von Mises result on the subsets from the convergence in probability to the convergence in L1 distance. We verify Assumption 7 for normal linear models and some exponential family distributions in the Appendix. A stronger condition that 6 can replace Assumption 7 is supm≥m0 ,K≥1 EX1 EΠm (θ|X1 ) Kmkθ − θ̂1 k2 < +∞. The following theorems hold for the one-dimensional Wasserstein posterior defined in (3). Theorem 1. Suppose Assumptions 1–7 hold and ξ = a> θ + b for some fixed a ∈ Rd and b ∈ R.  −1 Let Iξ (θ0 ) = a> I −1 (θ0 )a . Let ξ = a> θ + b, ξˆ = a> θ̂ + b. Let Φ(·; µ, Σ) be the normal distribution with mean µ and variance Σ. (i) As m → ∞,  h i n1/2 W2 Πn (ξ | X) , Φ ξ; ξ, {nIξ (θ0 )}−1 → 0,  h i −1 1/2 ˆ n W2 Πn (ξ | X) , Φ ξ; ξ, {nIξ (θ0 )} → 0,  m1/2 W2 Πn (ξ | X) , Πn (ξ | X) → 0, where the convergence is in Pθ0 -probability. (ii) If θ̂1 is an unbiased estimator for θ, so EPθ0 θ̂1 = θ0 , then as m → ∞,  n1/2 W2 Πn (ξ | X) , Πn (ξ | X) → 0 in Pθ0 -probability. Theorem 1 shows that both the one-dimensional Wasserstein posterior of ξ from combining K subset posteriors and the overall posterior of ξ based on the full dataset are asymptotically close in the W2 distance to their respective limiting normal distributions, with slightly different means and the same variance. Such convergence in the W2 distance implies weak convergence and convergence of the second moment. Furthermore, the W2 distance between the Wasserstein and full posteriors converges to zero in probability with rates m1/2 and n1/2 , depending on the behavior of the maximum likelihood estimator θ̂1 . Previous asymptotic justifications for embarrassingly parallel Markov chain Monte Carlo approaches focus on consistency [23] or convergence rates [18], while the above theorem is stronger in providing a limiting distribution. In addition, our conditions are much weaker in only requiring the subset sample size m to increase, while imposing no restrictions on the growth rates of m and K. Hence, the number of subsets K can grow polynomially in n, mimicking the case in which many computers are available but computational resources per computer are limited. For example, the theorem allows K = O(nc ), m = O(n1−c ) for any c ∈ (0, 1). Under this setup, the one-dimensional Wasserstein posterior, the overall posterior and their normal limits will all converge to θ0 at the same rate of Op (n−1/2 ), and their mutual difference is of order op (m−1/2 ). When the maximum likelihood estimator θ̂1 is unbiased, Part (ii) of the theorem provides a sharper convergence rate of Op (n−1/2 ) compared to the Op (m−1/2 ) rate in Part (i), still with no explicit restrictions on the growth rates of m and K. When K increases very fast, for example K ≈ n1/2 and m ≈ n1/2 , the Op (n−1/2 ) rate in Part (ii) is much faster than the Op (n−1/4 ) rate from Part (i). Moreover, Op (m−1/2 ) is suboptimal since it is the parametric rate based on only the subset data with size m, while Op (n−1/2 ) is the optimal parametric rate based on the full data with size n. The reason for the improvement in Part (ii) lies in the high order difference between the two means ξ and ξˆ of the limiting normal distributions of the one-dimensional Wasserstein posterior and the overall posterior. When the unbiasedness assumption does not hold and K increases with n, the difference between the averaged maximum likelihood estimator 7 ξ and the overall maximum likelihood estimator ξˆ is typically of order op (m−1/2 ), which does not scale in the number of subsets K. However, when all subset maximum likelihood estimators are unbiased, this difference is reduced by a factor of K 1/2 due to the averaging effect over K subset posteriors and decreases faster as op (n−1/2 ). Hence, in models having unbiased maximum likelihood estimators, the one-dimensional Wasserstein posterior achieves high order accuracy in approximating the overall posterior with a difference op (n−1/2 ). Independently, [22] has considered a nonparametric generalized linear model and shown a related Bernstein-von Mises theorem. Besides the difference between the form of models, we emphasize that our result in Theorem 1 does not rely on the strong requirement of a uniform normal approximation for all subset posteriors, as used in Shang and Cheng’s paper. Instead, to show Theorem 1, it is only necessary for the normal approximation to work well on average among all subset posteriors. As a result, we have no explicit constraint on the growth rate on the number of subsets K, while their paper needs to control K explicitly depending on the posterior convergence rate. Theorem 2. Suppose Assumptions 1–7 hold. Let ξ0 = a> θ0 + b and ξˆ be the same as defined in Theorem 1. For a generic distribution F on Ξ, let bias(F ) = EF (ξ) − ξ0 and var(F ) be the variance of F . Let u1 and u2 be two arbitrary fixed numbers such that 0 < u1 < u2 < 1. Then the following relations hold:      (i) bias Πn (ξ | X) = ξ − ξ0 + op n−1/2 , bias {Πn (ξ | X)} = ξˆ − ξ0 + op n−1/2 ;    1 1 (ii) var Πn (ξ | X) = Iξ−1 (θ0 ) + op n−1 , var {Πn (ξ | X)} = Iξ−1 (θ0 ) + op n−1 ; n n   (iii) sup −1 −1/2 , Πn (u | X) − Π−1 n (u | X) = op m u∈[u1 ,u2 ] where Op and op are in Pθ0 -probability. Furthermore, if θ̂1 is an unbiased estimator of θ0 , then    bias Πn (ξ | X) − bias {Πn (ξ | X)} = op n−1/2 ;   −1 −1/2 (u | X) = o n . sup Πn (u | X) − Π−1 p n u∈[u1 ,u2 ] Theorem 2 provides the order for the differences for the bias, the variance and the quantiles between the one-dimensional Wasserstein posterior and the overall posterior. Essentially the one-dimensional Wasserstein posterior has an asymptotic bias ξ − ξˆ from the overall posterior, which is generally of order op (m−1/2 ) and has higher order op (n−1/2 ) when the subset maximum likelihood estimators are unbiased. The variances of the one-dimensional Wasserstein posterior and the overall posterior agree in the leading order. Similar to the biases, the difference between their quantiles has order op (m−1/2 ) in the general case, and improves to a higher order op (n−1/2 ) when the subset maximum likelihood estimators are unbiased. In our algorithm, when we take K different subset posterior credible intervals and average them, the averages of the lower and upper quantiles are asymptotically close to the quantiles from the overall posterior in the leading order. Therefore, Theorem 2 also validates our algorithm in the sense of posterior uncertainty quantification. We can also account for Monte Carlo errors in approximating subset posteriors using samples under mild mixing conditions on the subset Markov chains; see Theorem 3 in the Appendix. 8 4 Experiments We applied the proposed algorithm in a variety of cases, using consensus Monte Carlo [21], Wasserstein posterior [23], semiparametric density product [20], and variational Bayes as our competitors. Posterior summaries from Markov chain Monte Carlo applied to the full data served as the benchmark for all the comparisons. As our theory guarantees good performance for very large samples, we focused on simulations with moderate sample sizes. All Markov chain Monte Carlo algorithms were run for 10,000 iterations. After discarding the first 5000 samples as burn-in, we retained every fifth sample in all the chains; convergence diagnostics suggested that every chain had converged to its stationary distribution. We used the combination step implemented in R package parallelMCMCcombine [19] for consensus Monte Carlo and semiparametric density product methods. We implemented the combination step of our algorithm in R and of Srivastava et al.’s algorithm in Matlab. All experiments were run on an Oracle Grid Engine cluster with 2.6GHz 16 core compute nodes. Memory resources were capped at 8GB for all the methods, except for Markov chain Monte Carlo based on the full data, which had a maximum memory limit of 16GB. The accuracy of a density q(θ | X) approximating πn (θ | X) was evaluated using the metric Z |q(θ | X) − πn (θ | X)| dθ. (4) accuracy {q(θ | X)} = 1 − 21 Θ This accuracy metric lies in [0, 1], with larger values indicating better performance of q in approximating πn [8]. In our experiments, we first estimated q(θ | X) and πn (θ | X) based on the posterior samples using the bkde or bkde2D functions in R package KernSmooth, with automatic bandwidth selection via dpik [26]. The density estimates were used to compute a numerical approximation of the integral in (4). 4.1 Linear model with varying dimension We first evaluated the performance of our proposed algorithm under varying sample size, dimension, and number of subsets in Bayesian linear models. Let the response, design matrix, regression coefficients, and random error be denoted as y, X, β, and , where y,  ∈ Rn , β ∈ Rp×1 , and X ∈ Rn×p . The model assumes that y = Xβ + ,  ∼ N (0n×1 , σ 2 In ), β ∼ gdP, σ ∼ Half-t, (5) where gdP denotes the generalized double Pareto shrinkage prior of [3] and Half-t is chosen to be weakly-informative [10]. See Section D.1 in the Appendix for detailed specifications. The priors on β and σ in (5) are both heavy-tailed with infinite second moments, and therefore do not satisfy Assumption 6. However, one can verify that conditional on the initial m0 observations with m0 ≥ p + 4, every subset posterior has finite second moments for both β and σ. The result is summarized in Proposition 3 in the Appendix. We applied our approach for inference on β in (5) compared with an asymptotic normal approximation. We calculated the accuracy of approximations using a full data Gibbs sampler as the benchmark (Table 1). The first 10% of entries of β were set to ±1 with the remaining 0. The entries of X were randomly set to ±1 and σ 2 was fixed at 1. We ran 10 replications for n ∈ 9 {104 , 105 } and p ∈ {10, 100, 200, 300, 400, 500}. We varied K ∈ {10, 20} and applied Algorithm 1 after running a modification of the Gibbs sampler in (2) for each subset. We considered two versions of normal approximations for the full posterior. The first version used N (m, b Vb ) to approximate the posterior of β, where m b and Vb are the maximum likelihood estimates of β and its estimated asymptotic covariance matrix in (5). For the second version, we first obtained the asymptotic normal approximation of the jth subset posterior as N (m b j , Vbj ), where m b j and b Vj (j = 1, . . . , K) are the maximum likelihood estimates of β and its estimated asymptotic covariance matrix for the jth subset. Then we found the W2 barycenter of the K subset normal approximations, which is again a normal distribution N (m∗ , V ∗ ) [2]. This provides an empirical verification of Theorem 1. See Section D.1 in the Appendix for details of the Gibbs sampler and the form of m∗ and V ∗ . The performance of all the approaches was fairly similar across all simulations and agreed with our asymptotic theory (Table 1). The results in Table 1 show that the proposed algorithm closely matched the Gibbs sampling results for the full data in terms of uncertainty quantification. It also performed better than the asymptotic normal approximations in some cases. When the subset sample size was too small compared to the dimension, such as when n = 104 , p = 400, K = 20 which has a subset size of only m = 500, we observe poor performance for both the asymptotic approximations and the proposed approach. Table 1: Accuracy of approximate posteriors for the non-zero and zero elements of β in (5). The accuracies are averaged over 10 simulation replications. Normal, the asymptotic normal approximation based on the full data; PIE, our posterior interval estimation algorithm; NB, the W2 barycenter of K asymptotic normal approximations of subset posteriors. p = 10 n= NB PIE NB PIE Normal (K=10) (K=10) (K=20) (K=20) 104 p = 100 n= 105 n= 104 n= n = 105 non-0s 0s non-0s 0s non-0s 0s non-0s 0s non-0s 0s non-0s 0.95 0.94 0.95 0.93 0.94 0.89 0.91 0.97 0.92 0.97 0.96 0.96 0.97 0.96 0.97 0.96 0.95 0.97 0.95 0.97 0.95 0.89 0.90 0.84 0.85 0.90 0.87 0.92 0.84 0.87 0.96 0.95 0.96 0.94 0.95 0.95 0.94 0.96 0.93 0.95 0.95 0.84 0.85 0.75 0.77 0.89 0.83 0.85 0.76 0.78 0.96 0.94 0.95 0.92 0.93 0.95 0.94 0.95 0.92 0.93 n= NB PIE NB PIE n= 104 0s p = 300 Normal (K=10) (K=10) (K=20) (K=20) p = 200 105 104 p = 400 n= 105 n= 104 p = 500 n= 105 n= 104 n = 105 0s non-0s 0s non-0s 0s non-0s 0s non-0s 0s non-0s 0s non-0s 0.95 0.80 0.82 0.65 0.67 0.89 0.79 0.81 0.67 0.68 0.96 0.93 0.94 0.91 0.92 0.95 0.93 0.94 0.91 0.91 0.94 0.75 0.77 0.51 0.52 0.89 0.75 0.78 0.52 0.53 0.96 0.93 0.93 0.90 0.91 0.95 0.92 0.93 0.90 0.91 0.94 0.71 0.73 0.31 0.89 0.71 0.74 0.31 0.96 0.92 0.93 0.89 0.90 0.95 0.91 0.93 0.88 0.89 10 4.2 Linear mixed effects model Linear mixed effects models are widely used to characterize dependence in longitudinal and nested data structures. Let ni be the number of observations associated with the ith individual, for i = 1, . . . , s. Let yi ∈ Rni be the responses of the ith individual, Xi ∈ Rni ×p and Zi ∈ Rni ×q be matrices including predictors having coefficients that are fixed across individuals and varying across individuals, respectively. Let β ∈ Rp and ui ∈ Rq , respectively, represent the fixed effects and ith random effect. The linear mixed effects model lets yi ∼ N (Xi β + Zi ui , σ 2 Ini ), ui ∼ N (0q , Σ), i = 1, . . . , s. (6) Many software packages are available for Markov chain Monte Carlo-based Bayesian inference P in (6), but current implementations become intractable for data with large s and n = si=1 ni . We applied our algorithm for inference on β and Σ in (6) and compared its performance with maximum likelihood, consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and variational Bayes. We set s = 5000, ni = 20 for i = 1, . . . , s, n = 105 , p = 4, q = 3, β = (−1, 1, −1, 1)> , and σ = 1. The random effects covariance Σ had Σii = i, i = 1, 2, 3, Σ12 = − 0.56, Σ31 = 0.52, and Σ23 = 0.0025. This matrix included negative, positive, and small to moderate strength correlations [13]. The simulation was replicated 10 times. The approximate posterior distributions were obtained using consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and our algorithm in three steps. First, full data were randomly partitioned into 20 subsets such that data for each individual were in the same subset. Second, the Markov chain Monte Carlo sampler for β and Σ in (6) was modified following (2) and Equation (2) in [21] and implemented in Stan (Version 2.5.0). Finally, the posterior samples from all the subsets were combined. We used the streamlined algorithm for variational Bayes [15]. Maximum likelihood produced a point estimate and asymptotic covariance for β, and only a point estimate for Σ. We compared the performance of the seven methods for inference on the fixed effects β, the variances of random effects Σii (i = 1, 2, 3), and the correlations of random effects ρij = Σij /(Σii Σjj )1/2 (1 ≤ i < j ≤ 3). The correlations are nonlinear functionals of the model parameters Σ. Maximum likelihood estimator, consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and our algorithm had excellent performance in estimation of β (Figure 1), as well as the variances and correlations (Tables 2 and 3 and Figure 2). Uncertainty quantification using consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and our algorithm closely agreed with Markov chain Monte Carlo based on the full data. As shown in Figure 1 of the Appendix, variational Bayes was computationally most efficient, but it showed poor accuracy in approximating the posterior of β and the variances, with underestimation of posterior uncertainty. 4.3 United States natality data We applied our algorithm to United States natality data on birth weight of infants and variables related to their mothers’ health [1]. Linear mixed effects models were used for the covariance in birth weights among siblings. Following the example in [15], we selected the data for mothers who smoked, had two infants, and had some college education but not a college 11 Table 2: 90% credible intervals for variances and correlations of random effects in simulation for linear mixed effects model. The upper and lower bounds are averaged over 10 replications.MLE, maximum likelihood estimator; MCMC, Markov chain Monte Carlo based on the full data; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. MLE MCMC VB CMC SDP WASP PIE Σ11 Σ22 Σ33 ρ12 ρ13 ρ23 0.99 (0.96, 1.03) (0.90, 0.96) (0.96, 1.03) (0.97, 1.03) (0.96, 1.03) (0.96, 1.03) 2.00 (1.94, 2.07) (1.88, 2.01) (1.94, 2.08) (1.95, 2.09) (1.94, 2.07) (1.94, 2.07) 3.00 (2.90, 3.10) (2.84, 3.04) (2.91, 3.13) (2.95, 3.14) (2.90, 3.10) (2.90, 3.10) -0.40 (-0.42, -0.38) (-0.44, -0.41) (-0.42, -0.38) (-0.42, -0.38) (-0.42, -0.38) (-0.42, -0.38) 0.30 (0.28, 0.32) (0.29, 0.34) (0.28, 0.32) (0.28, 0.32) (0.28, 0.32) (0.28, 0.32) 0.00 (-0.03, 0.02) (-0.03, 0.02) (-0.02, 0.02) (-0.03, 0.02) (-0.03, 0.02) (-0.03, 0.02) Table 3: Accuracy of approximate posteriors for variances and correlations of random effects in simulation for linear mixed effects model. The standard deviation of accuracy across 10 replications is in parentheses. VB, variational Bayes; CMC, consensus Monte Carlo; SC, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. Σ11 VB CMC SDP WASP PIE 0.11 0.92 0.90 0.95 0.95 (0.02) (0.03) (0.04) (0.02) (0.02) Σ22 0.38 0.95 0.92 0.94 0.95 (0.02) (0.03) (0.04) (0.02) (0.02) Σ33 0.59 0.93 0.89 0.95 0.96 ρ12 (0.03) (0.03) (0.07) (0.02) (0.02) 0.45 0.92 0.85 0.94 0.96 (0.02) (0.04) (0.09) (0.02) (0.02) ρ13 0.96 0.96 0.95 0.96 0.97 (0.01) (0.01) (0.03) (0.01) (0.01) ρ23 0.61 0.90 0.74 0.95 0.96 (0.02) (0.03) (0.07) (0.01) (0.01) degree. Detailed information about the variables are in the Appendix. The data set contained s = 3809 mothers and n = 7618 births. There were 13 variables related to mother’s health. All these covariates and an intercept were used as fixed effects in (6), so p = 14. The random effects included mother’s age, gestation period, and number of living infants, so q = 3. We performed 10 fold cross-validation and randomly split the data into 10 data sets such that data for siblings belonged to the same training data. We estimated fixed effects and covariance matrix for random effects as in Section 4.2 using K = 20. The seven methods in the previous section generally agreed in the inference on fixed effects (Figure 3), with variational Bayes deviating the furthest. Our algorithm and the algorithm of [23] differed significantly from variational Bayes, consensus Monte Carlo, and semiparametric density product in the inference on variances and correlations of random effects (Tables 4 and 5 and Figure 4). Our algorithm and the algorithm of [23] showed better agreement with Markov chain Monte Carlo based on the full data in estimating the correlations. The 90% credible intervals from our algorithm included the maximum likelihood estimates of correlations. Variational Bayes posterior concentrated very close to 0 for every element of the covariance matrix and significantly underestimated posterior uncertainty. Consensus Monte Carlo and semiparametric density product methods performed poorly in the inference on random effects 12 β1 ● ● ● ● −0.99 ● ● ● ● ● ● ● ● ● ● ● ● ● ● 1.01 ● ● ● 1.005 −0.995 β2 ● ● ● ● ● β3 ● ● ● ● ● ● ● ● ● −0.985 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● β4 ● ● ● ● ● ● ● 1.01 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 1.005 −0.99 1 −1 0.995 −1.005 ● ● −1.01 ● ● ● ● ● ● ● 1 −1 0.995 0.99 ● ● 0.985 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −1.015 −0.995 ● ● ● ● ● MCMC MLE VB CMC SDPWASP PIE ● ● MCMC MLE VB CMC SDPWASP PIE MCMC MLE VB CMC SDPWASP PIE 0.985 ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.98 0.99 ● −1.005 ● ● ● ● ● MCMC MLE VB CMC SDPWASP PIE Figure 1: Boxplots of posterior samples for fixed effects in simulation for linear mixed effects model. MCMC, Markov chain Monte Carlo based on the full data; ML, maximum likelihood estimator; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. ● 1.05 ● ● ● ● Σ11 1 ● ● ● ● ● ● ● 2.2 ● Σ22 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ρ21 CMC SDP WASP ● ● ● ● ● ● PIE ● ● ● ● 2.8 ● ● ● ● ● ● ● ● ● ● ● MCMC 0.38 ● ● ● ● −0.38 ● 0.36 ● ● ● ● ● ● ● ● 1.9 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● VB Σ33 2.9 2 ● MCMC ● ● ● 3 ● 0.9 ● 3.1 2.1 ● ● ● 3.2 ● ● ● ● ● ● ● ● 0.95 −0.36 ● ● ● ● ● ● ● ● ● ● ρ31 VB CMC ● ● ● ● ● ● ● SDP WASP ● ● ● ● ● ● ● ● ● PIE 0.04 ● ● ● ● ● ● ● ● MCMC ρ23 VB CMC ● ● ● ● ● ● ● ● 0.02 SDP WASP ● ● ● ● ● ● PIE ● ● ● ● ● ● ● −0.4 −0.42 0.34 0 0.32 −0.02 ● ● −0.44 ● ● ● ● ● ● ● −0.46 ● ● ● 0.3 0.28 ● ● VB ● ● ● ● ● ● ● ● ● ● MCMC −0.04 ● ● ● ● −0.06 ● ● ● ● ● ● ● ● VB CMC CMC SDP WASP PIE MCMC VB CMC SDP WASP ● ● ● ● ● ● ● PIE MCMC SDP WASP PIE Figure 2: Boxplots of posterior samples for variances and correlations of random effects in simulation for the linear mixed effects model. MCMC, Markov chain Monte Carlo based on the full data; ML, maximum likelihood estimator; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. but were better than variational Bayes. Markov chain Monte Carlo based on the full data was extremely slow compared to the other methods (see Figure 1 in the Appendix). Taking into account both the approximation accuracy and the computational efficiency, we concluded that our proposed algorithm performs better than the competing algorithms in estimating the covariance matrix of random effects. 4.4 Extension to multi-dimensional parameters Although Algorithm 1 only applies to one-dimensional functionals, we provide a simple extension to the multi-dimensional case with a numerical illustration. Suppose our goal is to find the joint posterior of the d-dimensional parameter θ. First, we center and scale the posterior samples of θ in every subset. Let m b j and Vbj be the empirical mean and covariance matrix for P P b −1 the jth subset posterior samples {θ1j , . . . , θT j }. Let m b = K −1 K b j , Vb −1 = K −1 K j=1 m j=1 Vj . 0 = V b −1/2 (θij − m). We transform every subset draw θij to θij b If every subset posterior of θ is asymptotically normal, then the centered and rescaled version θ0 will be asymptotically standard normal with approximately independent components, since T is large in practice. For every component of θ0 , we apply Algorithm 1 to combine its K subset posterior samples and obtain approximations of posterior quantiles for a fine grid of [0, 1]. This leads to accurate approximations of the marginal posteriors of θ0 ; we repeatedly draw samples from these marginals, 13 and then transform back to the original parameter using θ = Vb 1/2 θ0 + m. b This yields approximate samples from the full posterior of θ, and credible regions can be estimated based on these samples. We implemented this generalized algorithm for combining subset posterior samples of all pairs of variances and covariances in the simulation from Section D.2, and compared the results with consensus Monte Carlo, semiparametric density product, Wasserstein posterior, and variational Bayes. The accuracies of our algorithm and the algorithm of [23] were higher than the accuracies of the other three methods for all pairs of variances and covariances (Table 6). Variational Bayes performed poorly in the estimation of posterior distributions for all the pairs of variances. We obtained kernel density estimates of the three pairs of covariances in (6) using the combined posterior samples and the bkde2D function in the KernSmooth R package with a bandwidth of 0.01 (Figure 5). The kernel density estimates centered very close to the true values of the covariance pairs. Compared to the algorithm of [23], our algorithm was more efficient, easier to implement, and robust to the grid-size of quantiles, while having similar accuracy and stability across all simulation replications. Table 4: 90% credible intervals for variances and correlations of random effects in United States natality data analysis. The upper and lower bounds are averaged over 10 folds of cross-validation. MLE, maximum likelihood estimator; MCMC, Markov chain Monte Carlo based on the full data; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. MLE MCMC VB CMC SDP WASP PIE (dmage, dmage) (nlbnl, nlbnl) (gestat, gestat) (dmage, nlbnl) (dmage, gestat) (nlbnl, gestat) 0.135 (0.086, 0.152) (0.000, 0.000) (0.010, 0.029) (0.015, 0.032) (0.100, 0.163) (0.098, 0.163) 0.006 (0.003, 0.021) (0.000, 0.000) (0.019, 0.051) (0.018, 0.049) (0.042, 0.088) (0.042, 0.088) 0.004 (0.002, 0.004) (0.000, 0.000) (0.000, 0.001) (0.000, 0.001) (0.002, 0.004) (0.002, 0.004) -0.628 (-0.637, 0.283) (-0.027, 0.028) (-0.292, 0.043) (-0.298, -0.029) (-0.526, 0.066) (-0.526, 0.073) -0.955 (-0.959, -0.912) (-0.028, 0.028) (-0.574, -0.252) (-0.656, -0.372) (-0.928, -0.688) (-0.927, -0.691) 0.750 (-0.194, 0.728) (-0.027, 0.027) (-0.181, 0.159) (-0.054, 0.228) (-0.145, 0.464) (-0.145, 0.465) Table 5: Accuracy of approximate posteriors for variances and correlations of random effects in United States natality data analysis. The standard deviation of accuracy across 10 folds of cross-validation is in parentheses. VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. VB CMC SDP WASP PIE (dmage, dmage) (nlbnl, nlbnl) 0.00 0.00 0.00 0.72 0.73 0.00 0.15 0.16 0.03 0.03 (0.00) (0.00) (0.00) (0.21) (0.21) (0.01) (0.10) (0.11) (0.04) (0.04) (gestat, gestat) 0.00 0.00 0.00 0.78 0.78 (0.00) (0.00) (0.00) (0.15) (0.15) 14 (dmage, nlbnl) 0.08 0.42 0.39 0.72 0.73 (0.02) (0.07) (0.08) (0.11) (0.11) (dmage, gestat) 0.00 0.05 0.06 0.22 0.22 (0.00) (0.16) (0.18) (0.14) (0.14) (nlbnl, gestat) 0.07 0.33 0.33 0.63 0.63 (0.02) (0.11) (0.08) (0.14) (0.14) 0.28 gestat 0.35 ● male ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −0.2 black ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.3 ● ● ● ● ● ● ● ● ● −0.4 0.24 ● 0.22 0.25 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.2 ● ● ● ● ● ● −0.5 ● ● ● ● ● ● ● ● ● ● ● ● ● MLE VB adeqcode2 CMC ● ● WASP PIE ● ● ● ● ● ● ● ● MCMC ● ● ● ● ● ● ● SDP −0.1 MLE adeqcode3 ● ● ● ● ● ● ● ● ● ● ● −0.1 VB CMC SDP ● ● ● WASP ● ● ● ● ● ● PIE ● ● ● ● 0.2 −0.3 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● MCMC MLE ● ● ● ● ● ● ● CMC SDP WASP SDP WASP PIE ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● 0.1 ● ● ● ● ● ● −0.5 VB CMC 0.05 −0.4 ● ● pretri2 VB 0.15 −0.3 ● ● ● ● MLE ● ● −0.2 −0.2 MCMC 0.25 ● ● ● −0.6 MCMC ● ● ● ● 0.2 0 ● ● ● ● ● ● ● 0.26 −0.3 PIE MCMC MLE 0 −0.05 ● ● ● ● ● VB CMC SDP WASP PIE ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● SDP WASP PIE ● ● MCMC MLE VB CMC Figure 3: Boxplots of posterior samples for six fixed effects in the United States natality data analysis. MCMC, Markov chain Monte Carlo based on the full data; ML, maximum likelihood estimator; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. 0.2 ● ● Σ(dmage, dmage) ● ● ● ● ● ● ● ● 0.15 ● ● ● ● ● ● ● ● ● ● ● ● 0.05 ● ● ● ● ● ● ● ● ● ● 0 0.004 ● 0.003 ● ● ● ● ● ● ● VB CMC ρ(dmage, nbnl) SDP WASP ● ● ● ● ● ● MCMC VB CMC 0 ● ● ● ● ● ● ● ● ● ● −0.001 SDP WASP ρ(dmage, gestat) PIE MCMC VB CMC ρ(nlbnl, gestat) 0.8 SDP WASP PIE ● 0.6 ● ● ● ● ● ● ● ● ● ● ● −0.2 ● ● ● ● ● ● ● ● ● ● ● ● ● 0 ● ● ● ● ● ● ● ● ● 0.001 ● ● ● ● ● ● 0 0 PIE ● ● ● ● ● ● ● ● ● 0.002 ● ● ● ● ● ● 0.02 ● ● ● ● ● MCMC 0.04 0.005 ● ● ● ● ● ● ● ● 0.06 ● ● ● Σ(gestat, gestat) ● ● 0.1 0.08 0.1 0.2 Σ(nlbnl, nlbnl) 0.12 ● ● ● ● 0.4 −0.2 −0.4 ● ● ● −0.4 −0.6 ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● ● −0.8 −0.2 ● ● ● ● ● ● ● ● ● −0.8 MCMC VB CMC SDP WASP PIE −1 ● ● ● −0.4 MCMC VB CMC SDP WASP PIE ● ● ● ● ● ● 0 ● ● −0.6 ● 0.2 ● MCMC VB CMC SDP WASP PIE Figure 4: Boxplots of posterior samples for variances and correlations of random effects in the United States natality data analysis. MCMC, Markov chain Monte Carlo based on the full data; ML, maximum likelihood estimator; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. 5 Conclusion We have proposed a simple posterior interval estimation algorithm to rapidly and accurately estimate quantiles of the posterior distributions for different one-dimensional functionals of interest. The algorithm is simple and efficient relative to existing competitors, just averaging quantile estimates for each subset posterior based on applying existing sampling algorithms in an embarrassingly parallel manner. There is a fascinating mathematical relationship with the Wasserstein barycenter of subset posteriors: our algorithm calculates quantiles of the Wasserstein posterior without the optimization step in [23]. The credible intervals from our algorithm asymptotically approximate those from the full posterior in the leading parametric order. The quality of approximation is the same even if the subset sample size increases slowly and the number of subsets increases polynomially fast. Our experiments have demonstrated excellent performance for linear mixed effects models and linear models with varying dimension. Although our current theory focuses on parametric models and one-dimensional linear func- 15 Σ12 , Σ13 Σ12 , Σ32 Σ13 , Σ23 0.60 20 20 20 20 20 20 40 40 40 40 60 40 60 60 0.05 80 80 100 100 100 60 60 80 100 100 140 140140 160 200 0.00 220 220 120 160 160160 180 180 180 180 40 0.05 60 80 100 120 140 140 0.55 MCMC WASP PIE 0.10 0.10 140 0.00 140 160 140 120 120 220 120 120 100 100 200 200180 80 −0.05 160 160 140 80 60 40 40 20 80 −0.10 20 0.45 80 40 120 120 0.50 100 −0.05 80 60 −0.60 −0.55 −0.50 20 −0.10 −0.60 −0.55 −0.50 0.50 0.55 0.60 Figure 5: Kernel density estimates of the posterior densities for all the covariance pairs in (6) and their true values (black triangle). var1, var2 represents the two-dimensional posterior density of (var1, var2). MCMC, Markov chain Monte Carlo based on the full data; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. Table 6: Accuracy of approximate posteriors for all pairs of variances and covariances in (6). The standard deviation of accuracy across 10 folds of cross-validation is in parentheses. VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. VB CMC SDP WASP PIE (Σ11 , Σ22 ) (Σ11 , Σ33 ) (Σ22 , Σ33 ) (Σ12 , Σ13 ) (Σ12 , Σ23 ) (Σ13 , Σ23 ) 0.09 0.86 0.82 0.92 0.91 0.10 0.84 0.73 0.90 0.91 0.36 0.84 0.74 0.88 0.92 0.89 0.83 0.82 0.93 0.91 0.90 0.84 0.85 0.94 0.92 0.90 0.88 0.83 0.93 0.91 (0.01) (0.04) (0.05) (0.02) (0.02) (0.01) (0.03) (0.10) (0.01) (0.01) (0.02) (0.03) (0.11) (0.01) (0.01) (0.01) (0.05) (0.05) (0.02) (0.02) (0.01) (0.05) (0.05) (0.01) (0.02) (0.01) (0.03) (0.06) (0.01) (0.01) tionals, the proposed algorithm can be practically implemented for general one-dimensional functionals for semiparametric and nonparametric models. For example, in simulations not shown in the paper, we found that our algorithm shows excellent performance for Dirichlet process mixture models for multivariate categorical data [7], and Gaussian process nonparametric regression. Furthermore, we have provided an extension to the multi-dimensional case. It would be appealing to develop theory justification in these more complex settings, and to develop guarantees on approximation accuracy for fixed subset sizes and growing numbers of subsets. Also of interest in future work is to consider algorithms that do not require non-overlapping subsets, potentially relying on subsampling. Although such modifications can be implemented trivially, our proof techniques for the combining step in Theorem 1 do not apply directly. Other important extensions include optimal design of subsampling algorithms and extensions beyond product likelihoods. 16 Appendix In Section A we provide the detailed technical proofs of Theorem 1 and Theorem 2 in the main paper. In Section B, we present a theorem that quantifies the Monte Carlo errors in subset posterior sampling. In Section C, we verify Assumption 7 in the main paper for the normal linear model and some exponential family distributions. Section D includes further details about the data analysis in the main paper. In particular, for the heavy tailed priors used in Example 1 in the main paper, we verify a relaxed version of Assumption 6 in Section D.1. A A.1 Proofs of Theorem 1 and Theorem 2 Technical Lemmas Lemma 1. (Villani [25] Theorem 6.15) For two measures P1 , P2 ∈ P2 (Θ), or similarly P2 (Ξ), W22 (P1 , P2 ) ≤ 2 T V2 (P1 , P2 ), where the total variation of moments distance [6, 25] is defined as Z T V2 (P1 , P2 ) = (1 + kθk2 )d|P1 (θ) − P2 (θ)|. Θ Lemma 2. Suppose that Assumptions 1–7 hold. Let θ̂j be a weakly consistent estimator of θ0 based on the subset Xj such that it solves the score equation `0j (θ̂j ) = 0; θ̂j → θ0 in Pθ0 probability. Let θ̂ be a weakly consistent estimator of θ0 based on the whole X such that it solves the score equation `0 (θ̂) = 0; θ̂ → θ0 in Pθ0 -probability. Let t = n1/2 (θ − θ̂j ) be the local parameter for the jth subset, and s = n1/2 (θ − θ̂). Let Πm,t (t | Xj ) be the jth subset posterior induced by Πm (θ | Xj ) and Πn,s (s | X) be the posterior of s induced by the overall posterior Πn (θ | X). Then    lim EPθ0 T V2 Πm,t (t | Xj ), Φ t; 0, I −1 (θ0 ) = 0, (A.1) m→∞    lim EPθ0 T V2 Πn,s (s | X), Φ s; 0, I −1 (θ0 ) = 0. (A.2) m→∞ Remark 1. In comparison, the usual parametric Bernstein-von Mises theorem on the subset Xj without raising the likelihood to the Kth power gives    lim T V2 Πm (z | Xj ), Φ z; 0, I −1 (θ0 ) = 0, m→∞ in Pθ0 -probability, where z = m1/2 (θ − θ̂j ). See, for example, Theorem 8.2 in [16] and Theorem 4.2 in [11]. Proof of Lemma 2: The relation (A.2) in Lemma 2 is the usual Bernstein-von Mises theorem for the overall posterior Πn (θ | X). The proof of (A.2) follows a related line to the proof of Theorem 4.2 in [11], and can be treated as a special case of (A.1) with m = n and K = 1. In the following we focus on the proof of (A.1) in Lemma 2. Given the independent and identically distributed assumption, we only need to show the result for a fixed index j. To emphasize the different roles played by the subset sample size m 17 and the number of subsets K, in the following proofs we will write the total sample size n as Km. We complete the proof in 3 steps. For a generic matrix A or a 3-dimensional array A, we use kAk to denote its Frobenius norm. Step 1: Show the existence of weakly consistent estimator θ̂j for θ0 that solves `0j (θ̂j ) = 0. Given Assumption 3, `0j (θ) is continuously differentiable in an open neighborhood of θ0 and EPθ0 {p0 (X | θ0 )/p(X | θ0 )} = 0. Therefore, with large Pθ0 -probability, there exists a root for the equation `0j (θ) = 0 inside the neighborhood that attains the maximum of `(θ). Denote the root as θ̂j and then θ̂j → θ0 in Pθ0 -probability is a clear consequence of Assumption 5. Step 2: Show the following convergence as m → ∞ in Pθ0 -probability:    T V2 Πm,t (t | Xj ), Φ t; 0, I −1 (θ0 ) → 0. (A.3) We prove this result for a fixed subset Xj , since the data are independent and identically distributed, and the conclusion is identical for any j = 1, . . . , K. Define the following quantities   t − `j (θ̂j ) w(t) = `j θ̂j + (Km)1/2   Z z Kw(z) Cm = e π θ̂j + dz. (Km)1/2 Then based on the expression of Πm (θ | Xj ), with the likelihood raised to the Kth power, exp {K`j (θ)} π(θ)dθ . Θ exp {K`j (θ)} π(θ)dθ πm (θ | Xj ) = R The induced posterior density on t = (Km)1/2 (θ − θ̂j ) can be written as n o t exp{Kw(t)}π θ̂j + (Km) 1/2 πm (t | Xj ) = . Cm Let T = {t = (Km)1/2 (θ − θ̂j ) : θ ∈ Θ}. Define        Kw(t) t 1 > 2 gm (t) = 1 + ktk e π θ̂j + − exp − t I(θ0 )t π(θ0 ) . 2 (Km)1/2 R Pθ0 If we can show that T |gm (z)|dz −−→ 0 as m → ∞ in Pθ0 -probability, then   Z 1 > Cm → exp − z I(θ0 )z π(θ0 )dz = (2π)d/2 {det I(θ0 )}−1/2 π(θ0 ) 2 d R as m → ∞ in Pθ0 -probability. Hence, for the difference in (A.3), we obtain that    T V2 Πm,t (t | Xj ), Φ t; 0, I −1 (θ0 ) n o z   Kw(z) π θ̂ + Z e j  1 1 > (Km)1/2 2 = 1 + kzk − exp − z I(θ0 )z dz Cm 2 (2π)d/2 {det I(θ0 )}−1/2 T Z 1 (2π)d/2 {det I(θ0 )}−1/2 π(θ0 ) ≤ |gm (z)|dz + −1 × Cm T Cm 18 1 + kzk2 Z Rd   (2π)d/2 {det I(θ0 )}−1/2  1 > exp − z I(θ0 )z dz → 0 2 (A.4) as m → ∞ in Pθ0 -probability and (A.3) is proved. Therefore it suffices to show that 0 as m → ∞ in Pθ0 -probability. R T |gm (z)|dz → Divide the domain of the integral into 3 parts: A1 = {z : kzk ≥ δ1 (Km)1/2 }, A2 = {z : δ2 ≤ kzk < δ1 (Km)1/2 }, A3 = {z : kzk < δ2 }, where the constants δ1 , δ2 will be chosen later. Then Z Z Z Z |gm (z)|dz. (A.5) |gm (z)|dz + |gm (z)|dz + |gm (z)|dz ≤ T We have that Z |gm (z)|dz A1  Z  Kw(z) 2 1 + kzk e π θ̂j + ≤ A1 A3 A2 A1 z (Km)1/2  Z dz +  1 > 1 + kzk2 e− 2 z I(θ0 )z π(θ0 )dz, (A.6) A1 and Z 2 1 + kzk A1  − 21 z > I(θ0 )z e Z π(θ0 )dz = π(θ0 )  1 > 1 + kzk2 e− 2 z I(θ0 )z dz → 0 kzk≥δ1 (Km)1/2 as m → ∞, because the integral on the whole z ∈ Rd is finite, π(θ0 ) is bounded from above according to Assumption 6, and K ≥ 1. Next we bound the first term in (A.6). By Assumption 5 and the weak consistency of θ̂j , there exists a constant 1 that depends on δ1 , such that for any z ∈ A1 and all sufficiently large m, with Pθ0 -probability approaching 1, `j {θ̂j + z/(Km)1/2 } − `j (θ̂j ) ≤ −m1 . Furthermore, the weak consistency of θ̂j implies that for all sufficiently large m, with Pθ0 probability approaching 1, kθ̂j k ≤ kθ̂j − θ0 k + kθ0 k ≤ δ0 + kθ0 k. Therefore, as m → ∞ in Pθ0 -probability,   Z  Kw(z) z 2 dz 1 + kzk e π θ̂j + (Km)1/2 A1   Z  z 2 ≤ exp(−Km1 ) 1 + kzk π θ̂j + dz (Km)1/2   Z d/2 2 2 ≤ exp(−Km1 ) 1 + (Km) 2(kθk + kθ̂j k )π(θ)dθ  Θ  Z d/2 2 2 2 ≤ exp(−Km1 ) 1 + 2(Km) 2kθ0 k + 2δ0 + kθk π(θ)dθ → 0, (A.7) Θ where we have used the finite second moment of π(θ) from Assumption 6 in the last step. Hence, we have proved that the first integral in (A.5) goes to zero in Pθ0 -probability. For the second integral in (A.5), by the Taylor series expansion and `0j (θ̂j ) = 0,   z 1 > − `j (θ̂j ) = − z I(θ̂j )z + Rm (z) w(z) = `j θ̂j + 1/2 2K (Km) 19 (A.8) 1 ∂ 3 `j (θ̃) Rm (z) ≡ 6 ∂θ3  z z z , , 1/2 1/2 (Km) (Km) (Km)1/2  , where ∂ 3 `j (θ̃)/∂θ3 is a 3-dimensional array and θ̃ satisfies kθ̃ − θ̂j k ≤ z/(Km)1/2 . Since θ̂j → θ0 in Pθ0 -probability, we have kθ̂j − θ0 k < δ0 /3 for all large m with Pθ0 -probability approaching 1, and we choose δ1 ≤ δ0 /3 such that kθ̃ − θ0 k < δ0 for all large m given z ∈ A2 . For every fixed z ∈ A2 , Rm (z) in (A.8) converges to zero as m → ∞ in Pθ0 -probability, which implies that on z ∈ A2 , gm (z) → 0 in Pθ0 -probability. Moreover, by Assumption 3, Rm (z) can be further bounded by |Rm (z)| ≤ z d3 6 (Km)1/2 m 3X M (Xij ) i=1 m ≤ d3 δ1 1 X d3 δ1 kzk2 M (Xij ) → kzk2 EPθ0 M (X11 ), 6K m 6K i=1 where the last convergence is almost surely in Pθ0 by the strong law of large numbers. Therefore, we can choose δ1 as " # δ0 3 minθ∈Bδ0 (θ0 ) λ1 {I(θ)} δ1 = min , , 3 4d3 EPθ0 M (X11 ) where λ1 (A) denotes the smallest eigenvalue of a generic matrix A. Assumption 4 indicates that minθ∈Bδ0 (θ0 ) λ1 {I(θ)} is bounded below by a constant. Thus, in (A.8), the choice of δ1 implies that for every z ∈ A2 , for all large m with Pθ0 -probability approaching 1, 1 > z I(θ̂j )z, 4K    1 > exp{Kw(z)} ≤ exp K − z I(θ̂j )z + |Rm (z)| 2K     1 > 1 > ≤ exp − z I(θ̂j )z ≤ exp − z I(θ0 )z . 4 8 |Rm (z)| ≤ Therefore for z ∈ A2 , for all large m with Pθ0 -probability approaching 1,          z 1 > 1 > 2 |gm (z)| ≤ 1 + kzk exp − z I(θ0 )z π θ̂j + + exp − z I(θ0 )z π(θ0 ) 8 2 (Km)1/2    1 ≤ sup π(θ) × 2 1 + kzk2 exp − z > I(θ0 )z . 8 θ∈Θ R Hence A2 |gm (z)|dz < +∞, since supθ∈Θ π(θ) < ∞ by Assumption 6. We can choose the conR stant δ2 sufficiently large, such that A2 |gm (z)|dz is arbitrarily small in Pθ0 -probability. For the third integral in (A.5), we fix a constant δ2 > 0 and can use the similar Taylor series expansion above, and notice that when kzk < δ2 , as m → ∞, sup K|Rm (z)| ≤ kzk<δ2 m m d3 δ23 1 X Kd3 δ23 X M (X ) ≤ × M (Xij ) → 0, ij 6(Km)3/2 i=1 6(Km)1/2 m i=1 (A.9) where the last convergence is almost surely in Pθ0 . It follows from (A.8), (A.9), the weak consistency of θ̃j and the continuity of I(θ) in Bδ0 (θ0 ) that as m → ∞ in Pθ0 -probability, 1 δ2 sup Kw(z) − z > I(θ0 )z ≤ 2 I(θ̂j ) − I(θ0 ) + sup K|Rm (z)| → 0. 2 2 kzk<δ2 kzk<δ2 20 (A.10) By the continuity of π(θ) in Assumption 6 and the weak consistency of θ̃j , we also have that   t − π(θ0 ) → 0, sup π θ̂j + (A.11) (Km)1/2 kzk<δ2 as m → ∞ in Pθ0 -probability. Therefore, (A.10) and (A.11) together imply that as m → ∞ in Pθ0 -probability,   1 > t Kw(z) − e− 2 z I(θ0 )z π(θ0 ) → 0. sup e π θ̂j + 1/2 (Km) kzk<δ2 Hence by the definition of gm (z), as m → ∞ in Pθ0 -probability, Z |gm (z)|dz A3   Z t − 12 z > I(θ0 )z ≤ (1 + kzk2 )dz × sup eKw(z) π θ̂j + − e π(θ0 ) → 0. (Km)1/2 kzk≤δ2 kzk<δ2 This has proved that the right-hand side of (A.5) converges to zero in Pθ0 -probability, and also completes the proof of (A.3). Step 3: Show the convergence in L1 as m → ∞. It is clear from the derivation of (A.4) that    T V2 Πm,t (t | Xj ), Φ t; 0, I −1 (θ0 ) o n z   Z eKw(z) π θ̂j + (Km) 1/2  1 1 > 2 − exp − z I(θ0 )z dz = 1 + kzk Cm 2 (2π)d/2 {det I(θ0 )}−1/2 T     Z  Z 2 1 + kzk2 1 > 1/2 ≤ 1 + n (θ − θ̂j ) π(θ|Xj )dθ + exp − z I(θ0 )z dz −1/2 2 Θ Rd (2π)d/2 {det I(θ0 )}    Z 2 1 + kzk2 1 > = 1 + EΠm (θ|Xj ) Km θ − θ̂j + exp − z I(θ0 )z dz −1/2 2 Rd (2π)d/2 {det I(θ0 )} In this display, the last term is a finite constant. The middle term is ψ(Xj ) defined in Assumption 7. According to Assumption 7, for any fixed j, {ψ(Xj ) : m ≥ m0 , K ≥ 1} is uniformly inte   grable under Pθ0 . Now since T V2 Πm,t (t | Xj ), Φ t; 0, I −1 (θ0 ) is upper bounded by ψ(Xj )+C     for all m, K and some constant C > 0, we obtain that T V2 Πm,t (t | Xj ), Φ t; 0, I −1 (θ0 ) : m ≥ m0 , K ≥ 1 is also uniformly integrable. This uniform integrability together with the convergence in Pθ0    probability from Step 2 implies the L1 convergence of T V2 Πm,t (t | Xj ), Φ t; 0, I −1 (θ0 ) to zero.  Similar to the W2 distance, for any l ≥ 1, we can define the Wasserstein-l (Wl ) distance: for any two measures ν1 , ν2 on Θ, their Wl distance is defined as  Wl (ν1 , ν2 ) = Z 1/l kθ1 − θ2 k dγ(ν1 , ν2 ) , l inf γ∈Γ(ν1 ,ν2 ) Θ×Θ where Γ(ν1 , ν2 ) is the set of all probability measures on Θ × Θ with marginals ν1 and ν2 , respectively. The Wl distance on the space Ξ can be similarly defined. The Wl distance between 21 two univariate distributions F1 and F2 is the same as the Ll distance between their quantile functions (see Lemma 8.2 of [4]): Z 1 1/l  −1 l −1 Wl (F1 , F2 ) = F1 (u) − F2 (u) du . 0 Lemma 3. Let ξˆj = a> θ̂j + b. Then for any l ≥ 1, K h i  h i  1 X Wl Πm (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 . Wl Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )}−1 ≤ K j=1 Proof of Lemma 3: We use Φ(·) and Φ−1 (·) to denote the cumulative distribution function and the quantile function of standard normal distribution N (0, 1). From [2], the univariate Wasserstein-2 barycenter satisfies that for any u ∈ (0, 1), −1 Πn (u | X) = K 1 X −1 Πm (u | Xj ) . K j=1 Therefore,  h i Wl Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )}−1 Z 1 h i l 1/l −1 −1 −1 u; ξ, {nIξ (θ0 )} Πn (u | X) − Φ = du 0  Z  =  1/l l K X 1  −1/2 −1 Π−1 Φ (u) du m (u | Xj ) − ξ − {nIξ (θ0 )} K 1 0 j=1  1 Z  =  0 1 K K h X 1/l l i  −1/2 −1 ˆ Π−1 Φ (u) du . m (u | Xj ) − ξj − {nIξ (θ0 )} (A.12) j=1 Define −1/2 −1 ˆ rj (u) = Π−1 Φ (u). m (u | Xj ) − ξj − {nIξ (θ0 )} then Wl  h Πm (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 i Z = 1 (A.13) 1/l |rj (u)| du . l 0 Since l ≥ 1, we apply Minkowski inequality to the right-hand side of (A.12) and obtain that 1/l  l  K Z 1 1 X  h i   −1 Wl Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )} (A.14) = rj (u) du     0 K j=1 1/l K Z 1 K  h i 1 X 1 X l ≤ |rj (u)| du = Wl Πm (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 , K K 0 j=1 j=1 which concludes the proof.  22 Lemma 4. Suppose Assumptions 1–7 hold. Then   ξ − ξˆ = op m−1/2 , where op is in Pθ0 probability. Furthermore, if θ̂1 is an unbiased estimator of θ0 , then   ξ − ξˆ = op n−1/2 . Proof of Lemma 4: Because of the linearity ξ = a> θ + b, it suffices to show   θ̂ − θ = op m−1/2 , (A.15) under Assumptions 1–7, and   θ̂ − θ = op n−1/2 , (A.16) with the further assumption that θ̂1 is an unbiased estimator of θ0 . We use the first order Taylor expansion of `0j (θ̂j ) (j = 1, . . . , K) and θ̂ around θ0 : 0 = `0j (θ̂j ) = `0j (θ0 ) + `00j (θ̃j )(θ̂j − θ0 ), 0 = `0 (θ̂) = `0 (θ0 ) + `00 (θ̃)(θ̂ − θ0 ), where θ̃j is between θ̂j and θ0 , θ̃ is between θ̂ and θ0 , and `00 (θ) = lead to PK 00 j=1 `j (θ). These expansions `0j (θ0 ) 1 θ̂j = θ0 + I −1 (θ0 )`0j (θ0 ) + Zj , m m  −1 1 Zj ≡ − `00j (θ̃j ) − I −1 (θ0 ), m 1 `0 (θ0 ) , θ̂ = θ0 + I −1 (θ0 )`0 (θ0 ) + Z n n  −1 1 Z ≡ − `00 (θ̃j ) − I −1 (θ0 ). n Therefore by the equality `0 (θ0 ) = PK 0 j=1 `j (θ0 ), θ − θ̂ = (A.17) the difference between θ and θ̂ is K 1 X `0j (θ0 ) `0 (θ0 ) Zj −Z . K m n (A.18) j=1 For the second term in (A.18), by the central limit theorem n−1/2 `0 (θ0 ) converges in distribution to N (0, I(θ0 )), so k`0 (θ0 )/nk = Op (n−1/2 ). Z converges in Pθ0 -probability to zero given the consistency of θ̂ to θ0 in Lemma 2, so kZk = op (1). Therefore by the Slutsky’s theorem, Z   `0 (θ0 ) = op n−1/2 . n (A.19) Next we show the first term in (A.18) is of order op (m−1/2 ) under Assumptions 1–7, and is of order op (n−1/2 ) if furthermore EPθ0 θ̂1 = θ0 . 23 Let Wj = Zj `0j (θ0 )/m1/2 . Then {Wj : j = 1, . . . , K} are independent and identically P 1/2 ). Since Z → 0 distributed random vectors and the first term in (A.18) is K j j=1 Wj /(Km in Pθ0 -probability as m → ∞, and m−1/2 `0j (θ0 ) = Op (1) as m → ∞, by the Slutsky’s theorem again, Wj → 0 in Pθ0 -probability. Furthermore, we will show at the end of this proof that EPθ0 (kW1 k2 ) → 0 as m → ∞. Assuming this is true, by the Markov’s inequality, for any c > 0,  K mEPθ0 X W 1 j −1/2  Pθ0  ≥ cm ≤ K m1/2 j=1  ≤ 1 K Wj 2 j=1 m1/2 PK c2 K EPθ0 kW1 k2 1 X 2 kW k = → 0. E j Pθ0 c2 K c2 j=1 Hence, (A.15). PK  = op m−1/2 . This together with (A.18) and (A.19) leads to 1/2 ) j=1 Wj /(Km If we further assume unbiasedness EPθ0 θ̂1 = θ0 , then from (A.17) we can obtain that  EPθ0 Wj = m−1/2 EPθ0 Zj `0j (θ0 ) n o = m1/2 EPθ0 θ̂j − θ0 − m−1 I −1 (θ0 )`0j (θ0 )   = m1/2 EPθ0 θ̂j − θ0 − m−1/2 I −1 (θ0 )EPθ0 `0j (θ0 ) = 0, for all j = 1, . . . , K. In other words, Wj ’s are centered at zero. Since Xj ’s (j = 1, . . . , K) are all independent and Wj only depends on Xj , we have EPθ0 Wj>1 Wj2 = 0 for any j1 6= j2 . We can again apply Markov’s inequality to the first term in (A.18) and obtain that for any constant c > 0,     K K X X Wj 1 1 > cn−1/2  = Pθ0  Wj > cK −1/2  Pθ0  1/2 K K m j=1 ≤ = = KEPθ0 1 K PK 2 c K EP  K 2 c2 θ0 EPθ0 (kW1 c2 j=1 2 j=1 Wj K X j=1 k2 )  kWj k2 + X Wj>1 Wj2  j1 6=j2 . Therefore, assuming that EPθ0 θ̂1 = θ0 and EPθ0 (kW1 k2 ) → 0 as m → ∞, which will be proven  PK 1/2 ) = o n−1/2 . This together with below, the display above implies that p j=1 Wj /(Km (A.18) and (A.19) leads to (A.16). Proof of EPθ0 (kW1 k2 ) → 0 as m → ∞: By Assumption 4, we let λ > 0 be a constant lower bound of the eigenvalues of −`001 (θ)/m for 24 all θ ∈ Θ, all X1 and all sufficiently large m. Then we have  −1 1 00 ≤ d1/2 λ−1 , − `1 (θ̃1 ) m I(θ0 )−1 ≤ d1/2 λ−1 , (A.20) where d is the dimension of θ. We have used the property of the Frobenius norm: for a generic d × d symmetric positive definite matrix A, kA−1 k ≤ d1/2 λ(A−1 ) = d1/2 {λ(A)}−1 , where λ(A) and λ(A) denotes the largest and the smallest eigenvalues of the matrix A, respectively. Furthermore, the envelop function condition in Assumption 3 implies that − 1 00 ` (θ̃1 ) m 1 2 ≤ m d2 X M (Xi1 )2 . m (A.21) i=1 It follows from (A.20) and (A.21) that for all large m, )−1 ( ) 1 ∂ 2 `1 (θ̃1 ) 1 ∂ 2 `1 (θ̃1 ) kZ1 k = − − − I(θ0 ) I −1 (θ0 ) m ∂θ∂θ> m ∂θ∂θ> ( ) m 1 −2 d2 X 2 2 M (Xi1 ) + kI(θ0 )k dλ−2 ≤ dλ 2 m ( 2 2 i=1 m 1 X ≤ c1 M (Xi1 )2 + c2 , m i=1 where c1 , c2 are positive constants that only depend on d, λ, kI(θ0 )k2 .  P 2 2 Now define V1 = c1 m m−1/2 `01 (θ0 ) . Then we have kW1 k2 ≤ V1 . i=1 M (Xi1 ) /m + c2 We are going to show that EPθ0 (V1 ) < ∞ and then apply the dominated convergence theorem to kW1 k2 and conclude that EPθ0 kW1 k2 → 0 since we already have W1 → 0 in Pθ0 -probability. To see why EPθ0 (V1 ) < ∞, we first apply the Cauchy-Schwarz inequality to V1 and obtain that m ( 1 X c1 M (Xi1 )2 + c2 m EPθ0 (V1 ) = EPθ0 ) m−1/2 `01 (θ0 ) 2 i=1  m 1 X M (Xi1 )2 + c2 c1 m ( ≤ EPθ0 )2 1/2   EPθ0 m−1/2 `01 (θ0 ) 4 1/2 . (A.22) i=1 Due to Assumption 3, the first term in (A.22) is bounded by )2 m 1 X 2 EPθ0 c1 M (Xi1 ) + c2 m i=1 ( ) m X  1 ≤ 2c21 EPθ0 M (Xi1 )4 + 2c22 = 2c21 E M (X)4 + 2c22 < ∞. m ( i=1 Pm 0 Now recall that `01 (θ0 ) = i=1 p (Xi1 | θ0 )/p(Xi1 | θ0 ). Denote the lth component in the random vector p0 (Xi1 | θ0 )/p(Xi1 | θ0 ) as Uil , such that p0 (Xi1 | θ0 )/p(Xi1 | θ0 ) = (Ui1 , ..., Uid )> . Then Ui1 l and Ui2 l are independent if i1 6= i2 , due to the independence between Xij ’s. By EPθ0 {p0 (X | θ0 )/p(X | θ0 )} = 0 in Assumption 3, we have EPθ0 Uil = 0 for all i = 1, . . . , m and 25 4 4 ≤ E l = 1, . . . , d. From Assumption 3 we have for all l = 1, . . . , d, EPθ0 U1l Pθ0 M (X) < ∞. Therefore, the second term in (A.22) can be bounded as  !2 2 !4 d m d m   X X X X 4 1 d EPθ0 m−1/2 `01 (θ0 ) = 2 EPθ0 Uil ≤ 2 EPθ0 Uil   m m i=1 i=1 l=1 l=1   d X m      X X d 2 2 4 EPθ0 Ui1 l EPθ0 Ui2 l = 2 EPθ0 Uil + 3   m d = 2 m d ≤ 2 m i1 6=i2 i=1 l=1 d  X 4 mEPθ0 U1l l=1 d n X 4 mEPθ0 U1l + 3m(m − 1) + 3m(m −  2 EPθ0 U1l 4 1)EPθ0 U1l o 2  ≤ 3d d X 4 < ∞. EPθ0 U1l l=1 l=1 Thus we have shown that both terms on the right-hand side of (A.22) are finite. Therefore,  EPθ0 (V1 ) < ∞ and by the dominated convergence theorem, EPθ0 kW1 k2 → 0. A.2 Proof of Theorem 1 Proof of Theorem 1(i): Since ξ = a> θ + b, we can derive the following for subset posteriors in terms of ξ using a change of variable from θ to ξ in (A.1) of Lemma 2: h n oi lim EPθ0 T V2 Πm,t (t | Xj ), Φ t; 0, Iξ−1 (θ0 ) = 0, m→∞ where t = n1/2 (ξ − ξˆj ) is now the local parameter for the jth subset. From the relation between norms W2 and T V2 in Lemma 1, this directly implies oi h n lim EPθ0 W22 Πm,t (t | Xj ), Φ t; 0, Iξ−1 (θ0 ) = 0. m→∞ We further use the rescaling property of the W2 distance and obtain the equivalent form in terms of the original parameter ξ:  h i lim nEPθ0 W22 Πm (ξ | Xj ) , Φ ξ; ξˆj , {nIξ ( θ0 )}−1 = 0. (A.23) m→∞ From Lemma 3, we have that for any constant c > 0, as m → ∞, n  h i o Pθ0 W2 Πn (ξ | X) , Φ ξ; ξ, {nIξ (θ0 )}−1 ≥ cn−1/2   K  1 X  h i (i) ≤ Pθ0 W2 Πm (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 ≥ cn−1/2 K  j=1  2 K 1 X  h i (ii) n ≤ 2 EPθ0 W2 Πm (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1   c K j=1 K  h i n X 2 ˆj , {nIξ (θ0 )}−1 E W Π (ξ | X ), Φ ξ; ξ m j P 2 θ0 c2 K j=1  h i (iv) n ≤ 2 EPθ0 W22 Πm (ξ | X1 ), Φ ξ; ξˆ1 , {nIξ (θ0 )}−1 → 0, c (iii) ≤ 26 where (i) follows from Lemma 3 with l = 2, (ii) uses Markov’s inequality, (iii) comes from the relation between l1 norm and l2 norm, and (iv) follows from (A.23). This result indicates that  h i   W2 Πn (ξ | X) , Φ ξ; ξ, {nIξ (θ0 )}−1 = op n−1/2 , (A.24) which shows the first relation in Part (i) of Theorem 1. The second relation in Theorem 1 (i)  h i   ˆ {nIξ (θ0 )}−1 = op n−1/2 . W2 Πn (ξ | X) , Φ ξ; ξ, (A.25) follows from a similar argument using (A.2) in Lemma 2 for the overall posterior.  From Lemma 4, we have ξ − ξˆ = op m−1/2 . Therefore, i h    h i ˆ {nIξ (θ0 )}−1 ≤ ξ − ξˆ = op m−1/2 , W2 Φ ξ; ξ, {nIξ (θ0 )}−1 , Φ ξ; ξ, (A.26) where the first inequality follows because of the definition of W2 distance and the same variance shared by the two normal distributions. Finally, by (A.24), (A.25), (A.26) and the triangular inequality, we have  W2 Πn (ξ | X) , Πn (ξ | X)  h i  h i h i ˆ {nIξ (θ0 )}−1 ≤ W2 Πn (ξ | X) , Φ ξ; ξ, {nIξ (θ0 )}−1 + W2 Φ ξ; ξ, {nIξ (θ0 )}−1 , Φ ξ; ξ,  h i  ˆ {nIξ (θ0 )}−1 , Πn (ξ | X) + W2 Φ ξ; ξ,         ≤ op n−1/2 + op m−1/2 + op n−1/2 = op m−1/2 , which is equivalent to the third relation in Part (i).  Proof of Theorem 1(ii): If θ̂1 is an unbiased estimator of θ0 , then by Lemma 4 and the definition of W2 distance, it follows that  i h i   h −1 −1 −1/2 ˆ ˆ . (A.27) , Φ ξ; ξ, {nIξ (θ0 )} ≤ ξ − ξ = op n W2 Φ ξ; ξ, {nIξ (θ0 )} Applying the triangular inequality to (A.24), (A.25) and (A.27), we obtain that as m → ∞,  W2 Πn (ξ | X) , Πn (ξ | X)  h i  h i h i ˆ {nIξ (θ0 )}−1 ≤ W2 Πn (ξ | X) , Φ ξ; ξ, {nIξ (θ0 )}−1 + W2 Φ ξ; ξ, {nIξ (θ0 )}−1 , Φ ξ; ξ,  h i  ˆ {nIξ (θ0 )}−1 , Πn (ξ | X) + W2 Φ ξ; ξ,         = op n−1/2 + op n−1/2 + op n−1/2 = op n−1/2 . Thus the conclusion of Part (ii) follows. A.3  Proof of Theorem 2 Proof of Theorem 2(i): [2] have shown that the barycenter Πn (ξ | X) is related to the K subset posteriors Πm (ξ | Xj ) (j = 1, . . . , K) through the quantile function: −1 Πn (u | X) = K 1 X −1 Πm (u | Xj ) , K j=1 27 for any u ∈ (0, 1). Also the expectation of a generic univariate distribution F can be calculated through its quantile functions: if a random variable Y has the cumulative distribution function R1 F , EF (Y ) = 0 F −1 (u)du. Therefore  bias Πn (ξ | X) = EΠn (ξ|X) (ξ) − ξ0 Z 1 Z 1 K 1 X −1 −1 = Πn (u | X)du − ξ0 = Πm (u | Xj ) − ξ0 0 0 K j=1 1 K (i) = (ii) = K Z 1h X i ξˆj + {nIξ (θ0 )}−1/2 Φ−1 (u) + rj (u) du − ξ0 j=1 0 K K Z K Z 1 Xˆ 1 X 1 1 X 1 rj (u)du − ξ0 = ξ − ξ0 + rj (u)du, ξj + K K K 0 0 j=1 j=1 j=1 R1 where (i) follows from the definition of rj (u) in (A.13), and (ii) makes use of the fact 0 Φ−1 (u)du = 0. |ξˆ − ξ0 | = Op (n−1/2 ) from the central limit theorem. It remains to be shown that K Z   1 X 1 rj (u)du = op n−1/2 . K 0 (A.28) j=1 To see why this is true, we notice that we have derived the following relation in the proof of Theorem 1: K  h i   1 X W2 Πm (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 = op n−1/2 . K j=1 But according to the definition of rj (u) in (A.13), by Cauchy-Schwarz inequality, 1/2 K Z K Z 1 1 X 1 X 1 2 rj (u)du ≤ rj (u)du K K 0 0 j=1 1 = K K X j=1 W2   h i  −1 −1/2 ˆ Πm (ξ | Xj ), Φ ξ; ξj , {nIξ (θ0 )} = op n , j=1 which proves (A.28). On the other hand, for the bias of the overall posterior Πn (ξ | X), we follow a similar argument as above and obtain that Z 1 bias {Πn (ξ | X)} = EΠn (ξ|X) (ξ) − ξ0 = Π−1 n (u | X)du − ξ0 0 Z 1h Z 1 Z 1 i −1/2 −1 ˆ ˆ = ξ + {nIξ (θ0 )} Φ (u) − ξ0 + r(u)du = ξ − ξ0 + r(u)du, 0 0 0 −1/2 −1 ˆ where r(u) = Π−1 Φ (u). Moreover we have n (u|X) − ξ − {nIξ (θ0 )} Z 1 h i2 1/2 ˆ − {nIξ (θ0 )}−1/2 Φ−1 (u) du r(u)du ≤ Π−1 (u | X) − ξ n 0 0   h i  ˆ {nIξ (θ0 )}−1 = op n−1/2 = W2 Πn (ξ | X), Φ ξ; ξ, Z 1 28 by Theorem 1. This completes the proof of Part (i).  Proof of Theorem 2(ii): Similar to the expectation, the variance of a generic univariate distribution F can be calculated through its quantile functions: if Y ∼ F , 2 Z 2 ∞ 2 var(Y ) = E(Y ) − (EY ) = 1 F −1 (u) = 2 ∞ y dF (y) − −∞ Z Z −∞ Z du − 0 2 ydF (y) 1 2 −1 F (u)du . 0 Therefore, Z 1 2 Z 1n o2  −1 −1 Πn (u | X) du − Πn (u | X)du var Πn (ξ | X) = 0 0  2 2  Z 1 Z 1 X K K    X 1 1 du − = Π−1 Π−1 m (u | X) m (u | X)du  0 K   0  K j=1 j=1  2 Z 1 K X 1 ξ + {nIξ (θ0 )}−1/2 Φ−1 (u) + = rj (u) du K 0 j=1  2   Z 1 K X 1 ξ + {nIξ (θ0 )}−1/2 Φ−1 (u) + rj (u) du − K 0 j=1  2  2 Z 1 Z 1 X K K Z 1    X  1 1 1 2 −1 = Φ (u) du + rj (u) du − rj (u)du  K  nIξ (θ0 ) 0 0 K 0 j=1 + 2 {nIξ (θ0 )}−1/2 Z 1 Φ−1 (u) 0 1 K K X j=1 rj (u)du j=1 2 R1 R1 where we have used the fact 0 Φ−1 (u)du = 0 and 0 Φ−1 (u) du = 1. It remains to be shown that the other three terms in the display above are of order op (n−1 ). From (A.14) (with l = 2) and the conclusion of Theorem 1, we have 2 K   h i X  1 −1 2 rj (u) du = W2 Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )} = op n−1 . K   Z 1 0 j=1 By Cauchy-Schwarz inequality, we have  2  2  2 Z 1 X K Z 1 K K 1 X  Z 1 1 X    1 rj (u)du = rj (u)du ≤ rj (u) du = op n−1 .   0 K K   0 0 K j=1 j=1 j=1 Again by Cauchy-Schwarz inequality, we have 2 {nIξ (θ0 )}−1/2 Z 0 1 Φ−1 (u) × K 1 X rj (u)du K j=1 29 ≤ 2 {nIξ (θ0 )}−1/2 Z  1/2 Z 2  Φ−1 (u) du 1 0   0   = O n−1/2 × op n−1/2 = op n  −1 2 1/2 K  1 X rj (u) du  K  1 j=1 .   Therefore, we have shown that var Πn (ξ | X) = {nIξ (θ0 )}−1 + op n−1 . For the variance of Πn (ξ | X), we use the same definition of r(u) as in Part (i) and derive that Z 1 2 Z 1  −1 2 −1 Πn (u | X) du − Πn (u | X)du var {Πn (ξ | X)} = 0 0 Z 1h i2 = ξˆ + {nIξ (θ0 )}−1/2 Φ−1 (u) + r(u) du 0 Z − i 2 −1/2 −1 ˆ ξ + {nIξ (θ0 )} Φ (u) + r(u) du 1h 0 = 1 + nIξ (θ0 ) Z 1 r(u)2 du − Z 0 1 2 Z r(u)du + 2 {nIξ (θ0 )}−1/2 1 Φ−1 (u)r(u)du. 0 0 Based on the conclusion of Theorem 1 and Cauchy-Schwarz inequality, we have Z 1  h i  ˆ {nIξ (θ0 )}−1 = op n−1 , r(u)2 du = W22 Πn (ξ | X), Φ ξ; ξ, 0 1 Z 2 Z r(u)du ≤ 0 1  r(u)2 du = op n−1 , 0 and also −1/2 1 Z 2 {nIξ (θ0 )} Φ−1 (u)r(u)du 0 −1/2 Z 1 −1 2 1/2 Z du ≤ 2 {nIξ (θ0 )} Φ (u) 0      = O n−1/2 op n−1/2 = op n−1 , 1 1/2 r(u) du 2 0  which proves var {Πn (ξ | X)} = {nIξ (θ0 )}−1 + op n−1 .  Proof of Theorem 2(iii): The convergence in W2 distance implies weak convergence. Therefore, it follows from Theorem 1 that in Pθ0 probability, both Πn,s (s | X) and Πn,s (s | X) converge in distribution to normal distributions as m → ∞. The weak convergence also implies the convergence of quantile functions at any continuous point. Since both Πn (ξ | X) and Πn (ξ | X) are continuous distributions with posterior densities, their quantiles also converge pointwise to the quantiles of their limiting normal distributions. For any fixed u ∈ (0, 1), as m → ∞, Theorem 1 implies that for s = n1/2 (ξ − ξ), −1 Πn,s (u | X) − Φ−1 {u; 0, Iξ−1 (θ0 )} = op (1). We can make this convergence uniform over all quantiles u ∈ [u1 , u2 ] ⊂ (0, 1). Divide [u1 , u2 ] into L equally spaced subintervals [u(j) , u(j+1) ] for j = 0, . . . , L − 1 and u(j) = u1 + j(u2 − u1 )/L. 30 For any  > 0, since Φ−1 {u; 0, Iξ−1 (θ0 )} is uniformly continuous on [u1 , u2 ], we can pick L sufficiently large such that Φ−1 {u(j+1) ; 0, Iξ−1 (θ0 )} − Φ−1 {u(j) ; 0, Iξ−1 (θ0 )} < /2, for all j = 0, . . . , L − 1. Furthermore, because Φ−1 (·) is continuous everywhere, we can find a sufficiently large n0 , such that for all n > n0 , all j = 0, . . . , L − 1 with the L chosen above, −1 Πn,s (u(j) | X) − Φ−1 {u(j) ; 0, Iξ−1 (θ0 )} < /2. For any u ∈ [u1 , u2 ], we can find a j0 ∈ {0, . . . , L − 1} such that u ∈ [u(j0 ) , u(j0 +1) ]. Therefore using the monotonicity of quantile functions, −1 −1 Πn,s (u | X) − Φ−1 {u; 0, Iξ−1 (θ0 )} ≤ Πn,s (u(j0 +1) | X) − Φ−1 {u; 0, Iξ−1 (θ0 )} −1 ≤ Πn,s (u(j0 +1) | X) − Φ−1 {u(j0 +1) ; 0, Iξ−1 (θ0 )} + Φ−1 {u(j0 +1) ; 0, Iξ−1 (θ0 )} − Φ−1 {u(j0 ) ; 0, Iξ−1 (θ0 )} < /2 + /2 < . and −1 −1 Πn,s (u | X) − Φ−1 {u; 0, Iξ−1 (θ0 )} ≥ Πn,s (u(j0 ) | X) − Φ−1 {u; 0, Iξ−1 (θ0 )} −1 ≥ Πn,s (u(j0 ) | X) − Φ−1 {u(j0 ) ; 0, Iξ−1 (θ0 )} + Φ−1 {u(j0 ) ; 0, Iξ−1 (θ0 )} − Φ−1 {u(j0 +1) ; 0, Iξ−1 (θ0 )} > − /2 − /2 > −. Therefore, we have shown that sup u∈[u1 ,u2 ] −1 Πn,s (u | X) − Φ−1 {u; 0, Iξ−1 (θ0 )} = op (1), which implies that for the quantiles in terms of ξ,   −1 Πn (u | X) − ξ − {nIξ (θ0 )}−1/2 Φ−1 (u) = op n−1/2 . sup u∈[u1 ,u2 ] Similarly for the overall posterior   ˆ − {nIξ (θ0 )}−1/2 Φ−1 (u) = op n−1/2 . Π−1 (u | X) − ξ n sup u∈[u1 ,u2 ] Therefore, by the triangular inequality,   −1 ˆ + op n−1/2 . Πn (u | X) − Π−1 (u | X) ≤ ξ − ξ n sup u∈[u1 ,u2 ] By plugging in the order ξ − ξˆ = op (m−1/2 ) from the proof of Theorem 1, we have sup   −1 −1/2 . Πn (u | X) − Π−1 n (u | X) = op m u∈[u1 ,u2 ] 31 (A.29) If we further assume that θ̂1 is an unbiased estimator of θ0 , then Lemma 4 says that ξ − ξˆ =  op n−1/2 . Therefore, using the results from Part (i), we have      bias Πn (ξ | X) − bias {Πn (ξ | X)} = ξ − ξˆ + op n−1/2 = op n−1/2 . Then (A.29) leads to sup       −1 −1/2 −1/2 −1/2 Πn (u | X) − Π−1 (u | X) ≤ o n + o n = o n , p p p n u∈[u1 ,u2 ] which completes the proof. B  Theoretical Results for the Posterior Monte Carlo Errors In practice, the credible intervals are calculated from the averages of empirical quantiles from subset posterior samples. In Algorithm 1, suppose that for each j = 1, . . . , K, Π◦j (θ) and κj (θ, θ0 ) for θ, θ0 ∈ Θ are the initial distribution and the transition kernel for the Markov chain of the jth subset posterior. {θ1j , . . . , θT j } with sample size T are drawn sequentially with θ1j ∼ Π◦j (·) and θl+1,j ∼ κj (θlj , ·) for l = 1, . . . , T − 1. ξlj = a> θlj + b for l = 1, . . . , T and b m (ξ | Xj ) be the empirical distribution of {ξ1j , . . . , ξT j } for j = 1, . . . , K. j = 1, . . . , K. Let Π b n (ξ | X) be the Wasserstein barycenter of Π b m (ξ | X1 ), . . . , Π b m (ξ | XK ), which can be Let Π P b −1 b −1 (u | X) = K Π calculated through its quantile function Π n j=1 m (u | Xj )/K for all u ∈ (0, 1). Let L2 {Πm (· | Xj )} for j = 1, . . . , K be the L2 space of functions on Θ such that for any f ∈ L2 {Πm (· | Xj )}, kf (θ)k2L2 ,j = EΠm (·|Xj ) f 2 (θ) < ∞ almost surely in Pθ0 . We need three additional assumptions as follows. Assumption 8. The jth subset posterior Πm (θ | Xj ) is the unique stationary distribution that R satisfies the balance condition πm (θ0 | Xj ) = Θ πm (θ | Xj )κj (θ, θ0 )dθ for any θ, θ0 ∈ Θ, where πm (θ | Xj ) is the density of Πm (θ | Xj ). Furthermore, the Markov chain of each subset posterior is reversible with the detailed balance condition πm (θ | Xj )κj (θ, θ0 ) = πm (θ0 | Xj )κj (θ0 , θ) for any θ, θ0 ∈ Θ and all j = 1, . . . , K. Assumption 9. max1≤j≤K EΠm (·|Xj ) kθk7 is upper bounded by a constant almost surely in Pθ0 . max1≤j≤K EΠm (·|Xj ) {πj◦ (θ)/πm (θ | Xj )}3 is upper bounded by a constant almost surely in Pθ0 , where πj◦ (θ) is the density of Π◦j (θ) for j = 1, . . . , K. Assumption 10. Every subset posterior Πm (θ | Xj ) (j = 1, . . . , K) is ρ-mixing: there exists P a nonnegative constant sequence {ρl }l≥1 decreasing to zero and ∞ l=1 ρl < ∞, such that almost surely in Pθ0 , for any integer l ≥ 1, any f ∈ L2 {Πm (· | Xj )} and all j = 1, . . . , K, Eκl (·|θ1j =θ) f (θl+1,j ) − EΠm (·|Xj ) f (θ) j L2 ,j ≤ ρl f (θ) − EΠm (·|Xj ) f (θ) L2 ,j , where θl+1,j is the lth draw in the Markov chain with initial draw θ1j , and Eκl (·|θ1j =θ) is the j conditional distribution of θl+1,j given θ1j = θ. Then the following theorem accounts for the Monte Carlo error in the empirical version of Wasserstein posterior due to finite sample approximations. 32 Theorem 3. Suppose Assumptions 1–10 hold. Then for two arbitrary fixed numbers 0 < u1 < u2 < 1, n o     b n (ξ | X) , Πn (ξ | X) = Op m−1/2 + Op T −1/4 ; W2 Π n o     b n (ξ | X) − bias {Πn (ξ | X)} = op m−1/2 + Op T −1/2 ; bias Π o   n b n (ξ | X) − var {Πn (ξ | X)} = op (n−1 ) + Op T −1/2 ; var Π     b −1 (u | X) − Π−1 (u | X) = op m−1/2 + Op T −1/2 , sup Π n n u∈[u1 ,u2 ] where Op and op are in Pθ0 -probability. Furthermore, if θ̂1 is an unbiased estimator of θ0 , then n o     b n (ξ | X) , Πn (ξ | X) = Op n−1/2 + Op T −1/4 ; W2 Π n o     b n (ξ | X) − bias {Πn (ξ | X)} = op n−1/2 + Op T −1/2 ; bias Π     −1 −1/2 −1/2 b −1 sup Π (u | X) − Π (u | X) = o n + O T . p p n n u∈[u1 ,u2 ] Proof of Theorem 3: b m (ξ | Xj ) In this proof, we first establish the key relations between the empirical distribution Π and the exact continuous subset posterior Πm (ξ | Xj ), using the recent results from [9]. Given the linear relation ξ = a> θ + b and all the assumptions in Theorem 3, h n oi1+δ b m (ξ | Xj ), Πm (ξ | Xj ) ≤ C1 T −1/2 EΠ◦j W1+δ Π (A.30) almost surely in Pθ0 for all j = 1, . . . , K, where 0 ≤ δ ≤ 1, C1 is a constant that only depends on the sequence {ρl }l≥1 , the constant upper bound of max1≤j≤K EΠm (·|Xj ) kθk7 , and the constant upper bound of max1≤j≤K EΠm (·|Xj ) {πj◦ (θ)/πm (θ | Xj )}3 in Assumption 9. The expectation in (A.30) is taken with respect to Π◦j because the first posterior sample θ1j is drawn from the initial distribution Π◦j . Given Assumptions 8-10, the inequality (A.30) is the consequence of Theorem 15 of [9] by setting their d = 1, p = 1 + δ, r = 3, q = 7. b n (ξ | X), we can establish a similar inequality to For the empirical Wasserstein barycenter Π Lemma 3: for any l ≥ 1, Wl  K h i  h i 1 X −1 b b m (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 , Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )} ≤ Wl Π K j=1 (A.31) where ξˆ is defined in Lemma 3. Therefore, taking l = 2 in (A.31), we obtain that  h i b n (ξ | X), Φ ξ; ξ, {nIξ (θ0 )}−1 EP EΠ◦ ,...,Π◦ W 2 Π θ0 (i) ≤ 1 K 2 K  h i 1 X b m (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 EPθ0 EΠ◦j W22 Π K j=1 (ii) ≤ K n o 2 X b m (ξ | Xj ), Πm (ξ | Xj ) EPθ0 EΠ◦j W22 Π K j=1 33 K  h i 2 X + EPθ0 W22 Πm (ξ | Xj ), Φ ξ; ξˆj , {nIξ (θ0 )}−1 K j=1 (iii) = O(T −1/2 ) + o(n−1 ), where (i) is from the relation between l1 and l2 norms, (ii) is from the triangular inequality of the W2 distance and (x1 + x2 )2 ≤ 2(x21 + x22 ) for x1 , x2 ∈ R, and (iii) follows from i h (A.23) and (A.30) b with δ = 1. By Markov’s inequality, it is clear that W2 Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )}−1 = op (n−1/2 ) + Op (T −1/4 ). We can also take l = 1 in (A.31) and obtain that  h i b n (ξ | X), Φ ξ; ξ, {nIξ (θ0 )}−1 W1 Π 1 Z = 0 j=1 1 Z K i 1 X h b −1 Πm (u | Xj ) − ξˆj − {nIξ (θ0 )}−1/2 Φ−1 (u) du K = 0 K 1 X {r̂j (u) + rj (u)} du, K (A.32) j=1 −1 b −1 where rj (u) is defined in (A.13) and r̂j (u) = Π m (u | Xj ) − Πm (u | Xj ). b n (ξ | X), we have For the bias of Π b n (ξ | X)} − bias{Πn (ξ | X)} = E b (ξ) − EΠn (ξ|X) (ξ) bias{Π Πn (·|X) Z = 1 b −1 (u | X)du − Π n 0 ≤ 1 K 1 Z Z −1 Πn (u | X)du ≤ 0 K Z 1 X j=1 |r̂j (u)| du = 0 1 K 0 K X 1 K 1 X r̂j (u) du K j=1 n o b m (ξ | Xj ), Πm (ξ | Xj ) . W1 Π (A.33) j=1 By Markov’s inequality and (A.30) with δ = 0, for any c > 0,   K n o X 1 b m (ξ | Xj ), Πm (ξ | Xj ) > cT −1/2  P W1 Π K j=1 n o P K 1 b ◦ E E W Π (ξ | X ), Π (ξ | X ) 1 m j m j P Πj θ0 j=1 K C1 ≤ . ≤ −1/2 c cT Therefore, we have shown that b n (ξ | X)} − bias{Πn (ξ | X)} = Op (T −1/2 ), bias{Π K Z 1 X 1 |r̂j (u)| du = Op (T −1/2 ). K 0 j=1 Together with Theorem 2, we conclude that b n (ξ | X)} − bias{Πn (ξ | X)} bias{Π b n (ξ | X)} − bias{Πn (ξ | X)} ≤ bias{Πn (ξ | X)} − bias{Πn (ξ | X)} + bias{Π 34 (A.34) = Op (m−1/2 ) + Op (T −1/2 ). Furthermore, if θ̂1 is unbiased for θ, then b n (ξ | X)} − bias{Πn (ξ | X)} = Op (n−1/2 ) + Op (T −1/2 ). bias{Π The results for quantiles can be derived similarly and therefore the proofs are omitted here. b n (ξ | X). Similar to the derivation in Next we derive the rate for the posterior variance of Π the proof of Theorem 2(ii), we can obtain the following equality: n o b n (ξ | X) var Π  2 2  Z 1 K K Z 1 X X 1 1 1 = + {r̂j (u) + rj (u)} du −  {r̂j (u) + rj (u)}du nIξ (θ0 ) K K 0 0 j=1 1 Z + 2 {nIξ (θ0 )}−1/2 j=1 Φ−1 (u) 0 K 1 X {r̂j (u) + rj (u)}du. K (A.35) j=1 We bound the last three terms in the display above. It is clear that by Cauchy-Schwarz inequality, the third term is upper bounded by the second term. For the second term, we have 2  Z 1 K X 1 {r̂j (u) + rj (u)} du K 0 j=1  2 2  Z 1 X Z 1 X K K   1 1 ≤2 r̂j (u) du + 2 rj (u) du   0  K j=1 0  K j=1 o  h i n b m (ξ | Xj ), Πm (ξ | Xj ) + 2W 2 Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )}−1 ≤ 2W22 Π 2 = Op (T −1/2 ) + op (n−1 ), (A.36) where the last relation follows from (A.24) and applying Markov’s inequality to (A.30). For the last term in (A.35), we have the following bound: 2 {nIξ (θ0 )} −1/2 1 Z Φ−1 (u) 0 ≤ 2 {nIξ (θ0 )}−1/2 ≤ 2 {nIξ (θ0 )} −1/2 j=1  Z 1 0  K 1 X {r̂j (u) + rj (u)}du K  Z 1 K K  X X 1 1 r̂j (u) du + Φ−1 (u) rj (u) du Φ−1 (u)  K K 0 j=1 Z 1 Φ−1 (u) 1+1/δ j=1 δ/(1+δ) ( Z du 0 0 1 K 1 X r̂j (u) K j=1 )1/2 ! K X 2 1 + Φ−1 (u) rj (u) du K 0 0 j=1 (   n o 2(1+δ)/2 1+δ −1/2 b n (ξ | X), Πn (ξ | X) √ ≤ 2 {nIξ (θ0 )} Γ W1+δ Π 2 π )  h i + W2 Πn (ξ | X), Φ ξ; ξ, {nIξ (θ0 )}−1 Z 1 2 1/2 ( Z du 1 35 1+δ )1/(1+δ) du 2 = √ {nIξ (θ0 )}−1/2 2(1+δ)/2 Γ π  1+δ 2  n o b n (ξ | X), Πn (ξ | X) + op (n−1 ), W1+δ Π (A.37) where in the second inequality we used the Hölder’s inequality and the Cauchy-Schwarz inequality, and the last step is from Theorem 1. By (A.30), almost surely in Pθ0 , K o o n n X b n (ξ | X), Πn (ξ | X) ≤ 1 b m (ξ | Xj ), Πm (ξ | Xj ) EΠ◦1 ,...,Π◦K W1+δ Π EΠ◦j W1+δ Π K j=1 (i) ≤ 1 K K  X EΠ◦j h n oi1+δ 1/(1+δ) b m (ξ | Xj ), Πm (ξ | Xj ) W1+δ Π ≤ C1 T −1/{2(1+δ)} , (A.38) j=1 where (i) is from 0 ≤ δ ≤ 1 and Jensen’s inequality. Now we set δ = min{1, log n/(2 log T )} and derive from (A.39) that   n o 2 1+δ b n (ξ | X), Πn (ξ | X) W1+δ Π EΠ◦1 ,...,Π◦K √ {nIξ (θ0 )}−1/2 2(1+δ)/2 Γ 2 π 2 ≤ √ {nIξ (θ0 )}−1/2 × 2Γ(1) × C1 T −1/{2(1+δ)} π   1 1 −1/2 ≤ 4C1 {Iξ (θ0 )} exp − log n − log T 2 2(1 + δ)   1 δ 1 −1/2 log T = 4C1 {Iξ (θ0 )} exp − log T − log n + 2 2 2(1 + δ)   1 δ ≤4C1 {Iξ (θ0 )}−1/2 T −1/2 exp − log n + log T 2 2   1 ≤4C1 {Iξ (θ0 )}−1/2 T −1/2 exp − log n = o(T −1/2 ). 4 Hence, by Markov’s inequality, the right-hand side of (A.37) can be bounded by 2 {nIξ (θ0 )}−1/2 Z 0 1 Φ−1 (u) K 1 X {r̂j (u) + rj (u)}du = op (T −1/2 ) + op (n−1 ). K (A.39) j=1 Now we combine (A.35), (A.36) and (A.39) and conclude that n o 1 b n (ξ | X) = + Op (T −1/2 ) + op (n−1 ) + op (T −1/2 ) + op (n−1 ) var Π nIξ (θ0 ) 1 = + op (n−1 ) + Op (T −1/2 ). nIξ (θ0 ) If we compare this with the results in Theorem 2, we obtain that n o   b n (ξ | X) − var {Πn (ξ | X)} = op (n−1 ) + Op T −1/2 . var Π This concludes the proof of Theorem 3. C  Justification of Assumption 7 In this section, we verify Assumption 7 for two special examples: the normal linear model and some exponential family distributions. Without loss of generality, all the samples considered in this section refer to the first subset sample X1 in Assumption 7. 36 1. Normal Linear Model We consider the following normal linear model based on independent and identically distributed observations:  yi = Zi> β + εi , εi ∼ N 0, σ 2 , i = 1, . . . , m, (A.40) where dim(β) = p and εi ’s are independent. We write y = (y1 , . . . , ym )> , Z = (Z1 , . . . , Zm )> , ε = (ε1 , . . . , εm )> , and the true parameter is θ0 = (β0> , σ02 )> . We impose the following conjugate prior on the parameter θ = (β > , σ 2 )> :  β σ 2 , µ∗ , Ω ∼ N µ∗ , σ 2 Ω , σ 2 a, b ∼ Inverse-Gamma (a/2, b/2) , where a > 4, b > 0 is to guarantee a finite variance for the prior of σ 2 , and Ω is a positive definite matrix. The subset posterior after the stochastic approximation is given by     K(y − Zβ)> (y − Zβ) 2 2 −Km/2 πm β, σ y, Z ∝ (σ ) exp − × 2σ 2     (β − µ∗ )> Ω−1 (β − µ∗ ) b 2 −a/2−1 exp − × (σ ) exp − 2 2σ 2 2σ We have the following proposition, which shows that the ψ(·) function in Assumption 7 is L1 integrable uniformly for all m and K, which implies the uniform integrability condition. Proposition 1. In the normal linear model (A.40), assume that kµ∗ k is upper bounded by a constant. Assume that the eigenvalues of Ω and Z > Z/m are lower and upper bounded by constants for all m ≥ 2. Assume that the error εi in (A.40) has finite 4th moment. Let βb and c2 be the maximum likelihood estimators of β and σ 2 respectively. Then σ sup m≥2,K≥1 sup m≥2,K≥1 b 2 < +∞, EPθ0 EΠm (·|y,Z) Kmkβ − βk (A.41) c2 k2 < +∞. EPθ0 EΠm (·|y,Z) Kmkσ 2 − σ (A.42) Proof of Proposition 1: Let kβ0 k, kµ∗ k ≤ c1 < +∞. Let the eigenvalues of Ω and Z > Z/m be lower bounded by c2 > 0 and upper bounded by c3 > 0. Let E(ε4i ) = c4 < +∞. The subset posterior distributions of β and σ 2 are given by   −1  b∗ ∗ ∗ > −1 KZ Z + Ω , β y, Z, µ , Ω, a, b ∼ Multi-ta+Km+p β , a + Km   a + Km b∗ σ 2 y, Z, µ∗ , Ω, a, b ∼ Inverse-Gamma , , 2 2 −1    β ∗ = KZ > Z + Ω−1 KZ > y + Ω−1 µ∗ ,    −1 b∗ = b + µ∗> Ω−1 µ∗ + Ky > Im − KZ KZ > Z + Ω−1 Z > y, 37 where Multi-tν (µ, Σ) denotes the multivariate-t distribution with mean µ, variance matrix Σ, and ν degrees of freedom. The maximum likelihood estimators of β and σ 2 are given by βb = (Z > Z)−1 Z > y, n o −1 > 2 −1 > > −1 > c 2 σ = m ky − Z βk = m y Im − Z(Z Z) Z y. We first prove (A.41). It is clear that  b 2, b 2 = KmEP tr varπ (·|y,Z) (β) + KmEP kEΠ (·|y,Z) β − βk EPθ0 EΠm (·|y,Z) Kmkβ − βk θ0 θ0 m m (A.43) where tr(A) denotes the trace of a generic square matrix A. The posterior variance of β can be bounded as  KmEPθ0 tr varπm (·|y,Z) (β)   −1  a + Km + p b∗ > −1 = Km × tr EPθ0 KZ Z + Ω a + Km + p − 2 a + Km  −1    > > −1 2 −1 ≤ 2 tr EPθ0 b + c1 c2 + Ky y KZ Z + Ω n −1 o  −1 2 2 I + Kmc c + Kmσ Kmc I + c ≤ 2 tr EPθ0 b + c21 c−1 p 2 2 p 1 0 3 2 = 2p Km(c21 c2 + σ02 ) + b + c21 c−1 2p(c21 c2 + σ02 ) 2 → as m → ∞. c2 Kmc2 + c−1 3 (A.44) The second term in (A.43) can be bounded as b 2 KmEPθ0 kEΠm (·|y,Z) β − βk  −1  −1   −1 = KmEPθ0 KZ > Z + Ω−1 − KZ > Z (KZ > y) + KZ > Z + Ω−1 Ω−1 µ∗ ≤ 2KmEPθ0 + 2Km  > KZ Z + Ω > KZ Z + Ω ≤ 2KmEPθ0 + 2Km   > −1 −1 −1 KZ Z + Ω −1 Kmc2 Ip + c−1 3 Ip −1  > − KZ Z −1  2 2 > (KZ y) 2 Ω −1 ∗ µ −1 −1 2 Ω −1 c−1 2 c1 > (Z Z) −1 > (Z y) 2 2 −1 −1 > −1 > 2c21 c2 (Z Z) (Z y) + Kmc2 + c−1 3 Kmc42   2 2Km 2c21 2 > −1 > + ≤ −1 2 2 kβ0 k + EPθ0 (Z Z) (Z ε) Kmc42 (Kmc2 + c3 ) c2  2Km 2c21 −2 2 2 ≤ c + c c σ + → 0 as m → ∞. 3 1 0 2 2 2 Kmc42 (Kmc2 + c−1 3 ) c2 ≤ 2KmEPθ0 (A.45) Since (A.44) and (A.45) have finite limits as m → ∞, they are both bounded by constants, regardless of the value of K. They together with (A.43) lead to (A.41). 38 Next we prove (A.42). We have the similar decomposition 2 c2 k2 = KmEP var EPθ0 EΠm (·|y,Z) Kmkσ 2 − σ πm (·|y,Z) (σ ) θ0 c2 k2 . + KmEPθ0 kEΠm (·|y,Z) σ 2 − σ (A.46) We show an useful bound for the square of y > y:  2  2 EPθ0 y > y = EPθ0 kZβ0 + εk2 n o2  2 ≤ 4EPθ0 kZβ0 k2 + kεk2 ≤ 4EPθ0 β0> (Z > Z)β0 + kεk2 !2 m  2 X 2 2 2 4 2 2 ≤ 4EPθ0 mc1 c3 + kεk ≤ 8m c1 c3 + 8EPθ0 εi i=1 ≤ 8m2 c41 c23 + 8mEPθ0 m X ε4i ≤ 8m2 (c41 c23 + c4 ). (A.47) i=1 By using (A.47), the first term in (A.46) can be bounded as b∗2 /4 {(Km + a)/2 − 2}3    2 −1  ∗> −1 ∗ > > −1 > b + µ Ω µ + Ky Im − KZ KZ Z + Ω Z y KmEPθ0 varπm (·|y,Z) (σ 2 ) ≤ KmEPθ0 2 EP (Km)2 θ0 2  2 > 2 −1 + Ky y b + c c E ≤ P 1 2 (Km)2 θ0  2 2 4(b + c21 c−1 4 > 2 ) + E y y ≤ P (Km)2 m 2 θ0 ≤ ≤ 2 4(b + c21 c−1 2 ) + 32(c41 c23 + c4 ) → 32(c41 c23 + c4 ) as m → ∞. (Km)2 (A.48) And the second term in (A.46) can be bounded as c2 KmEPθ0 EΠm (·|y,Z) σ 2 − σ 2 = KmEPθ0 b∗ /2 c2 −σ (a + Km)/2 − 1 2  b + µ∗> Ω−1 µ∗ (a − 2)y > Im − Z(Z > Z)−1 Z > y − = KmEPθ0 Km + a − 2 (Km + a − 2)m n −1 > o 2 Ky > Z(Z > Z)−1 Z > − KZ KZ > Z + Ω−1 Z y + Km + a − 2 2 h n o i2 3Km b + µ∗> Ω−1 µ∗ 3(a − 2) −1 > > −1 > ≤ + E m y I − Z(Z Z) Z y m P (Km + a − 2)2 (Km + a − 2)2 θ0 n o2 3Km > > −1 −1 −1 > −1 > + E y Z(Z Z + Ω /K) Ω (Z Z) Z y P (Km + a − 2)2 θ0  2 2 3(b + c21 c−1 3(a − 2) −1 > 2 ) ≤ + E m y y P Km (Km + a − 2)2 θ0  2 3 > > + E y ZZ y 2 Pθ0 2 2 Km(mc2 + c−1 3 /K) c2 mc2  2 2 3(b + c21 c−1 24(a − 2)(c41 c23 + c4 ) 3pmc3 > 2 ) E y y ≤ + + P θ 0 Km (Km + a − 2)2 Km4 c62 39 ≤ 2 3(b + c21 c−1 24(a − 2)(c41 c23 + c4 ) 24pc3 (c41 c23 + c4 ) 2 ) + + → 0 as m → ∞, Km (Km + a − 2)2 Kmc62 (A.49) where we have used the relation λ(ZZ > ) ≤ tr(ZZ > ) = tr(Z > Z) ≤ pλ(Z > Z) ≤ pmc3 , and λ(A) denotes the largest eigenvalue of a generic matrix A. Since (A.48) and (A.49) have finite limits as m → ∞, they are both bounded by constants, regardless of the value of K. They together with (A.46) lead to (A.42).  2. Some Exponential Family Models In this section, we verify Assumption 7 for the following three commonly used exponential family distributions: Poisson, exponential, and binomial. Proposition 2. (i) Suppose the data yi (i = 1, . . . , m) are independent and identically distributed as Poisson(θ) with the probability mass function p(y|θ) = θy e−θ /y! and the true parameter θ0 . Suppose the prior on θ is Gamma(a, b) for some constants a > 0, b > 0. Let P θb = m i=1 yi /m be the maximum likelihood estimator of θ. Then 2 sup m≥1,K≥1 EPθ0 EΠm (·|y) Km θ − θb < +∞; (ii) Suppose the data yi (i = 1, . . . , m) are independent and identically distributed as Exp(θ) with the probability density function p(y|θ) = θe−θy and the true parameter θ0 . Suppose the prior P on θ is Gamma(a, b) for some constants a > 0, b > 0. Let θb = m/ m i=1 yi be the maximum likelihood estimator of θ. Then 2 sup m≥3,K≥1 EPθ0 EΠm (·|y) Km θ − θb < +∞; (iii) Suppose the data yi (i = 1, . . . , m) are {0, 1} binary data independent and identically distributed as Bernoulli(θ) with the probability density function p(y|θ) = θy (1 − θ)1−y and the true parameter θ0 ∈ (0, 1). Suppose the prior on θ is Beta(a, b) for some constants a > 0, b > 0. P Let θb = m i=1 yi /m be the maximum likelihood estimator of θ. Then 2 sup m≥1,K≥1 EPθ0 EΠm (·|y) Km θ − θb < +∞; Proof of Proposition 2: P (i) The subset posterior distribution of θ is Gamma(K m i=1 yi + a, Km + b). Therefore 2 EPθ0 EΠm (·|y) Km θ − θb   2 b = EPθ0 Km EΠm (·|y) (θ) − θ + Kmvarπm (·|y) (θ) ) ( Pm P P 2 Km (K m K m i=1 yi + a) i=1 yi i=1 yi + a + − = EPθ0 Km Km + b m (Km + b)2 Pm P   K(b i=1 yi − am)2 Km (K m i=1 yi + a) = EPθ0 + m(Km + b)2 (Km + b)2 P P   2 2 2 2Kb2 m m Km (K m i=1 yi + 2Km a i=1 yi + a) ≤ EPθ0 + m(Km + b)2 (Km + b)2 40 = 2Km2 b2 (θ02 + θ0 ) + 2Km2 a2 Km (Kmθ0 + a) + → θ0 m(Km + b)2 (Km + b)2 as m → ∞. Hence, the conclusion holds. P (ii) The subset posterior distribution of θ is Gamma(Km + a, K m i=1 yi + b), and notice that Pm W ≡ 1/ i=1 yi follows Inverse-Gamma(m, θ0 ) with E(W ) = θ0 /(m − 1), E(W 2 ) = θ02 /{(m − 1)(m − 2)}, E(W 3 ) = θ03 /{(m − 1)(m − 2)(m − 3)}. Therefore 2 EPθ0 EΠm (·|y) Km θ − θb   2 = EPθ0 Km EΠm (·|y) (θ) − θb + Kmvarπm (·|y) (θ) ( ) 2 Km + a Km (Km + a) m P P = EPθ0 Km + − Pm 2 K m (K m i=1 yi + b i=1 yi i=1 yi + b) Pm   K(a i=1 yi − bm)2 Km (Km + a) Pm Pm P + = EPθ0 2 2 ( i=1 yi )(K i=1 yi + b) (K m i=1 yi + b) ( ) P 2a2 ( m y )2 + 2b2 m2 m (Km + a) i=1 Pmi ≤ EPθ0 + P 2 3 K( i=1 yi ) K( m i=1 yi ) ≤ 2a2 θ0 2b2 m2 θ03 m (Km + a) θ02 + + → θ02 K(m − 1) K(m − 1)(m − 2)(m − 3) K(m − 1)(m − 2) as m → ∞. Therefore, the conclusion holds. (iii) The subset posterior distribution of θ is Beta {K fore Pm i=1 yi + a, K Pm i=1 (1 − yi ) + b}. There- 2 EPθ0 EΠm (·|y) Km θ − θb   2 = EPθ0 Km EΠm (·|y) (θ) − θb + Kmvarπm (·|y) (θ) " # P Pm Pm Pm 2 K m y + a Km (K y + a) {K (1 − y ) + b} y i i i i i=1 i=1 i=1 = EPθ0 Km − i=1 + Km + a + b m (Km + a + b)2 (Km + a + b + 1) " P 2 2Km(a + b)2 ( m 2Kma2 i=1 yi ) + ≤ EPθ0 (Km + a + b)2 m2 (Km + a + b)2 # P Pm Km (K m y + a) {K (1 − y ) + b} i i=1 i i=1 + (Km + a + b)2 (Km + a + b + 1)  2Km(a + b)2 m2 θ02 + mθ0 (1 − θ0 ) 2Kma2 = + (Km + a + b)2 m2 (Km + a + b)2  2 2 Km K (m − m)θ0 (1 − θ0 ) + Kam(1 − θ0 ) + Kbmθ0 + ab + (Km + a + b)2 (Km + a + b + 1) → θ0 (1 − θ0 ) as m → ∞. Therefore, the conclusion holds.  41 D Data Analysis D.1 Simulated data analysis: Linear model with varying dimension The prior distributions of β and σ are specified as follows: β ∼ generalized double Pareto(α, η), σ ∼ Half-t(ν, A). The prior density of β = (β1 , . . . , βp )> given α and η is given by   p Y |βj | −(α+1) α π(β | α, η) = 1+ . 2η η j=1 The prior mean and variance of β are set to be 0 and 2η 2 (α − 1)−1 (α − 2)−1 . α and η have independent hyperpriors with densities π(α) = 1/(1 + α)2 and π(η) = 1/(1 + η)2 . The Half-t prior has a convenient parameter expanded form in terms of Inverse-Gamma(a, b) distribution, where a and b are shape and scale parameters: if σ 2 | ρ ∼ Inverse-Gamma(ν/2, ν/ρ) and ρ ∼ Inverse-Gamma(1/2, 1/A2 ), then σ ∼ Half-t(ν, A). We fixed the hyperparameters ν and A at recommended default values 2 and 100. We used griddy Gibbs for generating samples of α and η from their posterior distribution; see Section 3 in [3] for details. The Gibbs sampler in [3] is modified by changing the sample size, n, in their sampler to mK, where m is sample size for the subset and K is the number of subsets. Let N (m̂1 , V̂1 ), . . . , N (m̂K , V̂K ) represent the asymptotic approximations of K subset posteriors, then [2] has shown that their barycenter in Wasserstein-2 space is also Gausssian with mean m∗ and covariance matrix V ∗ , where m∗ = K −1 K X m̂j and V ∗ satisfies j=1 K  X 1/2 V∗ 1/2 V̂j V ∗ 1/2 = KV ∗ . j=1 Therefore, we use the formula above to calculate the W2 barycenter of K normal approximations to the K subset posteriors. Given V̂1 , . . . , V̂K , we can find V ∗ efficiently using fixed-point iteration. Although the priors of β and σ specified above are heavy-tailed with infinite second moments, in the following proposition and its proof, we verify that every subset posterior after conditioning on the first m0 observations has finite second moment in both β and σ, for some fixed integer m0 . Proposition 3. Suppose the form of a linear model and its priors are specified in Section 4.1 of the main paper with fixed ν > 0 and A > 0. Assume that in the model X and  are independent. Let ỹ and X̃ be the response vector and the design matrix of the first m0 observations (m0 ≥ 1). Suppose that the true parameters are θ0 = (β0> , σ0 )> with σ0 > 0. Assume that the eigenvalues of X̃ > X̃ are bounded from above and below by positive constants almost surely. Then the posterior distribution of θ = (β > , σ)> conditional on ỹ and X̃ has finite second moment almost surely in Pθ0 , if m0 satisfies m0 ≥ p + 4. 42 Proof of Proposition 3: For convenience we define the quadratic term S(β, ỹ, X̃) = (ỹ − X̃β)> (ỹ − X̃β), which has  + (β − β̃)> X̃ > X̃(β − β̃) with ˜ = ỹ − X̃β0 , the decomposition S(β, ỹ, X̃) = ˜> (Im0 − H̃)˜ H̃ = X̃(X̃ > X̃)−1 X̃ > , Im0 being the m0 -dimensional identity matrix, and β̃ = (X̃ > X̃)−1 X̃ > ỹ. Since m0 ≥ p + 4 and X̃ > X̃ is nonsingular, Im0 − H̃ is idempotent with rank m0 − p > 0. Since  is then almost surely positive. Let the smallest σ0 > 0, the residual sum of squares ˜> (Im0 − H̃)˜ > eigenvalue of X̃ X̃ be lower bounded by c1 > 0. Then S(β, ỹ, X̃) ≥ ˜> (Im0 − H̃)˜  + c1 kβ − β̃k2 . The subset posterior of the model parameter θ = (β > , σ)> given only ỹ, X̃ has the following expression πm0 (β, σ | ỹ, X̃, ν, A) o n K S(β, ỹ, X̃) π(β)π(σ | ν, A) (2π)−Km0 /2 σ −Km0 exp − 2σ 2 n o = RR K (2π)−Km0 /2 σ −Km0 exp − 2σ π(β)π(σ | ν, A)dβdσ 2 S(β, ỹ, X̃) n on o−(ν+1)/2 K π(β) σ −Km0 exp − 2σ 1 + ν −1 (σ/A)2 2 S(β, ỹ, X̃)  =  n o n o −(ν+1)/2 R R∞ 2 K −Km −1 0 exp − 2σ2 S(β, ỹ, X̃) 1 + ν (σ/A) dσ π(β)dβ 0 σ (A.50) where the likelihood has been raised to the power of K according to our stochastic approximation. In the following, we bound EΠm (·|ỹ,X̃,ν,A) kβk2 and EΠm (·|ỹ,X̃,ν,A) (σ 2 ) respectively. 0 Step 1: Show that EΠm 0 (·|ỹ,X̃,ν,A) 0 kβk2 is finite almost surely in Pθ0 . In the following, we use (A.50) to calculate EΠm (·|ỹ,X̃,ν,A) kβk2 and bound its numerator 0 and denominator respectively. For the numerator part, we have  n Z ∞Z o−(ν+1)/2 K 2 −Km0 kβk σ exp − 2 S(β, ỹ, X̃) 1 + ν −1 (σ/A)2 π(β)dβdσ 2σ 0 Rp   Z ∞  Z K 1/2 ν+1 2 −(Km0 +ν+1) ≤ (Aν ) kβk π(β) σ exp − 2 S(β, ỹ, X̃) dσ dβ 2σ Rp 0   Km + ν 0 ≤ 2(Km0 +ν)/2−1 K −(Km0 +ν)/2 (Aν 1/2 )ν+1 Γ 2 Z kβk2 × π(β) × (A.51) n o(Km0 +ν)/2 dβ. Rp ˜> (Im0 − H̃)˜  + c1 kβ − β̃k2 The last integral of (A.51) can be further bounded by Z kβk2 × π(β) n o(Km0 +ν)/2 dβ Rp > 2 ˜ (Im0 − H̃)˜  + c1 kβ − β̃k   Z 2 kβ − β̃k2 + kβ̃k2 × π(β) ≤ n o(Km0 +ν)/2 dβ Rp > 2 ˜ (Im0 − H̃)˜  + c1 kβ − β̃k Z o−(Km0 +ν)/2+1 n ≤ 2c−1 ˜> (Im0 − H̃)˜  + c1 kβ − β̃k2 π(β)dβ 1 Rp Z n o−(Km0 +ν)/2 + 2kβ̃k2 ˜> (Im0 − H̃)˜  π(β)dβ Rp 43 o−(Km0 +ν)/2 on n 2 > > − H̃)˜  . − H̃)˜  + k β̃k  ˜ (I ≤ 2 c−1  ˜ (I m0 m0 1 (A.52) Next we provide a lower bound for the denominator of (A.50). The integral of σ can be lower bounded by using a change of variable u = KS(β, ỹ, X̃)/(2σ 2 ):  n Z ∞ o−(ν+1)/2 K −Km0 σ exp − 2 S(β, ỹ, X̃) 1 + ν −1 (σ/A)2 dσ 2σ 0 Z o−(Km0 −1)/2 ∞ n o−(ν+1)/2 1n = u(Km0 −3)/2 e−u du KS(β, ỹ, X̃)/2 1 + KS(β, ỹ, X̃)/(2A2 νu) 2 0 o−(Km0 −1)/2 n o−(ν+1)/2 Z ∞ 1n u(Km0 −3)/2 e−u du ≥ KS(β, ỹ, X̃)/2 1 + KS(β, ỹ, X̃)/(2A2 ν) 2 1 o−(Km0 −1)/2 n o−(ν+1)/2 1n ≥ KS(β, ỹ, X̃)/2 1 + KS(β, ỹ, X̃)/(2A2 ν) 2    Km0 − 1 Km0 + 1 (Km0 −3)/2 −1 ×e Γ , (A.53) 2 Km0 − 1 where we have used the fact Km0 ≥ 4 and the lower bound for the incomplete gamma function R ∞ s−1 −u e du ≥ e−1 Γ(s)(1 + 1/s)s−1 for s ≥ 1. Now to evaluate the denominator of (A.50), 1 u we need to integrate the lower bound in (A.53) with respect to β. Consider the set A3 = {β ∈ Rp : kβk ≤ 1}. Clearly the prior of β has positive probability mass on A3 . Define the R R RR constant c3 = A3 π(β)dβ = A3 π(β | α, η)π(α)π(η)dαdηdβ > 0 which only depends on the dimension p. Let the largest eigenvalue of X̃ > X̃ be upper bounded by c2 > 0. Then on A3 , S(β, ỹ, X̃) ≤ c2 kβ − β̃k2 + ˜> (Im0 − H̃)˜  ≤ 2c2 (kβ̃k2 + 1) + ˜> (Im0 − H̃)˜ . This and (A.53) imply that the denominator of (A.50) can be lower bounded by n  Z Z ∞ o−(ν+1)/2  K 2 −1 −Km0 1 + ν (σ/A) dσ π(β)dβ σ exp − 2 S(β, ỹ, X̃) 2σ 0  hn o i−(Km0 −1)/2 c3 Km0 − 1 ≥ Γ 2c2 (kβ̃k2 + 1) + ˜> (Im0 − H̃)˜  K/2 2e 2 h n o i−(ν+1)/2 × 1 + 2c2 (kβ̃k2 + 1) + ˜> (Im0 − H̃)˜  K/(2A2 ν)   Km0 − 1 ≥ 2(Km0 −3)/2 e−1 c3 (Aν 1/2 )ν+1 K −(Km0 +ν)/2 Γ 2 n o−(Km0 +ν)/2 × 2c2 (kβ̃k2 + 1) + ˜> (Im0 − H̃)˜  , (A.54) where the last inequality follows if we choose c2 > Aν 2 /K. We can combine (A.51), (A.52), (A.54) and obtain that EΠm 0 (·|ỹ,X̃,ν,A) kβk2 n on o−(Km0 +ν)/2 > 2 > ≤ c4 K (ν+1)/2 c−1  ˜ (I − H̃)˜  + k β̃k  ˜ (I − H̃)˜  m m 0 0 1 n o(Km0 +ν)/2 × 2c2 (kβ̃k2 + 1) + ˜> (Im0 − H̃)˜  (A.55) for some constant c4 > 0 that only depends on m0 , p, ν, A, c1 , c2 , c3 . Conditional on ỹ, X̃, both kβ̃k2 and ˜> (Im0 − H̃)˜  are almost surely positive constants. Therefore, we have proved that 2 EΠm (·|ỹ,X̃,ν,A) kβk < ∞ almost surely in Pθ0 . 0 44 Step 2: Show that EΠm (·|ỹ,X̃,ν,A) (σ 2 ) is finite almost surely in Pθ0 . 0 To calculate EΠm (·|ỹ,X̃,ν,A) σ 2 , we integrate σ 2 with respect to the posterior density of (A.50). 0 We start with upper bounding the numerator: n  Z Z ∞ o−(ν+1)/2 K 2 −Km0 σ ×σ exp − 2 S(β, ỹ, X̃) 1 + ν −1 (σ/A)2 π(β)dσdβ 2σ   Z ∞  Z 0 K σ −(Km0 +ν−1) exp − 2 S(β, ỹ, X̃) dσ π(β)dβ ≤ (Aν 1/2 )(ν+1)/2 2σ 0   Z n o −(Km +ν)/2+1 0 1 Km0 + ν 1/2 (ν+1)/2 ≤ Γ (Aν ) KS(β, ỹ, X̃)/2 − 1 π(β)dβ 2 2   Km0 + ν −1 ≤ 2(Km0 +ν)/2−2 (Aν 1/2 )(ν+1)/2 K −(Km0 +ν)/2+1 Γ 2 o−(Km0 +ν)/2+1 n , (A.56)  × ˜> (Im0 − H̃)˜ . If we where we have used the fact that (Km0 + ν)/2 ≥ 2 and S(β, ỹ, X̃) ≥ ˜> (Im0 − H̃)˜ combine (A.54) and (A.56), then we can obtain that EΠm n o−(Km0 +ν)/2+1 > 2 (ν+1)/2  ˜ (I (σ ) ≤ c K − H̃)˜  m 5 0 0 (·|ỹ,X̃,ν,A) n o(Km0 +ν+1)/2 × 2c2 (kβ̃k2 + 1) + ˜> (Im0 − H̃)˜  , (A.57) for some constant c5 > 0 that only depends on m0 , p, ν, A, c2 , c3 . Conditional on ỹ, X̃, both kβ̃k2 and ˜> (Im0 − H̃)˜  are almost surely positive constants. Therefore, we have proved that EΠm (·|ỹ,X̃,ν,A) (σ 2 ) < ∞ almost surely in Pθ0 .  0 Remark 2. The second moment of the prior has only appeared in (A.7) in the proof of Lemma 2. We need the right-hand side of (A.7) to go to zero as n → ∞. Since the gdp prior and half-t prior are both heavy tailed, Proposition 3 proposes to replace the prior in (A.7) by the posterior conditional on the first m0 observations in the linear model example. It is straightforward to check that the finite upper bounds for EΠm (·|ỹ,X̃,ν,A) kβk2 and EΠm (·|ỹ,X̃,ν,A) (σ 2 ) in (A.55) and 0 0 (A.57) increase at most exponentially fast in K. Even if K → ∞, we can see that the exponential term exp(−Km1 ) in the right-hand side of (A.7) decays faster than any exponential rate in K since m → ∞. Therefore, the conclusions of Lemma 2 and all subsequent theorems remain valid conditional on the first m0 observations. D.2 Simulated data analysis: Linear mixed effects model Stochastic approximation for subset posteriors can be easily implemented in Stan. The sampling model for linear mixed effects models implies that likelihood of β and Σ is s Z s Y Y L(β, Σ) = p(yi | Xi , Zi , β, ui )p(ui | Σ) dui = φ(yi | Xi β, Zi ΣZi> ), i=1 Rq i=1 where φ(· | µ, Σ) is the multivariate normal density with mean µ and covariance matrix Σ. The likelihood after stochastic approximation is LK (β, Σ) = {L(β, Σ)} K s n oK Y = φ(yi | Xi β, Zi ΣZi> ) . i=1 45 (A.58) The generative model is completed by imposing default priors for β and Σ in Stan. We take advantage of the increment log prob function in Stan to specify that yi | β, Σ ∼ fK (yi | β, Σ), where fK is the density that leads to the term for yi in the likelihood LK (β, Σ) in (A.58). In general fK would be analytically intractable, but in the present case it corresponds to {φ(· | µ, Σ)}K . The computation time of different methods is summarized in Figure 6a. Table 7: 90% credible intervals for fixed effects in simulated data analysis. The upper and lower bounds are averaged over 10 replications. MLE, maximum likelihood estimator; MCMC, Markov chain Monte Carlo based on the full data; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. β1 MLE MCMC VB CMC SDP WASP PIE β2 (-1.01, (-1.01, (-1.01, (-1.01, (-1.01, (-1.01, (-1.01, -1.00) -1.00) -1.00) -0.99) -0.99) -0.99) -0.99) (0.99, (0.99, (0.99, (0.99, (0.99, (0.99, (0.99, β3 1.01) 1.01) 1.01) 1.01) 1.01) 1.01) 1.01) β4 (-1.01, (-1.01, (-1.01, (-1.01, (-1.01, (-1.01, (-1.01, -0.99) -0.99) -1.00) -0.99) -0.99) -0.99) -0.99) (1.00, (1.00, (1.00, (1.00, (1.00, (1.00, (1.00, 1.01) 1.01) 1.01) 1.01) 1.01) 1.01) 1.01) Table 8: Accuracy of approximate posteriors for fixed effects in simulated data analysis. The standard deviation of accuracy across 10 replications is in parentheses. MLE, maximum likelihood estimator; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. β1 MLE VB CMC SDP WASP PIE D.3 0.96 0.86 0.96 0.96 0.95 0.95 (0.01) (0.11) (0.01) (0.01) (0.02) (0.01) β2 0.96 0.87 0.96 0.94 0.95 0.95 (0.01) (0.10) (0.01) (0.02) (0.02) (0.01) β3 0.96 0.86 0.95 0.95 0.96 0.94 β4 (0.01) (0.10) (0.02) (0.03) (0.01) (0.01) 0.96 0.87 0.96 0.95 0.94 0.94 (0.01) (0.10) (0.01) (0.02) (0.02) (0.02) Real data analysis: United States natality data We selected thirteen variables from the United States natality data summarized in Table 9 and analyzed in [1] and [15]. These data are available at http://qed.econ.queensu.ca/jae/ datasets/abrevaya001. The computation time of different methods is summarized in Figure 6b. 46 Table 9: Variables used in the United States natality data Variable Description dmage nlbnl gestat male married hsgrad agesq black novisit adeqcode2 adeqcode3 pretri2 pretri3 age of mother in years number of live births now living length of gestation in weeks indicator variable for baby gender indicator variable for marital status high-school graduate indicator age of mother squared indicator variable for black race indicator of no prenatal care visit indicator that Kessner index 2 indicator that Kessner index 3 indicator that first prenatal visit occurred in 2nd trimester indicator that first prenatal visit occurred in 3nd trimester Table 10: 90% credible intervals for fixed effects in United States natality data analysis. The upper and lower bounds are averaged over 10 folds of cross-validation. MLE, maximum likelihood estimator; MCMC, Markov chain Monte Carlo based on the full data; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. MLE MCMC VB CMC SDP WASP PIE MLE MCMC VB CMC SDP WASP PIE Intercept dmage (-1.31, -0.18) (-0.48, 0.11) (-1.96, -0.94) (-1.13, -0.04) (-0.97, -0.10) (-0.93, 0.03) (-0.93, 0.04) (0.09, 0.57) (-0.04, 0.26) (0.17, 0.56) (0.06, 0.51) (0.05, 0.42) (0.04, 0.45) (0.03, 0.45) married hsgrad (-0.03, (-0.03, (-0.02, (-0.03, (-0.03, (-0.02, (-0.02, 0.06) 0.07) 0.06) 0.07) 0.07) 0.07) 0.07) ageqcode3 MLE MCMC VB CMC SDP WASP PIE (-0.42, -0.22) (-0.37, -0.18) (-0.43, -0.22) (-0.39, -0.19) (-0.38, -0.20) (-0.39, -0.2) (-0.39, -0.2) (0.02, (0.03, (0.02, (0.02, (0.02, (0.03, (0.03, 0.12) 0.13) 0.11) 0.12) 0.12) 0.13) 0.13) novisit (-0.12, (-0.14, (-0.12, (-0.13, (-0.13, (-0.14, (-0.14, 0.16) 0.11) 0.18) 0.17) 0.13) 0.15) 0.15) nlbnl (0.02, (0.02, (0.01, (0.02, (0.02, (0.02, (0.02, 0.08) 0.08) 0.06) 0.08) 0.08) 0.08) 0.08) agesq (0.00, (0.00, (0.00, (0.00, (0.00, (0.00, (0.00, 0.00) 0.00) 0.00) 0.00) 0.00) 0.00) 0.00) gestat (0.22, (0.22, (0.25, (0.22, (0.22, (0.22, (0.22, 0.25) 0.24) 0.27) 0.24) 0.24) 0.24) 0.24) male (0.25, (0.24, (0.24, (0.24, (0.25, (0.25, (0.25, 0.32) 0.31) 0.31) 0.32) 0.32) 0.31) 0.31) black ageqcode2 (-0.46, -0.3) (-0.44, -0.28) (-0.43, -0.29) (-0.45, -0.28) (-0.45, -0.30) (-0.45, -0.28) (-0.44, -0.28) (-0.24, -0.11) (-0.22, -0.1) (-0.26, -0.13) (-0.24, -0.11) (-0.23, -0.11) (-0.23, -0.11) (-0.23, -0.11) petri2 pertri3 (0.03, 0.16) (0.01, 0.14) (0.04, 0.18) (0.02, 0.16) (0.02, 0.15) (0.02, 0.15) 47 (0.02, 0.15) (0.1, 0.33) (0.06, 0.28) (0.09, 0.34) (0.08, 0.32) (0.09, 0.30) (0.08, 0.31) (0.08, 0.31) Table 11: Accuracy of approximate posteriors for fixed effects in US natality data analysis. The standard deviation of accuracy across 10 replications is in parentheses. MLE, maximum likelihood estimator; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. Intercept MLE VB CMC SDP WASP PIE 0.28 0.02 0.40 0.39 0.55 0.55 (0.06) (0.01) (0.10) (0.23) (0.12) (0.12) married MLE VB CMC SDP WASP PIE 0.92 0.91 0.90 0.90 0.92 0.92 0.74 0.67 0.86 0.87 0.84 0.84 0.35 0.22 0.42 0.47 0.53 0.52 (0.06) (0.04) (0.09) (0.19) (0.10) (0.11) nlbnl 0.93 0.77 0.91 0.91 0.90 0.91 hsgrad (0.02) (0.03) (0.06) (0.06) (0.05) (0.06) ageqcode3 MLE VB CMC SDP WASP PIE dmage (0.04) (0.04) (0.08) (0.09) (0.11) (0.11) 0.90 0.80 0.82 0.87 0.92 0.92 (0.02) (0.03) (0.08) (0.08) (0.06) (0.06) (0.04) (0.06) (0.08) (0.07) (0.09) (0.08) 0.36 0.23 0.44 0.48 0.54 0.54 0.82 0.67 0.84 0.88 0.89 0.89 0.93 0.91 0.95 0.91 0.91 0.92 (0.05) (0.04) (0.10) (0.19) (0.11) (0.11) 0.84 0.91 0.88 0.86 0.87 0.87 (0.02) (0.05) (0.03) (0.05) (0.06) (0.05) ageqcode2 (0.01) (0.02) (0.10) (0.08) (0.08) (0.08) 0.83 0.66 0.85 0.87 0.88 0.88 (0.03) (0.06) (0.06) (0.10) (0.08) (0.08) pertri3 (0.02) (0.04) (0.10) (0.09) (0.11) (0.11) 0.73 0.72 0.83 0.84 0.83 0.82 (0.03) (0.05) (0.08) (0.10) (0.06) (0.07) 5.5 5.0 4.5 3.5 ● ● ● 3.0 2.5 ● 1.5 log10 Seconds log10 Seconds (0.06) (0.01) (0.11) (0.16) (0.11) (0.11) ● 4.0 2.0 0.77 0.03 0.83 0.79 0.87 0.87 male black petri2 5.0 4.5 (0.03) (0.06) (0.02) (0.07) (0.04) (0.05) agesq novisit 0.81 0.77 0.80 0.89 0.84 0.84 gestat 4.0 ● 3.5 ● ● 3.0 2.5 1.0 2.0 0.5 1.5 0.0 ● ● 1.0 MCMC VB CMC SDP WASP PIE (a) Linear mixed effects model MCMC VB CMC SDP WASP PIE (b) United States natality data Figure 6: Computation time for the methods used in simulated and real data analysis. MCMC, Markov chain Monte Carlo based on the full data; VB, variational Bayes; CMC, consensus Monte Carlo; SDP, semiparametric density product; WASP, the algorithm in Srivastava et al. [23]; PIE, our posterior interval estimation algorithm. 48 References [1] Abrevaya, J. (2006). Estimating the effect of smoking on birth outcomes using a matched panel data approach. Journal of Applied Econometrics 21, 489–519. [2] Agueh, M. and Carlier, G. (2011). Barycenters in the Wasserstein space. SIAM Journal on Mathematical Analysis 43, 904–924. [3] Armagan, A. and Dunson, D. B. and Lee, J. (2013). Generalized double Pareto shrinkage. Statistica Sinica, 23, 119–143. [4] Bickel, P. J. & Freedman, D. A. (1981). Some asymptotic theory for the bootstrap. The Annals of Statistics 9, 1196–1217. [5] Broderick, T., Boyd, N.,Wibisono, A., Wilson, A. C. and Jordan, M. I. (2013). Streaming variational Bayes. Advances in Neural Information Processing Systems 26 (NIPS), 1727–1735. [6] Chernozhukov, V. and Hong, H. (2003). An MCMC approach to classical estimation. Journal of Econometrics 115, 293-346. [7] Dunson, D. B. and Xing, C. (2009). Nonparametric Bayes modeling of multivariate categorical data. Journal of the American Statistical Association 104, 1042–1051. [8] Faes, C., Ormerod, J. T. & Wand, M. P. (2012). Variational bayesian inference for parametric and nonparametric regression with missing data. Journal of the American Statistical Association 106, 959–971. [9] Fournier, N. & Guillin, A. (2015). On the rate of convergence in Wasserstein distance of the empirical measure. Probability Theory and Related Fields 162, 707–738. [10] Gelman, A. (2006). Prior distributions for variance parameters in hierarchical models (comment on article by Browne and Draper) Bayesian Analysis, 3, 515–534. [11] Ghosh, J. K., Delampady, M. and Samanta, T. (2006). An introduction to Bayesian analysis: theory and methods. Springer-Verlag New York. [12] Hoffman, M. D., Blei, D. M., Wang, C. and Paisley, J. (2013). Stochastic variational inference. Journal of Machine Learning Research 14, 1303–1347. [13] Kim, Y., Choi, Y.-K. and Emery, S. (2013). Logistic regression with multiple random effects: a simulation study of estimation methods and statistical packages. The American Statistician 67, 171–182. [14] Kleiner, A., Talwalkar, A., Sarkar, P. and Jordan, M. I. (2014). A scalable bootstrap for massive data. Journal of the Royal Statistical Society: Series B 76, 795–816. [15] Lee, Y. Y. C. & Wand, M. P. (2016). Streamlined mean field variational Bayes for longitudinal and multilevel data analysis. Biometrical Journal 58, 868–895. 49 [16] Lehmann, E. L. and Casella, G. (1998). Theory of point estimation. Springer-Verlag New York. [17] Maclaurin, D. and Adams, R. P. (2014). Firefly Monte Carlo: Exact MCMC with subsets of data. Proceedings of the 30th Conference on Uncertainty in Artificial Intelligence (UAI), 543–552. [18] Minsker, S., Srivastava, S., Lin, L. and Dunson, D. B. (2014). Scalable and robust Bayesian inference via the median posterior. Proceedings of the 31st International Conference on Machine Learning (ICML) 32, 1656–1664. [19] Miroshnikov, A. & Conlon, E. M. (2014). parallelMCMCcombine: an R package for Bayesian methods for big data and analytics. PloS ONE 9, e108425. [20] Neiswanger, W., Wang, C. and Xing, E. (2014). Asymptotically exact, embarrassingly parallel MCMC. Proceedings of the 30th International Conference on Uncertainty in Artificial Intelligence (UAI), 623–632. [21] Scott, S. L., Blocker, A. W., Bonassi, F. V., Chipman, H. A., George, E. I., & McCulloch, R. E. (2016). Bayes and big data: the consensus Monte Carlo algorithm. International Journal of Management Science and Engineering Management, to appear. [22] Shang, Z. and Cheng, G. (2015). A Bayesian splitotic theory for nonparametric models. arXiv preprint arXiv:1508.04175. [23] Srivastava, S., Cevher, V., Dinh, Q. and Dunson, D. B. (2015). WASP: Scalable Bayes via barycenters of subset posteriors. Proceedings of the 18th International Conference on Artificial Intelligence and Statistics (AISTATS) 38, 912–920. [24] Tan, L. S. L. and Nott, D. J. (2014). A stochastic variational framework for fitting and diagnosing generalized linear mixed models. Bayesian Analysis 9, 963–1004. [25] Villani, C. (2008). Optimal transport: old and new. Springer-Verlag Berlin Heidelberg. [26] Wand, M. (2015). KernSmooth: Functions for Kernel Smoothing. R package version 2.23-15. [27] Wang, X., Guo, F., Heller, K. and Dunson, D. B. (2015). Parallelizing MCMC with random partition trees. Advances in Neural Information Processing Systems 28 (NIPS), arXiv preprint arXiv:1506.03164. [28] Welling, M. and Teh, Y. W. (2011). Bayesian learning via stochastic gradient Langevin dynamics. Proceedings of the 28th International Conference on Machine Learning (ICML), 681–688. [29] Xu, M., Lakshminarayanan, B.,Teh, Y. W., Zhu, J. and Zhang, B. (2014). Distributed Bayesian posterior sampling via moment sharing. Advances in Neural Information Processing Systems 27 (NIPS), 1656–1664. 50
10math.ST
arXiv:1606.02431v1 [math.GR] 8 Jun 2016 Finite groups with small number of cyclic subgroups Wei Zhou School of Mathematics and Statistics, Southwest University, Chongqing 400715, P. R. CHINA zh [email protected] Abstract In this note, we study the finite groups with the number of cylic subgroups no greater than 5. 1 Introduction For a finite group G, let C(G) be the poset of cyclic subgroups of G. Sometimes C(G) can decide the structure of G. For example, |C(G)| = |G| if and only if G is an elementary abelian 2-group. The groups G such that |G| − |C(G)| ≤ 3 is classified in [2, 3] and [4]. It is well-known that a finite p-group G has eactly one cyclic subgroup of order p if and only if G is cyclic or generalized quaternion group. Hence the groups with small number of cyclic subgroups will be interesting. In this note, we shall study the finite group G with |C(G)| ≤ 5. It is esay to see that |C(G)| = 1 if and only G = 1, and |C(G)| = 2 if and only if G ∼ = Cp for some prime p. In this note, we will focus on the group G such that 3 ≤ |C(G)| ≤ 5. For a finite group G, denote by πe (G) the set of all element orders of G, and by π(G) the set of all prime divisors of |G|. For any i ∈ πe (G), denote by Ci (G) the set of all cylic subgroups of order i in G. Throughout this note, let ci = |Ci (G)|. 0 Support by National Natural Science Foundation of China (Grant No. 11471266). AMS Subject Classification: 20D15, 20D25 Key words and phrases: finite groups, cyclic subgroups, 2-groups 1 2 2 The main result For a finite group G, we know |G| = X ck · φ(k), k∈πe (G) |C(G)| = X (2.1) ck , k∈πe (G) where φ is the Eucler function. Lemma 2.1 If |C(G)| = 3, then G ∼ = Cp2 for some prime p. Proof: We claim that |π(G)| = 1. Otherwise, by Cauchy theorem, |π(G)| = 2. Let |G| = pa q b , where a, b ≥ 1. By equation 2.1, cp = cq = 1. Hence there exist A ✁ G and ∼ Cp and B ∼ B ✁ G such that A = = Cq . Thus AB ∼ = Cpq . Note that |C(Cpq )| = 4, a contradiction. Hence G is a p-groups. Let |G| = pn . By equation 2.1, cp = 1 or 2. If cp = 2, we get that pn = 2p + 1, a contradiction. Hence cp = 1. Then cp2 = 1. From equation 2.1, n = 2 and G ∼ ✷ = Cp 2 . Lemma 2.2 If |C(G)| = 4, then G ∼ = Cpq , Cp3 . Proof: From equation 2.1, we see that |π(G)| ≤ 3. If π(G) = {p, q, r}, then cp = cq = cr = 1 and there exist A, B, C ✁ G such that A ∼ = Cp , B ∼ = Cq and C ∼ = Cr . Thus ABC ∼ = Cpqr . Note that |C(Cpqr )| > 4, a contradiction. Now we get the following two cases: Case 1. π(G) = {p, q}. Let |G| = pa q b . From equation 2.1, we have that cp = 2 and cq = 1 or cp = 1 = cq . If cp = 2 and cq = 1, then pa q b = 2p + q − 2. Since pa q b − 2p − q + 2 ≥ pq − 2p − q + 2 = (p − 1)(q − 2), we get q = 2 and a = b = 1. Since c2 = 1, we get G ∼ = C2 × Cq , contrary to cp = 2. Therefore cp = cq = 1, and we can find A, B ✁ G such that A ∼ = Cp and B ∼ = Cq . Note that AB ∼ = Cpq and |C(AB)| = 4. It follows that G = AB ∼ = Cpq . Case 2. π(G) = {p}. Let |G| = pn . We know that cp ≤ 3. If cp = 3, then pn = 1 + 3(p − 1). Hence p = 2 and n = 2. This is impossible. If cp = 2, then cq2 = 1, and pn = p2 + p − 1. Note that pn − p2 − p + 1 ≥ p3 − p2 − p + 1 = (p − 1)(p2 − 1) > 0. This is impossible. So we get that cp = 1. By [1, Satz 3.8.2], G is a cyclic or p = 2 and G is a generalized quaternion group. Clearly, we get G ∼ ✷ = Cp3 in this case. 3 Lemma 2.3 If |C(G)| = 5, then G ∼ = S 3 , Cp 4 , C3 × C3 , Q 8 . Proof: Let π(G) = {p1 , · · · , pt }. By Cauchy theorem, t ≤ 4. If t = 4, then cpi = 1 for i = 1, · · · , 4. Thus G has a normal cyclic subgroup N ∼ = Cp1 p2 p3 p4 . We get a contradiction for |C(Cp1 p2 p3 p4 )| > 5. If t = 3, from equation 2.1, we get that cp1 = 1 or 2, and cp = cp = 1. Let V, W ✁ G such that V ∼ = Cp and W ∼ = Cp . Thus |C(V W )| = 4, which 2 3 implies that cp1 2 3 = 1. Let U ✁ G such that U ∼ = Cp1 . Note that U V W ∼ = Cp1 p2 p3 and |C(Cp1 p2 p3 )| > 5. This is impossible. So we get the following two cases: Case 1. t = 2. Let |G| = pa q b . Let P ∈ Sylp (G) and Q ∈ Sylq (G). Suppose that neither P nor Q are cylcic subgroups of prime order. Then |C(P )| ≥ 3 and |C(Q)| ≥ 3. Thus P ∪ Q contains all the 5 cyclic subgroups of G, and G = P ∪ Q. This is impossible. So we can assume that P ∼ = Cp , and |G| = pq b . If b = 1, by symmetry, we can assume P ✁ G. Note |C(Cpq )| = 4. We get that Q is not normal in G. So cq = |G : NG (Q)| = p. Then p = 3, and q = 2. We get G ∼ = S3 . Now assume b > 1. If P is not normal in G, then cp = |G : NG (P )| ≥ 1 + p. We get p = 2 and cp = 3. This imples b = 1, a contradiction. Hence P ✁ G and cp = 1. Clearly, |C(Q)| ≤ 3. By lemma 2.1, Q ∼ = Cq2 . Now we get cq2 = |G : NG (Q)| ≥ 3, contrary to |C(G)| = 5. Case 2. t = 1. Then |G| = pa . If p ≥ 5, then each cyclic subgroup of G must be normal in G for |C(G)| = 5, which implies G is a Dedekind group. Thus G is abelian p-groups. Note that |Cp (Cp × Cp )| = p + 1 > 5. It follows that G is cyclic, and then G ∼ = Cp 4 . Next assume p = 3. Note |C(C3 × C3 )| = 5. Thus G can not have a proper subgroup isomorphic to C3 × C3 . If G 6∼ = C3 × C3 , then all the subgroup of order 9 are cyclic, which implies G is cyclic by [1, Satz 3.8.4]. So we get G ∼ = C3 × C3 or C34 . Finally, we consider the case that p = 2. Let |G| = 2n . Since |C(G)| = 5, we get exp(G) = 2s ≤ 24 . If s = 1, then G is an elementary abelian 2-group of order 2n and |C(G)| = 2n , a contradicton. If s = 3, let x ∈ G such that |x| = 23 . Since |C(hxi)| = 4, there is only one cyclic subgroup in G−hxi. Hence all the elements in G−hxi are contained in a cyclic subgroup and have the same order, 2r say. So we get |G − hxi| = φ(2r ), and 2n − 8 = 2r−1 , where r ≤ 3. This is impossible. Clearly, if s = 4, then G ∼ = C24 . We need only to consider the case that s = 2. Let x ∈ G with |x| = 4. Hence we can get exactly two nontrivial cyclic subgroups from G − hxi. Let 2r and 22 be the order of the two cyclic subgroups, where r, s ≤ 2. Then 2n − 4 = 2r−1 + 2s−1 . So we get n = 3 and r, s = 2. Thus G = Q8 . ✷ 4 Combining lemma 2.1, 2.2 and 2.3, we get the following. Theorem 2.4 For a finite group G, |C(G)| ≤ 5 if and only G is a subgroup of Cp4 or G∼ = S3 , Q8 , C3 × C3 , or Cpq , where p and q are two different primes. References [1] B. Huppert, Endliche Gruppen I, Springer-Verlag, Berlin 1982. [2] M. Tǎrnǎuceanu, Finite groups with a certain number of cyclic subgroups, Amer. Math. Monthly 122(2015): 275-276. [3] M. Tǎrnǎuceanu, Finite groups with a certain number of cyclic subgroups II, http://arxiv.org/abs/1604.04974. [4] W. Zhou, On the number http://arxiv.org/abs/1605.00193. of cyclic subgroups in finite groups,
4math.GR
arXiv:1410.6843v2 [math.ST] 22 Apr 2016 Posteriors, conjugacy, and exponential families for completely random measures Tamara Broderick Ashia C. Wilson Michael I. Jordan April 25, 2016 Abstract We demonstrate how to calculate posteriors for general Bayesian nonparametric priors and likelihoods based on completely random measures (CRMs). We further show how to represent Bayesian nonparametric priors as a sequence of finite draws using a size-biasing approach—and how to represent full Bayesian nonparametric models via finite marginals. Motivated by conjugate priors based on exponential family representations of likelihoods, we introduce a notion of exponential families for CRMs, which we call exponential CRMs. This construction allows us to specify automatic Bayesian nonparametric conjugate priors for exponential CRM likelihoods. We demonstrate that our exponential CRMs allow particularly straightforward recipes for size-biased and marginal representations of Bayesian nonparametric models. Along the way, we prove that the gamma process is a conjugate prior for the Poisson likelihood process and the beta prime process is a conjugate prior for a process we call the odds Bernoulli process. We deliver a size-biased representation of the gamma process and a marginal representation of the gamma process coupled with a Poisson likelihood process. 1 Introduction An important milestone in Bayesian analysis was the development of a general strategy for obtaining conjugate priors based on exponential family representations of likelihoods [DeGroot, 1970]. While slavish adherence to exponentialfamily conjugacy can be criticized, conjugacy continues to occupy an important place in Bayesian analysis, for its computational tractability in high-dimensional problems and for its role in inspiring investigations into broader classes of priors (e.g., via mixtures, limits, or augmentations). The exponential family is, however, a parametric class of models, and it is of interest to consider whether similar general notions of conjugacy can be developed for Bayesian nonparametric models. Indeed, the nonparametric literature is replete with nomenclature that suggests the exponential family, including familiar names such as “Dirichlet,” “beta,” “gamma,” and “Poisson.” These names refer to aspects of the 1 random measures underlying Bayesian nonparametrics, either the Lévy measure used in constructing certain classes of random measures or properties of marginals obtained from random measures. In some cases, conjugacy results have been established that parallel results from classical exponential families; in particular, the Dirichlet process is known to be conjugate to a multinomial process likelihood [Ferguson, 1973], the beta process is conjugate to a Bernoulli process [Kim, 1999, Thibaux and Jordan, 2007] and to a negative binomial process [Broderick et al., 2015]. Moreover, various useful representations for marginal distributions, including stick-breaking and size-biased representations, have been obtained by making use of properties that derive from exponential families. It is striking, however, that these results have been obtained separately, and with significant effort; a general formalism that encompasses these individual results has not yet emerged. In this paper, we provide the single, holistic framework so strongly suggested by the nomenclature. Within this single framework, we show that it is straightforward to calculate posteriors and establish conjugacy. Our framework includes the specification of a Bayesian nonparametric analog of the finite exponential family, which allows us to provide automatic and constructive nonparametric conjugate priors given a likelihood specification as well as general recipes for marginal and size-biased representations. A broad class of Bayesian nonparametric priors—including those built on the Dirichlet process [Ferguson, 1973], the beta process [Hjort, 1990], the gamma process [Ferguson, 1973, Lo, 1982, Titsias, 2008], and the negative binomial process [Zhou et al., 2012, Broderick et al., 2015]—can be viewed as models for the allocation of data points to traits. These processes give us pairs of traits together with rates or frequencies with which the traits occur in some population. Corresponding likelihoods assign each data point in the population to some finite subset of traits conditioned on the trait frequencies. What makes these models nonparametric is that the number of traits in the prior is countably infinite. Then the (typically random) number of traits to which any individual data point is allocated is unbounded, but also there are always new traits to which as-yet-unseen data points may be allocated. That is, such a model allows the number of traits in any data set to grow with the size of that data set. A principal challenge of working with such models arises in posterior inference. There is a countable infinity of trait frequencies in the prior which we must integrate over to calculate the posterior of trait frequencies given allocations of data points to traits. Bayesian nonparametric models sidestep the full infinite-dimensional integration in three principal ways: conjugacy, size-biased representations, and marginalization. In its most general form, conjugacy simply asserts that the prior is in the same family of distributions as the posterior. When the prior and likelihood are in finite-dimensional conjugate exponential families, conjugacy can turn posterior calculation into, effectively, vector addition. As a simple example, consider a model with beta-distributed prior, θ ∼ Beta(θ|α, β), for some fixed hyperparameters α and β. For the likelihood, let each observation xn with n ∈ {1, . . . , N } be iid iid Bernoulli-distributed conditional on parameter θ: xn ∼ Bern(x|θ). Then the 2 posterior is simply another beta distribution, Beta(θ|αpost , βpost ), with paramePN PN ters updated via addition: αpost := α + n=1 xn and βpost := β + N − n=1 xn . While conjugacy is certainly useful and popular in the case of finite parameter cardinality, there is arguably a stronger computational imperative for its use in the infinite-parameter case. Indeed, the core prior-likelihood pairs of Bayesian nonparametrics are generally proven [Hjort, 1990, Kim, 1999, Lo, 1982, Thibaux and Jordan, 2007, Broderick et al., 2015], or assumed to be [Titsias, 2008, Thibaux, 2008], conjugate. When such proofs exist, though, thus far they have been specialized to specific pairs of processes. In what follows, we demonstrate a general way to calculate posteriors for a class of distributions that includes all of these classical Bayesian nonparametric models. We also define a notion of exponential family representation for the infinite-dimensional case and show that, given a Bayesian nonparametric exponential family likelihood, we can readily construct a Bayesian nonparametric conjugate prior. Size-biased sampling provides a finite-dimensional distribution for each of the individual prior trait frequencies [Thibaux and Jordan, 2007, Paisley et al., 2010]. Such a representation has played an important role in Bayesian nonparametrics in recent years, allowing for either exact inference via slice sampling [Damien et al., 1999, Neal, 2003]—as demonstrated by Teh et al. [2007], Broderick et al. [2015]—or approximate inference via truncation [Doshi et al., 2009, Paisley et al., 2011]. This representation is particularly useful for building hierarchical models [Thibaux and Jordan, 2007]. We show that our framework yields such representations in general, and we show that our construction is especially straightforward to use in the exponential family framework that we develop. Marginal processes avoid directly representing the infinite-dimensional prior and posterior altogether by integrating out the trait frequencies. Since the trait allocations are finite for each data point, the marginal processes are finite for any finite set of data points. Again, thus far, such processes have been shown to exist separately in special cases; for example, the Indian buffet process [Griffiths and Ghahramani, 2006] is the marginal process for the beta process prior paired with a Bernoulli process likelihood [Thibaux and Jordan, 2007]. We show that the integration that generates the marginal process from the full Bayesian model can be generally applied in Bayesian nonparametrics and takes a particularly straightforward form when using conjugate exponential family priors and likelihoods. We further demonstrate that, in this case, a basic, constructive recipe exists for the general marginal process in terms of only finite-dimensional distributions. Our results are built on the general class of stochastic processes known as completely random measures (CRMs) [Kingman, 1967]. We review CRMs in Section 2.1 and we discuss what assumptions are needed to form a full Bayesian nonparametric model from CRMs in Section 2.3. Given a general Bayesian nonparametric prior and likelihood (Section 2.2), we demonstrate in Section 3 how to calculate the posterior. Although the development up to this point is more general, we next introduce a concept of exponential families for CRMs 3 (Section 4.1) and call such models exponential CRMs. We show that we can generate automatic conjugate priors given exponential CRM likelihoods in Section 4.2. Finally, we show how we can generate recipes for size-biased representations (Section 5) and marginal processes (Section 6), which are particularly straightforward in the exponential CRM case (Corollary 5.2 in Section 5 and Corollary 6.2 in Section 6). We illustrate our results on a number of examples and derive new conjugacy results, size-biased representations, and marginal processes along the way. We note that some similar results have been obtained by Orbanz [2010] and James [2014]. In the present work, we focus on creating representations that allow tractable inference. 2 Bayesian models based on completely random measures As we have discussed, we view Bayesian nonparametric models as being composed of two parts: (1) a collection of pairs of traits together with their frequencies or rates and (2) for each data point, an allocation to different traits. Both parts can be expressed as random measures. Recall that a random measure is a random element whose values are measures. We represent each trait by a point ψ in some space Ψ of traits. Further, let θk be the frequency, or rate, of the trait represented by ψk , where k indexes the countably many traits. In particular, θk ∈ R+ . Then (θk , ψk ) is a tuple consisting of the frequency of the kth trait together with its trait descriptor. We can represent the full collection of pairs of traits with their frequencies by the discrete measure on Ψ that places weight θk at location ψk : Θ= K X θk δ ψ k , (1) k=1 where the cardinality K may be finite or infinity. Next, we form data point Xn for the nth individual. The data point Xn is viewed as a discrete measure. Each atom of Xn represents a pair consisting of (1) a trait to which the nth individual is allocated and (2) a degree to which the nth individual is allocated to this particular trait. That is, Xn = Kn X xn,k δψn,k , (2) k=1 where again ψn,k ∈ Ψ represents a trait and now xn,k ∈ R+ represents the degree to which the nth data point belongs to trait ψn,k . Kn is the total number of traits to which the nth data point belongs. Here and in what follows, we treat X1:N = {Xn : n ∈ [N ]} as our observed data points for [N ] := {1, 2, 3, . . . , N }. In practice X1:N is often incorporated 4 into a more complex Bayesian hierarchical model. For instance, in topic modeling, ψk represents a topic; that is, ψk is a distribution over words in a vocabulary [Blei et al., 2003, Teh et al., 2006]. θk might represent the frequency with which the topic ψk occurs in a corpus of documents. xn,k might be a positive integer and represent the number of words in topic ψn,k that occur in the nth P Kn document. So the nth document has a total length of k=1 xn,k words. In this case, the actual observation consists of the words in each document, and the topics are latent. Not only are the results concerning posteriors, conjugacy, and exponential family representations that we develop below useful for inference in such models, but in fact our results are especially useful in such models—where the traits and any ordering on the traits are not known in advance. Next, we want to specify a full Bayesian model for our data points X1:N . To do so, we must first define a prior distribution for the random measure Θ as well as a likelihood for each random measure Xn conditioned on Θ. We let ΣΨ be a σ-algebra of subsets of Ψ, where we assume all singletons are in ΣΨ . Then we consider random measures Θ and Xn whose values are measures on Ψ. Note that for any random measure Θ and any measurable set A ∈ ΣΨ , Θ(A) is a random variable. 2.1 Completely random measures We can see from Eqs. (1) and (2) that we desire a distribution on random measures that yields discrete measures almost surely. A particularly simple form of random measure called a completely random measure can be used to generate a.s. discrete random measures [Kingman, 1967]. A completely random measure Θ is defined as a random measure that satisfies one additional property; for any disjoint, measurable sets A1 , A2 , . . . , AK ∈ ΣΨ , we require that Θ(A1 ), Θ(A2 ), . . . , Θ(AK ) be independent random variables. Kingman [1967] showed that a completely random measure can always be decomposed into a sum of three independent parts: Θ = Θdet + Θf ix + Θord . (3) Here, Θdet is the deterministic component, Θf ix is the fixed-location component, and Θord is the ordinary component. In particular, Θdet is any deterministic measure. We define the remaining two parts next. The fixed-location component is called the “fixed component” by Kingman [1967], but we expand the name slightly here to emphasize that Θf ix is defined to be constructed from a set of random weights at fixed (i.e., deterministic) locations. That is, Kf ix X θf ix,k δψf ix,k , (4) Θf ix = k=1 where the number of fixed-location atoms, Kf ix , may be either finite or infinity; ψf ix,k is deterministic, and θf ix,k is a non-negative, real-valued random variable (since Φ is a measure). Without loss of generality, we assume that the locations 5 ψf ix,k are all distinct. Then, by the independence assumption of CRMs, we must have that θf ix,k are independent random variables across k. Although the fixedlocation atoms are often ignored in the Bayesian nonparametrics literature, we will see that the fixed-location component has a key role to play in establishing Bayesian nonparametric conjugacy and in the CRM representations we present. The third and final component is the ordinary component. Let #(A) denote the cardinality of some countable set A. Let µ be any σ-finite, deterministic measure on R+ × Ψ, where R+ is equipped with the Borel σ-algebra and ΣR+ ×Ψ is the resulting product σ-algebra given ΣΨ . Recall that a Poisson point process with rate measure µ on R+ × Ψ is a random countable subset Π of R+ × Ψ such that two properties hold [Kingman, 1992]: 1. For any A ∈ ΣR+ ×Ψ , #(Π ∩ A) ∼ Poisson(µ(A)). 2. For any disjoint A1 , A2 , . . . , AK ∈ ΣR+ ×Ψ , #(Π∩A1 ), #(Π∩A2 ), · · · , #(Π∩ AK ) are independent random variables. To generate an ordinary component, start with a Poisson point process on R+ × Ψ, characterized by its rate measure µ(dθ×dψ). This process yields Π, a random ord and countable set of points: Π = {(θord,k , ψord,k )}K k=1 , where Kord may be finite or infinity. Form the ordinary component measure by letting θord,k be the weight of the atom located at ψord,k : Θord = K ord X θord,k δψord,k . (5) k=1 Recall that we stated at the start of Section 2.1 that CRMs may be used to produce a.s. discrete random measures. To check this assertion, note that Θf ix is a.s. discrete by construction (Eq. (4)) and Θord is a.s. discrete by construction (Eq. (5)). Θdet is the one component that may not be a.s. atomic. Thus the prevailing norm in using models based on CRMs is to set Θdet ≡ 0; in what follows, we adopt this norm. If the reader is concerned about missing any atoms in Θdet , note that it is straightforward to adapt the treatment of Θf ix to include the case where the atom weights are deterministic. When we set Θdet ≡ 0, we are left with Θ = Θf ix + Θord by Eq. (3). So Θ is also discrete, as desired. 2.2 Prior and likelihood The prior that we place on Θ will be a fully general CRM (minus any deterministic component) with one additional assumption on the rate measure of the ordinary component. Before incorporating the additional assumption, we say that Θ has a fixed-location component with Kf ix atoms, where the kth atom indep has arbitrary distribution Ff ix,k : θf ix,k ∼ Ff ix,k (dθ). Kf ix may be finite or infinity, and Θ has an ordinary component characterized by rate measure µ(dθ × dψ). The additional assumption we make is that the distribution on 6 the weights in the ordinary component is assumed to be decoupled from the distribution on the locations. That is, the rate measure decomposes as µ(dθ × dψ) = ν(dθ) · G(dψ), (6) where ν is any σ-finite, deterministic measure on R+ and G is any proper distribution on Ψ. While the distribution over locations has been discussed extensively elsewhere [Neal, 2000, Wang and Blei, 2013], it is the weights that affect the allocation of data points to traits. Given the factorization of µ in Eq. (6), the ordinary component of Θ can ord be generated by letting {θf ix,k }K k=1 be the points of a Poisson point process 1 ord generated on R+ with rate ν. We then draw the locations {ψf ix,k }K k=1 iid iid according to G(dψ): ψf ix,k ∼ G(dψ). Finally, for each k, θf ix,k δψf ix,k is an atom in Θord. This factorization will allow us to focus our attention on the trait frequencies, and not the trait locations, in what follows. Moreover, going forward, we will assume G is diffuse (i.e., G has no atoms) so that the ordinary component atoms are all at a.s. distinct locations, which are further a.s. distinct from the fixed locations. Since we have seen that Θ is an a.s. discrete random measure, we can write it as K X Θ= θk δ ψ k , (7) k=1 where K := Kf ix + Kord may be finite or infinity, and every ψk is a.s. unique. That is, we will sometimes find it helpful notationally to use Eq. (7) instead of separating the fixed and ordinary components. At this point, we have specified the prior for Θ in our general model. Next, we specify the likelihood; i.e., we specify how to generate the data points Xn given Θ. We will assume each Xn is generated iid given Θ across the data indices n. We will let Xn be a CRM with only a fixed-location component given Θ. In particular, the atoms of Xn will be located at the atom locations of Θ, which are fixed when we condition on Θ: Xn := K X xn,k δψk . k=1 Here, xn,k is drawn according to some distribution H that may take θk , the weight of Θ at location ψk , as a parameter; i.e., indep xn,k ∼ H(dx|θk ) independently across n and k. (8) Note that while every atom of Xn is located at an atom of Θ, it is not necessarily the case that every atom of Θ has a corresponding atom in Xn . In particular, if xn,k is zero for any k, there is no atom in Xn at ψk . 1 Recall that K ord may be finite or infinity depending on ν and is random when taking finite values. 7 We highlight that the model above stands in contrast to Bayesian nonparametric partition models, for which there is a large literature. In partition models (or clustering models), Θ is a random probability measure [Ferguson, 1974]; in this case, the probability constraint precludes Θ from being a completely random measure, but it is often chosen to be a normalized completely random measure [James et al., 2009, Lijoi and Prünster, 2010]. The choice of Dirichlet process (a normalized gamma process) for Θ is particularly popular due to a number of useful properties that coincide in this single choice [Doksum, 1974, Escobar, 1994, Escobar and West, 1995, 1998, Ferguson, 1973, Lo, 1984, MacEachern, 1994, Perman et al., 1992, Pitman, 1996a,b, Sethuraman, 1994, West and Escobar, 1994]. In partition models, Xn is a draw from the probability distribution described by Θ. If we think of such Xn as a random measure, it is a.s. a single unit mass at a point ψ with strictly positive probability in Θ. One potential connection between these two types of models is provided by combinatorial clustering [Broderick et al., 2015]. In partition models, we might suppose that we have a number of data sets, all of which we would like to partition. For instance, in a document modeling scenario, each document might be a data set; in particular each data point is a word in the document. And we might wish to partition the words in each document. An alternative perspective is to suppose that there is a single data set, where each data point is a document. Then the document exhibits traits with multiplicities, where the multiplicities might be the number of words from each trait; typically a trait in this application would be a topic. In this case, there are a number of other names besides feature or trait model that may be applied to the overarching model—such as admixture model or mixed membership model [Airoldi et al., 2014]. 2.3 Bayesian nonparametrics So far we have described a prior and likelihood that may be used to form a Bayesian model. We have already stated above that forming a Bayesian nonparametric model imposes some restrictions on the prior and likelihood. We formalize these restrictions in Assumptions A0, A1, and A2 below. Recall that the premise of Bayesian nonparametrics is that the number of traits represented in a collection of data can grow with the number of data points. More explicitly, we achieve the desideratum that the number of traits is unbounded, and may always grow as new data points are collected, by modeling a countable infinity of traits. This assumption requires that the prior have a countable infinity of atoms. These must either be fixed-location atoms or ordinary component atoms. Fixed-location atoms represent known traits in some sense since we must know the fixed locations of the atoms in advance. Conversely, ordinary component atoms represent unknown traits, as yet to be discovered, since both their locations and associated rates are unknown a priori. Since we cannot know (or represent) a countable infinity of traits a priori, we cannot start with a countable infinity of fixed-location atoms. 8 A0. The number of fixed-location atoms in Θ is finite. Since we require a countable infinity of traits in total and they cannot come from the fixed-location atoms by Assumption A0, the ordinary component must contain a countable infinity of atoms. This assumption will be true if and only if the rate measure on the trait frequencies has infinite mass. A1. ν(R+ ) = ∞. Finally, an implicit part of the starting premise is that each data point be allocated to only a finite number of traits; we do not expect to glean an infinite amount of information from finitely represented data. Thus, we require that the number of atoms in every Xn be finite. By Assumption A0, the number of atoms in Xn that correspond to fixed-location atoms in Θ is finite. But by Assumption A1, the number of atoms in Θ from the ordinary component is infinite. So there must be some restriction on the distribution of values of X at the atoms of Θ (that is, some restriction on H in Eq. (8)) such that only finitely many of these values are nonzero. In particular, note that if H(dx|θ) does not contain an atom at zero for any θ, then a.s. every one of the countable infinity of atoms of X will be nonzero. Conversely, it follows that, for our desiderata to hold, we must have that H(dx|θ) exhibits an atom at zero. One consequence of this observation is that H(dx|θ) cannot be purely continuous for all θ. Though this line of reasoning does not necessarily preclude a mixed continuous and discrete H, we henceforth assume that H(dx|θ) is discrete, with support Z∗ = {0, 1, 2, . . .}, for all θ. In what follows, we write h(x|θ) for the probability mass function of x given θ. So our requirement that each data point be allocated to only a finite number of traits translates into a requirement that the number of atoms of Xn with values in Z+ = {1, 2, . . .} be finite. Note that, by construction, the pairs ord {(θord,k , xord,k )}K k=1 form a marked Poisson point process with rate measure µmark (dθ × dx) := ν(dθ)h(x|θ). And the pairs with xord,k equal to any particular value x ∈ Z+ further form a thinned Poisson point process with rate measure νx (dθ) := ν(dθ)h(x|θ). In particular, the number of atoms of X with weight x is Poisson-distributed with mean νx (R+ ). So the number of atoms of X is finite if and only if the following assumption holds.2 P∞ A2. x=1 νx (R+ ) < ∞ for νx := ν(dθ)h(x|θ). Thus Assumptions A0, A1, and A2 capture our Bayesian nonparametric desiderata. We illustrate the development so far with an example. Example 2.1. The beta process [Hjort, 1990] provides an example distribution for Θ. In its most general form, sometimes called the three-parameter beta 2 When we have the more general case of a mixed continuous and discrete H, Assumption A2 becomes R R A2b. x>0 θ∈R ν(dθ)H(dx|θ) < ∞. + 9 process [Teh and Görür, 2009, Broderick et al., 2012], the beta process has an ordinary component whose weight rate measure has a beta distribution kernel, ν(dθ) = γθ−α−1 (1 − θ)c+α−1 dθ, (9) with support on (0, 1]. Here, the three fixed hyperparameters are γ, the mass parameter ; c, the concentration parameter ; and α, the discount parameter.3 Moreover, each of its Kf ix fixed-location atoms, θk δψk , has a beta-distributed weight [Broderick et al., 2015]: θf ix,k ∼ Beta(θ|ρf ix,k , σf ix,k ), (10) where ρf ix,k , σf ix,k > 0 are fixed hyperparameters of the model. By Assumption A0, Kf ix is finite. By Assumption A1, ν(R+ ) = ∞. To achieve this infinite-mass restriction, the beta kernel in Eq. (9) must be improper; i.e., either −α ≤ 0 or c + α ≤ 0. Also, note that we must have γ > 0 since ν is a measure (and the case γ = 0 would be trivial). Often the beta process is used as a prior paired with a Bernoulli process likelihood [Thibaux and Jordan, 2007]. The Bernoulli process specifies that, P∞ given Θ = k=1 θk δψk , we draw indep xn,k ∼ Bern(x|θk ), which is well-defined since every atom weight θk of Θ is in (0, 1] by the beta process construction. Thus, Xn = ∞ X xn,k δψk . k=1 The marginal distribution of the X1:N in this case is often called an Indian buffet process [Griffiths and Ghahramani, 2006, Thibaux and Jordan, 2007]. The locations of atoms in Xn are thought of as the dishes sampled by the nth customer. We take a moment to highlight the fact that continuous distributions for H(dx|θ) are precluded based on the Bayesian nonparametric desiderata by considering an alternative likelihood. Consider instead if H(dx|θ) were continuous here. Then X1 would have atoms at every atom of Θ. In the Indian buffet process analogy, any customer would sample an infinite number of dishes, which contradicts our assumption that our data are finite. Indeed, any customer would sample all of the dishes at once. It is quite often the case in practical applications, though, that the Xn are merely latent variables, with the observed variables chosen according to a (potentially continuous) distribution given Xn [Griffiths and Ghahramani, 2006, Thibaux and Jordan, 2007]; 3 In [Teh and Görür, 2009, Broderick et al., 2012], the ordinary component features the beta distribution kernel in Eq. (9) multiplied not only by γ but also by a more complex, positive, real-valued expression in c and α. Since all of γ, c, and α are fixed hyperparameters, and γ is an arbitrary positive real value, any other constant factors containing the hyperparameters can be absorbed into γ, as in the main text here. 10 consider, e.g., mixture and admixture models. These cases are not precluded by our development. Finally, then, we may apply Assumption A2, which specifies that the number of atoms in each observation Xn is finite; in this case, the assumption means Z ∞ Z X ν(dθ) · h(1|θ) ν(dθ) · h(x|θ) = x=1 θ∈(0,1] θ∈R+ since θ is supported on (0, 1] and x is supported on {0, 1} Z Z θ1−α−1 (1 − θ)c+α−1 dθ < ∞. γθ−α−1 (1 − θ)c+α−1 dθ · θ = γ = θ∈(0,1] θ∈(0,1] The integral here is finite if and only if 1 − α and c + α are the parameters of a proper beta distribution: i.e., if and only if α < 1 and c > −α. Together with the restrictions above, these restrictions imply the following allowable parameter ranges for the beta process fixed hyperparameters: γ > 0, α ∈ [0, 1), c > −α, ρf ix,k , σf ix,k > 0 for all k ∈ [Kf ix ]. (11) These correspond to the hyperparameter ranges previously found in [Teh and Görür, 2009, Broderick et al., 2012].  3 Posteriors In Section 2, we defined a full Bayesian model consisting of a CRM prior for Θ and a CRM likelihood for an observation X conditional on Θ. Now we would like to calculate the posterior distribution of Θ|X. Theorem 3.1 (Bayesian nonparametric posteriors). Let Θ be a completely random measure that satisfies Assumptions A0 and A1; that is, Θ is a CRM with Kf ix fixed atoms such that Kf ix < ∞ and such that the kth atom can be written θf ix,k δψf ix,k with indep θf ix,k ∼ Ff ix,k (dθ) for proper distribution Ff ix,k and deterministic ψf ix,k . Let the ordinary component of Θ have rate measure µ(dθ × dψ) = ν(dθ) · G(dψ), P∞ where G is a proper distribution and ν(R+ ) = ∞. Write ΘP= k=1 θk δψk , ∞ and let X be generated conditional on Θ according to X = k=1 xk δψk with indep xk ∼ h(x|θk ) for proper, discrete probability mass function h. And suppose X and Θ jointly satisfy Assumption A2 so that ∞ Z X ν(dθ)h(x|θ) < ∞. x=1 θ∈R+ Then let Θpost be a random measure with the distribution of Θ|X. Θpost is a completely random measure with three parts. 11 1. For each k ∈ [Kf ix ], Θpost has a fixed-location atom at ψf ix,k with weight θpost,f ix,k distributed according to the finite-dimensional posterior Fpost,f ix,k (dθ) that comes from prior Ff ix,k , likelihood h, and observation X({ψf ix,k }). 2. Let {xnew,k δψnew,k : k ∈ [Knew ]} be the atoms of X that are not at fixed locations in the prior of Θ. Knew is finite by Assumption A2. Then Θpost has a fixed-location atom at xnew,k with random weight θpost,new,k , whose distribution Fpost,new,k (dθ) is proportional to ν(dθ)h(xnew,k |θ). 3. The ordinary component of Θpost has rate measure νpost (dθ) := ν(dθ)h(0|θ). Proof. To prove the theorem, we consider in turn each of the two parts of the prior: the fixed-location component and the ordinary component. First, consider any fixed-location atom, θf ix,k δψf ix,k , in the prior. All of the other fixed-location atoms in the prior, as well as the prior ordinary component, are independent of the random weight θf ix,k . So it follows that all of X except xf ix,k := X({ψf ix,k }) is independent of θf ix,k . Thus the posterior has a fixed atom located at ψf ix,k whose weight, which we denote θpost,f ix,k , has distribution Fpost,f ix,k (dθ) ∝ Ff ix,k (dθ)h(xf ix,k |θ), which follows from the usual finite Bayes Theorem. Next, consider the ordinary component in the prior. Let Ψf ix = {ψf ix,1 , . . . , ψf ix,Kf ix } be the set of fixed-location atoms in the prior. Recall that Ψf ix is deterministic, and since G is continuous, all of the fixed-location atoms and ordinary component atoms of Θ are at a.s. distinct locations. So the measure Xf ix defined by Xf ix (A) := X(A ∩ Ψf ix ) can be derived purely from X, without knowledge of Θ. It follows that the measure Xord defined by Xord (A) := X(A ∩ (Ψ\Ψf ix )) can be derived purely from X without knowledge of Θ. Xord is the same as the observed data measure X but with atoms only at atoms of the ordinary component of Θ and not at the fixed-location atoms of Θ. Now for any value x ∈ Z+ , let {ψnew,x,1 , . . . , ψnew,x,Knew,x } be all of the locations of atoms of size x in Xord. By Assumption A2, the number of such atoms, Knew,x , is finite. Further let θnew,x,k := Θ({ψnew,x,k }). Then 12 K new,x are generated from a thinned Poisson point process the values {θnew,x,k }k=1 with rate measure νx (dθ) := ν(dθ)h(x|θ). (12) And since νx (R+ ) < ∞ by assumption, each θnew,x,k has distribution equal to the normalized rate measure in Eq. (12). Note that θnew,x,k δψnew,x,k is a fixedlocation atom in the posterior now that its location is known from the observed Xord . By contrast, if a likelihood draw at an ordinary component atom in the prior returns a zero, that atom is not observed in Xord . Such atom weights in Θpost thus form a marked Poisson point process with rate measure ν(dθ)h(0|θ), as was to be shown. In Theorem 3.1, we consider generating Θ and then a single data point X conditional on Θ. Now suppose we generate Θ and then N data points, X1 , . . . , XN , iid conditional on Θ. In this case, Theorem 3.1 may be iterated to find the posterior Θ|X1:N . In particular, Theorem 3.1 gives the ordinary component and fixed atoms of the random measure Θ1 := Θ|X1 . Then, using Θ1 as the prior measure and X2 as the data point, another application of Theorem 3.1 gives Θ2 := Θ|X1:2 . We continue recursively using Θ|X1:n for n between 1 and N − 1 as the prior measure until we find Θ|X1:N . The result is made explicit in the following corollary. Corollary 3.2 (Bayesian nonparametric posteriors given multiple data points). Let Θ be a completely random measure that satisfies Assumptions A0 and A1; that is, Θ is a CRM with Kf ix fixed atoms such that Kf ix < ∞ and such that the kth atom can be written θf ix,k δψf ix,k with indep θf ix,k ∼ Ff ix,k (dθ) for proper distribution Ff ix,k and deterministic ψf ix,k . Let the ordinary component of Θ have rate measure µ(dθ × dψ) = ν(dθ) · G(dψ), P∞ where G is a proper distribution and ν(R+ ) = ∞. Write Θ = P k=1 θk δψk , and ∞ let X1 , . . . , Xn be generated conditional on Θ according to X = k=1 xn,k δψn,k indep with xn,k ∼ h(x|θk ) for proper, discrete probability mass function h. And suppose X1 and Θ jointly satisfy Assumption A2 so that ∞ Z X ν(dθ)h(x|θ) < ∞. x=1 θ∈R+ It is enough to make the assumption for X1 since the Xn are iid conditional on Θ. Then let Θpost be a random measure with the distribution of Θ|X1:N . Θpost is a completely random measure with three parts. 13 1. For each k ∈ [Kf ix ], Θpost has a fixed-location atom at ψf ix,k with weight θpost,f ix,k distributed according to the finite-dimensional posterior Fpost,f ix,k (dθ) that comes from prior Ff ix,k , likelihood h, and observation X({ψf ix,k }). 2. Let {ψnew,k : k ∈ [Knew ]} be the union of atom locations across X1 , X2 , . . . , XN minus the fixed locations in the prior of Θ. Knew is finite. Let xnew,n,k be the weight of the atom in Xn located at ψnew,k . Note that at least one of xnew,n,k across n must be non-zero, but in general xnew,n,k may equal zero. Then Θpost has a fixed-location atom at xnew,k with random weight θpost,new,k , whose distribution Fpost,new,k (dθ) is proportional to ν(dθ) N Y h(xnew,n,k |θ). n=1 3. The ordinary component of Θpost has rate measure n νpost,n (dθ) := ν(dθ) [h(0|θ)] . Proof. Corollary 3.2 follows from recursive application of Theorem 3.1. In order to recursively apply Theorem 3.1, we need to verify that Assumptions A0, A1, and A2 hold for the posterior Θ|X1:(n+1) when they hold for the prior Θ|X1:n . Note that the number of fixed atoms in the posterior is the number of fixed atoms in the prior plus the number of new atoms in the posterior. By Theorem 3.1, these counts are both finite as long as Θ|X1:n satisfies Assumptions A0 and A2, which both hold for n = 0 by assumption and n > 0 by the recursive assumption. So Assumption A0 holds for Θ|X1:(n+1) . Next we notice that since Assumption A1 implies that there is an infinite number of ordinary component atoms in Θ|X1:n and only finitely many become fixed atoms in the posterior by Assumption A2, it must be that Θ|X1:(n+1) has infinitely many ordinary component atoms. So Assumption A1 holds for Θ|X1:(n+1) . Finally, we note that ∞ Z X x=1 = νpost,n (dθ)h(x|θ) θ∈R+ ∞ Z X x=1 n ν(dθ) [h(0|θ)] h(x|θ) ≤ θ∈R+ ∞ Z X x=1 ν(dθ)h(x|θ) < ∞, θ∈R+ where the penultimate inequality follows since h(0|θ) ∈ [0, 1] and where the inequality follows by Assumption A2 on the original Θ (conditioned on no data). So Assumption A2 holds for Θ|X1:(n+1) . We now illustrate the results of the theorem with an example. Example 3.3. Suppose we again start with a beta process prior for Θ as in Example 2.1. This time we consider a negative binomial process likelihood 14 [Zhou et al., 2012, Broderick et al., 2015]. The negative binomial process specP∞ P∞ ifies that, given Θ = k=1 θk δψk , we draw X = k=1 xk δψk with indep xk ∼ NegBin(x|r, θk ), for some fixed hyperparameter r > 0. So Xn = ∞ X xn,k δψk . k=1 In this case, Assumption A2 translates into the following restriction. ∞ Z X x=1 = Z ν(dθ) · h(x|θ) θ∈R+ ν(dθ) · [1 − h(0|θ)] = Z γθ−α−1 (1 − θ)c+α−1 dθ · [1 − (1 − θ)r ] < ∞, θ∈(0,1] θ∈R+ where the penultimate equality follows since the support of ν(dθ) is (0, 1]. By a Taylor expansion, we have 1 − (1 − θ)r = rθ + o(θ) as θ → 0, so we require Z θ1−α−1 (1 − θ)c+α−1 dθ < ∞, θ∈(0,1] which is satisfied if and only if 1 − α and c + α are the parameters of a proper beta distribution. Thus, we have the same parameter restrictions as in Eq. (11). Now we calculate the posterior given the beta process prior on Θ and the negative binomial process likelihood for X conditional on Θ. In particular, the posterior has the distribution of Θpost , a CRM with three parts given by Theorem 3.1. First, at each fixed atom ψf ix,k of the prior with weight θf ix,k given by Eq. (10), there is a fixed atom in the posterior with weight θpost,f ix,k . Let xpost,f ix,k := X({ψf ix,k }). Then θpost,f ix,k has distribution Fpost,f ix,k (dθ) ∝ Ff ix (dθ) · h(xpost,f ix,k |θ) = Beta(θ|ρf ix,k , σf ix,k ) dθ · NegBin(xpost,f ix,k |r, θ) ∝ θρf ix,k −1 (1 − θ)σf ix,k −1 dθ · θxpost,f ix,k (1 − θ)r (13) ∝ Beta (θ |ρf ix,k + xpost,f ix,k , σf ix,k + r ) dθ. Second, for any atom xnew,k δψnew,k in X that is not at a fixed location in the prior, Θpost has a fixed atom at ψnew,k whose weight θpost,new,k has distribution Fpost,new,k (dθ) ∝ ν(dθ) · h(xnew,k |θ) = ν(dθ) · NegBin(xnew,k |r, θ) ∝ θ−α−1 (1 − θ)c+α−1 dθ · θxnew,k (1 − θ)r ∝ Beta (θ |−α + xnew,k , c + α + r ) dθ, 15 (14) which is a proper distribution since we have the following restrictions on its parameters. For one, by assumption, xnew,k ≥ 1. And further, by Eq. (11), we have α ∈ [0, 1) as well as c + α > 0 and r > 0. Third, the ordinary component of Θpost has rate measure ν(dθ)h(0|θ) = γθ−α−1 (1 − θ)c+α−1 dθ · (1 − θ)r = γθ−α−1 (1 − θ)c+r+α−1 dθ. Not only have we found the posterior distribution Θpost above, but now we can note that the posterior is in the same form as the prior with updated ordinary component hyperparameters: γpost = γ, αpost = α, cpost = c + r. The posterior also has old and new beta-distributed fixed atoms with beta distribution hyperparameters given in Eq. (13) and Eq. (14), respectively. Thus, we have proven that the beta process is, in fact, conjugate to the negative binomial process. An alternative proof was first given by Broderick et al. [2015].  As in Example 3.3, we can use Theorem 3.1 not only to calculate posteriors but also, once those posteriors are calculated, to check for conjugacy. This approach unifies existing disparate approaches to Bayesian nonparametric conjugacy. However, it still requires the practitioner to guess the right conjugate prior for a given likelihood. In the next section, we define a notion of exponential families for CRMs, and we show how to automatically construct a conjugate prior for any exponential family likelihood. 4 Exponential families Exponential families are what typically make conjugacy so powerful in the finite case. For one, when a finite likelihood belongs to an exponential family, then existing results give an automatic conjugate, exponential family prior for that likelihood. In this section, we review finite exponential families, define exponential CRMs, and show that analogous automatic conjugacy results can be obtained for exponential CRMs. Our development of exponential CRMs will also allow particularly straightforward results for size-biased representations (Corollary 5.2 in Section 5) and marginal processes (Corollary 6.2 in Section 6). In the finite-dimensional case, suppose we have some (random) parameter θ and some (random) observation x whose distribution is conditioned on θ. We say the distribution Hexp,like of x conditional on θ is in an exponential family if Hexp,like (dx|θ) = hexp,like (x|θ) dx = κ(x) exp {hη(θ), φ(x)i − A(θ)} µ(dx), (15) where η(θ) is the natural parameter, φ(x) is the sufficient statistic, κ(x) is the base density, and A(θ) is the log partition function. We denote the density 16 of Hexp,like here, which exists by definition, by hexp,like . The measure µ— with respect to which the density hexp,like exists—is typically Lebesgue measure when Hexp,like is diffuse or counting measure when Hexp,like is atomic. A(θ) is determined by the condition that Hexp,like (dx|θ) have unit total mass on its support. It is a classic result [Diaconis and Ylvisaker, 1979] that the following distribution for θ ∈ RD constitutes a conjugate prior: Fexp,prior (dθ) = fexp,prior (θ) dθ = exp {hξ, η(θ)i + λ [−A(θ)] − B(ξ, λ)} dθ. (16) Fexp,prior is another exponential family distribution, now with natural parameter (ξ ′ , λ)′ , sufficient statistic (η(θ)′ , −A(θ))′ , and log partition function B(ξ, λ). Note that the logarithms of the densities in both Eq. (15) and Eq. (16) are linear in η(θ) and −A(θ). So, by Bayes Theorem, the posterior Fexp,post also has these quantities as sufficient statistics in θ, and we can see Fexp,post must have the following form. Fexp,post (dθ|x) = fexp,post (θ|x) dθ = exp {hξ + φ(x), η(θ)i + (λ + 1) [−A(θ)] − B(ξ + φ(x), λ + 1)} dθ. (17) Thus we see that Fexp,post belongs to the same exponential family as Fexp,prior in Eq. (16), and hence Fexp,prior is a conjugate prior for Hexp,like in Eq. (15). 4.1 Exponential families for completely random measures In the finite-dimensional case, we saw that for any exponential family likelihood, as in Eq. (15), we can always construct a conjugate exponential family prior, given by Eq. (16). In order to prove a similar result for CRMs, we start by defining a notion of exponential families for CRMs. Definition 4.1. We say that a CRM Θ is an exponential CRM if it has the following two parts. First, let Θ have Kf ix fixed-location atoms, where Kf ix may be finite or infinite. The kth fixed-location atom is located at any ψf ix,k , unique from the other fixed locations, and has random weight θf ix,k , whose distribution has density ff ix,k : ff ix,k (θ) = κ(θ) exp {hη(ζk ), φ(θ)i − A(ζk )} , for some base density κ, natural parameter function η, sufficient statistic φ, and log partition function A shared across atoms. Here, ζk is an atom-specific parameter. Second, let Θ have an ordinary component with rate measure µ(dθ × dψ) = ν(dθ) · G(dψ) for some proper distribution G and weight rate measure ν of the form ν(dθ) = γ exp {hη(ζ), φ(θ)i} . In particular, η and φ are shared with the fixed-location atoms, and fixed hyperparameters γ and ζ are unique to the ordinary component. 17 4.2 Automatic conjugacy for completely random measures With Definition 4.1 in hand, we can specify an automatic Bayesian nonparametric conjugate prior for an exponential CRM likelihood. P∞ Theorem 4.2 (Automatic conjugacy). Let Θ = k=1 θk δψk , in accordance with Assumption A1. Let X be generated conditional on Θ according to an exponential CRM with fixed-location atoms at {ψk }∞ k=1 and no ordinary component. In particular, the distribution of the weight xk at ψk of X has the following density conditional on the weight θk at ψk of Θ: h(x|θk ) = κ(x) exp {hη(θk ), φ(x)i − A(θk )} . Then a conjugate prior for Θ is the following exponential CRM distribution. First, let Θ have Kprior,f ix fixed-location atoms, in accordance with Assumption A0. The kth such atom has random weight θf ix,k with proper density fprior,f ix,k (θ) = exp {hξf ix,k , η(θ)i + λf ix,k [−A(θ)] − B(ξf ix,k , λf ix,k )} , where (η ′ , −A)′ here is the sufficient statistic and B is the log partition function. ξf ix,k and λf ix,k are fixed hyperparameters for this atom weight. Second, let Θ have ordinary component characterized by any proper distribution G and weight rate measure ν(dθ) = γ exp {hξ, η(θ)i + λ [−A(θ)]} , where γ, ξ, and λ are fixed hyperparameters of the weight rate measure chosen to satisfy Assumptions A1 and A2. Proof. To prove the conjugacy of the prior for Θ with the likelihood for X, we calculate the posterior distribution of Θ|X using Theorem 3.1. Let Θpost be a CRM with the distribution of Θ|X. Then, by Theorem 3.1, Θpost has the following three parts. First, at any fixed location ψf ix,k in the prior, let xf ix,k be the value of X at that location. Then Θpost has a fixed-location atom at ψf ix,k , and its weight θpost,f ix,k has distribution Fpost,f ix,k (dθ) ∝ fprior,f ix,k (θ) dθ · h(xf ix,k |θ) ∝ exp {hξf ix,k , η(θ)i + λf ix,k [−A(θ)]} dθ · exp {hη(θ), φ(xf ix,k )i − A(θ)} dθ = exp {hξf ix,k + φ(xf ix,k ), η(θ)i + (λf ix,k + 1) [−A(θ)]} dθ. It follows, from putting in the normalizing constant, that the distribution of θpost,f ix,k has density fpost,f ix,k (θ) = exp {hξf ix,k + φ(xf ix,k ), η(θ)i + (λf ix,k + 1) [−A(θ)] − B(ξf ix,k + φ(xf ix,k ), λf ix,k + 1)} . Second, for any atom xnew,k δψnew,k in X that is not at a fixed location in the prior, Θpost has a fixed atom at ψnew,k whose weight θpost,new,k has distribution Fpost,new,k (θ) ∝ ν(dθ) · h(xnew,k |θ) 18 ∝ exp {hξ, η(θ)i + λ [−A(θ)]} · exp {hη(θ), φ(xnew,k )i − A(θ)} dθ = exp {hξ + φ(xnew,k ), η(θ)i + (λ + 1) [−A(θ)]} dθ and hence density fpost,new,k (θ) = exp {hξ + φ(xnew,k ), η(θ)i + (λ + 1) [−A(θ)] − B(ξ + φ(xnew,k ), λ + 1)} . Third, the ordinary component of Θpost has weight rate measure ν(dθ) · h(0|θ) = γ exp {hξ, η(θ)i + λ [−A(θ)]} · κ(0) exp {hη(θ), φ(0)i − A(θ)} = γκ(0) · exp {hξ + φ(0), η(θ)i + (λ + 1) [−A(θ)]} . Thus, the posterior rate measure is in the same exponential CRM form as the prior rate measure with updated hyperparameters: γpost = γκ(0), ξpost = ξ + φ(0), λpost = λ + 1. Since we see that the posterior fixed-location atoms are likewise in the same exponential CRM form as the prior, we have shown that conjugacy holds, as desired. We next use Theorem 4.2 to give proofs of conjugacy in cases where conjugacy has not previously been established in the Bayesian nonparametrics literature. 4 Example 4.3. Let X be generated P∞according to a Poisson likelihood P∞process conditional on Θ. That is, X = k=1 xk δψk conditional on Θ = k=1 θk δψk has an exponential CRM distribution with only a fixed-location component. The weight xk at location ψk has support on Z∗ and has a Poisson density with parameter θk ∈ R+ : h(x|θk ) = 1 x −θk 1 θk e = exp {x log(θk ) − θk } . x! x! (18) The final line is rewritten to emphasize the exponential family form of this density, with κ(x) = 1 , x! φ(x) = x, η(θ) = log(θ), A(θ) = θ. By Theorem 4.2, this Poisson likelihood process has a Bayesian nonparametric conjugate prior for Θ with two parts. First, Θ has a set of Kprior,f ix fixed-location atoms, where Kprior,f ix < ∞ by Assumption A0. The kth such atom has random weight θf ix,k with density fprior,f ix,k (θ) = exp {hξf ix,k , η(θ)i + λf ix,k [−A(θ)] − B(ξf ix,k , λf ix,k )} 4 We use the term “Poisson likelihood process” to distinguish this specific Bayesian nonparametric likelihood from the Poisson point process. 19 = θξf ix,k e−λf ix,k θ exp {−B(ξf ix,k , λf ix,k )} = Gamma(θ |ξf ix,k + 1, λf ix,k ), (19) where Gamma(θ|a, b) denotes the gamma density with shape parameter a > 0 and rate parameter b > 0. So we must have fixed hyperparameters ξf ix,k > −1 and λf ix,k > 0. Further, ξ ix,k exp {−B(ξf ix,k , λf ix,k )} = λffix,k +1 /Γ(ξf ix,k + 1) to ensure normalization. Second, Θ has an ordinary component characterized by any proper distribution G and weight rate measure ν(dθ) = γ exp {hξ, η(θ)i + λ [−A(θ)]} dθ = γθξ e−λθ dθ. (20) Note that Theorem 4.2 guarantees that the weight rate measure will have the same distributional kernel in θ as the fixed-location atoms. Finally, we need to choose the allowable hyperparameter ranges for γ, ξ, and λ. First, γ > 0 to ensure ν is a measure. By Assumption A1, we must have ν(R+ ) = ∞, so ν must represent an improper gamma distribution. As such, we require either ξ + 1 ≤ 0 or λ ≤ 0. By Assumption A2, we must have Z Z ∞ Z X   γθξ e−λθ dθ · 1 − e−θ < ∞. ν(dθ) · [1 − h(0|θ)] = ν(dθ) · h(x|θ) = x=1 θ∈R+ θ∈R+ θ∈R+ To ensure the integral over [1, ∞) is finite, we must have λ > 0. To ensure the integral over (0, 1) is finite, we note that 1 − e−θ = θ + o(θ) as θ → 0. So we require Z γθξ+1 e−λθ dθ < ∞, θ∈(0,1) which is satisfied if and only if ξ + 2 > 0. Finally, then the hyperparameter restrictions can be summarized as: γ > 0, ξ ∈ (−2, −1], λ > 0; ξf ix,k > −1 and λf ix,k > 0 for all k ∈ [Kprior,f ix ]. The ordinary component of the conjugate prior for Θ discovered in this example is typically called a gamma process. Here, we have for the first time specified the distribution of the fixed-location atoms of the gamma process and, also for the first time, proved that the gamma process is conjugate to the Poisson likelihood process. We highlight this result as a corollary to Theorem 4.2. Corollary 4.4. Let the Poisson likelihood process be a CRM with fixed-location atom weight distributions as in Eq. (18). Let the gamma process be a CRM with fixed-location atom weight distributions as in Eq. (19) and ordinary component weight measure as in Eq. (20). Then the gamma process is a conjugate Bayesian nonparametric prior for the Poisson likelihood process.  20 Example 4.5. Next, let X be generated according to a new process we call an odds Bernoulli process. We have previously seen a typical Bernoulli process likelihood in Example 2.1. In the odds Bernoulli process, we say that X, conditional on Θ, has an exponential CRM distribution. In this case, the weight of the kth atom, xk , conditional on θk has support on {0, 1} and has a Bernoulli density with odds parameter θk ∈ R+ : h(x|θk ) = θkx (1 + θk )−1 = exp {x log(θk ) − log(1 + θk )} . (21) That is, if ρ is the probability of a successful Bernoulli draw, then θ = ρ/(1 − ρ) represents the odds ratio of the probability of success over the probability of failure. The final line of Eq. (21) is written to emphasize the exponential family form of this density, with κ(x) = 1, φ(x) = x, η(θ) = log(θ), A(θ) = log(1 + θ). By Theorem 4.2, the likelihood for X has a Bayesian nonparametric conjugate prior for Θ. This conjugate prior has two parts. First, Θ has a set of Kprior,f ix fixed-location atoms. The kth such atom has random weight θf ix,k with density fprior,f ix,k (θ) = exp {hξf ix,k , η(θ)i + λf ix,k [−A(θ)] − B(ξf ix,k , λf ix,k )} = θξf ix,k (1 + θ)−λf ix,k exp {−B(ξf ix,k , λf ix,k )} = BetaPrime (θ |ξf ix,k + 1, λf ix,k − ξf ix,k − 1 ) , (22) where BetaPrime(θ|a, b) denotes the beta prime density with shape parameters a > 0 and b > 0. Further, exp {−B(ξf ix,k , λf ix,k )} = Γ(λf ix,k ) Γ(ξf ix,k + 1)Γ(λf ix,k − ξf ix,k − 1) to ensure normalization. Second, Θ has an ordinary component characterized by any proper distribution G and weight rate measure ν(dθ) = γ exp {hξ, η(θ)i + λ [−A(θ)]} dθ = γθξ (1 + θ)−λ dθ. (23) We need to choose the allowable hyperparameter ranges for γ, ξ, and λ. First, γ > 0 to ensure ν is a measure. By Assumption A1, we must have ν(R+ ) = ∞, so ν must represent an improper beta prime distribution. As such, we require either ξ + 1 ≤ 0 or λ − ξ − 1 ≤ 0. By Assumption A2, we must have ∞ Z X x=1 θ∈R+ ν(dθ) · h(x|θ) = Z ν(dθ) · h(1|θ) θ∈R+ since the support of x is {0, 1} 21 = Z γθξ (1 + θ)−λ dθ · θ1 (1 + θ)−1 = γ θ∈R+ Z θξ+1 (1 + θ)−λ−1 dθ < ∞. θ∈R+ Since the integrand is the kernel of a beta prime distribution, we simply require that this distribution be proper; i.e., ξ + 2 > 0 and λ − ξ − 1 > 0. The hyperparameter restrictions can be summarized as: γ > 0, ξ ∈ (−2, −1], λ > ξ + 1; ξf ix,k > −1 and λf ix,k > ξf ix,k + 1 for all k ∈ [Kprior,f ix ]. We call the distribution for Θ described in this example the beta prime process. Its ordinary component has previously been defined by Broderick et al. [2015]. But this result represents the first time the beta prime process is described in full, including parameter restrictions and fixed-location atoms, as well as the first proof of its conjugacy with the odds Bernoulli process. We highlight the latter result as a corollary to Theorem 4.2 below. Corollary 4.6. Let the odds Bernoulli process be a CRM with fixed-location atom weight distributions as in Eq. (21). Let the beta process be a CRM with fixed-location atom weight distributions as in Eq. (22) and ordinary component weight measure as in Eq. (23). Then the beta process is a conjugate Bayesian nonparametric prior for the odds Bernoulli process.  5 Size-biased representations We have shown in Section 4.2 that our exponential CRM (Definition 4.1) is useful in that we can find an automatic Bayesian nonparametric conjugate prior given an exponential CRM likelihood. We will see in this section and the next that exponential CRMs allow us to build representations that allow tractable inference despite the infinite-dimensional nature of the models we are using. The best-known size-biased representation of a random measure in Bayesian nonparametrics is the stick-breaking representation of the Dirichlet process ΘDP [Sethuraman, 1994]: ΘDP = ∞ X θDP,k δψk ; k=1 For k ∈ Z∗ , θDP,k = βk k−1 Y (24) (1 − βj ), iid βk ∼ Beta(1, c), iid ψk ∼ G, j=1 where c is a fixed hyperparameter satisfying c > 0. The name “stick-breaking” originates from thinking of the unit interval as a stick of length one. At each round k, only some of the stick remains; βk describes the proportion of the remaining stick that is broken off in round k, and θDP,k describes the total amount of remaining stick that is broken off in 22 round k. By construction, not only is each θDP,k ∈ (0, 1) but in fact the θDP,k add to one (the total stick length) and thus describe a distribution. Eq. (24) is called a size-biased representation for the following reason. Since the weights {θDP,k }∞ k=1 describe a distribution, we can make draws from this distribution; each such draw is sometimes thought of as a multinomial draw with a single trial. In that vein, typically we imagine that our data points Xmult,n are described as iid draws conditioned on ΘDP , where Xmult,n is a random measure with just a single atom: Xmult,n = δψmult,n ; ψmult,n = ψk with probability θDP,k . (25) Then the limiting proportion of data points Xmult,n with an atom at ψmult,1 (the first atom location chosen) is θDP,1 . The limiting proportion of data points with an atom at the next unique atom location chosen will have size θDP,2 , and so on [Broderick et al., 2013]. The representation in Eq. (24) is so useful because there is a familiar, finitedimensional distribution for each of the atom weights θDP,k of the random measure ΘDP . This representation allows approximate inference via truncation [Ishwaran and James, 2001] or exact inference via slice sampling [Walker, 2007, Kalli et al., 2011]. Since the weights {θDP,k }∞ k=1 are constrained to sum to one, the Dirichlet process is not a CRM.5 Indeed, there has been much work on size-biased representations for more general normalized random measures, which include the Dirichlet process as just one example [Perman et al., 1992, Pitman, 1996a,b, 2003]. By contrast, we here wish to explore size-biasing for non-normalized CRMs. In the normalized CRM case, we considered which atom of a random discrete probability measure was drawn first and what is the distribution of that atom’s size. In the non-normalized CRM case considered in the present work, when drawing X conditional on Θ, there may be multiple atoms (or one atom or no atoms) of Θ that correspond to non-zero atoms in X. The number will always be finite though by Assumption A2. In this non-normalized CRM case, we wish to consider the sizes of all such atoms in Θ. Size-biased representations have been developed in the past for particular CRM examples, notably the beta process [Paisley et al., 2010, Broderick et al., 2012]. And even though there is typically no interpretation of these representations in terms of a single stick representing a unit probability mass, they are sometimes referred to as stickbreaking representations as a nod to the popularity of Dirichlet process stickbreaking. In the beta process case, such size-biased representations have already been shown to allow approximate inference via truncation [Doshi et al., 2009, Paisley et al., 2011] or exact inference via slice sampling [Teh et al., 2007, Broderick et al., 2015]. Here we provide general recipes for the creation of these representations and illustrate our recipes by discovering previously unknown size-biased 5 In fact, the Dirichlet process is a normalized gamma process (cf. Example 4.3) [Ferguson, 1973]. 23 representations. We have seen that a general CRM Θ takes the form of an a.s. discrete random measure: ∞ X θk δ ψ k . (26) k=1 The fixed-location atoms are straightforward to simulate; there are finitely many by Assumption A0, their locations are fixed, and their weights are assumed to come from finite-dimensional distributions. The infinite-dimensionality of the Bayesian nonparametric CRM comes from the ordinary component (cf. Section 2.3 and Assumption A1). So far the only description we have of the ordinary component is its generation from the countable infinity of points in a Poisson point process. The next result constructively demonstrates that we can represent the distributions of the CRM weights {θk }∞ k=1 in Eq. (26) as a sequence of finite-dimensional distributions, much as in the familiar Dirichlet process case. Theorem 5.1 (Size-biased representations). Let Θ be a completely random measure that satisfies Assumptions A0 and A1; that is, Θ is a CRM with Kf ix fixed atoms such that Kf ix < ∞ and such that the kth atom can be written θf ix,k δψf ix,k . The ordinary component of Θ has rate measure µ(dθ × dψ) = ν(dθ) · G(dψ), P∞ where G is a proper distribution and ν(R+ ) = ∞. Write P Θ = k=1 θk δψk , ∞ and let Xn be generated iid given Θ according to Xn = k=1 xn,k δψk with indep xn,k ∼ h(x|θk ) for proper, discrete probability mass function h. And suppose Xn and Θ jointly satisfy Assumption A2 so that ∞ Z X x=1 ν(dθ)h(x|θ) < ∞. θ∈R+ Then we can write Θ= m,x ∞ X ∞ ρX X θm,x,j δψm,x,j m=1 x=1 j=1 iid ψm,x,k ∼ G iid across m, x, j  Z  indep ρm,x ∼ Poisson ρ ν(dθ)h(0|θ)m−1 h(x|θ) across m, x (27) θ indep θm,x,j ∼ Fsize,m,x (dθ) ∝ ν(dθ)h(0|θ)m−1 h(x|θ) iid across j and independently across m, x. Proof. By construction, Θ is an a.s. discrete random measure with a countable infinity of atoms. Without loss of generality, suppose that for every (non-zero) value of an atom weight θ, there is a non-zero probability of generating an atom 24 with non-zero weight x in the likelihood. Now suppose we generate X1 , X2 , . . .. Then, for every atom θδψ of Θ, there exists some finite n with an atom at ψ. Therefore, we can enumerate all of the atoms of Θ by enumerating • Each atom θδψ such that there is an atom in X1 at ψ. • Each atom θδψ such that there is an atom in X2 at ψ but there is not an atom in X1 at ψ. .. . • Each atom θδψ such that there is an atom in Xm at ψ but there is not an atom in any of X1 , X2 , . . . , Xm−1 at ψ. .. . Moreover, on the mth round of this enumeration, we can further break down the enumeration by the value of the observation Xm at the atom location: • Each atom θδψ such that there is an atom in Xm of weight 1 at ψ but there is not an atom in any of X1 , X2 , . . . , Xm−1 at ψ. • Each atom θδψ such that there is an atom in Xm of weight 2 at ψ but there is not an atom in any of X1 , X2 , . . . , Xm−1 at ψ. .. . • Each atom θδψ such that there is an atom in Xm of weight x at ψ but there is not an atom in any of X1 , X2 , . . . , Xm−1 at ψ. .. . Recall that the values θk that form the weights of Θ are generated according to a Poisson point process with rate measure ν(dθ). So, on the first round, the values of θk such that x1,k = x also holds are generated according to a thinned Poisson point process with rate measure ν(dθ)h(x|θ). In particular, since the rate measure has finite total mass by Assumption A2, we can define Z M1,x := ν(dθ)h(x|θ), θ which will be finite. Then the number of atoms θk for which x1,k = x is ρ1,x ∼ Poisson(ρ|M1,x ). And each such θk has weight with distribution Fsize,1,x (dθ) ∝ ν(dθ)h(x|θ). 25 Finally, note from Theorem 3.1 that the posterior Θ|X1 has weight rate measure ν1 (dθ) := ν(dθ)h(0|θ). Now take any m > 1. Suppose, inductively, that the ordinary component of the posterior Θ|X1 , . . . , Xm−1 has weight rate measure νm−1 (dθ) := ν(dθ)h(0|θ)m−1 . The atoms in this ordinary component have been selected precisely because they have not appeared in any of X1 , . . . , Xm−1 . As for m = 1, we have that the atoms θk in this ordinary component with corresponding weight in Xm equal to x are formed by a thinned Poisson point process, with rate measure νm−1 (dθ)h(x|θ) = ν(dθ)h(0|θ)m−1 h(x|θ). Since the rate measure has finite total mass by Assumption A2, we can define Z Mm,x := ν(dθ)h(0|θ)m−1 h(x|θ), θ which will be finite. Then the number of atoms θk for which x1,k = x is ρm,x ∼ Poisson(ρ|Mm,x ). And each such θk has weight Fsize,m,x ∝ ν(dθ)h(0|θ)m−1 h(x|θ). Finally, note from Theorem 3.1 that the posterior Θ|X1:m , which can be thought of as generated by prior Θ|X1:(m−1) and likelihood Xm |Θ, has weight rate measure ν(dθ)h(0|θ)m−1 h(0|θ) = νm (dθ), confirming the inductive hypothesis. Recall that every atom of Θ is found in exactly one of these rounds and that x ∈ Z+ . Also recall that the atom locations may be generated independently and identically across atoms, and independently from all the weights, according to proper distribution G (Section 2.2). To summarize, we have then Θ= m,x ∞ X ∞ ρX X θm,x,j δψm,x,j , m=1 x=1 j=1 where iid ψm,x,k ∼ G iid across m, x, j Z Mm,x = ν(dθ)h(0|θ)m−1 h(x|θ) across m, x θ 26 indep ρm,x ∼ Poisson(ρ|Mm,x ) across m, x Fsize,m,x (dθ) ∝ ν(dθ)h(0|θ)m−1 h(x|θ) across m, x indep θm,x,j ∼ Fsize,m,x (dθ) iid across j and independently across m, x, as was to be shown. The following corollary gives a more detailed recipe for the calculations in Theorem 5.1 when the prior is in a conjugate exponential CRM to the likelihood. Corollary 5.2 (Exponential CRM size-biased representations). Let Θ be an exponential CRM with no fixed-location atoms (thereby trivially satisfying Assumption A0) such that Assumption A1 holds. Let X be generated conditional on Θ according to an exponential CRM with fixed-location atoms at {ψk }∞ k=1 and no ordinary component. Let the distribution of the weight xn,k at ψk have probability mass function h(x|θk ) = κ(x) exp {hη(θk ), φ(x)i − A(θk )} . Suppose that Θ and X jointly satisfy Assumption A2. And let Θ be conjugate to X as in Theorem 4.2. Then we can write Θ= m,x ∞ X ∞ ρX X θm,x,j δψm,x,j m=1 x=1 j=1 iid ψm,x,j ∼ G iid across m, x, j Mm,x = γ · κ(0)m−1 κ(x) · exp {B(ξ + (m − 1)φ(0) + φ(x), λ + m)} indep ρm,x ∼ Poisson (ρ|Mm,x ) independently across m, x (28) indep θm,x,j ∼ fsize,m,x (θ) dθ = exp {hξ + (m − 1)φ(0) + φ(x), η(θ)i + (λ + m)[−A(θ)] − B(ξ + (m − 1)φ(0) + φ(x), λ + m)} iid across j and independently across m, x. Proof. The corollary follows from Theorem 5.1 by plugging in the particular forms for ν(dθ) and h(x|θ). In particular, Z ν(dθ)h(0|θ)m−1 h(x|θ) Mm,x = θ∈R+ Z γ exp {hξ, η(θ)i + λ [−A(θ)]} = θ∈R+ m−1 · [κ(0) exp {hη(θ), φ(0)i − A(θ)}] · κ(x) exp {hη(θ), φ(x)i − A(θ)} dθ 27 = γκ(0)m−1 κ(x) exp {B (ξ + (m − 1)φ(0) + φ(x), λ + m)} , Corollary 5.2 can be used to find the known size-biased representation of the beta process [Thibaux and Jordan, 2007]; we demonstrate this derivation in detail in Example B.1 in Appendix B. Here we use Corollary 5.2 to discover a new size-biased representation of the gamma process. Example 5.3. Let Θ be a gamma process, and let Xn be iid Poisson likelihood processes conditioned on Θ for each n as in Example 4.3. That is, we have ν(dθ) = γθξ e−λθ dθ. And h(x|θk ) = 1 x −θk θ e x! k with γ > 0, ξ ∈ (−2, −1], ξf ix,k > −1 and λf ix,k > 0 λ > 0; for all k ∈ [Kprior,f ix ] by Example 4.3. We can pick out the following components of h: κ(x) = 1 , x! φ(x) = x, η(θ) = log(θ), A(θ) = θ. Thus, by Corollary 5.2, we have fsize,m,x (θ) ∝ θξ+x e−(λ+m)θ ∝ Gamma (θ |ξ + x + 1, λ + m ) . We summarize the representation that follows from Corollary 5.2 in the following result. Corollary 5.4. Let the gamma process be a CRM Θ with fixed-location atom weight distributions as in Eq. (19) and ordinary component weight measure as in Eq. (20). Then we may write Θ= m,x ∞ X ∞ ρX X θm,x,j δψm,x,j m=1 x=1 j=1 iid ψm,x,j ∼ G Mm,x = γ · iid across m, x, j 1 · Γ(ξ + x + 1) · (λ + m)−(ξ+x+1) across m, x x! indep ρm,x ∼ Poisson (ρ|Mm,x) across m, x indep θm,x,j ∼ Gamma (θ |ξ + x + 1, λ + m ) iid across j and independently across m, x.  28 6 Marginal processes In Section 5, although we conceptually made use of the observations {X1 , X2 , . . .}, we focused on a representation of the prior Θ: cf. Eqs. (27) and (28). In this section, we provide a representation of the marginal of X1:N , with Θ integrated out. The canonical example of a marginal process again comes from the Dirichlet process (DP). In this case, the full model consists of the DP-distributed prior on ΘDP (as in Eq. (24)) together with the likelihood for Xmult,n conditional on ΘDP (iid across n) described by Eq. (25). Then the marginal distribution of Xmult,1:N is described by the Chinese restaurant process. This marginal takes the following form. For each n = 1, 2, . . . , N , K n−1 be the union of atom locations in Xmult,1 , . . . , Xmult,n−1 . 1. Let {ψk }k=1 Then Xmult,n |Xmult,1 , . . . , Xmult,n−1 has a single atom at ψ, where  PKn−1 ψk with probability ∝ k=1 Xmult,m ({ψk }) ψ= ψnew with probability ∝ c ψnew ∼ G In the case of CRMs, the canonical example of a marginal process is the Indian buffet process [Griffiths and Ghahramani, 2006]. Both the Chinese restaurant process and Indian buffet process have proven popular for inference since the underlying infinite-dimensional prior is integrated out in these processes and only the finite-dimensional marginal remains. By Assumption A2, we know that the marginal will generally be finite-dimensional for our CRM Bayesian models. And thus we have the following general marginal representations for such models. Theorem 6.1 (Marginal representations). Let Θ be a completely random measure that satisfies Assumptions A0 and A1; that is, Θ is a CRM with Kf ix fixed atoms such that Kf ix < ∞ and such that the kth atom can be written θf ix,k δψf ix,k . The ordinary component of Θ has rate measure µ(dθ × dψ) = ν(dθ) · G(dψ), P∞ where G is a proper distribution and ν(R+ ) = ∞. Write P Θ = k=1 θk δψk , ∞ and let Xn be generated iid given Θ according to Xn = x δψk with n,k k=1 indep xn,k ∼ h(x|θk ) for proper, discrete probability mass function h. And suppose Xn and Θ jointly satisfy Assumption A2 so that ∞ Z X ν(dθ)h(x|θ) < ∞. x=1 θ∈R+ Then the marginal distribution of X1:N is the same as that provided by the following construction. For each n = 1, 2, . . . , N , 29 K n−1 be the union of atom locations in X1 , . . . , Xn−1 . Let xm,k := 1. Let {ψk }k=1 Xm ({ψk }). Let xn,k denote the weight of Xn |X1 , . . . , Xn−1 at ψk . Then xn,k has distribution described by the following probability mass function: R Qn−1  m=1 h(xm,k |θ) θ∈R+ ν(dθ)h(x|θ) . hcond xn,k = x x1:(n−1),k = R Qn−1 m=1 h(xm,k |θ) θ∈R+ ν(dθ) 2. For each x = 1, 2, . . . ρ n,x , • Xn has ρn,x new atoms. That is, Xn has atoms at locations {ψn,x,j }j=1 where ρn,x Kn−1 = ∅ a.s. ∩ {ψk }k=1 {ψn,x,j }j=1 Moreover,  Z  indep ρn,x ∼ Poisson ρ ν(dθ)h(0|θ)n−1 h(x|θ) across n, x θ iid ψn,x,j ∼ G(dψ) across n, x, j. Proof. We saw in the proof of Theorem 5.1 that the marginal for X1 can be expressed as follows. For each x ∈ Z+ , there are ρ1,x atoms of X1 with weight x, where Z  indep ν(dθ)h(x|θ) across x. ρ1,x ∼ Poisson These atoms have locations θ ρ1,x {ψ1,x,j }j=1 , where iid ψ1,x,j ∼ G(dψ) across x, j. P∞ 1 For the upcoming induction, let K1 := x=1 ρ1,x . And let {ψk }K k=1 be the (a.s. ρ1,x disjoint by assumption) union of the sets {ψ1,x,j }j=1 across x. Note that K1 is finite by Assumption A2. We will also find it useful in the upcoming induction to let Θpost,1 have the distribution of Θ|X1 . Let θpost,1,x,j = Θpost,1 ({ψ1,x,j }). By Theorem 3.1 or the proof of Theorem 5.1, we have that indep θpost,1,x,j ∼ Fpost,1,x,j (dθ) ∝ ν(dθ)h(x|θ) independently across x and iid across j. K n−1 is the union Now take any n > 1. Inductively, we assume {ψn−1,k }k=1 of all the atom locations of X1 , . . . , Xn−1 . Further assume Kn−1 is finite. Let Θpost,n−1 have the distribution of Θ|X1 , . . . , Xn−1 . Let θn−1,k be the weight of Θpost,n−1 at ψn−1,k . And, for any m ∈ [n − 1], let xm,k be the weight of Xm at ψn−1,k . We inductively assume that indep θn−1,k ∼ Fn−1,k (dθ) ∝ ν(dθ) n−1 Y m=1 independently across k. 30 h(xm,k |θ) (29) Now let ψn,k equal ψn−1,k for k ∈ [Kn−1 ]. Let xn,k denote the weight of Xn at ψn,k for k ∈ [Kn−1 ]. Conditional on the atom weight of Θ at ψn,k , the atom weights of X1 , . . . , Xn−1 , Xn are independent. Since the atom weights of Θ are independent as well, we have that xn,k |X1 , . . . , Xn−1 has the same distribution as xn,k |x1,k , . . . , xn−1,k . We can write the probability mass function of this distribution as follows. hcond (xn,k = x |x1,k , . . . , xn−1,k ) Z Fn−1,k (dθ)h(x|θ) = θ∈R+ = R θ∈R+ R h ν(dθ) θ∈R+ Qn−1 m=1 ν(dθ) i h(xm,k |θ) · h(x|θ) Qn−1 m=1 h(xm,k |θ) , where the last line follows from Eq. (29). We next show the inductive hypothesis in Eq. (29) holds for n and k ∈ [Kn−1 ]. Let xn,k denote the weight of Xn at ψn,k for k ∈ [Kn−1 ]. Let Fn,k (dθ) denote the distribution of xn,k and note that Fn,k (dθ) ∝ Fn−1,k (dθ) · h(xn,k |θ) n Y = ν(dθ) h(xm,k |θ), m=1 which agrees with Eq. (29) for n when we assume the result for n − 1. The previous development covers atoms that are present in at least one of X1 , . . . , Xn−1 . Next we consider new atoms in Xn ; that is, we consider atoms in Xn for which there are no atoms at the same location in any of X1 , . . . , Xn−1 . We saw in the proof of Theorem 5.1 that, for each x ∈ Z+ , there are ρn,x new atoms of Xn with weight x such that  Z  indep ρn,x ∼ Poisson ρ ν(dθ)h(0|θ)n−1 h(x|θ) across x. θ ρ n,x with These new atoms have locations {ψn,x,j }j=1 iid ψn,x,j ∼ G(dψ) across x, j. By Assumption A2, P∞ x=1 ρn,x < ∞. So Kn := Kn−1 + ∞ X ρn,x x=1 remains finite. Let ψn,k for k ∈ {Kn−1 + 1, . . . , Kn } index these new locations. Let θn,k be the weight of Θpost,n at ψn,k for k ∈ {Kn−1 + 1, . . . , Kn }. And let xn,k be the value of X at ψn,k . 31 We check that the inductive hypothesis holds. By repeated application of Theorem 3.1, the ordinary component of Θ|X1 , . . . , Xn−1 has rate measure ν(dθ)h(0|θ)n−1 . So, again by Theorem 3.1, we have that indep θn,k ∼ Fn.k (dθ) ∝ ν(dθ)h(0|θ)n−1 h(xn,k |θ). Since Xm has value 0 at ψn,k for m ∈ {1, . . . , n − 1} by construction, we have that the inductive hypothesis holds. As in the case of size-biased representations (Section 5 and Corollary 5.2), we can find a more detailed recipe when the prior is in a conjugate exponential CRM to the likelihood. Corollary 6.2 (Exponential CRM marginal representations). Let Θ be an exponential CRM with no fixed-location atoms (thereby trivially satisfying Assumption A0) such that Assumption A1 holds. Let X be generated conditional on Θ according to an exponential CRM with fixed-location atoms at {ψk }∞ k=1 and no ordinary component. Let the distribution of the weight xn,k at ψk have probability mass function h(x|θk ) = κ(x) exp {hη(θk ), φ(x)i − A(θk )} . Suppose that Θ and X jointly satisfy Assumption A2. And let Θ be conjugate to X as in Theorem 4.2. Then the marginal distribution of X1:N is the same as that provided by the following construction. For each n = 1, 2, . . . , N , K n−1 be the union of atom locations in X1 , . . . , Xn−1 . Let xm,k := 1. Let {ψk }k=1 Xm ({ψk }). Let xn,k denote the weight of Xn |X1 , . . . , Xn−1 at ψk . Then xn,k has distribution described by the following probability mass function:  hcond xn,k = x x1:(n−1),k ( ) n−1 n−1 X X = κ(x) exp −B(ξ + xm , λ + n − 1) + B(ξ + xm + x, λ + n) . m=1 m=1 2. For each x = 1, 2, . . . ρ n,x , • Xn has ρn,x new atoms. That is, Xn has atoms at locations {ψn,x,j }j=1 where ρn,x Kn−1 = ∅ a.s. ∩ {ψk }k=1 {ψn,x,j }j=1 Moreover, Mn,x := γ · κ(0)n−1 κ(x) · exp {B(ξ + (n − 1)φ(0) + φ(x), λ + n)} across n, x indep ρn,x ∼ Poisson (ρ |Mn,x ) across n, x iid ψn,x,j ∼ G(dψ) across n, x, j. 32 Proof. The corollary follows from Theorem 6.1 by plugging in the forms for ν(dθ) and h(x|θ). In particular, Z ν(dθ) θ∈R+ = Z n Y h(xm,k |θ) m=1 γ exp {hξ, η(θ)i + λ [−A(θ)]} · θ∈R+ =γ " n Y " n Y κ(xm,k ) exp {hη(θ), φ(xm,k )i − A(θ)} m=1 # κ(xm,k ) B m=1 ξ+ n X # ! φ(xm,k ), λ + n . m=1 So  hcond xn,k = x x1:(n−1),k R Qn−1 ν(dθ)h(x|θ) m=1 h(xm,k |θ) θ∈R+ = R Qn−1 m=1 h(xm,k |θ) θ∈R+ ν(dθ) ( ) n−1 n−1 X X = κ(x) exp −B(ξ + xm , λ + n − 1) + B(ξ + xm + x, λ + n) . m=1 m=1 In Example C.1 in Appendix C we show that Corollary 6.2 can be used to recover the Indian buffet process marginal from a beta process prior together with a Bernoulli process likelihood. In the following example, we discover a new marginal for the Poisson likelihood process with gamma process prior. Example 6.3. Let Θ be a gamma process, and let Xn be iid Poisson likelihood processes conditioned on Θ for each n as in Example 4.3. That is, we have ν(dθ) = γθξ e−λθ dθ and h(x|θk ) = 1 x −θk θ e x! k with γ > 0, ξ ∈ (−2, −1], λ > 0; ξf ix,k > −1 and λf ix,k > 0 for all k ∈ [Kprior,f ix ] by Example 4.3. We can pick out the following components of h: κ(x) = And we calculate Z exp {B(ξ, λ)} = 1 , x! φ(x) = x, η(θ) = log(θ), exp {hξ, η(θ)i + λ[−A(θ)]} dθ = A(θ) = θ. Z θ∈R+ θ∈R+ 33 θξ e−λθ = Γ(ξ + 1)λ−(ξ+1) . So, for k ∈ Z∗ , we have ( P(xn = x) = κ(x) exp −B(ξ + n−1 X xm , λ + n − 1) + B(ξ + m=1 Pn−1 n−1 X ) xm + x, λ + n) m=1 Pn−1 1 (λ + n − 1)ξ+ m=1 xm +1 Γ(ξ + m=1 xm + x + 1) · · Pn−1 Pn−1 x! Γ(ξ + m=1 xm + 1) (λ + n)ξ+ m=1 xm +x+1 Pn−1 ξ+Pnm=1 xm +1  x  Γ(ξ + m=1 xm + x + 1) 1 λ+n−1 = · Pn−1 λ+n λ+n Γ(x + 1)Γ(ξ + m=1 xm + 1) ! n−1 X = NegBin x ξ + xm + 1, (λ + n)−1 . = m=1 And Mn,x := γ · κ(0)n−1 κ(x) · exp {B(ξ + (n − 1)φ(0) + φ(x), λ + n)} 1 =γ· · Γ(ξ + x + 1)(λ + n)−(ξ+x+1) . x! We summarize the marginal distribution representation of X1:N that follows from Corollary 6.2 in the following result. Corollary 6.4. Let Θ be a gamma process with fixed-location atom weight distributions as in Eq. (19) and ordinary component weight measure as in Eq. (20). Let Xn be drawn, iid across n, conditional on Θ according to a Poisson likelihood process with fixed-location atom weight distributions as in Eq. (18). Then X1:N has the same distribution as the following construction. For each n = 1, 2, . . . , N , K n−1 be the union of atom locations in X1 , . . . , Xn−1 . Let xm,k := 1. Let {ψk }k=1 Xm ({ψk }). Let xn,k denote the weight of Xn |X1 , . . . , Xn−1 at ψk . Then xn,k has distribution described by the following probability mass function: ! n−1 X  xm,k + 1, (λ + n)−1 . hcond xn,k = x x1:(n−1),k = NegBin x ξ + m=1 2. For each x = 1, 2, . . . ρ n,x , • Xn has ρn,x new atoms. That is, Xn has atoms at locations {ψn,x,j }j=1 where ρn,x Kn−1 = ∅ a.s. ∩ {ψk }k=1 {ψn,x,j }j=1 Moreover, 1 Γ(ξ + x + 1) · x! (λ + n)ξ+x+1 across n, x Mn,x := γ · 34 indep ρn,x ∼ Poisson (ρ |Mn,x ) independently across n, x iid ψn,x,j ∼ G(dψ) independently across n, x and iid across j.  7 Discussion In the preceding sections, we have shown how to calculate posteriors for general CRM-based priors and likelihoods for Bayesian nonparametric models. We have also shown how to represent Bayesian nonparametric priors as a sequence of finite draws, and full Bayesian nonparametric models via finite marginals. We have introduced a notion of exponential families for CRMs, which we call exponential CRMs, that has allowed us to specify automatic Bayesian nonparametric conjugate priors for exponential CRM likelihoods. And we have demonstrated that our exponential CRMs allow particularly straightforward recipes for sizebiased and marginal representations of Bayesian nonparametric models. Along the way, we have proved that the gamma process is a conjugate prior for the Poisson likelihood process and the beta prime process is a conjugate prior for the odds Bernoulli process. We have discovered a size-biased representation of the gamma process and a marginal representation of the gamma process coupled with a Poisson likelihood process. All of this work has relied heavily on the description of Bayesian nonparametric models in terms of completely random measures. As such, we have worked very particularly with pairings of real values—the CRM atom weights, which we have interpreted as trait frequencies or rates—together with trait descriptors— the CRM atom locations. However, all of our proofs broke into essentially two parts: the fixed-location atom part and the ordinary component part. The fixedlocation atom development essentially translated into the usual finite version of Bayes Theorem and could easily be extended to full Bayesian models where the prior describes a random element that need not be real-valued. Moreover, the ordinary component development relied entirely on its generation as a Poisson point process over a product space. It seems reasonable to expect that our development might carry through when the first element in this tuple need not be real-valued. And thus we believe our results are suggestive of broader results over more general spaces. Acknowledgements Support for this project was provided by ONR under the Multidisciplinary University Research Initiative (MURI) program (N00014-11-1-0688). T. Broderick was supported by a Berkeley Fellowship. A. C. Wilson was supported by an NSF Graduate Research Fellowship. 35 A Further automatic conjugate priors We use Theorem 4.2 to calculate automatic conjugate priors for further exponential CRMs. Example A.1. Let X be generated according to a Bernoulli process as in Example 2.1. That is, X has an exponential CRM distribution with Klike,f ix fixed-location atoms, where Klike,f ix < ∞ in accordance with Assumption A0: Klike,f ix X= X xlike,k δψlike,k . k=1 The weight of the kth atom, xlike,k , has support on {0, 1} and has a Bernoulli density with parameter θk ∈ (0, 1]: h(x|θk ) = θkx (1 − θk )1−x = exp {x log(θk /(1 − θk )) + log(1 − θk )} . The final line is rewritten to emphasize the exponential family form of this density, with κ(x) = 1 φ(x) = x η(θ) = log  θ 1−θ  A(θ) = − log(1 − θ). Then, by Theorem 4.2, X has a Bayesian nonparametric conjugate prior for Klike,f ix Θ := X θk δ ψ k . k=1 This conjugate prior has two parts. First, Θ has a set of Kprior,f ix fixed-location atoms at some subset of the Klike,f ix fixed locations of X. The kth such atom has random weight θf ix,k with density fprior,f ix,k (θ) = exp {hξf ix,k , η(θ)i + λf ix,k [−A(θ)] − B(ξf ix,k , λf ix,k )} = θξf ix,k (1 − θ)λf ix,k −ξf ix,k exp {−B(ξf ix,k , λf ix,k )} = Beta (θ |ξf ix,k + 1, λf ix,k − ξf ix,k + 1 ) , where Beta(θ|a, b) denotes the beta density with shape parameters a > 0 and b > 0. So we must have fixed hyperparameters ξf ix,k > −1 and λf ix,k > ξf ix,k − 1. Further, exp {−B(ξf ix,k , λf ix,k )} = Γ(λf ix,k + 2) Γ(ξf ix,k + 1)Γ(λf ix,k − ξf ix,k + 1) 36 to ensure normalization. Second, Θ has an ordinary component characterized by any proper distribution G and weight rate measure ν(dθ) = γ exp {hξ, η(θ)i + λ [−A(θ)]} dθ = γθξ (1 − θ)λ−ξ dθ. Finally, we need to choose the allowable hyperparameter ranges for γ, ξ, and λ. γ > 0 ensures ν is a measure. By Assumption A1, we must have ν(R+ ) = ∞, so ν must represent an improper beta distribution. As such, we require either ξ + 1 ≤ 0 or λ − ξ ≤ 0. By Assumption A2, we must have ∞ Z X ν(dθ) · h(x|θ) θ∈R+ x=1 = Z ν(dθ)h(1|θ) θ∈(0,1] since the support of x is {0, 1} and the support of θ is (0, 1] Z =γ θξ (1 − θ)λ−ξ dθ · θ θ∈(0,1] <∞ Since the integrand is the kernel of a beta distribution, the integral is finite if and only if ξ + 2 > 0 and λ − ξ + 1 > 0. Finally, then the hyperparameter restrictions can be summarized as: γ>0 ξ ∈ (−2, −1] λ>ξ−1 ξf ix,k > −1 and λf ix,k > ξf ix,k − 1 for all k ∈ [Kprior,f ix ] By setting α = ξ+1, c = λ+2, ρf ix,k = ξf ix,k +1, and σf ix,k = λf ix,k −ξf ix,k +1, we recover the hyperparameters of Eq. (11) in Example 2.1. Here, by contrast to Example 2.1, we found the conjugate prior and its hyperparameter settings given just the Bernoulli process likelihood. Henceforth, we use the parameterization of the beta process above.  B Further size-biased representations Example B.1. Let Θ be a beta process, and let Xn be iid Bernoulli processes conditioned on Θ for each n as in Example A.1. That is, we have ν(dθ) = γθξ (1 − θ)λ−ξ dθ. And h(x|θk ) = θkx (1 − θk )1−x 37 with γ>0 ξ ∈ (−2, −1] λ>ξ−1 ξf ix,k > −1 and λf ix,k > ξf ix,k − 1 for all k ∈ [Kprior,f ix ] by Example A.1. We can pick out the following components of h: κ(x) = 1 φ(x) = x η(θ) = log  θ 1−θ  A(θ) = − log(1 − θ). Thus, by Corollary 5.2, Θ= m,x ∞ X ∞ ρX X θm,x,j δψm,x,j m=1 x=1 j=1 iid ψm,x,j ∼ G iid across m, x, j indep θm,x,j ∼ fsize,m,x (θ) dθ ∝ θξ+x (1 − θ)λ+m−ξ−x dθ ∝ Beta (θ |ξ + x, λ − ξ + m − x ) dθ iid across j and independently across m, x Mm,x := γ · Γ(ξ + x + 1)Γ(λ − ξ + m − x + 1) Γ(λ + m + 2) indep ρm,x ∼ Poisson (Mm,x ) across m, x Broderick et al. [2012] and Paisley et al. [2012] have previously noted that this size-biased representation of the beta process arises from the Poisson point process.  C Further marginals Example C.1. Let Θ be a beta process, and let Xn be iid Bernoulli processes conditioned on Θ for each n as in Examples A.1 and B.1. We calculate the main components of Corollary 6.2 for this pair of processes. In particular, we have ( ) n−1 n−1 X X P(xn = 1) = κ(k) exp −B(ξ + xm , λ + n − 1) + B(ξ + xm + 1, λ + n) m=1 m=1 38 Γ(λ + n − 1 + 2) Pn−1 x + 1)Γ(λ + n − 1 − ξ − m=1 xm + 1) m=1 m Pn−1 Pn−1 Γ(ξ + m=1 xm + 1 + 1)Γ(λ + n − ξ − m=1 xm − 1 + 1) · Γ(λ + n + 2) Pn−1 ξ + m=1 xm + 1 = λ+n+1 = Γ(ξ + Pn−1 And Mn,1 := γ · κ(0)n−1 κ(1) · exp {B(ξ + (n − 1)φ(0) + φ(1), λ + n)} =γ· Γ(ξ + 1 + 1)Γ(λ + n − ξ − 1 + 1) Γ(λ + n + 2) Thus, the marginal distribution of X1:N is the same as that provided by the following construction. For each n = 1, 2, . . . , N , 1. At any location ψ for which there is some atom in X1 , . . . , Xn−1 , let xm be the weight of Xm at ψ for m ∈ [n−1]. Then we have that Xn |X1 , . . . , Xn−1 has weight xn at ψ, where ! Pn−1 ξ + m=1 xm + 1 P(dxn ) = Bern xn λ+n+1 2. Xn has ρn,1 atoms at locations {ψn,1,j } with j ∈ [ρn,1 ] where there have not yet been atoms in any of X1 , . . . , Xn−1 . Moreover, Γ(ξ + 1 + 1)Γ(λ + n − ξ − 1 + 1) Γ(λ + n + 2) across n Mn,1 := γ · indep ρn,1 ∼ Poisson (Mn,1 ) across n, x iid ψn,1,j ∼ G(dψ) across n, j Here, we have recovered the three-parameter extension of the Indian buffet process [Teh and Görür, 2009, Broderick et al., 2013].  39 References E. M. Airoldi, D. Blei, E. A. Erosheva, and S. E. Fienberg. Handbook of Mixed Membership Models and Their Applications. CRC Press, 2014. D. M. Blei, A. Y. Ng, and M. I. Jordan. Latent Dirichlet allocation. Journal of Machine Learning Research, 3:993–1022, 2003. T. Broderick, M. I. Jordan, and J. Pitman. Beta processes, stick-breaking, and power laws. Bayesian Analysis, 7(2):439–476, 2012. T. Broderick, M. I. Jordan, and J. Pitman. Cluster and feature modeling from combinatorial stochastic processes. Statistical Science, 2013. T. Broderick, L. Mackey, J. Paisley, and M. I. Jordan. Combinatorial clustering and the beta negative binomial process. IEEE TPAMI, 2015. P. Damien, J. Wakefield, and S. Walker. Gibbs sampling for Bayesian nonconjugate and hierarchical models by using auxiliary variables. Journal of the Royal Statistical Society: Series B, 61(2):331–344, 1999. M. H. DeGroot. Optimal Statistical Decisions. John Wiley & Sons, Inc, 1970. P. Diaconis and D. Ylvisaker. Conjugate priors for exponential families. The Annals of Statistics, 7(2):269–281, 1979. K. Doksum. Tailfree and neutral random probabilities and their posterior distributions. The Annals of Probability, pages 183–201, 1974. F. Doshi, K. T. Miller, J. Van Gael, and Y. W. Teh. Variational inference for the Indian buffet process. In AISTATS, 2009. M. D. Escobar. Estimating normal means with a Dirichlet process prior. Journal of the American Statistical Association, 89(425):268–277, 1994. M. D. Escobar and M. West. Bayesian density estimation and inference using mixtures. Journal of the American Statistical Association, 90(430):577–588, 1995. M. D. Escobar and M. West. Computing nonparametric hierarchical models. In Practical nonparametric and semiparametric Bayesian statistics, pages 1–22. Springer, 1998. T. S. Ferguson. A Bayesian analysis of some nonparametric problems. The Annals of Statistics, pages 209–230, 1973. T. S. Ferguson. Prior distributions on spaces of probability measures. The Annals of Statistics, pages 615–629, 1974. T. Griffiths and Z. Ghahramani. Infinite latent feature models and the Indian buffet process. In NIPS, 2006. 40 N. L. Hjort. Nonparametric Bayes estimators based on beta processes in models for life history data. The Annals of Statistics, pages 1259–1294, 1990. H. Ishwaran and L. F. James. Gibbs sampling methods for stick-breaking priors. Journal of the American Statistical Association, 96(453), 2001. L. F. James. Poisson latent feature calculus for generalized Indian buffet processes. arXiv preprint arXiv:1411.2936, 2014. L. F. James, A. Lijoi, and I. Prünster. Posterior analysis for normalized random measures with independent increments. Scandinavian Journal of Statistics, 36(1):76–97, 2009. M. Kalli, J. E. Griffin, and S. G. Walker. Slice sampling mixture models. Statistics and Computing, 21(1):93–105, 2011. Y. Kim. Nonparametric Bayesian estimators for counting processes. Annals of Statistics, pages 562–588, 1999. J. F. C. Kingman. Completely random measures. Pacific Journal of Mathematics, 21(1):59–78, 1967. J. F. C. Kingman. Poisson Processes, volume 3. Oxford University Press, 1992. A. Lijoi and I. Prünster. Models beyond the Dirichlet process. In N. L. Hjort, C. Holmes, P. Müller, and S. G. Walker, editors, Bayesian Nonparametrics. Cambridge Series in Statistical and Probabilistic Mathematics, 2010. A. Y. Lo. Bayesian nonparametric statistical inference for Poisson point processes. Zeitschrift für Wahrscheinlichkeitstheorie und verwandte Gebiete, 59 (1):55–66, 1982. A. Y. Lo. On a class of Bayesian nonparametric estimates: I. Density estimates. Annals of Statistics, 12(1):351–357, 1984. S. N. MacEachern. Estimating normal means with a conjugate style Dirichlet process prior. Communications in Statistics-Simulation and Computation, 23 (3):727–741, 1994. R. M. Neal. Markov chain sampling methods for Dirichlet process mixture models. Journal of Computational and Graphical Statistics, 9(2):249–265, 2000. R. M. Neal. Slice sampling. Annals of Statistics, pages 705–741, 2003. P. Orbanz. Conjugate projective limits. arXiv preprint arXiv:1012.0363, 2010. J. W. Paisley, A. K. Zaas, C. W. Woods, G. S. Ginsburg, and L. Carin. A stick-breaking construction of the beta process. In ICML, pages 847–854, 2010. 41 J. W. Paisley, L. Carin, and D. M. Blei. Variational inference for stick-breaking beta process priors. In ICML, pages 889–896, 2011. J. W. Paisley, D. M. Blei, and M. I. Jordan. Stick-breaking beta processes and the Poisson process. In AISTATS, pages 850–858, 2012. M. Perman, J. Pitman, and M. Yor. Size-biased sampling of poisson point processes and excursions. Probability Theory and Related Fields, 92(1):21–39, 1992. J. Pitman. Random discrete distributions invariant under size-biased permutation. Advances in Applied Probability, pages 525–539, 1996a. J. Pitman. Some developments of the Blackwell-MacQueen urn scheme. Lecture Notes-Monograph Series, pages 245–267, 1996b. J. Pitman. Poisson-Kingman partitions. Lecture Notes-Monograph Series, pages 1–34, 2003. J. Sethuraman. A constructive definition of Dirichlet priors. Statistica Sinica, 4:639–650, 1994. Y. W. Teh and D. Görür. Indian buffet processes with power-law behavior. In NIPS, pages 1838–1846, 2009. Y. W. Teh, M. I. Jordan, M. J. Beal, and D. M. Blei. Hierarchical Dirichlet processes. Journal of the American Statistical Association, 101(476), 2006. Y. W. Teh, D. Görür, and Z. Ghahramani. Stick-breaking construction for the Indian buffet process. In AISTATS, pages 556–563, 2007. R. Thibaux and M. I. Jordan. Hierarchical beta processes and the Indian buffet process. In AISTATS, pages 564–571, 2007. R. J. Thibaux. Nonparametric Bayesian Models for Machine Learning. PhD thesis, UC Berkeley, 2008. M. K. Titsias. The infinite gamma-Poisson feature model. In NIPS, pages 1513–1520, 2008. S. G. Walker. Sampling the Dirichlet mixture model with slices. Communications in Statistics—Simulation and Computation, 36(1):45–54, 2007. C. Wang and D. M. Blei. Variational inference in nonconjugate models. The Journal of Machine Learning Research, 14(1):1005–1031, 2013. M. West and M. D. Escobar. Hierarchical priors and mixture models, with application in regression and density estimation. In P. R. Freeman and A. F. M. Smith, editors, Aspects of Uncertainty: A Tribute to D. V. Lindley. Institute of Statistics and Decision Sciences, Duke University, 1994. M. Zhou, L. Hannah, D. Dunson, and L. Carin. Beta-negative binomial process and Poisson factor analysis. AISTATS, 2012. 42
10math.ST
AVA: A Video Dataset of Spatio-temporally Localized Atomic Visual Actions Chunhui Gu∗ Yeqing Li∗ Chen Sun∗ David A. Ross∗ Sudheendra Vijayanarasimhan∗ arXiv:1705.08421v3 [cs.CV] 29 Nov 2017 Rahul Sukthankar∗ Carl Vondrick∗ George Toderici∗ Cordelia Schmid† ∗ Caroline Pantofaru∗ Susanna Ricco∗ Jitendra Malik‡ ∗ Abstract This paper introduces a video dataset of spatiotemporally localized Atomic Visual Actions (AVA). The AVA dataset densely annotates 80 atomic visual actions in 192 15-minute video clips, where actions are localized in space and time, resulting in 740k action labels with multiple labels per person occurring frequently. The key characteristics of our dataset are: (1) the definition of atomic visual actions, rather than composite actions; (2) precise spatio-temporal annotations with possibly multiple annotations for each person; (3) exhaustive annotation of these atomic actions over 15-minute video clips; (4) people temporally linked across consecutive segments; and (5) using movies to gather a varied set of action representations. This departs from existing datasets for spatio-temporal action recognition, which typically provide sparse annotations for composite actions in short video clips. We will release the dataset publicly. AVA, with its realistic scene and action complexity, exposes the intrinsic difficulty of action recognition. To benchmark this, we present a novel approach for action localization that builds upon the current state-of-the-art methods, and demonstrates better performance on JHMDB and UCF101-24 categories. While setting a new state of the art on existing datasets, the overall results on AVA are low at 16.2% mAP, underscoring the need for developing new approaches for video understanding. Figure 1. The bounding box and action annotations in sample frames of the AVA dataset. Each bounding box is associated with 1 pose action (in orange), 0–3 interactions with objects (in red), and 0–3 interactions with other people (in blue). Note that some of these actions require temporal context to accurately label. the actor’s pose (orange text) — standing, sitting, walking, swimming etc. — and there may be additional actions corresponding to interactions with objects (red text) or interactions with other persons (blue text). Each person in a frame containing multiple actors is labeled separately. To label the actions performed by a person, a key choice is the annotation vocabulary, which in turn is determined by the “temporal grain” at which actions are classified. We use short segments (±1.5 seconds centered on a keyframe) to provide temporal context for labeling the actions in the middle frame. This enables the annotator to use movement cues for disambiguating actions such as pick up or put down that cannot be resolved in a static frame. We keep the temporal context relatively brief because we are interested in (temporally) fine-scale annotation of physical actions, which motivates “Atomic Visual Actions” (AVA). The vocabulary consists of 80 different atomic visual actions. Our dataset is sourced from the 15th to 30th minute time intervals of 192 different movies, which given the 1 Hz sampling frequency gives us 900 keyframes for each movie. In each keyframe, every person is labeled with (possibly multiple) 1. Introduction We introduce a new annotated video dataset, AVA, to advance action recognition research (see Fig. 1). The annotation is person-centric at a sampling frequency of 1 Hz. Every person is localized using a bounding box and the attached labels correspond to (possibly multiple) actions being performed by the actor: one action corresponding to ∗ Google Inc., USA Laboratoire Jean Kuntzmann, Grenoble, France ‡ University of California at Berkeley, USA † Inria, 1 Figure 2. This figure illustrates the hierarchical nature of an activity. From Barker and Wright [3], pg. 247. actions from the AVA vocabulary. Each person is linked to the consecutive keyframes to provide short temporal sequences of action labels (Section 4.3). We now motivate the main design choices of AVA. Atomic action categories. Barker & Wright [3] noted the hierarchical nature of activity (Fig. 2) in their classic study of the ”behavior episodes” in the daily lives of the residents of a small town in Kansas. At the finest level, the actions consist of atomic body movements or object manipulation but at coarser levels, the most natural descriptions are in terms of intentionality and goal-directed behavior. This hierarchy makes defining a vocabulary of action labels ill posed, contributing to the slower progress of our field compared to object recognition; exhaustively listing high-level behavioral episodes is impractical. However if we limit ourselves to fine time scales, then the actions are very physical in nature and have clear visual signatures. Here, we annotate keyframes at 1 Hz as this is sufficiently dense to capture the complete semantic content of actions while enabling us to avoid requiring unrealistically precise temporal annotation of action boundaries. The THUMOS challenge [18] observed that action boundaries (unlike objects) are inherently fuzzy, leading to significant inter-annotator disagreement. By contrast, annotators can easily determine (using ±1.5s of context) whether a frame contains a given action. Effectively, AVA localizes action start and end points to an acceptable precision of ±0.5 s. Person-centric action time series. While events such as trees falling do not involve people, our focus is on the activities of people, treated as single agents. There could be multiple people as in sports or two people hugging, but each one is an agent with individual choices, so we treat each separately. The action labels assigned to a person over time is a rich source of data for temporal modeling (Section 4.3). Annotation of movies. Ideally we would want behavior “in the wild”. We do not have that, but movies are a compelling approximation, particularly when we consider the diversity of genres and countries with flourishing film industries. We do expect some bias in this process. Stories have to be interesting and there is a grammar of the film language [2] that communicates through the juxtaposition of shots. That said, in each shot we can expect an unfolding sequence of human actions, somewhat representative of reality, as conveyed by competent actors. AVA complements the current datasets sourced from user generated video because we expect movies to contain a greater range of activities as befits the telling of diverse stories. Exhaustive action labeling. We label all the actions of all the people in all the keyframes. This will naturally result in a Zipf’s law type of imbalance across action categories. There will be many more examples of typical actions (standing or sitting) than memorable ones (dancing), but this is how it should be! Recognition models need to operate on realistic “long tailed” action distributions [15] rather than being scaffolded using artificially balanced datasets. Another consequence of our protocol is that since we do not retrieve examples of action categories by explicit querying of internet video resources, we avoid a certain kind of bias: opening a door is a common event that occurs frequently in movie clips; however a door opening action that has been tagged as such on YouTube is likely attention worthy in a way that makes it atypical. We believe that AVA, with its realistic complexity, exposes the inherent difficulty of action recognition hidden by many popular datasets in the field. A video clip of a single person performing a visually salient action like swimming in typical background is easy to discriminate from, say, one of a person running. Compare with AVA where we encounter multiple actors, small in image size, performing actions which are only subtly different such as touching vs. holding an object. To verify this intuition, we do comparative bench-marking on JHMDB [20], UCF101-24 categories [31] and AVA. The approach we use for spatiotemporal action localization (see Section 5) builds upon multi-frame approaches [16, 40], but classifies tubelets with I3D convolutions [6]. We obtain state-of-the-art performance on JHMDB [20] and UCF101-24 categories [31] (see Section 6) while the mAP on AVA is only 16.2%. We have released a preliminary version of AVA (v1.0, with annotation rate of 1/3 Hz and no person links) at https://research.google.com/ava/. The full version (v2.0), as described in this paper, will be made available online soon. 2. Related work Action recognition datasets. Most popular action classification datasets, such as KTH [34], Weizmann [4], Hollywood-2 [26], HMDB [24], UCF101 [38] consist of short clips, manually trimmed to capture a single action. These datasets are ideally suited for training fullysupervised, whole-clip, forced-choice video classifiers. Recently, datasets, such as TrecVid MED [28], Sports1M [21], YouTube-8M [1], Something-something [12] and Kinetics [22] have focused on large-scale video classification, often with automatically generated – and hence poten- tially noisy – annotations. They serve a valuable purpose but address a different need than AVA. Some recent work has moved towards temporal localization. ActivityNet [5], THUMOS [18], MultiTHUMOS [45] and Charades [36] use large numbers of untrimmed videos, each containing multiple actions, obtained either from YouTube (ActivityNet, THUMOS, MultiTHUMOS) or from crowdsourced actors (Charades). The datasets provide temporal (but not spatial) localization for each action of interest. AVA differs from them, as we provide spatiotemporal annotations for each subject performing an action and annotations are dense over 15-minute clips. A few datasets, such as CMU [23], MSR Actions [46], UCF Sports [31] and JHMDB [20] provide spatio-temporal annotations in each frame for short videos. The main differences with our AVA dataset are: the small number of actions; the small number of video clips; and the fact that clips are very short. Furthermore, actions are composite (e.g., pole-vaulting) and not atomic as in AVA. Recent extensions, such as UCF101 [38], DALY [43] and Hollywood2Tubes [27] evaluate spatio-temporal localization in untrimmed videos, which makes the task significantly harder and results in a performance drop. However, the action vocabulary is still restricted to a limited number of composite actions. Moreover, they do not densely cover the actions; a good example is BasketballDunk in UCF101, where only the dunking player is annotated. However, realworld applications often require a continuous annotations of atomic actions of all humans, which can then be composed into higher-level events. This motivates AVA’s exhaustive labeling over 15-minute clips. AVA is also related to still image action recognition datasets [7, 9, 13] that are limited in two ways. First, the lack of motion can make action disambiguation difficult. Second, modeling composite events as a sequence of atomic actions is not possible in still images. This is arguably out of scope here, but clearly required in many real-world applications, for which AVA does provide training data. Methods for spatio-temporal action localization. Most recent approaches [11, 29, 33, 42] rely on object detectors trained to discriminate action classes at the frame level with a two-stream variant, processing RGB and flow data separately. The resulting per-frame detections are then linked using dynamic programming [11, 37] or tracking [42]. All these approaches rely on integrating frame-level detections. Very recently, multi-frame approaches have emerged: Tubelets [40] jointly estimate localization and classification over several frames, T-CNN [16] use 3D convolutions to estimate short tubes, micro-tubes rely on two successive frames [32] and pose-guided 3D convolutions add pose to a two-stream approach [47]. We build upon the idea of spatio-temporal tubes, but employ state-of-the-art I3D convolution [6] and Faster R-CNN [30] region proposals to out- Figure 3. User interface for action annotation. Details in Sec 3.5. perform the state of the art. 3. Data collection Annotation of the AVA dataset consists of five stages: action vocabulary generation, movie and segment selection, person bounding box annotation, person linking and action annotation. 3.1. Action vocabulary generation We follow three principles to generate our action vocabulary. The first one is generality. We collect generic actions in daily-life scenes, as opposed to specific activities in specific environments (e.g., playing basketball on a basketball court). The second one is atomicity. Our action classes have clear visual signatures, and are typically independent of interacted objects (e.g., hold without specifying what object to hold). This keeps our list short yet complete. The last one is exhaustivity. We initialized our list using knowledge from previous datasets, and iterated the list in several rounds until it covered ∼99% of actions in the AVA dataset labeled by annotators. We end up with 14 pose classes, 49 personobject interaction classes and 17 person-person interaction classes in the vocabulary. 3.2. Movie and segment selection The raw video content of the AVA dataset comes from YouTube. We begin by assembling a list of top actors of many different nationalities. For each name we issue a YouTube search query, retrieving up to 2000 results. We only include videos with the “film” or “television” topic annotation, a duration of over 30 minutes, at least 1 year since upload, and at least 1000 views. We further exclude black & white, low resolution, animated, cartoon, and gaming videos, as well as those containing mature content. To create a representative dataset within constraints, our selection criteria avoids filtering by action keywords, using automated action classifiers, or forcing a uniform label distribution. We aim to create an international collection of films by sampling from large film industries. However, the depiction of action in film is biased, e.g. by gender [10], and does not reflect the “true” distribution of human activity. clink glass → drink open → close turn → open look at phone → answer phone grab (a person) → hug fall down → lie/sleep Figure 4. We show examples of how atomic actions change over time in AVA. The text shows pairs of atomic actions for the people in red bounding boxes. Temporal information is key for recognizing many of the actions and appearance can substantially vary within an action category, such as opening a door or bottle. Each movie contributes equally to the dataset, as we only label a sub-part ranging from the 15th to the 30th minute. We skip the beginning of the movie to avoid annotating titles or trailers. We choose a duration of 15 minutes so we are able to include more movies under a fixed annotation budget, and thus increase the diversity of our dataset. Each 15-min clip is then partitioned into 900 overlapping 3s movie segments with a stride of 1 second. 3.3. Person bounding box annotation We localize a person and his or her actions with a bounding box. When multiple subjects are present in a keyframe, each subject is shown to the annotator separately for action annotation, and thus their action labels can be different. Since bounding box annotation is manually intensive, we choose a hybrid approach. First, we generate an initial set of bounding boxes using the Faster-RCNN person detector [30]. We set the operating point to ensure highprecision. Annotators then annotate the remaining bounding boxes missed by our detector. This hybrid approach ensures full bounding box recall which is essential for benchmarking, while minimizing the cost of manual annotation. This manual annotation retrieves only 5% more bounding boxes missed by our person detector, validating our design choice. Any incorrect bounding boxes are marked and removed by annotators in the next stage of action annotation. 3.4. Person link annotation We link the bounding boxes over short periods of time to obtain ground-truth person tracklets. We calculate the pairwise similarity between bounding boxes in adjacent key frames using a person embedding [44] and solve for the optimal matching with the Hungarian algorithm [25]. While automatic matching is generally strong, we further remove false positives with human annotators who verify each match. This procedure results in 81,000 tracklets ranging from a few seconds to a few minutes. 3.5. Action annotation The action labels are generated by crowd-sourced annotators using the interface shown in Figure 3. The left panel shows both the middle frame of the target segment (top) and the segment as a looping embedded video (bottom). The bounding box overlaid on the middle frame specifies the person whose action needs to be labeled. On the right are text boxes for entering up to 7 action labels, including 1 pose action (required), 3 person-object interactions (optional), and 3 person-person interactions (optional). If none of the listed actions is descriptive, annotators can flag a check box called “other action”. In addition, they could flag segments containing blocked or inappropriate content, or incorrect bounding boxes. In practice, we observe that it is inevitable for annotators to miss correct actions when they are instructed to find all correct ones from a large vocabulary of 80 classes. Inspired by [35], we split the action annotation pipeline into two stages: action proposal and verification. We first ask multiple annotators to propose action candidates for each question, so the joint set possesses a higher recall than individual proposals. Annotators then verify these proposed candidates in the second stage. Results show significant recall improvement using this two-stage approach, especially on actions with fewer examples. See detailed analysis in the supplemental material. On average, annotators take 22 seconds to annotate a given video segment at the propose stage, and 19.7 seconds at the verify stage. Each video clip is annotated by three independent annotators and we only regard an action label as ground truth if it is verified by at least two annotators. Annotators are shown segments in randomized order. 3.6. Training and test sets Our training/test sets are split at the video level, so that all segments of one video appear only in one split. The 192 videos are split into 154 training and 38 test videos, resulting in 138k training segments and 34k test segments, roughly a 80:20 split. Figure 5. Sizes of each action class in the AVA dataset sorted by descending order, with colors indicating action types. A full list of counts are in supplemental material. 4. Characteristics of the AVA dataset We first build intuition on the diversity and difficulty of our AVA dataset through visual examples. Then, we characterize the annotations of our dataset quantitatively. Finally, we explore action and temporal structure. 4.1. Diversity and difficulty Figure 4 shows examples of atomic actions as they change over consecutive segments. Besides variations in bounding box size and cinematography, many of the categories will require discriminating fine-grained differences, such as “clinking glass” versus “drinking” or leveraging temporal context, such as “opening” versus “closing”. Figure 4 also shows two examples for the action “open”. Even within an action class the appearance varies with vastly different contexts: the object being opened may even change. The wide intra-class variety will allow us to learn features that identify the critical spatio-temporal parts of an action — such as the breaking of a seal for “opening”. Additional examples are in the supplemental material. 4.2. Annotation Statistics Figure 5 shows the distribution of action annotations in AVA. The distribution roughly follows Zipf’s law. Figure 6 illustrates bounding box size distribution. A large portion of people take up the full height of the frame. However, there are still many boxes with smaller sizes. The variability can be explained by both zoom level as well as pose. For example, boxes with the label “enter” show the typical pedestrian aspect ratio of 1:2 with average widths of 30% of the image width, and an average heights of 72%. On the other hand, boxes labeled “lie/sleep” are close to square, with average widths of 58% and heights of 67%. The box widths are widely distributed, showing the variety of poses people undertake to execute the labeled actions. There are multiple labels for the majority of person bounding boxes. All bounding boxes have one pose label, 28% of bounding boxes have at least 1 person-object interaction label, and 67% of them have at least 1 person-person Figure 6. Size and aspect ratio variations of annotated bounding boxes in the AVA dataset. Note that our bounding boxes consist of a large variation of sizes, many of which are small and hard to detect. Large variation also applies to the aspect ratios of bounding boxes, with mode at 2:1 ratio (e.g., sitting pose). interaction label. 4.3. Temporal Structure A key characteristic of AVA is the rich temporal structure that evolves from segment to segment. Since we have linked people between segments, we can discover common consecutive actions by looking at pairs of actions performed by the same person. We sort pairs by Normalized Pointwise Mutual Information (NPMI) [8], which is commonly used in linguistics to represent between two   the co-occurrence p(x,y) words: NPMI(x, y) = ln p(x)p(y) / (− ln p(x, y)). Values intuitively fall in the range (−1, 1], with −1 for pairs of words that never co-occur, 0 for independent pairs, and 1 for pairs that always co-occur. Table 1 shows pairs of actions with top NPMI in consecutive one-second segments for the same person. After removing identity transitions, some interesting common sense temporal patterns arise. Frequently, there are transitions from “click glass” → “drink”, “fall down” → “crawl”, or “answer phone” → “put down”. We also analyze interperson action pairs. Table 2 shows top pairs of actions performed at the same time, but by different people. Several meaningful pairs emerge, such as “take” ↔ “give”, “play music” ↔ “hand clap”, or “ride” ↔ “drive”. The transitions between atomic actions, despite the relatively coarse temporal sampling, provide excellent data for building more complex models of actions and activities with longer tem- First Action Second Action NPMI paint hit (object) 0.54 open (window/car door) close (door/box) 0.48 drink 0.44 clink glass fall down crawl 0.41 text/look at cellphone answer phone 0.40 answer phone text on/look cellphone 0.40 row boat 0.34 ride (eg bike/car/horse) ride (eg bike/car/horse) sail boat 0.34 put down 0.34 answer phone turn (eg screwdriver) open (window/door) 0.33 Table 1. We show top pairs of consecutive actions that are likely to happen before/after for the same person. We sort by NPMI. Person 1 Action take from (person) play musical instrument ride (eg bike/car/horse) talk to (self/person) stand sing to (self/person/group) play musical instrument lie/sleep hug (person) hand clap Table 2. We show top pairs of people. We sort by NPMI. poral structure. work. The output feature map at Mixed 4e has a stride of 16, which is equivalent to the conv4 block of ResNet [14]. Second, for action proposal generation, we use a 2D ResNet-50 model on the keyframe as the input for the region proposal network, avoiding the impact of I3D with different input lengths on the quality of generated action proposals. Finally, we extend ROI Pooling to 3D by applying the 2D ROI Pooling at the same spatial location over all time steps. To understand the impact of optical flow for action detection, we fuse the RGB stream and the optical flow stream at the feature map level using average pooling. Baseline. To compare to a frame-based two-stream approach on AVA, we have implemented a variant of [29]. We use Faster RCNN [30] with ResNet-50 [14] to jointly learn action proposals and action labels. Region proposals are obtained with the RGB stream only. The region classifier takes as input RGB along with optical flow features stacked over 5 consecutive frames. As for our I3D approach, we jointly train the RGB and the optical flow streams by fusing the conv4 feature maps with average pooling. Implementation details. We implemented FlowNet v2 [19] to extract optical flow features. We train FasterRCNN with asynchronous SGD. For all training tasks, we use a validation set to determine the number of training steps, which ranges from 600K to 1M iterations. We fix the input resolution to be 320 by 400 pixels. All the other model parameters are set based on the recommended values from [17], which were tuned for object detection. 5. Action Localization Model Performance numbers on popular action recognition datasets such as UCF101 or JHMDB have gone up considerably in recent years, but we believe that this may present an artificially rosy picture of the state of the art. When the video clip involves only a single person performing something visually characteristic like swimming in an equally characteristic background scene, it is easy to classify accurately. Difficulties come in when actors are multiple, or small in image size, or performing actions which are only subtly different, and when the background scenes are not enough to tell us what is going on. AVA has these aspects galore, and we will find that performance at AVA is much poorer as a result. Indeed this finding was foreshadowed by the poor performance at the Charades dataset [36]. To prove our point, we develop a state of the art action localization approach, which is inspired by recent approaches for spatio-temporal action localization that operate on multi-frame temporal information [16, 40]. Here, we rely on the impact of larger temporal context based on I3D [6] for action detection. See Fig. 7 for an overview of our approach. Following Peng and Schmid [29], we apply the Faster RCNN algorithm [30] for end-to-end localization and classification of actions. However, in their approach, the temporal information is lost at the first layer where input channels from multiple frames are concatenated over time. We propose to use the Inception 3D (I3D) architecture by Carreira and Zisserman [6] to model temporal context. The I3D architecture is designed based on the Inception architecture [39], but replaces 2D convolutions with 3D convolutions. Temporal information is kept throughout the network. I3D achieves state-of-the-art performance on a wide range of video classification benchmarks. To use I3D with Faster RCNN, we make the following changes to the model: first, we feed input frames of length T to the I3D model, and extract 3D feature maps of size T 0 × W 0 × H 0 × C at the Mixed 4e layer of the net- TxHxWx3 RGB frames Person 2 Action give/serve to (person) listen (music) drive (car/truck) listen to (person) sit listen (music) hand clap crouch/kneel grab (person) dance simultaneous actions by ROI Pooling RGB I3D Region Proposal Network RGB ResNet-50 conv4 TxHxWx2 Flow frames Flow I3D ROI Pooling Mixed 4e H’ x W’ x C T’ x H’ x W’ x C Mixed 4e Key frame Avg Pooling NPMI 0.46 0.43 0.40 0.37 0.27 0.24 0.23 0.21 0.20 0.19 different + Classification Box Refinement Avg Pooling T’ x H’ x W’ x C H’ x W’ x C Figure 7. Illustration of our approach for spatio-temporal action localization. Region proposals are detected and regressed with Faster-RCNN on RGB keyframes. Spatio-temporal tubes are classified with two-stream I3D convolutions. The ResNet-50 networks are initialized with ImageNet pretrained models. For the optical flow stream, we duplicate the conv1 filters to input 5 frames. The I3D networks are initialized with Kinetics [22] pre-trained models, for both the RGB and optical flow streams. Note that although I3D were pre-trained on 64-frame inputs, the network is fully convolutional over time and can take any number of frames as input. All feature layers are jointly updated during training. The output frame-level detections are post-processed with non-maximum suppression with threshold 0.6. One key difference between AVA and existing action detection datasets is that the action labels of AVA are not mutually exclusive. To address this, we replace the standard softmax loss function by a sum of binary Sigmoid losses, one for each class. We use Sigmoid loss for AVA and softmax loss for all other datasets. Linking. Once we have per frame-level detections, we link them to construct action tubes. We report video-level performance based on average scores over the obtained tubes. We use the same linking algorithm as described in [37], except that we do not apply temporal labeling. We choose this approach because it is robust to missing detections. It is also used to determine temporal detections, as the initialization and termination steps result in tubes with different temporal extents. Since AVA is annotated at 1 Hz and each tube may have multiple labels, we modify the videolevel evaluation protocol to estimate an upper bound. We use ground truth links to infer detection links, and when computing IoU score of a class between a ground truth tube and a detection tube, we only take tube segments that are labeled by that class into account. 6. Experiments and Analysis We now experimentally analyze key characteristics of AVA and motivate challenges for action understanding. 6.1. Datasets and Metrics AVA benchmark. Since the label distribution in AVA roughly follows Zipf’s law (Figure 5) and evaluation on a very small number of examples could be unreliable, we use classes that have at least 25 test instances to benchmark performance. Our resulting benchmark consists of 63 action classes. We randomly select 10% of the training data as validation set and use them to set the model parameters. Our benchmark consists of a total of 122,800 training, 13,696 validation and 33,226 test examples. Datasets. Besides AVA, we also analyze standard video datasets in order to compare difficulty. JHMDB [20] consists of 928 trimmed clips over 21 classes. We report results for split one in our ablation study, but results are averaged over three splits for comparison to the state of the art. For UCF101, we use spatio-temporal annotations for a 24-class Frame-mAP Actionness [41] Peng w/o MR [29] Peng w/ MR [29] ACT [40] Our approach JHMDB 39.9% 56.9% 58.5% 65.7% 73.3% UCF101-24 64.8% 65.7% 69.5% 76.3% Video-mAP Peng w/ MR [29] Singh et al. [37] ACT [40] TCNN [16] Our approach JHMDB 73.1% 72.0% 73.7% 76.9% 78.6% UCF101-24 35.9% 46.3% 51.4% 59.9% Table 3. Frame-mAP (top) and video-mAP (bottom) @ IoU 0.5 for JHMDB and UCF101-24. For JHMDB, we report averaged performance over three splits. Our approach outperforms previous state-of-the-art on both metrics by a considerable margin. subset with 3207 videos, provided by Singh et al. [37]. We conduct experiments on the official split1 as is standard. Metrics. For evaluation, we follow standard practice when possible. We report intersection-over-union (IoU) performance on frame level and video level. For frame-level IoU, we follow the standard protocol used by the PASCAL VOC challenge [9] and report the average precision (AP) using an IoU threshold of 0.5. For each class, we compute the average precision and report the average over all classes. For video-level IoU, we compute 3D IoUs between ground truth tubes and linked detection tubes at the threshold of 0.5. The mean AP is computed by averaging over all classes. 6.2. Comparison to the state-of-the-art Table 3 shows our model performance on two standard video datasets. Our 3D two-stream model obtains stateof-the-art performance on UCF101 and JHMDB, outperforming well-established baselines for both frame-mAP and video-mAP metrics. However, the picture is less auspicious when recognizing atomic actions. Table 4 shows that the same model obtains relatively low performance on AVA (frame-mAP of 16.2%, video-mAP of 10.3% at 0.5 IoU and 16.0% at 0.2 IoU). We attribute this to the design principles behind AVA: we collected a vocabulary where context and object cues are not as discriminative for action recognition. Instead, recognizing fine-grained details and rich temporal models may be needed to succeed at AVA, posing a new challenge for visual action recognition. In the remainder of this paper, we analyze what makes AVA challenging and discuss how to move forward. 6.3. Ablation study How important is temporal information for recognizing AVA categories? Table 4 shows the impact of the temporal length and the type of model. All 3D models outperform the Figure 8. Top: We plot the performance of models for each action category, sorting by the number of training examples. Bottom: We plot the number of training examples per category. While more data is better, the outliers suggest that not all categories are of equal complexity. For example, one of the smallest categories “swim” has one of the highest performances because the associated scenes make it relatively easy. Instead, the challenging categories are ones with large diversity, such as “touch,” where context is not as discriminative. Model 2D 3D 3D 3D 3D 3D 3D 3D Temp.+ Mode 1 RGB + 5 Flow 5 RGB + 5 Flow 10 RGB + 10 Flow 20 RGB + 20 Flow 40 RGB + 40 Flow 50 RGB + 50 Flow 20 RGB 20 Flow JHMDB 52.1% 67.9% 73.4% 76.4% 76.7% 73.2% 67.0% UCF101-24 60.1% 76.1% 78.0% 78.3% 76.0% 73.2% 77.0% 71.3% AVA 12.8% 13.4% 13.9% 14.9% 16.2% 15.8% 14.1% 10.9% Table 4. Frame-mAP @ IoU 0.5 for action detection on JHMDB (split1), UCF101 (split1) and AVA. Note that JHMDB has up to 40 frames per clip. For UCF101-24, we randomly sample 20,000 frame subset for evaluation. Although our model obtains state-ofthe-art performance on JHMDB and UCF101-24, the fine-grained nature of AVA makes it a challenge. 2D baseline. We can also see that increasing the length of the temporal window helps for the 3D two-stream models across all datasets. As expected, combining RGB and optical flow features improves the performance over a single input modality. Moreover, AVA benefits more from larger temporal context than JHMDB and UCF101, whose performances saturate at 20 frames. This gain and the consecutive actions in Table 1 suggests that one may obtain further gains by leveraging the rich temporal context in AVA. How challenging is localization versus recognition? Table 5 compares the performance of end-to-end action localization and recognition versus class agnostic action localization. We can see that although action localization is more challenging on AVA than on JHMDB, the gap between localization and end-to-end detection performance is nearly 60% on AVA, while less than 15% on JHMDB and UCF101. This suggests that the main difficulty of AVA lies in action classification rather than localization. Figure 9 shows examples of high-scoring false alarms, suggesting that the difficulty in recognition lies in the fine-grained details. Which categories are challenging? How important is number of training examples? Figure 8 breaks down performance by categories and the number of training ex- Action detection Actor detection JHMDB 76.7% 92.8% UCF101-24 78.3% 84.8% AVA 16.2% 75.8% Table 5. Frame-mAP @ IoU 0.5 for action detection and actor detection performance on JHMDB (split1), UCF101-24 (split1) and AVA benchmarks. Since human annotators are consistent, our results suggest there is significant headroom to improve on recongizing atomic visual actions. Figure 9. Red boxes show high-scoring false alarms for smoking. The model often struggles to discriminate fine-grained details. amples. While more data generally yields better performance, the outliers reveals that not all categories are of equal complexity. Categories correlated with scenes and objects (such as swimming) or categories with low diversity (such as jumping) obtain high performance despite having fewer training examples. In contrast, categories with lots of data, such as touching, obtain low performance possibly because they have large visual variations and require fine grained discrimination, motivating work on person-object interaction [7, 12]. We hypothesize that the gains on recognizing atomic actions will need not only large datasets, such as AVA, but also rich models of motion and interactions. 7. Conclusion This paper introduces the AVA dataset with spatiotemporal annotations of atomic actions at 1 Hz over diverse 15-min. movie segments. In addition we propose a method that outperforms the current state of the art on standard benchmarks to serve as a baseline. This method highlights the difficulty of the AVA dataset as its performance is significantly lower than on UCF101 or JHMDB, underscoring the need for developing new action recognition approaches. Future work includes modeling more complex activities based on our atomic actions. Our present day visual classification technology may enable us to classify events such as “eating in a restaurant” at the coarse scene/video level, but models based on AVA’s fine spatio-temporal granularity facilitate understanding at the level of an individual agents actions. These are essential steps towards imbuing computers with “social visual intelligence” – understanding what humans are doing, what they might do next, and what they are trying to achieve. 8. Acknowledgement We thank Ahbinav Gupta, Ahbinav Shrivastava, Andrew Gallagher, Irfan Essa, and Vicky Kalogeiton for discussion and comments about this work. References [1] S. Abu-El-Haija, N. Kothari, J. Lee, P. Natsev, G. Toderici, B. Varadarajan, and S. Vijayanarasimhan. YouTube8M: A large-scale video classification benchmark. arXiv:1609.08675, 2016. 2 [2] D. Arijon. Grammar of the film language. Silman-James Press, 1991. 2 [3] R. Barker and H. Wright. Midwest and its children: The psychological ecology of an American town. Row, Peterson and Company, 1954. 2 [4] M. Blank, L. Gorelick, E. Shechtman, M. Irani, and R. Basri. Actions as space-time shapes. In ICCV, 2005. 2 [5] F. Caba Heilbron, V. Escorcia, B. Ghanem, and J. C. Niebles. ActivityNet: A large-scale video benchmark for human activity understanding. In CVPR, 2015. 3 [6] J. Carreira and A. Zisserman. Quo vadis, action recognition? A new model and the Kinetics dataset. In CVPR, 2017. 2, 3, 6 [7] Y.-W. Chao, Z. Wang, Y. He, J. Wang, and J. Deng. HICO: A benchmark for recognizing human-object interactions in images. In ICCV, 2015. 3, 8 [8] K.-W. Church and P. Hanks. Word association norms, mutual information, and lexicoraphy. Computational Linguistics, 16(1), 1990. 5 [9] M. Everingham, S. M. A. Eslami, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge: A retrospective. IJCV, 2015. 3, 7 [10] Geena Davis Institute on Gender in Media. The Reel Truth: Women Aren’t Seen or Heard. https://seejane. org/research-informs-empowers/data/, 2016. 3 [11] G. Gkioxari and J. Malik. Finding action tubes. In CVPR, 2015. 3 [12] R. Goyal, S. E. Kahou, V. Michalski, J. Materzynska, S. Westphal, H. Kim, V. Haenel, I. Fründ, P. Yianilos, M. Mueller-Freitag, F. Hoppe, C. Thurau, I. Bax, and R. Memisevic. The ”something something” video database for learning and evaluating visual common sense. In ICCV, 2017. 2, 8 [13] S. Gupta and J. Malik. Visual semantic role labeling. CoRR, abs/1505.04474, 2015. 3 [14] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In CVPR, 2016. 6 [15] G. V. Horn and P. Perona. The devil is in the tails: Finegrained classification in the wild. arXiv:1709.01450, 2017. 2 [16] R. Hou, C. Chen, and M. Shah. Tube convolutional neural network (t-cnn) for action detection in videos. In ICCV, 2017. 2, 3, 6, 7 [17] J. Huang, V. Rathod, C. Sun, M. Zhu, A. Korattikara, A. Fathi, I. Fischer, Z. Wojna, Y. Song, S. Guadarrama, and K. Murphy. Speed/accuracy trade-offs for modern convolutional object detectors. In CVPR, 2017. 6 [18] H. Idrees, A. R. Zamir, Y. Jiang, A. Gorban, I. Laptev, R. Sukthankar, and M. Shah. The THUMOS challenge on action recognition for videos “in the wild”. CVIU, 2017. 2, 3 [19] E. Ilg, N. Mayer, T. Saikia, M. Keuper, A. Dosovitskiy, and T. Brox. FlowNet 2.0: Evolution of optical flow estimation with deep networks. In CVPR, 2017. 6 [20] H. Jhuang, J. Gall, S. Zuffi, C. Schmid, and M. Black. Towards understanding action recognition. In ICCV, 2013. 2, 3, 7 [21] A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In CVPR, 2014. 2 [22] W. Kay, J. Carreira, K. Simonyan, B. Zhang, C. Hillier, S. Vijayanarasimhan, F. Viola, T. Green, T. Back, P. Natsev, M. Suleyman, and A. Zisserman. The Kinetics human action video dataset. arXiv:1705.06950, 2017. 2, 7 [23] Y. Ke, R. Sukthankar, and M. Hebert. Efficient visual event detection using volumetric features. In ICCV, 2005. 3 [24] H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. HMDB: A large video database for human motion recognition. In ICCV, 2011. 2 [25] H. W. Kuhn. The Hungarian method for the assignment problem. Naval Research Logistics (NRL), 2(1-2):83–97, 1955. 4 [26] M. Marszalek, I. Laptev, and C. Schmid. Actions in context. In CVPR, 2009. 2 [27] P. Mettes, J. van Gemert, and C. Snoek. Spot On: Action localization from pointly-supervised proposals. In ECCV, 2016. 3 [28] P. Over, G. Awad, M. Michel, J. Fiscus, G. Sanders, W. Kraaij, A. Smeaton, and G. Quénot. TRECVID 2014 – an overview of the goals, tasks, data, evaluation mechanisms and metrics, 2014. 2 [29] X. Peng and C. Schmid. Multi-region two-stream R-CNN for action detection. In ECCV, 2016. 3, 6, 7 [30] S. Ren, K. He, R. Girshick, and J. Sun. Faster R-CNN: Towards real-time object detection with region proposal networks. In NIPS, 2015. 3, 4, 6 [31] M. Rodriguez, J. Ahmed, and M. Shah. Action MACH: a spatio-temporal maximum average correlation height filter for action recognition. In CVPR, 2008. 2, 3 [32] S. Saha, G.Sing, and F. Cuzzolin. AMTnet: Action-microtube regression by end-to-end trainable deep architecture. In ICCV, 2017. 3 [33] S. Saha, G. Singh, M. Sapienza, P. Torr, and F. Cuzzolin. Deep learning for detecting multiple space-time action tubes in videos. In BMVC, 2016. 3 [34] C. Schuldt, I. Laptev, and B. Caputo. Recognizing human actions: a local SVM approach. In ICPR, 2004. 2 [35] G. Sigurdsson, O. Russakovsky, A. Farhadi, I. Laptev, and A. Gupta. Much ado about time: Exhaustive annotation of temporal data. In Conference on Human Computation and Crowdsourcing, 2016. 4 [36] G. Sigurdsson, G. Varol, X. Wang, A. Farhadi, I. Laptev, and A. Gupta. Hollywood in homes: Crowdsourcing data collection for activity understanding. In ECCV, 2016. 3, 6 [37] G. Singh, S. Saha, M. Sapienza, P. Torr, and F. Cuzzolin. Online real-time multiple spatiotemporal action localisation and prediction. In ICCV, 2017. 3, 7 [38] K. Soomro, A. Zamir, and M. Shah. UCF101: A dataset of 101 human actions classes from videos in the wild. Technical Report CRCV-TR-12-01, University of Central Florida, 2012. 2, 3 [39] C. Szegedy, V. Vanhoucke, S. Ioffe, J. Shlens, and Z. Wojna. Rethinking the inception architecture for computer vision. In CVPR, 2016. 6 [40] V.Kalogeiton, P. Weinzaepfel, V. Ferrari, and C. Schmid. Action tubelet detector for spatio-temporal action localization. In ICCV, 2017. 2, 3, 6, 7 [41] L. Wang, Y. Qiao, X. Tang, and L. Van Gool. Actionness estimation using hybrid fully convolutional networks. In CVPR, 2016. 7 [42] P. Weinzaepfel, Z. Harchaoui, and C. Schmid. Learning to track for spatio-temporal action localization. In ICCV, 2015. 3 [43] P. Weinzaepfel, X. Martin, and C. Schmid. Towards weaklysupervised action localization. arXiv:1605.05197, 2016. 3 [44] L. Wu, C. Shen, and A. van den Hengel. PersonNet: Person re-identification with deep convolutional neural networks. arXiv preprint arXiv:1601.07255, 2016. 4 [45] S. Yeung, O. Russakovsky, N. Jin, M. Andriluka, G. Mori, and L. Fei-Fei. Every moment counts: Dense detailed labeling of actions in complex videos. IJCV, 2017. 3 [46] J. Yuan, Z. Liu, and Y. Wu. Discriminative subvolume search for efficient action detection. In CVPR, 2009. 3 [47] M. Zolfaghari, G. Oliveira, N. Sedaghat, and T. Brox. Chained multi-stream networks exploiting pose, motion, and appearance for action classification and detection. In ICCV, 2017. 3 Appendix In the following, we present additional quantitative information and examples for our AVA dataset as well as for our action detection approach on AVA. 9. Additional details on the annotation Figure 10 shows the user interface for bounding box annotation. As described in Section 3.3, we employ a hybrid approach to tradeoff accuracy with annotation cost. We show annotators frames overlaid by detected person bounding boxes, so they can add boxes to include more persons missed by the detector. Figure 10. User interface for bounding box annotation. The purple box was generated by the person detector. The orange box (missed by the detector) was manually added by an annotator. In Section 3.5 of our paper submission, we explain why our two-stage action annotation design is crucial for preserving high recall of action classes. Here we show quantitative analysis. Figure 11 shows the proportion of labels per action class generated from each stage. (Blue ones are generated from the first (propose) stage and red ones from the second (verify) stage). As we can see, for more than half of our action labels, the majority labels are derived from the verification stage. Furthermore, the smaller the action class size, the more likely that they are missed by the first stage (e.g., kick, exit, extract), and require the second stage to boost recall. The second stage helps us to build more robust models for long tail classes that are more sensitive to the sizes of the training data. 10. Additional details on the dataset Table 6 and 7 present the number of instances for each class of the AVA dataset. We observe a significant class imbalance to be expected in real-world data [c.f. Zipf’s Law]. As stated in the paper, we select a subset of these classes Figure 11. Action class recall improvement due to the two-stage process. For each class, the blue bar shows the proportion of labels annotated without verification (majority voted results over raters’ selections from 80 classes.), and the red bar shows the proportion of labels revived from the verification stage. More than half of the action classes doubles their recalls thanks to the additional verification. (without asterisks) for our benchmarking experiment, in order to have a sufficient number of test examples. Note that we consider the presence of the “rare” classes as an opportunity for approaches to learn from a few training examples. Figure 12 shows more examples of common consecutive atomic actions in AVA. 11. Examples of our action detection Figure 13 and Figure 14 show the top true positives and false alarms returned by our best Faster-RCNN with I3D model. Pose stand sit walk bend/bow (at the waist) lie/sleep dance run/jog crouch/kneel martial art get up jump/leap fall down crawl* swim # 150482 91131 41004 8949 5351 4155 3404 2520 2007 1347 463 415 228 223 Person-Person Interaction # watch (a person) 120804 talk to (e.g. self/person) 99239 listen to (a person) 86080 grab (a person) 3689 fight/hit (a person) 2210 sing to (e.g., self, a person, a group) 1986 hug (a person) 1508 hand clap 1495 give/serve (an object) to (a person) 1195 kiss (a person) 834 take (an object) from (a person) 770 hand shake 584 lift (a person) 540 hand wave 537 426 push (another person) play with kids 175 kick (a person)* 92 Table 6. Number of instances for pose (left) and person-person (right) interaction labels in the AVA dataset, sorted in decreasing order. Labels marked by asterisks are not included in the benchmark dataset. Person-Object Interaction Person-Object Interaction # # carry/hold (an object) 71339 work on a computer 262 touch (an object) 6697 hit (an object) 224 ride (e.g., a bike, a car, a horse) 4657 play with pets 220 3149 215 answer phone take a photo watch (e.g., TV) 2851 point to (an object) 190 2689 183 smoke climb (e.g., a mountain)* eat turn (e.g., a screwdriver)* 178 2257 read play board game* 1916 157 1610 146 play musical instrument cut 1486 138 open (e.g., a window, a car door) press drive (e.g., a car, a truck) 1352 row boat* 132 drink shoot* 1225 129 listen (e.g., to music) 1178 exit* 120 lift/pick up 920 clink glass 102 write 892 dig* 95 847 79 close (e.g., a door, a box) fishing* put down 733 paint* 69 pull (an object) 591 stir 66 catch (an object) 586 cook* 65 push (an object) 507 shovel* 62 dress/put on clothing 498 chop 56 sail boat* 351 extract* 45 text on/look at a cellphone brush teeth* 341 41 enter 320 kick (an object)* 39 throw 318 Table 7. Number of instances for person-object interactions in the AVA dataset, sorted in decreasing order. Labels marked by asterisks are not included in the benchmark. answer (eg phone) → look at (eg phone) answer (eg phone) → put down clink glass → drink crouch/kneel → crawl grab → handshake grab → hug open → close Figure 12. We show more examples of how atomic actions change over time in AVA. The text shows pairs of atomic actions for the people in red bounding boxes. cut throw hand clap work on a computer Figure 13. Most confident action detections on AVA. True positives are in green, false alarms in red. open (e.g. window, door) get up smoke take (something) from (someone) Figure 14. Most confident action detections on AVA. True positives are in green, false alarms in red.
1cs.CV
THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES arXiv:1405.5491v2 [math.GR] 30 Mar 2016 STEFAN WITZEL AND MATTHEW C. B. ZAREMSKY Abstract. We describe a procedure for constructing a generalized Thompson group out of a family of groups that is equipped with what we call a cloning system. The previously known Thompson groups F , V , Vbr and Fbr arise from this procedure using, respectively, the systems of trivial groups, symmetric groups, braid groups and pure braid groups. We give new examples of families of groups that admit a cloning system and study how the finiteness properties of the resulting generalized Thompson group depend on those of the original groups. The main new examples here include upper triangular matrix groups, mock reflection groups, and loop braid groups. For generalized Thompson groups of upper triangular matrix groups over rings of S-integers of global function fields, we develop new methods for (dis-)proving finiteness properties, and show that the finiteness length of the generalized Thompson group is exactly the limit inferior of the finiteness lengths of the groups in the family. Introduction In 1965 Richard Thompson introduced three groups that today are usually denoted F , T , and V . These have received a lot of recent attention for their interesting and often surprising properties. Most prominently, T and V are finitely presented, infinite, simple groups, and F is torsion-free with infinite cohomological dimension and of type F∞ . Numerous generalizations of Thompson’s groups have been introduced in the literature; see for example [Hig74, Ste92, GS97, Röv99, Bri04, Hug09, MPN13, BF]. Most of these constructions either generalize the way in which branching can occur, or mimic the selfsimilarity in some way. Here we describe a more algebraic construction of Thompson-like groups, which combines the usual branching of the group F with a chosen family of groups. The construction is based on Brin’s description on the braided Thompson group Vbr [Bri07], which utilizes the family of braid groups. Another example is the pure braided Thompson group Fbr introduced by Brady, Burillo, Cleary and Stein in [BBCS08], using the pure braid groups. Classical examples include F , using the trivial group, and V , using the symmetric groups. The input to our construction is a directed system of groups (Gn )n∈N together with a cloning system, which essentially determines how a group element is moved past a split. A cloning system consists of morphisms Gn → Sn (where Sn is the symmetric group on n symbols), and cloning maps κnk : Gn → Gn+1 , 1 ≤ k ≤ n, subject to certain conditions (see Definition 2.18). The output is a group T (G∗ ): Proposition 2.24. Let (Gn )n∈N be an injective directed system of groups equipped with a cloning system. Then there is a generalized Thompson group T (G∗ ) that contains all of the Gn . There are homomorphisms F ֒→ T (G∗ ) → V whose composition is the inclusion F ֒→ V . Date: March 31, 2016. 2010 Mathematics Subject Classification. Primary 20F65; Secondary 57M07, 20G30. Key words and phrases. Thompson’s group, finiteness properties, upper triangular matrix, mock reflection group, loop braid group. 2 S. WITZEL AND M. C. B. ZAREMSKY The groups F , V , Fbr and Vbr are all examples of groups of the form T (G∗ ). One of our main motivations for constructing these new Thompson-like groups is the analysis of their finiteness properties. Recall that a group G is of type Fn if there is a K(G, 1) with finite n-skeleton. For example, F1 means finitely generated and F2 means finitely presented. We are in particular interested in understanding how the finiteness properties of T (G∗ ) depend on the finiteness properties of the groups Gn . Our main results are: Theorem 8.28. Let k be a global function field, let S be a set of places of k, and let OS be the ring of S-integers in k. Let Bn denote the algebraic group of invertible upper triangular n-by-n matrices. There is a generalized Thompson group T (B∗ (OS )) and it is of type F|S|−1 but not of type F|S| . To put this into context it is important to know that the groups Bn (OS ) are themselves of type F|S|−1 but not of type F|S| by [Bux04]. In particular, for every n ∈ N, we get an example of a generalized Thompson group of type Fn−1 but not of type Fn . Theorem 8.10. Let Ab n (Z[1/p]) be the nth Abels group (see Section 7). There is a generalized Thompson group T (Ab ∗ (Z[1/p])) and it is of type F∞ . The groups Ab n (Z[1/p]) are known to be of type Fn−1 but not of type Fn by [AB87, Bro87]. To be of type F∞ for a generalization of Thompson’s groups is a relatively common phenomenon, but what is interesting about this example is that it organizes the groups Ab n (Z[1/p]), none of which is individually of type F∞ , into a group of type F∞ . To formulate the above statements in a unified way, it is helpful to introduce the finiteness length φ(G) of a group G, which is just the supremum over all n for which G is of type Fn . Now Theorems 8.28 and 8.10 can be formulated to say that φ(T (G∗ )) = lim inf φ(Gn ) n (1) for the respective groups. This relation is not coincidental but is suggested by the structure of the groups. In fact, we give a general construction which reduces proving the inequality ≥ for (1) to showing that certain complexes Ln (G∗ ) are asymptotically highly connected. This construction is an abstraction of the well developed methods from [Bro92, Ste92, Bro06, Far03, FMWZ13, BFM+ 14] (which were all used to prove that the respective groups are of type F∞ ). For this reason, the proof of the inequality ≥ in Theorem 8.28 works without change for the groups Bn (R) where R is an arbitrary ring. This evidence leads us to ask: Question 5.1. For which generalized Thompson groups T (G∗ ) does (1) hold? The group T (G∗ ) may be thought of as a limit of the groups Gn , for example since it contains all of them. From this point of view, it is rather remarkable that (1) holds in such generality. For example compare this to an ascending direct limit of groups with good finiteness properties, which will not even be finitely generated. Another reason why (1) is interesting is that it describes how finiteness properties of groups change when they are subject to a certain operation (here Thompsonifying). A different such operation is braiding: when V is “braided,” we get Vbr , and similarly F yields Fbr . The question of the finiteness properties of Fbr and Vbr was answered in [BFM+ 14]; they are still of type F∞ , just like F and V . When reinterpreting F , V , Fbr and Vbr as Thompsonifications (of the trivial group, the symmetric groups, the pure braid groups, and the braid groups, respectively), they provide more examples where (1) holds: in all of these cases all the groups Gn are of type F∞ and so are the corresponding Thompson groups. This is in some cases related to a similar program carried out in [BdCK15] for wreath products, see Remark 3.4. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 3 In addition to the groups discussed so far, we also construct generalized Thompson groups for more families of groups. All of them are relatives of the family of symmetric groups in some way and it is very natural to put them into a generalized Thompson group. The first is a family of mock reflection groups that were studied by Davis, Januszkiewicz and Scott [DJS03]. The groups naturally arise as blowups of symmetric groups and we call them mock symmetric groups. Constructing a generalized Thompson group for the mock symmetric groups was suggested to us by Januszkiewicz. The second family consists of loop braid groups, which are a melding of symmetric groups and braid groups. Theorem 9.2, 10.2. There exist generalized Thompson groups Vmock , Vloop and Floop built from (and thus containing) all mock symmetric groups, all loop braid groups, and all pure loop braid groups. The groups Vmock and Vloop surject onto V and Floop surjects onto F . We expect that all of these groups belong to the list of groups that answer Question 5.1 positively, and thus: Conjecture 9.3, 10.3. Vmock , Vloop and Floop are of type F∞ . To investigate the finiteness properties of a generalized Thompson group T (G∗ ) we let it act on a contractible cube complex X (G∗ ) which we call the Stein–Farley complex. This space exists for arbitrary cloning systems and in many cases has been used previously. When the cloning system is properly graded (Definition 2.16), the action has certain desirable properties: the cell stabilizers are subgroups of the groups Gn and there is a natural cocompact filtration. To show that the generalized Thompson group is of type Fn , assuming that all the Gn are, (which gives one half of (1)) thus amounts to showing that the descending links Ln (G∗ ) in this filtration are eventually (n − 1)-connected. This is the only part of the proof that needs to be done for every properly graded cloning system individually and depends on the nature of the concrete example. This treats the positive case, which so far has been sufficient for most existing Thompson groups since they have been of type F∞ . For the negative finiteness properties we have to develop new methods. For example we give a condition on a group homomorphism G → H that ensures that if the morphism factors through a group K then K cannot be of type FPn , see Theorem 5.14 (type FPn is a homological, and slightly weaker, version of type Fn ). This is a similar idea to that of [KM97] and may be of independent use. Unlike the proof that T (B∗ (OS )) is of type F|S|−1 , the proof that it is not of type FP|S| borrows large parts from the proof in [Bux04] of the same fact for Bn (OS ). For example, the space for T (B∗ (OS )) is built out of the space for B2 (OS ) (which is a Bruhat–Tits tree). The paper is organized as follows. In Section 1 we recall some background on monoids and the Zappa–Szép product. In Section 2 we introduce cloning systems (Definition 2.18) and explain how they give rise to generalized Thompson groups. Section 3 collects some group theoretic consequences that follow directly from the construction. To study finiteness properties, the Stein–Farley complex is introduced in Section 4. The filtration and its descending links are described in Section 5, and we discuss some background on Morse theory and other related techniques for proving high connectivity, including a new method in Section 5.5. Up to this point everything is mostly generic. The following sections discuss examples. Section 6 gives an elementary example where Gn = H n for some group H. Section 7 discusses cloning systems for groups of upper triangular matrices. In Section 8 we study their finiteness properties. The last two sections 9 and 10 introduce the groups Vmock and Vloop and Floop . 4 S. WITZEL AND M. C. B. ZAREMSKY splits a c = = group element d b merges = = Figure 1. On the left, an element of Vbr in its standard form consisting of splitting, braiding and merging. On the right, some relations: (a) splitting and then merging is trivial; (b) merging and then splitting is trivial; (c) splits and merges on different strands commute. The main relation, (d), which is encoded by the Zappa–Szép product, is how splits and group elements interact. Acknowledgments. We are grateful to Matt Brin and Kai-Uwe Bux for helpful discussions, to Tadeusz Januszkiewicz for proposing to us the group Vmock , and to Werner Thumann and an anonymous referee for many helpful comments. Both authors were supported by the SFB 878 in Münster. The second author was also supported directly by the DFG through project WI 4079/2 and by the SFB 701 in Bielefeld. All of this support is gratefully acknowledged. 0. Motivation Starting with the first section we will spend some ten pages introducing notions and technical results from the theory of monoids. Before we dive into these preparations, we want to explain why they are precisely the ones needed to describe generalized Thompson groups. We illustrate this on the example of Vbr . We want to think of an element of a Thompson group as consisting of a tree of splittings, followed by a group element from a chosen group (a braid in the example), and finally an inverse tree of merges. An element of Vbr is illustrated in Figure 1. Two elements are multiplied by stacking them on top of each other and reducing, as in Figure 2. Among the relations available to reduce an element are the fact that splitting and then merging again is a trivial operation, as well as merging and then splitting (Figure 1(a),(b)). Another relation that is implicit in the pictures is that a group element followed by another group element is the same as the product. However, these relations are not typically sufficient to bring a diagram into the form that we want: splits, group element, merges. To move all the splits to the top (and all the merges to the bottom), we eventually will have to move a split λ past a group element g. In Figure 2 this point is reached in the third step. Expressed algebraically, we need to rewrite gλ = λ′ g′ for some group element g′ and some split λ′ (Figure 1(d)). The algebraic operation that defines how a split is moved past a group element is the Zappa–Szép product. The trees of splittings will be elements of the forest monoid F . We will then form the Zappa-Szép product F ⊲⊳ G with the chosen group G. To also obtain merges, we will pass to the group of fractions — a merge is just the inverse of a split. For technical reasons, we will have started with infinitely many strands and in a final step have to reduce to elements that start and end with one strand. With this outline in mind, we hope the reader will find the following technical pages more illuminating. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 1 2 3 4 5 5 Figure 2. Computing the product of two elements of Vbr . First, both elements are stacked onto each other. Second, pairs of merges and splits are resolved. Third, merges and splits are moved past each other. In the fourth and fifth step a merge and a split are moved past a group element (here a braid). 1. Preliminaries Much of the material in this section is taken from [Bri07]. 1.1. Monoids. A monoid is an associative binary structure with a two-sided identity. A monoid M is called left cancellative if for all x, y, z ∈ M , we have that xy = xz implies y = z. Elements x, y ∈ M have a common left multiple m if there exist z, w ∈ M such that zx = wy = m. This is the least common left multiple if for all p, q ∈ M such that px = qy, we have that px is a left multiple of m. There are the obvious definitions of right cancellative, common right multiples and least common right multiples. We say that M has common right/left multiples if any two elements have a common right/left multiple. It is said to have least common right/left multiples if any two elements that have some common right/left multiple have a least common right/left multiple. Finally, we say M is cancellative if it is both left and right cancellative. The importance of these notions lies in the following classical theorem (see [CP61, Theorems 1.23, 1.25]): Theorem 1.1 (Ore). A cancellative monoid with common right multiples has a unique group of right fractions. Recall that for every monoid M there exists a group GM and a monoid morphism ω : M → GM such that every monoid morphism from M to a group factors through ω (namely the group generated by all the elements of M subject to all the relations that hold in M ). This is the group of fractions of M . The morphism ω will be injective if and only if M embeds into a group. A group G is called a group of right fractions of M if it contains M and every element of G can be written as m · n−1 with m, n ∈ M . A group of right fractions exists precisely in the situation of Ore’s theorem and is unique up to isomorphism; see [CP61, Section 1.10] for details. We call a monoid satisfying the hypotheses of Theorem 1.1 an Ore monoid. The group of right fractions of an Ore monoid is its group of fractions (see for example [KS06, Theorem 7.1.16]): Lemma 1.2. Let M be an Ore monoid, let G be its group of right fractions and let H be any group. Let ϕ : M → H be a monoid morphism. Then the map ϕ̃ : G → H defined by ϕ̃(mn−1 ) = ϕ(m) · ϕ(n)−1 is a group homomorphism and ϕ = ϕ̃|M . Proof. That inverses map to inverses is clear. Let m1 , m2 , n1 , n2 ∈ M and let n1 ·x = m2 ·y −1 −1 −1 be a common right multiple so that m1 n−1 1 m2 n2 = m1 xy n2 . We have to check that ϕ(m1 )ϕ(n1 )−1 ϕ(m2 )ϕ(n2 )−1 = ϕ(m1 x)ϕ(n2 y)−1 . (1.1) 6 S. WITZEL AND M. C. B. ZAREMSKY The fact that ϕ is a monoid morphism means that ϕ(n1 )ϕ(x) = ϕ(m2 )ϕ(y) which entails ϕ(n1 )−1 ϕ(m2 ) = ϕ(x)ϕ(y)−1 . Extending by ϕ(m1 ) from the left and by ϕ(n2 )−1 from the right gives (1.1).  1.2. Posets from monoids. Throughout this section let M be an Ore monoid and let G be its group of right fractions. The notions of left/right multiple/factor are uninteresting for G as a monoid because it is a group. Instead we introduce these notions relative to the monoid M . Concretely, assume that elements a, b, c ∈ G satisfy ab = c. If a ∈ M then we call b a right factor of c and c a left multiple of b. If b ∈ M then we call a a left factor of c and c a right multiple of a. If g is a left factor (respectively right multiple) of both h and h′ then we say that it is a common left factor (respectively common right multiple). If g is a common left factor of h and h′ and any other left factor of h and h′ is also a left factor of g then g is called a greatest common left factor. If g is a common right multiple of h and h′ and every other right multiple is also a right multiple of g then g is called a least common right multiple of h and h′ . Thus we obtain notions of when G has (least) common right/left multiples and (greatest) common right/left factors. We say that two elements have no common right factor if they have greatest common right factor 1. Under a moderate additional assumption, having least common right multiples is inherited by G from M : Lemma 1.3. Let M have least common right multiples. Let n, n′ , m, m′ ∈ M be such that n and m have no common right factor and neither do n′ and m′ . Let nv = n′ u be a least common right multiple of n and n′ . Then nv = n′ u is a least common right multiple of nm−1 and n′ m′ −1 .  We call a monoid homomorphism len : M → N0 a length function if every element of the kernel is a unit. It induces a length function len : G → Z. Note that if M admits a length function then every element of G can be written as mn−1 where m and n are elements of M with no common right factor. The following is an extension of [Bri07, Lemma 2.3] to G. Lemma 1.4. Assume that M admits a length function. Then G has least common right multiples if and only if it has greatest common left factors.  One reason for our interest in least common right multiples and greatest common left factors is order theoretic. Define a relation on G by declaring g ≤ h if g is a left factor of h. This relation is reflexive and transitive but fails to satisfy antisymmetry if M has non-trivial units. We denote the relation induced on G/M × also by ≤. It is an order relation so G/M × becomes a partially ordered set (poset). Spelled out, the relation is given by gM × ≤ hM × if g−1 h ∈ M . The algebraic properties discussed before immediately translate into order theoretic properties: recall that a poset P is a join-semilattice if any two elements of P have a supremum (their join). We say that P has conditional meets if any two elements that have a lower bound have an infimum. Observation 1.5. If M has common right multiples, least common right multiples, and greatest common left factors then M/M × is a join-semilattice with conditional meets. Similarly, if G has common right multiples, least common right multiples and greatest common left factors then G/M × is a join-semilattice with conditional meets.  Putting everything together, we find: THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES ... 7 ... = ... Figure 3. Multiplication of forests. Corollary 1.6. Let M be a cancellative monoid with common right multiples, least common right multiples and length function. Let G be its group of right fractions. Then G/M × is a join-semilattice with conditional meets.  1.3. The monoid of forests. Since we are interested in Thompson’s groups, an important monoid in all that follows will be the monoid of forests, which we define in this section. For us, a tree is always a finite rooted full binary tree. In other words, every vertex has either no outgoing edges or a left and right outgoing edge, and every vertex other than the root has an incoming edge. The vertices without outgoing edges are called leaves. The distinction between left and right induces a natural order on the leaves. If a tree has only one leaf, then the leaf is also its root and the tree is the trivial tree. By a forest we mean a sequence of trees E = (Ti )i∈N such that all but finitely many Ti are trivial. The roots are numbered in the obvious way, i.e., the ith root of E is the root of Ti . If all the Ti are trivial we call E trivial. If the Ti are trivial for i > 1 then the forest is called semisimple (here we deviate from Brin’s notation; what we call “semisimple” is called “simple” in [Bri07], and what we will later call “simple”, Brin calls “simple and balanced”). The rank of E is the least index i such that Tj is trivial for j > i. So E is semisimple if it has rank at most 1. The leaves of all the Ti are called the leaves of E. The order on the leaves of the trees induces an order on the leaves of the forest by declaring that any leaf of Ti comes before any leaf of Tj , whenever i < j. We may equivalently think of the leaves as numbered by natural numbers. The number of feet of a semisimple forest (Ti )i∈N is the number of leaves of T1 . Let F be the set of forests. Define a multiplication on F as follows. Let E = (Tk ) and E ′ = (Tk′ ) be forests, and set EE ′ to be the forest obtained by identifying the ith leaf of E with the ith root of E ′ , for each i. This product is associative, and the trivial forest is a left and right identity, so F is a monoid. Some more details on F can be found in Section 3 of [Bri07]. Figure 3 illustrates the multiplication of two elements. There is an obvious set of generators of F , namely the set of single-caret forests. Such a forest can be characterized by the property that there exists k ∈ N such that for i < k, the ith root is also the ith leaf, and for i > k, the ith root is also the (i + 1)st leaf. Denote this forest by λk . Every tree in λk is trivial except for the kth tree, which is a single caret. Proposition 1.7 (Presentation of the forest monoid). [Bri07, Proposition 3.3] F is generated by the λk , and defining relations are given by λj λi = λi λj+1 for i < j. (1.2) Every element of F can be uniquely expressed as a word of the form λk1 λk2 · · · λkr for some k1 ≤ · · · ≤ kr . 8 S. WITZEL AND M. C. B. ZAREMSKY A consequence is that the number of carets is an invariant of a forest, and is exactly the length of the word in the λk representing the forest. The following is part of [Bri07, Lemma 3.4]. Lemma 1.8. The monoid F has the following properties. (1) It is cancellative. (2) It has common right multiples. (3) It has no non-trivial units. (4) There is a monoid homomorphism len : F → N0 sending each generator to 1. (5) It has greatest common right factors and least common left multiples. (6) It has greatest common left factors and least common right multiples. In view of Theorem 1.1, properties (1) and (2) imply that F has a unique group of right fractions, which we denote Fb. 1.4. Zappa–Szép products. In this section we recall the background on Zappa–Szép products of monoids. Our main reference is [Bri07, Section 2.4], and also see [Bri05]. When the monoids are groups, Zappa–Szép products generalize semidirect products by dropping the assumption that one of the groups be normal. The internal Zappa–Szép product is straightforward to define. Let M be a monoid with submonoids U and A such that every m ∈ M can be written in a unique way as m = uα for u ∈ U and α ∈ A. In particular, for α ∈ A and u ∈ U there exist u′ ∈ U and α′ ∈ A such that αu = u′ α′ , and the u′ and α′ are uniquely determined by α and u, so we denote them u′ = α · u and α′ = αu , following [Bri07]. The maps (α, u) 7→ α · u and (α, u) 7→ αu should be thought of as mutual actions of U and A on each other. Then we can define a multiplication on U × A via (u, α)(v, β) := (u(α · v), αv β), (1.3) for u, v ∈ U and α, β ∈ A, and the map (u, α) 7→ uα is a monoid isomorphism from U × A (with this multiplication) to M ; see [Bri07, Lemma 2.7]. We say that M is the (internal) Zappa–Szép product of U and A, and write M = U ⊲⊳ A. Example 1.9 (Semidirect product). Suppose G is a group that is a semidirect product G = U ⋉ A for U, A ≤ G. Then for u ∈ U and α ∈ A we have αu = u(u−1 αu), and u−1 αu ∈ A, so the actions defined above are just α · u = u and αu = u−1 αu. We actually need to use the external Zappa–Szép product. This is discussed in detail in [Bri07, Section 2.4] (and in even more detail in [Bri05]). Definition 1.10 (External Zappa–Szép product). Let U and A be monoids with maps (α, u) 7→ α · u ∈ U and (α, u) 7→ αu ∈ A satisfying the following eight properties for all u, v ∈ U and α, β ∈ A: 1) 2) 3) 4) 5) 6) 7) 8) 1A · u = u (αβ) · u = α · (β · u) α1U = α α(uv) = (αu )v (1A )u = 1A (αβ)u = α(β·u) β u α · 1U = 1U α · (uv) = (α · u)(αu · v). (Identity acting on U ) (Product acting on U ) (Identity acting on A) (Product acting on A) (U acting on identity) (U acting on product) (A acting on identity) (A acting on product) Then the maps are called a Zappa–Szép action. The set U × A together with the multiplication defined by (1.3) is called the (external) Zappa–Szép product of U and A, denoted U ⊲⊳ A. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 9 It is shown in Lemma 2.9 in [Bri07] that the external Zappa–Szép product turns U ⊲⊳ A into a monoid and coincides with the internal Zappa–Szép product of U and A with respect to the embeddings u 7→ (u, 1A ) and α 7→ (1U , α). Some pedantry about the use of the word “action” might now be advisable. The action of U on A is a right action described by a homomorphism of monoids U → Symm(A), where Symm(A) is the symmetric group on A (and is not the group of monoid automorphisms). The action of A on U is a left action described by a homomorphism of monoids A → Symm(U ), again not to Aut(U ). In a phrase, both actions are actions of monoids as monoids, but on monoids as sets. Brin [Bri07] regards the action (α, u) 7→ αu of U on A as a family of maps from A to itself parametrized by U and defines properties of this family. For brevity we apply the same adjectives to the action itself but one should think of the family of maps. The action is called injective if for all u ∈ U , αu = β u implies α = β. It is surjective if for every α ∈ A and u ∈ U there exists a β ∈ A with β u = α. The action is strongly confluent if the following holds: if u, v ∈ U have a least common left multiple ru = sv and α = β u = γ v for some β, γ ∈ A then there is a θ ∈ A such that θ r = β and θ s = γ. Note that if the action is injective then for this to happen it is sufficient that θ ru = α. The notions for the action of A on U are defined by analogy. The following lemma can be found as Lemma 2.12 in [Bri07], or as Lemma 3.15 in [Bri05]. Lemma 1.11. Let U be a cancellative monoid with least common left multiples and let A be a group. Let U and A act on each other via Zappa–Szép actions. Assume that the action (α, u) 7→ αu of U on A is strongly confluent. Then M = U ⊲⊳ A has least common left multiples. A least common left multiple (r, α)(u, θ) = (s, β)(v, φ) of (u, θ) and (v, φ) in M can be constructed so that r(α · u) = s(β · v) is the least common left multiple of (α · u) and (β · v) in U . If M is cancellative, every least common left multiple will have that property. Being actions of monoids, Zappa–Szép actions are already determined by the actions of generating sets. It is not obvious, but also true, that they are often also determined by the actions of generating sets on generating sets. This means that, in order to define the actions, we need only define α · u and uα where both α and u come from generating sets. Brin [Bri07, pp. 768–769] gives a sufficient condition for such partial actions to extend to well defined Zappa–Szép actions, which we restate here. Given sets X and Y , let X ∗ and Y ∗ denote the free monoids generated respectively by them. Suppose maps Y × X → Y ∗ , (α, u) 7→ αu and Y × X → X, (α, u) 7→ α · u are given (so α · u should be a single generator, but αu may be a string of generators). Let W be the set of relations (αu, (α · u)(αu )) with α ∈ Y, u ∈ X. Then hX ∪ Y | W i is a Zappa–Szép product of X ∗ and Y ∗ . In particular, the above maps extend to Zappa– Szép actions Y ∗ × X ∗ → Y ∗ and Y ∗ × X ∗ → X ∗ . Lemma 1.12 ([Bri07, Lemma 2.14]). Let U = hX | Ri and A = hY | T i be presentations of monoids (with X ∩ Y = ∅). Assume that functions Y × X → Y ∗ , (α, u) 7→ αu and Y × X → X, (α, u) 7→ α · u are given. Let ∼R and ∼T denote the equivalence relations on X ∗ and Y ∗ imposed by the relation sets R and T . Extend the above maps to Y ∗ × X ∗ as above. Assume that the following are satisfied. If (u, v) ∈ R then for every α ∈ Y we have (α · u, α · v) ∈ R or (α · v, α · u) ∈ R, and also αu ∼T αv . If (α, β) ∈ T then for all u ∈ X we have α · u = β · u and αu ∼T β u . Then the lifted maps induce well defined Zappa–Szép actions and the restriction of the map A × U → U to A × X has its image in X. A presentation for U ⊲⊳ A is hX ∪ Y | R ∪ T ∪ W i 10 S. WITZEL AND M. C. B. ZAREMSKY where W consists of all pairs (αu, (α · u)(αu )) for (α, u) ∈ Y × X. 2. Cloning systems and generalized Thompson groups 2.1. Brin–Zappa–Szép products and cloning systems. To construct Thompson-like groups we now consider Zappa–Szép products F ⊲⊳ G of the forest monoid F with a group G. Definition 2.1 (BZS products). Suppose we have Zappa–Szép actions (g, E) 7→ g · E and (g, E) 7→ g E on G × F , for G a group. For each standard generator λk of F the map κk = κλk : G → G given by g 7→ gλk is called the kth cloning map. If every such cloning map is injective, we call the actions Brin–Zappa–Szép (BZS) actions and call the monoid F ⊲⊳ G the Brin–Zappa–Szép (BZS) product. Since the action of F on G is a right action we will also write the cloning maps κk on the right. The monoid F is cancellative and has common right multiples, and the same is true of G, being a group. Since G is a group these properties are inherited by F ⊲⊳ G: Observation 2.2. A BZS product F ⊲⊳ G is cancellative and has (least) common right multiples. In particular it has a group of right fractions. Proof. This follows easily from the statements about F using the unique factorization in Zappa–Szép products and that E is a right multiple and left factor of (E, g).  In Definition 2.1 we have already simplified the data needed to describe BZS products by using the fact that F is generated by the λk . In a similar fashion the following lemma reduces the data needed to describe the action of G on F . We denote by Sω the group Symm(N) of permutations of N and by S∞ ≤ Sω the subgroup of permutations that fix almost all elements of N. Lemma 2.3 (Carets to carets). Let F ⊲⊳ G be a BZS product. The action of G on F preserves the set Λ = {λk }k∈N and so induces a homomorphism ρ : G → Sω . Conversely, the action of G on F is completely determined by ρ and (κk )k∈N . Proof. For g ∈ G and E, F ∈ F , we know that g ·(EF ) = (g ·E)(g E ·F ) by Definition 1.10. We show that the action of G preserves Λ. If g · λk = EF then g −1 · (EF ) = λk , so one of g−1 · E or (g −1 )E · F equals 1F . Again by Definition 1.10, we see that either E = 1F or F = 1F . We conclude that g · λk equals λℓ for some ℓ depending on k and g. The map ρ then is defined via ρ(g)k = ℓ. To see that the action of G on F is determined by ρ and (κk ), we use repeated applications of the equation g · (λk E) = λρ(g)k ((g)κk · E).  As a consequence we see that the action of G on F preserves the length of an element: Corollary 2.4. There is a monoid homomorphism len : F ⊲⊳ G → N0 taking (E, g) to the length of E in the standard generators. The kernel of len is G = (F ⊲⊳ G)× .  In particular, len is a length function in the sense of Section 1.2. The induced morphism from the group of right fractions to Z (Lemma 1.2) is also denoted len. The next result is a technical lemma that tells us that ρ and the cloning maps always behave well together, in any BZS product. Lemma 2.5 (Compatibility). Let F ⊲⊳ G be a BZS product. The homomorphism ρ : G → Sω and the maps (κk )k∈N satisfy the following compatibility condition for k < ℓ: If ρ(g)k < ρ(g)ℓ then ρ((g)κℓ )k = ρ(g)k and ρ((g)κk )(ℓ + 1) = ρ(g)ℓ + 1. If ρ(g)k > ρ(g)ℓ then ρ((g)κℓ )k = ρ(g)k + 1 and ρ((g)κk )(ℓ + 1) = ρ(g)ℓ. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 11 Proof. For k < ℓ we know that g · (λℓ λk ) = g · (λk λℓ+1 ). Writing this out using the axioms for Zappa–Szép products we obtain that (g · λℓ )(gλℓ · λk ) = (g · λk )(gλk · λℓ+1 ) which can be rewritten using the action morphism ρ as λρ(g)ℓ λρ(gλℓ )k = λρ(g)k λρ(gλk )(ℓ+1) . Using the normal form for F (see Proposition 1.7) we can distinguish cases for how this could occur. The first case is that both pairs of indices (ρ(g)ℓ, ρ(g λℓ )k) and (ρ(g)k, ρ(g λk )(ℓ + 1)) are ordered increasingly and coincide. But this is impossible because ρ(g)ℓ 6= ρ(g)k. The second case is that both pairs are ordered strictly decreasingly and coincide, which is impossible for the same reason. The remaining two cases have that one pair is ordered increasingly and the other strictly decreasingly. In either case the monoid relation now yields a relationship among the indices, namely either ρ(g λk )(ℓ + 1) − 1 = ρ(g)ℓ > ρ(g λℓ )k = ρ(g)k or ρ(g)ℓ = ρ(g λk )(ℓ + 1) < ρ(g)k = ρ(g λℓ )k − 1. Finally, replacing the action of λk by the map κk yields the result. The compatibility condition     ρ((g)κℓ )(k) =     can also be rewritten as ρ(g)(k) ρ(g)(k) + 1 ρ(g)(k − 1) ρ(g)(k − 1) + 1 k < ℓ, ρ(g)k < ρ(g)ℓ, k < ℓ, ρ(g)k > ρ(g)ℓ, k − 1 > ℓ, ρ(g)(k − 1) < ρ(g)ℓ, k − 1 > ℓ, ρ(g)(k − 1) > ρ(g)ℓ. (2.1) Lemma 2.3 said that the action of G on F is uniquely determined by ρ and the cloning maps. The action of F on G is also uniquely determined by the cloning maps, simply because F is generated by the λk . Our findings can be summarized as: Proposition 2.6 (Uniqueness). A BZS product F ⊲⊳ G induces a homomorphism ρ : G → Sω and injective maps κk : G → G, k ∈ N satisfying the following conditions for k, ℓ ∈ N with k < ℓ and g, h ∈ G: (CS1) (gh)κk = (g)κρ(h)k (h)κk . (CS2) κℓ ◦ κk = κk ◦ κℓ+1 . (CS3) If ρ(g)k < ρ(g)ℓ then ρ((g)κℓ )k = ρ(g)k and ρ((g)κk )(ℓ + 1) = ρ(g)ℓ + 1. If ρ(g)k > ρ(g)ℓ then ρ((g)κℓ )k = ρ(g)k + 1 and ρ((g)κk )(ℓ + 1) = ρ(g)ℓ. The BZS product is uniquely determined by these data. (Cloning a product) (Product of clonings) (Compatibility)  The converse is also true: Proposition 2.7 (Existence). Let G be a group, ρ : G → Sω a homomorphism and (κk )k∈N a family of injective maps from G to itself. Assume that for k < ℓ and g, h ∈ G the conditions (CS1), (CS2) and (CS3) in Proposition 2.6 are satisfied. Then there is a well defined BZS product F ⊲⊳ G corresponding to these data. 12 S. WITZEL AND M. C. B. ZAREMSKY Proof. We will verify the assumptions of Lemma 1.12. This will produce a Zappa–Szép action, which will be a Brin–Zappa–Szép action by construction. We take U to be F with the presentation hλk for k ∈ N | (λℓ λk , λk λℓ+1 ) for k < li. Let R denote the set of relations used here and let Rsym be the symmetrization. We take A to be G with the trivial presentation hg for g ∈ G | (gh, g ′ ) for gh = g′ i. The maps on generators are defined as g λk := (g)κk and g · λk := λρ(g)k . First, for k < ℓ and g ∈ G we need to verify that (g · (λℓ λk ), g · (λk λℓ+1 )) ∈ Rsym and gλℓ λk = gλk λℓ+1 . The latter of these is just condition (CS2). The former condition means that (λρ(g)ℓ λρ((g)κℓ )k , λρ(g)k λρ((g)κk )(ℓ+1) ) should lie in Rsym . If ρ(g)k > ρ(g)ℓ we can use condition (CS3) to rewrite this as (λρ(g)ℓ λρ(g)k+1 , λρ(g)k λρ(g)ℓ ) which is in Rsym . If ρ(g)k < ρ(g)ℓ then the tuple is (λρ(g)ℓ λρ(g)k , λρ(g)k λρ(g)ℓ+1 ) which already lies in R. Second, for every relation (gh, g′ ) of G and every k ∈ N we have to verify that (gh) · λk = g ′ · λk λk and (gh)λk = (g′ ) for k ∈ N. The former is not really a condition because the partial action was already defined using G (rather than the free monoid spanned by G). The latter means that we need λ (g ′ ) k = g λρ(h)k hλk which is just condition (CS1).  Definition 2.8. Let G be a group, ρ : G → Sω a homomorphism and (κk )k∈N : G → G a family of maps, also denoted κ∗ for brevity. The triple (G, ρ, κ∗ ) is called a cloning system if the data satisfy conditions (CS1), (CS2) and (CS3) above. We may also refer to ρ and κ∗ as a forming a cloning system on G. We now discuss an extended example, of the infinite symmetric group, and show that we have a cloning system. It is exactly the cloning system that gives rise to Thompson’s group V . Example 2.9 (Symmetric groups). Let G = S∞ . Let ρ : S∞ → Sω just be inclusion. The action of G on F is thus given by g · λk = λρ(g)k = λgk . Since we will use the specific cloning maps in this example even in the future general setting, we will give them their own name, ςℓ . They are defined by the formula  gm m ≤ k, gm ≤ gk,    gm + 1 m < k, gm > gk, ((g)ςk )(m) = (2.2) g(m − 1) m > k, g(m − 1) < gk,    g(m − 1) + 1 m > k, g(m − 1) ≥ gk. If we draw permutations as strands crossing each other, the word “cloning” becomes more or less literal: applying the kth cloning map creates a parallel copy of the kth strand, where we count the strands at the bottom. See Figure 4 for an example. We will prove that this defines a cloning system by verifying (CS1), (CS2) and (CS3). For this example we will just verify them directly, and not use any specific presentation for S∞ . THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 13 ς 2 −→ Figure 4. An example of cloning in symmetric groups. Here we see that (1 2)ς2 = (1 3 2). It is immediate from (2.2) that the compatibility condition (CS3) in the formulation (2.1) is satisfied. To aid in checking condition (CS1), we define two families of maps, πk : N → N and τk : N → N, for k ∈ N:   m m ≤ k, m m ≤ k, (2.3) and τk (m) = πk (m) = m + 1 m > k. m−1 m>k Note that πk ◦ τk = id and τk ◦ πk (m) = m, unless m = k + 1 in which case it equals m − 1. In the m = k + 1 case, we see that (gh)ςk (k + 1) = gh(k) + 1 = (g)ςhk (hk + 1) = (g)ςhk (h)ςk (k + 1), by repeated use of the last case in the definition. It remains to check condition (CS1) in the m 6= k + 1 case. According to the definitions, we have ((g)ςk )(m) = τgk (gπk (m)) whenever m 6= k + 1. Using this we see that ((g)ςhk ) ◦ ((h)ςk )(m) = τghk gπhk ◦ τhk hπk (m) = τghk ghπk (m) = ((gh)ςk )(m) for m 6= k + 1. To check condition (CS2), we consider k < ℓ. We first verify, from the definition, the special cases ((g)ςℓ ◦ ςk )(k + 1) = gk + 1 = ((g)ςk ◦ ςℓ+1 )(k + 1) and ((g)ςℓ ◦ ςk )(ℓ + 2) = gℓ + 2 = ((g)ςk ◦ ςℓ+1 )(ℓ + 2). For the remaining case, when m 6= k + 1, ℓ + 2, we have ((g)ςℓ ◦ ςk )(m) = τk τℓ gπℓ πk (m) and ((g)ςk ◦ ςℓ+1 )(m) = τℓ+1 τk gπk πℓ+1 (m) and it is straightforward to check that πℓ πk = πk πℓ+1 and τk τℓ = τℓ+1 τk . (2.4) We conclude that (S∞ , ρ, (ςk )k ) is a cloning system. Remark 2.10. Besides the example of symmetric groups there are two more examples of cloning systems previously existing in the literature (though of course not using this language): they are for the families of braid groups and pure braid groups and were used in [Bri07, BBCS08] to construct Vbr and Fbr . Observation 2.11 (Simplified compatibility). Condition (CS3) in Proposition 2.6 can equivalently be rewritten as ρ((g)κk )(i) = (ρ(g))ςk (i) for all i 6= k, k + 1. 14 S. WITZEL AND M. C. B. ZAREMSKY All the examples in the later sections satisfy the condition in Observation 2.11 even when i = k, k + 1. Remark 2.12. Proposition 2.7 is an application of Lemma 1.12 to the trivial presentation. As this example demonstrates, it can be rather involved to verify the conditions for a cloning system. If the group in question comes equipped with a presentation involving only short relations, it may be easier to re-run the proof of Proposition 2.7 with that presentation by applying Lemma 1.12. In this case one has to check (CS2) and (CS3) only on generators, but also has to check a variant of (CS1) for every relation. We finish by discussing the case when we have least common left multiples. Let κ∗ be the cloning maps of a cloning system. For E = λk1 · · · λkr define κE := κk1 ◦ · · · ◦ κkr . Note that this is well defined by condition (CS2) and is just the map g 7→ g E . Observation 2.13. Let G be a group and let (ρ, κ∗ ) be a cloning system on G. The action of F on G defines a strongly confluent family if and only if im(κE1 ) ∩ im(κE2 ) = im(κF ) whenever E1 and E2 have least common left multiple F . In particular the BZS product F ⊲⊳ G has least common left multiples in that case. Proof. This is just unraveling the definition and using the remark before Lemma 1.11. Assume that the above condition holds. Write F = F1 E1 = F2 E2 . Assume that g = g1E1 = g2E2 , that is, g ∈ im(κE1 ) ∩ im(κE2 ). By assumption there is an h ∈ G such that g = (h)κF . That is g = hF = hF1 E1 = g1E1 . Injectivity of the action of F on G now implies hF1 = g1 . A similar argument shows hF2 = g2 . Conversely assume that the action of F on G is strongly confluent and write F as before. Let g ∈ im(κE1 ) ∩ im(κE2 ). Write g = (g1 )κE1 and g = (g2 )κE2 , that is g = g1E1 and g = g2E2 . By strong confluence there is an h ∈ G such that hF1 = g1 and hF2 = g2 . Then g = hF = (h)κF as desired.  To check this global confluence condition one either needs a good understanding of the action of F on G (as was the case for Vbr [Bri07, Section 5.3]) or one has to reduce it to local confluence statements. 2.2. Interlude: hedges. In the above example of the symmetric group, the action of F on S∞ factors through an action of a proper quotient. This amounts to a further relation being satisfied in addition to the product of clonings relation (CS2). The quotient turns out to be what Brin [Bri07] called the monoid of hedges. Without going into much detail we want to explain the action of the hedge monoid on S∞ . ... ... Figure 5. A forest and the corresponding hedge. The hedge monoid H is the monoid of monotone surjective maps N → N. Multiplication is given by composition: f · h = f ◦ h. There is an action of S∞ on H given by the property that, for g ∈ S∞ and f ∈ H , the cardinality of (g · f )−1 (i) is that of f −1 (g−1 i). There is an obvious equivariant morphism c : F → H (see Figure 5) given by c(λk ) = ηk where  m m ≤ k, ηk (m) = m − 1 m > k. This morphism is surjective but not injective, in fact (see [Bri07, Proposition 4.4]): THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 15 Lemma 2.14. The monoid H has the presentation hηk , k ∈ N | ηℓ ηk = ηk ηℓ+1 , ℓ ≥ ki. Observe that the only difference between this and the presentation of F is that the relation also holds for ℓ = k, rather than only for ℓ > k. It turns out that the action of F on S∞ defined in Example 2.9 factors through c: Observation 2.15. The maps ςk defined in (2.2) satisfy ςk ςk = ςk ςk+1 . Thus they define an action of H on S∞ . Proof. The verification of (CS2) above extends to the case k = ℓ.  2.3. Filtered cloning systems. Typically one will want to think of Thompson’s group V not as built from S∞ but rather from the family (Sn )n∈N . We will now describe this approach. We regard S∞ as the direct limit lim Sn where the maps ιm,n : Sm → Sn are −→ induced by the inclusions {1, . . . , m} ֒→ {1, . . . , n}. Let (Gn )n∈N be a family of groups with monomorphisms ιm,n : Gm → Gn for each m ≤ n. For convenience we will sometimes write G∗ for (Gn )n∈N ; note that in this case the index set is always N. The maps ιm,n will be written on the right, e.g., (g)ιm,n for g ∈ Gm . Suppose that ιm,m = id and ιm,n ◦ιn,ℓ = ιm,ℓ for all m ≤ n ≤ ℓ. Then ((Gn )n∈N , (ιm,n )m≤n ) is a directed system of groups with a direct limit G:=lim Gn . Since all the ιm,n are injective, −→ we may equivalently think of a group G filtered by subgroups Gn . Consider injective maps κnk : Gn → Gn+1 for k, n ∈ N, k ≤ n. We call such maps a family of cloning maps for the directed system (Gn )n∈N if for m, k ≤ n they satisfy  m κk ◦ ιm+1,n+1 if k ≤ m n (2.5) ιm,n ◦ κk = ιm,n+1 if m < k. This amounts to setting κnk := ιn,n+1 for k > n and requiring that ιm,n ◦ κnk = κm k ◦ ιm+1,n+1 , i.e., that the family (κnk )n∈N defines a morphism of directed systems of sets. From that it is clear that a family of cloning maps induces a family of injective maps κk : G → G by setting (g)ιn ◦ κk = (g)κnk ◦ ιn+1 for g ∈ Gn . Here ιn : Gn → G denotes the map given by the universal property of G. Definition 2.16 (Properly graded). We say that the cloning maps are properly graded if the following strong confluence condition holds: if g ∈ Gn+1 can be written as (h)κnk = g = (ḡ)ιn,n+1 then there is an h̄ ∈ Gn−1 with (h̄)κkn−1 = ḡ and (h̄)ιn−1,n = h. In view of the injectivity of all maps involved this is equivalent to saying that im κnk ∩ im ιn,n+1 ⊆ im(ιn−1,n ◦ κnk ) (2.6) (where the converse inclusion is automatic) or to saying that the diagram Gn−1 κkn−1 ιn−1,n✲ Gn κnk ❄ ❄ ιn,n+1 ✲ Gn+1 Gn is a pullback diagram of sets. A formulation in terms of the direct limit G is that if (h)κk ∈ Gn for k ≤ n then h ∈ Gn−1 . Note that a filtered cloning system satisfying the confluence condition of Observation 2.13 is automatically properly graded. 16 S. WITZEL AND M. C. B. ZAREMSKY Example 2.17. Take Gn = Sn as in Example 2.9. A family of cloning maps ςkn is obtained by restriction of the maps from Example 2.9: S . ςkn := ςk |Sn+1 n (2.7) This family of cloning maps is properly graded: if g ∈ im ιn,n+1 then g fixes n + 1; if moreover g = (h)ςk then it follows from (2.2) that h fixes n so h ∈ im ιn−1,n . Now suppose further that we have a family of homomorphisms ρn : Gn → Sn for each n ∈ N that are compatible with the directed systems, i.e., ρn ((g)ιm,n ) = (ρm (g))ιm,n for m < n and g ∈ Gm . Let ρ : G → S∞ be the induced homomorphism. We are of course interested in the case when ρ and the family (κk )k∈N define a cloning system on G. The corresponding defining formulas are obtained by adding decorations to the formulas from Section 2.1: Definition 2.18 (Cloning system). Let ((Gn )n∈N , (ιm,n )m≤n ) be an injective directed system of groups. Let (ρn )n∈N : Gn → Sn be a homomorphism of directed systems of groups and let (κnk )k≤n : Gn → Gn+1 be a family of cloning maps. The quadruple ((Gn )n∈N , (ιm,n )m≤n , (ρn )n∈N , (κnk )k≤n ) is called a cloning system if the following hold for all k ≤ n, k < ℓ, and g, h ∈ Gn : (FCS1) (gh)κnk = (g)κnρ(h)k (h)κnk . (Cloning a product) (Product of clonings) = κnk ◦ κn+1 (FCS2) κnℓ ◦ κn+1 ℓ+1 . k n n (FCS3) ρn+1 ((g)κk )(i) = (ρn (g))ςk (i) for all i 6= k, k + 1 (Compatibility) We may also refer to ρ∗ and (κnk )k≤n as forming a cloning system on the directed system G∗ . The cloning system is properly graded if the cloning maps are properly graded. Note that condition (FCS3) is phrased more concisely than (CS3), but this is just in light of Observation 2.11. Again, condition (FCS3) will in practice often be satisfied even when i = k, k + 1. Observation 2.19. Let (Gn )n∈N be an injective directed system of groups. A cloning system on (Gn )n∈N gives rise to a cloning system on G := lim Gn . Conversely a cloning −→ system on G gives rise to a cloning system on (Gn )n∈N provided (Gn )κnk ⊆ Gn+1 and ρn (Gn ) ⊆ Sn . We will usually not distinguish explicitly between a cloning system on G∗ and a cloning system on lim G∗ that preserves the filtration. In particular, given a cloning system on a −→ directed system of groups we will implicitly define ρ := lim ρn and κk := lim κnk . −→ −→ 2.4. Thompson groups from cloning systems. Let (G, ρ, (κk )k∈N ) be a cloning sysc(G) for the tem and let F ⊲⊳ G be the associated BZS product. We now define a group T cloning system. This is a supergroup of the actual group T (G∗ ) that we construct later in the case when G arises as a limit of a family (Gn )n (Definition 2.25). Definition 2.20 (Thompson group of a cloning system). The group of right fractions of c(G) and is called the large generalized Thompson group of G. F ⊲⊳ G is denoted by T c(G, ρ, (κk )k ) and call it the large generalized If more context is required we denote it T Thompson group of the cloning system (G, ρ, (κk )k ). c(G) can be written as By Observation 2.2 and Theorem 1.1 every element t of of T −1 t = (E− , g)(E+ , h) for some E− , E+ ∈ F and g, h ∈ G. If it can also be written ′ ′ −1 t = (E− , g )(E+ , h ) then gh−1 = g′ h′ −1 . It therefore makes sense to represent it by just the triple (E− , gh−1 , E+ ). Of course, this representation is still not unique, for example (E, 1G , E) represents the identity element for every E ∈ F . We will denote the element represented by (E− , g, E+ ) by [E− , g, E+ ]. Note that [E− , g, E+ ]−1 = [E+ , g−1 , E− ]. We THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 17 will call (E− (g · F ), g F , E+ F ) an expansion of (E− , g, E+ ), and the latter a reduction of the former, so any reduction or expansion of a triple (E− , g, E+ ) represents the same c(G) as (E− , g, E+ ). element of T Now assume that G = lim Gn is an injective direct limit of groups (Gn )n∈N and that the −→ cloning system is a cloning system on (Gn )n∈N . Recall from Section 1.3 that a forest E is called semisimple if all but its first tree are trivial and in that case its number of feet is the number of leaves of the first tree. We collect some facts about semisimple elements of F . Observation 2.21. Let E, E1 , E2 , F ∈ F . (1) The number of feet of a non-trivial semisimple element of F is its length plus one. (2) Any two semisimple elements of F have a semisimple common right multiple. More generally, any two elements of rank at most m have a common right multiple of rank at most m. (3) If E is semisimple with n feet then EF is semisimple if and only if F has rank at most n. More generally, if E is non-trivial of rank m and length n − m then EF has rank m if and only if F has rank at most n. (4) If E1 , E2 are semisimple with n feet then E1 E is semisimple if and only if E2 E is. Now we upgrade these facts to F ⊲⊳ G. We say that an element (E, g) ∈ F ⊲⊳ G is semisimple if E is semisimple with n feet (for some n) and g ∈ Gn . In this case we also say (E, g) has n feet. Lemma 2.22. Let E, E1 , E2 , F ∈ F and g, h ∈ G. (1) The number of feet of a semisimple element of F ⊲⊳ G is its length plus one. (2) Any two semisimple elements of F ⊲⊳ G have a semisimple common right multiple. (3) If (E, g) is semisimple then (E, g)F = (E(g · F ), g F ) is semisimple if and only if E(g · F ) is semisimple. (4) If (E, g) is semisimple with n feet then (E, g)F is semisimple if and only if F has rank at most n. (5) If (E1 , g) and (E2 , h) are semisimple with same number of feet then (E1 , g)E is semisimple if and only if (E2 , g)E is semisimple. Proof. The first statement is clear by definition. The second statement can be reduced to the corresponding statement in F because E is a right multiple of (E, g). In the third statement only the implication from right to left needs justification, namely that gF ∈ Gn where n is the number of feet of E(g · F ). This is because if g ∈ Gm and len E = k then g E ∈ Gm+k as can be seen by induction on len E using κk (Gn ) ⊆ Gn+1 . For (4) note that g ∈ Gn . But ρ(Gn ) ⊆ Sn so having rank at most n is preserved under the action of Gn , i.e., rk(g · F ) ≤ n ⇔ rk F ≤ n. Thus the statement follows from the one for F . The last statement is immediate from (4).  Definition 2.23 (Simple). A triple (E− , g, E+ ) (and the element [E− , g, E+ ] represented by it) is said to be simple if E− and E+ are semisimple, both of them with n feet and g ∈ Gn . This is the case if it can be written as (E− , g)(E+ , h)−1 with both factors semisimple with the same number of feet. c(G) is a subgroup. Proposition 2.24. The set of simple elements in T Proof. The proof closely follows [Bri07, Section 7]. 18 S. WITZEL AND M. C. B. ZAREMSKY Consider two simple elements s = [E− , g, E+ ], t = [F− , h, F+ ]. Let E+ E = F− F (2.8) be a semisimple common right multiple of E+ and F− (Observation 2.21 (2)). Then st = E− gEF −1 hF+−1 = (E− (g · E), g E )(F+ (h−1 · F ), (h−1 )F )−1 = [E− (g · E), g E hh −1 ·F (2.9) , F+ (h−1 · F )]. −1 In the last line we used that (hF )−1 = (h−1 )h·F so that ((h−1 )F )−1 = hh ·F . We claim that the last expression of (2.9) is simple. Indeed, (E− , g) and E+ are semisimple with the same number of feet and E+ E is semisimple so (E− , g)E = (E− (g · E), gE ) is F semisimple by Lemma 2.22 (5). Similar reasoning applies to (F+ (h−1 · F ), h−1 ). Moreover, we can use Corollary 2.4 to compute len(E− , g) + len E s simple = (2.8) len E+ + len E = len F− + len F t simple = len(F+ , (h−1 )F ) + len F . By Lemma 2.22 (1) this shows that the last expression of (2.9) is simple.  Definition 2.25 (Thompson group of a filtered cloning system). The group of simple c(G) is denoted T (G∗ ) and called the generalized Thompson group of G∗ . elements in T c(G), we can include other data from the cloning If we need to be more precise, as with T system in the notation as in T (G∗ , ρ∗ , (κ∗k )k ). Notationally, when we talk about a generalized Thompson group, the asterisk will always take the position of the index of the family. For instance, the generalized Thompson group for the family (Gn )n∈N of direct powers in Section 6 will be denoted T (G∗ ); and the generalized Thompson group for the family of matrix groups (Bn (R))n∈N in Section 7 will be denoted T (B∗ (R)). c(G) → Recall from the discussion after Corollary 2.4 that there is a length morphism len : T Z which takes an element [E, g, F ] to len(E) − len(F ). The group T (G∗ ) lies in the kernel of that morphism, that is, simple elements have length 0. Given a simple element [E, g, F ] with E = (Ti )i∈N and F = (Ui )i∈N , since all the Ti and Ui are trivial for i > 1, we will often write our element as [T1 , g, U1 ] instead. In other words, we view an element of T (G∗ ) as being a tree with n leaves, followed by an element of Gn , followed by another tree with n leaves. c(G) is Remark 2.26. Constructing T (G∗ ) as the subgroup of simple elements of T somewhat artificial as can be seen in some of the proofs above. The more natural approach would be to have each element of F “know” on which level it can be applied. This amounts to considering the category of forests P that has objects the natural numbers and morphisms λnk : n → n + 1, 1 ≤ k ≤ n subject to the forest relations (1.2), cf. [Bel04, Section 7]. Let G be another category that also has objects the natural numbers and morphisms from n to n that form a group Gn . So while P has only “vertical” arrows, G has only “horizontal” arrows. One would then want to form the Zappa–Sźep product P ⊲⊳ G which would be specified by commutative squares of the form γλnk = λnρ(γ)k γ λk with γ ∈ Gn and γ λk ∈ Gn+1 . Localizing everywhere one would obtain a groupoid of fractions Q and T (G∗ ) should be just HomQ (1, 1). The reason that we have not chosen that description is simply that Zappa–Sźep products for categories are not well-developed to our knowledge, while for monoids all the needed statements were already available thanks to Brin’s work [Bri05, Bri07]. Artifacts of this approach, which should be overcome by the general approach above, include the maps ιn,n+1 and the property of being properly graded. Not having to collect THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 19 all the groups Gn in a common group G would also make it possible to construct, for example, the Thompson groups T and Tbr . H H 2.5. Morphisms. Let (G, ρG , (κG k )k∈N ) and (H, ρ , (κk )k∈N ) be cloning systems. A homomorphism ϕ : G → H is a morphism of cloning systems if G (1) (ϕ(g))κH k = ϕ((g)κk ) for all k ∈ N and g ∈ G, and H G (2) ρ ◦ ϕ = ρ . Observation 2.27. Let ϕ : G → H be a morphism of cloning systems. There is an c(ϕ) : T c(G) → T c(H). If ϕ is injective or surjective then so is induced homomorphism T c(ϕ). In particular, there is always a homomorphism T c(G) → T c(Sω ). T Proof. We show that a morphism of cloning systems induces a morphism F ⊲⊳ G → c(ϕ) is defined by F ⊲⊳ H. The statement then follows from Lemma 1.2. Naturally, T c(ϕ)(Eg) = Eϕ(g). Well definedness amounts to T c(ϕ)((g · E)gE ) = (ϕ(g) · E)(ϕ(g)E ) T which follows from (1) and (2) above by writing E as a product of λk s and inducting on the length. The injectivity and surjectivity statements are clear.  Similarly let (Gn )n∈N and (Hn )n∈N be injective direct systems equipped with cloning systems. A morphism of directed systems of groups ϕ∗ : G∗ → H∗ is a morphism of cloning systems if (1) (ϕn (g))κH,n = ϕn+1 ((g)κG,n k k ) for all 1 ≤ k ≤ n and g ∈ Gn , and G for all n ∈ N. ◦ ϕ = ρ (2) ρH n n n Observation 2.28. Let ϕ∗ : G∗ → H∗ be a morphism of cloning systems. There is an induced homomorphism T (ϕ) : T (G∗ ) → T (H∗ ). If ϕ is injective or surjective then so is T (ϕ). In particular, there is always a homomorphism T (G∗ ) → T (S∗ ), the latter being Thompson’s group V . Proof. We have to show that if Eg ∈ F ⊲⊳ G is semisimple with n feet then so is c(ϕ)(Eg) = Eϕ(g). But this follows since E is semisimple with n feet and g ∈ Gn , so T ϕ(g) ∈ Hn .  Functoriality is straightforward: Observation 2.29. If ϕ : G∗ → H∗ and ψ : H∗ → K∗ are morphisms of cloning systems c(ψϕ) = T c(ψ)Tc(ϕ) : T c(G) → T c(K). If ϕ and ψ are morphisms of filtered cloning then T systems then T (ψϕ) = T (ψ)T (ϕ) : T (G∗ ) → T (K∗ ).  3. Basic properties Throughout this section let T (G∗ ) be the generalized Thompson group of a cloning system on an injective directed system of groups (Gn )n∈N and let G = lim Gn . We collect some −→ properties of T (G∗ ) that follow directly from the construction. 3.1. A short exact sequence. Observation 3.1. Let T ∈ F be semisimple with n feet. The map g 7→ [T, g, T ] is an injective homomorphism Gn → T (G∗ ). c(G) are all injective. The element [T, g, T ] is Proof. The maps Gn → G → F ⊲⊳ G → T simple, so the image lies in T (G∗ ). The map is visibly a homomorphism.  In fact, this can be explained more globally. For a semisimple forest T with n feet let GT denote the subgroup (isomorphic to Gn ) of T (G∗ ) that consists of elements [T, g, T ]. The cloning map κk induces an embedding GT ֒→ GU where U is obtained from T by 20 S. WITZEL AND M. C. B. ZAREMSKY adding a split to the kth foot (so U = T λk ). Finite binary trees form a directed set and the condition (FCS2) (product of clonings) ensures that that the groups (GT )T form a directed system of groups. Lemma 3.2. Consider a cloning system satisfies condition (FCS3) even for i = k, k + 1 (this is the case in particular if ρ = 0). There is a directed subsystem (KT )T of (GT )T and a short exact sequence 1 → lim KT → T (G∗ ) → W → 1 −→ T where the quotient morphism is the morphism T (ρ∗ ) from Observation 2.28 and W is its image. Note that W contains Thompson’s group F . Proof. For each T , say with n feet, let KT be the kernel of ρn : GT → Sn . The assumption on the cloning system implies that if ρ(g) = 1 then ρ((g)κk ) = 1, showing that (KT )T is indeed a subsystem of (GT )T . It remains to see that the direct limit is isomorphic to the kernel of T (ρ∗ ). This is clear once one realizes that it consists of all elements that can be written in the form [T, g, T ], for some T and g ∈ KT .  In what follows we will concentrate on the case where ρ = 0 is the trivial morphism ρ(g) = 1, so KT = GT for all T . Examples are F and Fbr but not V and Vbr . Observation 3.3. Suppose ρ = 0. Then T (G∗ ) = K (G∗ ) ⋊ F . Proof. Since each ρn = 0, we have W = F , which is T ({1}). Then the splitting map F → T (G∗ ) is T (ι∗ ) where ι∗ : {1} → G∗ is the trivial homomorphism.  Remark 3.4. Bartholdi, Cornulier, and Kochloukova [BdCK15] studied finiteness properties of wreath products. Observation 3.3 shows how this relates to our groups. A wreath product is built by taking a direct product of copies of a group H, indexed by a set X, and combining this with another group G acting on X. The generalized Thompson groups in Observation 3.3 can be viewed as the result of taking a direct limit (instead of product) of groups from a family (GT )T , indexed by a set of trees T on which there is a partial (instead of full) action of F , and combining these data into a group T (G∗ ). The question of whether F is amenable or not is probably the most famous question about Thompson’s groups. The following observation does not purport to be deep, but it seems worth recording nonetheless. Observation 3.5 (Amenability). Suppose ρ = 0. Then T (G∗ ) is amenable if and only if F and every Gn is amenable. Proof. We have seen that K (G∗ ) is a direct limit of copies of Gn . Since amenability is preserved under taking subgroups and direct limits, this tells us that K (G∗ ) is amenable if and only if every Gn is. Then since T (G∗ ) = K (G∗ ) ⋊ F , the conclusion follows since amenability is also closed under group extensions.  Observation 3.6 (Free group-free). Suppose ρ = 0. If none of the Gn contains a nonabelian free group then neither does T (G∗ ). Proof. Suppose H ≤ T (G∗ ) is free. If H ∩ K (G∗ ) = {1} then H embeds into F , and so H must be cyclic, since F does not contain a non-abelian free group. Now suppose there is some 1 6= x ∈ H ∩ K (G∗ ). For any y ∈ H, the conjugate xy is in H ∩ K (G∗ ). Since K (G∗ ) is a direct limit of copies of the Gn , it does not contain a non-abelian free group by assumption, and so hx, xy i is abelian. But y ∈ H was arbitrary, so H must already be abelian.  THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 21 The next result does not require ρ = 0. It fits into the context of this section but to prove it we need some of the tools of Section 4.3. Lemma 3.7 (Torsion-free). Assume that the cloning system is properly graded. If all the Gn are torsion-free then so is T (G∗ ). 3.2. Truncation. For g ∈ Gn and k ≤ n we have the equation gλk = (g · λk )gλk in c(G) this implies F ⊲⊳ G where gλk ∈ Gn+1 . In T g = (g · λk )g λk λ−1 k . (3.1) This elementary observation has an interesting consequence. Let N ∈ N be arbitrary and define a directed system of groups (G′n )n∈N by G′n := {1} for n ≤ N and G′n := Gn for n > N . Define a cloning system on G′∗ by letting (κ′ )nk : G′n → G′n+1 be the trivial homomorphism when n ≤ N , and (κ′ )nk = κnk and ρ′n = ρn when n > N . We call G′∗ the truncation of G∗ at N and ((ρ′n )n , ((κ′ )nk )k≤n ) the truncation of ((ρn )n , (κnk )k≤n ) at N . Proposition 3.8 (Truncation isomorphism). Let G′∗ be the truncation of G∗ at N . The morphism T (G′∗ ) → T (G∗ ) induced by the obvious homomorphism G′∗ → G∗ is an isomorphism. Proof. The morphism G′∗ → G∗ is injective hence so is T (G′∗ ) → T (G∗ ). To show that it is surjective let [T, g, U ] ∈ T (G∗ ) be such that T and U have n leaves. If n > N there is nothing to show. Otherwise use (3.1) to write [T, g, U ] = [T (g · λk ), gλk , U λk ] for some k ≤ n. The trees in the right hand side expression have n + 1 leaves. Proceeding inductively, we obtain an element whose trees have N + 1 leaves and therefore the element is in T (G′∗ ).  This proposition is in line with treating T (G∗ ) as a sort of limit of G∗ since it does not depend on an initial segment of data. 4. Spaces for generalized Thompson groups The goal of this section is to produce for each generalized Thompson group T (G∗ ) a space on which it acts. The space will be contractible and have stabilizers isomorphic to the groups Gn , assuming the cloning system on G∗ is properly graded. The ideas used in the construction were used before in [Ste92, Bro92, Far03, Bro06, FMWZ13, BFM+ 14]. Throughout let G∗ be an injective directed system of groups equipped with a cloning system and let G = lim G∗ . −→ As a starting point we note that Corollary 1.6, Observation 2.2 and Corollary 2.4 imply c(G)/G is a join-semilattice with conditional meets, under the relation xG ≤ yG if that T −1 x y ∈ F ⊲⊳ G. Later on it will be convenient to have a symbol for the quotient relation so we let x ∼G y if x−1 y ∈ G. 4.1. Semisimple group elements. We generalize some of the notions that were introduced in Sections 1.3 and 2.4. We say that an arbitrary (not necessarily semisimple) element E of F has n feet if it has rank m and length n − m. Visually this means that the last leaf that is not a root is numbered n. An element (E, g) of F ⊲⊳ G has n feet if E c(G) semisimple has at most n feet and g ∈ Gn . Finally, we call an element [E, g, F ] of T if (E, g) is semisimple with n feet and F has at most n feet (note F need not be semisimple). This is consistent with the previous definition of “semisimple”: If an element of the c(G) is semisimple in this sense, and is an element of the monoid F ⊲⊳ G, then it group T e1 denote the set of all semisimple elements must be semisimple in the monoid. We let P c(G). of T 22 S. WITZEL AND M. C. B. ZAREMSKY Lemma 4.1. If [E1 , g1 , F1 ] is simple and [E2 , g2 , F2 ] is semisimple then [E1 , g, F1 ][E2 , g, F2 ] is semisimple. As a consequence, T (G∗ ) acts on Pe1 . Proof. This is shown analogously to Proposition 2.24.  If [E, g, F ] is semisimple we say that it has len([E, g, F ]) + 1 = len(E) − len(F ) + 1 feet, which is well defined by Corollary 2.4. This can be visualized as the number of roots e1,n denote the set of all of F that can be “reached” from the first root of E. We let P semisimple elements with at most n feet. We define P1,n to be the quotient Pe1,n /∼G and c(G)/G. We call the passage from Pe1,n to P1,n dangling. Note that P1,n is a subposet of T also denote Pe1 /∼G by P1 . For context, the term “dangling” comes from the case when G∗ is the system of braid groups B∗ , and the elements of P1,n can be pictured as “dangling braided strand diagrams” [BFM+ 14], originating on one strand and ending on n strands. The next lemma is the reason for having introduced the notion of a cloning system being properly graded. Lemma 4.2. Assume that the cloning system is properly graded. If x, y ∈ Pe1,n are semisimple then x ∼G y if and only if x−1 y ∈ Gn . Proof. What needs to be shown is that if x−1 y ∈ G then x−1 y ∈ Gn . Write x = [E1 , g −1 , F1 ] and y = [E2 , h−1 , F2 ]. Let E = E1 E1′ = E2 E2′ be a common right multi′ ′ ple so that x−1 y = [F1 (g · E1′ ), gE1 (hE2 )−1 , F2 (h · E2′ )] =: [A, b, C]. For this to equal some d ∈ G it is necessary that Ab = dC in F ⊲⊳ G, that is, A = d · C and b = dC . Say that E has length m. Then we compute that len(A) = len(C) ≥ m − n + 1. Since the cloning system is properly graded, the fact that b = dC implies that d has to lie in Gm+1−len(C) ⊆ Gn .  4.2. Poset structure. Consider the geometric realization |P1 |. This is the simplicial complex with a k-simplex for each chain x0 ≤ · · · ≤ xk of elements of P1 , and face relation given by subchains. Lemma 4.3. The poset P1 is a join-semilattice with conditional meets, in particular |P1 | is contractible. c(G)/G is a join-semilattice with conditional meets so it Proof. We already know that T suffices to show that P1 is closed under taking suprema and infima. In other words, it suffices to show that least common right multiples of semisimple elements are semisimple and that left factors of semisimple elements are semisimple. The first is similar to the proof of Proposition 2.24 and the second is easy.  In |P1 | every vertex is contained in a simplex of arbitrarily large dimension, which makes it too big for practical purposes. It has proven helpful to consider a subspace called the Stein–Farley complex, which we introduce next. e1 was defined by declaring that 4.3. The Stein–Farley complex. The preorder on P x ≤ y if y = x(E, g) for some (E, g) ∈ F ⊲⊳ G. The basic idea in constructing the Stein–Farley complex is to regard this relation as a transitive hull of a finer relation  and to use this finer relation in constructing the space. It is defined by declaring x  y if y = x(E, g) for some (E, g) ∈ F ⊲⊳ G with the additional assumption that E is elementary. An elementary forest is one in which every tree has at most two leaves. That is, a forest is elementary if it can be written as λk1 · · · λkr with ki+1 > ki + 1 for i < r. Note that if x ∈ Pe1,n , in order for x(E, g) to be in Pe1 as well, it is necessary that E has rank at most n and that g ∈ Gn+len(E) . Note also that if E is elementary then so is g · E for any g ∈ G because the action of G (via ρ : G → Sω ) just permutes the trees of E. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 23 As a consequence  is invariant under dangling and we also write  for the relation induced on P1 . Note that  is not transitive, but it is true that if x  z and x ≤ y ≤ z then x  y  z. Given a simplex x0 ≤ · · · ≤ xk in |P1 |, call the simplex elementary if x0  xk . The property of being elementary is preserved under passing to subchains, so the elementary simplices form a subcomplex. Definition 4.4 (Stein–Farley complex). The subcomplex of elementary simplices of |P1 | is denoted by X (G∗ ) and called the Stein–Farley complex of T (G∗ ). The Stein–Farley complex has the structure of a cubical complex, which we now describe. The key point is: Observation 4.5. If E is elementary then the set of right factors of E forms a boolean lattice under .  For x  y in P1 we consider the closed interval [x, y] := {z ∈ P1 | x ≤ z ≤ y} as well as the open and half open intervals (x, y), [x, y) and (x, y] that are defined analogously. As a consequence of Observation 4.5 we obtain that the interval [x, y] := {z ∈ P1 | x ≤ z ≤ y} is a boolean lattice and so |[x, y]| has the structure of a cube. The intersection of two such cubes |[x, y]| and |[z, w]| is empty if y and w do not have a common lower bound and is |[sup(x, z), inf (y, w)]| (which may be empty if the supremum is larger than the infimum) otherwise. In particular the intersection of cubes is either empty or is again a cube. Hence X (G∗ ) is a cubical complex in the sense of Definition 7.32 of [BH99]. Observation 4.6. For any vertex x in X (G∗ ), there are only finitely many vertices y in X (G∗ ) with x  y. Proof. If x̃ ∈ Pe1 is a vertex representative (modulo dangling) for x, it is clear using dangling that every vertex y with x  y has a representative ỹ with ỹ = x̃(E, 1) for some some elementary forest E. In order for ỹ to be semisimple, E can have rank at most len(x̃) − 1, and there are only finitely many elementary forests of a given rank, so the result follows.  The next step is to show that X (G∗ ) is itself contractible. The argument is similar to that given in Section 4 of [Bro92]. We follow the exposition in [BFM+ 14]. Lemma 4.7. For x < y with x 6≺ y, |(x, y)| is contractible. Proof. For any z ∈ (x, y] let z0 be the unique largest element of [x, z] such that x  z0 . By hypothesis z0 ∈ [x, y), and by the definition of  it is clear that z0 ∈ (x, y], so in fact z0 ∈ (x, y). Also, z0 ≤ y0 for any z ∈ (x, y). The inequalities z ≥ z0 ≤ y0 then imply that |(x, y)| is contractible, by Section 1.5 of [Qui78].  Proposition 4.8. X (G∗ ) is contractible. Proof. We know that |P1 | is contractible by Lemma 4.3. We can build up from X (G∗ ) to |P1 | by attaching new subcomplexes, and we claim that this never changes the homotopy type, so X (G∗ ) is contractible. Given a closed interval [x, y], define r([x, y]) := len(y) − len(x). As a remark, if x  y then r([x, y]) is the dimension of the cube given by [x, y]. We attach the contractible subcomplexes |[x, y]| for x 6 y to X (G∗ ) in increasing order of r-value. When we attach |[x, y]| then, we attach it along |[x, y)| ∪ |(x, y]|. But this is the suspension of |(x, y)|, and so is contractible by the previous lemma. We conclude that attaching |[x, y]| does not change the homotopy type, and since |P1 | is contractible, so is X (G∗ ).  Lemma 4.9 (Stabilizers). Assume that the cloning system is properly graded. The stabilizer in T (G∗ ) of a vertex in X (G∗ ) with n feet is isomorphic to Gn . The stabilizer in T (G∗ ) of an arbitrary cell is isomorphic to a finite index subgroup of some Gn . 24 S. WITZEL AND M. C. B. ZAREMSKY Proof. First consider the stabilizer of a vertex x with n feet. We claim that StabT (G∗ ) (x) ∼ = e Gn . Choose x̃ ∈ P1 representing x and let g ∈ StabT (G∗ ) (x). By the definition of dangling, and by Lemma 4.2, there is a (unique) h ∈ Gn such that gx̃ = x̃h. Then the map g 7→ h = x̃−1 gx̃ is a group isomorphism. Now let σ = |[x, y]|, x  y be a an arbitrary cube. Since the action of T (G∗ ) preserves the number of feet, the stabilizer Gσ of σ fixes x and y. Hence Gσ is contained in Gx and contains the kernel of the map Gx → Symm({w | x  w  y}), the image of which is finite by Observation 4.6.  We close this section by providing the proof of Lemma 3.7, left out in the last section, which says that T (G∗ ) is torsion-free as soon as all the Gn are. Proof of Lemma 3.7. The vertices in X (G∗ ) coincide with the vertices of |P1 |, and, as we just proved, any vertex has some Gn as a stabilizer. Hence it suffices to prove that if g ∈ T (G∗ ) has finite order then it fixes an element of the directed poset P1 . By Lemma 4.3, P1 is a join-semilattice, so any finite collection of elements has a unique least upper bound. But then if g has finite order, for any x ∈ P1 the unique least upper bound of the finite set hgi.x is necessarily fixed by g.  5. Finiteness properties One of our main motivations for defining the functor T (−) is to study how it behaves with respect to finiteness properties. Recall that a group G if said to be of type Fn if there is a K(G, 1) whose n-skeleton is compact. Most of the known Thompson’s groups are of type F∞ , that is, of type Fn for all n. To efficiently speak about groups that are not of type F∞ recall that the finiteness length of G, denoted φ(G), is the supremum over all n ∈ N such that G is of type Fn . We will see below that proofs of the finiteness properties of T (G∗ ) depend on the finiteness properties of the individual groups Gn as well as on the asymptotic connectivity of certain descending links, which is infinite in many cases. Since finite initial intervals of G∗ can always be ignored by Proposition 3.8 we ask: Question 5.1. For which directed systems of groups G∗ equipped with properly graded cloning systems do we have φ(T (G∗ )) = lim inf φ(G∗ )? Note that for any directed system of groups G∗ one can take all ρk to be trivial and all κnk to be ιn,n+1 . In this case T (G∗ ) = (limn Gn ) × F , which would seem to give a negative answer to Question 5.1. However, in order to be properly graded in this example we would need im ιn,n+1 ⊆ im ιn−1,n+1 , and this implies that the ιn,n+1 are all isomorphisms. Thus, in fact this does provide a positive answer to the question. 5.1. Morse theory. One of the main tools to study connectivity properties of spaces, and thus to study finiteness properties of groups, is combinatorial Morse theory. We collect here the main ingredients that will be needed later on. Let X be a Euclidean cell complex. A map h : X (0) → N0 is called a Morse function if the maximum of h over the vertices of a cell of X is attained in a unique vertex. We typically think of h as assigning a height to each vertex. If h is a Morse function and r ∈ R, the sublevel set Xr = X ≤r consists of all cells of X whose vertices have height at most r. For a vertex x ∈ X (0) of height r, the descending link lk↓(x) of x is the subcomplex of lk(x) spanned by all vertices of strictly lower height. The main observation that makes Morse theory work is that keeping track of the connectivity of descending links allows one to deduce global (relative) connectivity statements: THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 25 Lemma 5.2 (Morse Lemma). Let X be a Euclidean cell complex and let h : X (0) → N0 be a Morse function on X. Let s, t ∈ R ∪ {∞} with s < t. If lk↓(x) is (k − 1)-connected for every vertex in Xt \ Xs then the pair (Xt , Xs ) is k-connected. The connection between connectivity of spaces and finiteness properties of groups is most directly made using Brown’s criterion. A Morse function on X gives rise to a filtration (Xr )r∈N0 by subcomplexes. We say that the filtration is essentially k-connected if for every i ∈ N0 there exists a j ≥ i such that πℓ (Xi → Xj ) is trivial for all ℓ ≤ k. Now assume that a group G acts on X. If h is G-invariant then so is the filtration (Xr )r . We say that the filtration is cocompact if the quotient G\Xr is compact for all r. This is the setup for Brown’s criterion, see [Bro87, Theorems 2.2, 3.2]. Theorem 5.3 (Brown’s criterion). Let n ∈ N and assume a group G acts on an (n − 1)connected CW complex X. Assume that the stabilizer of every p-cell of X is of type Fn−p . Let (Xr )r∈N0 be a G-cocompact filtration of X. Then G is of type Fn if and only if (Xr )r is essentially (n − 1)-connected. Putting both statements together we obtain the version that we will mostly use. Corollary 5.4. Let G act on a contractible Euclidean cell complex X and let h : X (0) → N0 be a G-invariant Morse function. Assume that the stabilizer of every p-cell of X is of type Fn−p and that the sublevel sets Xr are cocompact. If there is an s ∈ R such that lk↓(x) is (n − 1)-connected for all vertices x ∈ X (0) \ Xs then G is of type Fn . If G∗ is a system of groups equipped with a properly graded cloning system then T (G∗ ) acts on the Stein–Farley complex X (G∗ ), which is contractible (Proposition 4.8) with stabilizers from G∗ (Lemma 4.9). Our next goal is to define an invariant, cocompact Morse function and to describe the descending links. 5.2. The Morse function. Recall that the vertices of X (G∗ ) are classes [E, g, F ] of semisimple elements modulo dangling. The height function we will be using assigns to such a vertex its number of feet (see Section 4.1). That is, X (G∗ )n = |P1,n |∩X (G∗ ). This c(G) → Z height function is T (G∗ )-invariant because it is induced by the morphism len : T and every element of T (G∗ ) has length 0. Lemma 5.5 (Cocompactness). The action of T (G∗ ) is transitive on vertices of X (G∗ ) with a fixed number of feet. Consequently the action of T (G∗ ) on X (G∗ )n is cocompact for every n. Proof. Let x̃ = [E− , g, E+ ] and ỹ = [F− , h, F+ ] be semisimple with n feet. We know that x̃ỹ −1 takes ỹ to x̃, so it suffices to show that x̃ỹ −1 is simple. Note that E+ and F+ have rank at most n. By Observation 2.21 (2) they admit a common right multiple E+ E = F+ F of rank at most n. Let the length of this multiple be m, so it has at most m + n feet. Then x̃ỹ −1 = [E− (g · E), g E (hF )−1 , F− (h · F )] and both E− (g · E) and F− (h · F ) are semisimple by Observation 2.21 (3). They have m + n feet and both gE and hF lie in Gn+m . Thus x̃ỹ −1 is simple. The second statement now follows from Observation 4.6.  5.3. Descending links. Let x be a vertex in X (G∗ ), with n feet. We want to describe the descending link of x. A vertex y is in the link of x if either x  y or y  x. In the first case y is ascending so the descending link is spanned by vertices y with y  x. These are by definition of the form x(E, g)−1 for E an elementary forest and g ∈ Gn . In particular, for a fixed n, the descending links of any vertices of height n look the same, and are all isomorphic to the simplicial complex of products gE −1 where g ∈ Gn and E is an elementary forest with at most n feet, modulo the relation ∼G . 26 S. WITZEL AND M. C. B. ZAREMSKY It is helpful to describe this complex somewhat more explicitly. In doing so we slightly shift notation by making use of the fact that elementary forests can be parametrized by subgraphs of linear graphs. Let Ln be the graph with n vertices, labeled 1 through n, and a single edge connecting i to i + 1, for each 1 ≤ i ≤ n − 1. This is the linear graph with n vertices. Denote the edge from i to i + 1 by ei . We will exclusively consider spanning subgraphs of Ln , that is, subgraphs whose vertex set is {1, . . . , n}. We call the spanning subgraph without edges trivial. A matching on a graph is a spanning subgraph in which no two edges share a vertex. For an elementary forest E with at most n feet, define Γ(E) to be the spanning subgraph of Ln that has an edge from i to i + 1 if and only if the ith and (i + 1)st leaves of E are leaves of a common caret. Note that this is a matching. Conversely, given a matching Γ of Ln , there is an elementary forest E(Γ) = λik · · · λi1 where Γ has edges ei1 , . . . , eik . Both operations are inverse to each other so we conclude: Observation 5.6. There is a one-to-one correspondence between matchings of Ln and elementary forests with at most n feet.  In particular, if Γ is a matching with m edges and n vertices we obtain a cloning map κΓ : Gn−m → Gn which is just the cloning map of E(Γ) as defined before Observation 2.13. We also get an action of Gn−m on Γ which is given by the action of ρ(Gn−m ) on connected components. For future reference we also note: Observation 5.7. There is a one-to-one correspondence between spanning subgraphs of Ln and hedges with at most n feet.  Now define a simplicial complex Ln (G∗ ) as follows. A simplex in Ln (G∗ ) is represented by a pair (g, Γ), where g ∈ Gn and Γ is a non-trivial matching of Ln . Two such pairs (g1 , Γ1 ), (g2 , Γ2 ) are equivalent (under dangling) if the following conditions hold: (1) Γ1 and Γ2 both have m edges for some 1 ≤ m ≤ n/2, (2) g2−1 g1 lies in the image of κΓ1 , and (3) Γ2 = (g2−1 g1 )κ−1 Γ1 · Γ1 . We make Ln (G∗ ) into a simplicial complex with face relation given by passing to subgraphs of the second term in the pair. Denote the equivalence class of (g, Γ) under dangling by [g, Γ]. In summary, Ln (G∗ ) has simplex set {[g, Γ] | Γ is a matching of Ln and g ∈ Gn }. Observation 5.8. If x has n feet, the correspondence (g, Γ) 7→ xgE(Γ)−1 induces an isomorphism Ln (G∗ ) → lk↓(x).  In particular, the Ln (G∗ ) are indeed simplicial complexes as claimed, since X (G∗ ) is a cubical complex. We now have all the pieces together to apply Brown’s criterion to our setting. Proposition 5.9. Let G∗ be equipped with a properly graded cloning system. If Gk is eventually of type Fn and Lk (G∗ ) is eventually (n−1)-connected then T (G∗ ) is of type Fn . Proof. Suppose first that all Gk are of type Fn . Let X = X (G∗ ), which is contractible by Proposition 4.8. Our Morse function “number of feet” has cocompact sublevel sets by Lemma 5.5. The stabilizer of any cell is a finite index subgroup of some Gk by Lemma 4.9. Since finiteness properties are inherited by finite index subgroups, our assumption implies that all stabilizers are of type Fn . By the second assumption there is an s such that Lk (G∗ ) is (n − 1)-connected for k > s, which by Observation 5.8 means that descending links are (n−1)-connected from s on. Applying Corollary 5.4 we conclude that T (G∗ ) is of type Fn . If the Gk are of type Fn only from t on, we use Proposition 3.8 to replace T (G∗ ) by the isomorphic group T (G′∗ ) where G′k = Gk for k ≥ t and Gk = {1} for k < t. In particular, all of the G′k are of type Fn . THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 27 Of course X (G′∗ ) is not isomorphic to X (G∗ ) and neither are the Lm (G′∗ ) isomorphic to the Lm (G∗ ). However, the k-skeleton of Lm (G′∗ ) is isomorphic to the k-skeleton of Lm (G∗ ) once m > k + t. Since (n − 1)-connectivity only depends on the n-skeleton, if the Lm (G∗ ) are eventually (n − 1)-connected then so are the Lm (G′∗ ).  For a negative counterpart to this statement, this is, to show that T (G∗ ) is not of type Fn , we would need stabilizers with good finiteness properties and a filtration that is not essentially (n − 1)-connected – at least as long as we are trying to apply Brown’s criterion. Hence if we have groups Gn whose finiteness lengths do not have a limit inferior of ∞, we would need an action on a different space to show that T (G∗ ) answers Question 5.1 affirmatively. Returning to the positive statement, we remark that inspecting the homotopy type of Ln (G∗ ) does not seem possible uniformly. Instead, in what follows we will focus on examples and in particular find some instances of Ln (G∗ ) being highly connected. In the case where the Gn are braid groups, these complexes were modeled by arc complexes in [BFM+ 14]. In Section 7 below, where the Gn are matrix groups, we will directly work with the combinatorial description. General tools that have turned out to be helpful will be collected in Sections 5.4 and 5.5. We can make one positive statement about finiteness properties without knowing much at all about G∗ . Before stating this as a lemma, we need to define the matching complex of Ln . This is a simplicial complex, denoted M(Ln ), whose simplices are matchings on Ln and with face relation given by passing to subgraphs. It is well-known and not hard to see that M(Ln ) is (⌊ n−2 3 ⌋ − 1)-connected. A precise description of the homotopy type is given in [Koz08, Proposition 11.16] where M(Ln ) arises as the independence complex Ind(Ln−1 ). Lemma 5.10 (Finite generation). Let G∗ be a family of groups equipped with a properly graded cloning system, with cloning maps κnk . Suppose that for n sufficiently large, all Gn are finitely generated and also are generated by the images of the cloning maps with codomain Gn . Then T (G∗ ) is finitely generated. Proof. By the above discussion, we need only show that the Ln (G∗ ) are connected, for large enough n. Suppose n is large enough that: (a) Gn is generated by images of cloning maps, and (b) n ≥ 5 so M(Ln ) is connected. We will show that every vertex can be connected by an edge path to the vertex [1, J1 ], where Ji denotes the spanning graph whose only edge connects the ith vertex to the (i + 1)st. So let [g, Γ] be a vertex of Ln (G∗ ) and write g = s1 · · · sr , where the si are generators coming from images of cloning maps si ∈ im(κki ) for some ki . Since M(Ln ) is connected, there is a path in Ln (G∗ ) from [s1 · · · sr , Γ] to [s1 · · · sr , Jkr ] = [s1 · · · sr−1 , ((sr )κ−1 kr ) · Jkr ]. Repeating this r times, we connect to [1, Jk ] for some k, and then to [1, J1 ].  5.4. Proving high connectivity. As we have seen, Morse theory is a tool that allows one to show that a pair (X, X0 ) is highly connected. We will eventually want to inductively apply this to the situation where X = Ln (G∗ ) and X0 = Ln−k (G∗ ) for some k ∈ N. This is insufficient to conclude that the connectivity tends to infinity though, because we would be trying to get X to be more highly connected than X0 . The following lemma expresses the degree of insufficiency. The lemma is straightforward to prove but can be seen as a roadmap for the argument that follows. Lemma 5.11. Let (X, X0 ) be a k-connected CW-pair. Assume that X0 is (k − 1)connected. Then X is k-connected if and only if πk (X0 → X) is trivial. Proof. Consider the part of the homotopy long exact sequence associated to (X, X0 ): ιj πj+1 (X, X0 ) → πj (X0 ) → πj (X) → πj (X, X0 ). 28 S. WITZEL AND M. C. B. ZAREMSKY For j < k the map ιj is an isomorphism and πj (X0 ) trivial. For j = k it is an epimorphism, so indeed πk (X) is trivial if and only if ιk is.  In our applications we will know X0 to be (k − 1)-connected by induction and (X, X0 ) will be seen to be k-connected using Morse theory. To show that πk (X0 → X) is trivial we will use a relative variant of the Hatcher flow for arc complexes that was shown to us by Andrew Putman (Proposition 5.13 below). Before we can prove it we need some technical preliminaries. A combinatorial k-sphere (respectively k-disk) is a simplicial complex that can be subdivided to be isomorphic to a subdivision of the boundary of a (k + 1)-simplex (respectively to a subdivision of a k-simplex). An m-dimensional combinatorial manifold is an m-dimensional simplicial complex in which the link of every simplex σ of dimension k is a combinatorial (m − k − 1)-sphere. In an m-dimensional combinatorial manifold with boundary the link of a k-simplex σ is allowed to be homeomorphic to a combinatorial (m − k − 1)-disk; its boundary consists of all the simplices whose link is indeed a disk. A simplicial map is called simplexwise injective if its restriction to any simplex is injective. The following is Lemma 3.8 of [BFM+ 14], cf. also the proof of Proposition 5.2 in [Put]. Lemma 5.12. Let Y be a k-dimensional combinatorial manifold. Let X be a simplicial complex and assume that the link of every d-simplex in X is (k − 2d − 2)-connected for d ≥ 0. Let ψ : Y → X be a simplicial map whose restriction to ∂Y is simplexwise injective. Upon changing the simplicial structure of Y , ψ is homotopic relative ∂Y to a simplexwise injective map. In practice Y will be a sphere, so the lemma allows us to restrict attention to simplexwise injective combinatorial maps when collapsing spheres. For the proposition, we need one more technical definition. Let X be a simplicial complex and w a vertex. We say that X is conical at w if for any simplex σ, as soon as every vertex of σ lies in the closed star st(w) then so does σ (that is, the star of w is the cone over the link of w). In particular, if X is a flag complex then it is conical at every vertex. Proposition 5.13. Let X0 ⊆ X1 ⊆ X be simplicial complexes. Assume that (X, X0 ) is k-connected, that X0 is (k−1)-connected and that the link of every d-simplex is (k−2d−2)connected for d ≥ 0. Further assume the following “exchange condition”: (EXC) There is a vertex w ∈ X at which X is conical, such that for every vertex v ∈ X0 that is not in stw there is a vertex v ′ ∈ stX1 w such that lkX1 v ⊆ lkX1 v ′ and lkX1 v is (k − 1)-connected. Then X is k-connected. Proof. Let ι : X0 → X denote the inclusion. In view of Lemma 5.11, all that needs to be shown is that if ϕ : S k → X0 is a map from a k-sphere then ϕ̄ := ι ◦ ϕ is homotopically trivial. By simplicial approximation [Spa66, Theorem 3.4.8] we may assume ϕ (and thus ϕ̄) to be a simplicial map Y → X0 and by our assumptions and Lemma 5.12 we may assume it to be simplexwise injective. Our goal is to homotope ϕ̄ to a map to stw. Once we have achieved that, we are done since stw is contractible. The simplicial sphere Y contains finitely many vertices x whose image v = ϕ̄(x) does not lie in stw. Pick one and define ϕ̄′ : Y → X to be the map that coincides with ϕ̄ outside the open star of x and takes x to the vertex v ′ from the statement. We claim that ϕ̄ is homotopic to ϕ̄′ . Inductively replacing vertices then finishes the proof, since X is conical at w. It remains to show that ϕ̄|stx and ϕ̄′ |stx are homotopic relative to lk x. Note that ϕ̄(lk x) ⊆ lk v by simplexwise injectivity. Furthermore the complex spanned by v, v ′ and lk v is the THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 29 suspension Σ(lk v) of lk v (unless v and v ′ are adjacent in which case there is nothing to show). So both ϕ̄|stx and ϕ̄′ |stx are maps (D k , S k−1 ) ∼ = (stx, lk x) → (Σ(lk v), lk v). But lk v is (k − 1)-connected by assumption so (Σ(lk v), lk v) is k-connected and both maps are homotopic.  5.5. Proving negative finiteness properties. We have already seen that if the G∗ are not eventually of type Fn , then Brown’s criterion applied to the Stein–Farley complex cannot be used to show that T (G∗ ) is not of type Fn . In Section 8.2, when the Gn are matrix groups, we will instead use a different action, together with the following result. It is formulated in terms of the homological finiteness properties FPn . The relationship is explained for example in [Geo08, Chapter 8], but we mostly just need to know the fact that a group of type Fn is also of type FPn . Note that for Λ = Γ the following theorem is essentially one half of Brown’s criterion. Theorem 5.14. Let Λ be a group and let Γ be a subgroup. Let Y be a CW complex on which Λ acts. Assume that Y is (n − 1)-acyclic and that the stabilizer of every p-cell in Y (in Λ as well as in Γ) is of type FPn−p . Let Z be a Γ-cocompact subspace of Y . Let (Yα )α∈I be a Λ-cocompact filtration of Y . Assume that there is no α with Z ⊆ Yα such that the map H̃n−1 (Z ֒→ Yα ) is trivial. Then no group ∆ through which the inclusion Γ ֒→ Λ factors is of type FPn . The application is similar in spirit to that of [KM97], where a morphism Γ → Λ is constructed that cannot factor through a finitely presented group. The proof should be compared to [Bro87, Theorem 2.2]. Proof. For n = 1 suppose that Γ is contained in a finitely generated subgroup hSi of Λ. Let K be a compact subspace such that Γ.K = Z. Since Y is connected, we can add finitely many edges to K and take Z to be its Γ-orbit, so without loss of generality K is connected. For every s ∈ S we may pick an edge path ps that connects K to s.K. Let S P := {ps | s ∈ S}. Now any two points in Z can be connected in Γ.(K ∪ P ). In other words, the map H̃0 (Z → Γ.(K ∪ P )) is trivial. But K ∪ P and thus Γ.(K ∪ P ) is contained in some Yα , contradicting the assumption. From now on Q we assume that n >Q1. Our goal is to find an index set J such that the map Hn−1 (Γ, J ZΓ) → Hn−1 (Λ, J ZΛ) is non-trivial. The result then follows from the Bieri–Eckmann criterion [BE74, Proposition 1.2], because if this map factors through Q Hn−1 (∆, J Z∆) then the latter module cannot be zero. Note that Z is contained in a subfiltration of (Yα )α so we may assume without loss of generality that Z is contained in all Yα , α ∈ I. Let J be a cofinal set in I (for instance all of I) and for α ∈ J let cα ∈ Hn−1 (Z) be such that the image in Hn−1 (Yα ) is non-trivial. By the arguments in the proof of [Bro87, 30 S. WITZEL AND M. C. B. ZAREMSKY Theorem 2.2] we have the isomorphisms in the diagram Y Y ✲ Hn−1 (Λ, Hn−1 (Γ, ZΓ) ZΛ) J J ✻ ∼ = ✻ ∼ = Γ Hn−1 (Y, Y ZΓ) ✲ H Λ (Y, n−1 ✻ Y J ∼ = Y ZΛ) J J Γ Hn−1 (Z, Y ✻ ∼ = Λ ZΓ) ✲ lim Hn−1 (Yα , −→ ❄ Hn−1 (Z) ∼ = Y ZΛ) J Y ❄ ✲ lim Hn−1 (Yα ). −→ J J (Essentially the two vertical arrows at the top are isomorphisms because Y is (n − 1)acyclic and the two vertical arrows at the bottom are isomorphisms by cocompactness of the actions and the assumptions on the finiteness properties Q of the stabilizers.) Assuming that Q the diagram commutes, the chain (cα )α∈J ∈ J Hn−1 (Z) has non-trivial image in lim J Hn−1 (Yα ) and we are done. −→ The rest of the proof will be concerned with the commutativity of the diagram. The only square whose commutativity is not clear is the bottom one. In what follows, all products are taken over J which we suppress from notation. Let C∗ , C∗α , and D∗ be the cellular chain complexes of Y , Yα , and Z (respectively). Let P∗ → Z be a resolution by projective ZΛ-modules (which are also projective ZΓQ modules). The third horizontal map is induced by the maps P ⊗ (D ⊗ ZΓ) → q Γ pQ Q Q Pq ⊗Λ (Cpα ⊗ ZΛ). (Or equivalently (Pq ⊗ Dp ) ⊗Γ ZΓ → (Pq ⊗ Cpα ) ⊗Λ ZΛ), which is the same since the tensor product is associative and, using the notation from [Bro82, p. 55], also commutative.) The bottom horizontal map is just induced by D∗ → C∗α . The lower vertical maps come from spectral sequences Y Y 1 Γ Epq = TorΓq (Dp , ZΓ) ⇒ Hp+q (Z, ZΓ) and (5.1) Y Y α Λ 1 (Yα , ZΛ). (5.2) = TorΛ ZΛ) ⇒ Hp+q Epq q (Cp , The finiteness and cocompactness assumptions guarantee that Dp is of type FPn−p over Q ZΓ and Cpα is of type FPn−p over ZΛ so that the natural maps TorΓq (Dp , ZΓ) → Q Q Q α α TorΓq (Dp , ZΓ) and TorΛ ZΛ) → TorΛ q (Cp , q (Cp , ZΛ) are isomorphisms and the spectral sequences collapse on the second page. We have the commutative diagram of chain complexes Y Y α ZΛ) TorΓ0 (D∗ , ZΓ) ✲ TorΛ 0 (C∗ , ∼ = Y ∼ = ❄ ❄ Y Y Y Λ Γ ✲ Tor0 (C∗α , ZΛ)= C∗α D∗ = Tor0 (D∗ , ZΓ) THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 31 and taking homology in degree n − 1 gives the commutative diagram Y Y Λ Γ (Yα , ZΛ) Hn−1 (Z, ZΓ) ✲ Hn−1 ∼ = that we were looking for. Y ∼ = ❄ Hn−1 (Z) ✲ Y ❄ Hn−1 (Yα )  6. A Thompson group for direct products of a group The examples in this section were constructed independently by Slobodan Tanusevski in his PhD thesis [Tan14], using entirely different techniques, and in discussions with him we have determined that his groups are identical to those discussed here. Fix a group G. Let Gn be the direct power Gn . We declare that ρn is trivial for all n, and define cloning maps via (g1 , . . . , gk , . . . , gn )κnk := (g1 , . . . , gk , gk , . . . , gn ). This makes rather literal the word “cloning.” To verify that this defines a cloning system, observe that since the ρn are trivial, we need only check that the cloning maps are homomorphisms (which they are) and that κnℓ ◦ κn+1 = κnk ◦ κn+1 k ℓ+1 for 1 ≤ k < ℓ ≤ n (which is visibly true). These respectively handle conditions (FCS1) and (FCS2) of Definition 2.18, and condition (FCS3) is trivial. Lastly, the cloning system is visibly properly graded. It turns out that this cloning system is an example answering Question 5.1 positively, that is, the finiteness length of T (G∗ ) is exactly that of G (notationally, the asterisk is a superscript now because we are considering the family of direct powers (Gn )n∈N ). The proof is due to Tanusevski and we sketch a version of it here, using our setup and language. For the positive finiteness properties, we just need that the complexes Ln (G∗ ) become increasingly highly connected. This follows by noting that every simplex fiber of the projection Ln (G∗ ) → M(Ln ) is the join of its vertex fibers, and applying [Qui78, Theorem 9.1]. For the negative finiteness properties, we claim that there is a sequence of homomorphisms G → T (G∗ ) → G that composes to the identity. This is sufficient by the Bieri–Eckmann criterion [BE74, Proposition 1.2]; see [Bux04, Proposition 4.1]. The first map in the claim is g 7→ [1, g, 1], and the second is [T− , (g1 , . . . , gn ), T+ ] 7→ g1 . One must check that this second map is well defined on equivalence classes under reduction and expansion, and is a homomorphism, but this is not hard to see. A variation of these groups was recently studied using cloning systems, by Berns-Zieve, Fry, Gillings, and Mathews [BZFGM14]. With the above setup, they consider cloning maps of the form (g1 , . . . , gk , . . . , gn )κnk := (g1 , . . . , gk , φ(gk ), . . . , gn ) where φ ∈ Aut(G). They prove that for G finite, the resulting Thompson group is coCF . If these groups turn out to not embed into V , which seems believable when φ 6= id, then they would be counterexamples to the conjecture that V is universal coCF . 7. Thompson groups for matrix groups Let R be a unital ring and consider the algebra of n-by-n matrices Mn (R). We will define a family of injective functions Mn (R) → Mn+1 (R), which will become cloning maps after we restrict to the subgroups of upper triangular matrices Bn (R). Consider the map κk defined by     A<,< A<,k A<,k A<,> A<,< A<,k A<,>  0 0    Ak,< Ak,k Ak,>  κk =  Ak,< Ak,k  0 0 Ak,k Ak,>  A>,< A>,k A>,> A>,< A>,k A>,k A>,> 32 S. WITZEL AND M. C. B. ZAREMSKY where the matrix has a block structure under which the middle column and row are the kth column and row of the full matrix respectively. Given the block structure it is not hard to see that κk is a morphism of monoids, but it generally fails to map invertible elements to invertible elements. We therefore restrict to the groups Bn (R) of invertible upper triangular matrices. Let B∞ (R) = lim Bn (R). −→ Lemma 7.1. The trivial morphisms ρn and the maps κnk defined above describe a properly graded cloning system on B∗ (R). It may be noted that the action of F on B∞ (R) factors through H , that is κℓ κk = κk κℓ+1 even for ℓ = k. Proof. Since ρ∗ is trivial, condition (FCS1) asks that the cloning maps be group homomorphisms. That κk is multiplicative and takes 1 to 1 is straightforward to check. Also, A is invertible if and only if all the Ai,i are units, in which case (A)κk is also invertible. To check condition (FCS2) it is helpful to note that for any A ∈ Mn (R), ((A)κk )i,j = Aπk (i),πk (j) unless i = k or i > j (here πk is as in Example 2.9). One can now distinguish cases similar to Example 2.9. The compatibility condition (FCS3) is vacuous for trivial ρ∗ . To see that the cloning system is properly graded note that g ∈ im ιn,n+1 if and only if the last column of g is the vector en+1 . If at the same time g = (h)κk then by the definition of κk the last column of h has to be en . Hence h ∈ im ιn−1,n .  Having equipped B∗ (R) with a cloning system, we get a generalized Thompson group T (B∗ (R)). Elements are represented by triples (T− , A, T+ ) for trees T± with n leaves and matrices A ∈ Bn (R), up to reduction and expansion. Figure 6 gives an example of an element of T (B∗ (R)), represented as a triple and an expansion of that triple. "   1 2 3 0 4 5 , 0 0 6 , # = "  1 0  , 0 0 2 4 0 0 2 0 4 0  3 0  5, 6 # Figure 6. An example of expansion in T (B∗ (Q)). We are interested in finiteness properties of T (B∗ (R)) because of the following examples where the groups B∗ (R) themselves have interesting finiteness properties, see [Bux04, Theorem A, Remarks 3.6, 3.7]. Theorem 7.2. Let k be a global function field, let S be a finite nonempty set of places and OS the ring of S-integers. Then Bn (OS ) is of type F|S|−1 but not of type F|S| for any n ≥ 2. For instance, when R = Fp [t, t−1 ] then Bn (Fp [t, t−1 ]) is finitely generated but not finitely presented, for n ≥ 2. What is particularly interesting about Theorem 7.2 is that the finiteness properties of Bn (OS ) depend on |S| but not on n. A class of examples where the finiteness properties do depend on n arises as subgroups of groups of the form Bn (R). Let Ab n ≤ Bn+1 be the group of invertible upper triangular n + 1-by-n + 1 matrices whose upper left and lower right entries are 1. The groups Ab n (Z[1/p]) were studied by Abels and others and we call them the Abels groups. Their finiteness length tends to infinity with n [AB87, Bro87]: Theorem 7.3. For any prime p the group Ab n (Z[1/p]) is of type Fn−1 but not of type Fn for n ≥ 1. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 33 For any ring R, the cloning system described above for Bn (R) preserves the Abels groups Ab n−1 (R). By restriction we obtain a generalized Thompson group T (Ab ∗−1 (R)) which we will just denote by T (Ab ∗ (R)). 8. Finiteness properties of Thompson groups for matrix groups We will prove below that the finiteness length of T (B∗ (OS )) is the same as that of all the Bn (OS ). For consistency, we can state this as φ(T (B∗ (OS ))) = lim inf φ(Bn (OS )). n The inequality ≥, i.e., that T (B∗ (OS )) is of type F|S|−1 , is proved in Section 8.1, and follows the general strategy outlined in Sections 4 and 5. In fact, it applies to arbitrary rings. To show the inequality ≤, i.e., that T (B∗ (OS )) is not of type FP|S| , we develop some new tools in Section 8.2, and make use of the criterion established in Theorem 5.14. The proof showing the inequality ≥ above also applies to T (Ab ∗ (R)). Since the right hand side is infinite this time, this directly gives the full equation φ(T (Ab ∗ (Z[1/p]))) = lim inf φ(Ab n (Z[1/p])). n 8.1. Positive finiteness properties. The first main result of this section is that the group T (B∗ (R)) has all the finiteness properties that the individual groups B∗ (R) eventually have: Theorem 8.1. φ(T (B∗ (R))) ≥ lim inf (φ(Bn (R))). n In particular, together with Theorem 7.2 this implies: Corollary 8.2. T (B∗ (OS )) is of type F|S|−1 . In view of Proposition 5.9, to prove Theorem 8.1 it suffices to show that the connectivity of Ln (B∗ (R)) goes to infinity with n. In fact, we will induct, so we need to consider a slightly larger class of complexes. For a spanning subgraph ∆ of the linear graph Ln , define Ln (B∗ (R); ∆) to be the subcomplex of Ln (B∗ (R)) whose elements only use graphs that are subgraphs of ∆. Define e(∆) to be the number of edges of ∆. Define η(m):=⌊ m−1 4 ⌋. Taking ∆ = Ln , Theorem 8.1 will follow from: Proposition 8.3. Ln (B∗ (R); ∆) is (η(e(∆)) − 1)-connected. The base case is that Ln (B∗ (R); ∆) is non-empty provided e(∆) ≥ 1, which is clearly true. We need to do a bit of preparation before we can prove the proposition. To work with simplices of Ln (B∗ (R)) it will be helpful to have simple representatives for dangling classes. To define them we have to recall some of the origins of Ln (B∗ (R)): by Observation 5.6 matchings Γ of Ln correspond to elementary forests. Using this correspondence, it makes sense to denote the corresponding cloning map by κΓ . In fact, since our cloning maps factor through the hedge monoid, we even get a cloning map κΓ for any spanning subgraph Γ of Ln using Observation 5.7. For the sake of readability, we describe this map explicitly. Let Dk (λ) be the k-by-k matrix with all diagonal entries λ and all other entries 0. Let Fk,ℓ (λ) be the k-by-ℓ matrix whose bottom row has all entries λ and all other entries are 0 and let Ck,ℓ (λ) be defined analogously for the top row. Assume that Γ has m connected components which we think of as numbered from left to right. Then κΓ : Mm (R) → Mn (R) can be described as follows. The image κΓ (A) has a block structure where columns and rows are grouped together if their indices lie in a common component of Γ. More precisely, 34 S. WITZEL AND M. C. B. ZAREMSKY the (i, j)-block has k rows and ℓ columns if the ith (respectively jth) component of Γ has k (respectively ℓ) vertices. The block is Dk (Ai,i ), Fk,ℓ (Ai,j ) or Ck,ℓ (Ai,j ) depending on whether i = j, i < j, or i > j (see Figure 7).     a1,1 a1,2 a1,3 D2 (a1,1 ) F2,4 (a1,2 ) F2,3 (a1,3 ) κΓ  a2,1 a2,2 a2,3  7→  C4,2 (a2,1 ) D4 (a2,2 ) F4,3 (a2,3 )  a3,1 a3,2 a3,3 C3,2 (a3,1 ) C3,4 (a3,2 ) D3 (a3,3 )  a1,1  a1,1 a1,2 a1,2 a1,2 a1,2 a1,3 a1,3 a1,3   a a  2,1 2,1 a2,2  a2,2   a2,2   a2,2 a2,3 a2,3 a2,3   a a a a a a  3,1 3,1 3,2 3,2 3,2 3,2 a3,3  a3,3 a3,3 =               Figure 7. Visualization of the cloning map of a graph. The graph Γ is drawn on top and to the left of the last matrix. Recall that we denote by ek the kth edge of Ln . We denote by Jk the matching of Ln whose only edge is ek (as we did in Lemma 5.10). For a spanning subgraph Γ of Ln we say that an index i is fragile if ei ∈ Γ and we say that i is stable otherwise. In other words, i is stable if it is the rightmost vertex of its component in Γ. A matrix A ∈ Mn (R) is said to be modeled on Γ if Ai,j = 0 whenever both i and j are stable in Γ (see Figure 8).               ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ 0 ∗ ∗ ∗ 0 ∗ ∗ 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ 0 ∗ ∗ ∗ 0 ∗ ∗ 0 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ 0 ∗ ∗ ∗ 0 ∗ ∗ 0                ∗ ∗ ∗ ∗  1 ∗ ∗   ∗ ∗   ∗         ∗ ∗ ∗ ∗ ∗ ∗ 0 ∗ ∗ ∗ 1 ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ ∗ 0 ∗ ∗ ∗ 0 ∗ ∗ 1               Figure 8. A matrix that is modeled on a graph (left) and an upper triangular matrix that is reduced relative to a graph (right). Lemma 8.4. Let Γ be a spanning subgraph of Ln with m components and let A ∈ Bn (R). There is a representative B in the coset A(Bm (R))κΓ such that B − In is modeled on Γ. Moreover, rows of zeroes in A (off the diagonal) can be preserved in B. Proof. We inductively multiply A on the right by matrices in (Bm (R))κΓ to eventually obtain B. Let Ei,j (λ) denote the matrix that coincides with the identity matrix in all entries but (i, j) and is λ there. We begin by clearing the diagonal. Let i be the (stable) rightmost vertex of the kth component of Γ and let λ = A−1 i,i . Then A(Ek,k (λ))κΓ has (i, i)-entry one and no other diagonal entry with stable indices was affected. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 35 Now we clear the region above the diagonal. We proceed inductively by rows and columns. Let (i, j) be the (lexicographically) minimal pair of stable indices of Γ such that 0 6= Ai,j =:−λ. Let i and j lie in the kth respectively ℓth component of Γ. Then A(Ek,ℓ (λ))κm has (i, j)-entry zero and no other entry with stable indices was affected. For the last statement assume that the ith row of A was zero off the diagonal. Then none of the matrices by which we multiplied had a nonzero off-diagonal entry in the ith row. If i is fragile no such matrix even lies in (Bm (R))κΓ . If i is stable then the only matrices we might have used of this form were meant to clear the ith row, but since the entries there were zero, nothing happened in these steps.  Corollary 8.5 (Reduced form). Every simplex in Ln (B∗ (R)) has a representative (A, Γ) such that the matrix A − In is modeled on Γ.  We will refer to a matrix A ∈ Bn (R) as being reduced relative Γ if it satisfies the conclusion of Corollary 8.5. The next sequence of lemmas is a gradual checking of the hypotheses of Proposition 5.13, still in the context of an induction proof, ultimately leading to a proof of Proposition 8.3. Lemma 8.6 (Flag complex). Ln (B∗ (R); ∆) is a flag complex. Proof. We need to show that any collection of vertices {v1 , . . . , vr } that are pairwise connected by edges spans a simplex. We induct on r (with the trivial base case of r ≤ 2). Each vertex vi in our collection is of the form [Ai , Jki ] for Jki some single-edge subgraphs of ∆. Assume without loss of generality that k1 < ki for all 1 < i ≤ r, so v1 is the vertex whose lone merge occurs farthest to the left among all the vi . By induction, v2 , . . . , vr span a simplex, σ. Thanks to the action of Bn (R), without loss of generality v1 is the vertex [In , Jk ], where we have set k := k1 for brevity. Represent σ = [A, Γ] with A reduced relative to Γ. Since k is less than the index of any edge of Γ, we know that the kth column of A − In is all zeros. Since v1 shares an edge with every vertex of σ, we know that in fact k is even less than the index of any edge of Γ, minus one. Hence the (k + 1)st column of A − In is similarly all zeros. Our goal is to show that A ∈ im κk , since then σ and v1 will share a simplex. Thanks to the setup, it suffices to show that the kth row of A − In is all zeros. Since A is reduced relative Γ, non-zero entries of A − In may only possibly occur in columns indexed by k2 , . . . , kr . For each vertex [A, Jki ], 2 ≤ i ≤ r, of σ, let Ai be such that [Ai , Jki ] = [A, Jki ] and Ai is reduced relative Jki . Let ℓ ∈ {k2 , . . . , kr }. Observe that Aℓ is obtained from A by right multiplication by an element D of im(κℓ ). For 1 ≤ i ≤ n denote by M(i,∗) the ith row of an n-by-n matrix M , and by M(∗,i) the ith column. When we multiply by D to get AD = Aℓ , the (k, ℓ)-entry of Aℓ is A(k,∗) D(∗,ℓ) and the (k, ℓ + 1)-entry is A(k,∗) D(∗,ℓ+1) . Since Aℓ is reduced relative Jℓ , we know that its (k, ℓ + 1)-entry must be 0. Also since D ∈ im(κJℓ ), we have D(∗,ℓ) = D(∗,ℓ+1) + d(eℓ − eℓ+1 ) for some d ∈ R× . Let a denote the (k, ℓ)-entry of A, and note that the (k, ℓ + 1)-entry of A is 0. We calculate that the (k, ℓ)-entry of Aℓ is A(k,∗) D(∗,ℓ) = A(k,∗) (D(∗,ℓ+1) + d(eℓ − eℓ+1 )) = A(k,∗) (d(eℓ − eℓ+1 )) = da. Since d is a unit, this shows that the (k, ℓ)-entry of Aℓ is zero if and only if the (k, ℓ)entry of A is zero. By the same argument just given, this statement remains true with Aℓ replaced by Aℓ D for any D ∈ im(κℓ ). But by assumption v1 shares an edge with vℓ , and so some such Aℓ D must have (k, ℓ)-entry zero. We conclude that A has (k, ℓ)-entry zero. Since ℓ was arbitrary, the kth row of A − In is all zeros and so v1 and σ share a simplex.  36 S. WITZEL AND M. C. B. ZAREMSKY Let ∆0 := ∆ \ {e1 ∪ e2 }, and consider Ln (B∗ (R); ∆0 ) as a subcomplex of Ln (B∗ (R); ∆). For a vertex [A, Jk ] ∈ Ln (B∗ (R); ∆0 ) we write lk0 ([A, Jk ]) for the link in Ln (B∗ (R); ∆0 ), to differentiate from the link in Ln (B∗ (R); ∆) which is just denoted lk([A, Jk ]). To prove Proposition 8.3 we follow the strategy outlined by Proposition 5.13: we want to show that Ln (B∗ (R); ∆0 ) is (η(e(∆)) − 2)-connected, that (Ln (B∗ (R); ∆), Ln (B∗ (R); ∆0 )) is (η(e(∆))−1)-connected and that there is a vertex satisfying condition (EXC). That vertex is w := [In , J1 ] in our case. The following statements (up to the proof of Proposition 8.3) are part of an induction, so we assume that Proposition 8.3 has been proven for graphs ∆′ with e(∆′ ) < e(∆) and intend to prove it for ∆. Lemma 8.7 (Links are lower rank complexes). Let σ be a simplex of dimension d ≥ 0 in Ln (B∗ (R); ∆). Then lk(σ) is isomorphic to a complex of the form Ln−(d+1) (B∗ (R); ∆′ ) where ∆′ is a spanning subgraph of Ln−(d+1) with at least e(∆)−3d−3 edges. In particular, it is (η(e(∆) − 3d − 3) − 1)-connected by induction. Proof. The simplex σ is of the form [g, Γ] with g ∈ Bn (R) and Γ ⊆ ∆. If it has dimension d then Γ has d + 1 edges, say ei1 , . . . , eid+1 . Using the left action of Bn (R) we may assume that g = 1. Then lk(σ) is Ln ((B∗ (R))κΓ ; ∆♯ ), where ∆♯ is ∆ with the edges eij −1 , eij , eij +1 removed for each 1 ≤ j ≤ d + 1. In particular ∆♯ has at least e(∆) − 3d − 3 edges. Now consider the map bΓ : Ln → Ln−(d+1) given by blowing down the edges of Γ. The image of ∆♯ under bΓ is what we will call ∆′ . Note that ∆′ still has at least e(∆) − 3d − 3 edges. ♯ Since κΓ is injective, we may now apply κ−1 Γ paired with bΓ to Ln ((B∗ (R))κΓ ; ∆ ) and ′ get an isomorphism to Ln−(d+1) (B∗ (R); ∆ ).  Lemma 8.8. The pair (Ln (B∗ (R); ∆), Ln (B∗ (R); ∆0 )) is (η(e(∆)) − 1)-connected. Proof. Note that for any vertex of Ln (B∗ (R); ∆) \ Ln (B∗ (R); ∆0 ), the entire link of the vertex lies in Ln (B∗ (R); ∆0 ). Hence the function sending vertices of the former to 1 and vertices of the latter to 0 yields a Morse function in the sense of Section 5, and to prove the statement we need only show that links of vertices in Ln (B∗ (R); ∆) \ Ln (B∗ (R); ∆0 ) are (η(e(∆)) − 2)-connected. By Lemma 8.7, each descending link is isomorphic to a complex of the form Ln−1 (B∗ (R); ∆′ ) for ∆′ a graph with at least e(∆) − 3 edges. By induction, these are (η(e(∆)) − 2)-connected as desired.  In addition to the subcomplex Ln (B∗ (R); ∆0 ) we will now need to consider Ln (B∗ (R); ∆1 ) where ∆1 := ∆ \ {e1 }. We will write links in this complex using the symbol lk1 . Lemma 8.9 (Shared links). Let k > 2 and let A be reduced relative Jk . Let A′ be obtained from A by setting the (1, k)-entry to 0. Then lk1 ([A, Jk ]) ⊆ lk1 ([A′ , Jk ]) and [A′ , Jk ] ∈ lk w. Proof. As a first observation, note that since A is reduced relative Jk and k > 2, the (1, 1)-entry and (2, 2)-entry of A are both 1, and the entries of the top row of A past the first entry is all 0’s except possibly in the kth column. Let −λ be the (1, k)-entry of A, and note that A′ = AE1k (λ). The first row of A′ is now (1, 0, . . . , 0) and the (2, 2)-entry is 1, which tells us that A′ ∈ (Bn−1 (R))κ1 . Hence [A′ , Jk ] ∈ lk0 w. To see that lk1 ([A, Jk ]) ⊆ lk1 ([A′ , Jk ]) we first multiply by A−1 from the left and are reduced to showing that lk1 ([In , Jk ]) ⊆ lk1 ([E1k (λ), Jk ]). An arbitrary simplex of lk1 ([In , Jk ]) is of the form [B, Γ], with B ∈ im(κk ) and Γ not containing any of e1 , ek−1 , ek , or ek+1 . Note that the kth row of B is zero off the diagonal. By Lemma 8.4 there is a B ′ ∈ B im(κΓ ) that is reduced relative Γ and has kth row zero off the diagonal. We have [B ′ , Γ] = [B, Γ]. Since e1 6∈ Γ and B ′ is reduced relative Γ, the first column of B ′ is e1 . We now claim that B ′ commutes with E1k (λ). Indeed, left multiplication by E1k (λ) is the row operation r1 7→ r1 + λrk , and right multiplication by E1k (λ) is the column operation THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 37 ck 7→ ck + λc1 . For our B ′ , both of these operations change the (1, k)-entry by adding λ to it, and change no other entries. This proves the claim. Now we have [B, Γ] = [B ′ , Γ] = [E1k (λ)B ′ E1k (−λ), Γ] = [E1k (λ)B ′ , Γ] = [E1k (λ)B, Γ]. The second to last step works since E1k (−λ) ∈ im(κΓ ) by virtue of ek−1 , ek 6∈ Γ. This shows that our arbitrary simplex of lk1 ([In , Jk ]) is also in lk1 ([E1k (λ), Jk ]).  Proof of Proposition 8.3. We want to apply Proposition 5.13. The complexes are X = Ln (B∗ (R); ∆), X1 = Ln (B∗ (R); ∆1 ) and X0 = Ln (B∗ (R); ∆0 ), and k = η(e(∆)) − 1. We check the assumptions. The pair (Ln (B∗ (R); ∆), Ln (B∗ (R); ∆0 )) is k-connected by Lemma 8.8. Since X is a flag complex (Lemma 8.6), it is conical at every vertex, in particular at our vertex w = [In , J1 ]. The complex Ln (B∗ (R); ∆0 ) is (η(e(∆0 )) − 1)connected by induction. This is sufficient because η(e(∆0 )) − 1 ≥ η(e(∆) − 2) − 1 ≥ η(e(∆)) − 2 = k − 1. The link of a d-simplex is (η(e(∆) − 3d − 3) − 1)-connected by Lemma 8.7. This is sufficient because η(e(∆) − 3d − 3) − 1 ≥ η(e(∆)) − d − 2 = k − d − 1. Finally condition (EXC) is satisfied by Lemma 8.9 where lk1 ([A, Jk ]) is at least (η(e(∆) − 4) − 1)-connected and η(e(∆) − 4) − 1 = η(e(∆)) − 2 = k − 1 as desired.  Shifting focus to the Abels groups, thanks to the flexibility of Lemma 8.4, the above arguments also show high connectivity of Ln (Ab ∗ (Z[1/p])), and using Proposition 5.9 and Theorem 7.3 we conclude: Theorem 8.10. T (Ab ∗ (Z[1/p])) is of type F∞ . This, despite none of the Ab n (Z[1/p]) individually being F∞ . The remaining question is whether φ(T (B∗ (R))) = lim inf n (φ(Bn (R))), that is whether negative finiteness properties of the Bn (R) can impose negative finiteness properties on T (B∗ (R)). For R the ring of S-integers of a global function field, we will answer this question affirmatively in the next section. Before we do that, we need to treat one more relative of the family Bn (R): Let Bn2 be the normal subgroup of Bn consisting of matrices that differ from the identity only from the second off-diagonal on (the second term of the lower central series), and let B̄n := Bn /Bn2 be the quotient group. Set ν(n) = ⌊ n−2 3 ⌋. One could check that the above proof for B∗ goes through for the family B̄∗ as well, but instead we will prove directly: Proposition 8.11. The descending link Ln (B̄∗ (R)) is (ν(n)−1)-connected. Thus φ(T (B̄∗ (R))) ≥ lim inf φ(B̄∗ (R)). n Proof. Using reductions as in Lemma 8.4 one can see the following: every simplex in Ln (B̄∗ (R)) has a representative [A, Γ] where the matrix A has a diagonal block of the form   ∗ ∗ 1 above every edge of Γ and otherwise equals the identity matrix (here the representative is modulo dangling as well as modulo Bn2 (R)). What makes this case particularly easy is that this representative is unique. That is, we may think of Ln (B̄∗ (R)) as consisting of pairs (A, Γ) where A is as above and the face relation is given by removing an edge of Γ and turning the diagonal block above it into an identity block. Let sLn denote the linear graph with vertices {1, . . . , n} and with every pair of adjacent vertices i and i + 1 connected by s distinct edges. By what we just said, Ln (B̄∗ (R)) is isomorphic to the matching complex M(sLn ) where s = |R∗ × R|. There is an obvious map M(sLn ) → M(Ln ). The fiber of this map over a k-simplex is a (k + 1)-fold join of s-element sets, thus k-spherical. Moreover M(Ln ) is (ν(n) − 1)-connected by [Koz08, 38 S. WITZEL AND M. C. B. ZAREMSKY Proposition 11.16] (and links in M(Ln ) are highly connected as well, being joins of lowerrank copies of the complex). Thus we can apply [Qui78, Theorem 9.1] to conclude that M(sLn ) is (ν(n) − 1)-connected.  As a remark, this simple approach for B̄∗ (R) would not have worked for B∗ (R), since the analogous fibers are not joins of vertex fibers. 8.2. Negative finiteness properties. In the last section we saw that for any R, the generalized Thompson group T (B∗ (R)) is of type Fn if all but finitely many Bk (R) are. In this section we prove the converse in the case we are most interested in (cf. [Bux04]): Let k be a global function field and let S be a non-empty set of places. Denote by OS the ring of S-integers in k. Theorem 8.12. The group T (B∗ (OS )) not of type FP|S| . Remark 8.13. Unlike the positive statement from the previous section, for the proof of Theorem 8.28 we cannot just use the results from [Bux04] but have to use parts of the proof. By using the more substantial parts of the proof, it is quite possible that the setup of this section could be used to prove the positive finiteness properties as well, but we will not do so. We will actually prove first that T (B̄∗ (OS )) is not of type FP|S| . We then use the result from Section 5.5 to deduce Theorem 8.28. Instead of the Stein–Farley complex on which T (B̄∗ (OS )) acts with stabilizers isomorphic to the B̄∗ (OS ) we will construct a new space Y for which the stabilizers are themselves generalized Thompson groups of smaller cloning systems. In particular the stabilizers on Y will have good finiteness properties and the negative finiteness properties of the B̄∗ (OS ) are reflected in bad connectivity properties. For any place s ∈ S denote by ks the completion of k at s, and by Os the ring of integers of ks . As before we let Bn be the linear algebraic group of invertible upper triangular n-by-n matrices, let Bn2 be the normal subgroup of matrices that differ from the identity only from the second off-diagonal on, and let B̄n := Bn /Bn2 be the quotient group. Let Zn ≤ Bn be the group of homotheties, i.e., scalar multiples of the identity matrix, and let PB 2 = B2 /Z2 . All of this is relevant to us for the following reason: For any of the local fields ks the group PGL2 (ks ) admits a Bruhat–Tits tree Vs on which it acts properly. Since OS is discrete as Q a subset of s∈S ks when embedded diagonally, we get a properly discontinuous action of PGL2 (OS ) on Y Vs . V := s∈S Our goal is to use this action to understand finiteness properties of T (B̄∗ (OS )). Note that the group PGL2 (Os ) is the stabilizer of a vertex in Vs , call it zs . Define z := (zs )s∈S , so z is a vertex in V . Denote the quotient morphism from Bn to B̄n by ¯: Bn → B̄n , g 7→ ḡ. For 1 ≤ i ≤ n − 1 let πi denote the homomorphism B̄n → PB 2 , [A] 7→ [Ai ] where Ai is the ith diagonal 2-by-2 block of A. For brevity we denote the composition πi ◦ ¯ by π̄i . Now for any i, 1 ≤ i ≤ n − 1 consider the composition Q Y πi (ks ) Y B̄n (ks ) → PB 2 (ks ) αi : B̄n (OS ) → s∈S s∈S where the first morphism is induced by the diagonal inclusion OS → ! \ Y −1 Kn := αi PB 2 (Os ) . 1≤i≤n−1 s∈S Q s∈S ks . Define THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 39 Lemma 8.14. The group Kn is of type F∞ . Remark 8.15. The importance of the Lemma lies in the fact that the groups Kn will appear in stabilizers of an action of T (B̄∗ (OS )). It is worth noting that the statement does not remain true if B̄n (OS ) is replaced by Bn (OS ) so that the strategy does not immediately carry over to T (B∗ (OS )). Instead we will have to apply Theorem 5.14 in the end to conclude that T (B∗ (OS )) is not of type FP|S| . Proof of Lemma 8.14. We first study the map πi (ks ) : B̄n (ks ) → PB 2 (ks ). The kernel Ni (ks ) is determined by the conditions that the (i, i + 1)-entry of a matrix is 0 and that the (i, i) and the (i + 1, i + 1)-entry coincide. The inverse image of PB 2 (Os ) under πi (ks ) is by Ni (ks ) and a copy of B2 (Os ). Intersecting over all i, we find that T thus generated −1 i πi (ks ) (PB 2 (Os )) = Zn (ks )B̄n (Os ). The intersection of this group with B̄n (OS ) is Zn (OS )B̄n (OS\{s} ). Intersecting over all s ∈ S we find that Kn = Zn (OS )B̄n (ℓ) where ℓ := O∅ is the coefficient field of k, which is finite. In particular B̄n (ℓ) is finite and of type F∞ . By the Dirichlet Unit Theorem, as extended to S-units by Hasse and Chevalley, Zn (OS ) is finitely generated abelian and so of type F∞ . Since Kn is a central product of these groups, this finishes the proof.  Now consider the action of B̄n (OS ) on V n−1 via the maps αi . Corollary 8.16. The stabilizers for the action of B̄n (OS ) on V n−1 are all of type F∞ . Proof. The group Kn is precisely the stabilizer of (z, . . . , z) ∈ V n−1 . Since the product of trees V n−1 is locally finite and the action is proper, every stabilizer is commensurable to Kn and therefore of type F∞ as well.  We are about to define a space Y for T (B̄∗ (OS )) to act on. The advantage over the Stein–Farley complex will be that the stabilizers have better finiteness properties. Let D = Z[1/2] ∩ (0, 1) be the set of dyadic points in (0, 1). Let V D be the set of all maps D → V . We will usually regard these elements as tuples; that is, we write xq for the value of x ∈ V D at q ∈ D and sometimes we write x as (xq )q∈D . Let Y := V (D) be the subset consisting of those maps that evaluate to z at all but finitely many points. An alternative description is as a direct limit limI⊆D finite V I . Note that this set is naturally −→ equipped with a (unique) topology: the topology induced from the product topology and the CW topology coincide. Note that Thompson’s group F acts on D from the right, via q.f = f −1 (q) for f ∈ F and q ∈ D. To describe this action in terms of paired tree diagrams, note that every point in D corresponds to a caret in the leafless rooted binary tree. Thus every finite rooted binary tree T determines a finite subset D(T ) of D, namely that consisting of points that correspond to its carets. An element [T, U ] of F takes D(T ) to D(U ) (preserving the order) and is linear between these break points. As a consequence, F acts from the left on the set V D via (f.x)q = xq.f where x ∈ V D , q ∈ D and f ∈ F . Clearly this induces an action of F on Y . Explicitly, the action of F on Y satisfies ([T, U ].x)ti = xui where D(T ) = {t1 < . . . < tn−1 } and D(U ) = {u1 < . . . < un−1 }. Away from the break points, the values are interpolated linearly: [T, U ].xsti +(1−s)ti+1 = xsui +(1−s)ui+1 . There is also an action of K (B̄∗ (OS )) on Y which is given as follows: if T is a finite rooted binary tree and D(T ) = {q1 < . . . < qn−1 } then  αi (g).xqi if q = qi ([T, g, T ].x)q = xq else. 40 S. WITZEL AND M. C. B. ZAREMSKY This is just the action obtained by taking the direct limit over the actions of B̄T (OS ) on V D(T ) . These actions are compatible and so give an action of T (B̄∗ (OS )) on Y , which is given by ([T, g, U ].x)ti = αi (g).xui and ([T, g, U ].x)t = ([T, U ].x)t for t 6∈ D(T ); see Figure 9.   1 2  4 5 6 = a b a b̄ c̄ c 1 2  45 6 a b = a b̄ c̄ c Figure 9. Two points of view on the action of T (B̄∗ (OS )) on Y . On the left the action is described in terms of tree diagrams, on the right in terms of piecewise linear homeomorphisms. In both pictures b̄ = ( 1 42 ) b and c̄ = ( 4 56 ) c. All unspecified values are z. Next we want to understand stabilizers of this action. First observe that the action has a nontrivial kernel, namely the center of T (B̄∗ (OS )), which is isomorphic to OS× . Observation 8.17. Let (G∗ , (κk )k ) be a cloning system and let H be a group. Define a new cloning system (H ×G∗ , (κ̂k )k ) by taking κ̂k :=id ×κk . Then T (H ×G∗ ) = H ×T (G∗ ). Proof. The isomorphism is given by (h, [T, g, U ]) 7→ [T, hg, U ].  We now turn to one particular stabilizer. Observation 8.18. The cloning system on B̄∗ (OS ) induces a cloning system on K∗ . The stabilizer in T (B̄∗ (OS )) of the point (z)q is T (K∗ ). Proof. For the first statement it suffices to show that (Zn (OS ))κk ⊆ Zn+1 (OS ) and that (B̄n (ℓ))κk ⊆ B̄n+1 (ℓ) which is easy to see. The second statement is clear.  Corollary 8.19. The group T (K∗ ) is of type F∞ . Proof. By Observation 8.17 T (K∗ ) is isomorphic to a central product OS× T (B̄∗ (ℓ)). The second factor is of type F∞ by Proposition 8.11.  We now turn to general stabilizers. For a point x ∈ V write [x] for its PB 2 (OS )-orbit. We call a point (xq )q ∈ Y reduced if xq = z whenever [xq ] = [z]. Lemma 8.20. Every point of Y has a reduced point in its T (B̄∗ (OS ))-orbit. Proof. If (xq )q ∈ Y is arbitrary, let T be a tree such that D(T ) contains all of the finitely many indices q ∈ D for which xq 6= z. Write D(T ) = {q1 , . . . , qn−1 } where the indices are in increasing order. For each i pick gi ∈ PB 2 (OS ) such that gi .xqi = z whenever possible (i.e., when [xqi ] = [z]) and arbitrarily otherwise. Take g ∈ B̄n (OS ) such that αi (g) = gi for all i. Then [T, g, T ].(xq )q is reduced.  Lemma 8.21. The stabilizer in T (B̄∗ (OS )) of any reduced point is of type F∞ . THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 41 Proof. Let (xq )q∈D be a reduced point and let I = {q ∈ D | xq 6= z} = {q1 , . . . , qn−1 }. Let H be the stabilizer of (xq )q in T (B̄∗ (OS )) and let K be the kernel of the action of H. Since [xq ] 6= [z] for q ∈ I, we see that the stabilizer has to fix I (when acting on D via the canonical homomorphism to F ). Thus the action of the stabilizer H on Y = V (D) decomposes into an action on V I and on V (D\I) . Modulo K we find that H is a direct product of the pointwise stabilizer (in H) of V I and the pointwise stabilizer of V (D\I) . The action of the pointwise stabilizer of V (D\I) in T (B̄∗ (OS )) is isomorphic to B̄n (OS ) acting on V I . Thus its intersection with H is isomorphic to a point stabilizer in B̄n (OS ), and hence is of type F∞ by Corollary 8.16. The pointwise stabilizer of V I decomposes further. Let D1 := D ∩ (0, q1 ), D2 :=D ∩ (q1 , q2 ), . . . , Dn := D ∩ (qn−1 , 1). The pointwise stabilizer of V (D\Dj ) is itself isomorphic to a copy of T (B̄∗ (OS )) and therefore the stabilizer of (z)q∈DJ in this stabilizer is isomorphic to a copy of T (K∗ ), which is of type F∞ by Corollary 8.19. Putting everything together we find that H/K is a product of groups of type F∞ , and K is of type F∞ as well, so H is of type F∞ .  In summary we have: Proposition 8.22. The group T (B̄∗ (OS )) acts on Y with stabilizers of type F∞ . Proof. Every point is in the orbit of a reduced point by Lemma 8.20 so every stabilizer is isomorphic to that of a reduced point. Those are of type F∞ by Lemma 8.21.  It remains to provide a cocompact filtration and determine its essential connectivity. For this purpose we will use the key result from [Bux04] used to show that PB 2 (OS ) is not of type FP|S| : Theorem 8.23 ([Bux04]). There is a filtration (Vr )r∈N of V that is PB 2 (OS )-invariant and -cocompact and is essentially (|S| − 2)-connected but not essentially (|S| − 1)-acyclic. In fact, by Brown’s criterion any cocompact filtration of V has that property just because B2 (OS ) is of type F|S|−1 but not of type FP|S| . We use this filtration to construct a cocompact filtration of Y as follows. For r ∈ N let Y (r) be the set of all points (xq )q∈D for which {q ∈ D | [xq ] 6= [z]} has at most r elements. Note that Y (r) is T (B̄∗ (OS ))-invariant. The filtration we want to consider is Yr := Y (r) ∩ Vr(D) . The last piece that is missing to conclude that T (B̄∗ (OS )) is not of type FP|S| is the following: Proposition 8.24. The filtration (Yr )r∈N is T (B̄∗ (OS ))-invariant and -cocompact. It is not essentially (|S| − 1)-acyclic. Before we can prove the second part, we have to state a technical lemma which says that taking products does not help to kill cycles: Lemma 8.25. Let (X1 , A1 ) and (X2 , A2 ) be pairs of CW complexes and assume that the map H̃n (A1 → X1 ) is non-trivial and that A2 is non-empty. Then the map H̃n (A1 ×A2 → X1 × X2 ) is non-trivial as well. Proof. The case n = 0 is clear so assume n > 0 from now on. 42 S. WITZEL AND M. C. B. ZAREMSKY Let c be an n-cycle in A1 that is mapped non-trivially into X1 and let d be a non-trivial 0-cycle in A2 . Consider the diagram Hn (A1 ) ⊗ H0 (A2 ) ⊂ ✲ Hn (A1 × A2 ) ❄ ❄ Hn (X1 ) ⊗ H0 (X2 ) ⊂✲ Hn (X1 × X2 ). where the rows are parts of the Künneth formula (see [Hat01, Theorem 3B.6]) and the columns are the maps induced from the inclusions. The diagram commutes by naturality of the Künneth formula. The cycle c ⊗ d in the upper left maps non-trivially into the lower left which injects into the lower right. Hence it has non-trivial image in the lower right. Since the diagram commutes, it follows that its image in the upper right also has non-trivial image in the lower right, which is what we want.  Proof of Proposition 8.24. For cocompactness let Cr ⊆ V be compact such that its PB 2 (OS )translates cover Vr . Let Ĉr ⊆ Y be the product of r copies of Cr (say at positions q1 , . . . , qr ) and {z} otherwise. We claim that the translates of Ĉr cover Yr . Indeed, let (xq )q ∈ Yr be arbitrary. Since it lies in Y (r) there are at most r positions where [xq ] 6= [z]. Using the action of F we can achieve that these positions are (some of) q1 to qr . Now, since each xqi lies in Vr , we can move it into Cr , using an element of the form [T, g, T ], without moving any of the other xq . At all other coordinates q, i.e., where [xq ] = [z], we can move xq to z using the same method. Since all but finitely many xq were z to begin with, we have moved (xq )q into Ĉr in finitely many steps. For the second statement let N = |S| − 1, so we want to show that (H̃N (Yr ))r is not essentially trivial. Let k be such that the map H|S|−1 (V Qk → Vm ) is non-trivial for every m ≥ k. For arbitrary m ≥ k take A1 = Vk , A2 = q∈D {z}, X1 = Vm , and X2 = q6 =1/2 Q q∈D Vm . Then A1 × A2 ⊆ Yk and Ym ⊆ X1 × X2 (on the infinite products we take q6=1/2 the CW topology, not the product topology). By Lemma 8.25 the map HN (A1 × A2 → X1 ×X2 ) is non-trivial. But this factors through the map HN (Yk → Ym ) which is therefore non-trivial as well. This shows that (HN (Yr ))r is not essentially trivial.  Theorem 8.26. The group T (B̄∗ (OS )) is not of type FP|S| . Proof. The group acts on Y , which is contractible, with stabilizers of type F∞ (Proposition 8.22). There is an invariant, cocompact filtration (Yr )r which is not essentially (|S| − 1)-acyclic (Proposition 8.24). We conclude using Brown’s criterion.  Remark 8.27. As far as we can tell, none of the established methods in the literature can be used now to show that T (B∗ (OS )) is not of type FP|S| . The kernel of the morphism T (B∗ (OS )) → T (B̄∗ (OS )) is very unlikely to be even finitely generated (or else one could apply [Bie76, Proposition 2.7] or the following exercise, see also [Geo08, Theorem 7.2.21]). Also the projection does not split (or else one could apply the retraction argument [Bux04, Proposition 4.1]). For this reason we will now use the new methods established in Section 5.5, which can be regarded as a generalization of the retraction argument. We should mention that one can deduce that T (B∗ (OS )) is not finitely generated if |S| = 1, without using this new machinery. Proof of Theorem 8.12. We apply Theorem 5.14 to the inclusion homomorphism B2 (OS ) ֒→ T (B̄∗ (OS )) that takes g to [λ1 , g, λ1 ] where λ1 is a single caret. We take Z to be the subspace of Y consisting of points (xq )q with xq = z for q 6= 1/2, so Z is B2 (OS )-cocompact. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 43 Our T (B̄∗ (OS ))-cocompact filtration of Y is (Yr )r∈N . Observe that H|S|−1 (Z → Yr ) is not eventually trivial by the proof of Proposition 8.24. Thus we can apply Theorem 5.14. Since the inclusion B2 (OS ) ֒→ T (B̄∗ (OS )) clearly factors through T (B∗ (OS )) we conclude that this group is not of type FP|S|−1 .  Combining Theorem 8.1 and Theorem 8.12, we obtain: Theorem 8.28. The group T (B∗ (OS )) is of type F|S|−1 but not of type FP|S| .  9. Thompson groups for mock-symmetric groups The groups discussed in this section are instances of what Davis, Januszkiewicz and Scott call “mock reflection groups” [DJS03]. These are groups generated by involutions, and act on associated cell complexes very much like Coxeter groups, with the only difference being that some of the generators may be “mock reflections” that do not fix their reflection mirror pointwise. Here we will only be concerned with one family of groups consisting of the minimal blow up of Coxeter groups of type An . These Coxeter groups are symmetric groups and so we call their blow ups mock symmetric groups. For n ∈ N the mock symmetric group Snmock is given by the presentation Snmock = hsi,j , 1 ≤ i < j ≤ n | s2i,j = 1 for all i, j si,j sk,ℓ = sk,ℓ si,j for i < j < k < ℓ (9.1) sk,ℓsi,j = sk+ℓ−j,k+ℓ−isk,ℓ for k ≤ i < j ≤ ℓi. mock S∞ lim S mock . −→ n We also set = See Figure 10 for a visualization of elements of Snmock , and a visualization of the last relation. = Figure 10. The relation si,j sk,ℓ = sk,ℓ sk+ℓ−j,k+ℓ−i of Snmock in the case i = 3, j = 4, k = 1, ℓ = 5, n = 5. i+j Let s̄i,j ∈ Sn be the involution (i j)((i + 1) (j − 1)) · · · (⌊ i+j 2 ⌋ ⌈ 2 ⌉) (this is the longest element in the Coxeter group generated by (i i+1), . . . , (j −1 j)). Taking si,j to s̄i,j defines mock a surjective homomorphism ρn : Snmock → Sn . We define cloning maps κnk : Snmock → Sn+1 by first defining them on the generators:  for j < k  si,j si,j+1 sk,k+1 for i ≤ k ≤ j (si,j )κnk = (9.2)  si+1,j+1 for k < i. mock as in the paragraph leading up to Lemma 1.12. Now we extend κnk to a map Snmock → Sn+1 See Figure 11 for an example of cloning. = mock . Figure 11. The relation s1,4 λ3 = λ2 s1,5 s3,4 of F ⊲⊳ S∞ 44 S. WITZEL AND M. C. B. ZAREMSKY Proposition 9.1. The above data define a cloning system on S∗mock . Proof. Note first that (9.1) is a presentation for Snmock as a monoid because all the generators are involutions by the first relation. Following the advice from Remark 2.12, we will apply Lemma 1.12 with this presentation rather than the trivial presentation used in Proposition 2.7. We have to verify conditions coming from relations of F and conditions coming from relations of Snmock , after which the proof proceeds as that of Proposition 2.7. For the relations of F we must verify the conditions (FCS2) (product of clonings) and (FCS3) (compatibility) (si,j )κℓ κk = (si,j )κk κℓ+1 ρ((si,j )κk ) = (ρ(si,j ))ςk for k < ℓ and i < j (9.3) for i < j. (9.4) (Note that we verified (FCS3) for all i, which is not technically necessary; see the remark after Observation 2.11). For the relations of Snmock we have to check that ρ is a well defined homomorphism, and check that the following equations, standing in for (CS1) (cloning a product), are satisfied: (si,j )κρ(sk,ℓ )p (sk,ℓ )κp = (sk,ℓ )κρ(si,j )p (si,j )κp for i < j < k < ℓ (9.5) (sk+ℓ−j,k+ℓ−i)κρ(sk,ℓ )p (sk,ℓ )κp = (sk,ℓ )κρ(si,j )p (si,j )κp for k ≤ i < j ≤ ℓ. (9.6) Note that the conditions coming from the relations s2i,j = 1 are vacuous. Condition (9.3) is easy to check if k < i or ℓ > j so we consider the situation where i ≤ k < ℓ ≤ j. In this case we have (si,j )κℓ κk = (si,j+1 sℓ,ℓ+1 )κk = (si,j+1 )κk (sℓ,ℓ+1 )κk = si,j+2 sk,k+1 sℓ+1,ℓ+2 = si,j+2 sℓ+1,ℓ+2 sk,k+1 = (si,j+1 )κℓ+1 (sk,k+1 )κℓ+1 = (si,j+1 sk,k+1)κℓ+1 = (si,j )κk κℓ+1 since ρ(sk,k+1 )(ℓ + 1) = (ℓ + 1), ρ(sℓ,ℓ+1 )k = k and Condition (9.4) amounts to showing that   s̄i+1,j+1 s̄i,j+1 s̄k,k+1 (s̄i,j )ςk =  s̄i,j sk,k+1 and sℓ+1,ℓ+2 commute. k<i i≤k≤j k > j. The cases k < i and k > j are clear. For the remaining case we first note that s̄i,j+1 s̄k,k+1 (m) = τi+j−k s̄i,j πk (m) = ((s̄i,j )ςk )(m) for m 6= k, k+1 (which is also the same as s̄i,j+1 (m)). Here τk and πk are as in Example 2.9. Finally one checks that s̄i,j+1 s̄k,k+1 (k) = i + j − k = (s̄i,j )ςk (k) and that s̄i,j+1 s̄k,k+1(k + 1) = i + j − k + 1 = (s̄i,j )ςk (k + 1). That ρ is a well defined homomorphism amounts to saying that the defining relations of Snmock hold in Sn with si,j replaced by s̄i,j , which they do. Condition (9.5) is also easy to check unless i ≤ p ≤ j or k ≤ p ≤ ℓ. We treat the case i ≤ p ≤ j, the other remaining case being similar. We have (si,j )κρ(sk,ℓ )p (sk,ℓ )κp = si,j+1 sp,p+1 sk+1,ℓ+1 = sk+1,ℓ+1 si,j+1 sp,p+1 = (sk,ℓ )κρ(si,j )p (si,j )κp . Finally, the interesting case of condition (9.6) is when i ≤ p ≤ j. We have (sk,ℓ )κρ(si,j )p (si,j )κp = sk,ℓ+1si+j−p,i+j−p+1si,j+1 sp,p+1 = sk,ℓ+1 si,j+1 = sk+ℓ−j,k+ℓ−i+1sk+ℓ−p,k+ℓ−p+1sk,ℓ+1 sp,p+1 = (sk+ℓ−j,k+ℓ−i)κρ(sk,ℓ )p (sk,ℓ )κp using the defining relations of Snmock several times. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 45  As a consequence we get Theorem 9.2. There is a generalized Thompson group T (S∗mock ) which contains all the Snmock and canonically surjects onto V . We denote it Vmock . Conjecture 9.3. Vmock is of type F∞ . Since each Snmock is of type F∞ [DJS03, Section 4.7, Corollary 3.5.4], to prove the conjecture it suffices to show that the the cloning system is properly graded and that the connectivity of the complexes Ln (S∗mock ) goes to infinity as n goes to infinity. 10. Thompson groups for loop braid groups Our next example of a cloning system comes from the family of loop braid groups LB n , also known as groups ΣAutn of symmetric automorphisms of free groups, or as braidpermutation groups. This will produce a generalized Thompson group Vloop that contains both Vbr and V as subgroups. There is also a pure version of this cloning system, using the pure loop braid groups, which we will discuss as well, yielding a group Floop . We first describe the family of groups in terms of free group automorphisms. Fix a set of generators {x1 , . . . , xn } for Fn , and call an automorphism φ ∈ Aut(Fn ) symmetric if for every 1 ≤ i ≤ n there exists 1 ≤ j ≤ n such that φ(xi ) is conjugate to xj . If every φ(xi ) is even conjugate to xi , call φ pure symmetric. The group of symmetric automorphisms of Fn is denoted ΣAutn , and the group of pure symmetric automorphisms is denoted PΣAutn . The latter is also denoted by P LBn , for pure loop braid group. The reader is cautioned that in the literature “symmetric” sometimes allows for generators to map to conjugates of inverses of generators, but we do not allow this. The LB n fit into a directed system. The map ιn,n+1 : LB n ֒→ LB n+1 is given by sending the automorphism φ of Fn to the automorphism of Fn+1 that does nothing to the new generator and otherwise acts like φ. This restricts to PLB n as well, and so we have directed systems LB ∗ and PLB ∗ . Our presentation for LB n = ΣAutn will be taken from [FRR97]. The generators are as follows, for 1 ≤ i ≤ n.   xi βi : x  i+1 xj   xi xi+1 σi :  xj 7→ xi+1 7→ x−1 i+1 xi xi+1 7→ xj (j 6= i, i + 1) 7 xi+1 → 7→ xi 7→ xj (j 6= i, i + 1) The βi together with the σi generate ΣAutn . The βi by themselves generate a copy of Bn in ΣAutn , and the σi generate a copy of Sn . As seen in [FRR97], defining relations for ΣAutn are as follows (with 1 ≤ i ≤ n − 1): 46 S. WITZEL AND M. C. B. ZAREMSKY βi βj = βj βi (|i − j| > 1) βi βi+1 βi = βi+1 βi βi+1 σi2 = 1 σi σj = σj σi (|i − j| > 1) σi σi+1 σi = σi+1 σi σi+1 βi σj = σj βi (|i − j| > 1) σi σi+1 βi = βi+1 σi σi+1 βi βi+1 σi = σi+1 βi βi+1 . This is a group presentation, and it becomes a monoid presentation after adding generators βi−1 with relations βi βi−1 = βi−1 βi = 1. Since we already have cloning systems on S∗ (from Example 2.9) as well as on B∗ (from [Bri07]), we already know how the cloning system on LB ∗ = ΣAut∗ should be defined. The only thing to check is that it is actually well defined. The homomorphism ρn : LB n → Sn just takes βi as well as σi to σi ∈ Sn . This is easily seen to be well defined. The cloning maps are defined as they are defined for the symmetric groups and braid groups respectively: for ε ∈ {±1} this means that  ε β if k < i    i+1 εβε β if k = i i i+1 (βiε )κk := (10.1) ε ε β βi if k = i + 1    i+1 βε if k > i + 1  i σ if k < i    i+1 σi σi+1 if k = i (σi )κk := (10.2) σ if k = i + 1  i+1 σi   σi if k > i + 1 Lemma 10.1. The above data ρ∗ and κ∗k define cloning systems on LB ∗ and on PLB ∗ . Proof. We already noted that ρ is a well defined group homomorphism. We have to check (CS2) (product of clonings) and (CS3) (compatibility) on generators of LB n . But since every generator is a generator of either Sn or of Bn , each verification needed has been performed in establishing the cloning systems on either S∗ or B∗ . It remains to check that cloning a relation is well defined, standing in for (CS1) (cloning a product). Again, the relations involving only elements of Sn or Bn are already verified. This leaves the last three kinds of relations. For the first relation we have to check that (βi )κρ(σj )k (σj )κk = (βi )κσj k (σj )κk = (σj )κσi k (βi )κk = (σj )κρ(βi )k (βi )κk which is easy to do case by case. For the other two relations we must show that (σi )κ(i i+2 i+1)k (σi+1 )κ(i i+1)k (βi )κk = (βi+1 )κ(i i+1 i+2)k (σi )κ(i+1 i+2)k (σi+1 )κk (βi )κ(i i+2 i+1)k (βi+1 )κ(i i+1)k (σi )κk = (σi+1 )κ(i i+1 i+2)k (βi )κ(i+1 i+2)k (βi+1 )κk which can be treated formally equivalently as long as we do not use either of the relations σi2 = 1 or βi βi−1 = βi−1 βi = 1. The cases k < i and k > i + 2 are easy. For k = i we apply only mixed relations to find (σi )κi+2 (σi+1 )κi+1 (βi )κi = σi σi+1 σi+2 βi βi+1 = βi+1 βi+2 σi σi+1 σi+2 = (βi+1 )κi+1 (σi )κi (σi+1 )κi . THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES 47 Similarly for k = i + 1 we get (σi )κi (σi+1 )κi (βi )κi+1 = σi σi+1 σi+2 βi+1 βi = βi+2 βi+1 σi σi+1 σi+2 = (βi+1 )κi+2 (σi )κi+2 (σi+1 )κi+1 . Lastly for k = i + 2 we first apply a braid relation and then use the mixed relations to get (σi )κi+1 (σi+1 )κi+2 (βi )κi+2 = σi+1 σi σi+2 σi+1 βi = σi+1 σi+2 σi σi+1 βi = βi+2 σi+1 σi σi+2 σi+1 = (βi+1 )κi (σi )κi+1 (σi+1 )κi+2 . Finally, that the cloning system on LB ∗ restricts to one on PLB ∗ is straightforward.  Theorem 10.2. There are generalized Thompson groups Vloop := T (LB ∗ ) and Floop := T (PLB ∗ ) containing the loop braid groups and the pure loop braid groups, respectively. The group Vloop canonically surjects onto V , and the group Floop canonically surjects onto F . The group LB n is known to be of type F∞ , for instance it acts properly cocompactly on the contractible space of marked cactus graphs [Col89]. For this reason understanding the finiteness properties of Vloop and Floop amounts to showing that the cloning systems are properly graded, and understanding the connectivity of Ln (LB ∗ ) and Ln (PLB ∗ ). We expect that these should be increasingly highly connected and thus: Conjecture 10.3. Vloop and Floop are of type F∞ . We do not attempt to prove this conjecture here. However, we end by sketching a more geometric viewpoint of these cloning systems, which could be useful in the future. To do so, we will view LB n as a group of motions of loops (which is where the name comes from); see [BWC07], [BH13] and [Wil12]. Let R3 be Euclidean 3-space, and define a loop 1 3 γ to be a smooth, unknotted, oriented embedded copy of the circle ` S in R . Now fix a 3 γ. A motion of Cn set L of n pairwise disjoint, unlinked loops in R , and let Cn := γ∈L is a path of diffeomorphisms ft ∈ Diff(R3 ) for t ∈ [0, 1] such that f0 is the identity and f1 stabilizes Cn set-wise, preserving orientations of the loops. Two motions ft,0 and ft,1 are considered equivalent if they are smoothly isotopic via an isotopy ft,s with f0,s and f1,s setwise stabilizing Cn . If f1 also stabilizes each γ ∈ L then the motion ft is a pure motion. These constructions and the above ones yield isomorphic groups, that is to say LB n is the group of motions, and PLB n is the group of pure motions. This is explained, e.g., in [Gol81] and [Wil12, Section 3]. One should picture σi as the motion in which the ith and (i + 1)st loops move around each other and take each other’s old spots. Then βi is similar, except that during the motion the (i + 1)st loop passes through the ith instead of around. See Figure 12 for an idea. i+1 i i+1 i σi βi Figure 12. Generators of LB n . There is a bit of inconsistency in the literature: all that we have described here is as in, e.g., [FRR97], but in, e.g., [BH13], instead of the generators βi their inverses are used (called ρi there), and then the relevant relations look slightly different. 48 S. WITZEL AND M. C. B. ZAREMSKY In [BWC07] there are some helpful diagrams, analogous to strand diagrams for braids, illustrating elements of LB n . The pictures are four-dimensional, and show one loop passing through another in a sort of movie. Using a bit of artistic license, we can draw similar diagrams to demonstrate cloning; see Figure 13. = Figure 13. An example of cloning, namely (β1 )κ22 = β2 β1 . The picture shows β1 λ2 = λ1 β2 β1 . The vertical direction is time, while the missing spatial direction is indicated by breaking the surfaces; see [BWC07, p. 717] for a detailed explanation. Alternatively we can draw cloning using the welded braid diagrams from [FRR97]. See Figure 14. = Figure 14. Another example of cloning, now using welded braid diagrams. We see that σ1 β2 λ3 = λ1 σ2 σ1 β3 β2 . One might expect the descending links to be modeled on disjoint “tubes” in 3-space with prescribed boundaries, or “welded arcs” of some sort. This is in analogy to the disjoint arcs in 2-space with prescribed boundaries for descending links in the braid group case. References [AB87] [BBCS08] [BdCK15] [BE74] [Bel04] [BF] H. Abels and K. S. Brown. Finiteness properties of solvable S-arithmetic groups: an example. J. Pure Appl. Algebra, 44(1-3):77–83, 1987. T. Brady, J. Burillo, S. Cleary, and M. Stein. Pure braid subgroups of braided Thompson’s groups. Publ. Mat., 52(1):57–89, 2008. L. Bartholdi, Y. de Cornulier, and D. H. Kochloukova. Homological finiteness properties of wreath products. Q. J. Math., 66(2):437–457, 2015. R. Bieri and B. Eckmann. Finiteness properties of duality groups. Comment. Math. Helv., 49:74–83, 1974. J. Belk. Thompson’s Group F . PhD thesis, Cornell University, 2004. J. M. Belk and B. Forrest. A Thompson Group for the Basilica. arXiv:1201.4225. THOMPSON GROUPS FOR SYSTEMS OF GROUPS, AND THEIR FINITENESS PROPERTIES [BFM+ 14] 49 K.-U. Bux, M. Fluch, M. Marschler, S. Witzel, and M. C. B. Zaremsky. The braided Thompson’s groups are of type F∞ . J. Reine Angew. Math., 2014. To appear. [BH99] M. R. Bridson and A. Haefliger. Metric spaces of non-positive curvature, volume 319 of Grundlehren der Mathematischen Wissenschaften. Springer-Verlag, Berlin, 1999. [BH13] T. Brendle and A. Hatcher. Configuration spaces of rings and wickets. Comment. Math. Helv., 88(1):131–162, 2013. [Bie76] R. Bieri. Homological dimension of discrete groups. Mathematics Department, Queen Mary College, London, 1976. [Bri04] M. G. Brin. Higher dimensional Thompson groups. Geom. Dedicata, 108:163–192, 2004. [Bri05] M. G. Brin. On the Zappa-Szép product. Comm. Algebra, 33(2):393–424, 2005. [Bri07] M. G. Brin. The algebra of strand splitting. I. A braided version of Thompson’s group V . J. Group Theory, 10(6):757–788, 2007. [Bro82] K. S. Brown. Cohomology of groups, volume 87 of Graduate Texts in Mathematics. SpringerVerlag, New York, 1982. [Bro87] K. S. Brown. Finiteness properties of groups. J. Pure Appl. Algebra, 44(1-3):45–75, 1987. [Bro92] K. S. Brown. The geometry of finitely presented infinite simple groups. In Algorithms and classification in combinatorial group theory (Berkeley, CA, 1989), volume 23 of Math. Sci. Res. Inst. Publ., pages 121–136. Springer, New York, 1992. [Bro06] K. S. Brown. The homology of Richard Thompson’s group F . In Topological and asymptotic aspects of group theory, volume 394 of Contemp. Math., pages 47–59. Amer. Math. Soc., Providence, RI, 2006. [Bux04] K.-U. Bux. Finiteness properties of soluble arithmetic groups over global function fields. Geom. Topol., 8:611–644, 2004. [BWC07] J. C. Baez, D. K. Wise, and A. S. Crans. Exotic statistics for strings in 4D BF theory. Adv. Theor. Math. Phys., 11(5):707–749, 2007. [BZFGM14] R. Berns-Zieve, D. Fry, J. Gillings, and H. Mathews. Groups with context-free co-word problem and embeddings into Thompson’s group V. The Journal of the Summer Undergraduate Mathematical Science Research Institute (SUMSRI), 2014. arXiv:1407.7745. [Col89] D. J. Collins. Cohomological dimension and symmetric automorphisms of a free group. Comment. Math. Helv., 64(1):44–61, 1989. [CP61] A. H. Clifford and G. B. Preston. The algebraic theory of semigroups. Vol. I. Mathematical Surveys, No. 7. American Mathematical Society, Providence, R.I., 1961. [DJS03] M. Davis, T. Januszkiewicz, and R. Scott. Fundamental groups of blow-ups. Adv. Math., 177(1):115–179, 2003. [Far03] D. S. Farley. Finiteness and CAT(0) properties of diagram groups. Topology, 42(5):1065–1082, 2003. [FMWZ13] M. G. Fluch, M. Marschler, S. Witzel, and M. C. B. Zaremsky. The Brin–Thompson groups sV are of type F∞ . Pacific J. Math., 266(2):283–295, 2013. [FRR97] R. Fenn, R. Rimányi, and C. Rourke. The braid-permutation group. Topology, 36(1):123–135, 1997. [Geo08] R. Geoghegan. Topological Methods in Group Theory, volume 243 of Graduate Texts in Mathematics. Springer, 2008. [Gol81] D. L. Goldsmith. The theory of motion groups. Michigan Math. J., 28(1):3–17, 1981. [GS97] V. Guba and M. Sapir. Diagram groups. Mem. Amer. Math. Soc., 130(620), 1997. [Hat01] A. Hatcher. Algebraic Topology. Cambridge University Press, 2001. [Hig74] 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). [Hug09] B. Hughes. Local similarities and the Haagerup property. Groups Geom. Dyn., 3(2):299–315, 2009. With an appendix by D. S. Farley. [KM97] S. Krstić and J. McCool. The non-finite presentability of IA(F3 ) and GL2 (Z[t, t−1 ]). Invent. Math., 129(3):595–606, 1997. [Koz08] D. Kozlov. Combinatorial Algebraic Topology. Springer, 2008. [KS06] M. Kashiwara and P. Schapira. Categories and sheaves, volume 332 of Grundlehren der Mathematischen Wissenschaften. Springer, 2006. [MPN13] C. Martı́nez-Pérez and B. E. A. Nucinkis. Bredon cohomological finiteness conditions for generalisations of Thompson groups. Groups Geom. Dyn., 7(4):931–959, 2013. [Put] A. Putman. Representation stability, congruence subgroups, and mapping class groups. arXiv:1201.4876v2. [Qui78] D. Quillen. Homotopy properties of the poset of nontrivial p-subgroups of a group. Adv. in Math., 28(2):101–128, 1978. 50 [Röv99] [Spa66] [Ste92] [Tan14] [Wil12] S. WITZEL AND M. C. B. ZAREMSKY C. E. Röver. Constructing finitely presented simple groups that contain Grigorchuk groups. J. Algebra, 220(1):284–313, 1999. E. H. Spanier. Algebraic Topology. Springer, 1966. M. Stein. Groups of piecewise linear homeomorphisms. Trans. Amer. Math. Soc., 332(2):477– 514, 1992. S. Tanusevski. Generalized Thompson groups. PhD thesis, Binghamton University, 2014. J. C. H. Wilson. Representation stability for the cohomology of the pure string motion groups. Algebr. Geom. Topol., 12(2):909–931, 2012. Mathematical Institute, University of Münster, Einsteinstraße 62, 48149 Münster, Germany E-mail address: [email protected] Department of Mathematical Sciences, Binghamton University, Binghamton, NY 13902 E-mail address: [email protected]
4math.GR
Logical Methods in Computer Science Vol. 1 (2:5) 2005, pp. 1–39 www.lmcs-online.org Submitted Published Apr. 1, 2005 Nov. 8, 2005 AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY MALGORZATA BIERNACKA, DARIUSZ BIERNACKI, AND OLIVIER DANVY BRICS, Department of Computer Science, University of Aarhus IT-parken, Aabogade 34, DK-8200 Aarhus N, Denmark e-mail address: {mbiernac,dabi,danvy}@brics.dk Abstract. We present an abstract machine and a reduction semantics for the lambdacalculus extended with control operators that give access to delimited continuations in the CPS hierarchy. The abstract machine is derived from an evaluator in continuationpassing style (CPS); the reduction semantics (i.e., a small-step operational semantics with an explicit representation of evaluation contexts) is constructed from the abstract machine; and the control operators are the shift and reset family. We also present new applications of delimited continuations in the CPS hierarchy: finding list prefixes and normalization by evaluation for a hierarchical language of units and products. 1. Introduction The studies of delimited continuations can be classified in two groups: those that use continuation-passing style (CPS) and those that rely on operational intuitions about control instead. Of the latter, there is a large number proposing a variety of control operators [5, 37, 40, 41, 49, 52, 53, 65, 70, 74, 80] which have found applications in models of control, concurrency, and type-directed partial evaluation [8,52,75]. Of the former, there is the work revolving around the family of control operators shift and reset [27–29,32,42,43,55,56,66,80] which have found applications in non-deterministic programming, code generation, partial evaluation, normalization by evaluation, computational monads, and mobile computing [6, 7, 9, 17, 22, 23, 33, 34, 44, 46, 48, 51, 57, 59, 61, 72, 77–79]. The original motivation for shift and reset was a continuation-based programming pattern involving several layers of continuations. The original specification of these operators relied both on a repeated CPS transformation and on an evaluator with several layers of continuations (as is obtained by repeatedly transforming a direct-style evaluator into continuation-passing style). Only subsequently have shift and reset been specified operationally, by developing operational analogues of a continuation semantics and of the CPS transformation [32]. 2000 ACM Subject Classification: D.1.1; F.3.2. Key words and phrases: Delimited continuations, abstract machines, reduction semantics. l LOGICAL METHODS IN COMPUTER SCIENCE c DOI:10.2168/LMCS-1 (2:5) 2005 CC M. Biernacka, D. Biernacki, and O. Danvy Creative Commons 2 M. BIERNACKA, D. BIERNACKI, AND O. DANVY The goal of our work here is to establish a new operational foundation for delimited continuations, using CPS as a guideline. To this end, we start with the original evaluator for shift1 and reset1 . This evaluator uses two layers of continuations: a continuation and a meta-continuation. We then defunctionalize it into an abstract machine [1] and we construct the corresponding reduction semantics [36], as pioneered by Felleisen and Friedman [39]. The development scales to shiftn and resetn . It is reusable for any control operators that are compatible with CPS, i.e., that can be characterized with a (possibly iterated) CPS translation or with a continuation-based evaluator. It also pinpoints where operational intuitions go beyond CPS. This article is structured as follows. In Section 2, we review the enabling technology of our work: Reynolds’s defunctionalization, the observation that a defunctionalized CPS program implements an abstract machine, and the observation that Felleisen’s evaluation contexts are the defunctionalized continuations of a continuation-passing evaluator; we demonstrate this enabling technology on a simple example, arithmetic expressions. In Section 3, we illustrate the use of shift and reset with the classic example of finding list prefixes, using an ML-like programming language. In Section 4, we then present our main result: starting from the original evaluator for shift and reset, we defunctionalize it into an abstract machine; we analyze this abstract machine and construct the corresponding reduction semantics. In Section 5, we extend this result to the CPS hierarchy. In Section 6, we illustrate the CPS hierarchy with a class of normalization functions for a hierarchical language of units and products. 2. From evaluator to reduction semantics for arithmetic expressions We demonstrate the derivation from an evaluator to a reduction semantics. The derivation consists of the following steps: (1) we start from an evaluator for a given language; if it is in direct style, we CPStransform it; (2) we defunctionalize the CPS evaluator, obtaining a value-based abstract machine; (3) we modify the abstract machine to make it term-based instead of value-based; in particular, if the evaluator uses an environment, then so does the corresponding value-based abstract machine, and in that case, making the machine term-based leads us to use substitutions rather than an environment; (4) we analyze the transitions of the term-based abstract machine to identify the evaluation strategy it implements and the set of reductions it performs; the result is a reduction semantics. The first two steps are based on previous work on a functional correspondence between evaluators and abstract machines [1–3, 17, 26], which itself is based on Reynolds’s seminal work on definitional interpreters [71]. The last two steps follow the lines of Felleisen and Friedman’s original work on a reduction semantics for the call-by-value λ-calculus extended with control operators [39]. The last step has been studied further by Hardin, Maranget, and Pagano [50] in the context of explicit substitutions and by Biernacka, Danvy, and Nielsen [15, 16, 31]. In the rest of this section, our running example is the language of arithmetic expressions, formed using natural numbers (the values) and additions (the computations): exp ∋ e ::= pmq | e1 + e2 AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 3 • Values: val ∋ v ::= m • Evaluation function: eval : exp → val eval (pmq) = m eval (e1 + e2 ) = eval (e1 ) + eval (e2 ) • Main function: evaluate : exp → val evaluate (e) = eval (e) Figure 1: A direct-style evaluator for arithmetic expressions • Values: val ∋ v ::= m • Continuations: cont = val → val • Evaluation function: eval : exp × cont → val eval (pmq, k) = k m eval (e1 + e2 , k) = eval (e1 , λm1 . eval (e2 , λm2 . k (m1 + m2 ))) • Main function: evaluate : exp → val evaluate (e) = eval (e, λv. v) Figure 2: A continuation-passing evaluator for arithmetic expressions 2.1. The starting point: an evaluator in direct style. We define an evaluation function for arithmetic expressions by structural induction on their syntax. The resulting directstyle evaluator is displayed in Figure 1. 2.2. CPS transformation. We CPS-transform the evaluator by naming intermediate results, sequentializing their computation, and introducing an extra functional parameter, the continuation [29, 68, 76]. The resulting continuation-passing evaluator is displayed in Figure 2. 2.3. Defunctionalization. The generalization of closure conversion [60] to defunctionalization is due to Reynolds [71]. The goal is to represent a functional value with a first-order data structure. The means is to partition the function space into a first-order sum where each summand corresponds to a lambda-abstraction in the program. In a defunctionalized program, function introduction is thus represented as an injection, and function elimination as a call to a first-order apply function implementing a case dispatch. In an ML-like functional language, sums are represented as data types, injections as data-type constructors, and apply functions are defined by case over the corresponding data types [30]. Here, we defunctionalize the continuation of the continuation-passing evaluator in Figure 2. We thus need to define a first-order algebraic data type and its apply function. To this end, we enumerate the lambda-abstractions that give rise to the inhabitants of this function space; there are three: the initial continuation in evaluate and the two continuations in eval. The initial continuation is closed, and therefore the corresponding algebraic constructor is nullary. The two other continuations have two free variables, and therefore 4 M. BIERNACKA, D. BIERNACKI, AND O. DANVY • Values: val ∋ v ::= m • Defunctionalized continuations: cont ∋ k ::= [ ] | ADD2 (e, k) | ADD1 (v, k) • Functions eval : exp × cont → val and apply cont : cont × val → val: eval (pmq, k) = apply cont (k, m) eval (e1 + e2 , k) = eval (e1 , ADD2 (e2 , k)) apply cont ([ ], v) = v apply cont (ADD2 (e2 , k), v1 ) = eval (e2 , ADD1 (v1 , k)) apply cont (ADD1 (m1 , k), m2 ) = apply cont (k, m1 + m2 ) • Main function: evaluate : exp → val evaluate (e) = eval (e, [ ]) Figure 3: A defunctionalized continuation-passing evaluator for arithmetic expressions the corresponding constructors are binary. As for the apply function, it interprets the algebraic constructors. The resulting defunctionalized evaluator is displayed in Figure 3. 2.4. Abstract machines as defunctionalized continuation-passing programs. Elsewhere [1, 26], we have observed that a defunctionalized continuation-passing program implements an abstract machine: each configuration is the name of a function together with its arguments, and each function clause represents a transition. (As a corollary, we have also observed that the defunctionalized continuation of an evaluator forms what is known as an ‘evaluation context’ [25, 30, 39].) Indeed Plotkin’s Indifference Theorem [68] states that continuation-passing programs are independent of their evaluation order. In Reynolds’s words [71], all the subterms in applications are ‘trivial’; and in Moggi’s words [64], these subterms are values and not computations. Furthermore, continuation-passing programs are tail recursive [76]. Therefore, since in a continuation-passing program all calls are tail calls and all subcomputations are elementary, a defunctionalized continuation-passing program implements a transition system [69], i.e., an abstract machine. We thus reformat Figure 3 into Figure 4. The correctness of the abstract machine with respect to the initial evaluator follows from the correctness of CPS transformation and of defunctionalization. 2.5. From value-based abstract machine to term-based abstract machine. We observe that the domain of expressible values in Figure 4 can be embedded in the syntactic domain of expressions. We therefore adapt the abstract machine to work on terms rather than on values. The result is displayed in Figure 5; it is a syntactic theory [36]. 2.6. From term-based abstract machine to reduction semantics. The method of deriving a reduction semantics from an abstract machine was introduced by Felleisen and Friedman [39] to give a reduction semantics for control operators. Let us demonstrate it. We analyze the transitions of the abstract machine in Figure 5. The second component of eval -transitions—the stack representing “the rest of the computation”—has already been identified as the evaluation context of the currently processed expression. We thus read a AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 5 • Values: v ::= m • Evaluation contexts: C ::= [ ] | ADD2 (e, C) | ADD1 (v, C) • Initial transition, transition rules, and final transition: e ⇒ he, [ ]ieval hpmq, Cieval ⇒ hC, micont he1 + e2 , Cieval hADD2 (e2 , C), v1 icont ⇒ he1 , ADD2 (e2 , C)ieval ⇒ he2 , ADD1 (v1 , C)ieval hADD1 (m1 , C), m2 icont h[ ], vicont ⇒ hC, m1 + m2 icont ⇒ v Figure 4: A value-based abstract machine for evaluating arithmetic expressions • Expressions and values: e ::= v | e1 + e2 v ::= pmq • Evaluation contexts: C ::= [ ] | ADD2 (e, C) | ADD1 (v, C) • Initial transition, transition rules, and final transition: e ⇒ he, [ ]ieval hpmq, Cieval he1 + e2 , Cieval ⇒ hC, pmqicont ⇒ he1 , ADD2 (e2 , C)ieval hADD2 (e2 , C), v1 icont hADD1 (pm1q, C), pm2qicont ⇒ he2 , ADD1 (v1 , C)ieval ⇒ hC, pm1 + m2qicont h[ ], vicont ⇒ v Figure 5: A term-based abstract machine for processing arithmetic expressions configuration he, Cieval as a decomposition of some expression into a sub-expression e and an evaluation context C. Next, we identify the reduction and decomposition rules in the transitions of the machine. Since a configuration can be read as a decomposition, we compare the left-hand side and the right-hand side of each transition. If they represent the same expression, then the given transition defines a decomposition (i.e., it searches for the next redex according to some evaluation strategy); otherwise we have found a redex. Moreover, reading the decomposition rules from right to left defines a ‘plug’ function that reconstructs an expression from its decomposition. Here the decomposition function as read off the abstract machine is total. In general, however, it may be undefined for stuck terms; one can then extend it straightforwardly into a total function that decomposes a term into a context and a potential redex, i.e., an actual redex (as read off the machine), or a stuck redex. 6 M. BIERNACKA, D. BIERNACKI, AND O. DANVY In this simple example there is only one reduction rule. This rule performs the addition of natural numbers: (add) C [pm1q + pm2q] → C [pm1 + m2q] The remaining transitions decompose an expression according to the left-to-right strategy. 2.7. From reduction semantics to term-based abstract machine. In Section 2.6, we have constructed the reduction semantics corresponding to the abstract machine of Figure 5, as pioneered by Felleisen and Friedman [38, 39]. Over the last few years [15, 16, 24, 31], Biernacka, Danvy, and Nielsen have studied the converse transformation and systematized the construction of an abstract machine from a reduction semantics. The main idea is to short-cut the decompose-contract-plug loop, in the definition of evaluation as the transitive closure of one-step reduction, into a refocus-contract loop. The refocus function is constructed as an efficient (i.e., deforested) composition of plug and decompose that maps a term and a context either to a value or to a redex and a context. The result is a ‘pre-abstract machine’ computing the transitive closure of the refocus function. This pre-abstract machine can then be simplified into an eval/apply abstract machine. It is simple to verify that using refocusing, one can go from the reduction semantics of Section 2.6 to the eval/apply abstract machine of Figure 5. 2.8. Summary and conclusion. We have demonstrated how to derive an abstract machine out of an evaluator, and how to construct the corresponding reduction semantics out of this abstract machine. In Section 4, we apply this derivation and this construction to the first level of the CPS hierarchy, and in Section 5, we apply them to an arbitrary level of the CPS hierarchy. But first, let us illustrate how to program with delimited continuations. 3. Programming with delimited continuations We present two examples of programming with delimited continuations. Given a list xs and a predicate p, we want (1) to find the first prefix of xs whose last element satisfies p, and (2) to find all such prefixes of xs. For example, given the predicate λm.m > 2 and the list [0, 3, 1, 4, 2, 5], the first prefix is [0, 3] and the list of all the prefixes is [[0, 3], [0, 3, 1, 4], [0, 3, 1, 4, 2, 5]]. In Section 3.1, we start with a simple solution that uses a first-order accumulator. This simple solution is in defunctionalized form. In Section 3.2, we present its higher-order counterpart, which uses a functional accumulator. This functional accumulator acts as a delimited continuation. In Section 3.3, we present its direct-style counterpart (which uses shift and reset) and in Section 3.4, we present its continuation-passing counterpart (which uses two layers of continuations). In Section 3.5, we introduce the CPS hierarchy informally. We then mention a typing issue in Section 3.6 and review related work in Section 3.7. 3.1. Finding prefixes by accumulating lists. A simple solution is to accumulate the prefix of the given list in reverse order while traversing this list and testing each of its elements: • if no element satisfies the predicate, there is no prefix and the result is the empty list; • otherwise, the prefix is the reverse of the accumulator. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY find first prefix a (p, xs) def = letrec visit (nil , a) = nil | visit (x :: xs, a) = let a ′ = x :: a in if p x then reverse (a ′ , nil ) else visit (xs, a ′ ) and reverse (nil , xs) = xs | reverse (x :: a, xs) = reverse (a, x :: xs) in visit (xs, nil) find all prefixes a (p, xs) def letrec visit (nil , a) = nil | visit (x :: xs, a) = let a ′ = x :: a in if p x then (reverse (a ′ , nil)) :: (visit (xs, a ′ )) else visit (xs, a ′ ) and reverse (nil , xs) = xs | reverse (x :: a, xs) = reverse (a, x :: xs) in visit (xs, nil) = 7 To find the first prefix, one stops as soon as a satisfactory list element is found. To list all the prefixes, one continues the traversal, adding the current prefix to the list of the remaining prefixes. We observe that the two solutions are in defunctionalized form [30,71]: the accumulator has the data type of a defunctionalized function and reverse is its apply function. We present its higher-order counterpart next [54]. 3.2. Finding prefixes by accumulating list constructors. Instead of accumulating the prefix in reverse order while traversing the given list, we accumulate a function constructing the prefix: • if no element satisfies the predicate, the result is the empty list; • otherwise, we apply the functional accumulator to construct the prefix. 8 M. BIERNACKA, D. BIERNACKI, AND O. DANVY find first prefix c 1 (p, xs) def = letrec visit (nil , k ) = nil | visit (x :: xs, k ) = let k ′ = λvs.k (x :: vs) in if p x then k ′ nil else visit (xs, k ′ ) in visit (xs, λvs.vs) find all prefixes c 1 (p, xs) def letrec visit (nil , k ) = nil | visit (x :: xs, k ) = let k ′ = λvs.k (x :: vs) in if p x then (k ′ nil) :: (visit (xs, k ′ )) else visit (xs, k ′ ) in visit (xs, λvs.vs) = To find the first prefix, one applies the functional accumulator as soon as a satisfactory list element is found. To list all such prefixes, one continues the traversal, adding the current prefix to the list of the remaining prefixes. Defunctionalizing these two definitions yields the two definitions of Section 3.1. The functional accumulator is a delimited continuation: • In find first prefix c 1 , visit is written in CPS since all calls are tail calls and all sub-computations are elementary. The continuation is initialized in the initial call to visit, discarded in the base case, extended in the induction case, and used if a satisfactory prefix is found. • In find all prefixes c 1 , visit is almost written in CPS except that the continuation is composed if a satisfactory prefix is found: it is used twice—once where it is applied to the empty list to construct a prefix, and once in the visit of the rest of the list to construct a list of prefixes; this prefix is then prepended to this list of prefixes. These continuation-based programming patterns (initializing a continuation, not using it, or using it more than once as if it were a composable function) have motivated the control operators shift and reset [28, 29]. Using them, in the next section, we write visit in direct style. 3.3. Finding prefixes in direct style. The two following local functions are the directstyle counterpart of the two local functions in Section 3.2: find first prefix c 0 (p, xs) def = letrec visit nil = Sk.nil | visit (x :: xs) = x :: (if p x then nil else visit xs) in h visit xsii AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY find all prefixes c 0 (p, xs) def = 9 letrec visit nil = Sk.nil | visit (x :: xs) = x :: if p x then Sk′ .hhk ′ nilii :: h k′ (visit xs)ii else visit xs in h visit xsii In both cases, visit is in direct style, i.e., it is not passed any continuation. The initial calls to visit are enclosed in the control delimiter reset (noted h ·ii for conciseness). In the base cases, the current (delimited) continuation is captured with the control operator shift (noted S), which has the effect of emptying the (delimited) context; this captured continuation is bound to an identifier k, which is not used; nil is then returned in the emptied context. In the induction case of find all prefixes c 0 , if the predicate is satisfied, visit captures the current continuation and applies it twice—once to the empty list to construct a prefix, and once to the result of visiting the rest of the list to construct a list of prefixes; this prefix is then prepended to the list of prefixes. CPS-transforming these two local functions yields the two definitions of Section 3.2 [29]. 3.4. Finding prefixes in continuation-passing style. The two following local functions are the continuation-passing counterpart of the two local functions in Section 3.2: def find first prefix c 2 (p, xs) = letrec visit (nil , k1 , k2 ) = k2 nil | visit (x :: xs, k1 , k2 ) = let k1′ = λ(vs, k2′ ).k1 (x :: vs, k2′ ) in if p x then k1′ (nil , k2 ) else visit (xs, k1′ , k2 ) in visit (xs, λ(vs, k2 ).k2 vs, λvs.vs) def find all prefixes c 2 (p, xs) = letrec visit (nil , k1 , k2 ) = k2 nil | visit (x :: xs, k1 , k2 ) = let k1′ = λ(vs, k2′ ).k1 (x :: vs, k2′ ) in if p x then k1′ (nil , λvs.visit (xs, k1′ , λvss.k2 (vs :: vss))) else visit (xs, k1′ , k2 ) in visit (xs, λ(vs, k2 ).k2 vs, λvss.vss) CPS-transforming the two local functions of Section 3.2 adds another layer of continuations and restores the syntactic characterization of all calls being tail calls and all subcomputations being elementary. 3.5. The CPS hierarchy. If k2 were used non-tail recursively in a variant of the examples of Section 3.4, we could CPS-transform the definitions one more time, adding one more layer of continuations and restoring the syntactic characterization of all calls being tail calls and all sub-computations being elementary. We could also map this definition back to direct style, eliminating k2 but accessing it with shift. If the result were mapped back to direct 10 M. BIERNACKA, D. BIERNACKI, AND O. DANVY style one more time, k2 would then be accessed with a new control operator, shift2 , and k1 would be accessed with shift (or more precisely with shift1 ). All in all, successive CPS-transformations induce a CPS hierarchy [28,32], and abstracting control up to each successive layer is achieved with successive pairs of control operators shift and reset—reset to initialize the continuation up to a level, and shift to capture a delimited continuation up to this level. Each pair of control operators is indexed by the corresponding level in the hierarchy. Applying a captured continuation packages all the current layers on the next layer and restores the captured layers. When a captured continuation completes, the packaged layers are put back into place and the computation proceeds. (This informal description is made precise in Section 4.) 3.6. A note about typing. The type of find all prefixes c 1 , in Section 3.2, is (α → bool ) × α list → α list list and the type of its local function visit is α list × (α list → α list) → α list list. In this example, the co-domain of the continuation is not the same as the co-domain of visit. Thus find all prefixes c 0 provides a simple and meaningful example where Filinski’s typing of shift [42] does not fit, since it must be used at type ((β → ans) → ans) → β for a given type ans, i.e., the answer type of the continuation and the type of the computation must be the same. In other words, control effects are not allowed to change the types of the contexts. Due to a similar restriction on the type of shift, the example does not fit either in Murthy’s pseudo-classical type system for the CPS hierarchy [66] and in Wadler’s most general monadic type system [80, Section 3.4]. It however fits in Danvy and Filinski’s original type system [27] which Ariola, Herbelin, and Sabry have recently embedded in classical subtractive logic [5]. 3.7. Related work. The example considered in this section builds on the simpler function that unconditionally lists the successive prefixes of a given list. This simpler function is a traditional example of delimited continuations [21, 73]: • In the Lisp Pointers [21], Danvy presents three versions of this function: a typed continuation-passing version (corresponding to Section 3.2), one with delimited control (corresponding to Section 3.3), and one in assembly language. • In his PhD thesis [73, Section 6.3], Sitaram presents two versions of this function: one with an accumulator (corresponding to Section 3.1) and one with delimited control (corresponding to Section 3.3). In Section 3.2, we have shown that the continuation-passing version mediates the version with an accumulator and the version with delimited control since defunctionalizing the continuation-passing version yields one and mapping it back to direct style yields the other. 3.8. Summary and conclusion. We have illustrated delimited continuations with the classic example of finding list prefixes, using CPS as a guideline. Direct-style programs using shift and reset can be CPS-transformed into continuation-passing programs where some calls may not be tail calls and some sub-computations may not be elementary. One more CPS transformation establishes this syntactic property with a second layer of continuations. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 11 • Terms: term ∋ t ::= pmq | x | λx .t | t0 t1 | succ t | h tii | Sk .t • Values: val ∋ v ::= m | f • Answers, meta-continuations, continuations and functions: ans = val k2 ∈ cont2 = val → ans k1 ∈ cont1 = val × cont2 → ans f ∈ fun = val × cont1 × cont2 → ans • Initial continuation and meta-continuation: θ1 = λ(v, k2 ). k2 v θ2 = λv. v • Environments: env ∋ e ::= eempty | e[x 7→ v] • Evaluation function: eval : term × env × cont1 × cont2 → ans eval (pmq, eval (x , eval (λx .t, eval (t0 t1 , eval (succ t, eval (hhtii , eval (Sk.t, e, e, e, e, e, e, e, k1 , k1 , k1 , k1 , k1 , k1 , k1 , k2 ) k2 ) k2 ) k2 ) k2 ) k2 ) k2 ) = = = = = = = k1 (m, k2 ) k1 (e(x ), k2 ) k1 (λ(v, k1′ , k2′ ). eval (t, e[x 7→ v], k1′ , k2′ ), k2 ) eval (t0 , e, λ(f, k2′ ). eval (t1 , e, λ(v, k2′′ ). f (v, k1 , k2′′ ), k2′ ), k2 ) eval (t, e, λ(m, k2′ ). k1 (m + 1, k2′ ), k2 ) eval (t, e, θ1 , λv. k1 (v, k2 )) eval (t, e[k 7→ c], θ1 , k2 ) where c = λ(v, k1′ , k2′ ). k1 (v, λv ′ . k1′ (v ′ , k2′ )) • Main function: evaluate : term → val evaluate (t) = eval (t, eempty , θ1 , θ2 ) Figure 6: An environment-based evaluator for the first level of the CPS hierarchy Further CPS transformations provide the extra layers of continuation that are characteristic of the CPS hierarchy. In the next section, we specify the λ-calculus extended with shift and reset. 4. From evaluator to reduction semantics for delimited continuations We derive a reduction semantics for the call-by-value λ-calculus extended with shift and reset, using the method demonstrated in Section 2. First, we transform an evaluator into an environment-based abstract machine. Then we eliminate the environment from this abstract machine, making it substitution-based. Finally, we read all the components of a reduction semantics off the substitution-based abstract machine. Terms consist of integer literals, variables, λ-abstractions, function applications, applications of the successor function, reset expressions, and shift expressions: t ::= pmq | x | λx .t | t0 t1 | succ t | h tii | Sk .t Programs are closed terms. 12 M. BIERNACKA, D. BIERNACKI, AND O. DANVY This source language is a subset of the language used in the examples of Section 3. Adding the remaining constructs is a straightforward exercise and does not contribute to our point here. 4.1. An environment-based evaluator. Figure 6 displays an evaluator for the language of the first level of the CPS hierarchy. This evaluation function represents the original call-by-value semantics of the λ-calculus with shift and reset [28], augmented with integer literals and applications of the successor function. It is defined by structural induction over the syntax of terms, and it makes use of an environment e, a continuation k1 , and a meta-continuation k2 . The evaluation of a terminating program that does not get stuck (i.e., a program where no ill-formed applications occur in the course of evaluation) yields either an integer, a function representing a λ-abstraction, or a captured continuation. Both evaluate and eval are partial functions to account for non-terminating or stuck programs. The environment stores previously computed values of the free variables of the term under evaluation. The meta-continuation intervenes to interpret reset expressions and to apply captured continuations. Otherwise, it is passively threaded through the evaluation of literals, variables, λ-abstractions, function applications, and applications of the successor function. (If it were not for shift and reset, and if eval were curried, k2 could be eta-reduced and the evaluator would be in ordinary continuation-passing style.) The reset control operator is used to delimit control. A reset expression h tii is interpreted by evaluating t with the initial continuation and a meta-continuation on which the current continuation has been “pushed.” (Indeed, and as will be shown in Section 4.2, defunctionalizing the meta-continuation yields the data type of a stack [30].) The shift control operator is used to abstract (delimited) control. A shift expression Sk.t is interpreted by capturing the current continuation, binding it to k, and evaluating t in an environment extended with k and with a continuation reset to the initial continuation. Applying a captured continuation is achieved by “pushing” the current continuation on the meta-continuation and applying the captured continuation to the new meta-continuation. Resuming a continuation is achieved by reactivating the “pushed” continuation with the corresponding meta-continuation. 4.2. An environment-based abstract machine. The evaluator displayed in Figure 6 is already in continuation-passing style. Therefore, we only need to defunctionalize its expressible values and its continuations to obtain an abstract machine. This abstract machine is displayed in Figure 7. The abstract machine consists of three sets of transitions: eval for interpreting terms, cont 1 for interpreting the defunctionalized continuations (i.e., the evaluation contexts),1 and cont 2 for interpreting the defunctionalized meta-continuations (i.e., the meta-contexts).2 The set of possible values includes integers, closures and captured contexts. In the original 1The grammar of evaluation contexts in Figure 7 is isomorphic to the grammar of evaluation contexts in the standard inside-out notation: C1 ::= [ ] | C1 [[ ] (t, e)] | C1 [succ [ ]] | C1 [v [ ]] 2To build on Peyton Jones’s terminology [62], this abstract machine is therefore in ‘eval/apply/metaapply’ form. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 13 evaluator, the latter two were represented as higher-order functions, but defunctionalizing expressible values of the evaluator has led them to be distinguished. This eval/apply/meta-apply abstract machine is an extension of the CEK machine [39], which is an eval/apply machine, with the meta-context C2 and its two transitions, and the two transitions for shift and reset. C2 intervenes to process reset expressions and to apply captured continuations. Otherwise, it is passively threaded through the processing of literals, variables, λ-abstractions, function applications, and applications of the successor function. (If it were not for shift and reset, C2 and its transitions could be omitted and the abstract machine would reduce to the CEK machine.) Given an environment e, a context C1 , and a meta-context C2 , a reset expression h tii is processed by evaluating t with the same environment e, the empty context •, and a meta-context where C1 has been pushed on C2 . Given an environment e, a context C1 , and a meta-context C2 , a shift expression Sk.t is processed by evaluating t with an extension of e where k denotes C1 , the empty context [ ], and a meta-context C2 . Applying a captured context C1′ is achieved by pushing the current context C1 on the current meta-context C2 and continuing with C1′ . Resuming a context C1 is achieved by popping it off the meta-context C2 · C1 and continuing with C1 . The correctness of the abstract machine with respect to the evaluator is a consequence of the correctness of defunctionalization. In order to express it formally, we define a partial function evale mapping a term t to a value v whenever the environment-based machine, started with t, stops with v. The following theorem states this correctness by relating observable results: Theorem 1. For any program t and any integer value m, evaluate (t) = m if and only if evale (t) = m. Proof. The theorem follows directly from the correctness of defunctionalization [10, 67]. The environment-based abstract machine can serve both as a foundation for implementing functional languages with control operators for delimited continuations and as a stepping stone in theoretical studies of shift and reset. In the rest of this section, we use it to construct a reduction semantics of shift and reset. 4.3. A substitution-based abstract machine. The environment-based abstract machine of Figure 7, on which we want to base our development, makes a distinction between terms and values. Since a reduction semantics is specified by purely syntactic operations (it gives meaning to terms by specifying their rewriting strategy and an appropriate notion of reduction, and is indeed also referred to as ‘syntactic theory’), we need to embed the domain of values back into the syntax. To this end we transform the environment-based abstract machine into the substitution-based abstract machine displayed in Figure 8. The transformation is standard, except that we also need to embed evaluation contexts in the syntax; hence the substitution-based machine operates on terms where “quoted” (in the sense of Lisp) contexts can occur. (If it were not for shift and reset, C2 and its transitions could be omitted and the abstract machine would reduce to the CK machine [39].) We write t{v/x } to denote the result of the usual capture-avoiding substitution of the value v for x in t. Formally, the relationship between the two machines is expressed with the following simulation theorem, where evaluation with the substitution-based abstract machine is captured by the partial function evals , defined analogously to evale . 14 M. BIERNACKA, D. BIERNACKI, AND O. DANVY • Terms: t ::= pmq | x | λx .t | t0 t1 | succ t | h tii | Sk .t • Values (integers, closures, and captured continuations): v ::= m | [x , t, e] | C1 • Environments: e ::= eempty | e[x 7→ v] • Evaluation contexts: C1 ::= [ ] | ARG((t, e), C1 ) | SUCC(C1 ) | FUN(v, C1 ) • Meta-contexts: C2 ::= • | C2 · C1 • Initial transition, transition rules, and final transition: t ⇒ ht, eempty , [ ], •ieval hpmq, hx , hλx .t, ht0 t1 , hsucc t, hhhtii , hSk .t, e, e, e, e, e, e, e, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG((t, e), C1 ), v, hSUCC(C1 ), m, hFUN([x , t, e], C1 ), v, hFUN(C1′ , C1 ), v, C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , m, C2 icont1 hC1 , e (x ), C2 icont1 hC1 , [x , t, e], C2 icont1 ht0 , e, ARG((t1 , e), C1 ), C2 ieval ht, e, SUCC(C1 ), C2 ieval ht, e, [ ], C2 · C1 ieval ht, e[k 7→ C1 ], [ ], C2 ieval C2 icont1 C2 icont1 C2 icont1 C2 icont1 C2 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , vicont2 ht, e, FUN(v, C1 ), C2 ieval hC1 , m + 1, C2 icont1 ht, e[x 7→ v], C1 , C2 ieval hC1′ , v, C2 · C1 icont1 hC2 · C1 , vicont2 h•, vicont2 ⇒ hC1 , v, C2 icont1 ⇒ v Figure 7: An environment-based abstract machine for the first level of the CPS hierarchy Theorem 2. For any program t, either both evals (t) and evale (t) are undefined, or there exist values v, v ′ such that evals (t) = v, evale (t) = v ′ and T (v ′ ) = v. The function T relates a semantic value with its syntactic representation and is defined as follows:3 T (m) = pmq T ([x , t, e]) = λx .t{T (e(x1 ))/x1 } . . . {T (e(xn ))/xn }, where F V (λx . t) = {x1 , . . . , xn } T ([ ]) = [ ] T (ARG((t, e), C1 )) = ARG(t{T (e(x1 ))/x1 } . . . {T (e(xn ))/xn }, T (C1 )), where F V (t) = {x1 , . . . , xn } T (FUN(v, C1 )) = FUN(T (v), T (C1 )) T (SUCC(C1 )) = SUCC(T (C1 )) 3T is a generalization of Plotkin’s function Real [68]. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 15 • Terms and values: t ::= v | x | t0 t1 | succ t | h tii | Sk .t v ::= pmq | λx .t | C1 • Evaluation contexts: C1 ::= [ ] | ARG(t, C1 ) | SUCC(C1 ) | FUN(v, C1 ) • Meta-contexts: C2 ::= • | C2 · C1 • Initial transition, transition rules, and final transition: t ⇒ ht, [ ], •ieval hpmq, hλx .t, hC1′ , ht0 t1 , hsucc t, hhhtii , hSk .t, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG(t, C1 ), v, hSUCC(C1 ), pmq, hFUN(λx .t, C1 ), v, hFUN(C1′ , C1 ), v, C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval C2 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , pmq, C2 icont1 hC1 , λx .t, C2 icont1 hC1 , C1′ , C2 icont1 ht0 , ARG(t1 , C1 ), C2 ieval ht, SUCC(C1 ), C2 ieval ht, [ ], C2 · C1 ieval ht{C1 /k }, [ ], C2 ieval C2 icont1 C2 icont1 C2 icont1 C2 icont1 C2 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , vicont2 ht, FUN(v, C1 ), C2 ieval hC1 , pm + 1q, C2 icont1 ht{v/x }, C1 , C2 ieval hC1′ , v, C2 · C1 icont1 hC2 · C1 , vicont2 h•, vicont2 ⇒ hC1 , v, C2 icont1 ⇒ v Figure 8: A substitution-based abstract machine for the first level of the CPS hierarchy Proof. We extend the translation function T to meta-contexts and configurations, in the expected way, e.g., T (ht, e, C1 , C2 ieval ) = ht{T (e(x1 ))/x1 } . . . {T (e(xn ))/xn }, T (C1 ), T (C2 )ieval where F V (t) = {x1 , . . . , xn } Then it is straightforward to show that the two abstract machines operate in lock step with respect to the translation. Hence, for any program t, both machines diverge or they both stop (after the same number of transitions) with the values v and T (v), respectively. We now proceed to analyze the transitions of the machine displayed in Figure 8. We can think of a configuration ht, C1 , C2 ieval as the following decomposition of the initial term into a meta-context C2 , a context C1 , and an intermediate term t: C2 # C1 [t] where # separates the context and the meta-context. Each transition performs either a reduction, or a decomposition in search of the next redex. Let us recall that a decomposition is performed when both sides of a transition are partitions of the same term; in that case, depending on the structure of the decomposition C2 # C1 [t], a subpart of the term is chosen 16 M. BIERNACKA, D. BIERNACKI, AND O. DANVY to be evaluated next, and the contexts are updated accordingly. We also observe that eval transitions follow the structure of t, cont 1 -transitions follow the structure of C1 when the term has been reduced to a value, and cont 2 -transitions follow the structure of C2 when a value in the empty context has been reached. Next we specify all the components of the reduction semantics based on the analysis of the abstract machine. 4.4. A reduction semantics. A reduction semantics provides a reduction relation on expressions by defining values, evaluation contexts, and redexes [36, 38, 39, 82]. In the present case, • the values are already specified in the (substitution-based) abstract machine: v ::= pmq | λx .t | C1 • the evaluation contexts and meta-contexts are already specified in the abstract machine, as the data-type part of defunctionalized continuations; C1 ::= [ ] | ARG(t, C1 ) | FUN(v, C1 ) | SUCC(C1 ) C2 ::= • | C2 · C1 • we can read the redexes off the transitions of the abstract machine: r ::= succ pmq | (λx .t) v | Sk .t | C1′ v | h vii Based on the distinction between decomposition and reduction, we single out the following reduction rules from the transitions of the machine: (δ) (βλ ) (Sλ ) (βctx ) (Reset) C2 # C1 [succ pmq] C2 # C1 [(λx .t) v] C2 # C1 [Sk .t] C2 # C1 [C1′ v] C2 # C1 [hhvii ] → → → → → C2 # C1 [pm + 1q] C2 # C1 [t{v/x }] C2 # [t{C1 /k }] C2 · C1 # C1′ [v] C2 # C1 [v] (βλ ) is the usual call-by-value β-reduction; we have renamed it to indicate that the applied term is a λ-abstraction, since we can also apply a captured context, as in (βctx ). (Sλ ) is plausibly symmetric to (βλ ) — it can be seen as an application of the abstraction λk .t to the current context. Moreover, (βctx ) can be seen as performing both a reduction and a decomposition: it is a reduction because an application of a context with a hole to a value is reduced to the value plugged into the hole; and it is a decomposition because it changes the meta-context, as if the application were enclosed in a reset. Finally, (Reset) makes it possible to pass the boundary of a context when the term inside this context has been reduced to a value. The βctx -rule and the Sλ -rule give a justification for representing a captured context C1 as a term λx .hhC1 [x ]ii, as found in other studies of shift and reset [55, 56, 66]. In particular, the need for delimiting the captured context is a consequence of the βctx -rule. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 17 Finally, we can read the decomposition machine: decompose (t) = decompose ′ (t0 t1 , C1 , C2 ) = decompose ′ (succ t, C1 , C2 ) = decompose ′ (hhtii , C1 , C2 ) = decompose ′ (v, ARG(t, C1 ), C2 ) = function off the transitions of the abstract decompose ′ (t, [ ], •) decompose ′ (t0 , ARG(t1 , C1 ), C2 ) decompose ′ (t, SUCC(C1 ), C2 ) decompose ′ (t, [ ], C2 · C1 ) decompose ′ (t, FUN(v, C1 ), C2 ) In the remaining cases either a value or a redex has been found: decompose ′ (v, [ ], •) decompose ′ (v, [ ], C2 · C1 ) decompose ′ (Sk .t, C1 , C2 ) decompose ′ (v, FUN((λx .t), C1 ), C2 ) decompose ′ (v, FUN(C1′ , C1 ), C2 ) decompose ′ (pmq, SUCC(C1 ), C2 ) = = = = = = • # [v] C2 # C1 [hhvii ] C2 # C1 [Sk .t] C2 # C1 [(λx .t) v] C2 # C1 [C1′ v] C2 # C1 [succ pmq] An inverse of the decompose function, traditionally called plug , reconstructs a term from its decomposition: plug (• # [t]) plug (C2 · C1 # [t]) plug (C2 # (ARG(t′ , C1 ))[t]) plug (C2 # (FUN(v, C1 ))[t]) plug (C2 # (SUCC(C1 ))[t]) = = = = = t plug (C2 plug (C2 plug (C2 plug (C2 # # # # C1 [hhtii ]) C1 [t t′ ]) C1 [v t]) C1 [succ t]) In order to talk about unique decomposition, we need to define the set of potential redexes (i.e., the disjoint union of actual redexes and stuck redexes). The grammar of potential redexes reads as follows: p ::= succ v | v0 v1 | Sk .t | h vii Lemma 1 (Unique decomposition). A program t is either a value v or there exist a unique context C1 , a unique meta-context C2 and a potential redex p such that t = plug (C2 # C1 [p]). In the former case decompose (t) = • # [v] and in the latter case either decompose (t) = C2 # C1 [p] if p is an actual redex, or decompose (t) is undefined. Proof. The first part follows by induction on the structure of t. The second part follows from the equation decompose (plug (C2 # C1 [r])) = C2 # C1 [r] which holds for all C2 , C1 and r. It is evident that evaluating a program either using the derived reduction rules or using the substitution-based abstract machine yields the same result. Theorem 3. For any program t and any value v, evals (t) = v if and only if t →∗ v, where →∗ is the reflexive, transitive closure of the one-step reduction defined by the relation →. Proof. When evaluating with the abstract machine, each contraction is followed by decomposing the contractum in the current context and meta-context. When evaluating with the reduction rules, however, each contraction is followed by plugging the contractum and decomposing the resulting term. Therefore, the theorem follows from the equation decompose ′ (t, C1 , C2 ) = decompose (plug (C2 # C1 [t])) which holds for any C2 , C1 and t. 18 M. BIERNACKA, D. BIERNACKI, AND O. DANVY We have verified that using refocusing [16,31], one can go from this reduction semantics to the abstract machine of Figure 8. 4.5. Beyond CPS. Alternatively to using the meta-context to compose delimited continuations, as in Figure 7, we could compose them by concatenating their representation [41]. Such a concatenation function is defined as follows: [ ] ⋆ C1′ (ARG((t, e), C1 )) ⋆ C1′ (SUCC(C1 )) ⋆ C1′ (FUN(v, C1 )) ⋆ C1′ = = = = C1′ ARG((t, e), C1 ⋆ C1′ ) SUCC(C1 ⋆ C1′ ) FUN(v, C1 ⋆ C1′ ) (The second clause would read (ARG(t, C1 )) ⋆ C1′ = ARG(t, C1 ⋆ C1′ ) for the contexts of Figure 8.) Then, in Figures 7 and 8, we could replace the transition hFUN(C1′ , C1 ), v, C2 icont1 ⇒ hC1′ , v, C2 · C1 icont1 hFUN(C1′ , C1 ), v, C2 icont1 ⇒ hC1′ ⋆ C1 , v, C2 icont1 by the following one: This replacement changes the control effect of shift to that of Felleisen et al.’s F operator [37]. Furthermore, the modified abstract machine is in structural correspondence with Felleisen et al.’s abstract machine for F and # [37, 41]. This representation of control (as a list of ‘stack frames’) and this implementation of composing delimited continuations (by concatenating these lists) are at the heart of virtually all non-CPS-based accounts of delimited control. However, the modified environment-based abstract machine does not correspond to a defunctionalized continuation-passing evaluator because it is not in the range of defunctionalization [30] since the first-order representation of functions should have a single point of consumption. Here, the constructors of contexts are not solely consumed by the cont1 transitions of the abstract machine as in Figures 7 and 8, but also by ⋆. Therefore, the abstract machine that uses ⋆ is not in the range of Reynolds’s defunctionalization and it thus does not immediately correspond to a higherorder, continuation-passing evaluator. In that sense, control operators using ⋆ go beyond CPS. Elsewhere [18], we have rephrased the modified abstract machine to put it in defunctionalized form, and we have exhibited the corresponding higher-order evaluator and the corresponding ‘dynamic’ continuation-passing style. This dynamic CPS is not just plain CPS but is a form of continuation+state-passing style where the threaded state is a list of intermediate delimited continuations. Unexpectedly, it is also in structural correspondence with the architecture for delimited control recently proposed by Dybvig, Peyton Jones, and Sabry on other operational grounds [35]. 4.6. Static vs. dynamic delimited continuations. Irrespectively of any new dynamic CPS and any new architecture for delimited control, there seems to be remarkably few examples that actually illustrate the expressive power of dynamic delimited continuations. We have recently presented one, breadth-first traversal [19], and we present another one below. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 19 The two following functions traverse a given list and return another list. The recursive call to visit is abstracted into a delimited continuation, which is applied to the tail of the list: foo xs def = letrec visit nil = nil | visit (x :: xs) = visit (Sk .x :: (k xs)) in h visit xsii bar xs def = letrec visit nil = nil | visit (x :: xs) = visit (Fk .x :: (k xs)) in h visit xsii On the left, foo uses S and on the right, bar uses F; for the rest, the two definitions are identical. Given an input list, foo copies it and bar reverses it. To explain this difference and to account for the extended source language, we need to expand the grammar of evaluation contexts, e.g., with a production to account for calls to the list constructor: C1 ::= [ ] | ARG(t, C1 ) | SUCC(C1 ) | FUN(v, C1 ) | CONS(v, C1 ) | . . . Similarly, we need to expand the definition of concatenation as follows: (CONS(v, C1 )) ⋆ C1′ = CONS(v, C1 ⋆ C1′ ) Here is a trace of the two computations in the form of the calls to and returns from visit for the input list 1 :: 2 :: nil : foo: Every time the captured continuation is resumed, its representation is kept separate from the current context. The meta-context therefore grows whereas the captured context solely consists of FUN(visit, [ ]) throughout (writing visit in the context for simplicity): C2 C2 · C1 C2 · C1 · (CONS(1, [ ])) C2 · C1 · (CONS(1, [ ])) · (CONS(2, [ ])) C2 · C1 · (CONS(1, [ ])) · (CONS(2, [ ])) C2 · C1 · (CONS(1, [ ])) C2 · C1 C2 # # # # # # # # C1 [hhvisit (1 :: 2 :: nil )ii] [visit (1 :: 2 :: nil)] [visit (2 :: nil )] [visit nil ] [nil ] [2 :: nil ] [1 :: 2 :: nil] C1 [1 :: 2 :: nil ] bar : Every time the captured continuation is resumed, its representation is concatenated to the current context. The meta-context therefore remains the same whereas the context changes dynamically. The first captured context is FUN(visit, [ ]); concatenating it to CONS(1, [ ]) yields CONS(1, FUN(visit, [ ])), which is the second captured context: C2 C2 · C1 C2 · C1 C2 · C1 C2 · C1 C2 · C1 C2 · C1 C2 # # # # # # # # C1 [hhvisit (1 :: 2 :: nil )ii] [visit (1 :: 2 :: nil)] (CONS(1, [ ]))[visit (2 :: nil )] (CONS(2, CONS(1, [ ])))[visit nil] (CONS(2, CONS(1, [ ])))[nil ] (CONS(2, [ ]))[1 :: nil ] [2 :: 1 :: nil] C1 [2 :: 1 :: nil ] 20 M. BIERNACKA, D. BIERNACKI, AND O. DANVY 4.7. Summary and conclusion. We have presented the original evaluator for the λcalculus with shift and reset; this evaluator uses two layers of continuations. From this call-by-value evaluator we have derived two abstract machines, an environment-based one and a substitution-based one; each of these machines uses two layers of evaluation contexts. Based on the substitution-based machine we have constructed a reduction semantics for the λ-calculus with shift and reset; this reduction semantics, by construction, is sound with respect to CPS. Finally, we have pointed out the difference between the static and dynamic delimited control operators at the level of the abstract machine and we have presented a simple but meaningful example illustrating their differing behavior. 5. From evaluator to reduction semantics for the CPS hierarchy We construct a reduction semantics for the call-by-value λ-calculus extended with shiftn and resetn . As in Section 4, we go from an evaluator to an environment-based abstract machine, and from a substitution-based abstract machine to a reduction semantics. Because of the regularity of CPS, the results can be generalized from level 1 to higher levels without repeating the actual construction, based only on the original specification of the hierarchy [28]. In particular, the proofs of the theorems generalize straightforwardly from level 1. 5.1. An environment-based evaluator. At the nth level of the hierarchy, the language is extended with operators shifti and reseti for all i such that 1 ≤ i ≤ n. The evaluator for this language is shown in Figures 9 and 10. If n = 1, it coincides with the evaluator displayed in Figure 6. The evaluator uses n+1 layers of continuations. In the five first clauses (literal, variable, λ-abstraction, function application, and application of the successor function), the continuations k2 , . . . , kn+1 are passive: if the evaluator were curried, they could be eta-reduced. In the clauses defining shifti and reseti , the continuations ki+2 , . . . , kn+1 are also passive. Each pair of control operators is indexed by the corresponding level in the hierarchy: reseti is used to “push” each successive continuation up to level i onto level i+ 1 and to reinitialize • Terms (1 ≤ i ≤ n): term ∋ t ::= pmq | x | λx .t | t0 t1 | succ t | h tiii | Si k .t • Values: val ∋ v ::= m | f • Answers, continuations and functions (1 ≤ i ≤ n): ans kn+1 ∈ contn+1 ki ∈ conti f ∈ fun = = = = val val → ans val × conti+1 × . . . × contn+1 → ans val × cont1 × . . . × contn+1 → ans • Initial continuations (1 ≤ i ≤ n): θi = λ(v, ki+1 , ki+2 , . . ., kn+1 ). ki+1 (v, ki+2 , . . ., kn+1 ) θn+1 = λv. v • Environments: env ∋ e ::= eempty | e[x 7→ v] • Evaluation function: see Figure 10 Figure 9: An environment-based evaluator for the CPS hierarchy at level n evaln (pmq, e, k1 , k2 , ..., kn+1 ) = k1 (m, k2 , ..., kn+1 ) evaln (x , e, k1 , k2 , ..., kn+1 ) = k1 (e(x ), k2 , ..., kn+1 ) ′ ′ ), k2 , ..., kn+1 ) ). evaln (t, e[x 7→ v], k1′ , k2′ , ..., kn+1 evaln (λx .t, e, k1 , k2 , ..., kn+1 ) = k1 (λ(v, k1′ , k2′ , ..., kn+1 evaln (t0 t1 , e, k1 , k2 , ..., kn+1 ) = evaln (t0 , e, ′ ). evaln (t1 , e, λ(f, k2′ , ..., kn+1 ′′ ). f (v, k , k ′′ , ..., k ′′ ), λ(v, k2′′ , ..., kn+1 1 n+1 2 ′ ′ k2 , ..., kn+1 ), k2 , ..., kn+1 ) ′ ′ evaln (succ t, e, k1 , k2 , ..., kn+1 ) = evaln (t, e, λ(m, k2′ , ..., kn+1 ). k1 (m + 1, k2′ , ..., kn+1 ), k2 , ..., kn+1 ) ′ , ..., k ′ ′ ′ evaln (hhtiii , e, k1 , k2 , ..., kn+1 ) = evaln (t, e, θ1 , . . ., θi , λ(v, ki+2 , ..., kn+1 ). k1 (v, k2 , ..., ki+1 , ki+2 n+1 ), ki+2 , ..., kn+1 ) evaln (Si k.t, e, k1 , k2 , ..., kn+1 ) = evaln (t, e[k 7→ ci ], θ1 , ..., θi , ki+1 , ..., kn+1 ) ′ ′′ ′′ ′ ′′ ′′ ′ ′ where ci = λ(v, k1′ , ..., kn+1 ). k1 (v, k2 , ..., ki , λ(v ′ , ki+2 , ..., kn+1 ). k1′ (v ′ , k2′ , ..., ki+1 , ki+2 , ..., kn+1 ), ki+2 , ..., kn+1 ) • Main function: evaluaten : term → val evaluaten (t) = evaln (t, eempty , θ1 , ..., θn , θn+1 ) Figure 10: An environment-based evaluator for the CPS hierarchy at level n, ctd. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 21 • Evaluation function (1 ≤ i ≤ n): evaln : term × env × cont1 × . . . × contn+1 → ans 22 M. BIERNACKA, D. BIERNACKI, AND O. DANVY them with θ1 , . . . , θi , which are the successive CPS counterparts of the identity function; shifti is used to abstract control up to level i into a delimited continuation and to reinitialize the successive continuations up to level i with θ1 , . . . , θi . Applying a delimited continuation that was abstracted up to level i “pushes” each successive continuation up to level i onto level i + 1 and restores the successive continuations that were captured in a delimited continuation. When such a delimited continuation completes, and when an expression delimited by reseti completes, the successive continuations that were pushed onto level i + 1 are “popped” back into place and the computation proceeds. 5.2. An environment-based abstract machine. Defunctionalizing the evaluator of Figures 9 and 10 yields the environment-based abstract machine displayed in Figures 11 and 12. If n = 1, it coincides with the abstract machine displayed in Figure 7. The abstract machine consists of n + 2 sets of transitions: eval for interpreting terms and cont 1 , . . . , cont n+1 for interpreting the successive defunctionalized continuations. The set of possible values includes integers, closures and captured contexts. This abstract machine is an extension of the abstract machine displayed in Figure 7 with n + 1 contexts instead of 2 and the corresponding transitions for shifti and reseti . Each metai+1 -context intervenes to process reseti expressions and to apply captured continuations. Otherwise, the successive contexts are passively threaded to process literals, variables, λ-abstractions, function applications, and applications of the successor function. Given an environment e and a series of successive contexts, a reseti expression h tiii is processed by evaluating t with the same environment e, i empty contexts, and a metai+1 context over which all the intermediate contexts have been pushed on. Given an environment e and a series of successive contexts, a shift expression Si k.t is processed by evaluating t with an extension of e where k denotes a composition of the i surrounding contexts, i empty contexts, and the remaining outer contexts. Applying a captured context is achieved by pushing all the current contexts on the next outer context, restoring the composition of the captured contexts, and continuing with them. Resuming a composition of captured contexts is achieved by popping them off the next outer context and continuing with them. In order to relate the resulting abstract machine to the evaluator, we define a partial function evalen mapping a term t to a value v whenever the machine for level n, started with • Terms (1 ≤ i ≤ n): t ::= pmq | x | λx .t | t0 t1 | succ t | h tiii | Si k .t • Values (1 ≤ i ≤ n): v ::= m | [x , t, e] | Ci • Evaluation contexts (2 ≤ i ≤ n + 1): C1 ::= [ ] | ARG((t, e), C1 ) | SUCC(C1 ) | FUN(v, C1 ) Ci ::= [ ] | Ci · Ci−1 • Environments: e ::= eempty | e[x 7→ v] • Initial transition, transition rules, and final transition: see Figure 12 Figure 11: An environment-based abstract machine for the CPS hierarchy at level n t ⇒ ht, eempty , [ ], [ ], ..., [ ]ieval hpmq, hx , hλx .t, ht0 t1 , hsucc t, hhhtiii , hSi k .t, e, e, e, e, e, e, e, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG((t, e), C1 ), v, hSUCC(C1 ), m, hFUN([x , t, e], C1 ), v, hFUN(Ci′ · (...(C2′ · C1′ )...), C1 ), v, C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , m, C2 , ..., Cn+1 icont1 hC1 , e (x ), C2 , ..., Cn+1 icont1 hC1 , [x , t, e], C2 , ..., Cn+1 icont1 ht0 , e, ARG((t1 , e), C1 ), C2 , ..., Cn+1 ieval ht, e, SUCC(C1 ), C2 , ..., Cn+1 ieval ht, e, [ ], ..., [ ], Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 ieval ht, e[k 7→ Ci · (...(C2 · C1 )...)], [ ], ..., [ ], Ci+1 , ..., Cn+1 ieval Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , v, C3 , ..., Cn+1 icont2 ht, e, FUN(v, C1 ), C2 , ..., Cn+1 ieval hC1 , m + 1, C2 , ..., Cn+1 icont1 ht, e[x 7→ v], C1 , C2 , ..., Cn+1 ieval hC1′ , v, C2′ , ..., Ci′ , Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 icont1 h[ ], v, Cj+1 , ..., Cn+1 icontj hCj · (...(C2 · C1 )...), v, Cj+1 , ..., Cn+1 icontj hCn+1 · (...(C2 · C1 )...), vicontn+1 h[ ], vicontn+1 ⇒ hCj+1 , v, Cj+2 , ..., Cn+1 icontj +1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ v Figure 12: An environment-based abstract machine for the CPS hierarchy at level n, ctd. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 23 • Initial transition, transition rules, and final transition (1 ≤ i ≤ n, 2 ≤ j ≤ n): 24 M. BIERNACKA, D. BIERNACKI, AND O. DANVY t, stops with v. The correctness of the machine with respect to the evaluator is ensured by the following theorem: Theorem 4. For any program t and any integer value m, evaluaten (t) = m if and only if evalen (t) = m. 5.3. A substitution-based abstract machine. In the same fashion as in Section 4.3, we construct the substitution-based abstract machine corresponding to the environment-based abstract machine of Section 5.2. The result is displayed in Figures 13 and 14. If n = 1, it coincides with the abstract machine displayed in Figure 8. The nth level contains n + 1 evaluation contexts and each context Ci can be viewed as a stack of non-empty contexts Ci−1 . Terms are decomposed as Cn+1 #n Cn #n−1 Cn−1 #n−2 · · · #2 C2 #1 C1 [t], where each #i represents a context delimiter of level i. All the control operators that occur at the jth level (with j < n) of the hierarchy do not use the contexts j + 2, . . . , n + 1. The functions decompose and its inverse plug can be read off the machine, as for level 1. The transitions of the machine for level j are “embedded” in the machine for level j + 1; the extra components are threaded but not used. We define a partial function evalsn capturing the evaluation by the substitution-based abstract machine for an arbitrary level n, analogously to the definition of evalen . Now we can relate evaluation with the environment-based and the substitution-based abstract machines for level n. Theorem 5. For any program t, either both evalsn (t) and evalen (t) are undefined, or there exist values v, v ′ such that evalsn (t) = v, evalen (t) = v ′ and Tn (v ′ ) = v. The definition of Tn extends that of T from Theorem 2 in such a way that it is homomorphic for all the contexts Ci , with 2 ≤ i ≤ n. 5.4. A reduction semantics. Along the same lines as in Section 4.4, we construct the reduction semantics for the CPS hierarchy based on the abstract machine of Figures 13 and 14. For an arbitrary level n we obtain the following set of reduction rules, for all • Terms and values (1 ≤ i ≤ n): t ::= v | x | t0 t1 | succ t | h tiii | Si k .t v ::= pmq | λx .t | Ci • Evaluation contexts (2 ≤ i ≤ n + 1): C1 ::= [ ] | ARG(t, C1 ) | SUCC(C1 ) | FUN(v, C1 ) Ci ::= [ ] | Ci · Ci−1 • Initial transition, transition rules, and final transition: see Figure 14 Figure 13: A substitution-based abstract machine for the CPS hierarchy at level n t ⇒ ht, [ ], [ ], ..., [ ]ieval hpmq, hλx .t, hCi′ , ht0 t1 , hsucc t, hhhtiii , hSi k .t, C1 , C1 , C1 , C1 , C1 , C1 , C1 , h[ ], v, hARG(t, C1 ), v, hSUCC(C1 ), pmq, hFUN((λx .t), C1 ), v, hFUN(Ci′ · (...(C2′ · C1′ )...), C1 ), v, C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , C2 , ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., ..., Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval Cn+1 ieval ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ ⇒ hC1 , pmq, C2 , ..., Cn+1 icont1 hC1 , λx .t, C2 , ..., Cn+1 icont1 hC1 , Ci′ , C2 , ..., Cn+1 icont1 ht0 , ARG((t1 , e), C1 ), C2 , ..., Cn+1 ieval ht, SUCC(C1 ), C2 , ..., Cn+1 ieval ht, [ ], ..., [ ], Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 ieval ht{Ci · (...(C2 · C1 )...)/k }, [ ], ..., [ ], Ci+1 , ..., Cn+1 ieval Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 Cn+1 icont1 ⇒ ⇒ ⇒ ⇒ ⇒ hC2 , v, C3 , ..., Cn+1 icont2 ht, FUN(v, C1 ), C2 , ..., Cn+1 ieval hC1 , pm + 1q, C2 , ..., Cn+1 icont1 ht{v/x }, C1 , C2 , ..., Cn+1 ieval hC1′ , v, C2′ , ..., Ci′ , Ci+1 · (...(C2 · C1 )...), Ci+2 , ..., Cn+1 icont1 h[ ], v, Cj+1 , ..., Cn+1 icontj hCj · (...(C2 · C1 )...), v, Cj+1 , ..., Cn+1 icontj hCn+1 · (...(C2 · C1 )...), vicontn+1 h[ ], vicontn+1 ⇒ hCj+1 , v, Cj+2 , ..., Cn+1 icontj +1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ hC1 , v, C2 , ..., Cn+1 icont1 ⇒ v Figure 14: A substitution-based abstract machine for the the CPS hierarchy at level n, ctd. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 25 • Initial transition, transition rules, and final transition (1 ≤ i ≤ n, 2 ≤ j ≤ n): 26 M. BIERNACKA, D. BIERNACKI, AND O. DANVY 1 ≤ i ≤ n; they define the actual redexes: (δ) Cn+1 #n · · · #1 C1 [succ pmq] →n Cn+1 #n · · · #1 C1 [pm + 1q] (βλ ) Cn+1 #n · · · #1 C1 [(λx .t) v] →n Cn+1 #n · · · #1 C1 [t{v/x }] (Sλi ) Cn+1 #n · · · #1 C1 [Si k .t] →n Cn+1 #n · · · #i+1 Ci+1 #i [ ] . . . #1 [t{Ci · (. . . (C2 · C1 ) . . .)/k }] i ) (βctx Cn+1 #n · · · #1 C1 [Ci′ · (. . . (C2′ · C1′ ) . . .) v] →n Cn+1 #n · · · #i+1 Ci+1 · (. . . (C2 · C1 ) . . .) #i Ci′ #i−1 · · · #1 C1′ [v] (Reseti ) Cn+1 #n · · · #1 C1 [hhviii ] →n Cn+1 #n · · · #1 C1 [v] Each level contains all the reductions from lower levels, and these reductions are compatible with additional layers of evaluation contexts. In particular, at level 0 there are only δ- and βλ -reductions. The values and evaluation contexts are already specified in the abstract machine. Moreover, the potential redexes are defined according to the following grammar: pn ::= succ v | v0 v1 | Si k .t | h viii (1 ≤ i ≤ n) Lemma 2 (Unique decomposition for level n). A program t is either a value or there exists a unique sequence of contexts C1 , . . . , Cn+1 and a potential redex pn such that t = plug (Cn+1 #n · · · #1 C1 [pn ]). Evaluating a term using either the derived reduction rules or the substitution-based abstract machine from Section 5.3 yields the same result: Theorem 6. For any program t and any value v, evalsn (t) = v if and only if t →∗n v, where →∗n is the reflexive, transitive closure of →n . As in Section 4.4, using refocusing, one can go from a given reduction semantics of Section 5.4 into a pre-abstract machine and the corresponding eval/apply abstract machine of Figures 13 and 14. 5.5. Beyond CPS. As in Section 4.5, one can define a family of concatenation functions over contexts and use it to implement composable continuations in the CPS hierarchy, giving rise to a family of control operators Fn and #n . Again the modified environmentbased abstract machine does not immediately correspond to a defunctionalized continuationpassing evaluator. Such control operators go beyond traditional CPS. 5.6. Static vs. dynamic delimited continuations. As in Section 4.6, one can illustrate the difference between static and dynamic delimited continuations in the CPS hierarchy. For example, replacing shift2 and reset2 respectively by F2 and #2 in Danvy and Filinski’s version of Abelson and Sussman’s generator of triples [28, Section 3] yields a list in reverse order.4 5.7. Summary and conclusion. We have generalized the results presented in Section 4 from level 1 to the whole CPS hierarchy of control operators shiftn and resetn . Starting from the original evaluator for the λ-calculus with shiftn and resetn that uses n + 1 layers of continuations, we have derived two abstract machines, an environment-based one and a substitution-based one; each of these machines use n + 1 layers of evaluation contexts. 4Thanks are due to an anonymous reviewer for pointing this out. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 27 Based on the substitution-based machine we have obtained a reduction semantics for the λ-calculus extended with shiftn and resetn which, by construction, is sound with respect to CPS. 6. Programming in the CPS hierarchy To finish, we present new examples of programming in the CPS hierarchy. The examples are normalization functions. In Sections 6.1 and 6.2, we first describe normalization by evaluation and we present the simple example of the free monoid. In Section 6.3, we present a function mapping a proposition into its disjunctive normal form; this normalization function uses delimited continuations. In Section 6.4, we generalize the normalization functions of Sections 6.2 and 6.3 to a hierarchical language of units and products, and we express the corresponding normalization function in the CPS hierarchy. 6.1. Normalization by evaluation. Normalization by evaluation is a ‘reduction-free’ approach to normalizing terms. Instead of reducing a term to its normal form, one evaluates this term into a non-standard model and reifies its denotation into its normal form [34]: eval reify normalize normalize : : : = term → value value → term nf term → term nf reify ◦ eval Normalization by evaluation has been developed in intuitionistic type theory [20, 63], proof theory [12,13], category theory [4], and partial evaluation [22,23], where it has emerged as a new field of application for delimited continuations [9, 23, 34, 44, 48, 51, 78]. 6.2. The free monoid. A source term in the free monoid is either a variable, the unit element, or the product of two terms: term ∋ t ::= x | ε | t ⋆ t′ The product is associative and the unit element is neutral. These properties justify the following conversion rules: t ⋆ (t′ ⋆ t′′ ) ↔ (t ⋆ t′ ) ⋆ t′′ t⋆ε ↔ t ε⋆t ↔ t We aim (for example) for list-like flat normal forms: t term nf ∋ b t ::= εnf | x ⋆nf b In a reduction-based approach to normalization, one would orient the conversion rules into reduction rules and one would apply these reduction rules until a normal form is obtained: t ⋆ (t′ ⋆ t′′ ) ← (t ⋆ t′ ) ⋆ t′′ ε⋆t → t In a reduction-free approach to normalization, one defines a normalization function as the composition of a non-standard evaluation function and a reification function. Let us state such a normalization function. 28 M. BIERNACKA, D. BIERNACKI, AND O. DANVY The non-standard domain of values is the transformer value = term nf → term nf . The evaluation function is defined by induction over the syntax of source terms, and the reification function inverts it: eval x = λt.x ⋆nf t eval ε = λt.t eval (t ⋆ t′ ) = (eval t) ◦ (eval t′ ) reify v = v εnf normalize t = reify (eval t) In effect, eval is a homomorphism from the source monoid to the monoid of transformers (unit is mapped to unit and products are mapped to products) and the normalization function hinges on the built-in associativity of function composition. Beylin, Dybjer, Coquand, and Kinoshita have studied its theoretical content [14, 20, 58]. From a (functional) programming standpoint, the reduction-based approach amounts to flattening a tree iteratively by reordering it, and the reduction-free approach amounts to flattening a tree with an accumulator. 6.3. A language of propositions. A source term, i.e., a proposition, is either a variable, a literal (true or false), a conjunction, or a disjunction: term ∋ t ::= x | true | t ∧ t′ | false | t ∨ t′ Conjunction and disjunction are associative and distribute over each other; true is neutral for conjunction and absorbant for disjunction; and false is neutral for disjunction and absorbant for conjunction. We aim (for example) for list-like disjunctive normal forms: term nf ∋ b t ::= d nf term d ∋ d ::= false nf | c ∨nf d nf | x ∧nf c term nf c ∋ c ::= true Our normalization function is the result of composing a non-standard evaluation function and a reification function. We state them below without proof. Given the domains of transformers nf F1 = term nf c → term c nf nf F2 = term d → term d the non-standard domain of values is ans 1 , where ans 2 = F2 ans 1 = (F1 → ans 2 ) → ans 2 . AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 29 The evaluation function is defined by induction over the syntax of source terms, and the reification function inverts it: eval 0 x k d eval 0 true k d eval 0 (t ∧ t′ ) k d eval 0 false k d eval 0 (t ∨ t′ ) k d = = = = = k (λc.x ∧nf c) d k (λc.c) d eval 0 t (λf1 .eval 0 t′ (λf1′ .k (f1 ◦ f1′ ))) d d eval 0 t k (eval 0 t′ k d) reify 0 v = v (λf1 .λd.(f1 true nf ) ∨nf d) false nf normalize t = reify 0 (eval 0 t) This normalization function uses a continuation k, an accumulator d to flatten disjunctions, and another one c to flatten conjunctions. The continuation is delimited: the three first clauses of eval 0 are in CPS; in the fourth, k is discarded (accounting for the fact that false is absorbant for conjunction); and in the last, k is duplicated and used in non-tail position (achieving the distribution of conjunctions over disjunctions). The continuation and the accumulators are initialized in the definition of reify 0 . Uncurrying the continuation and mapping eval 0 and reify 0 back to direct style yield the following definition, which lives at level 1 of the CPS hierarchy: eval 1 x d = (λc.x ∧nf c, d) eval 1 true d = (λc.c, d) eval 1 (t ∧ t′ ) d = let (f1 , d) = eval 1 t d in let (f1′ , d) = eval 1 t′ d in (f1 ◦ f1′ , d) eval 1 false d = Sk.d eval 1 (t ∨ t′ ) d = Sk.k (eval 1 t h k (eval 1 t′ d)ii) reify 1 v = h let (f1 , d) = v false nf in (f1 true nf ) ∨nf dii normalize t = reify 1 (eval 1 t) The three first clauses of eval 1 are in direct style; the two others abstract control with shift. In the fourth clause, the context is discarded; and in the last clause, the context is duplicated and composed. The context and the accumulators are initialized in the definition of reify 1 . This direct-style version makes it even more clear than the CPS version that the accumulator for the disjunctions in normal form is a threaded state. A continuation-based, state-based version (or better, a monad-based one) can therefore be written—but it is out of scope here. 6.4. A hierarchical language of units and products. We consider a generalization of propositional logic where a source term is either a variable, a unit in a hierarchy of units, or a product in a hierarchy of products: term ∋ t ::= x | εi | t ⋆i t′ where 1 ≤ i ≤ n. All the products are associative. All units are neutral for products with the same index. 30 M. BIERNACKA, D. BIERNACKI, AND O. DANVY The free monoid: The language corresponds to that of the free monoid if n = 1, as in Section 6.2. Boolean logic: The language corresponds to that of propositions if n = 2, as in Section 6.3: ε1 is true, ⋆1 is ∧, ε2 is false, and ⋆2 is ∨. Multi-valued logic: In general, for each n > 2 we can consider a suitable n-valued logic [47]; for example, in case n = 4, the language corresponds to that of Belnap’s bilattice FOU R [11]. It is also possible to modify the normalization function to work for less regular logical structures (e.g., other bilattices). Monads: In general, the language corresponds to that of layered monads [64]: each unit element is the unit of the corresponding monad, and each product is the ‘bind’ of the corresponding monad. In practice, layered monads are collapsed into one for programming consumption [43], but prior to this collapse, all the individual monad operations coexist in the computational soup. In the remainder of this section, we assume that all the products, besides being associative, distribute over each other, and that all units, besides being neutral for products with the same index, are absorbant for products with other indices. We aim (for example) for a generalization of disjunctive normal forms: term nf ∋ b t ::= tn nf nf term nf ∋ t n ::= εn | tn−1 ⋆n tn n .. . nf nf term nf 1 ∋ t1 ::= ε1 | t0 ⋆1 t1 term nf 0 ∋ t0 ::= x For presentational reasons, in the remainder of this section we arbitrarily fix n to be 5. Our normalization function is the result of composing a non-standard evaluation function and a reification function. We state them below without proof. Given the domains of transformers nf F1 = term nf 1 → term 1 nf F2 = term nf 2 → term 2 nf nf F3 = term 3 → term 3 nf F4 = term nf 4 → term 4 nf F5 = term nf 5 → term 5 the non-standard domain of values is ans 1 , where ans 5 ans 4 ans 3 ans 2 ans 1 = = = = = F5 (F4 (F3 (F2 (F1 → → → → ans 5 ) ans 4 ) ans 3 ) ans 2 ) → → → → ans 5 ans 4 ans 3 ans 2 . AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 31 The evaluation function is defined by induction over the syntax of source terms, and the reification function inverts it: eval 0 x k1 k2 k3 k4 t5 eval 0 ε1 k1 k2 k3 k4 t5 eval 0 (t ⋆1 t′ ) k1 k2 k3 k4 t5 eval 0 ε2 k1 k2 k3 k4 t5 eval 0 (t ⋆2 t′ ) k1 k2 k3 k4 t5 eval 0 ε3 k1 k2 k3 k4 t5 eval 0 (t ⋆3 t′ ) k1 k2 k3 k4 t5 eval 0 ε4 k1 k2 k3 k4 t5 eval 0 (t ⋆4 t′ ) k1 k2 k3 k4 t5 eval 0 ε5 k1 k2 k3 k4 t5 eval 0 (t ⋆5 t′ ) k1 k2 k3 k4 t5 = = = = = = = = = = = k1 (λt1 .x ⋆nf 1 t1 ) k2 k3 k4 t5 k1 (λt1 .t1 ) k2 k3 k4 t5 eval 0 t (λf1 .eval 0 t′ (λf1′ .k1 (f1 ◦ f1′ ))) k2 k3 k4 t5 k2 (λt2 .t2 ) k3 k4 t5 eval 0 t k1 (λf2 .eval 0 t′ k1 (λf2′ .k2 (f2 ◦ f2′ ))) k3 k4 t5 k3 (λt3 .t3 ) k4 t5 eval 0 t k1 k2 (λf3 .eval 0 t′ k1 k2 (λf3′ .k3 (f3 ◦ f3′ ))) k4 t5 k4 (λt4 .t4 ) t5 eval 0 t k1 k2 k3 (λf4 .eval 0 t′ k1 k2 k3 (λf4′ .k4 (f4 ◦ f4′ ))) t5 t5 eval 0 t k1 k2 k3 k4 (eval 0 t′ k1 k2 k3 k4 t5 ) nf reify 0 v = v (λf1 .λk2 .k2 (λt2 .(f1 εnf 1 ) ⋆2 t2 )) nf (λf2 .λk3 .k3 (λt3 .(f2 εnf 2 ) ⋆3 t3 )) nf nf (λf3 .λk4 .k4 (λt4 .(f3 ε3 ) ⋆4 t4 )) nf (λf4 .λt5 .(f4 εnf 4 ) ⋆5 t5 ) ε5 normalize t = reify 0 (eval 0 t) This normalization function uses four delimited continuations k1 , k2 , k3 , k4 and five accumulators t1 , t2 , t3 , t4 , t5 to flatten each of the successive products. In the clause of each εi , the continuations k1 , . . . , ki−1 are discarded, accounting for the fact that εi is absorbant for ⋆1 , . . . , ⋆i−1 , and the identity function is passed to ki , accounting for the fact that εi is neutral for ⋆i . In the clause of each ⋆i+1 , the continuations k1 , . . . , ki are duplicated and used in non-tail position, achieving the distribution of ⋆i+1 over ⋆1 , . . . , ⋆i . The continuations and the accumulators are initialized in the definition of reify 0 . This normalization function lives at level 0 of the CPS hierarchy, but we can express it at a higher level using shift and reset. For example, uncurrying k3 and k4 and mapping eval 0 and reify 0 back to direct style twice yield the following intermediate definition, which lives at level 2: eval 2 x k1 k2 t5 = k1 (λt1 .x ⋆nf 1 t1 ) k2 t5 eval 2 ε1 k1 k2 t5 = k1 (λt1 .t1 ) k2 t5 eval 2 (t ⋆1 t′ ) k1 k2 t5 = eval 2 t (λf1 .eval 2 t′ (λf1′ .k1 (f1 ◦ f1′ ))) k2 t5 eval 2 ε2 k1 k2 t5 = k2 (λt2 .t2 ) t5 eval 2 (t ⋆2 t′ ) k1 k2 t5 = eval 2 t k1 (λf2 .eval 2 t′ k1 (λf2′ .k2 (f2 ◦ f2′ ))) t5 eval 2 ε3 k1 k2 t5 = (λt3 .t3 , t5 ) eval 2 (t ⋆3 t′ ) k1 k2 t5 = let (f3 , t5 ) = eval 2 t k1 k2 t5 in let (f3′ , t5 ) = eval 2 t′ k1 k2 t5 in (f3 ◦ f3′ , t5 ) 32 M. BIERNACKA, D. BIERNACKI, AND O. DANVY eval 2 ε4 k1 k2 t5 = S1 k3 .(λt4 .t4 , t5 ) eval 2 (t ⋆4 t′ ) k1 k2 t5 = S1 k3 .let (f4 , t5 ) = h k3 (eval 2 t k1 k2 t5 )ii1 in let (f4′ , t5 ) = h k3 (eval 2 t′ k1 k2 t5 )ii1 in (f4 ◦ f4′ , t5 ) eval 2 ε5 k1 k2 t5 = S2 k4 .t5 eval 2 (t ⋆5 t′ ) k1 k2 t5 = S1 k3 .S2 k4 .let t5 = h k4 h k3 (eval 2 t′ k1 k2 t5 )ii1 i 2 in h k4 h k3 (eval 2 t k1 k2 t5 )ii1 i 2 nf reify 2 v = h let (f4 , t5 ) = h let (f3 , t5 ) = v (λf1 .λk2 .k2 (λt2 .(f1 εnf 1 ) ⋆2 t2 )) nf nf (λf2 .λt3 .(f2 ε2 ) ⋆3 t3 ) ε5 nf i1 in (λf4 .(f3 ε3 ) ⋆nf 4 t4 , t5 )i nf nf in (f4 ε4 ) ⋆5 t5 i 2 normalize t = reify 2 (eval 2 t) Whereas eval 0 had four layered continuations, eval 2 has only two layered continuations since it has been mapped back to direct style twice. Where eval 0 accesses k3 as one of its parameters, eval 2 abstracts the first layer of control with shift1 , and where eval 0 accesses k4 as one of its parameters, eval 2 abstracts the first and the second layer of control with shift2 . Uncurrying k1 and k2 and mapping eval 2 and reify 2 back to direct style twice yield the following direct-style definition, which lives at level 4 of the CPS hierarchy: eval 4 x t5 = (λt1 .x ⋆nf 1 t1 , t5 ) eval 4 ε1 t5 = (λt1 .t1 , t5 ) eval 4 (t ⋆1 t′ ) t5 = let (f1 , t5 ) = eval 4 t t5 in let (f1′ , t5 ) = eval 4 t′ t5 in (f1 ◦ f1′ , t5 ) eval 4 ε2 t5 = S1 k1 .(λt2 .t2 , t5 ) eval 4 (t ⋆2 t′ ) t5 = S1 k1 .let (f2 , t5 ) = h k1 (eval 4 t t5 )ii1 in let (f2′ , t5 ) = h k1 (eval 4 t′ t5 )ii1 in (f2 ◦ f2′ , t5 ) eval 4 ε3 t5 = S2 k2 .(λt3 .t3 , t5 ) eval 4 (t ⋆3 t′ ) t5 = S1 k1 .S2 k2 .let (f3 , t5 ) = h k2 h k1 (eval 4 t t5 )ii1 i 2 in let (f3′ , t5 ) = h k2 h k1 (eval 4 t′ t5 )ii1 i 2 in (f3 ◦ f3′ , t5 ) eval 4 ε4 t5 = S3 k3 .(λt4 .t4 , t5 ) eval 4 (t ⋆4 t′ ) t5 = S1 k1 .S2 k2 .S3 k3 .let (f4 , t5 ) = h k3 h k2 h k1 (eval 4 t t5 )ii1 i 2 i 3 in let (f4′ , t5 ) = h k3 h k2 h k1 (eval 4 t′ t5 )ii1 i 2 i 3 in (f4 ◦ f4′ , t5 ) eval 4 ε5 t5 = S4 k4 .t5 eval 4 (t ⋆5 t′ ) t5 = S1 k1 .S2 k2 .S3 k3 .S4 k4 .let t5 = h k4 h k3 h k2 h k1 (eval 4 t′ t5 )ii1 i 2 i 3 i 4 in h k4 h k3 h k2 h k1 (eval 4 t t5 )ii1 i 2 i 3 i 4 AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 33 reify 4 v = h let (f4 , t5 ) = h let (f3 , t5 ) = h let (f2 , t5 ) = h let (f1 , t5 ) = v ε5 nf i1 in (λf2 .(f1 εnf 1 ) ⋆2 t2 , t5 )i nf nf in (λf3 .(f2 ε2 ) ⋆3 t3 , t5 )ii2 nf in (λf4 .(f3 εnf ) i3 3 ⋆4 t4 , t5 )i nf nf in (f4 ε4 ) ⋆5 t5 i 4 normalize t = reify 4 (eval 4 t) Whereas eval 2 had two layered continuations, eval 4 has none since it has been mapped back to direct style twice. Where eval 2 accesses k1 as one of its parameters, eval 4 abstracts the first layer of control with shift1 , and where eval 2 accesses k2 as one of its parameters, eval 4 abstracts the first and the second layer of control with shift2 . Where eval 2 uses reset1 and shift1 , eval 4 uses reset3 and shift3 , and where eval 2 uses reset2 and shift2 , eval 4 uses reset4 and shift4 . 6.5. A note about efficiency. We have implemented all the definitions of Section 6.4 as well as the intermediate versions eval 1 and eval 3 in ML [32]. We have also implemented hierarchical normalization functions for other values than 5. For high products (i.e., in Section 6.4, for source terms using ⋆3 and ⋆4 ), the normalization function living at level 0 of the CPS hierarchy is the most efficient one. On the other hand, for low products (i.e., in Section 6.4, for source terms using ⋆1 and ⋆2 ), the normalization functions living at a higher level of the CPS hierarchy are the most efficient ones. These relative efficiencies are explained in terms of resources: • Accessing to a continuation as an explicit parameter is more efficient than accessing to it through a control operator. • On the other hand, the restriction of eval 4 to source terms that only use ε1 and ⋆1 is in direct style, whereas the corresponding restrictions of eval 2 and eval 0 pass a number of extra parameters. These extra parameters penalize performance. The better performance of programs in the CPS hierarchy has already been reported for level 1 in the context of continuation-based partial evaluation [61], and it has been reported for a similar “pay as you go” reason: a program that abstracts control relatively rarely is run more efficiently in direct style with a control operator rather than in continuation-passing style. 6.6. Summary and conclusion. We have illustrated the CPS hierarchy with an application of normalization by evaluation that naturally involves successive layers of continuations and that demonstrates the expressive power of shiftn and resetn . The application also suggests alternative control operators that would fit better its continuation-based programming pattern. For example, instead of representing a delimited continuation as a function and apply it as such, we could represent it as a continuation and apply it with a ‘throw’ operator as in MacLisp and Standard ML of New Jersey. For another example, instead of throwing a value to a continuation, we could specify the continuation of a computation, e.g., with a reflect i special form. For a third example, instead of abstracting control up to a layer n, we could give access to each of the successive layers up to n, e.g., with a Ln operator. Then instead of eval 4 (t ⋆4 t′ ) t5 = S1 k1 .S2 k2 .S3 k3 .let (f4 , t5 ) = h k3 h k2 h k1 (eval 4 t t5 )ii1 i 2 i 3 in let (f4′ , t5 ) = h k3 h k2 h k1 (eval 4 t′ t5 )ii1 i 2 i 3 in (f4 ◦ f4′ , t5 ) 34 M. BIERNACKA, D. BIERNACKI, AND O. DANVY one could write eval 4 (t ⋆4 t′ ) t5 = L3 (k1 , k2 , k3 ).let (f4′ , t5 ) = reflect 3 (eval 4 t t5 , k1 , k2 , k3 ) in let (f4′ , t5 ) = reflect 3 (eval 4 t′ t5 , k1 , k2 , k3 ) in (f4 ◦ f4′ , t5 ). Such alternative control operators can be more convenient to use, while being compatible with CPS. 7. Conclusion and issues We have used CPS as a guideline to establish an operational foundation for delimited continuations. Starting from a call-by-value evaluator for λ-terms with shift and reset, we have mechanically derived the corresponding abstract machine. From this abstract machine, it is straightforward to obtain a reduction semantics of delimited control that, by construction, is compatible with CPS—both for one-step reduction and for evaluation. These results can also be established without the guideline of CPS, but less easily. The whole approach generalizes straightforwardly to account for the shiftn and resetn family of delimited-control operators and more generally for any control operators that are compatible with CPS. These results would be non-trivial to establish without the guideline of CPS. Defunctionalization provides a key for connecting continuation-passing style and operational intuitions about control. Indeed most of the time, control stacks and evaluation contexts are the defunctionalized continuations of an evaluator. Defunctionalization also provides a key for identifying where operational intuitions about control go beyond CPS (see Section 4.5). We do not know whether CPS is the ultimate answer, but the present work shows yet another example of its usefulness. It is like nothing can go wrong with CPS. Acknowledgments We are grateful to Mads Sig Ager, Julia Lawall, Jan Midtgaard, and the referees of CW’04 and of LMCS for their comments. The third author would also like to thank Samuel Lindley for our joint initial study of the normalization functions of Section 6. This work is partially supported by the ESPRIT Working Group APPSEM II (http://www.appsem.org), by the Danish Natural Science Research Council, Grant no. 2102-0474 (for the two first authors) and Grant no. 21-03-0545 (for the third author), and by BRICS (Basic Research in Computer Science (http://www.brics.dk), funded by the Danish National Research Foundation). References [1] Mads Sig Ager, Dariusz Biernacki, Olivier Danvy, and Jan Midtgaard. A functional correspondence between evaluators and abstract machines. In Dale Miller, editor, Proceedings of the Fifth ACM-SIGPLAN International Conference on Principles and Practice of Declarative Programming (PPDP’03), pages 8– 19. ACM Press, August 2003. [2] Mads Sig Ager, Olivier Danvy, and Jan Midtgaard. A functional correspondence between call-by-need evaluators and lazy abstract machines. Information Processing Letters, 90(5):223–232, 2004. Extended version available as the technical report BRICS-RS-04-3. [3] Mads Sig Ager, Olivier Danvy, and Jan Midtgaard. A functional correspondence between monadic evaluators and abstract machines for languages with computational effects. Theoretical Computer Science, 342(1):149–172, 2005. Extended version available as the technical report BRICS RS-04-28. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 35 [4] Thorsten Altenkirch, Martin Hofmann, and Thomas Streicher. Categorical reconstruction of a reductionfree normalization proof. In David H. Pitt, David E. Rydeheard, and Peter Johnstone, editors, Category Theory and Computer Science, number 953 in Lecture Notes in Computer Science, pages 182–199, Cambridge, UK, August 1995. Springer-Verlag. [5] Zena M. Ariola, Hugo Herbelin, and Amr Sabry. A type-theoretic foundation of continuations and prompts. In Fisher [45], pages 40–53. [6] Kenichi Asai. Online partial evaluation for shift and reset. In Peter Thiemann, editor, Proceedings of the 2002 ACM SIGPLAN Workshop on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 2002), SIGPLAN Notices, Vol. 37, No 3, pages 19–30, Portland, Oregon, March 2002. ACM Press. [7] Kenichi Asai. Offline partial evaluation for shift and reset. In Nevin Heintze and Peter Sestoft, editors, Proceedings of the 2004 ACM SIGPLAN Symposium on Partial Evaluation and Semantics-Based Program Manipulation (PEPM 2004), pages 3–14, Verona, Italy, August 2003. ACM Press. [8] Vincent Balat, Roberto Di Cosmo, and Marcelo P. Fiore. Extensional normalisation and type-directed partial evaluation for typed lambda calculus with sums. In Xavier Leroy, editor, Proceedings of the Thirty-First Annual ACM Symposium on Principles of Programming Languages, pages 64–76, Venice, Italy, January 2004. ACM Press. [9] Vincent Balat and Olivier Danvy. Memoization in type-directed partial evaluation. In Don Batory, Charles Consel, and Walid Taha, editors, Proceedings of the 2002 ACM SIGPLAN/SIGSOFT Conference on Generative Programming and Component Engineering, number 2487 in Lecture Notes in Computer Science, pages 78–92, Pittsburgh, Pennsylvania, October 2002. Springer-Verlag. [10] Anindya Banerjee, Nevin Heintze, and Jon G. Riecke. Design and correctness of program transformations based on control-flow analysis. In Naoki Kobayashi and Benjamin C. Pierce, editors, Theoretical Aspects of Computer Software, 4th International Symposium, TACS 2001, number 2215 in Lecture Notes in Computer Science, pages 420–447, Sendai, Japan, October 2001. Springer-Verlag. [11] Nuel D. Belnap. How a computer should think. In Gilbert Ryle, editor, Proceedings of the Oxford International Symposium on Contemporary Aspects of Philosophy, pages 30–56, Oxford, England, 1976. Oriel Press. [12] Ulrich Berger, Matthias Eberl, and Helmut Schwichtenberg. Normalization by evaluation. In Bernhard Möller and John V. Tucker, editors, Prospects for hardware foundations (NADA), number 1546 in Lecture Notes in Computer Science, pages 117–137, Berlin, Germany, 1998. Springer-Verlag. [13] Ulrich Berger and Helmut Schwichtenberg. An inverse of the evaluation functional for typed λ-calculus. In Gilles Kahn, editor, Proceedings of the Sixth Annual IEEE Symposium on Logic in Computer Science, pages 203–211, Amsterdam, The Netherlands, July 1991. IEEE Computer Society Press. [14] Ilya Beylin and Peter Dybjer. Extracting a proof of coherence for monoidal categories from a proof of normalization for monoids. In Stefano Berardi and Mario Coppo, editors, Types for Proofs and Programs, International Workshop TYPES’95, number 1158 in Lecture Notes in Computer Science, pages 47–61, Torino, Italy, June 1995. Springer-Verlag. [15] Malgorzata Biernacka and Olivier Danvy. A concrete framework for environment machines. Research Report BRICS RS-05-15, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, May 2005. [16] Malgorzata Biernacka and Olivier Danvy. A syntactic correspondence between context-sensitive calculi and abstract machines. Research Report BRICS RS-05-22, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, July 2005. [17] Dariusz Biernacki and Olivier Danvy. From interpreter to logic engine by defunctionalization. In Maurice Bruynooghe, editor, Logic Based Program Synthesis and Transformation, 13th International Symposium, LOPSTR 2003, number 3018 in Lecture Notes in Computer Science, pages 143–159, Uppsala, Sweden, August 2003. Springer-Verlag. [18] Dariusz Biernacki, Olivier Danvy, and Kevin Millikin. A dynamic continuation-passing style for dynamic delimited continuations. Research Report BRICS RS-05-16, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, May 2005. [19] Dariusz Biernacki, Olivier Danvy, and Chung-chieh Shan. On the dynamic extent of delimited continuations. Information Processing Letters, 96(1):7–17, 2005. Extended version available as the technical report BRICS RS-05-13. 36 M. BIERNACKA, D. BIERNACKI, AND O. DANVY [20] Thierry Coquand and Peter Dybjer. Intuitionistic model constructions and normalization proofs. Mathematical Structures in Computer Science, 7:75–94, 1997. [21] Olivier Danvy. On listing list prefixes. LISP Pointers, 2(3-4):42–46, January 1989. ACM Press. [22] Olivier Danvy. Type-directed partial evaluation. In Guy L. Steele Jr., editor, Proceedings of the TwentyThird Annual ACM Symposium on Principles of Programming Languages, pages 242–257, St. Petersburg Beach, Florida, January 1996. ACM Press. [23] Olivier Danvy. Type-directed partial evaluation. In John Hatcliff, Torben Æ. Mogensen, and Peter Thiemann, editors, Partial Evaluation – Practice and Theory; Proceedings of the 1998 DIKU Summer School, number 1706 in Lecture Notes in Computer Science, pages 367–411, Copenhagen, Denmark, July 1998. Springer-Verlag. [24] Olivier Danvy. From reduction-based to reduction-free normalization. In Sergio Antoy and Yoshihito Toyama, editors, Proceedings of the Fourth International Workshop on Reduction Strategies in Rewriting and Programming (WRS’04), number 124 in Electronic Notes in Theoretical Computer Science, pages 79–100, Aachen, Germany, May 2004. Elsevier Science. Invited talk. [25] Olivier Danvy. On evaluation contexts, continuations, and the rest of the computation. In Hayo Thielecke, editor, Proceedings of the Fourth ACM SIGPLAN Workshop on Continuations, Technical report CSR-04-1, Department of Computer Science, Queen Mary’s College, pages 13–23, Venice, Italy, January 2004. Invited talk. [26] Olivier Danvy. A rational deconstruction of Landin’s SECD machine. In Clemens Grelck, Frank Huch, Greg J. Michaelson, and Phil Trinder, editors, Implementation and Application of Functional Languages, 16th International Workshop, IFL’04, number 3474 in Lecture Notes in Computer Science, pages 52–71, Lübeck, Germany, September 2004. Springer-Verlag. Recipient of the 2004 Peter Landin prize. Extended version available as the technical report BRICS-RS-03-33. [27] Olivier Danvy and Andrzej Filinski. A functional abstraction of typed contexts. DIKU Rapport 89/12, DIKU, Computer Science Department, University of Copenhagen, Copenhagen, Denmark, July 1989. [28] Olivier Danvy and Andrzej Filinski. Abstracting control. In Wand [81], pages 151–160. [29] Olivier Danvy and Andrzej Filinski. Representing control, a study of the CPS transformation. Mathematical Structures in Computer Science, 2(4):361–391, 1992. [30] Olivier Danvy and Lasse R. Nielsen. Defunctionalization at work. In Harald Søndergaard, editor, Proceedings of the Third International ACM SIGPLAN Conference on Principles and Practice of Declarative Programming (PPDP’01), pages 162–174, Firenze, Italy, September 2001. ACM Press. Extended version available as the technical report BRICS RS-01-23. [31] Olivier Danvy and Lasse R. Nielsen. Refocusing in reduction semantics. Research Report BRICS RS-0426, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, November 2004. A preliminary version appears in the informal proceedings of the Second International Workshop on Rule-Based Programming (RULE 2001), Electronic Notes in Theoretical Computer Science, Vol. 59.4. [32] Olivier Danvy and Zhe Yang. An operational investigation of the CPS hierarchy. In S. Doaitse Swierstra, editor, Proceedings of the Eighth European Symposium on Programming, number 1576 in Lecture Notes in Computer Science, pages 224–242, Amsterdam, The Netherlands, March 1999. Springer-Verlag. [33] Scott Draves. Implementing bit-addressing with specialization. In Mads Tofte, editor, Proceedings of the 1997 ACM SIGPLAN International Conference on Functional Programming, pages 239–250, Amsterdam, The Netherlands, June 1997. ACM Press. [34] Peter Dybjer and Andrzej Filinski. Normalization and partial evaluation. In Gilles Barthe, Peter Dybjer, Luı́s Pinto, and João Saraiva, editors, Applied Semantics – Advanced Lectures, number 2395 in Lecture Notes in Computer Science, pages 137–192, Caminha, Portugal, September 2000. Springer-Verlag. [35] R. Kent Dybvig, Simon Peyton-Jones, and Amr Sabry. A monadic framework for subcontinuations. Technical Report 615, Computer Science Department, Indiana University, Bloomington, Indiana, June 2005. [36] Matthias Felleisen. The Calculi of λ-v-CS Conversion: A Syntactic Theory of Control and State in Imperative Higher-Order Programming Languages. PhD thesis, Computer Science Department, Indiana University, Bloomington, Indiana, August 1987. [37] Matthias Felleisen. The theory and practice of first-class prompts. In Jeanne Ferrante and Peter Mager, editors, Proceedings of the Fifteenth Annual ACM Symposium on Principles of Programming Languages, pages 180–190, San Diego, California, January 1988. ACM Press. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 37 [38] Matthias Felleisen and Matthew Flatt. Programming languages and lambda calculi. Unpublished lecture notes. http://www.ccs.neu.edu/home/matthias/3810-w02/readings.html, 1989-2003. [39] Matthias Felleisen and Daniel P. Friedman. Control operators, the SECD machine, and the λ-calculus. In Martin Wirsing, editor, Formal Description of Programming Concepts III, pages 193–217. Elsevier Science Publishers B.V. (North-Holland), Amsterdam, 1986. [40] Matthias Felleisen, Daniel P. Friedman, Bruce Duba, and John Merrill. Beyond continuations. Technical Report 216, Computer Science Department, Indiana University, Bloomington, Indiana, February 1987. [41] Matthias Felleisen, Mitchell Wand, Daniel P. Friedman, and Bruce F. Duba. Abstract continuations: A mathematical semantics for handling full functional jumps. In Robert (Corky) Cartwright, editor, Proceedings of the 1988 ACM Conference on Lisp and Functional Programming, pages 52–62, Snowbird, Utah, July 1988. ACM Press. [42] Andrzej Filinski. Representing monads. In Hans-J. Boehm, editor, Proceedings of the Twenty-First Annual ACM Symposium on Principles of Programming Languages, pages 446–457, Portland, Oregon, January 1994. ACM Press. [43] Andrzej Filinski. Representing layered monads. In Alex Aiken, editor, Proceedings of the Twenty-Sixth Annual ACM Symposium on Principles of Programming Languages, pages 175–188, San Antonio, Texas, January 1999. ACM Press. [44] Andrzej Filinski. Normalization by evaluation for the computational lambda-calculus. In Samson Abramsky, editor, Typed Lambda Calculi and Applications, 5th International Conference, TLCA 2001, number 2044 in Lecture Notes in Computer Science, pages 151–165, Kraków, Poland, May 2001. Springer-Verlag. [45] Kathleen Fisher, editor. Proceedings of the 2004 ACM SIGPLAN International Conference on Functional Programming, Snowbird, Utah, September 2004. ACM Press. [46] Martin Gasbichler and Michael Sperber. Final shift for call/cc: direct implementation of shift and reset. In Simon Peyton Jones, editor, Proceedings of the 2002 ACM SIGPLAN International Conference on Functional Programming, SIGPLAN Notices, Vol. 37, No. 9, pages 271–282, Pittsburgh, Pennsylvania, September 2002. ACM Press. [47] Matthew L. Ginsberg. Multivalued logics: a uniform approach to reasoning in artificial intelligence. Computational Intelligence, 4:265–316, 1988. [48] Bernd Grobauer and Zhe Yang. The second Futamura projection for type-directed partial evaluation. Higher-Order and Symbolic Computation, 14(2/3):173–219, 2001. [49] Carl Gunter, Didier Rémy, and Jon G. Riecke. A generalization of exceptions and control in ML-like languages. In Simon Peyton Jones, editor, Proceedings of the Seventh ACM Conference on Functional Programming and Computer Architecture, pages 12–23, La Jolla, California, June 1995. ACM Press. [50] Thérèse Hardin, Luc Maranget, and Bruno Pagano. Functional runtime systems within the lambdasigma calculus. Journal of Functional Programming, 8(2):131–172, 1998. [51] Simon Helsen and Peter Thiemann. Two flavors of offline partial evaluation. In Jieh Hsiang and Atsushi Ohori, editors, Advances in Computing Science - ASIAN’98, number 1538 in Lecture Notes in Computer Science, pages 188–205, Manila, The Philippines, December 1998. Springer-Verlag. [52] Robert Hieb and R. Kent Dybvig. Continuations and concurrency. In Proceedings of the Second ACM SIGPLAN Symposium on Principles & Practice of Parallel Programming, SIGPLAN Notices, Vol. 25, No. 3, pages 128–136, Seattle, Washington, March 1990. ACM Press. [53] Robert Hieb, R. Kent Dybvig, and Claude W. Anderson, III. Subcontinuations. Lisp and Symbolic Computation, 5(4):295–326, December 1993. [54] John Hughes. A novel representation of lists and its application to the function “reverse”. Information Processing Letters, 22(3):141–144, 1986. [55] Yukiyoshi Kameyama. Axioms for delimited continuations in the CPS hierarchy. In Jerzy Marcinkowski and Andrzej Tarlecki, editors, Computer Science Logic, 18th International Workshop, CSL 2004, 13th Annual Conference of the EACSL, Proceedings, volume 3210 of Lecture Notes in Computer Science, pages 442–457, Karpacz, Poland, September 2004. Springer. [56] Yukiyoshi Kameyama and Masahito Hasegawa. A sound and complete axiomatization of delimited continuations. In Olin Shivers, editor, Proceedings of the 2003 ACM SIGPLAN International Conference on Functional Programming, pages 177–188, Uppsala, Sweden, August 2003. ACM Press. [57] Richard Kelsey, William Clinger, and Jonathan Rees, editors. Revised5 report on the algorithmic language Scheme. Higher-Order and Symbolic Computation, 11(1):7–105, 1998. 38 M. BIERNACKA, D. BIERNACKI, AND O. DANVY [58] Yoshiki Kinoshita. A bicategorical analysis of E-categories. Mathematica Japonica, 47(1):157–169, 1998. [59] Oleg Kiselyov. How to remove a dynamic prompt: Static and dynamic delimited continuation operators are equally expressible. Technical Report 611, Computer Science Department, Indiana University, Bloomington, Indiana, March 2005. [60] Peter J. Landin. The mechanical evaluation of expressions. The Computer Journal, 6(4):308–320, 1964. [61] Julia L. Lawall and Olivier Danvy. Continuation-based partial evaluation. In Carolyn L. Talcott, editor, Proceedings of the 1994 ACM Conference on Lisp and Functional Programming, LISP Pointers, Vol. VII, No. 3, pages 227–238, Orlando, Florida, June 1994. ACM Press. [62] Simon Marlow and Simon L. Peyton Jones. Making a fast curry: push/enter vs. eval/apply for higherorder languages. In Fisher [45], pages 4–15. [63] Per Martin-Löf. About models for intuitionistic type theories and the notion of definitional equality. In Proceedings of the Third Scandinavian Logic Symposium (1972), volume 82 of Studies in Logic and the Foundation of Mathematics, pages 81–109. North-Holland, 1975. [64] Eugenio Moggi. Notions of computation and monads. Information and Computation, 93:55–92, 1991. [65] Luc Moreau and Christian Queinnec. Partial continuations as the difference of continuations, a duumvirate of control operators. In Manuel Hermenegildo and Jaan Penjam, editors, Sixth International Symposium on Programming Language Implementation and Logic Programming, number 844 in Lecture Notes in Computer Science, pages 182–197, Madrid, Spain, September 1994. Springer-Verlag. [66] Chethan R. Murthy. Control operators, hierarchies, and pseudo-classical type systems: A-translation at work. In Olivier Danvy and Carolyn L. Talcott, editors, Proceedings of the First ACM SIGPLAN Workshop on Continuations (CW 1992), Technical report STAN-CS-92-1426, Stanford University, pages 49–72, San Francisco, California, June 1992. [67] Lasse R. Nielsen. A denotational investigation of defunctionalization. Research Report BRICS RS-00-47, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, December 2000. [68] Gordon D. Plotkin. Call-by-name, call-by-value and the λ-calculus. Theoretical Computer Science, 1:125–159, 1975. [69] Gordon D. Plotkin. A structural approach to operational semantics. Technical Report FN-19, DAIMI, Department of Computer Science, University of Aarhus, Aarhus, Denmark, September 1981. [70] Christian Queinnec and Bernard Serpette. A dynamic extent control operator for partial continuations. In Robert (Corky) Cartwright, editor, Proceedings of the Eighteenth Annual ACM Symposium on Principles of Programming Languages, pages 174–184, Orlando, Florida, January 1991. ACM Press. [71] John C. Reynolds. Definitional interpreters for higher-order programming languages. Higher-Order and Symbolic Computation, 11(4):363–397, 1998. Reprinted from the proceedings of the 25th ACM National Conference (1972), with a foreword. [72] Chung-chieh Shan. Shift to control. In Olin Shivers and Oscar Waddell, editors, Proceedings of the 2004 ACM SIGPLAN Workshop on Scheme and Functional Programming, Technical report TR600, Computer Science Department, Indiana University, Snowbird, Utah, September 2004. [73] Dorai Sitaram. Models of Control and their Implications for Programming Language Design. PhD thesis, Computer Science Department, Rice University, Houston, Texas, April 1994. [74] Dorai Sitaram and Matthias Felleisen. Control delimiters and their hierarchies. Lisp and Symbolic Computation, 3(1):67–99, January 1990. [75] Dorai Sitaram and Matthias Felleisen. Reasoning with continuations II: Full abstraction for models of control. In Wand [81], pages 161–175. [76] Guy L. Steele Jr. Rabbit: A compiler for Scheme. Master’s thesis, Artificial Intelligence Laboratory, Massachusetts Institute of Technology, Cambridge, Massachusetts, May 1978. Technical report AI-TR474. [77] Eijiro Sumii. An implementation of transparent migration on standard Scheme. In Matthias Felleisen, editor, Proceedings of the Workshop on Scheme and Functional Programming, Technical Report 00-368, Rice University, pages 61–64, Montréal, Canada, September 2000. [78] Eijiro Sumii and Naoki Kobayashi. A hybrid approach to online and offline partial evaluation. HigherOrder and Symbolic Computation, 14(2/3):101–142, 2001. [79] Peter Thiemann. Combinators for program generation. Journal of Functional Programming, 9(5):483– 525, 1999. [80] Philip Wadler. Monads and composable continuations. LISP and Symbolic Computation, 7(1):39–55, January 1994. AN OPERATIONAL FOUNDATION FOR DELIMITED CONTINUATIONS IN THE CPS HIERARCHY 39 [81] Mitchell Wand, editor. Proceedings of the 1990 ACM Conference on Lisp and Functional Programming, Nice, France, June 1990. ACM Press. [82] Yong Xiao, Amr Sabry, and Zena M. Ariola. From syntactic theories to interpreters: Automating proofs of unique decomposition. Higher-Order and Symbolic Computation, 14(4):387–409, 2001. This work is licensed under the Creative Commons Attribution-NoDerivs License. To view a copy of this license, visit http://creativecommons.org/licenses/by-nd/2.0/ or send a letter to Creative Commons, 559 Nathan Abbott Way, Stanford, California 94305, USA.
2cs.AI
arXiv:1711.05851v1 [cs.CL] 15 Nov 2017 G O FOR A WALK AND A RRIVE AT THE A NSWER : R EASONING OVER PATHS IN K NOWLEDGE BASES USING R EINFORCEMENT L EARNING Rajarshi Das?,1 , Shehzaad Dhuliawala?,1 , Manzil Zaheer2 , Luke Vilnis1 , Ishan Durugkar3 Akshay Krishnamurthy1 , Alex Smola4 , Andrew McCallum1 {rajarshi, sdhuliawala, luke, akshay, mccallum}@cs.umass.edu [email protected], [email protected], [email protected] 1 University of Massachusetts, Amherst, 2 Carnegie Mellon University 3 University of Texas at Austin, 4 Amazon Web Services A BSTRACT Knowledge bases (KB), both automatically and manually constructed, are often incomplete — many valid facts can be inferred from the KB by synthesizing existing information. A popular approach to KB completion is to infer new relations by combinatory reasoning over the information found along other paths connecting a pair of entities. Given the enormous size of KBs and the exponential number of paths, previous path-based models have considered only the problem of predicting a missing relation given two entities, or evaluating the truth of a proposed triple. Additionally, these methods have traditionally used random paths between fixed entity pairs or more recently learned to pick paths between them. We propose a new algorithm, MINERVA1 , which addresses the much more difficult and practical task of answering questions where the relation is known, but only one entity. Since random walks are impractical in a setting with combinatorially many destinations from a start node, we present a neural reinforcement learning approach which learns how to navigate the graph conditioned on the input query to find predictive paths. Empirically, this approach obtains state-of-the-art results on several datasets, significantly outperforming prior methods. 1 I NTRODUCTION Automated reasoning, the ability of computing systems to make new inferences from observed evidence, has been a long standing goal of artificial intelligence. We are interested in automated reasoning on large knowledge bases (KB) with rich and diverse semantics (Suchanek et al., 2007; Bollacker et al., 2008; Carlson et al., 2010). KBs are highly incomplete (Min et al., 2013), and facts not directly stored in a KB can often be inferred from those that are, creating exciting opportunities and challenges for automated reasoning. For example, consider the small knowledge graph in figure 1. We can infer the (unobserved fact) home stadium of Colin Kaepernick from the following reasoning path: Colin Kaepernick → PlaysInTeam → 49ers → TeamHomeStadium → Levi’s Stadium. Our goal is to automatically learn such reasoning paths in KBs. We frame the learning problem as one of query answering, that is to say, answering questions of the form (Colin Kaepernick, PlaysInLeague, ?). From its early days, the focus of automated reasoning approaches has been to build systems which can learn crisp symbolic logical rules (McCarthy, 1960; Nilsson, 1991). Symbolic representations have also been integrated with machine learning especially in statistical relational learning (Muggleton et al., 1992; Getoor & Taskar, 2007; Kok & Domingos, 2007; Lao et al., 2011), but due to poor generalization performance, these approaches have largely been superceded by distributed vector representations. Learning embedding of entities and relations using tensor factorization or neural methods has been a popular approach (Nickel et al., 2011; Bordes et al., 2013; Socher et al., 2013; inter alia), but these methods cannot capture chains of reasoning expressed by KB paths. Neural multi-hop models (Neelakantan et al., 2015; Guu et al., 2015; Toutanova et al., 2016) address the aforementioned problems to some extent by operating on KB paths in vector space. However, these 1 https://github.com/shehzaadzd/MINERVA 1 LocatedIn Levis Stadium HasState CA TeamHome Stadium StateIn 49ers CityIn Nationality? e et hl In At lays m P ea T HasCity USA Player Home Stadium? Football AthletePlays Sports (AthletePlays Sports)-1 Colin Kaepernick Milwaukee BornInCity Michael Crabtree PlaysinLeague PlaysinLeague? Figure 1: A small fragment of a knowledge base represented as a knowledge graph. Solid edges are observed and dashed edges are part of queries. Note how each query (e.g. Nationality, PlaysInLeague, PLayerHomeStadium) can be answered by traversing the graph via “logical” paths between entity ‘Colin Kaepernick’ and the corresponding answer. NFL models take as input a set of paths which are gathered by performing random walks independent of the query relation. Additionally, models such as Neelakantan et al. (2015); Das et al. (2017) use the same set of initially collected paths to answer a diverse set of query types (e.g. MarriedTo, Nationality, WorksIn etc.). This paper presents a method for efficiently searching the graph for answer-providing paths using reinforcement learning (RL) conditioned on the input question, eliminating any need for precomputed paths. Given a massive knowledge graph, we learn a policy, which, given the query (entity1 , relation, ?), starts from entity1 and learns to walk to the answer node by choosing to take a labeled relation edge at each step, conditioning on the query relation and entire path history. This formulates the query-answering task as a reinforcement learning (RL) problem where the goal is to take an optimal sequence of decisions (choices of relation edges) to maximize the expected reward (reaching the correct answer node). We call the RL agent MINERVA for ”Meandering In Networks of Entities to Reach Verisimilar Answers.” Our RL-based formulation has many desirable properties. First, MINERVA has the built-in flexibility to take paths of variable length, which is important for answering harder questions that require complex chains of reasoning (Shen et al., 2017). Secondly, MINERVA needs no pretraining and trains on the knowledge graph from scratch with reinforcement learning; no other supervision or fine-tuning is required representing a significant advance over prior applications of RL in NLP. Third, our path-based approach is computationally efficient, since by searching in a small neighborhood around the query entity it avoids ranking all entities in the KB as in prior work. Finally, the reasoning paths found by our agent automatically form an interpretable provenance for its predictions. The main contributions of the paper are: (a) We present agent MINERVA, which learns to do query answering by walking on a knowledge graph conditioned on an input query, stopping when it reaches the answer node. The agent is trained using reinforcement learning, specifically policy gradients (§ 2). (b) We evaluate MINERVA on several benchmark datasets and compare favorably to Neural Theorem Provers (NTP) (Rocktäschel & Riedel, 2017) and Neural LP (Yang et al., 2017), which do logical rule learning in KBs, and also state-of-the-art embedding based methods such as DistMult (Yang et al., 2015) and ComplEx (Trouillon et al., 2016). (c) We also extend MINERVA to handle partially structured natural language queries and test it on the WikiMovies dataset (§ 4.3) (Miller et al., 2016). We also compare to DeepPath (Xiong et al., 2017) which uses reinforcement learning to pick paths between entity pairs. The main difference is that the state of their RL agent includes the answer entity since it is designed for the simpler task of predicting if a fact is true or not. As such their method cannot be applied directly to our more challenging query answering task where the second entity is unknown and must be inferred. Nevertheless, MINERVA outperforms DeepPath on their benchmark NELL -995 dataset when compared in their experimental setting (§ 4.1). 2 TASK AND M ODEL We formally define the task of query answering in a KB. Let E denote the set of entities and R be the set of binary relations. Then a KB is a collection of facts stored as triplets (e1 , r, e2 ) where e1 , e2 ∈ E and r ∈ R. Query answering seeks to answer questions of the form (e1 , r, ?), e.g. Toronto, locatedIn, ?. We would also like to clearly point out the difference between query answering and the task of fact prediction. Fact prediction involves predicting if a fact is true or not, e.g. (Toronto, locatedIn, 2 Canada)?. This task is easier than predicting the correct entity as the answer in query answering since the latter require finding the answer entity among many possible entities. Next we describe how we reduce the problem of query answering in a KB to a finite horizon sequential decision making problem and solve it using reinforcement learning. We begin by representing the environment as a deterministic Markov decision process on a knowledgegraph G derived from the KB (§2.1). Our RL agent is given an input query of the form e1q , rq , ? . Starting from vertex corresponding to e1q in the knowledge graph G, the agent learns to traverse the environment/graph to mine the answer and stop when it determines the answer (§ 2.2). The agent is trained using policy gradient more specifically by REINFORCE (Williams, 1992) with control variates (§ 2.3). Let us begin by describing the environment. 2.1 E NVIRONMENT - S TATES , ACTIONS , T RANSITIONS AND R EWARDS Our environment is a finite horizon, deterministic and partially observed Markov decision process that lies on a knowledge graph derived from the KB. Recall that a KB is collection of facts stored as triplets (e1 , r, e2 ) where e1 , e2 ∈ E and r ∈ R. From the KB, a knowledge graph G can be constructed where the entities e1 , e2 are represented as the nodes and relation r as labeled edge between them. Formally, a knowledge graph is a directed labeled multigraph G = (V, E, R), where V and E denote the vertices and edges of the graph respectively. Note that V = E and E ⊆ V × R ×V . Also, following previous approaches (Bordes et al., 2013; Neelakantan et al., 2015; Xiong et al., 2017), we add the inverse relation of every edge, i.e. for an edge (e1 , r, e2 ) ∈ E, we add the edge (e2 , r−1 , e1 ) to the graph. (If the set of binary relations R does not contain the inverse relation r−1 , it is added to R as well.) On this graph we will now specify a deterministic partially observable Markov decision process, which is a 5-tuple (S, O, A, δ, R), each of which we elaborate below. States. The state space S consists of all possible query-answers cartesian product with the set of entities. Intuitively, we want a state to encode the query (e1q , rq ), the answer (e2q ), and a location of exploration et (current node of the entity). Thus overall a state S ∈ S is represented by S = (et , e1q , rq , e2q ) and the state space consists of all valid combinations. Observations. The complete state of the environment is not observable, but only its current location of exploration and query can be observed but not the answer, i.e. only (et , e1q , rq ) is observed. Formally the observation function O : S → V ×V × R is defined as O(s = (et , e1q , rq , e2q )) = (et , e1q , rq ). Actions. The set of possible actions AS from a state S = (et , e1q , rq , e2q ) consists of all outgoing edges of the vertex et in G. Formally AS = {(et , r, v) ∈ E : S = (et , e1q , rq , e2q ), r ∈ R, v ∈ V } ∪ {(s, ∅, s)}. Basically, this means an agent at each state has option to select which outgoing edge it wishes to take having the knowledge of the label of the edge r and destination vertex v. During implementation, we unroll the computation graph up to a fixed number of time steps T. We augment each node with a special action called ‘NO OP’ which goes from a node to itself. Some questions are easier to answer and needs lesser steps of reasoning than others. This design decision allows the agent to remain at a node for any number of time steps. This is especially helpful when the agent has managed to reach a correct answer at a time step t < T and can continue to stay at the ‘answer node’ for the rest of the time steps. Alternatively, we could have allowed the agent to take a special ‘STOP’ action, but we found the current setup to work sufficiently well. As mentioned before, we also add the inverse relation of a triple, i.e. for the triple (e1 , r, e2 ), we add the triple (e2 , r−1 , e1 ) to the graph. We found this important because this actually equips our agent to undo a potentially wrong decision as it can retract back to the current node in the next step. Transition. The environment evolves deterministically by just updating the state to the new vertex pointed by the edge selected by the agent through its action. The query and answer remains the same. Formally, the transition function is δ : S × A → S defined by δ(S, A) = (v, e1q , rq , e2q ), where S = (et , e1q , rq , e2q ) and A = (et , r, v)). Rewards. We only have a terminal reward of +1 if the current location is the correct answer at the end and 0 otherwise. To elaborate, if ST = (et , e1q , rq , e2q ) is the final state, then we receive a reward of +1 if et = e2q else 0.=, i.e. R(ST ) = I{et = e2q }. 2.2 P OLICY N ETWORK To solve the finite horizon deterministic partially observable Markov decision process described above, we aim to design a randomized history-dependent policy π = (d1 , d2 , ..., dT−1 ), where dt : 3 Ht → P(ASt ) and history Ht = (Ht−1 , At−1 , Ot ) is just the sequence of observations and actions taken. We restrict ourselves to the function class expressed by long short-term memory network (LSTM) (Hochreiter & Schmidhuber, 1997) for learning the randomized history-dependent policy. An agent based on LSTM encodes the history Ht as a continuous vector ht ∈ R2d . We also have embedding matrix r ∈ R|R|×d and e ∈ R|E |×d for the binary relations and entities respectively. The history embedding for Ht = (Ht−1 , At−1 , Ot ) is updated according to LSTM dynamics: ht = LSTM (ht−1 , [at−1 ; ot ]) (1) where at−1 ∈ Rd and ot ∈ Rd denote the vector representation for action/relation at time t − 1 and observation/entity at time t respectively and [; ] denote vector concatenation. To elucidate, at−1 = rAt−1 , i.e. the embedding of the relation corresponding to label of the edge the agent chose at time t − 1 and ot = eet if Ot = (et , e1q , rq ) i.e. the embedding of the entity corresponding to vertex the agent is at time t. Based on the history embedding ht , the policy network makes the decision to choose an action from all available actions (ASt ) conditioned on the query relation. Recall that each possible action represents an outgoing edge with information of the edge relation label l and destination vertex/entity d. So embedding for each A ∈ ASt is [rl ; ed ], and stacking embeddings for all the outgoing edges we obtain the matrix At . The network taking these as inputs is parameterized as a two-layer feedforward network with ReLU nonlinearity which takes in the current history representation ht and the embedding for the query relation rq and outputs a probability distribution over the possible actions from which a discrete action is sampled. In other words, dt = softmax (At (W2 ReLU (W1 [ht ; ot ; rq ]))) At ∼ Categorical (dt ) Note that the nodes in G do not have a fixed ordering or number of edges coming out from them. The size of matrix At is |ASt | × 2d, so the decision probabilities dt lies on simplex of size |ASt |. Also the procedure above is invariant to order in which edges are presented as desired and falls in purview of neural networks designed to be permutation invariant Zaheer et al. (2017). Finally, to summarise, the parameters of the LSTM, the weights W1 , W2 , the corresponding biases (not shown above for brevity), and the embedding matrices form the parameters θ of the policy network. 2.3 T RAINING For the policy network (πθ ) described above, we want to find parameters θ that maximizes the expected reward: J(θ) = E(e1 ,r,e2 )∼D EA1 ,..,AT −1 ∼πθ [R(ST )|S1 = (e1 , e1 , r, e2 )] where we assume there is a true underlying distribution (e1 , r, e2 ) ∼ D. To solve this optimization problem, we employ REINFORCE (Williams, 1992) as follows: • The first expectation is replaced with empirical average over the training dataset. • For the second expectation, we approximate by running multiple rollouts for each training example. The number of rollouts is fixed and for all our experiments we set this number to 20. • For variance reduction, a common strategy is to use an additive control variate baseline (Hammersley, 2013; Fishman, 2013; Evans & Swartz, 2000). We use a moving average of the cumulative discounted reward as the baseline. We tune the weight of this moving average as a hyperparameter. Note that in our experiments we found that learnt baseline performed similarly, but we finally settled for cumulative discounted reward as the baseline owing to its simplicity. • To encourage the policy to sample more diverse paths rather than sticking with a few, we add an entropy regularization term to our cost function after multiplying it by a constant (β). We treat β as a hyperparameter to control the exploration exploitation trade-off. Experimental Details We choose the relation and embedding dimension size as 200. The action embedding is formed by concatenating the entity and relation embedding. We use a 3 layer LSTM with dimension size of 400. The hidden layer size of MLP (weights W1 and W2 ) is set to 400. We use Adam (Kingma & Ba, 2014) with the default parameters in REINFORCE for the update. The best hyperparameter values can be found in appendix. 4 Dataset COUNTRIES UMLS KINSHIP WN 18 RR NELL -995 FB 15 K -237 WikiMovies #entities 272 135 104 40,945 75,492 14,505 43,230 #relations 2 49 26 15 200 237 9 #facts 1158 5,216 10686 86,835 154,213 272,115 196,453 #queries 24 661 1074 3134 3992 20,466 9952 Table 1: Statistics of various datasets used in experiments. Task S1 S2 S3 Metric AUC-PR ComplEx 99.37±0.4 87.95±2.8 48.44±6.3 Model NTP NTP-λ 90.83±15.4 100.0±0.0 87.4±11.7 93.04±0.4 56.68±17.6 77.26±17.0 MINERVA 100.0±0.0 91±0.01 93±0.01 Table 2: Performance on COUNTRIES dataset. MINERVA significantly outperforms baselines in the challenging S3 task. 3 DATA We test our model on the following query answering datasets. (a) COUNTRIES (Bouchard et al., 2015), (b) Alyawarra kinship (KINSHIP), (c) Unified Medical Language Systems (UMLS) (Kok & Domingos, 2007) (d) WN 18 RR (Dettmers et al., 2017), (e) NELL -995, (f) FB15k-237 (g) WikiMovies (Miller et al., 2016). We also test on a synthetic grid world dataset released by Yang et al. (2017) to test the ability of the model to learn rules of long length. The COUNTRIES dataset is carefully designed to explicitly test the logical rule learning and reasoning capabilities of link prediction models. The dataset has 3 tasks (S1-3 in table 2) each requiring reasoning steps of increasing length and difficulty (see Rocktäschel & Riedel (2017) for more details about the tasks). We also test our model on existing large and challenging KG datasets ((d) - (f)). WN 18 RR is created from the original WORDNET 18 dataset by removing test triples which can be answered trivially, making the datasets more realistic and challenging. Additionally, we test our model on a question answering dataset - WikiMovies (Miller et al., 2016) where the query is in natural language but the answers can be found in an accompanying KB. Table 1 report the various statistics of the datasets. 4 4.1 E XPERIMENTS K NOWLEDGE G RAPH Q UERY A NSWERING This section describes the experimental results on the various knowledge graph query answering datasets. During inference, we do beam search with a beam width of 40 and rank entities by the probability of the trajectory the model took to reach the entity. COUNTRIES , KINSHIP, UMLS. We first test MINERVA on the COUNTRIES dataset which is explicitly designed to test the ability Model NeuralLP UMLS KINSHIP 0.70 0.91 0.73 of models to learn logical rules. It contains countries, regions and MINERVA 0.93 subregions as entities. The queries are of the form LocatedIn(c, Table 3: HITS@10 on UMLS and ?) and the answer is a region. For example, LocatedIn(Egypt, ?) KINSHIP with the answer as Africa. Our experimental settings and scores are directly comparable to NTP and ComplEx (Trouillon et al., 2016). NTP-λ is a NTP model trained with an additional objective function of ComplEx. We also compare MINERVA against Neural LP (Yang et al., 2017) on the UMLS and KINSHIP datasets. The evaluation metric we report is HITS @k - which is the percentage of correct entities ranked in top-k. For the COUNTRIES dataset, we report the area under the precision-recall curve for comparing with the baselines. Following the design of the COUNTRIES dataset, for task S1 and S2, we set the maximum path length T = 2 and for S3, we set T = 3. 5 DeepPath 0.960 0.711 0.742 0.957 0.738 0.795 0.890 0.790 0.750 MINERVA 0.970 0.825 0.851 0.985 0.846 0.793 0.895 0.946 0.824 Table 4: MAP scores for different query relations on the NELL -995 dataset. Note that in this comparison, MINERVA refers to only a single learnt model for all query relations which is competitive with individual DeepPath models trained separately for each query relation. Accuracy Task athleteplaysinleague worksfor organizationhiredperson athleteplayssport teamplayssport personborninlocation athletehomestadium organizationheadquarteredincity athleteplaysforteam 1.0 0.9 0.8 0.7 0.6 0.5 0.4 MINERVA Neural LP 2-4 4-6 6-8 Path length 8-10 Figure 2: Grid world experiment: We significantly outperform NeuralLP for longer path lengths. Table 2 shows that MINERVA outperforms all the baseline models except on the task S2 of COUNTRIES, where the ensemble model NTP -λ outperforms it, albeit with a higher variance across runs. Our gains are much more prominent in task S3, which is the hardest among all the tasks. We similarly outperform NeuralLP on the UMLS and KINSHIP datasets. N ELL-995 We also compare MINERVA to DeepPath. For a fair comparison, we only rank the answer entities against the negative examples in the dataset used in their experiments2 and report the mean average precision (MAP) scores for each query relation. DeepPath feeds the paths its agent gathers as input features to the path ranking algorithm (PRA) (Lao et al., 2011), which trains a per-relation classifier. But unlike them, we train one model which learns for all query relations. If our agent is not able to reach the correct entity or one of the negative entities, the corresponding query gets a score of negative infinity. As show in table 6, we outperform them or achieve comparable performance for all the query relations For this experiment, we set the maximum length T = 3. WN 18 RR Next we test MINERVA on another large KB Model HITS @1 HITS @3 HITS @10 dataset – WN 18 RR. On this dataset, we compare with ConvE 0.306 0.360 0.411 three recently proposed latent factorization model – (a) DistMult 0.389 0.439 0.491 ConvE (Dettmers et al., 2017), (b) DistMult (Yang et al., ComplEx 0.411 0.458 0.507 2015), (c) ComplEx (Trouillon et al., 2016). We report MINERVA 0.413 0.456 0.513 HITS at various k and we compare favorably with the Table 5: Performance on WN 18 RR state-of-the-art results of ComplEx in all settings (table 5). For this experiment, we also set the maximum length T = 3. FB15k-237 We test MINERVA on yet another popular KB dataset FB15K- Model HITS @10 ConvE 0.458 237. The baselines are the same as before, however our implementation DistMult 0.568 of DistMult gave a score of 56.8 HITS @10 which, to our knowledge, is ComplEx 0.419 the highest score reported on this dataset3 .The performance of ConvE and MINERVA 0.456 ComplEx are taken from Dettmers et al. (2017). Even though MINERVA performs comparably to ConvE and ComplEx, the results are significantly Table 6: Performance behind the performance of DistMult. on FB 15 K -237 Upon delving more into the structure of knowledge graph derived from FB15K-237, we found few interesting characteristics of the dataset. As a prelude, we would like to describe a long existing concept in graph theory – clustering coefficient (Holland & Leinhardt, 1971; Watts & Strogatz, 1998). Clustering coefficient (τ) of a graph measures whether groups of nodes form ‘tightly knit’ communities - i.e. whether groups of nodes tend to cluster together. A high τ implies the presence of higher number of densely connected groups of nodes. For instance, if we consider three nodes A, B and C, a high τ means with high probability whenever three nodes are connected as A — B — C, it implies nodes A — C are also connected forming a triangle. Intuitively, MINERVA can use such closed shapes to learn paths such as (A — B — C) to predict the answer of the query, i.e. the third node (C). The clustering coefficient also extends from triangles to cliques of arbitrary size (Watts & 2 We are grateful to Xiong et al. (2017) for releasing the negative examples used in their experiments. are aware of the high variance of DistMult scores reported on FB15k-237 by several papers, but to ensure fairness we report the high scores our in-house implementation achieved. 3 We 6 6 × 10 1 4 × 10 3 × 10 1 2 × 10 1 NELL-995 FB15k-237 104 2 × 103 103 102 101 104 1 102 103 103 100 101 102 103 101 102 103 104 trie s Kin sh ip 101 un Co LL- k-2 NE 15 FB 99 5 UM LS 103 37 Clustering Coefficient Kinship 3 × 103 100 Figure 3: Network avg. cluster coefficient of various datasets Figure 4: Count of number of unique path types of length 3 which occur more than ‘x’ times in various datasets. In Kinship and NELL995, there are more than 103 path types which occur more than 103 times, however for FB15k-237, we see a sharp decrease as ‘x’ becomes higher. Strogatz, 1998). Figure 3 plots τ for various datasets. We find that FB15k-237 has the least clustering coefficient (0.19) among all datasets. This means that the dataset has sparse neighborhoods and hence MINERVA finds it difficult to learn logical rules. We also check the frequency of occurrence of various unique paths (types). We define a path type as the sequence of relations (ignoring the entities) in a path. Intuitively, a predictive path which generalizes across queries will occur many number of times in the graph. Figure 4 shows the plot. As we can see, the characteristics of FB15k-237 is quite different from other datasets. Path types do not repeat that often, making it hard for MINERVA to learn paths which generalizes. We also provide further analysis of the types of various query relation in FB15k-237 in the appendix. 4.2 G RID W ORLD PATH F INDING As we empirically find and also noted by previous work (Rocktäschel & Riedel, 2017; Das et al., 2017; Yang et al., 2017), often the reasoning chains required to answer queries in KB is not too long (restricted to 3 or 4 hops). To test if our model can learn long reasoning paths, we test our model on a synthetic 16-by-16 grid world dataset created by Yang et al. (2017), where the task is to navigate to a particular cell (answer entity) starting from a random cell (start entity) by following a set of directions (query relation). The KB consists of atomic triples of the form ((2,1), North, (1,1)) – entity (1,1) is north of entity (2,1). The queries consists of a sequence of directions (e.g. North, SouthWest, East). The queries are classified into classes based on the path lengths. Figure 2 shows the accuracy on varying path lengths. Compared to Neural LP, MINERVA is much more robust for queries which require longer path lengths showing a very little degrade in performance for even the longest path length in the dataset. 4.3 PARTIALLY S TRUCTURED Q UERIES Queries in KB datasets are structured in the form of triples. Model Accuracy However, this is unsatisfactory since for most real applica- Memory Network 78.5 tions, the queries appear in natural language. As a first step QA system 93.5 Key-Value Memory Network 93.9 in this direction, we extend MINERVA to take in “partially Neural LP 94.6 structured” queries. We use the WikiMovies dataset (Miller MINERVA 96.7 et al., 2016) which contains questions in natural language albeit generated by templates created by human annotators. Table 7: Performance on WikiMovies An example question from the dataset is “Which is a film written by Herb Freed?”. WikiMovies also has an accompanying KB which can be used to answer all the questions. We link the entity occurring in the question to the KB via simple string matching. To form the vector representation of the query relation, we design a simple question encoder which computes the average of the embeddings of the question words. The word embeddings are learned from scratch and we do not use any pretrained embeddings. We compare our results with those reported in Yang et al. (2017) (table 7). We got the best result using T = 1, suggesting that WikiMovies is not the best testbed for multihop reasoning, but this experiment is a promising first step towards the realistic setup of having textual queries and knowledge bases. 7 NBA A Pl thle a t L ys e p eag in = 0 ue .98 7 s he ac Co eam 1 T 0.0 p= LSU NBA p LSU A Pl thle Le ays te = agu in 0. e 00 6 Coaches Team p = 0.898 Basketball John Brady WorksFor? John Brady AthletePlaysSport? r cto dA 0 re -3 ar 1e St p = Pennies From Heaven Louis Armstrong d re ar St ctor 7 A 0.6 = p Pennies From Heaven Dire cted By p=0 .58 Normal McLeod Louis Armstrong Dire cted By p=2 e-19 Normal McLeod Who directed the movie “Pennies from Heaven”? Who starred in the movie “Pennies from Heaven”? Figure 5: Based on the query relation our agent assigns different probabilities to different actions. The dashed edges in the top row denote query relation. Examples in the bottom row are from the WikiMovies dataset and hence the questions are partially structured. 5 A NALYSIS Effectiveness of Remembering Path History. MINERVA encodes the history of decisions it has taken in the past using LSTMs. To test the importance of remembering the sequence of decisions, we did an ablation study in which the agent chose the next action based on only local information i.e. current entity and query and did not have access to the history ht . For the KINSHIP dataset, we observe a 27% points decrease in HITS@1 (0.184 v/s 0.46) and 13% decrease in HITS@10 (0.63 v/s 0.76). For grid-world, it is also not surprising that we see a big drop in performance. The final accuracy is 0.23 for path lengths 2-4 and 0.04 for lengths 8-10. For NELL, the performance dropped from 0.576 to 0.564 and for FB15k-237 the HITS@10 performance dropped from 0.456 to 0.408. NO-OP and Inverse Relations. At each step, MINERVA can choose to take a NO - OP edge and remain at the same node. This gives the agent the flexibility of taking paths of variable lengths. Some questions are easier to answer than others and require lesser steps of reasoning and if the agent reaches the answer early, it can choose to remain there. Example (i) in table 8 shows such an example. Similarly inverse relation gives the agent the ability to recover from a potentially wrong decision it has taken before. Example (ii) shows such an example, where the agent took a incorrect decision at the first step but was able to revert the decision because of the presence of inverted edges. Query based Decision Making. At each step before making a decision, our agent conditions on the query relation. Figure 5 shows examples, where based on the query relation, the probabilities are peaked on different actions. For example, when the query relation is WorksFor, MINERVA assigns a much higher probability of taking the edge CoachesTeam than AthletePlaysInLeague. We also see similar behavior on the WikiMovies dataset where the query consists of words instead of fixed schema relation. Inference Time. MINERVA is efficient at inference time since it has to essentially search for answer entities in its local neighborhood, whereas previous methods rank all the entities in the dataset. For instance, on the test dataset of WN 18 RR, the wall clock running time of MINERVA is 63 seconds whereas that of a GPU implementation of DistMult is 211 seconds (with the maximum batch size). 6 R ELATED W ORK Learning vector representations of entities and relations using tensor factorization (Nickel et al., 2011; 2012; Bordes et al., 2013; Riedel et al., 2013; Nickel et al., 2014; Yang et al., 2015) or neural methods (Socher et al., 2013; Toutanova et al., 2015; Verga et al., 2016) has been a popular approach to reasoning with a knowledge base. However, these methods cannot capture more complex reasoning patterns such as those found by following inference paths in KBs. Multi-hop link prediction approaches (Lao et al., 2011; Neelakantan et al., 2015; Guu et al., 2015; Toutanova et al., 2016; Das et al., 2017) address the problems above, but the reasoning paths that they operate on are gathered by 8 (i) Can learn general rules: (S1) LocatedIn(X, Y) ← LocatedIn(X, Z) & LocatedIn(Z, Y) (S2) LocatedIn(X, Y) ← NeighborOf(X, Z) & LocatedIn(Z, Y) (S3) LocatedIn(X, Y) ← NeighborOf(X, Z) & NeighborOf(Z, W) & LocatedIn(W, Y) WorksFor (ii) Can learn shorter path: Richard F. Velky −−−−−→? PersonLeadsOrg NO-OP NO-OP Richard F. Velky −−−−−−−−−→ Schaghticokes −−−−→ Schaghticokes −−−−→ Schaghticokes WorksFor (iii) Can recover from mistakes: Donald Graham −−−−−→? OrgTerminatedPerson OrgTerminatedPerson−1 OrgHiredPerson Donald Graham −−−−−−−−−−−−→ TNT Post −−−−−−−−−−−−−→ Donald Graham −−−−−−−−−→ Wash Post Table 8: A few example of paths found by MINERVA on the COUNTRIES and NELL. MINERVA can learn general rules as required by the COUNTRIES dataset (example (i)). It can learn shorter paths if necessary (example (ii)) and has the ability to correct a previously taken decision (example (iii)) . performing random walks independent of the type of query relation. Lao et al. (2011) further filters paths from the set of sampled paths based on the restriction that the path must end at one of the target entities in the training set and are within a maximum length. These constraints make them query dependent but they are heuristic in nature. Our approach eliminates any necessity to pre-compute paths and learns to efficiently search the graph conditioned on the input query relation. Inductive Logic Programming (ILP) (Muggleton et al., 1992) aims to learn general purpose predicate rules from examples and background knowledge. Early work in ILP such as FOIL (Quinlan, 1990), PROGOL (Muggleton, 1995) are either rule-based or require negative examples which is often hard to find in KBs (by design, KBs store true facts). Statistical relational learning methods (Getoor & Taskar, 2007; Kok & Domingos, 2007; Schoenmackers et al., 2010) along with probabilistic logic (Richardson & Domingos, 2006; Broecheler et al., 2010; Wang et al., 2013) combine machine learning and logic but these approaches operate on symbols rather than vectors and hence do not enjoy the generalization properties of embedding based approaches. Neural Theorem Provers (NTP) (Rocktäschel & Riedel, 2017) and Neural LP (Yang et al., 2017) are two recent methods in learning logical rules that can be trained end-to-end with gradient based learning. NTPs are constructed by Prolog’s backward chaining inference method. It operates on vectors rather than symbols, thereby providing a success score for each proof path. However, since a score can be computed between any two vectors, the computation graph becomes quite large because of such soft-matching during substitution step of backward chaining. For tractability, it resides to heuristics such as only keeping the top-K scoring proof paths, but it loses any guarantee of computing exact gradients. Also the efficacy of NTPs has yet to be shown on large KBs. Neural LP introduces a differential rule learning system using operators defined in TensorLog (Cohen, 2016) and has a LSTM based controller and a differentiable memory component (Graves et al., 2014; Sukhbaatar et al., 2015) and the rule scores are calculated via attention. Even though, differentiable memory allows the network to be trained end to end, it necessitates accessing the entire memory which can be computationally expensive. RL approaches which can make hard selection of memory (Zaremba & Sutskever, 2015) are computationally attractive. MINERVA uses a similar hard selection of relation edges to walk on the graph. More importantly, MINERVA outperforms both these methods on their respective benchmark datasets. DeepPath (Xiong et al., 2017) uses RL based approaches to find paths in KBs. However, the state of their MDP requires the target entity to be known in advance and hence their path finding strategy is dependent on knowing the answer entity. MINERVA does not need any knowledge of the target entity and instead learns to find the answer entity among all entities. DeepPath, additionally feeds its gathered paths to Path Ranking Algorithm (Lao et al., 2011), whereas MINERVA is a complete system 9 trained to do query answering. DeepPath also uses fixed pretrained embeddings for its entity and relations. Lastly, on comparing MINERVA with DeepPath in their experimental setting on the NELL dataset, we match their performance or outperform them. MINERVA is also similar to methods for learning to search for structured prediction (Collins & Roark, 2004; Daumé III & Marcu, 2005; Daumé III et al., 2009; Ross et al., 2011; Chang et al., 2015). These methods are based on imitating a reference policy (oracle) which make near-optimal decision at every step. In our problem setting, it is unclear what a good reference policy would be. For example, a shortest path oracle between two entities would be bad, since the answer providing path should depend on the query relation. 7 C ONCLUSION We explored a new way of automated reasoning on large knowledge bases in which we use the knowledge graphs representation of the knowledge base and train an agent to walk to the answer node conditioned on the input query. We achieve state-of-the-art results on multiple benchmark knowledge base completion tasks and we also show that our model is robust and can learn long chains-ofreasoning. Moreover it needs no pretraining or initial supervision. Future research directions include applying more sophisticated RL techniques and working directly on textual queries and documents. ACKNOWLEDGEMENTS This work was supported in part by the Center for Data Science and the Center for Intelligent Information Retrieval, in part by DARPA under agreement number FA8750-13-2-0020, in part by Defense Advanced Research Agency (DARPA) contract number HR0011-15-2-0036, in part by the National Science Foundation (NSF) grant numbers DMR-1534431 and IIS-1514053 and in part by the Chan Zuckerberg Initiative under the project Scientific Knowledge Base Construction. The U.S. Government is authorized to reproduce and distribute reprints for Governmental purposes notwithstanding any copyright notation thereon. Any opinions, findings and conclusions or recommendations expressed in this material are those of the authors and do not necessarily reflect those of the sponsor. 10 R EFERENCES Kurt Bollacker, Colin Evans, Praveen Paritosh, Tim Sturge, and Jamie Taylor. Freebase: A collaboratively created graph database for structuring human knowledge. In ICDM, 2008. Antoine Bordes, Nicolas Usunier, Alberto Garcia-Duran, Jason Weston, and Oksana Yakhnenko. Translating embeddings for modeling multi-relational data. In NIPS, 2013. Guillaume Bouchard, Sameer Singh, and Theo Trouillon. On approximate reasoning capabilities of low-rank vector spaces. AAAI Spring Symposium, 2015. Matthias Broecheler, Lilyana Mihalkova, and Lise Getoor. Probabilistic similarity logic. In UAI, 2010. Andrew Carlson, Justin Betteridge, Bryan Kisiel, Burr Settles, Estevam R. Hruschka, Jr., and Tom M. Mitchell. Toward an Architecture for Never-ending Language Learning. In AAAI, 2010. Kai-Wei Chang, Akshay Krishnamurthy, Alekh Agarwal, Hal Daume, and John Langford. Learning to search better than your teacher. In ICML, 2015. William Cohen. Tensorlog: A differentiable deductive database. arXiv:1605.06523, 2016. Michael Collins and Brian Roark. Incremental parsing with the perceptron algorithm. In ACL, 2004. Rajarshi Das, Arvind Neelakantan, David Belanger, and Andrew McCallum. Chains of reasoning over entities, relations, and text using recurrent neural networks. In EACL, 2017. Hal Daumé III and Daniel Marcu. Learning as search optimization: Approximate large margin methods for structured prediction. In ICML, 2005. Hal Daumé III, John Langford, and Daniel Marcu. Search-based structured prediction. Machine learning, 2009. Tim Dettmers, Pasquale Minervini, Pontus Stenetorp, and Sebastian Riedel. Convolutional 2d knowledge graph embeddings. arXiv:1707.01476, 2017. Michael Evans and Timothy Swartz. Approximating integrals via Monte Carlo and deterministic methods. OUP Oxford, 2000. George Fishman. Monte Carlo: concepts, algorithms, and applications. Springer Science & Business Media, 2013. Lise Getoor and Ben Taskar. Introduction to statistical relational learning. MIT press, 2007. Alex Graves, Greg Wayne, and Ivo Danihelka. Neural turing machines. arXiv:1410.5401, 2014. Kelvin Guu, John Miller, and Percy Liang. Traversing knowledge graphs in vector space. In EMNLP, 2015. John Hammersley. Monte carlo methods. Springer Science & Business Media, 2013. Sepp Hochreiter and Jürgen Schmidhuber. Long short-term memory. Neural computation, 1997. Paul W Holland and Samuel Leinhardt. Transitivity in structural models of small groups. Comparative Group Studies, 1971. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv:1412.6980, 2014. Stanley Kok and Pedro Domingos. Statistical predicate invention. In ICML, 2007. Ni Lao, Tom Mitchell, and William Cohen. Random walk inference and learning in a large scale knowledge base. In EMNLP, 2011. John McCarthy. Programs with common sense. RLE and MIT Computation Center, 1960. Alexander Miller, Adam Fisch, Jesse Dodge, Amir-Hossein Karimi, Antoine Bordes, and Jason Weston. Key-value memory networks for directly reading documents. EMNLP, 2016. 11 Bonan Min, Ralph Grishman, Li Wan, Chang Wang, and David Gondek. Distant supervision for relation extraction with an incomplete knowledge base. In HLT-NAACL, 2013. Stephen Muggleton. Inverse entailment and progol. New generation computing, 1995. Stephen Muggleton, Ramon Otero, and Alireza Tamaddoni-Nezhad. Inductive logic programming. Springer, 1992. Arvind Neelakantan, Benjamin Roth, and Andrew McCallum. Compositional vector space models for knowledge base completion. In ACL, 2015. Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. A three-way model for collective learning on multi-relational data. In ICML, 2011. Maximilian Nickel, Volker Tresp, and Hans-Peter Kriegel. Factorizing yago: scalable machine learning for linked data. In WWW, 2012. Maximilian Nickel, Xueyan Jiang, and Volker Tresp. Reducing the rank in relational factorization models by including observable patterns. In NIPS, 2014. Nils J Nilsson. Logic and artificial intelligence. Artificial intelligence, 1991. J Ross Quinlan. Learning logical definitions from relations. Machine learning, 1990. Matthew Richardson and Pedro Domingos. Markov logic networks. Machine learning, 2006. Sebastian Riedel, Limin Yao, Andrew McCallum, and Benjamin M. Marlin. Relation extraction with matrix factorization and universal schemas. In NAACL, 2013. Tim Rocktäschel and Sebastian Riedel. End-to-end differentiable proving. In NIPS, 2017. Stéphane Ross, Geoffrey J Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In AISTATS, 2011. Stefan Schoenmackers, Oren Etzioni, Daniel Weld, and Jesse Davis. Learning first-order horn clauses from web text. In EMNLP, 2010. Yelong Shen, Po-Sen Huang, Jianfeng Gao, and Weizhu Chen. Reasonet: Learning to stop reading in machine comprehension. In KDD, 2017. Richard Socher, Danqi Chen, Christopher D Manning, and Andrew Ng. Reasoning with neural tensor networks for knowledge base completion. In NIPS, 2013. Fabian Suchanek, Gjergji Kasneci, and Gerhard Weikum. Yago: A core of semantic knowledge. In WWW, 2007. Sainbayar Sukhbaatar, Jason Weston, and Rob Fergus. End-to-end memory networks. In NIPS, 2015. Kristina Toutanova, Danqi Chen, Patrick Pantel, Hoifung Poon, Pallavi Choudhury, and Michael Gamon. Representing text for joint embedding of text and knowledge bases. In EMNLP, 2015. Kristina Toutanova, Victoria Lin, Wen-tau Yih, Hoifung Poon, and Chris Quirk. Compositional learning of embeddings for relation paths in knowledge base and text. In ACL, 2016. Théo Trouillon, Johannes Welbl, Sebastian Riedel, Éric Gaussier, and Guillaume Bouchard. Complex embeddings for simple link prediction. In ICML, 2016. Patrick Verga, David Belanger, Emma Strubell, Benjamin Roth, and Andrew McCallum. Multilingual relation extraction using compositional universal schema. In NAACL, 2016. William Yang Wang, Kathryn Mazaitis, and William W Cohen. Programming with personalized pagerank: a locally groundable first-order probabilistic logic. In CIKM, 2013. Duncan J Watts and Steven H Strogatz. Collective dynamics of small-worldnetworks. nature, 1998. Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 1992. 12 Wenhan Xiong, Thien Hoang, and William Yang Wang. Deeppath: A reinforcement learning method for knowledge graph reasoning. In EMNLP, 2017. Bishan Yang, Wen-tau Yih, Xiaodong He, Jianfeng Gao, and Li Deng. Embedding entities and relations for learning and inference in knowledge bases. In ICLR, 2015. Fan Yang, Zhilin Yang, and William W Cohen. Differentiable learning of logical rules for knowledge base reasoning. In NIPS, 2017. Manzil Zaheer, Satwik Kottur, Siamak Ravanbakhsh, Barnabas Poczos, Ruslan Salakhutdinov, and Alexander Smola. Deep sets. In NIPS, 2017. Wojciech Zaremba and Ilya Sutskever. arXiv:1505.00521, 2015. Reinforcement learning neural turing machines. 13 (i) M to 1 team plays sport Los Angeles Rams −−−−−−−−−→ American Football country of origin The Walking Dead −−−−−−−−−→ USA (ii) 1 to M job position in organization CEO −−−−−−−−−−−−−−−→ Merck & Co. cause of death Traffic collision −−−−−−−−→ Albert Camus instrument played by musician Harmonica −−−−−−−−−−−−−−−−−→ Greg Graffin Table 9: Few example facts belonging to m to 1, 1 to m relations in FB15k-237 . Relation /people/marriage union type/unions of this type./people/marriage/location of ceremony /organization/role/leaders./organization/leadership/organization /location/country/second level divisions /user/ktrueman/default domain/international organization/member states /base/marchmadness/ncaa basketball tournament/seeds./base/marchmadness/ncaa tournament seed/team Table 10: Few example 1-to-M relations from FB15k-237 with high cardinality ratio of tail to head. 8 8.1 A PPENDIX A NALYSIS OF QUERY RELATIONS OF FB15 K -237 We further did some query analysis on the FB15k-237 dataset. Following Bordes et al. (2013), we categorized the query relations into (M)any to 1, 1 to M and 1 to 1 relations. An example of a M to 1 relation would be ‘/people/profession’ (What is the profession of ‘X’?). An example of 1 to M relation would be ‘/people/cause of death/people’. An example query of that relation would be (Traffic collision, /people/cause of death/people, ?) ‘Who were killed in traffic collision accidents?’. Another example would be /music/instrument/instrumentalists (Who plays the music instrument ‘X’?). From a query answering point of view, the answers to this question is a list of entities. However, during evaluation time, the model is evaluated based on whether it is able to predict the one target entity which is in the query triple. Also since MINERVA outputs the end points of the paths as target entities, it is sometimes possible that the particular target entity of the triple does not have a path from the source entity (however there are paths to other ‘correct’ answer entities). Table 9 shows few other examples of relations belonging to different classes. Following Bordes et al. (2013), we classify a relation as 1-to-M if the ratio of cardinality of tail to head entities is greater than 1.5 and as M-to-1 if it is lesser than 0.67. In the validation set of FB15k-237, 54% of the queries are 1-to-M, whereas only 26% are M-to-1. Contrasting it with NELL-995, 27% are 1-to-M and 36% are M-to-1 or UMLS or KINSHIP where only 18% and 32% of the relations are 1-to-M. Table 10 shows relations from FB15k-237 dataset which have tail-to-head ratio. The average ratio for 1- TO -M relations in FB15k-237 is 13.39 (substantially higher than 1.5). As explained before, the current evaluation scheme is unfair when it comes to 1-to-M relations and the high percentage of 1-to-M relations in FB15k-237 also explains the sub optimal performance of MINERVA. 14 tail/head 129.75 65.15 49.18 36.5 33.6 Dataset UMLS KINSHIP Countries S1 Countries S2 Countries S3 WN18RR NELL-995 FB15K-237 WIKIMOVIES β 0.05 0.05 0.01 0.02 0.01 0.05 0.05 0.02 0.15 λ 0 0.05 0.1 0.02 0.01 0.05 0.02 0.05 0 Path Length 2 2 2 2 3 3 3 3 1 Table 11: Best hyper parameters 8.2 H YPERPARAMETERS In our experiments, we tune our model over two hyper parameters, viz., β which is the entropy regularization constant and λ which is the moving average constant for the REINFORCE baseline. The table 11 lists the best hyper parameters for all the datasets. 15
2cs.AI
How we can control the crack to propagate along the specified path feasibly? Zhenxing Cheng, Hu Wang* State Key Laboratory of Advanced Design and Manufacturing for Vehicle Body, Hunan University, Changsha, 410082, P.R. Chin Abstract A controllable crack propagation (CCP) strategy is suggested. It is well known that crack always leads the failure by crossing the critical domain in engineering structure. Therefore, the CCP method is proposed to control the crack to propagate along the specified path, which is away from the critical domain. To complete this strategy, two optimization methods are engaged. Firstly, a back propagation neural network (BPNN) assisted particle swarm optimization (PSO) is suggested. In this method, to improve the efficiency of CCP, the BPNN is used to build the metamodel instead of the forward evaluation. Secondly, the popular PSO is used. Considering the optimization iteration is a time consuming process, an efficient reanalysis based extended finite element methods (X-FEM) is used to substitute the complete X-FEM solver to calculate the crack propagation path. Moreover, an adaptive subdomain partition strategy is suggested to improve the fitting accuracy between real crack and specified paths. Several typical numerical examples demonstrate that both optimization methods can carry out the CCP. The selection of them should be determined by the tradeoff between efficiency and accuracy. Keywords Crack propagation path, Reanalysis solver, Back propagation neural network, Particle swarm optimization, Extended finite element method methods of simulating crack propagation. Such as finite element method (FEM) (Bouchard et al., 2003; Branco et al., 2015), extended finite element method (X-FEM) (Belytschko et al., 2009; Zeng et al., 2016), edge-based finite element method (ES-FEM) (G. R. Liu et al., 2011; Nguyen-Xuan et al., 2013), meshless method (Gu et al., 2011; Tanaka et al., 2015), and so on. The X-FEM might be the most popular method for crack propagation simulation due to its superiority of modeling both strong and weak discontinuities. Belytschko and Black proposed the initial idea of X-FEM at 1999 with minimal re-mesh (Belytschko et al., 1999). Then, Moës el al. (Belytschko et al., 2001) and Dolbow et al. (Dolbow et al., 1999) adopted the Heaviside function to enrichment function and 3D static crack was modeled by Sukumar et al. (Sukumar et al., 2000). Sequentially, the level set methods (LSMs) were applied to X-FEM which could easily track both the crack position and tips (Stolarska et al., 2001). Moreover, the X-FEM has much more applications (Ahmed et al., 2012; Areias et al., 2005; Belytschko et al., 2003; Chessa et al., 2002; Huynh et al., 2009; J.-H. Song et al., 2006; Sukumar et al., 2001; Zhuang et al., 2011; Zilian et al., 2008). More details of the development of X-FEM can be found in the literature (Abdelaziz et al., 2008; Belytschko et al., 2009; Fries et al., 2010). It is well known that the internal crack propagation always leads the failure of engineering structure by crossing the critical domain of the structure. Therefore, if the crack doesn’t cross the critical domain, the failure will not happen. Therefore, a controllable crack propagation method is proposed to control the crack propagation path and lead it propagate along the predefined path, so that the critical domain should not be crossed by the crack and the failure will not happen. In 1 Introduction Generally, the internal crack propagation is a critical issue in the engineering practice due to its deep effect on the quality and stability of engineering structures. Therefore, predicting the path of crack propagation is significant for guaranteeing the safety or reliability of engineering structures. There are many numerical 1 this study, the particle swarm optimization (PSO) method is used to obtain the suitable variables of design and the artificial neural network is used to improve the efficiency of PSO. The PSO proposed by Kennedy and Eberhart is a popular metaheuristic algorithm which inspired by the social behavior of bird flocking (Kennedy et al., 1995). Later Kennedy and Eberhart suggested a developed version of PSO for discrete optimization (Kennedy et al., 1997). Shi and Eberhart improved the PSO by inertia weight (Shi et al., 1998). Recently, PSO has been applied to many fields, such as structural optimization (Vagelis et al., 2011), dynamic finite element model updating (Shabbir et al., 2015), vehicle engineering (Battaï a et al., 2013), artificial neural network (Chatterjee et al., 2016; W. Sun et al., 2016) and so on (Amini et al., 2013; Amiri et al., 2012; Delice et al., 2014). Much more studies on PSO can be found in the literature (Eberhart et al., 2001; Ma et al., 2015; Poli et al., 2007; Tyagi et al., 2011). Considering the optimization iteration is a time consuming process, an efficient reanalysis based XFEM is used to calculate the crack propagation path, in which reanalysis methods are used to solve the equilibrium equations efficiently. Reanalysis (Kirsch, 2002), as a fast computational method, was suggested to predict the response of modified structures efficiently instead of full analysis. In recent decades, reanalysis methods have been well developed. Song et al. proposed a direct reanalysis algorithm to update the triangular factorization in sparse matrix solution (Q. Song et al., 2014). Liu et al. applied the Cholesky factorization to structural reanalysis (H. F. Liu et al., 2014). Huang and Wang solved the large-scale problems with local modification by the independent coefficient (IC) method (Huang et al., 2013). Zuo et al. applied the reanalysis method to the genetic algorithm (GA) (Zuo et al., 2011). Sun et al. extended the reanalysis method into a structural optimization process (R. Sun et al., 2014). To improve the efficiency of reanalysis method, He et al. developed a multiple-GPU based parallel IC reanalysis method (He et al., 2015). Based on these techniques, Wang et al. developed a CAD/CAE integrated parallel reanalysis design system (H. Wang et al., 2016). In this study, a controllable crack propagation (CCP) method is proposed to control the crack propagation path and make the crack propagate along the specified path, so that the critical domain of engineering structure should not be destroyed by the crack. Moreover, considering the optimization iteration is a time consuming process, an efficient reanalysis based XFEM is used to calculate the crack propagation path, in which the reanalysis solver is used to solve the equilibrium equations efficiently. Then the BPNN assisted PSO method should be used to obtain the optimal design variables to make the real crack path match with the specified path. The rest of this paper is organized as follows. The basic theory of X-FEM is briefly introduced in Section 2. The details of the CCP method can be found in Section 3. Then, some numerical examples will be given to investigate the performance of the CCP method in Section 4. Finally, some conclusions are summarized in Section 5. 2 Basics theories of XFEM 2.1 X-FEM approximation In the X-FEM, the displacement approximation consists of two parts: the standard finite element approximation and partition of unity enrichment. Define the displacement approximation of X-FEM as: u (x)  h  N ( x )u    ( x ) N I I  u s tan dard I J ( x )q J (1) J  E uenrich where N I and uI denote the standard FEM shape function and nodal degrees of freedom (DOF) respectively. The ( x) means enrichment function while the q J is the additional nodal degree of freedom. 2 where Kuu is the traditional finite element stiffness matrix, Kua , K aa , K ab are components with Heaviside enrichment and K ub , K ab , K bb are components with crack tip enrichment. 2.2 Crack propagation model Generally, the direction and magnitude of crack propagation at each iteration are used to determine how the crack will propagate. The direction of crack propagation is found from the maximum circumferential stress criterion and the crack will Fig. 1 An arbitrary crack line in a structured mesh Consider an arbitrary crack in a structured mesh as shown in Fig. 1, and then Eq. (1) can be rewritten as u (x)  h  N ( x )u   H I I I  I propagate in the direction where σ θθ is maximum ( x ) N I ( x )a I  I  S , 4   (Erdogan et al., 1963). The angle of crack propagation is defined as (2)  I , ( x ) N I ( x )b I I  T  1 2    KI  1  KI , (6) θ  2arctan  sign K II   8   4  K II K II     where θ is defined in the crack tip coordinate system, where  is the solution domain,  S is the domain cut by crack, T is the domain which crack tip located, H (x) is the shifted Heaviside enrichment K I and K II are the mixed-mode stress intensity and  (x) is the shifted crack tip enrichment. The factors. The details are given in the reference (Erdogan et al., 1963). There are two main patterns when modeling crack growth. The first one assumes a constant increment of crack growth at each cycle (Dolbow et al., 1999)while the other option is to assume a constant number of cycles and apply a fatigue crack growth law to predict the crack growth increment for the fixed number of cycles (Gravouil et al., 2002). In this study, a fixed increment of crack growth  a is considered. details of H (x) and  (x) are given as following: 1 H ( x)   1 Above crack , Below crack (3)      { (x)}4 1  r sin ,cos ,sin  sin ,sin  cos  2 2 2  2 . (4) The discrete X-FEM equations by substituting Eq.(2) into the principle of virtual work can be written as K K   K uu T ua T ub K ua K aa T K ab K ub  u  F       K  a   F  ,  b  F  K      3 Controllable crack propagation method 3.1 Framework of the CCP method u ab a bb b As mentioned above, the CCP method is proposed to control the crack propagation path based on the X-FEM, reanalysis, and BPNN assisted PSO methods. The framework of CCP method is shown in Fig. 2. (5) 3 Start Generate sample data set (X, Y, R) Initialize particles with random position and velocity vectors Specified crack path Back paopagation neural network model Evaluate the Fitness Function Value Filter out the invalid data set Pre-processing for XFEM Evaluate the fitness of particles: use BPNN model Real crack path Find and update the local and global best particle Assemble the stiffness matrix K Find and update the velocity and position of particles Adaptive subdomain partition strategy for design space Reanalysis Solver No Crack stop extending? Satisfy a stopping criterion? Yes No Yes No Reanalysis based X-FEM Yes BPNN assisted PSO Optimal solution End Fig. 2 The framework of the CCP method It can be found that the CCP method mainly includes two parts: reanalysis based X-FEM and BPNN assisted PSO method. The first part, reanalysis based X-FEM is used to calculate the real crack path and the reanalysis solver is used to solve the equilibrium equations to improve the efficiency of the X-FEM. The second part, the BPNN assisted PSO is used to obtain the optimal design variables to make the real crack path match with the specified path. Moreover, the adaptive subdomain partition strategy is used to improve the fitting accuracy between real crack and specified paths. More details can be found in Section 3.2, 3.3 and 3.4. 65 Ø13 17 F 67.5 120 F 13 Fig. 3 An edge crack in a plate 3.2 How to control the crack propagation path Then if a hole was added in the plate as shown in the left of Fig. 4, the crack propagation path will change as the right of Fig. 4. Obviously, the crack propagation path can be influenced by the size, position and number of this hole. In order to clearly describe this property, several different results are shown in Fig. 5. It can be found that different arrangement of the holes obtained different crack propagation paths and the paths can be easily driven by arranging the holes. Assume an edge crack in a plate as shown in the left of Fig. 3, where the initial crack length is a0  10mm , the force F  2  10 4 N , and linear elastic material behavior is assumed. The material is aluminum 7075T6 with E  7.17  104 MPa ,   0.33 and a plane strain state is considered. The increment of propagation a  1mm . Calculate the crack propagation path by XFEM without reanalysis solver (full analysis), and the crack path are shown in the right of Fig. 3. 4 numbers uniformly distributed in  0, i  , xi , vi means 65 Ø13 the current position and velocity respectively, and F 120 6.5 pi , p g means the previous best position and the global best position. Ø20 In this study, the BPNN assisted PSO is used to obtain the optimal arrangement of holes and the flowchart is shown in Fig. 2 where an adaptive subdomain partition strategy is proposed to decide the number of holes should be used. Moreover, the BPNN is used to construct the model of fitness function value, so that the fitness function value can be obtained efficiently. The more details are shown in the following sections. 28.5 17 51 F 13 Fig. 4 An edge crack in a plate with a hole 3.3.1 Fitness function The PSO is used to find the optimal design variables (the size, position and number of holes) to make the real crack path match with the specified path. Assume an edge crack in a plate as shown in the left of Fig. 3, and then a specified crack path is given as shown in Fig. 6. Fig. 5 The crack propagation paths of different arrangement of holes Specified crack path 3.3 The BPNN assisted PSO for crack path x, y, r 2 2 Key point 2 Real crack path Particle swarm optimization is a popular optimization algorithm, and a general algorithm of PSO is described as the following algorithm (Poli et al., 2007): Optimized hole Original hole Algorithm: General algorithm for PSO 1: Initialize a population array of particles with random position and velocity vectors; 2: Loop 3: For each particle, evaluate the fitness by fitness function; 4: Compare particle’s fitness evaluation with its pbest . If current value is better than pbest , then update the pbest and pi ; 5: Update the velocity and position of the particle according to the following equation: Min: x, y, r x, y, r 1 1 1 Fig. 6 The description of the optimization i i Obviously, the specified crack path is defined by a set of key points and the ideal situation is to control the real crack cross through these points. Although it is difficult to be achieved, the optimal path might be found by optimization method. Thus, this optimization problem is formulated as Minimize: i vi  v  U (0, 1 )  ( pi  xi )  U (0, 2 )  ( p g  xi ),   xi  xi  vi ; 6: If a criterion is met (usually a sufficiently good fitness or a maximum number of iteration), exit loop; 7: End loop In the algorithm, U (0, i ) means a vector of random 5 proposed to determine the number of holes should be used. The main idea of the adaptive subdomain partition strategy is to divide the design space into some subdomains, and generate a hole in each subdomain. Generally, the less holes used the more convenient for processing, so the number of subdomains will be increased gradually. In this study, the number of subdomains will be started from one to two, three, four and so on. The process of the adaptive subdomain partition strategy is demonstrated in Fig. 7. First, a threshold value  needs to be defined, which is the target value of fitness function c( x, y,r ) . Then the n c ( x, y , r )   ds(i) i 1 n , (7) Subject to: KU  F , ds (i )  f ( x, y, r ) , (8) (9) ( x  x1 ) 2  ( y  y1 ) 2  r  r1 , (10) ( x  x2 )2  ( y  y2 ) 2  r  r2 , (11) xmin  r  x  xmax  r , (12) ymin  r  y  ymax  r , (13) threshold value  is used to guarantee the fitting accuracy is available for engineering problems. When the minimal value of objective function c( x, y, r )   , it where c( x, y,r ) is the fitness function and the purpose is to minimize the fitness function. Moreover, ds(i ) means the design space needs to be subdivided further, otherwise, the optimal solution is obtained. The details of this strategy are described as following: means the minimum distance from the key point i to the real crack path, and xmin , xmax , ymin , ymax are used to The adaptive subdomain partition strategy 1: Initialize the number of subdomains in design space n by n=1; 2: Loop 3: Calculate the fitness function c( x, y,r ) by Eq.(7); 4: Find the minimum value cmin of fitness function; 5: If a criterion is met, exit loop. If not, n=n+1; The criterion is cmin  min(c( x, y, r ))   ; 6: Divide the design space into n subdomains; 7: End loop define the design space. Moreover, the crack propagation path should be calculated by the reanalysis based X-FEM as shown in Fig. 2, so the optimization must be subjected to the equilibrium equation and the ds(i ) is determined by the size, position or number of holes. It is obvious that the fitness function means the average distance from the key points to the real crack path, and it can be used to define the fitting accuracy between real crack and specified paths. 3.3.2 Adaptive subdomain partition strategy for design space The adaptive subdomain partition strategy is One subdomain Two subdomains Specified crack path Three subdomains Key point Original hole Four subdomains Subdomain Fig. 7 An illustration of the adaptive subdomain partition strategy 6 genetic algorithm (GA) (Irani et al., 2011), PSO (J.-R. Zhang et al., 2007) and so on. In this study, the BPNN is used to forecast the fitness function value of PSO, so that the optimal solution can be found more efficiently than the popular PSO. Generally, a BPNN consists of an input layer, an output layer and several hidden layers as shown in Fig. 8. A systematic theory can be found in the literature (G. Zhang et al., 1998; L. Zhang et al., 2002). Furthermore, in order to forecast the fitness function value, a set of sample data should be used to construct a BPNN, then the BPNN need to be trained, and finally the trained BPNN can be used to forecast the fitness function value, the flowchart of BPNN assisted PSO is shown in Fig. 9. 3.3.3 Back propagation neural network As mentioned above, the PSO needs to evaluate the fitness of each particle in every generation. Usually, the fitness could be evaluated by fitness function, such as Eq.(7), but it is time consumed, because the fitness needs to be evaluated by the X-FEM for each particle and the X-FEM is an iterative process. Therefore, we suggested a BPNN assisted PSO that the BPNN is used to construct the model of fitness function due to its flexible nonlinear modeling capability with strong adaptability (Ticknor, 2013). The BPNN is one of the popular artificial neural networks (L. Wang et al., 2006). It’s a type of multi-layered feed-forward neural network that minimizes an error backward while information is transmitted forward (G. Zhang et al., 1998)and only one single hidden BPNN layer is enough to approximate any nonlinear function with arbitrary precision (Aslanargun et al., 2007). Therefore, the BPNN has been widely used in many fields and many intelligent evolution algorithms have also been used to select the initial connection weights and thresholds of BPNN, such as Hidden Layer 1 Hidden Layer 2 Input w w b b Output Layer ... ... b w w b b 1 3 5 5 Fig. 8 Double hidden layers BPNN structure Training Constructing Start Load sample data set (X, Y, R) Initialize particles with random position and velocity vectors Construct a suitable BPNN Evaluate the fitness of particles: use fitness function Initialize the BPNN Find and update the local and global best particle Train the BPNN Find and update the velocity and position of particles Training finished? No Satisfy a stopping criterion? Yes Forecasting Output w No Yes Test the BPNN Optimal solution Forecast data by BPNN BPNN PSO Fig. 9 Flowchart of BPNN assisted PSO 7 End 1 3.4 The accuracy and efficiency of reanalysis based X-FEM Consider that the optimization need a large sample points and the calculation of the crack propagation path is an iterative process, the computational cost is commonly expensive. Therefore, an efficient reanalysis based X-FEM is used to calculate the crack propagation path, in which a reanalysis solver is used to solve the equilibrium equations efficiently. The reanalysis based X-FEM is used to predict the response of the current iteration by using the information of the first iteration. It avoids the full analysis after the first iteration, and the response of the subsequent iteration can be efficiently obtained. In this study, an exact reanalysis named decomposed updating reanalysis (DUR) method is used to solve the equilibrium equations, the briefly introduction of this method is as following, more details can be found from the reference (Cheng et al., 2017). Assume that the equilibrium equation of the X-FEM is Ki  Ui   Fi  , where U i  If Δ  j   0 , the j-th DOF is unbalanced, otherwise the j-th DOF is balanced. Therefore, the Eq.(17) can be rewritten as i K mm  i   K nm i  K i  1K mn  B   mm , Enn    i K mn y  δn . i 1 mm be obtained by Eq.(23). Sequentially, the U Consider that the increment of crack is very small in each iteration, so only small part of δ should be i  (24) i  can be obtained by Eq.(16). In order to test the accuracy and efficiency of the reanalysis based X-FEM, an edge crack in a plate with a hole which mentioned in section 3.2 has been calculated by the reanalysis based X-FEM. The comparison between reanalysis, full analysis and experimental results (Giner et al., 2009) as shown in Fig. 10 and Fig. 11. Moreover, the average errors and computational cost are listed in Tab. 1. It can be found that the reanalysis based X-FEM is accurate and it saves (17) into two parts: unbalanced and balanced equations, according to Eq.(18): Δ  sum Ki   K 1  δ . i nm Solve Eq.(24), y can be obtained, and then U can (16) then substitute Eq.(16) into Eq.(14), obtained nonzero. Based on this property, divide the U (23) where y is a dimension-n vector. Then, substitute Eq.(23) into Eq.(21) to find a unique solution of Eq.(17), obtain i nn Ki  U  δ . is (22) Define the general solution of Eq.(20) is U  By ,  K   K  K  , 1 where E nn is a rank-n unit matrix. 1  (21) one of them. Calculate the fundamental solution system of Eq. (20) by Define that  i Knm Um  Knni  Un  δn . which has infinite solutions, and the solution U (15) δ  F i   K  i  U1  i  1 (20) Obviously, Eq.(20) is a homogeneous equation set is the displacement of the i-th iteration, U  U  U  i  1 i i Kmm Um  Kmn Un  0 and and the equilibrium equation of the first iteration can be given as i  (19) where m is the number of balanced DOFs, and n is the number of unbalanced DOFs. Equation (19) can be rewritten as (14) K1 U1  F1 . K mni   U m   0    , K nni    U n  δ n  (18) 8 Tab. 1 Performance comparison of edge crack in a plate with a hole by DUR and full analysis Computational Time/s Average Errors DUR Full analysis Displacement Von Mises Stress 2.047 26.781 4.8916e-13 1.7356e-12 about 13 times computational cost than the full analysis. Therefore, the reanalysis based X-FEM is an accurate method for crack quasi-static propagation problems with high efficiency. Young’s modulus E1  7.17  104 MPa , the Poisson’s ratio   0.33 , and a plane strain state is considered. Assume the increment of propagation a  1mm , then the crack will propagate along a straight line like the middle figure of Fig. 12 if there with no holes. However, if we want to make the crack propagate along the specified path as shown in the right figure of Fig. 12, how could we realize it? q 60 60 120 Fig. 10 The displacement comparison between reanalysis, full analysis and experimental results q Fig. 12 An edge crack optimization in a plate As mentioned above, some holes will be added to control the crack path, and the CCP method should be used to find the suitable number, position and size of these holes. As shown in Fig. 9,we need obtain a sample data set firstly. Then a BPNN should be constructed by the training sample with 1000 groups of sample data. After that, the BPNN will be trained and finally the testing sample with 500 groups of sample data should be used to test the performance of BPNN. Here a double hidden layers BPNN is used and each hidden layer has 5 nodes. The regression of BPNN is shown in Fig. 13, and the left is the regression of training sample while the right is the regression of testing sample. It can be found that the performance of BPNN is acceptable. Fig. 11 The stress comparison between reanalysis and full analysis 4 Numerical examples In order to test feasibility of the CCP method, two examples are tested by the proposed methods. These two cases involve a simple case and an engineering case. 4.1 An edge crack optimization in a plate As shown in the left figure of Fig. 12, an edge crack plate is considered where the initial crack length a0  10mm , and the uniformed load q  200 N / mm . The parameters of material are given as following: the 9 Fig. 13 The regression of BPNN After the BPNN has been trained, the optimal solution should be obtained by the BPNN assisted PSO and popular PSO with 40 particles. The optimization procedure of each method is presented in Fig. 14. It can be found that the BPNN assisted PSO reaches convergence more quickly than the popular PSO while the popular PSO can obtain a smaller fitness function value. However, the BPNN assisted PSO can save much more computational time than the popular PSO because the fitness function value can be obtained by the BPNN rather than X-FEM method. The optimal solutions of them are listed in Tab. 2. Moreover, the results of crack propagation path are shown in Fig. 15 and Fig. 16 where the key points are used to define the specified crack path. The results indicate that the crack did propagate along the specified path. Fig. 15 The displacement results of optimal solution Fig. 16 Comparison of specified crack path and real crack path 2.0 PSO BPNN-PSO 4.2 The bottom plate of bearing pedestal Fitness fuction 1.5 As mentioned before, the purpose of this study is to control the crack keep away from the critical domain of engineering structure to avoid failure. In this case, a bottom plate of bearing pedestal is considered as shown in Fig. 17 and all the parameters of material are the same as section 4.1. Assume a crack is in the edge of bottom plate as shown in Fig. 18, where the initial crack length 1.0 0.5 0.0 0 20 40 60 80 100 Generation a0  5mm , and the uniformed load q  20 N / mm . Fig. 14 Comparison between optimization procedures of BPNN-PSO and popular PSO Then the crack will propagate and cross the threaded hole like the right figure of Fig. 18, and this will lead the failure of bearing pedestal. Therefore, we need to control the crack propagation path to make it not cross the threaded holes just like Fig. 19, where the left figure is path A while the right is path B. 10 Tab. 2 Optimal solutions of BPNN assisted PSO and popular PSO Optimization BPNN-PSO PSO Design variables (mm) Fitness function X Y R 26.5407 30.6038 26.8463 27.4947 12.0507 12.5502 Fig. 17 A bottom plate of bearing pedestal 0.4144 0.1084 Path A q Path B Fig. 19 The specified crack paths of bottom plate 22 40 30 9 12 Ø5 q Fig. 18 An edge crack in the bottom plate Fig. 20 The regression of BPNN For the path A, a BPNN has been constructed and trained by the training samples with 1000 groups of data and 500 groups of testing data have been tested the performance of BPNN. A double hidden layers BPNN is also used. The regression of BPNN is shown in Fig. 20. Then the optimal solution should be found by BPNN assisted PSO and popular PSO with 40 particles, the optimization procedure is shown in Fig. 21 and the optimal solutions are listed in Tab. 3. Moreover, the results of crack propagation path are shown in Fig. 22 and Fig. 23 where the key points are used to define the specified crack path. The results indicate that the crack did propagate along the specified path. PSO BPNN-PSO 1.2 Fitness fuction 1.0 0.8 0.6 0.4 0.2 0 20 40 60 80 100 Generation Fig. 21 Comparison between optimization procedures of BPNN-PSO and popular PSO of path A 11 Tab. 3 Optimal solutions of BPNN assisted PSO and popular PSO Optimization BPNN-PSO PSO Design variables (mm) Fitness function X Y R 7.1572 8.3984 3.1728 3.9024 2.7756 3.0252 0.2231 0.1453 28. The results indicate that the crack did propagate along the specified path. Fig. 22 Comparison of specified crack path and real crack path Fig. 24 The optimal result for only one hole BPNN-PSO PSO Not satisfy constraints Fig. 25 The regression of BPNN Fig. 23 The displacement results of optimal solution As for the path B, the same operations have been carried out, and the optimal result by using only one hole is shown in Fig. 24. It can be found that the solution is not very nice by only one hole, so the adaptive subdomain partition strategy divides the design space into two sub-spaces, and for two holes, the optimal solution is much better. For two holes optimization, the regression of BPNN is shown in Fig. 25, where the size of training sample is 1000 and the size of testing sample is 500. It should be noted that the samples in center domain is not satisfied with the constraints Eqs. (1013).Therefore, there are no training and testing samples. The optimization procedure is shown in Fig. 26 and the optimal solutions are listed in Tab. 4. Moreover, the results of optimal solution are shown in Fig. 27 and Fig. 2.5 PSO BPNN-PSO Fitness fuction 2.0 1.5 1.0 0.5 0.0 0 20 40 60 80 100 Generation Fig. 26 Comparison between optimization procedures of BPNN-PSO and popular PSO of path B 12 Tab. 4 Optimal solutions of BPNN assisted PSO and popular PSO Optimization BPNN-PSO PSO Design variables (mm) X1 Y1 R1 X2 Y2 R2 10.1674 10.3278 20.3498 20.4236 4.5053 4.5921 24.1869 24.7407 21.2344 21.2991 3.8063 3.6068 Fitness function 0.66365 0.20189 in x64 Windows 7. Firstly, a comparison of computational scale between the BPNN assisted PSO and popular PSO is shown in Tab. 5, where the computational data means the data set which needs to be calculated during the optimization process and it can be calculated by accumulating all particles in all generations until the optimization converges. The sample data is used to construct the BPNN model, so there is no sample data for the popular PSO. For a sample point, the computational time cost in solving the equilibrium equations is listed in Tab. 6. It can be found that the reanalysis solver DUR is more efficient than the full analysis. Moreover, the modeling, optimization and total time cost by the DUR and full analysis are listed in Tab. 7 and Tab. 8 respectively, where the modeling time is the cost of constructing BPNN model and the optimization time is the cost of optimization process. The comparison between the DUR and full analysis is shown in Fig. 29. From the above results, it can be found that the accuracy of BPNN determine the performance of the BPNN assisted PSO. However, in term of efficiency, it prevails. Therefore, the tradeoff between efficiency and accuracy is important for selection. Moreover, the reanalysis solver DUR saves much computational cost in solving the equilibrium equations. Furthermore, the comparison of specified crack path and real crack path indicates that the crack did propagate along the specified path, so the CCP method is available to control the crack propagation path. Fig. 27 Comparison of specified crack path and real crack path Fig. 28 The displacement results of optimal solution 4.3 Analysis of computational cost Two numerical examples have been tested in this section by both the BPNN assisted PSO and popular PSO methods. In order to compare the performance of BPNN assisted and popular PSOs, the CPU running time has been recorded and all simulations were performed on an Intel(R) Core(TM) i7-5820K 3.30GHz CPU with 32GB of memory within MATLAB R2016b Tab. 5 Comparison of computational scale between the BPNN assisted PSO and popular PSO Convergent generation Case 1 Case 2-1 Case 2-2 Size of sample data Size of computational data BPNN-PSO PSO BPNN-PSO PSO BPNN-PSO PSO 20 31 32 40 50 67 1000 1000 1000 ---- 800 1240 1280 1600 2000 2680 13 Tab. 6 Comparison of computational time cost between DUR and full analysis for on data point Case 2-2 (BPNN-PSO) Computational time/s Case 1 Case 2-1 Case 2-2 DUR Full analysis 3.062 1.984 1.863 37.796 20.578 19.965 Full analysis DUR Case 2-2 (PSO) Case 2-1(BPNN-PSO) Case 2-1 (PSO) Case 1 (BPNN-PSO) Case 1 (PSO) 0 10000 20000 30000 40000 50000 60000 70000 Computational time (s) Fig. 29 Comparison of computational time cost between DUR and full analysis Tab. 7 Computational time of the BPNN-PSO and PSO by reanalysis solver DUR Modeling time/s Case 1 Case 2-1 Case 2-2 Optimization time/s Total time/s BPNN-PSO PSO BPNN-PSO PSO BPNN-PSO PSO 3062 1984 1863 ---- 76 121 129 4899 3968 4992 3138 2105 1992 4899 3968 4992 Tab. 8 Computational time of the BPNN-PSO and PSO by reanalysis solver full analysis Modeling time/s Case 1 Case 2-1 Case 2-2 Optimization time/s Total time/s BPNN-PSO PSO BPNN-PSO PSO BPNN-PSO PSO 37796 20578 19965 ---- 81 118 132 60473 41156 53506 37877 20696 20097 60473 41156 53506 optimization methods are used to find the suitable arrangement which including the number, position and size of holes. Firstly, a BPNN assisted PSO is suggested. In this method, the fitness function value of PSO can be forecasted by the BPNN rather than X-FEM, so efficiency of BPNN assisted PSO is much higher than popular PSO. Moreover, considering the optimization iteration is a time consuming process, an efficient reanalysis based X-FEM is used to calculate the crack propagation path, in which reanalysis methods are used to solve the equilibrium equations efficiently. Furthermore, in order to improve the fitting accuracy between real crack path and specified crack path, the adaptive subdomain partition strategy is suggested to 5 Conclusions In this study, the controllable crack propagation (CCP) method is proposed to control the crack propagation path. Maybe the crack propagation is unavoidable, but the crack propagation path can be specified by the CCP method, so the critical domain of structure will not be crossed. The main idea of CCP is to control the crack propagation by arranging some holes in the design domain, so the crack propagation path can be driven by a suitable arrangement. The CCP method is a closed loop optimization method which integrating the BPNN, PSO, reanalysis based X-FEM, adaptive subdomain partition strategy and other techniques. Two 14 decide the number of holes should be used. Numerical examples indicate that the CCP method can control the crack propagation along the specified path well, and the fitting accuracy between real crack and specified paths is available. International Journal of Production Economics, 142(2), 259-277. Belytschko, T., & Black, T. (1999). Elastic crack growth in finite elements with minimal remeshing. International Journal for Numerical Methods in Engineering, 45(5), 601-620. Belytschko, T., Chen, H., Xu, J., & Zi, G. (2003). Dynamic crack propagation based on loss of hyperbolicity and a new discontinuous enrichment. International Journal for Numerical Methods in Engineering, 58(12), 1873-1905. Belytschko, T., Gracie, R., & Ventura, G. (2009). A review of extended/generalized finite element methods for material modeling. Modelling and Simulation in Materials Science and Engineering, 17(4), 043001. Belytschko, T., Moës, N., Usui, S., & Parimi, C. (2001). Arbitrary discontinuities in finite elements. International Journal for Numerical Methods in Engineering, 50(4), 993-1013. Bouchard, P. O., Bay, F., & Chastel, Y. (2003). Numerical modelling of crack propagation: automatic remeshing and comparison of different criteria. Computer Methods in Applied Mechanics and Engineering, 192(35-36), 3887-3908. Branco, R., Antunes, F. V., & Costa, J. D. (2015). A review on 3D-FE adaptive remeshing techniques for crack growth modelling. Engineering Fracture Mechanics, 141, 170-195. Chatterjee, S., Sarkar, S., Hore, S., Dey, N., Ashour, A. S., & Balas, V. E. (2016). Particle swarm optimization trained neural network for structural failure prediction of multistoried RC buildings. Neural Computing and Applications, 28(8), 2005-2016. Cheng, Z., & Wang, H. (2017). A fast and exact computational method for crack propagation based on extended finite element method. arXiv preprint arXiv:1708.01610. Chessa, J., Smolinski, P., & Belytschko, T. (2002). The extended finite element method (XFEM) for solidification problems. International Journal for Numerical Methods in Engineering, 53(8), 1959-1977. Delice, Y., Kızılkaya Aydoğan, E., Özcan, U., & İlkay, M. S. (2014). A modified particle swarm optimization algorithm to mixed-model two-sided assembly line Acknowledgements This work has been supported by Project of the National Key R&D Program of China 2017YFB0203701 and the National Natural Science Foundation of China under the Grant Numbers 11572120. References Abdelaziz, Y., & Hamouine, A. (2008). A survey of the extended finite element. Computers & Structures, 86(11-12), 1141-1151. Ahmed, A., van der Meer, F. P., & Sluys, L. J. (2012). A geometrically nonlinear discontinuous solid-like shell element (DSLS) for thin shell structures. Computer Methods in Applied Mechanics and Engineering, 201– 204, 191-207. Amini, F., Hazaveh, N. K., & Rad, A. A. (2013). Wavelet PSO‐Based LQR Algorithm for Optimal Structural Control Using Active Tuned Mass Dampers. Computer-Aided Civil and Infrastructure Engineering, 28(7), 542-557. Amiri, G. G., Rad, A. A., Aghajari, S., & Hazaveh, N. K. (2012). Generation of Near-Field Artificial Ground Motions Compatible with Median-Predicted Spectra Using PSO-Based Neural Network and Wavelet Analysis. Computer-Aided Civil and Infrastructure Engineering, 27(9), 711–730. Areias, P., & Belytschko, T. (2005). Non‐linear analysis of shells with arbitrary evolving cracks using XFEM. International Journal for Numerical Methods in Engineering, 62(3), 384-415. Aslanargun, A., Mammadov, M., Yazici, B., & Yolacan, S. (2007). Comparison of ARIMA, neural networks and hybrid models in time series: tourist arrival forecasting. Journal of Statistical Computation and Simulation, 77(1), 29-53. Battaï a, O., & Dolgui, A. (2013). A taxonomy of line balancing problems and their solutionapproaches. 15 balancing. Journal of Intelligent Manufacturing, 28(1), 23-36. Dolbow, J., & Belytschko, T. (1999). A finite element method for crack growth without remeshing. International Journal for Numerical Methods in Engineering, 46(1), 131-150. Eberhart, & Shi, Y. (2001). Particle swarm optimization: developments, applications and resources. Paper presented at the Evolutionary Computation, 2001. Proceedings of the 2001 Congress on. Erdogan, F., & Sih, G. (1963). On the crack extension in plates under plane loading and transverse shear. Journal of basic engineering, 85(4), 519-527. Fries, T. P., & Belytschko, T. (2010). The extended/generalized finite element method: an overview of the method and its applications. International Journal for Numerical Methods in Engineering, 84(3), 253-304. Giner, E., Sukumar, N., Tarancón, J. E., & Fuenmayor, F. J. (2009). An Abaqus implementation of the extended finite element method. Engineering Fracture Mechanics, 76(3), 347-368. Gravouil, A., Moës, N., & Belytschko, T. (2002). Non‐planar 3D crack growth by the extended finite element and level sets—Part II: Level set update. International Journal for Numerical Methods in Engineering, 53(11), 2569-2586. Gu, Y. T., Wang, W., Zhang, L. C., & Feng, X. Q. (2011). An enriched radial point interpolation method (e-RPIM) for analysis of crack tip fields. Engineering Fracture Mechanics, 78(1), 175-190. He, G., Wang, H., Li, E., Huang, G., & Li, G. (2015). A multiple-GPU based parallel independent coefficient reanalysis method and applications for vehicle design. Advances in Engineering Software, 85, 108-124. Huang, G., Wang, H., & Li, G. (2013). A reanalysis method for local modification and the application in large-scale problems. Structural and Multidisciplinary Optimization, 49(6), 915-930. Huynh, D., & Belytschko, T. (2009). The extended finite element method for fracture in composite materials. International Journal for Numerical Methods in Engineering, 77(2), 214-239. Irani, R., & Nasimi, R. (2011). Evolving neural network using real coded genetic algorithm for permeability estimation of the reservoir. Expert Systems with Applications, 38(8), 9862-9866. Kennedy, J., & Eberhart, R. (1995). Particle swarm optimization. Paper presented at the IEEE International Conference on Neural Networks, 1995. Proceedings. Kennedy, J., & Eberhart, R. C. (1997). A discrete binary version of the particle swarm algorithm. Paper presented at the IEEE International Conference on Systems, Man, and Cybernetics, 1997. Computational Cybernetics and Simulation. Kirsch, U. (2002). Design-Oriented Analysis of Structures. Dordrecht: Kluwer Academic Publishers. Liu, G. R., Nourbakhshnia, N., & Zhang, Y. W. (2011). A novel singular ES-FEM method for simulating singular stress fields near the crack tips for linear fracture problems. Engineering Fracture Mechanics, 78(6), 863-876. Liu, H. F., Wu, B. S., & Li, Z. G. (2014). Method of Updating the Cholesky Factorization for Structural Reanalysis with Added Degrees of Freedom. Journal of Engineering Mechanics, 140(2), 384-392. Ma, W., Wang, M., & Zhu, X. (2015). Hybrid particle swarm optimization and differential evolution algorithm for bi-level programming problem and its application to pricing and lot-sizing decisions. Journal of Intelligent Manufacturing, 26(3), 471-483. Nguyen-Xuan, H., Liu, G. R., Bordas, S., Natarajan, S., & Rabczuk, T. (2013). An adaptive singular ES-FEM for mechanics problems with singular field of arbitrary order. Computer Methods in Applied Mechanics and Engineering, 253, 252-273. Poli, R., Kennedy, J., & Blackwell, T. (2007). Particle swarm optimization. Swarm Intelligence, 1(1), 33-57. Shabbir, F., & Omenzetter, P. (2015). Particle Swarm Optimization with Sequential Niche Technique for Dynamic Finite Element Model Updating. ComputerAided Civil and Infrastructure Engineering, 30(5), 359375. Shi, Y., & Eberhart, R. (1998). A modified particle swarm optimizer: Springer Berlin Heidelberg. Song, J.-H., Areias, P. M. A., & Belytschko, T. (2006). A method for dynamic crack and shear band propagation with phantom nodes. International Journal 16 for Numerical Methods in Engineering, 67(6), 868-893. Song, Q., Chen, P., & Sun, S. (2014). An exact reanalysis algorithm for local non-topological high-rank structural modifications in finite element analysis. Computers & Structures, 143, 60-72. Stolarska, M., Chopp, D., Moës, N., & Belytschko, T. (2001). Modelling crack growth by level sets in the extended finite element method. International Journal for Numerical Methods in Engineering, 51(8), 943-960. Sukumar, N., Chopp, D. L., Moës, N., & Belytschko, T. (2001). Modeling holes and inclusions by level sets in the extended finite-element method. Computer Methods in Applied Mechanics and Engineering, 190(46), 6183-6200. Sukumar, N., Moës, N., Moran, B., & Belytschko, T. (2000). Extended finite element method for threedimensional crack modelling. International Journal for Numerical Methods in Engineering, 48(11), 1549-1570. Sun, R., Liu, D., Xu, T., Zhang, H., & Zuo, W. (2014). New Adaptive Technique of Kirsch Method for Structural Reanalysis. AIAA Journal, 52(3), 486-495. Sun, W., & Xu, Y. (2016). Using a back propagation neural network based on improved particle swarm optimization to study the influential factors of carbon dioxide emissions in Hebei Province, China. Journal of Cleaner Production, 112, 1282-1291. Tanaka, S., Suzuki, H., Sadamoto, S., Imachi, M., & Bui, T. Q. (2015). Analysis of cracked shear deformable plates by an effective meshfree plate formulation. Engineering Fracture Mechanics, 144, 142-157. Ticknor, J. L. (2013). A Bayesian regularized artificial neural network for stock market forecasting. Expert Systems with Applications, 40(14), 5501-5506. Tyagi, S. K., Yang, K., Tyagi, A., & Dwivedi, S. N. (2011). Development of a fuzzy goal programming model for optimization of lead time and cost in an overlapped product development project using a Gaussian Adaptive Particle Swarm Optimization-based approach. Engineering Applications of Artificial Intelligence, 24(5), 866-879. Vagelis, P., & Manolis, P. (2011). A Hybrid Particle Swarm - Gradient Algorithm for Global Structural Optimization. Computer-Aided Civil and Infrastructure Engineering, 26(1), 48-68. Wang, H., Zeng, Y., Li, E., Huang, G., Gao, G., & Li, G. (2016). “Seen Is Solution” a CAD/CAE integrated parallel reanalysis design system. Computer Methods in Applied Mechanics and Engineering, 299, 187-214. Wang, L., Zeng, Y., Zhang, J., Huang, W., & Bao, Y. (2006). The criticality of spare parts evaluating model using artificial neural network approach. Computational Science–ICCS 2006, 728-735. Zeng, Q., Liu, Z., Xu, D., Wang, H., & Zhuang, Z. (2016). Modeling arbitrary crack propagation in coupled shell/solid structures with X-FEM. International Journal for Numerical Methods in Engineering, 106(12), 1018-1040. Zhang, G., Patuwo, B. E., & Hu, M. Y. (1998). Forecasting with artificial neural networks:: The state of the art. International journal of forecasting, 14(1), 3562. Zhang, J.-R., Zhang, J., Lok, T.-M., & Lyu, M. R. (2007). A hybrid particle swarm optimization–backpropagation algorithm for feedforward neural network training. Applied Mathematics and Computation, 185(2), 1026-1037. Zhang, L., & Subbarayan, G. (2002). An evaluation of back-propagation neural networks for the optimal design of structural systems: Part II. Numerical evaluation. Computer Methods in Applied Mechanics and Engineering, 191(25), 2887-2904. Zhuang, Z., & Cheng, B. B. (2011). Equilibrium state of mode-I sub-interfacial crack growth in bi-materials. International Journal of Fracture, 170(1), 27-36. Zilian, A., & Legay, A. (2008). The enriched space– time finite element method (EST) for simultaneous solution of fluid–structure interaction. International Journal for Numerical Methods in Biomedical Engineering, 75(3). Zuo, W., Xu, T., Zhang, H., & Xu, T. (2011). Fast structural optimization with frequency constraints by genetic algorithm using adaptive eigenvalue reanalysis methods. Structural and Multidisciplinary Optimization, 43(6), 799-810. 17
9cs.NE
arXiv:1504.06185v3 [math.ST] 7 Nov 2016 On Locally Dyadic Stationary Processes Theodoros Moysiadis Institute of Applied Biosciences, Centre for Research and Technology Hellas and Konstantinos Fokianos Department of Mathematics & Statistics, University of Cyprus Submitted: April 2015 First Revision: April 2016 Second Revision: September 2016 Abstract We introduce the concept of local dyadic stationarity, to account for non-stationary time series, within the framework of Walsh-Fourier analysis. We define and study the time varying dyadic ARMA models (tvDARMA). It is proven that the general tvDARMA process can be approximated locally by either a tvDMA and a tvDAR process. Keywords: dyadic stationarity, local stationarity, spectral density, stationarity, Walsh functions, Walsh-Fourier analysis. 1 1 Introduction The concept of stationarity is crucial in the statistical theory of time series analysis, especially for the development of asymptotic theory. However, the assumption of stationarity is often not realistic in applications. For example, a time series can display significant changes through time and therefore stationarity is a questionable assumption. One of the most important consequences, is that attempts to develop asymptotic results are, generally speaking, groundless, since future information of the process does not necessarily contain any information regarding the present of the process. In addition, there is no natural generalization of stationarity to non-stationarity, since non-stationary processes might exhibit trend or/and periodicity and other types of non-standard behaviour. Priestley (1965) considered non-stationary processes whose characteristics are changing slowly over time and developed the theory of evolutionary spectra (see Priestley (1981, 1988)). However, such an approach makes it difficult to obtain asymptotic results, which are needed for developing estimation theory. In order to apply standard asymptotic theory for non-stationary processes, Dahlhaus, in a series of contributions, introduced an appropriate theoretical framework, based on the concept of local stationarity (see, for example, Dahlhaus (1996b, 1997, 2000)). The definition of local stationarity is based on the existence of a time varying spectral representation (Dahlhaus (1996b)). Dahlhaus (2012) gives an excellent and detailed overview of the theory of locally stationary processes. A comparison between the methodology developed by Dahlhaus and Priestley is discussed in Dahlhaus (1996a). Some other works related to locally stationary time series include the works by Granger and Hatanaka (1964), Tjøstheim (1976), Martin (1981), Melard and Schutter (1989), Neumann and Von Sachs (1997), Nason et al. (2000), Ombao et al. (2002), Sakiyama and Taniguchi (2004) and Davis et al. (2006), among others. The main goal of this contribution is to utilize the idea of local stationarity, in the sense of the above mentioned papers, for studying the spectral behaviour of time series, based on the system of 2 Walsh functions. These functions led to the development of Walsh-Fourier (square wave) analysis, just like the sinusoidal functions led to Fourier (trigonometric) analysis. The motivation behind Walsh-Fourier analysis was the need to approximate stationary time series, which display square waveforms with abrupt switches (e.g. in communications and engineering), see Stankovic̀ et al. (2005) for instance. We introduce the concept of local stationarity but based on the orthogonal system of Walsh functions to account for such phenomena that exhibit, in addition, non-stationary behaviour. We study important general classes of time series, similar in concept with the time varying ARMA (tvARMA) process- see Dahlhaus (2012). We anticipate that our theory and methods will be applicable to non-stationary data observed in diverse applications like pattern recognition for binary images, linear system theory and other (see Stankovic̀ et al. (2005), for more). The Walsh functions were introduced by Walsh (1923). They take only two values, +1 and −1, and have similar properties with the trigonometric functions (although they are not periodic). The introduction of Walsh functions has been followed by a series of papers, related to their mathematical properties and generalizations (Fine (1949)), which provided the theoretical framework for various applications, see e.g. Beauchamp (1984), Stoffer (1991) and Abbasi et al. (2012), among others. Stoffer (1991) gives an excellent account of the history of Walsh functions and a comparison between Walsh and Fourier analysis. The statistical analysis of stationary time series via Walsh functions has been based on real and dyadic time. The dyadic time is based on the concept of dyadic addition (see Subsection 2.1). For time points m, n, the real time sum m + n is now replaced by the dyadic sum m ⊕ n. Morettin (1981) reviewed work on Walsh spectral analysis in both time scales. Walsh-Fourier analysis of real time stationary processes has been studied by Kohn (1980a,b), Morettin (1983) and Stoffer (1985, 1987, 1990), among others. The dyadic time stationarity is defined in respect to the real time stationarity as in Subsection 2.2 (see also Nagai (1977)). Further references related to the Walsh-Fourier analysis of dyadic stationary processes are Morettin (1974, 1978, 1981), Nagai 3 (1980), Nagai and Taniguchi (1987) and Taniguchi et al. (1989). In particular, Morettin (1974, 1978) studied the finite Walsh transform, considered the Walsh periodogram as an estimator of the Walsh spectrum and studied its theoretical properties. Nagai (1977) proved that a dyadic stationary process has always unique spectral representation in terms of the system of Walsh functions and studied the dyadic linear process (see also Morettin (1974)). Nagai (1980) also studied dyadic autoregressive and moving average processes and their relation. In this article, we introduce the concept of local dyadic stationarity and discuss the advantages and the perspectives of such consideration in the framework of Walsh functions. In Section 2 of this article, we recall some definitions and review some fundamental results for dyadic stationary processes. In Section 3, we introduce the concept of local dyadic stationarity and study the time varying dyadic moving average process. In Section 4, we define the general class of time varying dyadic autoregressive moving average processes and show that they exhibit locally dyadic stationarity. The article concludes with several remarks concerning further research in this topic. 2 Preliminaries 2.1 Dyadic addition We recall the definition of dyadic addition and of a dyadic process following Kohn (1980a). Consider m and n to be non-negative integers that have the following dyadic expansions m= f X k=0 mk 2k , n = f X nk 2k , where mk , nk ∈ {0, 1}. k=0 Then, the dyadic sum m ⊕ n is defined as m⊕n= f X |mk − nk |2k . k=0 4 Consider now x and y to be real numbers that belong to the interval I ≡ [0, 1). We write x= ∞ X xk 2−k , y = ∞ X yk 2−k , where xk , yk ∈ {0, 1}. k=1 k=1 In general, each of the above representations is not unique. We follow the convention that if, e.g. x, can be written both through a finite or an infinite order representation, then choose the representation where xk = 0, ∀ k > k0 . With this convention, the dyadic sum x ⊕ y is defined as x⊕y = ∞ X |xk − yk |2−k . k=1 Recall that the k-th Rademacher function is φk (x) = (−1)xk+1 , ∀x ∈ I, ∀ k ≥ 0. Then the system of Walsh functions, W (n, x), n = 0, 1, 2, . . . , x ∈ I, is defined as follows. If n = 0, set W (0, x) = 1, ∀x ∈ I. For n > 0, let n = 2n1 + 2n2 + . . . + 2nν , where 0 ≤ n1 < n2 . . . < nν . Then W (n, x) =   1, n = 0, ∀x ∈ I.  φ (x)φ (x) · · · φ (x), n > 0, n1 n2 nν We mention briefly some characteristic properties of the Walsh functions. (i) The system of Walsh functions is orthonormal in I, that is  Z 1  1 for W (n, x)W (m, x)dx =  0 for 0 n = m, n 6= m, and constitutes a complete set. If f (x), x ∈ I is a square integrable function, then it can be expanded in a Walsh-Fourier series, i.e. f (x) = ∞ X cn W (n, x), n=0 with cn = R1 0 f (x)W (n, x)dx. (ii) ∀n, m ∈ N, x, y ∈ I, W (n, x)W (m, x) = W (n⊕m, x) and W (n, x)W (n, y) = W (n, x⊕y). 5 The above properties of Walsh functions motivate the study of stationary time series in terms of this basis. It is well known that a second order stationary process {Xt , t ∈ N} is represented as Xt = Z π eiλt dZ(λ), −π with {Z(λ), λ ∈ (−∞, ∞)} an orthogonal-increment process such that  E dZ(λ)dZ(µ) = η(λ − µ)dF (λ)dµ where η(·) is the Dirac function periodically extended to R with period 2π and F (·) is the spectral distribution function (see Brillinger (1974), for instance). The Walsh functions can be used instead to represent Xt under the concept of dyadic stationarity. There are differences though between real and dyadic stationary processes; see Morettin (1981) for further discussion. The concept of dyadic stationarity is explained briefly next. 2.2 Dyadic stationarity We call a stochastic process {Xt , t ∈ N} dyadic stationary if it has constant mean, finite second moment and its covariance function   R(n, m) = cov(Xn , Xm ) = E (Xn − E[Xn ])(Xm − E[Xm ]) , n, m ∈ N, is invariant under dyadic addition, i.e. it depends only on n ⊕ m. Hence, we write for notational convenience R(τ ) = R(n, n ⊕ τ ). In the following assume that E[Xt ] = 0, E[Xt2 ] = 1, ∀t ∈ N. We recall some important results about dyadic stationary processes. A dyadic stationary process Xt has a dyadic spectral representation given by (Morettin (1974, p. 193)) Xt = Z 1 W (t, x)dZX (x), 0 6 t ∈ N, where {ZX (x), x ∈ I} is a real random process with orthogonal increments, such that E[dZX (x1 )dZX (x2 )] = η(x1 ⊕ x2 )dGX (x1 )dx2 , where η(·) is the Dirac function periodically extended to R with period 1. The function GX (·), defined on I, is a unique distribution function, which is called the dyadic spectral distribution of the process Xt . In addition R(τ ) = Z 1 W (τ, x)dGX (x). 0 If GX (·) is absolutely continuous, then dGX (x) = gX (x)dx, where gX (x) is called the dyadic spectral density of Xt . Example 1. A simple example of a dyadic stationary process is a sequence {εt , t ∈ N} of independent random variables with E(εt ) = 0 and E(ε2t ) = σ 2 , ∀ t ∈ N. It is straightforward to show that its covariance function is   σ 2 , if τ = 0, E (εn εn⊕τ ) = R(τ ) =  0, if τ 6= 0. Since the sequence εt is dyadic stationary, it has a dyadic spectral representation of the form Z 1 εt = W (t, x)dZε (x), t ∈ N, 0 with E[(dZε (x))2 ] = dGε (x) = σ 2 dx, x ∈ I. This example illustrates the analogy of dyadic and real time stationary processes. Indeed, it is well known that a white noise real time process possesses a flat spectrum; the same is true under dyadic stationarity. A stochastic process {Xt , t ∈ N} is a linear dyadic process if it can be represented as (Morettin (1974)) Xt = ∞ X k=0 7 ak εt⊕k , (1) where εt is the sequence of i.i.d. variables, as in Example 1, and {ak , k ∈ N} are real numbers, P 2 which satisfy ∞ k=0 ak < ∞. This definition is similar in spirit to the definition of the general linear process Priestley (1981, p.415). It can be shown that a linear dyadic process of the form (1) is dyadic stationary, because R(τ ) = Z 1 W (τ, x) σ 0 ∞ X ak W (k, x) k=0 !2 dx. (2) In addition, it has an absolutely continuous dyadic spectral distribution function and its dyadic spectral density function has the form g(x) = σ 2 ∞ X ak W (k, x) k=0 where A(x) = P∞ k=0 ak W (k, x). !2 = σ 2 A2 (x), In this case, note that G(x) = σ 2 Rx 0 (3) A2 (y)dy, for x ∈ I. Again, we note the analogy between real time and dyadic stationarity; the above formula is identical to the formula obtained in the real time linear process model (Priestley (1981)). Furthermore, if aq 6= 0 and ak = 0, ∀ k > q in (1), then Xt is said to be a dyadic moving average process of order q, abbreviated as DMA(q). In general, the process Xt defined by (1) is called a DMA(∞) process. 3 Local Dyadic Stationarity Consider now (3), and suppose, for example, that the function A(·) depends upon time, i.e. it has the form At,T (·), where T denotes the sample size. Xt is now reexpressed as a triangular array Xt,T . We rescale At,T (·) from the axis of the first T non negative integers (t = 1, 2, . . . , T ) to the unit interval I. The reason for this rescaling will be clear later on. The rescaled form of At,T (·) is denoted by A (t/T, ·). We give a general definition regarding local dyadic stationarity for a process Xt,T , in the spirit of Dahlhaus (e.g Dahlhaus (1996b, 1997)). 8 Definition 1. A sequence of stochastic processes {Xt,T , t = 1, 2, . . . , T } is called locally dyadic stationary with transfer function At,T (·) and trend function µ(·), where At,T (·) and µ(·) are deterministic functions, if there exists a representation   Z 1 t Xt,T = µ + W (t, x)At,T (x)dU(x), T 0 (4) where the following hold: (i) U(x) is a real-valued stochastic process on I and cum{dU(x1 ), . . . , dU(xk )} = η(x1 ⊕ x2 ⊕ . . . ⊕ xk )gk (x1 , . . . , xk−1 )dx1 , . . . , dxk , where cum{. . .} denotes the k-th order cumulant, g1 ≡ 0, g2 (x1 ) ≡ 1, |gk (x1 , . . . , xk−1 )| are bounded for all k and η(·) denotes the Dirac delta function periodically extended to R with period 1. (ii) There exists a constant K and a function A : [0, 1] × R → R such that   K t , x ≤ , ∀ T. sup At,T (x) − A T T t,x (5) The functions A(u, x) and µ(u) are assumed to be continuous with respect to u = t/T . The above definition is analogous to the definition given by Dahlhaus (1996b). The first condition states that the U(x) has moments of order k; the functions gk (·) are the (k−1)-th polyspectrum of U(x) following Brillinger (1965). The second assumption requires that the transfer function At,T (·) is approximated locally by a function A(t/T, ·), which is the transfer function of a dyadic stationary process. Note that the continuity of A(u, x) and µ(u) in u is required for the process Xt,T to exhibit locally dyadic stationary behaviour. Furthermore, without loss of generality, we assume that g2 (x) ≡ 1 because the transfer function can be always rescaled such that the process {U(x), x ∈ I} is white noise. Indeed, the boundedness assumption of g2 (.) implies again (5) for the rescaled transfer function. 9 Example 2. Suppose Yt is a dyadic stationary process with dyadic spectral representation Z 1 Yt = W (t, x)A(x)dZ(x), 0 where E|Z k (x)| < ∞, ∀ k > 0 Define Xt,T by     t t +σ Yt , Xt,T = µ T T where µ(·), σ(·) are continuous functions defined on I → R. Then   Z 1 t Xt,T = µ + W (t, x)At,T (x)dZ(x), T 0 where At,T (x) = A(t/T, x) = σ(t/T )A(x) and the assumptions (i) and (ii) are satisfied. Hence Xt,T is locally a dyadic stationary process. Consider now the process {Xt,T , t = 1, 2, . . . , T } Xt,T = ∞ X ak,t,T εt⊕k . (6) k=0 where εt is an i.i.d. sequence and {ak,t,T , k ∈ N} is a time-dependent process of real numbers P∞ 2 such that ∀t, k=0 ak,t,T < ∞. We call this process a time varying dyadic moving average process of infinite order (tvDMA(∞)). If we set in (6) aq,t,T 6= 0 and ak,t,T = 0, ∀ k > q, ∀t, then we call Xt,T a time varying dyadic moving average process of order q (tvDMA(q)). We rescale now the parameter curves ak,t,T to the unit interval I, assuming that there exist functions ak (t/T ) : I → R that satisfy ak,t,T ≈ ak (t/T ). We further assume that ak (·) satisfy some regularity conditions (see Remark 2). The reasons for the rescaling are described in detail, e.g. in Dahlhaus (2012, Sec.2). Briefly, suppose that we choose ak,t,T to be polynomials of t. Then, as t → ∞, P 2 ak,t,T → ∞ as well, which violates the condition ∞ k=0 ak,t,T < ∞. In addition, rescaling enables us to impose smoothing conditions through the continuity of the functions ak (·), ensuring that the process exhibits locally dyadic stationary behaviour. Indeed, the number of observations within 10 the neighbourhood of a fixed point u0 ∈ I increases as T → ∞ enabling to develop and apply locally for Xt,T asymptotic results for dyadic stationary processes. Suppose that the process Xt,T defined by (6) is written as Xt,T ∞ X   t εt⊕k . = ak T k=0 We assume that ak (u) = ak (0) for u < 0 and ak (u) = ak (1) for u > 1 and that the functions ak (·) satisfy some standard smoothness conditions; see Dahlhaus (1997). Consider now a fixed point u0 = t0 /T and its neighborhood [u0 ± ǫ]. If the length of this segment is sufficiently small, the process Xt,T can be approximated by the process X̃t (u0 ), which is defined as X̃t (u0 ) = ∞ X ak (u0 )εt⊕k , k=0 where ak (u0 ) are constants, with u0 indicating their dependence from the fixed point u0 (see also Dahlhaus (2012)). X̃t (u0 ) is dyadic stationary. Indeed, we can write ! Z 1 Z 1 ∞ X X̃t (u0) = W (t, x) ak (u0 )W (k, x) dZε (x) = W (t, x)A(u0 , x)dZε(x), (7) 0 where A(u0 , x) = 0 k=0 P∞ k=0 ak (u0 )W (k, x). From equations (2) and (3), X̃t (u0 ) has covariance function R(u0, τ ) = Z 1 W (τ, x) σ 0 ∞ X ak (u0 )W (k, x) k=0 !2 dx, and a unique dyadic spectral density function given by g (u0 , x) = σ ∞ X ak (u0 ) W (k, x) k=0 !2 = σ 2 A2 (u0 , x) , where u0 indicates the dependence from a fixed point. We can show that for {u = t/T : |t/T − u0 | ≤ ǫ}, it holds |Xt,T − X̃t (u0 )| = OP (1/T ), see Corollary 1. Therefore, we can say that Xt,T has locally the same covariance and dyadic spectral 11 density function as X̃t (u0 ) and therefore exhibits locally dyadic stationary behaviour. Note that the tvDMA(∞) process Xt,T in (6) is locally dyadic stationary due to Definition 1, since it has a time varying spectral representation as in (4). Indeed, we have Xt,T Z ∞  X ak,t,T = k=0 where At,T (x) = P∞ k=0 1 W (t ⊕ k, x)dZε (x) 0  = Z 1 W (t, x)At,T (x)dZε (x), 0 ak,t,T W (k, x) is the time varying transfer function. We show in Theorem 1 that, in general, a locally dyadic stationary process is approximated by a dyadic stationary process within a given interval. Theorem 1. Suppose that {Xt,T , t = 1, 2, . . . , T } is a sequence of stochastic processes which satisfy a representation of the form (4) where At,T (x) is the time varying transfer function (set µ (t/T ) = 0). Suppose that {X̃t (u0 ), t = 1, 2, . . . , T } is a dyadic stationary process with X̃t (u0) = Z 1 W (t, x)A(u0 , x)dU(x), (8) 0 where A(u0 , x) depends on the fixed point u0 ∈ I. Then within an interval (u0 ± ǫ) and under the assumptions of Definition 1 it holds that |Xt,T − X̃t (u0 )| = OP (1/T ). Proof. From equations (4) and (8) we have that |Xt,T − X̃t (u0)| = ≤ Z Z 1 W (t, x)At,T (x)dU(x) − 0 1 Z 1 W (t, x)A(u0 , x)dU(x) 0 |W (t, x)| · |At,T (x) − A(u0 , x)| dU(x) 0 = Z 1 |At,T (x) − A(u0 , x)| dU(x), 0 12 (9) since W (t, x) ∈ {−1, 1}. In addition |At,T (x) − A(u0 , x)| ≤ ≤ At,T (x) − A     t t ,x + A , x − A(u0 , x) T T K + |A (u, x) − A(u0 , x)| , T (10) from (5) in assumption (ii) of Definition 1. However, the same assumption states that A(u, x) is continuous. Therefore, since {u = t/T : |t/T − u0 | ≤ ǫ} and for any ǫ′ > 0 we can choose ǫ > 0 to be such that |A (u, x) − A(u0 , x)| < ǫ′ , (10) becomes |At,T (x) − A(u0 , x)| ≤ K∗ , T (11) for some positive constant K ∗ . Finally, from (9) and (11), we obtain that E|Xt,T − X̃t (u0 )| = O(1/T ), and hence we have the desired result. Corollary 1. Theorem 1 holds for the tvDMA(∞) process Xt,T , defined by (6), since this process satisfies the assumptions of Theorem 1, for X̃t (u0 ) given by (7). Remark 1. Theorem 1 implies that a locally dyadic stationary process could be approximated by dyadic stationary processes within different intervals in I (that may overlap). Thus its behaviour could be described via the behaviour of those dyadic stationary processes. Remark 2. Equation (5) implies a similar assumption for the sup |ak,t,T − ak (t/T )| and the above t,x discussion still holds. Example 3. Consider, for example, the infinite time varying MA (tvMA(∞)) representation Xt,T = P∞ k=0 ak,t,T εt−k , in the real time. Then its time varying spectral density function is given by !2 ∞ X 2 f (u, λ) = (σ /2π) ak (u) exp(−iλk) . k=0 13 0.8 0.6 0.4 0.2 5 4 3 2 1 1.0 1.0 0.8 0.8 le ca res le ca res 0.6 0.6 3.0 dt 0.4 1.0 0.6 cy uen freq 0.2 0.5 0.0 0.0 0.0 eq h fr 0.4 0.2 cy uen e e 1.5 0.2 1.0 0.8 0.4 im 2.0 im dt 2.5 ls Wa 0.0 Figure 1: The time varying spectral density function for the tvMA(1) process (left) and the time varying dyadic spectral density function for the tvDMA(1) process (right). Respectively, the time varying dyadic spectral density function of the tvDMA(∞) is given by g (u, x) = σ ∞ X ak (u)W (k, x) k=0 !2 . We compare the behaviour of functions g(u, x) and f (u, λ) for the same order of the respective processes and for the same representation of the time varying coefficients ak (u) (set σ 2 = 1). Figure 1 shows the spectral density function of a tvMA(1) and tvDMA(1) processes. We set a0 (u) = −1.8 cos(1.5 − cos(4πu)) and a1 (u) = 0.81. Figure 2 shows the spectral density function of a tvMA(2) and tvDMA(2) processes. In this case we set a0 (u) = 1.2 cos(2πu), a1 (u) = 2 cos(1.5 − cos(8πu)) and a2 (u) = u. Both figures reveal the differences between real and dyadic stationarity. The square waveform of Walsh functions allows a more oscillatory behaviour of the dyadic spectral density function. 14 15 2.0 1.5 1.0 0.5 10 5 1.0 1.0 0.8 0.8 le ca res le ca res 0.6 0.6 3.0 dt 0.4 cy uen 0.2 0.5 0.0 0.0 0.0 cy uen eq h fr 0.4 0.2 freq 1.0 0.6 e e 1.5 0.2 1.0 0.8 0.4 im 2.0 im dt 2.5 ls Wa 0.0 Figure 2: The time varying spectral density function for the tvMA(2) process (left) and the time varying dyadic spectral density function for the tvDMA(2) process (right). 4 tvDARMA processes It is well known that autoregressive, moving average, and ARMA models can be regarded as special cases of the general linear process. Nagai (1980) shows that a dyadic autoregressive process of finite order is always inverted into a dyadic moving average process of finite order, and vice versa. We obtain similar results, but within a time varying framework. We define the time varying, dyadic, autoregressive, moving average (tvDARMA) process as follows. Definition 2. A stochastic process {Xt , t = 1, 2, . . . , T } is called tvDARMA(p, r) if it is locally dyadic stationary and can be represented by p X bk,t,T Xt⊕k,T = m an,t,T εt⊕n , (12) n=0 k=0 + r X f where p, r ∈ Z with p = 2 − 1, r = 2 − 1, the sequences of parameters {bk,t,T }k=0,1,...,p , 15 {an,t,T }n=0,1,...,p are real numbers with at least two non-zero parameters bk0 ,t,T , an0 ,t,T for 2m−1 ≤ k0 ≤ 2m − 1 and 2f −1 ≤ n0 ≤ 2f − 1. In addition, {εt , t = 1, 2, . . . , T } is an i.i.d. sequence with E(εt ) = 0 and E(ε2t ) = σ 2 . Assume that b0,t,T = a0,t,T = 1. If we set in (12), p = 0, then the tvDMA process arises as in (6), but for a finite order r. In case we set in (12) r = 0, then (12) becomes p X bk,t,T Xt⊕k,T = εt . (13) k=0 We call Xt,T in (13) a time varying, dyadic, autoregressive process of order p (tvDAR(p)). We show that a tvDAR process, and even more generally, a tvDARMA process, can be approximated by a tvDMA process. Following Nagai and Taniguchi (1987), who study multivariate dyadic stationary processes, set φt,T (x) = p X bj,t,T W (j, x), x ∈ I, (14) j=0 where p = 2m −1, m ∈ N and {bj,t,T }j=0,1,...,p are real numbers. Denote by Σt,T the (p+1)×(p+1) matrix, which is given by  Σt,T b b · · · b0⊕p,t,T  0⊕0,t,T 0⊕1,t,T   b1⊕0,t,T b1⊕1,t,T · · · b1⊕p,t,T = .. .. ..  .. .  . . .  bp⊕0,t,T bp⊕1,t,T · · · bp⊕p,t,T Lemma 1. The following equation holds det[Σt,T ] = p Y     .    φt,T (xj ), j=0 where xj = j/(p+1), j = 0, 1, . . . , p. Therefore the function φt,T (x) 6= 0 if and only if det[Σt,T ] 6= 0. 16 Lemma 2. Assume that φt,T (x) 6= 0 in (14). Then there exists a function ηt,T (x), which is defined by ηt,T (x) = p X dm,t,T W (m, x), {dm,t,T }m=0,1,...,p ∈ R, x ∈ I, m=0 and satisfies φt,T (x)ηt,T (x) = 1. The coefficients dm,t,T are uniquely determined by Σt,T  d0,t,T d1,t,T · · · dp,t,T ′ =  1 0 ··· 0 ′ . Define St,T to be the (r + 1) × (r + 1) matrix  St,T a a · · · a0⊕r,t,T  0⊕0,t,T 0⊕1,t,T   a1⊕0,t,T a1⊕1,t,T · · · a1⊕r,t,T = .. .. ..  .. .  . . .  ar⊕0,t,T ar⊕1,t,T · · · ar⊕r,t,T     .    The following theorem states that a tvDARMA process can be approximated locally by a tvDMA and a tvDAR process. Theorem 2. Suppose that {Xt,T , t = 1, 2, . . . , T } is a tvDARMA(p, r) as in (12). Set µ = max(p, r). Then the following hold (i) If det[Σt,T ] 6= 0, then Xt,T can be approximated locally by a tvDMA(µ) process. (ii) If det[St,T ] 6= 0, then Xt,T can be approximated locally by a tvDAR(µ) process. Corollary 2. Suppose that {Xt,T , t = 1, 2, . . . , T } is a tvDAR(p) as in (13). If det[Σt,T ] 6= 0, Xt,T can be approximated locally by a tvDMA(p) process. Proofs of these results are given in the appendix. 17 5 Conclusions We anticipate that the above results will be useful for future work in the field of applications. In this direction, the concepts of Walsh spectrum and Walsh transform will be studied. The Walsh spectrum for a real-valued dyadic stationary process Xt is defined by f (x) = ∞ X R(τ )W (τ, x), 0 ≤ x < ∞, (15) τ =0 where the covariance function R(·) satisfies P∞ τ =0 |R(τ )| < ∞ (see e.g. Morettin (1974, 1978, 1981)). Inverting (15), the covariance is given by Z 1 R(τ ) = W (τ, x)f (x)dx. 0 The finite Walsh transform is given by d (N ) (x) = N −1 X Xn W (n, x), x ∈ I. n=0 To estimate the Walsh spectrum, Morettin (1981) defined the Walsh periodogram, by I (N ) (x) = N −1 [d (N ) (x)]2 , and showed that I (N ) (x) is asymptotically an unbiased, but inconsistent, estimator of f (x). He also considered the smooth Walsh periodogram and other classes of estimates. Dyadic stationarity is necessary to estimate the time-varying Walsh spectrum. Therefore, in the case of local dyadic stationarity, it would be reasonable to divide the rescaled interval I into subintervals and estimate the Walsh spectrum within each subinterval, where local dyadic stationarity is satisfied. The number of the observations within each subinterval {u = t/T : |t/T − u0 | ≤ ǫ} increases as T tends to infinity and the above asymptotical results still hold. A similar method is applied by Dahlhaus and Giraitis (1998) for real-time stationary processes. 18 Kohn (1980a,b) studied the system of Walsh functions for real time stationary processes. He defined the j-th logical autocovariance, τ (j), and the corresponding Walsh-Fourier spectral density function F (x). This notation replaces the previous notation used for R(·) and f (·) above. He considered the finite Walsh-Fourier transform and studied its asymptotic properties. A class of estimators for F (x) was obtained, the average Walsh periodogram being a member of this class. The concept of local stationarity could also be applied in the real time setting and we conjecture that similar results could be obtained also in this case. Acknowledgements We cordially thank Prof. I. Nikiforov and four anonymous reviewers for several constructive comments that improved considerably an earlier version of the manuscript. 19 Appendix Proof of Lemma 1 Recall that p = 2m − 1. The Walsh-ordered Hadamard matrix HW (m) is a (2m × 2m ) matrix with elements of the form W (n, xj ), xj = j/(p + 1), j, n = 0, 1, . . . , p, see also Stoffer (1991). Then the following relations hold:  b0⊕0,t,T b0⊕1,t,T · · · b0⊕p,t,T   W (0, x0 ) W (0, x1 ) · · · W (0, xp )        b1⊕0,t,T b1⊕1,t,T · · · b1⊕p,t,T   W (1, x0 ) W (1, x1 ) · · · W (1, xp ) ·  Σt,T HW (m) =  .. .. ..   .. .. .. .. .. . .    . . . . . .    W (p, x0 ) W (p, x1 ) · · · W (p, xp ) bp⊕0,t,T bp⊕1,t,T · · · bp⊕p,t,T ( p )   X = b(i−1)⊕l,t,T W (l, xj−1 ) = φt,T (xj−1 )W (i − 1, xj−1) l=0         (i,j) (i,j) = HW (m) · diag[φt,T (x0 ), φt,T (x1 ), . . . , φt,T (xp )]. (A-1) But, since det[HW (m)] = (p + 1)(p+1)/2 6= 0, we get from (A-1) that p   Y φt,T (xj ). det[Σt,T ] = det diag(φt,T (x0 ), φt,T (x1 ), . . . , φt,T (xp )) = j=0 For the second argument of Lemma 1, note that φt,T (x) = Pp j=0 bj,t,T W (j, x), x ∈ I and every Walsh function W (n, x), n = 0, 1, . . . , p remains invariant for x ∈ [xj , xj+1 ), xj = j/(p + 1), j, n = 0, 1, . . . , p and equal to W (n, xj ). Therefore φt,T (x) = φt,T (xj ), ∀x ∈ [xj , xj+1 ). Proof of Lemma 2 φt,T (x)ηt,T (x) = = p X bl,t,T W (l, x) l=0 " p p X X h=0 j=0 ! p X dm,t,T W (m, x) m=0 # bj⊕h,t,T dj,t,T W (h, x). 20 ! = p p X X bl,t,T dm,t,T W (l ⊕ m, x) l=0 m=0 (A-2) In order for φt,T (x)ηt,T (x) = 1 to hold in I, we have from equation (A-2) that " p # p X X bj⊕h,t,T dj,t,T W (h, xl ) = 1, l = 0, 1, . . . , p, h=0 j=0 which is equivalently written in matrix notation as  P p j=0 bj,t,T dj,t,T   Pp  j=0 bj⊕1,t,T dj,t,T ′ HW (m)   ..  .  P p j=0 bj⊕p,t,T dj,t,T         =       1 1 .. . 1     .    (A-3) ′ But HW (m)HW (m) = 2m I2m . Hence, since from assumption we have that det [Σt,T ] 6= 0, equa- tion (A-3) gives that  P p j=0 bj,t,T dj,t,T   Pp  j=0 bj⊕1,t,T dj,t,T 2m I2m  ..   .  P p j=0 bj⊕p,t,T dj,t,T          = HW (m)        1 1 .. . 1         m =2        1 0 .. . 0   d  0,t,T     d   =⇒  1,t,T  ..   .    dp,t,T         −1 =Σ  t,T       1 0 .. . 0 Proof of Theorem 2 Since Xt,T is locally dyadic stationary it has a Walsh spectral representation Z 1 Xt,T = W (t, x)At,T (x)dU(x), 0 while εt is dyadic stationary and represented by Z 1 εt = W (t, x)dZε (x). 0 Then the LHS and RHS of equation (12) can be written as LHS = p X k=0 bk,t,T Xt⊕k,T = Z 1 W (t, x) 0 p X k=0 21 ! bk,t,T At⊕k,T (x)W (k, x) dU(x), (A-4)     .    and RHS = r X an,t,T εt⊕n = Set Z 1 W (t, x) 0 |LHS − LHS′ | = 1 Z 1 |W (t, x)| 0 = W (t, x) r X ! an,t,T W (n, x) dZε (x). n=0 p X ! bk,t,T At,T (x)W (k, x) dU(x). k=0 Then Z 1 0 n=0 LHS′ = Z p X ! |bk,t,T | · |At⊕k,T (x) − At,T (x)| · |W (k, x)| dU(x) k=0 p X 0 (A-5) ! |bk,t,T | · |At⊕k,T (x) − At,T (x)| dU(x). k=0 (A-6) Consider the interval A = {|(t ⊕ k/T ) − t/T | ≤ ε}. Then, ∀ε, we can assume that T is large enough, such that t ⊕ k/T ∈ A, ∀ k = 0, 1, . . . , p. From the continuity of the function A(t/T, ·) and assumption (5) we have that     t⊕k t⊕k At⊕k,T (x) − A ,x + A , x − At,T (x) T T     t⊕k t⊕k ,x + A , x − At,T (x) At⊕k,T (x) − A T T       t t⊕k K t + A ,x −A ,x + A , x − At,T (x) T T T T 2K + ε′ = ε′′ . (A-7) T |At⊕k,T (x) − At,T (x)| = ≤ ≤ ≤ From (A-6) and (A-7), we have that ′ |LHS − LHS | ≤ ε ′′ p X k=0 since Pp k=0 |bk,t,T | < M ′ and R1 0 |bk,t,T | Z 1 dU(x) ≤ ε′′′ , 0 dU(x) < M ′′ , with M ′ and M ′′ real constants. 22 Set φ1,t,T (x) = Pp k=0 bk,t,T W (k, x) and φ2,t,T (x) = Pr n=0 an,t,T W (n, x). Assume that LHS′ = RHS. Then, since the system of Walsh functions is complete and equation (12) holds for t = 1, 2, . . . , T , we have that φ1,t,T (x)At,T (x)dU(x) = φ2,t,T (x)dZε (x). (i) Since det[Σt,T ] 6= 0, from Lemma 1 we have that φ1,t,T (x) 6= 0 and from Lemma 2 there exists P a function η1,t,T (x) = pk=0 gk,t,T W (k, x) such that Hence, At,T (x)dU(x) = η1,t,T (x)φ2,t,T (x)dZε (x)  ( Pµ  Pp g a j=0 l=0 l,t,T l⊕j,t,T W (j, x)dZε (x), p ≤ r,   = Pr Pµ g a l=0 l⊕j,t,T l,t,T W (j, x)dZε (x), p > r. j=0 At,T (x)dU(x) = µ X Kj,t,T W (j, x)dZε (x), j=0 where Kj,t,T = Therefore, Xt,T = ( Pp s=0 gs,t,T as⊕j,t,T , p ≤ r, Pr j = 0, 1, . . . , p. s=0 gs⊕j,t,T as,t,T , p > r, µ X j=0 Kj,t,T Z 1 W (t ⊕ j, x)dZε (x) = 0 µ X Kj,t,T εt⊕j . j=0 (ii) Similarly with (i). Proof of Corollary 2 Suppose that Xt,T = R1 0 At,T (x)W (t, x)dU(x). The LHS of (13) is given by (A-4) and the LHS′ by (A-5). From Lemma 2, since by assumption det[Σt,T ] 6= 0, ∃ ηt,T (x) = Pp m=0 dm,t,T W (m, x), dm,t,T ∈ R, such that φ1,t,T (x)ηt,T (x) = 1. Therefore, and since the system of Walsh functions is complete, we have that At,T (x)dU(x) = ηt,T (x)dZε (x) = p X dm,t,T W (m, x)dZε(x). m=0 Hence, Xt,T = Pp m=0 dm,t,T R1 0 W (t ⊕ m, x)dZε (x) = 23 Pp m=0 dm,t,T εt⊕m . References Abbasi, S. A., A. Alamoud, et al. (2012). FPGA based Walsh and inverse Walsh transforms for signal processing. Elektronika ir Elektrotechnika 18, 3–8. Beauchamp, K. G. (1984). Walsh functions and their applications. Academic Press. Brillinger, D. R. (1965). An introduction to polyspectra. The Annals of mathematical statistics, 1351–1374. Brillinger, D. R. (1974). Fourier analysis of stationary processes. Proc. IEEE 62, 1628–1643. Dahlhaus, R. (1996a). Asymptotic statistical inference for nonstationary processes with evolutionary spectra. In Athens conference on applied probability and time series analysis, pp. 145–159. Springer. Dahlhaus, R. (1996b). On the Kullback-Leibler information divergence of locally stationary processes. Stochastic Processes and their Applications 62, 139–168. Dahlhaus, R. (1997). Fitting time series models to nonstationary processes. The Annals of Statistics 25, 1–37. Dahlhaus, R. (2000). A likelihood approximation for locally stationary processes. Annals of Statistics 28, 1762–1794. Dahlhaus, R. (2012). Locally stationary processes. In T. S. Rao, S. S. Rao, and C. R. Rao (Eds.), Handbook of Statistics: Time Series Analysis–Methods and Applications, Volume 30, pp. 351– 408. Amsterdam: Elsevier B. V. Dahlhaus, R. and L. Giraitis (1998). On the optimal segment length for parameter estimates for locally stationary time series. Journal of Time Series Analysis 19, 629–655. 24 Davis, R. A., T. C. M. Lee, and G. A. Rodriguez-Yam (2006). Structural break estimation for nonstationary time series models. Journal of the American Statistical Association 101, 223– 239. Fine, N. J. (1949). On the Walsh functions. Transactions of the American Mathematical Society 65, 372–414. Granger, C. W. J. and M. Hatanaka (1964). Spectral analysis of economic time series. Princeton: Univ. Press. Kohn, R. (1980a). On the spectral decomposition of stationary time series using Walsh functions. I. Advances in Applied Probability, 183–199. Kohn, R. (1980b). On the spectral decomposition of stationary time series using Walsh functions. II. Advances in Applied Probability, 462–474. Martin, W. (1981). Line tracking in nonstationary processes. Signal Processing 3, 147–155. Melard, G. and A. H.-d. Schutter (1989). Contributions to evolutionary spectral theory. Journal of Time Series Analysis 10, 41–63. Morettin, P. A. (1974). Walsh-function analysis of a certain class of time series. Stochastic processes and their applications 2, 183–193. Morettin, P. A. (1978). Estimation of the spectrum and of the covariance function of a dyadicstationary series. Bulletin of the Brazilian Mathematical Society 9, 83–88. Morettin, P. A. (1981). Walsh spectral analysis. SIAM Review 23, 279–291. Morettin, P. A. (1983). A note on a central limit theorem for stationary processes. Journal of Time Series Analysis 4, 49–52. 25 Nagai, T. (1977). Dyadic stationary processes and their spectral representations. Bulletin of Mathematical Statistics 17, 65–73. Nagai, T. (1980). On finite parametric linear models of dyadic stationary processes. Bulletin of Mathematical Statistics 19, 45–53. Nagai, T. and M. Taniguchi (1987). Walsh spectral analysis of multiple dyadic stationary processes and its applications. Stochastic Processes and their Applications 24, 19–30. Nason, G. P., R. Von Sachs, and G. Kroisandt (2000). Wavelet processes and adaptive estimation of the evolutionary wavelet spectrum. Journal of the Royal Statistical Society: Series B (Statistical Methodology) 62, 271–292. Neumann, M. H. and R. Von Sachs (1997). Wavelet thresholding in anisotropic function classes and application to adaptive estimation of evolutionary spectra. The Annals of Statistics 25, 38– 76. Ombao, H., J. Raz, R. von Sachs, and W. Guo (2002). The slex model of a non-stationary random process. Annals of the Institute of Statistical Mathematics 54(1), 171–200. Priestley, M. B. (1965). Evolutionary spectra and non-stationary processes. Journal of the Royal Statistical Society. Series B (Methodological) 27, 204–237. Priestley, M. B. (1981). Spectral analysis and time series. Academic Press, London. Priestley, M. B. (1988). Non-linear and non-stationary time series analysis. Academic Press, London. Sakiyama, K. and M. Taniguchi (2004). Discriminant analysis for locally stationary processes. Journal of Multivariate Analysis 90, 282–300. 26 Stankovic̀, R. S., C. Moraga, and J. Astola (2005). Fourier Analysis on Finite Groups with Applications in Signal Processing and System Design. Hoboken, NJ: Wiley-IEEE. Stoffer, D. S. (1985). Central limit theorems for finiteWalsh-Fourier transforms of weakly stationary time series. Journal of Time Series Analysis 6, 261–267. Stoffer, D. S. (1987). Walsh-Fourier analysis of discrete-valued time series. Journal of Time Series Analysis 8, 449–467. Stoffer, D. S. (1990). Multivariate Walsh-Fourier analysis. Journal of Time Series Analysis 11, 57–73. Stoffer, D. S. (1991). Walsh-Fourier analysis and its statistical applications. Journal of the American Statistical Association 86, 461–479. Taniguchi, M., L. Zhao, P. Krishnaiah, and Z. Bai (1989). Statistical analysis of dyadic stationary processes. Annals of the Institute of Statistical Mathematics 41, 205–225. Tjøstheim, D. (1976). Spectral generating operators for non-stationary processes. Advances in Applied Probability 8, 831–846. Walsh, J. (1923). A closed set of normal orthogonal functions. American Journal of Mathematics 45, 5–24. 27
10math.ST
arXiv:1105.3869v2 [math.CT] 15 Aug 2013 ON THE IMAGE OF THE TOTALING FUNCTOR KRISTEN A. BECK Abstract. Let A be a DG algebra with a trivial differential over a commutative unital ring. This paper investigates the image of the totaling functor, defined from the category of complexes of graded A-modules to the category of DG A-modules. Specifically, we exhibit a special class of semifree DG Amodules which can always be expressed as the totaling of some complex of graded free A-modules. As a corollary, we also provide results concerning the image of the totaling functor when A is a polynomial ring over a field. Introduction Let A be a DG algebra over a commutative unital ring. Furthermore, let DG(A) denote the category of DG A-modules and their degree zero chain maps, and let ChGr(A♮ ) denote the category of (co)chain complexes of graded A♮ -modules and their degree zero chain maps. The motivation for the work in this paper is to better understand the difference between these categories. In the most general case, one can easily see that DG(A) is a much ‘richer’ category than ChGr(A♮ ) — indeed, its objects take into account two differentials rather than just one. However, when A has a trivial differential (so that A = A♮ ), the difference between DG(A) and ChGr(A♮ ) is not so striking. The goal of this paper is to address the latter scenario by studying the image of the so-called totaling functor Tot : ChGr(A♮ ) → DG(A) in the case that A has a trivial differential. Given a cochain complex X of graded modules over such a DG algebra A, one defines Tot X to be the complex whose underlying graded A♮ -module structure is given by M (Tot X)♮ := Σ−i X i i∈Z and whose differential follows in a natural way from that of X. Upon defining an A-action on this complex, Tot X admits the structure of a DG A-module. The primary question we consider is whether the totaling functor is surjective. In Theorem 2.4, we provide a necessary and sufficient condition for a DG module over a DG algebra A with a trivial differential to be equal to the totaling of some complex of graded free A♮ -modules. The constructive nature of the proof of this result furthermore allows us to express a ‘totaling pre-image’ for DG modules which lie in the image of the totaling functor. To answer the question of whether the totaling functor is surjective, we restrict to the case that A is a polynomial ring over a field. In Example 2.5, we exhibit a DG module over a polynomial ring in Date. November 9, 2017. 2010 Mathematics Subject Classification. 13D09, 18E30. Key words and phrases. Totaling, differential graded algebra, derived category. This research was partially supported by NSA Grant H98230-07-1-0197 and NSF GK-12 Program Grant 0841400. 1 2 K. A. BECK two (or more) variables which does not satisfy the condition specified by Theorem 2.4, and therefore does not lie in the image of the functor. Moreover, in Theorem 2.11, we illustrate that every DG module over a polynomial ring in one variable is quasiisomorphic to the totaling of some complex of graded A♮ -modules. 1. Background The results in this paper will assume a working understanding of differential graded (DG) algebras and their modules. For a thorough treatment of this subject, the reader is referred to [1], [2], or [4]. In what follows, A is assumed to be a DG algebra over a commutative unital ring. 1.1. Semifree DG modules. We begin by introducing a class of DG modules which generalize free modules over a ring. They will form the basic structures necessary for the construction of (counter-)examples in the sequel, and will also be essential to the statement of our main result. Definition 1.1.1. Let M be a DG A-module. A subset E ⊆ M ♮ is called a semibasis for M if (1) E is F a basis for M ♮ over A♮ , and (2) E = d∈N Ed (a disjoint union) such that ! G ∂(Ed ) ⊆ A Ei i<d for all d ∈ N. A DG module that possesses a semibasis is said to be semifree. Proposition 1.1.2. [2, 8.2.3] Let M be a DG A-module. The following are equivalent. (1) M is semifree. (2) M ♮ has a well-ordered basis E over A♮ such that for each e ∈ E ∂(e) ∈ A ({e′ ∈ E | e′ < e}) . F Proof. To show (1) ⇒ (2), let E = d∈N Ed be a semibasis for M over A. For each d ∈ N, impose an ordering on Ed , and further suppose that whenever d′ < d, e′ < e for every e′ ∈ Ed′ and e ∈ Ed . This implies that E has an ordering with the desired property. On the other hand, in order to show that (2) ⇒ (1), suppose that E is a wellordered basis for M ♮ over A♮ such that ∂(e) ∈ A ({e′ ∈ E | e′ < e}) for every e ∈ E. Set E−1 = ∅ and M−1 = {0}, and for each d ∈ N, recursively define Ed and Md in the following manner.  S Ed := e ∈ E \ i<d Ei | ∂(e) ∈ Md−1   [ Md := A  Ei  i≤d By this construction, the F Ed are mutually disjoint. Furthermore, the well-ordering  of E implies that E = d∈N Ed , and the result follows. ON THE IMAGE OF THE TOTALING FUNCTOR 3 Remark 1.1.3. A semifree resolution of a DG A-module M is a quasiisomorphism π : F → M of DG A-modules where F is semifree. In [2], Avramov, Foxby, and Halperin show that every DG module possesses a semifree resolution. This fact makes possible the study of differential graded homological algebra. 1.2. The totaling functor. Throughout this section, suppose that A has a trivial differential.1 Let X be a cochain complex in ChGr(A♮ ) = L ChGr(A), and denote the internal grading of X i with a subscript; that is, X i = j∈Z Xji . Now define  the totaling of X to be the complex Tot X = (Tot X)♮ , ∂ Tot X , whose underlying graded structure is given by M ♮ (Tot X) := Σ−i X i . i∈Z Therefore, the dth homological component of Tot X is given by M i (Tot X)d = Xd+i i∈Z and one defines the A-module structure on Tot X according to   a(σ −i xi )i∈Z := σ −i ((−1)|a|i axi ) i∈Z −i i for each a ∈ A and (σ x )i∈Z ∈ Tot X. Moreover, the differential on Tot X is defined by   i ∂ Tot X (σ −i xi )i∈Z := σ −i−1 ∂X (xi ) i∈Z for each (σ −i xi )i∈Z ∈ Tot X. It is now straightforward to check that Tot X is in fact a DG module over A. Indeed, for any a ∈ A and (σ −i xi )i∈Z ∈ Tot X, one has     ∂ Tot X a(σ −i xi )i∈Z = ∂ Tot X σ −i ((−1)|a|i axi ) i∈Z   −i−1 i |a|i i = σ ∂X ((−1) ax ) i∈Z   |a|i −i−1 i i = (−1) σ (a ∂X (x )) i∈Z   |a|i |a|(i+1) −i−1 i = (−1) (−1) aσ ∂X (xi ) i∈Z  i = (−1)|a| a σ −i−1 ∂X (xi ) i∈Z  = (−1)|a| a ∂ Tot X (σ −i xi )i∈Z so that the Leibniz rule is satisfied. For any morphism µ : X → Y of complexes of graded A-modules, define the following map. Tot µ : Tot X → Tot Y (σ −i xi )i∈Z 7→ (σ −i µi (xi ))i∈Z 1Indeed, Tot can be defined on the category ChDG(A) over an arbitrary DG algebra A (see [2, Section 7.2] for details). However, for the purposes of our work, it suffices to define the functor in the present setting. 4 K. A. BECK To see that Tot µ is a morphism of DG A-modules, note that for each xi ∈ Xji , µi (xi ) ∈ Yji . It follows that totaling is functorial. Thus, Tot : ChGr(A) → DG(A) is called the totaling functor. Remark 1.2.1. L totaling of a chain complex in ChGr(A), one should L To define the note that i∈Z Σ−i X i ∼ = i∈Z Σi Xi . 2. Results In this section, we turn our attention to the image of the totaling functor. Unless otherwise stated, A shall denote a DG algebra with a trivial differential and k shall denote a field. Furthermore, one may assume that all polynomial rings have the standard grading. Definition 2.1. Let A be an arbitrary DG algebra, and M a semifree DG module with semibasis E over A. Define a family of disjoint sets recursively by E0 := {e ∈ E | ∂(e) = 0} (2.1.1) Eℓ := {e ∈ E | 0 6= ∂(e) ∈ AEℓ−1 } for all ℓ ∈ Z+ . Notice that since M is semifree, E0 is nonempty. Now consider the following containment of sets. G (2.1.2) Eℓ ⊆ E ℓ∈N If the containment in (2.1.2) is strict, we say that E has crossing. Remark 2.2. One can determine whether a particular semibasis for a finitelygenerated DG module has crossing by simply examining the matrix representing ∂. Indeed, if D is the matrix representing ∂ with respect to the semibasis E, then D must a priori be strictly upper-triangular. ThisFfollows directly from the definition m of semibasis. If one further supposes that E = ℓ=0 Eℓ has no crossing, then D will take a block super-diagonal form. Specifically,   Z0 D0   Z1 D1     Z2 D=  ..   . D   m−1 Zm where Zi is a |Ei | × |Ei | zero matrix, Di is a |Ei | × |Ei+1 | matrix with entries in A♮ , and the non-specified entries are zeros. To illustrate the concept of crossing, we provide an example which exhibits semibases with and without crossing for the same semifree DG module. Example 2.3. Let A = k[x, y, z] and consider the rank four semifree DG A-module M with semibasis E = {e1 , e2 , e3 , e4 } such that |e1 | = 0, |e2 | = 2, |e3 | = 3, |e4 | = 5, and ∂(e1 ) = 0 ∂(e2 ) = xe1 ∂(e3 ) = yze1 ∂(e4 ) = xz 3 e1 + yze2 − xe3 . ON THE IMAGE OF THE TOTALING FUNCTOR 5 Then E0 = {e1 }, E1 = {e2 , e3 }, and Eℓ = ∅ for ℓ ≥ 2. Thus, the strict containment G Eℓ ( E ℓ∈N implies that E has crossing. On the other hand, define a semibasis E ′ for M by e′i = ei for 1 ≤ i ≤ 3 and ′ e4 = e4 − z 3 e2 . The action of ∂ M on E ′ is given by ∂(e′1 ) = 0 ∂(e′2 ) = xe′1 ∂(e′3 ) = yze′1 ∂(e′4 ) = yze′2 − xe′3 . In this case, we obtain E0 = {e′1 }, E1 = {e′2 , e′3 }, E2 = {e′4 }, and Eℓ = ∅ for ℓ ≥ 3. Therefore, we have an equality of sets G Eℓ = E ′ ℓ∈N which implies that E has no crossing. Next we state our main result, which gives a necessary and sufficient condition for a DG A-module to be equal to the totaling of some complex of graded free A-modules. Theorem 2.4. Let M be a semifree DG module over a DG algebra A with trivial differential. Then M has a semibasis without crossing if and only if there exists a bounded-below complex X of graded free A-modules such that Tot X = M . F Proof. Let E = d∈N Ed be aFsemibasis of M over A. First suppose that E has no crossing, implying that E = ℓ∈N Eℓ , where E0 = {e ∈ E |∂ M (e) = 0}  Eℓ = e ∈ E | 0 6= ∂ M (e) ∈ AEℓ−1 for all ℓ ∈ Z+ . Now define a (possibly infinite) sequence X of homomorphisms of graded A-modules by X: ∂X ∂X · · · → Σ−2 AE2 −−2→ Σ−1 AE1 −−1→ AE0 → 0 where, for each ℓ ∈ N and e ∈ Eℓ , one has that  ∂ℓX (0, . . . , 0, σ −ℓ e, 0, . . . , 0) = σ −ℓ+1 ∂ M (e) ⊆ Σ−ℓ+1 AEℓ−1 . X By construction, ∂ℓ+1 ◦ ∂ℓX = 0 for all ℓ ∈ N, implying that X ∈ ChGr(A). To see that Tot X = M , notice that M (Tot X)♮ = Σℓ X ℓ ℓ∈N M = Σℓ Σ−ℓ AEℓ ℓ∈N ∼ = M ℓ∈N ♮ =M AEℓ 6 K. A. BECK and that ∂ Tot X (σ ℓ σ −ℓ e) = σ ℓ−1 ∂ℓX (σ −ℓ e)  = σ ℓ−1 σ −ℓ+1 ∂ M (e) = ∂ M (e) for all ℓ ∈ N and e ∈ Eℓ . The result follows. On the other hand, suppose that X is a bounded-below complex of graded free ei be a basis for Xi over A. That is, A-modules such that Tot X = M , and let E where ♮ M ♮ = (Tot X) = ∂X ∂X e0 → 0 e1 −−1→ AE e2 −−2→ AE · · · → AE X: M i∈N ei Σi AE and   ∂ M (σ i e)i∈N = σ i−1 ∂iX (e) i∈N ei . Now define for each e ∈ E o Gn ei | ∂iX (e) = 0 Ee0 := e∈E i∈Z Eeℓ := Gn i∈Z ei | 0 6= ∂ X (e) ∈ AEeℓ−1 e∈E i o F ei for each for each ℓ ∈ Z+ . Note that one can write Eeℓ = i∈N Eei,ℓ where Eei,ℓ ⊆ E F L ie ℓ ∈ N. Let Eℓ := i∈N Σ Ei,ℓ . We will show that E := ℓ∈N Eℓ is a semibasis for M which does not have crossing. To this end, we first note that E is a basis for M ♮ over A by construction. Furthermore, if (σ i e)i∈N ∈ Eℓ , then M   Σi−1 AEei−1,ℓ−1 = AEℓ−1 ∂ M (σ i e)i∈N = σ i−1 ∂iX (e) i∈N ∈ i∈N since e ∈ Eei,ℓ . This implies that E is a semibasis for M without crossing.  To see that the statement of Theorem 2.4 is not trivial, consider the following example. Example 2.5. Let A = k[x1 , . . . , xd ] where d ≥ 2, and consider the rank four semifree DG A-module M given by M ♮ = Ae1 ⊕ Ae2 ⊕ Ae3 ⊕ Ae4 such that |e1 | = 0, |e2 | = 3, |e3 | = 4, |e4 | = 8, and ∂(e1 ) = 0 ∂(e2 ) = x1 x2 e1 ∂(e3 ) = x32 e1 ∂(e4 ) = x71 e1 − x42 e2 + x1 x22 e3 . Note that E = {e1 , e2 , e3 , e4 } has crossing. matrix representation  0 x1 x2 0 0 D= 0 0 0 0 This can be verified by examining the x32 0 0 0  x71 −x42   x1 x22  0 ON THE IMAGE OF THE TOTALING FUNCTOR 7 of ∂ with respect to E. We will show that there does not exist a semibasis for M without crossing. To this end, suppose that E ′ is another semibasis for M , and denote by P the change-of-basis matrix; that is, P : E-coordinates → E ′ -coordinates. If D′ is ′ ′ the matrix representing ∂ with respect to  E , then D = P D ′must take the form prescribed by Remark 2.2. Letting P = pij , one can write D as follows.   0 p11 x1 x2 p11 x32 p11 x71 − p12 x42 + p13 x1 x22 0 p21 x1 x2 p21 x32 p21 x71 − p22 x42 + p23 x1 x22   D′ = P D =  0 p31 x1 x2 p31 x32 p31 x71 − p32 x42 + p33 x1 x22  0 p41 x1 x2 p41 x32 p41 x71 − p42 x42 + p43 x1 x22 Now, since E ′ is a priori a semibasis for M , it should be true that D′ is strictly upper-triangular. This implies that p21 = p31 = p41 = 0 and p41 x71 − p42 x42 + p43 x1 x22 = −p42 x42 + p43 x1 x22 = 0. Furthermore, since P needs to be invertible, p11 must be a unit. With these relations given, D′ now takes the form   0 αx1 x2 αx32 αx71 − p12 x42 + p13 x1 x22 0 0 0 p21 x71 − p22 x42 + p23 x1 x22   D′ =  0 0 0 p31 x71 − p32 x42 + p33 x1 x22  0 0 0 0 for some α ∈ k. Supposing that E ′ has no crossing, it follows by Remark 2.2 that αx71 − p12 x42 + p13 x1 x22 = 0. But this implies that px42 − qx1 x22 = x71 for some p, q ∈ k[x1 , . . . , xd ], which cannot be true. Therefore, E ′ must have crossing. Remark 2.6. A result of Avramov and Jorgensen [3] can furthermore be used to show that the semifree DG module exhibited in Example 2.5 is, more generally, not in the image of the totaling functor Tot : DGr(A) → DDG(A) defined on the respective derived categories. The reader is referred to [5, Chapter 10] for a constructive definition of derived categories. Corollary 2.7. et A be a polynomial ring in more than one variable over a field. Then the functor Tot : ChGr(A) → DG(A) is not surjective. The constructive nature of the proof of Theorem 2.4 makes it possible for one to cook up a ‘totaling pre-image’ for any semifree DG module which admits a basis without crossing. The following example demonstrates this fact. Example 2.8. Let M be the rank four semifree DG module with semibasis E over A = k[x, y, z] defined in Example 2.3. As E has no crossing, the construction in the proof to Theorem 2.4 yields a complex X: " yz −x # [ x yz ] 0 → Σ−2 Ae4 −−−−→ Σ−1 (Ae2 ⊕ Ae3 ) −−−−−−→ Ae1 → 0 of graded A-modules such that Tot X = M . As one might have guessed, it is not always possible to cook up a semifree DG module whose semibases are guaranteed to have crossing. For example, if a DG Amodule has rank no more than three over A, it is impossible to define a differential which gives the the semibasis crossing. The following corollary makes this precise. Corollary 2.9. Let A be a graded domain, and suppose that M is a semifree DG A-module. If rankA M ≤ 3 then there exists a complex X of graded A-modules such that Tot X = M . 8 K. A. BECK Proof. Let E = {e1 , . . . , ed } be a well-ordered basis for M ♮ over A. Since M is semifree, we obtain the following possible (non-trivial) forms for its differential, where aij ∈ A for each i, j. d = 1 ⇒ ∂(e1 ) = 0 d = 2 ⇒ ∂(e1 ) = 0 ∂(e2 ) = a12 e1 d = 3 ⇒ ∂(e1 ) = 0 ∂(e2 ) = a12 e1 ∂(e3 ) = a13 e1 or ∂(e1 ) = 0 ∂(e2 ) = 0 ∂(e3 ) = a13 e1 + a23 e2 Note that in each case, E has no crossing. The result follows by Theorem 2.4.  We now turn our attention to the image of the totaling functor in the case that A is a polynomial ring in one variable. In this setting, it turns out that using Theorem 2.4 to find semifree DG modules which are not in the image of the totaling functor is not so straightforward. Accordingly, we take a slightly different approach here. The next lemma, which will follows directly from the structure theorem for finitely generated modules over a principal ideal domain. Lemma 2.10. Let M be a DG module which is n-generated over A = k[x]. Then there exist integers 0 ≤ s ≤ d and 1 ≤ t ≤ d such that H(M ) has a graded minimal free resolution over A given by  0→ s M               0 h1 .. . 0 0         hs        Σcj A −−−−−−−−−−−−−→ t M Σri A → H(M ) → 0 i=1 j=1 for some integers ri , cj for 1 ≤ i ≤ t and 1 ≤ j ≤ s, and where each hi = xci −ri ∈ Ax for each 1 ≤ i ≤ s. Theorem 2.11. Let A be a polynomial ring in one variable over a field. Then every semifree DG A-module is quasiisomorphic to the totaling of some complex of graded free A-modules. Specifically, the functor Tot : DGr(A) → DDG(A) is surjective. Proof. Let M be a rank d semifree DG module over A = k[x]. By Lemma 2.10, one can assume the homology of M to have the form (2.11.1) H(M ) ∼ = s t M M Σr i A ⊕ Σr i A ci A h Σ i i=1 i=s+1 for some 1 ≤ t ≤ d and 0 ≤ s ≤ t, and positive integers ri , cj . (Of course, s = 0 corresponds to the case that H(M ) is a free A-module.) Consider the deleted ON THE IMAGE OF THE TOTALING FUNCTOR 9 minimal graded free resolution F of H(M ) given as follows. 0 0 F: // Σc1 A ⊕ .. . ⊕ // Σcs A h1 // Σr1 A ⊕ .. . ⊕ 0 ⊕ .. . ⊕ // Σrs A ⊕ // Σrs+1 A ⊕ .. . ⊕ 0 ⊕ // Σrt A hs // 0 // 0 // 0 // 0 To complete the proof, we will show that Tot F ≃ M . While it is clear that H(Tot F ) ∼ = H(M ), it remains to exhibit a chain map (or sequence thereof) which induces this isomorphism. To this end, for each 1 ≤ i ≤ t, let Gi be the subcomplex which is given by the ith summand of F . Gi : ( h i Σr i A → 0 0 → Σci A −→ 0 → Σr i A → 0 if 1 ≤ i ≤ s if s < i ≤ t Our goal is to define a family of chain maps µi : Tot Gi → M such that the chain map µ : Tot F → M given by (2.11.2) µ = (µi ) : t M Tot Gi → M i=1 induces an isomorphism in homology. For each 1 ≤ i ≤ t, define µi by a family µij : (Tot Gi )j → Mj of homomorphisms of vector spaces over k in such a way that each µi is A-linear and furthermore commutes with the differentials of Tot Gi and M. For the sake of clarity, we include the following diagram, which illustrates the action of µi on Tot Gi . Note that the complexes are expressed vertically and that the diagonal maps represent the nontrivial component of ∂ Tot Gi . 10 K. A. BECK .. . .. . ⊕ ⊕ (Σci +1 A)ci +2 ⊕ (Σri A)ci +2 ▼▼▼ ▼▼▼hi ▼▼▼ ⊕ ⊕ ▼▼&& (Σci +1 A)ci +1 ⊕ (Σri A)ci +1 ▼▼▼ ▼▼▼hi ▼▼▼ ⊕ ⊕ ▼▼&& 0 ⊕ (Σri A)ci (2.11.3) ⊕ .. . .. . µic i +2  // Mci +2 ∂cM+2 i µic +1 i  // Mci +1 ∂cM i +1 µic i ⊕ .. .  // Mci M  ∂ci .. . ∂rM i −1 ⊕ (Σri A)ri µir i  // Mri ∂rM i ⊕ 0 ⊕ .. . µir −1 i  // Mri −1  .. . Although this diagram is restricted to indices given by 1 ≤ i ≤ s, the situation is straightforward for i > s; indeed, these cases represent the torsion-free part of H(M ). Thus, for s < i ≤ t, one has the following. ( 0 → Mj if j < ri i µj : ri if j ≥ ri (Σ A)j → Mj Now consider the following isomorphism of graded A-modules. ϕ: t s M M Σr i A Σri A → H(M ) ⊕ ci A h Σ i i=s+1 i=1 in such a way that ϕ (σ ri 1) = Fixing 1 ≤ i ≤ t, let 0 6= zi ∈ Mri be a cycle defined  ℓ ri cls(zi ) ∈ Hri (M ). Since ϕ is A-linear, ϕ x σ 1 = cls(xℓ zi ) for ℓ ≥ 0. Notice that, for small enough values of ℓ, these classes are nonzero. To be precise, cls(xℓ zi ) = 0 if and only if 1 ≤ i ≤ s and ℓ ≥ ci − ri . Therefore, for each 1 ≤ i ≤ s, there exists mi ∈ Mci +1 such that ∂cMi +1 (mi ) = xci −ri zi . We now proceed to define, for each i and j, a basis Uji for (Tot Gi )j over k.  {xj−ri σ ri 1, (−1)j−ci −1 xj−ci −1 σ ci +1 1} if 1 ≤ i ≤ s and j > ci Uji ⊇ otherwise {xj−ri σ ri 1} ON THE IMAGE OF THE TOTALING FUNCTOR 11 Finally, we define µij : (Tot Gi )j → Mj in the following way.  j−r i zi if u = xj−ri σ ri 1   x i j−ci −1 x mi if u = (−1)j−ci −1 xj−ci −1 σ ci +1 1 µj (u) =   0 otherwise By construction, µi = (µij ) is an A-linear degree zero chain map between Tot Gi and M . Further, one can easily check that the Leibniz rule is satisfied, so that the map µ : Tot F → M given in (2.11.2) is a morphism of DG modules. The above construction also guarantees that µ establishes L a one-to-one correspondence between the generators of homology of Tot F = m i=1 Tot Gi and that of M . The result follows.  The following example illustrates the practical use of the construction used in the proof of Theorem 2.11. Example 2.12. Let M be the rank five semifree DG module over A = k[x] with semibasis given by {e1 , e2 , e3 , e4 , e5 } such that |e1 | = 0, |e2 | = 2, |e3 | = 4, |e4 | = 8, |e5 | = 9, and where the differential of M is defined by the following. ∂(e1 ) = 0 ∂(e2 ) = 0 ∂(e3 ) = 0 ∂(e4 ) = x7 e1 + x5 e2 ∂(e5 ) = x4 e3 The homology of M can be decomposed Ae1 ⊕ Ae2 ⊕ Ae3 H(M ) = A(x7 e1 + x5 e2 ) ⊕ Ax4 e3 A(x2 e1 + e2 ) Ae3 ∼ ⊕ Ae1 ⊕ = A(x7 e1 + x5 e2 ) Ax4 e3 (2.12.1) whence one obtains the following deleted minimal free resolution F of H(M ). 0 F: 0 x5 // Σ7 A ⊕ // Σ8 A ⊕ 0 x4 // Σ2 A ⊕ // Σ4 A ⊕ // A // 0 // 0 // 0 We shall now utilize the proof of Theorem 2.11 to show that Tot F ≃ M . From F we obtain the following subcomplexes. x5 G1 : 0 → Σ7 A −→ Σ2 A → 0 G2 : 0 → Σ8 A −→ Σ4 A → 0 G3 : 0→A→0 x4 Referring to the decomposition of homology in (2.12.1), one has that the cycles generating H(M ) over A are z1 = x2 e1 + e2 , z2 = e3 , and z3 = e1 . Then, for 12 K. A. BECK each j ∈ N, a basis Uj1 of (Tot G3 )j over k must be chosen to contain {xj σ 0 1}. Furthermore, the respective bases of (Tot G1 )j and (Tot G2 )j over k are given as follows.  {xj−2 σ 2 1} if j < 8 Uj1 ⊇ j−2 2 j−8 j−8 8 {x σ 1, (−1) x σ 1} if j ≥ 8  {xj−4 σ 4 1} if j < 9 Uj2 ⊇ {xj−4 σ 4 1, (−1)j−9 xj−9 σ 9 1} if j ≥ 9 Using these bases, one can now define chain maps µi = (µij ) : (Tot Gi )j → Mj .  j j−2 if u = xj−2 σ 2 1   x e1 + x e2 xj−8 e4 if u = (−1)j−8 xj−8 σ 8 1 µ1j (u) =   0 otherwise  j−4 if u = xj−4 σ 4 1   x e3 xj−9 e5 if u = (−1)j−9 xj−9 σ 9 1 µ2j (u) =   0 otherwise ( xj e1 if u = xj σ 0 1 µ3j (u) = 0 otherwise  Finally, µ : Tot F → M is given by µ(x) = µ1 (x), µ2 (x), µ3 (x) for each x ∈ Tot F . Acknowledgments The author would like to thank Dave Jorgensen and Sean Sather-Wagstaff for both piquing and cultivating her interest in DG algebra. Thanks also to the referee for many helpful suggestions which greatly improved the overall quality of this manuscript. References [1] L. L. Avramov, Infinite free resolutions, Six lectures on commutative algebra, 2010, pp. 1–118. MR2641236 [2] L. L. Avramov, H.-B. Foxby, and S. Halperin, Differential graded homological algebra, (in preparation). [3] L. L. Avramov and D. A. Jorgensen, Realization of cohomology over a complete intersection, (in preparation). [4] B. Keller, On differential graded categories, International Congress of Mathematicians. Vol. II, 2006, pp. 151–190. MR2275593 (2008g:18015) [5] C. A. Weibel, An introduction to homological algebra, Cambridge Studies in Advanced Mathematics, vol. 38, Cambridge University Press, Cambridge, 1994. MR1269324 Kristen A. Beck, Department of Mathematics, University of Arizona, 617 N. Santa Rita Ave., Tucson, AZ, 85719, U.S.A. E-mail address: [email protected]
0math.AC
Consensus analysis of systems with time-varying interactions : An event-triggered approach S. Arun Kumar ∗ N. R. Chowdhury ∗ S. Srikant ∗ J. Raisch ∗∗,∗∗∗ ∗ arXiv:1705.00537v2 [cs.SY] 2 May 2017 Department of Systems and Control Engineering, Indian Institute of Technology Bombay, Mumbai -400076, India. (e-mail:{arunkumar92, nilanjan, srikant}@sc.iitb.ac.in) ∗∗ Fachgebiet Regelungssysteme, Technische Universität Berlin, Berlin, 10587 Germany (e-mail: [email protected]). ∗∗∗ Systems and Control Theory Group, Max Planck Institute for Dynamics of Complex Technical Systems. Abstract: We present consensus analysis of systems with single integrator dynamics interacting via time-varying graphs under the event-triggered control paradigm. Event-triggered control sparsifies the control applied, thus reducing the control effort expended. Initially, we consider a multi-agent system with persistently exciting interactions and study the behaviour under the application of event-triggered control with two types of trigger functions- static and dynamic trigger. We show that while in the case of static trigger, the edge-states converge to a ball around the origin, the dynamic trigger function forces the states to reach consensus exponentially. Finally, we extend these results to a more general setting where we consider switching topologies. We show that similar results can be obtained for agents interacting via switching topologies and validate our results by means of simulations. 1 Introduction A flock of birds, a swarm of bees, a school of fishes, a colony of ants -all display a wonderful coordination and complex patterns which have caught our attention since time immemorial. On closer observation we realize that these seemingly complex patterns emerge out of simple yet powerful, local rules on each agent of the group based on interactions with only the neighbours. When we attempt to algorithmize such a ’decentralized’ behaviour, two types of questions can be posed- what would be the result of a particular decentralized control law or what decentralized control law would result in a desired global pattern or formation. Consensus is one of the most common and powerful ’global’ behaviours usually studied, primarily because it can be easily extended to other problems like formation, rendezvous, flocking etc. Vicsek et al. (1995) proposed an averagebased decentralized control law for a multi-agent system based on only local information and observed that the agents attain consensus while Jadbabaie et al. (2003) gave a proof of the same assuming the agents interact via connected graphs that can switch at different time instants. Various results have been proposed by Ren and Beard (2005), Ren and Atkins (2005), Olfati-Saber and Shamma (2005), and others on consensus of a multi-agent system under directed or undirected graphs, with switching topologies and also with time delays. Studying consensus behaviour for systems with switching or time-varying graphs is naturally of interest as in real-life scenarios it is not possible to assume that each agent has the same set of neighbours at all times. Time-varying graphs are useful when the information from each neighbour is assigned a weight proportional to the reliability of the information or the distance between them. Martin and Girard (2013) proved consensus under the assumptions of persistent-connectivity and cut-balance interactions. Chowdhury et al. (2016) obtained bounds on the rate of convergence for single-integrator and double integrator dynamics under persistent interactions. With control laws being implemented on digital computers, developing discrete-time counterparts to continuous-time control laws is an eventuality. Among discrete control laws eventtriggered control is preferred over time-triggered control as it comes into play only when an ’event’ is triggered, thus sparsifying control. Event-triggered control of multi-agent systems has been studied by many. Dimarogonas et al. (2012), Seyboth et al. (2011) prove consensus under a connected time-invariant graph for single integrator dynamics, while Yu et al. (2015), Zhu et al. (2014) have extended the results for agents with general linear systems dynamics. Chen and Dai (2016) has studied the consensus of time varying systems with non-linear dynamics under event-triggered control but under a constant interaction topology. Our work considers the broader case of time-varying graphs that can have different spanning-trees and we prove consensus of single-integrator systems under eventtriggered control structure. The paper is organized as follows. We brush up on graph theory and persistent excitation in section 2. The system dynamics for single integrator systems are introduced in section 3. In section 4, we introduce the notion of event-triggered control, define the trigger conditions and evaluate convergence under eventtriggered control in section 5. We extend the results to switching graphs in section 5.1 and show simulation results in section 6. The results that we obtained are summarized in section 7. 2 2.1 Preliminaries Notions of graph theory In this work we consider agent interactions represented by undirected graphs G = (V, E), where V = {v1 , v2 , · · · vn } denotes 2 a non-empty set of nodes and [V ] ⊇ E = {e1 , e2 , · · · em } is 2 the edge set, where [V ] is the set of all subsets of V containing two elements. Each node represents an agent of the system and each edge (vi , vj ) signifies that the agents occupying nodes vi and vj can exchange information with each other. We define D (G) (= [dij ]) ∈ Rn×m to be the incidence matrix associated with the graph G by arbitrarily assigning orientation to each edge ej ∈ E. Then [dij ] = −1 if vi is the tail of ej ,[dij ] = 1 if vi is the head of ej , [dij ] = 0 otherwise. The Laplacian of G, > L (G) = D (G) D (G) (1) is a symmetric square matrix that captures the inter-connections between each pairs of nodes. We model the time-varying interactions between the agents by assuming a constant, underlying graph G with edge weights that can be time-varying. The Laplacian can be tweaked to reflect the resultant time-varying graph G̃ (t) as,   > L G̃ (t) = D (G) W (t) D (G) . (2) where W (t) ∈ Rm×m is a diagonal matrix which captures the time-varying nature of each interaction and wii ≥ 0 ∀t. We assume that the underlying graph G is connected and therefore contains a spanning-tree, i.e. the edge set E of G can be partitioned into two subsets E = Eτ ∪ Ec , where Eτ consists of the spanning-tree edges and Ec contains the cycle edges. We also assume that the time-varying edge weight matrix W (t) is piece-wise continuous and satisfies the persistent excitation condition with constants (µ1 , µ2 , T ). 2.2 Persistence of excitation Definition 1. (Sastry and Bodson, 2011, p. 72) The signal g(·) : R≥0 → Rn×m is Persistently Exciting (PE) if there exist finite positive constants µ1 , µ2 , T such that, Z t+T µ2 In ≥ g(τ )g(τ )T dτ ≥ µ1 In ∀t ≥ t0 (3) t A function g(·) that satisfies the condition (3) is said to be persistently exciting with constants (µ1 , µ2 , T ). We say that a graph G̃ is persistently exciting if its associated edge-weight matrix W (t) is persistently exciting. 2.3 Other Conventions k·k denotes the frobenius 2-norm on vectors and the induced 2-norm on matrices. λmin (·) and λmin (·) operate on square matrices and return the minimum and maximum eigenvalues respectively of the said matrix. Boldfaced 1 and 0 (1, 0) represent vectors with all ones and all zeroes respectively and I is used to denote the identity matrix. Their dimensions can be inferred contextually if not mentioned explicitly. 3 Network Models In this section we state the single integrator dynamical equations and perform a series of linear transformations, to bring them to a form that we could work with later on. This section has been taken from Chowdhury et al. (2016) and presented here for reference of the readers. 3.1 Single Integrator Consider a multi-agent system with states xi ∈ R for i = 1, 2, 3 · · · n with a connected underlying  graph  G and the Laplacian of the time-varying graphs L G̃ (t) = [lij (t)]. The dynamics of each state with control ui ∈ R can be written as, ẋi =ui n X ui = − k lij (t)xj (4) j=1 for t > t0 with initial condition xi (t0 ) ∈ R for i = 1, 2, 3.....n and positive control gain k ∈ R. The augmented dynamics of the system can be written in terms of the state vectors > x = [x1 , x2 , · · · xn ] ∈ Rn as,   ẋ(t) = − kL G̃(t) x > = − kD (G) W (t)D (G) x (5) Taking cue from Zelazo and Mesbahi (2011), Mesbahi and Egerstedt, 2010, p. 77-81 we transform the consensus problem of equation (5) into a stabilization problem by considering the edge states instead of node states. We effect the conversion through the following transformation, > xe =D (G) x. (6) The dynamics of the edge states, on differentiation of (6) yields, ẋe = − kLe (G) W (t) xe (7) m×m where Le (G) ∈ R represents the edge-Laplacian of the > graph G and can be expressed as, Le (G) = D (G) D (G) as shown in Zelazo and Burger (2014). Also, using the fact that the underlying graph contains a spanning-tree Gτ we partition the edge states after a suitable permutation as follows,   x xe = τ (8) xc for xτ ∈ Rp and xc ∈ Rm−p where p is the number of edges in Gτ . Similarly we can partition D (G), W(t) as  Wτ (t) 0 D (G) = [D (Gτ ) D (Gc )], W (t) = . The 0 Wc (t) edge-Laplacian, in terms of the partitions of D (G) is then, > Le (G) = [D (Gτ ) D (Gc )] [D (Gτ ) D (Gc )]   > Le (Gτ ) D (Gτ ) D (Gc ) = . (9) > D (Gc ) D (Gτ ) Le (Gc ) We know that for connected graphs, xc can always be written as xc = Z > xτ as shown in Sandhu et al. (2005) where Z = −1 > (Le (Gτ )) D (Gτ ) D (Gc ). This is because the spanning-tree edges essentially capture the behaviour of all the edges. So we can focus our attention only on the spanning-tree edges. Using (7), (8) and (9), we get ẋτ = −kLe (Gτ ) RW (t) R> xτ where R = [Ip Z] ∈ Rp×m . The preceding transformations that helped us re-write the system dynamics in terms of xτ are along the lines of Zelazo and Mesbahi (2011) and Mesbahi and Egerstedt, 2010, p. 77-81. Since Le (Gτ ) is symmetric and positive definite, it can be diagonalized as Le (Gτ ) = ΓΛΓ> for some orthogonal matrix Γ ∈ Rp×p and diagonal matrix Λ ∈ Rp×p . Consider a change of variable by the transformation Υ = Γ> xτ . The above equation becomes, Υ̇ = − kΛM (t) Υ (10) where M (t) = Γ> RW (t) R> Γ ∈ Rp×p . As stated earlier, the consensus problem of equation (5) is equivalent to stabilization (1) Static Trigger Function fi (ei (t)) = kei (t)k − c (2) Dynamic Trigger Function problem of equation (10). For the sake of further reference, we denote the preceding set of transformations from x to Υ > by ψ := Γ> [Ip 0m−p ] D (G) . So we have, Υ = ψx. We state (Chowdhury et al., 2016, Theorem 5) and use the result to obtain the rate of convergence to consensus of a single integrator system defined by equations (5). Theorem 1. ((Chowdhury et al., 2016, Theorem 5)) Consider the closed-loop consensus dynamics (5). Assume that, the underlying graph G is connected. The states of the closed-loop dynamics x(t) with time-varying communication topology characterized by W (t), achieve consensus exponentially, if there exists a spanning tree with corresponding edge-weight matrix Wτ (t) that is persistently exciting. Further the convergence rate αv to consensus is bounded below by, 1 1  αv ≥ ln  2T 1 − 2kλ√min (Λ)µ1 2 (1+k pkΛkµ2 ) where, T, µ1 and µ2 are the constants appearing in Definition 1 and Λ is a diagonal matrix containing the eigenvalues of the spanning tree edge Laplacian matrix. The static trigger function can be seen as a special case of the dynamic trigger function with β = 0. So we will perform our analysis with (15) as the trigger function, and substitute β = 0 when we want to evaluate the static-trigger case. The dynamics of single integrator systems under event-triggered control can be written as,   ẋ(t) = − kL G̃ (t) (x + e) (16) Further, 4.1 kΥ(t)k ≤mv e−αv (t−t0 ) kΥ(t0 )k (11) where αv and mv can be calculated from the underlying graph and control gains. Note: The relationship between kxe k and kΥk can be established in the following way. q 2 2 kxe k = kxτ k + kxc k q 2 ≤ kxτ k 1 + kZ > k Using the fact that Γ is orthogonal, xτ = ΓΥ, kxe k ≤ρ kΥk (12) q 2 where ρ = kΓk 1 + kZ > k . The induced 2-norm of Z can 1 be calculated as λmax Z > Z 2 . 4 Event-Triggered Control where c > 0 j=1 To define an event, we introduce error variables ei (t) = x̂i (t) − xi (t) which denote the difference between the broadcasted value and the current value of the state for each agent. The trigger condition that updates the broadcasted states x̂ effectively shapes the behaviour of the system. We define the trigger condition using a trigger function for each state fi (t, ei ) : R → R . An event is said to be ’triggered’ when fi > 0. Once an event is ’triggered’ say at time t∗ , the broadcast value is 0 updated i.e. x̂i (t) = xi (t∗ ) =⇒ ei (t∗ ) = 0 for t∗ ≤ t < t 0 where t is the time instant when the next subsequent event is triggered. We define two trigger functions as shown in Seyboth et al. (2011)- the static trigger and the dynamic trigger. (15) where e = [e1 , e2 · · · en ]> ∈ Rn . The equivalent stabilization problem under event triggered control for single integrator will then be, Υ̇ = − kΛM (t) (Υ + ẽ) (17) where ẽ = ψe. Bounds on the error variables In this section, we obtain bounds on ẽ in terms of the bounds on e. The trigger function is so designed that each ei is always upper-bounded. We can see that, kei k ≤ce−βt (18) We can relate the bounds on e to bounds on ẽ in the following > way. We know that ẽ = ψ e. Let us define ē := D (G) e. From the structure of D (G), we get ēi = ej − ek (19) for i = 1, 2, · · · m and j, k chosen on the basis of D (G). Using (18), (19) can be rewritten as, kēi k = kej − ek k ≤ kej k + kek k Also, In this section we outline the event-triggered control strategies and show how it modifies the single-integrator dynamics defined by equation (5). Under the event-triggered control paradigm each agent broadcasts a (piecewise)constant value, x̂i which is updated to the current value of the state whenever an ’event is triggered’. The control applied by each agent would then be, n X ui = − k lij (t)x̂j (13) fi (t, ei (t)) = kei (t)k − ce−β(t) (14) ≤ 2ce−βt . (20) ẽ = ψe = Γ> [Ip 0m−p ] ē > = Γ> [ē1 ē2 · · · ēp ] . (21) Using the bound on each ēi from (20), kẽk ≤ kΓk k[ē1 ē2 · · · ēp ]k √ ≤ pkΓkkēi k √ ≤ 2c pkΓke−βt . (22) √ Defining C := 2c p kΓk, we can write the above inequality to be, kẽ(t)k ≤ Ce−βt . (23) 5 Consensus Analysis Theorem 2. Consider a multi-agent system with single integrator dynamics as defined by equation (5). Assume that the underlying graph (G), representing the interaction between the agents be connected, with p edges in the spanning-tree. If the spanning tree edge weight matrix Wτ (t) is persistently exciting with constants (µ1 ,µ2 ,T ), then (1) on application of event-triggered control with a static trigger function defined by equation (14), the edge states xe of the system exponentially converge to a ball around the origin defined by kxe k ≤ ρκm 2 . (2) on application of event-triggered control with a dynamic trigger function defined by equation (15), the edge states xe of the system exponentially converge to origin. Also the rate of convergence is lower bounded by β as defined in (15). αv t0 +2αv T µ2 where, κ2 = kkΛkmv eCe and ρ is defined as in (12). αv T −1 Also the closed loop systems in the cases of static and dynamic triggers does not exhibit zeno behaviour when β is chosen to be greater than αv . Note: When a connected graph has multiple spanning-trees, κM 2 and κm 2 are the largest and smallest values of κ2 that can be calculated considering each different spanning-tree. Proof. Let φ (t, t0 ) be the state transition matrix corresponding to system defined by equation (10) . The solution of the system can be written using φ (t, t0 ) as, Υ(t) =φ(t, t0 )Υ(t0 ) We obtain a bound on kφ(t, t0 )k by the following steps. kΥ(t)k =kφ(t, t0 )Υ(t0 )k kφ(t, t0 )Υ(t0 )k = kΥ(t0 )k (24) kΥ(t0 )k Comparing (24) and (11) we can conclude that, kφ(t, t0 )Υ(t0 )k ≤ mv e−αv (t−t0 ) kΥ(t0 )k kφ(t, t0 )Υ(t0 )k sup = kφ(t, t0 )k ≤ mv e−αv (t−t0 ) . (25) kΥ(t0 )k Υ(t0 ) The last statement holds true because Υ (t0 ) can be arbitrary. Consider the single integrator multi-agent system with eventtriggered control defined by the equation (17). The solution of this system can be expressed as , Z t Υ(t) =φ(t, t0 )Υ(t0 ) − k φ(t, τ )ΛM (τ )ẽ(τ )dτ (26) the fact that M (τ ) is persistently exciting and β < αv we can obtain the following bound on each interval, Z t0 +T e−(β−αv )τ kM (τ )k dτ ≤µ2 supτ ∈[t0 ,t0 +T ] e−(β−αv )τ t0 0 ≤µ2 e−(β−αv )(t +T ) Using this upper bound on each integral we get Z t  e−(β−αv )τ kM (τ )k dτ ≤ µ2 e−(β−αv )T e−(β−αv )t0 + t0 e−(β−αv )(t0 +T ) + · · · e−(β−αv )(t0 +θT ) ) Using the property of the sum of terms in a geometric progression, we get Z t e−(β−αv )τ kM (τ )kdτ ≤ t0   1 − e−(β−αv )θT µ2 e−(β−αv )(t0 +T ) 1 − e−(β−αv )T (28) Using inequality (28) in inequality (27), kΥ(t)k ≤ mv e−αv (t−t0 ) kΥ(t0 )k + −(β−αv )(t0 +T ) k kΛk mv Ce µ2 e −αv t   1 − e−(β−αv )θT 1 − e−(β−αv )T (29) We define κ1 = eαv t0 mv kΥ(t0 )k − κ3 , κ2 = e(αv +β)T κ3 , k kΛk mv Ce−(β−αv )(t0 +T ) µ2 e−(β−αv )T − 1 to be able to express (29) as, κ3 = kΥ(t)k ≤ κ1 e−αv t + κ3 e−βθT −αv (θT −t) (30) Using the properties of floor function, we can simplify the above inequality further, kΥ(t)k ≤ κ1 e−αv t + κ3 e−β(θT −t)−αv (θT −t)−βt ≤ κ1 e−αv t + κ2 e−βt −αv t −βt (31)  =⇒ kxe (t)k ≤ ρ κ1 e + κ2 e . (32) From the above expression it can clearly be seen that for the We get the following inequality from the above equation, dynamic trigger case, limt→∞ kxe (t)k = 0. This guarantees consensus of the states x. Also as β < αv by choice, the rate of kΥ(t)k ≤ kφ(t, t0 )k kΥ(t0 )k + Z t decay of the RHS of (32) will be dominated by β. For the static trigger case, β = 0 k kΛk kφ(t, τ )k kM (τ )k kẽ(τ )k dτ  t0 kxe (t)k ≤ ρ κ1 e−αv t + κ2 Using the bounds on φ from equation (25) and ẽ (τ ) from limt→∞ kxe (t)k ≤ limt→∞ ρκ1 e−αv t + limt→∞ ρκ2 equation (23) we get, ≤ ρκ2 kΥ(t)k ≤mv e−αv (t−t0 ) kΥ(t0 )k + It can be seen that the edge-states converge to a ball around the Z t k kΛk mv Ce−αv t e−(β−αv )τ kM (τ )k dτ (27) origin kxe k ≤ ρκ2 exponentially with a rate of convergence bounded below by αv . t0 To obtain a bound on the integral in the above inequal- Ruling out zeno behaviour in closed loop systems The system states xi and error states ei together form a hybrid ity, we divide the interval [t0 , t] into partitions of size T i.e. [t0 , t0 + T ], [t0 + T, t0 + 2T ] and so on . The number system, which makes it necessary for us to ensure that zeno th of such partitions of length T possible will be given by behaviour does not occur. Say that for the i agent, an event  t−t0 is triggered at a time instant t and another consecutive event 1 , where b·c is the floor function . The last θ = T is triggered at time t for some t ≤ t < t 2 0 1 2 . To rule out the partition can then be written as [t0 + θT, t]. The integral in R t0 +T −(β−α )τ occurrence of zeno behaviour, it is sufficient to show that there v (27) can then be written as, t0 e kM (τ )k dτ + exists a positive, non-zero lower bound on γ := t2 − t1 . We R t0 +2T −(β−α )τ Rt v e kM (τ )k dτ · · ·+ t0 +θT e−(β−αv )τ kM (τ )k dτ .have ėi = −ẋi . Consider the following set of inequalities for t0 +T Applying Hölder inequality with p = ∞ and q = 1 and using time t1 ≤ t < t2 . t0 > kėi k = kẋi k ≤ kẋk = kkD (G) W (t)D (G) x (t1 )k ≤ kkD (G)k kW (t)k kxe (t1 )k Using (32) we can rewrite the above inequality as,  kėi k ≤ kρkD (G)k kW (t)k κ1 e−αv t1 + κ2 e−βt1 . (33) Also, Z t2 Z t2 (34) ėi dt = kei (t2 )k. kėi kdt ≥ t1 t1 We substitute kei (t2 )k = ce−βt2 as an event is triggered at t2 . Integrating the inequality (33) with limits t1 and t2 and using the fact that the edge weights are bounded such that kW (t)k ≤ ω and (34) we get, Z t2  kρωkD (G)k κ1 e−αv t1 + κ2 e−βt1 dt kei (t2 )k ≤ t1  −βt2 ≤ kρωkD (G)k κ1 e−αv t1 + κ2 e−βt1 γ ce   ce−βγ ≤ kρωkD (G)k κ1 e−(αv −β)t1 + κ2 γ Rearranging the above inequality we get, c  γ eβγ ≥ (35) kρωkD (G)k κ1 e−(αv −β)t1 + κ2 It is evident that γ > 0 as the RHS of (35) is strictly positive. The minimum value of γ is a solution of the following equation, c (36) γ eβγ = kρωkD (G)k (κ1 + κ2 ) This proves that zeno behaviour does not occur in the dynanic trigger case. When β = 0, the lower bound on gamma is the RHS of equation (36), which rules out zeno behaviour in static trigger case as well. The preceding arguments on ruling out zeno behaviour are similar to those provided in Seyboth et al. (2011) for time-invariant graphs. 5.1 (Graham et al., 1980, p. 29) it is possible to find N such that in the interval (ti1 , tiN ), the same spanning-tree occurs in each τ (1 + (j − 1)d, 1) for j = 1, 2, · · · k and some d > 0. This allows us to select a persistence window T > (d + 1)tmax where tmax = maxj τ (j, 1) for j = 1, 2, · · · N . With the aforementioned selection of T , Theorem 2 can be invoked to prove the convergence of the edge states xe to a ball around origin in the case of static trigger and to origin in the case of dynamic trigger. As we cannot predict which particular spanning-tree repeats in each interval τ (1 + (i − 1)d, 1), the least conservative bounds are chosen. 6 Simulations A multi-agent system with four agents under switching graphs was simulated using Matlab c for the static and dynamic trigger cases. The underlying communication topology considered is shown in figure 1 and the different spanning-trees that were switched between are shown in figure 2. 1 g1 2 g4 g6 g2 g5 4 g3 3 Fig. 1. Underlying graph of arbitrary orientation Consensus in Switching Topologies Theorem 2 is not valid for switching topologies because our spanning tree and thereby the edge states xe itself can be changing. The following corollary extends the aforementioned theorem to agents interacting via switching topologies. Corollary 1. Let t1 , t2 , · · · be the infinite time sequence of graph switching instants with, ti+1 − ti ≥ tL for some positive tL , and i = 0, 1, · · · . Consider the agent dynamics (16) corresponding to a single integrator system with eventtriggered control. If there exists an infinite sequence of contiguous, non-emptyand uniformly bounded time intervals τ (j, 1)  Let τ (j, l) = tij , tij+l ; j = 1, 2, · · · starting at ti1 = t0 , with the property that the union of the undirected graphs across each such interval has a spanning tree, then (1) with static-trigger, the edge-state xe converges to a ball of radius kxe k ≤ ρκM 2 . (2) with dynamic-trigger, the edge-state xe converges exponentially to origin at rate greater than β. Proof. The case of switching topologies differs from the setting of theorem 2 by the fact that the union of graphs in each time interval τ (j, 1) contains a different spanning-tree compared to the occurrence of the same spanning tree in theorem 2. We show that Corollary 1 can be treated as an extension of Theorem 2 using the results of Van der Waerden’s theorem ((Graham et al., 1980, p. 29)). The collection of possible spanning-tress forms a finite, non-empty set. Taking each possible spanning-tree to be a different colour, by Theorem Fig. 2. Spanning Trees Considered The edge-weights were chosen as gi = square(4 ∗ t, 20 − (i − 1)0.1π) + 1). ∗ sin(5 ∗ t) for i = 1, 2 · · · 4 and g6 = 0, where the function square(at, b) for a, b ∈ R generates  a square  wave Ton 2π of unit amplitude, period a and duty-cycle Toff +Ton b. The aforementioned gi are defined to emulate real scenarios where there might be instances when no edges are active. The initial > value of the states was taken to be x0 = [1 2 0.3 0.4] Plots 3 and 4 show the evolution of the system states x and the norm of the edge states kxe k under the static trigger with c = 0.5 (refer equation (14)). The evolution of the states with dynamic trigger function with β = 0.06 and c = 0.5 (refer equation (15)) is plotted in figures (5) and (6). The bounds were calculated using inequalities presented in Corollary 1 and plotted along with the norm of the edge states. These plots show the convergence of the edge states xe to a ball around the origin in case of static trigger and consensus of states x in the case of dynamic trigger. 3 12 x1 x2 x3 x4 kxe k Envelope Norm of edge states 10 States 2 1 8 6 4 2 0 0 10 20 30 0 40 Time[s] 0 10 20 30 40 50 Time[s] Fig. 3. Evolution of states under static trigger with the graph switching between spanning trees G1 and G2 in contiguous intervals Fig. 6. Evolution of norm of edge-states under dynamic trigger with the graph switching between spanning trees G1 and G2 in contiguous intervals References 4 Norm of edge states kxe k Envelope 3 2 1 0 0 10 20 30 40 Time[s] Fig. 4. Evolution of norm of edge-states under static trigger with the graph switching between spanning trees G1 and G2 in contiguous intervals 3 x1 x2 x3 x4 States 2 1 0 0 10 20 30 40 50 Time[s] Fig. 5. Evolution of states under dynamic trigger with the graph switching between spanning trees G1 and G2 in contiguous intervals 7 Conclusions The application of event-triggered control to classical consensus algorithms with time-varying, persistently exciting topologies guarantees consensus with dynamic trigger function. Under the more practically implementable static trigger function, the edge-states converge to a ball around the origin. For switching topologies, we utilize the work of Chowdhury et al. (2016) to show that we can extend the results of the persistent, continuously varying graphs to the case of switching topologies. The convergence bounds thus obtained depend on the ’slowest’ spanning tree. Chen, W. and Dai, H. (2016). Event-triggered consensus of time-varying complex system. In 2016 Chinese Control and Decision Conference (CCDC), 231–234. IEEE. Chowdhury, N.R., Sukumar, S., and Balachandran, N. (2016). Persistence based convergence rate analysis of consensus protocols for dynamic graph networks. European Journal of Control, 29, 33–43. Dimarogonas, D.V., Frazzoli, E., and Johansson, K.H. (2012). Distributed event-triggered control for multi-agent systems. IEEE Transactions on Automatic Control, 57(5), 1291–1297. Graham, R.L., Rothschild, B.L., and Spencer, J.H. (1980). Ramsey theory, volume 2. Wiley New York. Jadbabaie, A., Lin, J., and Morse, A.S. (2003). Coordination of groups of mobile autonomous agents using nearest neighbor rules. Automatic Control, IEEE Transactions on, 48(6), 988–1001. Martin, S. and Girard, A. (2013). Continuous-time consensus under persistent connectivity and slow divergence of reciprocal interaction weights. SIAM Journal on Control and Optimization, 51(3), 2568–2584. Mesbahi, M. and Egerstedt, M. (2010). Graph theoretic methods in multiagent networks. Princeton University Press. Olfati-Saber, R. and Shamma, J.S. (2005). Consensus filters for sensor networks and distributed sensor fusion. In 44th IEEE Conference on, Decision and Control, ECC. CDC-ECC’05. 2005, 6698–6703. IEEE. Ren, W. and Atkins, E. (2005). Second-order consensus protocols in multiple vehicle systems with local interactions. In AIAA Guidance, Navigation, and Control Conference and Exhibit, 15–18. Ren, W. and Beard, R.W. (2005). Consensus seeking in multiagent systems under dynamically changing interaction topologies. IEEE Transactions on, Automatic Control, 50(5), 655–661. Sandhu, J., Mesbahi, M., and Tsukamaki, T. (2005). Cuts and cycles in relative sensing and control of spatially distributed systems. In Proceedings of the American Control Conference, volume 1, 73. Sastry, S. and Bodson, M. (2011). Adaptive control: stability, convergence and robustness. Courier Dover Publications. Seyboth, G.S., Dimarogonas, D.V., and Johansson, K.H. (2011). Control of multi-agent systems via event-based communication. IFAC Proceedings Volumes, 44(1), 10086–10091. Vicsek, T., Czirók, A., Ben-Jacob, E., Cohen, I., and Shochet, O. (1995). Novel type of phase transition in a system of self-driven particles. Physical Review Letters, 75(6), 1226–1229. Yu, P., Ding, L., Liu, Z.W., and Guan, Z.H. (2015). A distributed eventtriggered transmission strategy for exponential consensus of general linear multi-agent systems with directed topology. Journal of the Franklin Institute, 352(12), 5866–5881. Zelazo, D. and Burger, M. (2014). On the definiteness of the weighted laplacian and its connection to effective resistance. In Decision and Control (CDC), 2014 IEEE 53rd Annual Conference on, 2895–2900. IEEE. Zelazo, D. and Mesbahi, M. (2011). Edge agreement: Graph-theoretic performance bounds and passivity analysis. IEEE TAC, 56(3), 544–555. Zhu, W., Jiang, Z.P., and Feng, G. (2014). Event-based consensus of multiagent systems with general linear models. Automatica, 50(2), 552–558.
3cs.SY
On the Formal Semantics of the Cognitive Middleware AWDRAT∗ arXiv:1412.3588v2 [cs.PL] 14 Dec 2014 Muhammad Taimoor Khan† , Dimitrios Serpanos† and Howard Shrobe* † {mtkhan, dserpanos}@qf.org.qa * [email protected] † QCRI, Qatar * CSAIL, MIT, USA March 23, 2018 Abstract The purpose of this work is two fold: on one hand we want to formalize the behavior of critical components of the self generating and adapting cognitive middleware AWDRAT such that the formalism not only helps to understand the semantics and technical details of the middleware but also opens an opportunity to extend the middleware to support other complex application domains of cybersecurity; on the other hand, the formalism serves as a pre-requisite for our proof of the behavioral correctness of the critical components to ensure the safety of the middleware itself. However, here we focus only on the core and critical component of the middleware, i.e. Execution Monitor which is a part of the module “Architectural Differencer” of AWDRAT. The role of the execution monitor is to identify inconsistencies between runtime observations of the target system and predictions of the System Architectural Model. Therefore, to achieve this goal, we first define the formal (denotational) semantics of the observations (runtime events) and predictions (executable specifications as of System Architectural Model); then based on the aforementioned formal semantices, we formalize the behavior of the “Execution Monitor” of the middleware. ∗ This is the draft version of the subject technical report. 1 Contents 1 Calculus of AWDRAT 4 2 Syntax of System Architectural Model 5 3 Semantics of System Architectural Model 3.1 Semantic Algebras . . . . . . . . . . . . . 3.1.1 Truth Values . . . . . . . . . . . . 3.1.2 Numeral Values . . . . . . . . . . . 3.1.3 Environment Values . . . . . . . . 3.1.4 State Values . . . . . . . . . . . . 3.1.5 Semantic Values . . . . . . . . . . 3.1.6 Character String Values . . . . . . 3.1.7 Lifted Values . . . . . . . . . . . . 3.1.8 (Registered) Event Values . . . . . 3.1.9 (Observed) Event Values . . . . . 3.1.10 (Runtime) Event Values . . . . . . 3.1.11 Resource Values . . . . . . . . . . 3.1.12 Function Values . . . . . . . . . . 3.1.13 Component Values . . . . . . . . . 3.1.14 Split Values . . . . . . . . . . . . . 3.1.15 Attack Values . . . . . . . . . . . . 3.2 Signatures of Valuation Functions . . . . . 3.2.1 System Architectural Model . . . . 3.2.2 Behavioral Models . . . . . . . . . 3.3 Auxiliary Predicates and Functions . . . . 3.4 Definition of Valuation Functions . . . . . 3.4.1 System Architectural Model . . . . 3.4.2 Register Model . . . . . . . . . . . 3.4.3 Register Model Sequence . . . . . 3.4.4 Structural Model . . . . . . . . . . 3.4.5 Structural Model Sequence . . . . 3.4.6 Behavioral Model . . . . . . . . . . 3.4.7 Behavioral Model Sequence . . . . 3.4.8 Split Model . . . . . . . . . . . . . 3.4.9 Split Model Sequence . . . . . . . 3.4.10 Attack Model . . . . . . . . . . . . 3.4.11 Attack Model Sequence . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 12 12 12 12 14 15 15 15 15 16 16 16 17 17 18 18 18 18 18 19 22 22 23 24 24 29 30 31 32 33 33 35 4 Execution Monitor 35 4.1 Observation Model . . . . . . . . . . . . . . . . . . . . . . . . 36 4.1.1 Observations . . . . . . . . . . . . . . . . . . . . . . . 37 2 5 Semantics of the Execution Monitor 37 6 Conclusions and Future Work 39 Appendices 42 A Formal Syntax of System Architectural Model 42 A.1 Declaration of Syntactic Domains . . . . . . . . . . . . . . . . 42 A.2 Grammar . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 B An Example of a System Architectural Model 49 B.1 MAF Editor Model . . . . . . . . . . . . . . . . . . . . . . . . 50 3 1 Calculus of AWDRAT Defending systems against cyber attack requires us to be able to rapidly and accurately detect that an attack has occurred. Today’s detection systems are woefully inadequate suffering from both high false positive and false negative rates. There are two key reasons for this: First, the systems do not understand the complete behavior of the system they are protecting. The second is that they do not understand what an attacker is trying to achieve. Most such systems, in fact, are retrospective, that is they understand some surface signatures of previous attacks and attempt to recognize the same signature in current traffic. Furthermore, they are passive in character, they sit back and wait for something similar to what has already happened to recur. Attackers, of course, respond by varying their attacks so as to avoid detection. AWDRAT [5] is a representative of a new class of protection systems that employ a different, active form of perception, one that is informed both by knowledge of what the protected application is trying to do and by knowledge of how attackers think. It employs both bottom-up reasoning (going from sensors data to conclusions about what attacks might be in progress) as well as top-down reasoning (given a set of hypotheses about what attacks might be in progress, in focuses its attention to those events most likely to significantly help in discerning the ground truth). There are two dimensions along which detection systems can be characterized. The first is the distinction between profile and model based approaches. The other dimension is the distinction between looking for matches to bad behavior or deviations from good. This gives four quadrants, each with unique strengths and weaknesses. For example, the bulk of our sensors are model-based and look for matches to bad behavior; signature based systems are in this category. The advantage is that when a match occurs, you know what has happened; i.e. these systems have high diagnostic resolution. But they also lack robustness; if they don’t have a model of an attack, and there are always novel attacks, then they will fail to detect it. On the other hand, there are a class of detectors that use employ machine learning techniques on labeled training data to build statistical profiles of attacks. These systems tend to be a bit more robust than model based systems, since the machine learning techniques tend to generalize from the data presented. However, they make up for this by a loss of diagnostic resolution. The third quadrant involves building a statistical profile of normal behavior, detecting deviations from the profile. Such anomaly detectors are yet more robust, since they don’t depend on prior knowledge of the form of the attack, but they afford even less diagnostic resolution. When things go wrong, all you know is that something out of the ordinary has happened; whether that something is malicious or not isn’t known. AWDRAT sits in the fourth quadrant: It has a model of normal be4 havior; when the application deviates from the behavior prescribed by that model, it employs diagnostic reasoning techniques [6] to further isolate and characterize the failure. It has both greater robustness and higher diagnostic resolution. But it achieves this only through the construction of a far more complex model. AWDRAT has an active model of normal behavior, namely an executable specification (aka System Architectural Model) of the application [5]. This executable specification consists of a decomposition into sub-modules and pre- and post-conditions for each sub-module. In addition, data-flow and control-flow links connect the sub-modules, specifying the expected flow of values and of control. The pre- and post-conditions are arbitrary first-order statements about the set of data values that flow into and out of the submodules. AWDRAT runs this executable specification in parallel with the actual application code, comparing their results at the granularity and abstraction level of the executable specification. (This is therefore a special case of the standard fault tolerance technique of running multiple versions of the same code and comparing their results.) The executable specification is hierarchical, allowing flexibility in the granularity of the monitoring. When threats are not expected, the executable specification is run at a high level of abstraction, incurring less overhead, but requiring more diagnostic reasoning should the program diverge from the prescribed behavior of the executable specification. In times of heightened threat, the executable specification can be elaborated to a greater degree, incurring more overhead, but providing more containment. Optionally, the model can also include models for suspected incorrect behaviors of a component, allowing the diagnostic reasoning to characterize the way in which a component might have misbehaved. A diagnosis is then a selection of behavioral modes for each component of the specification such that the specification predicts the observed misbehavior of the system. The rest of the paper is organized as follows: in Section 2 we discuss syntax of the System Architectural Model followed by the formalization of semantics of the critical syntactic domains model in Section 3. Section 5 formalizes the semantics of the execution monitor. Finally, we conclude in Section 6. Appendices A and B give the formal syntactic grammar and an example System Architectural Model respectively. 2 Syntax of System Architectural Model An AWDRAT model is built from several related following forms which represent corresponding high-level syntactical domains of the model. Note, we only discuss selected domains here, for complete syntactic domains and their elements, please see Appendix A. 5 1. A description of a component type consists of (a) its interface • a list of inputs • a list of its outputs • a list of the resources it uses (e.g. files it reads, the code in memory that represents this component, etc) • list of subcomponents required for the execution of the subject component • a list of events that represent entry into the component (usually just one) • a list of events that represent exit from the component (usually just one) • a list of events that are allowed to occur during any execution of this component • a set of conditional probabilities between the possible modes of the resources and the possible modes of the whole component • a list of known vulnerabilities occurred to the component (b) and a structural model which is a list of sub-components some of which might be splits or joins of • data-flows between linking ports of the sub-components (outputs of one to inputs of another) • control-flow links between cases of a branch and a component that will be enabled if that branch is taken The description of the component type is represented by syntactical domain “StrMod” which is defined as follows: StrMod ::= define-ensemble CompName :entry-events :auto | (EvntSeq) :exit-events (EvntSeq) :allowable-events (EvntSeq) :inputs (ObjNameSeq) :outputs (ObjNameSeq) :components (CompSeq) :controlflows (CtrlFlowSeq) :splits (SpltCFSeq) :joins (JoinCFSeq) :dataflows (DataFlowSeq) :resources (ResSeq) :resource-mapping (ResMapSeq) 6 :model-mappings (ModMapSeq) :vulnerabilities (VulnrabltySeq) Example 1: The specification of the component maf-editor is given below. In detail, the specification says that the component • is top level component and hence starts automatically and thus requires no entry-event, • requires no inputs • results in the-model as an output • has four subcomponents, i.e. startup, create-model, create-events and save which have corresponding types and also have both normal and compromised behaviors • has control and data flows as described • has an access to two resources, i.e. imagery and code-files which have corresponding probabilities of being in a normal and hacked mode • has model mappings of the above resources to the subcomponents as described in model-mappings and • has two vulnerabilities, i.e. reads-complex-imagery and loads-code for the resources imagery and code-files respectively. (define-ensemble maf-editor :entry-events :auto :inputs () :outputs (the-model) :components ((startup :type maf-startup :models (normal compromised)) (create-model :type maf-create-model :models (normal compromised)) (create-events :type maf-create-events :models (normal compromised)) (save :type maf-save :models (normal compromised))) :controlflows ((before maf-editor before startup) (after startup before create-model)) :dataflows ((the-model create-model the-model create-events) (the-model create-events the-model save) (the-model save the-model maf-save-model)) :resources ((imagery image-file (normal .7) (hacked .3)) (code-files loadable-files (normal .8) (hacked .2))) :resource-mappings ((startup imagery) 7 (create-model code-files) (create-events code-files) (save-model code-files)) :model-mappings ((startup normal ((imagery normal)) .99) (startup compromised ((imagery normal)) .01) (startup normal ((imagery hacked)) .9) (startup compromised ((imagery hacked)) .1) (create-model (create-model (create-model (create-model normal ((code-files normal)) .99) compromised ((code-files normal)) .01) normal ((code-files hacked)) .9) compromised ((code-files hacked)) .1) (create-events normal ((code-files normal)) .99) (create-events compromised ((code-files normal)) .01) (create-events normal ((code-files hacked)) .9) (create-events compromised ((code-files hacked)) .1) (save (save (save (save normal ((code-files normal)) .99) compromised ((code-files normal)) .001) normal ((code-files hacked)) .01) compromised ((code-files hacked)) .999)) :vulnerabilities ((imagery reads-complex-imagery) (code-files loads-code) )) 2. Behavioral specification of a component (a component type may have one normal behavioral specification and many abnormal behavioral specifications, each one representing some failure mode) which has • inputs and outputs • preconditions on the inputs (logical expressions involving one or more of the inputs) • postconditions (logical expressions involving one or more of the outputs and the inputs) • allowable events during the execution in this mode The behavioral specification of a component is represented by a corresponding syntactical domain “BehMod” as follows: BehMod ::= defbehavior-model (CompName normal | compromised) 8 :inputs (ObjNameSeq) :outputs (ObjNameSeq) :allowable-events (EvntSeq) :prerequisites (BehCondSeq) :post-conditions (BehCondSeq) Example 2: In the following first we give the structure of a component maf-create-model (which is one of the submodule as stated in the previous specification example) and then give the behavioral specification of the component. The structure of the component is defined as follows: (define-ensemble maf-create-model :entry-events (create-mission-action-action-performed) :exit-events (mission-builder-submit) :allowable-events (create-mission-builder-with-client-panel create-mission-builder create-mission-builder-with-hash-table mission-builder-submit (set-initial-info exit (the-model nil)) create-mission-action-action-performed retrieve-info create-mission-action-action-performed (set-initial-info entry) ) :inputs () :outputs (the-model)) In the following we define the legal and illegal (compromised) behaviors of the component. For example, the specification of a legal (normal) behavior of the component says that as a normal behavior the component • • • • requires no input as specified by the clause inputs has the-model output and also no prerequisite of the component but guarantees that the object mission-builder of the-model are consistent. The corresponding normal behavior is defined as: (defbehavior-model (maf-create-model normal) :inputs () :outputs (the-model) :prerequisites () 9 :post-conditions ([dscs ?the-model mission-builder good]) ) (defbehavior-model (maf-create-model compromised) :inputs () :outputs (the-model) :prerequisites () :post-conditions ([not [dscs ?the-model mission-builder good]]) ) Similarly, the compromised behavior of the component is also described above. For further details on the behavioral specification of the other components, please see Appendix A. 3. Model of a resource type contains • possible modes • prior probabilities of being in each mode • attack types to which it is vulnerable The syntactical domain “ResModMap” represents the model of a resource type ResModMap ::= ResName normal | hacked FVal | ((ResName normal | hacked)) FVal where “FVal” represents the float values for probabilities. The trust model of the resources is specified in example 1 above by the clauses :resources and :resource-mappings. 4. Attack Model • a list of types of attacks that are being anticipated and the prior probability of each • a list describing how each attack type can effect that mode of a resource • a set of logical rules expressing the conditional probabilities between attack types and resource modes The attack models are presented by the syntactic domain “AtkMod” while the corresponding attack rules are specified by the syntactic domain “AtkRule” as given below respectively: 10 AtkMod ::= define-attack-model AtkModName :attack-types (AtkTypeSeq) :vulnerability-mapping (AtkVulnrabltyMapSeq) AtkRule ::= defrule AtkRulName (:forward) if AtkCondSeq then AtkConsSeq Example 3: The example attack model maf-attacks specifies the two attacks hacked-image-file-attack and hacked-code-file-attack with some probabilities as specified in the following. (define-attack-model maf-attacks :attack-types ( (hacked-image-file-attack .3) (hacked-code-file-attack .5)) :vulnerability-mapping ((reads-complex-imagery hacked-image-file-attack) (loads-code hacked-code-file-attack))) Furthermore, the two attacks are mapped to the corresponding vulnerabilities reads-complex-imagery and loads-code respectively. Additionally, the corresponding one attack rule bad-image-file-takeover says that if we have the contextual resource ?ensemble and type-of-resource is image-file and the resource-might-have-been-attacked with hacked-image-file-attack then it is highly probable (.9) that the resource has been hacked by hacked-image-file-attack as given below: (defrule bad-image-file-takeover (:forward) if [and [resource ?ensemble ?resource-name ?resource] [resource-type-of ?resource image-file] [resource-might-have-been-attacked ?resource hacked-image-file-attack]] then [and [attack-implies-compromised-mode hacked-image-file-attack ?resource hacked .9 ] [attack-implies-compromised-mode hacked-image-file-attack ?resource normal .1 ]]) Further details on the example of the model, please see Appendix B. However, the corresponding syntactic details of the elements of the above syntactic domains are explained in the corresponding subsections of the 11 next section. However, for the general syntax of the domain, please see Appendix A. 3 Semantics of System Architectural Model In this section, we first give the definition of semantic algebras and then discuss informal description and the formal semantics of the core constructs of the System Architectural Model. 3.1 Semantic Algebras The definition of a formal denotational semantics is based on a collection of data structures. Semantic domains represent set of elements that share some common properties. A semantic domain is accompanied by a set of operations as functions over the domain. A domain and its operations together form a semantic algebra [4]. In the following we enlist the semantic domains and their corresponding operations. Some operations are defined and some are just declared for the purpose of completeness of this document. 3.1.1 Truth Values The truth values are represented by the semantic domain “Bool” which is defined as follows: Domain: Bool Operations: • true: Bool • false: Bool • and: Bool × Bool → Bool • or: Bool × Bool → Bool • not: Bool × Bool → Bool 3.1.2 Numeral Values Here we consider typical domains to represent integer and float values (e.g. Q, N). 3.1.3 Environment Values The domain Environment holds the environment values of the System Architectural Model. Environment is formalized as a tuple of domains Context 12 and Space. The domain Context is a mapping of identifiers to the environment values (Variable, Component, Resource, RTEvent and Function), while the domain Space models the memory space. Domain: Environment Environment := Context × Space Context := Identifier → EnvValue EnvValue := Variable + Component + Resource + RTEvent + Function + AtkModel Space := P(Variable) Variable := n, where n ∈ N represents locations Operations: • space: Environment → Space space(<c,s>) = s • context: Environment → Context context(<c,s>) = c • environment: Context × Space → Environment environment(c,s) = <c, s> • take: Space → Identifier × Space take(s) = LET x = SUCH x: x ∈ s IN <x, s\{x}> • push: Environment × Identifier → Environment push(e, I) = LET <x, s’>= take(space(e)) IN environment(context(e)[I 7→ inVariable(x)], s’) • push: Environment × Identifier × Component → Environment push(e, I, c) = LET <x, s’>= take(space(e)) IN environment(context(e)[I 7→ inComponent(c)], s’) • push: Environment × Identifier × AtkModel → Environment push(e, I, m) = LET <x, s’>= take(space(e)) IN environment(context(e)[I 7→ inAtkModel(m)], s’) 13 3.1.4 State Values This section defines the domain for the State of the execution of program. A Store is the most important part of the state and holds for every Variable a Value. The value can be read and modified. The Data of the state is a tuple of a Flag that represents the current status of the state and a Mode to represent the current mode of execution of the state respectively component. Domain: State State := Store × Data Store := Variable → Value Data := Flag × Mode Flag := {running, ready, completed} Mode := {normal, compromised} Operations: • state: Store × Flag → State state(s,f) = <s,f> • store: State → Store store(<s,f>) = s • data: State → Data data(<s,d>) = d • flag: Data → Flag flag(<f,m>) = f • mode: Data → Mode mode(<f,m>) = m • setFlag: State × Flag → State setFlag(s, f) = LET d = <f, mode(data(s))>IN <s, d> • setMode: State × Mode → State setMode(s, m) = LET d = <flag(data(s)), m>IN <s, d> • eqFlag: State × Flag → Bool eqFlag(s, f) = IF equals(flag(data(s)), f) THEN true ELSE false END • eqMode: State × Mode → Bool eqMode(s, m) = IF equals(mode(data(s)), m) THEN true ELSE false END • update: State × Variable × Value → State update(s, var, val) = state(store(s)[var 7→ val], flag(s)) 14 3.1.5 Semantic Values Value is a disjunctive union domain and note that the domain Value is a recursive domain, e.g. List is defined by Value* as discussed in the next section. Domain: Value Value := Event + ObsEvent + RTEvent + Function + Component + Split + Resource + AtkModel + String + List + ... + Value∗ Operations: • equals: Value × Value → Bool 3.1.6 Character String Values Character strings are defined as a semantic domain String. 3.1.7 Lifted Values The evaluation of some semantic domains might result as unsafe. To address these unsafe evaluations we lifted the domains of State and Value to domains State⊥ and Value⊥ , which are disjoint sums of the basic domains and the domain ⊥. In order to capture different kind of events we need different semantic domain to model each of them. The three kind of events are: 1. Registered Events are the events of interest for monitoring. These events are defined by the user at the top of the System Architectural Model by the syntactic domain “RegModSeq” as discussed in Appendix A. AWDRAT register these events for the monitoring purposes. 2. Observed Events are the entry, exit and allowable events as defined by the syntactic domain “Event” of the System Architectural Model. 3. Run Time Events are the runtime events that are generated by the monitor from the target system. These events are also called observations. In the following, we give definitions of the corresponding semantic domains respectively. 3.1.8 (Registered) Event Values The semantics domain Event defines the registered events as a predicate over a sequence of input values, sequence of output values, a pre-state and a corresponding post-state as follows: Event := P(Value∗ × Value∗ × State × State⊥ ) 15 3.1.9 (Observed) Event Values The semantics domain ObsEvent formalizes the observed events of System Architectural Model. An ObsEvent is defined as a predicate over a sequence of input values, a pre-state and a post-state as follows: ObsEvent := P(Value∗ × State × State⊥ ) Note that the observed events do not capture output values because they just work as placeholders for runtime and registered events. 3.1.10 (Runtime) Event Values The runtime events of System Architectural Model are formalized with the help of a semantic domain RTEvent. The semantic domain RTEvent is defined as a predicate over a sequence of input values, sequence of output values, a pre-state, post-state and event data as follows:: RTEvent := P(Value∗ ⊥ × Value∗ × State × State⊥ × EventData) where EventData := Tag × TimeStamp × ProcessID Tag := {entry, exit} TimeStamp := date and time of the event execution ProcessID := operating system process id for the event An EventData captures the type of an event, time of event generation and an operating system level process id for this event. Note, process identification provides more low-level information about the event which is helpful to detect any misbehavior of the event correspondingly component. 3.1.11 Resource Values The semantic domain Resource is one of the complex domains because semantically this domain depends on the runtime behavior of an associated components as well. The semantics domain Resource formalizes different kind of resources used by computational modules of System Architectural Model and is also defined as a predicate over a • map which is further a predicate over – a mode, – its likelihood value being in normal mode, – corresponding likelihood being in hacked mode and – an associated vulnerability, • current mode of the resource, 16 • probability of the resource being in the current mode, • name of the running component associated with the resource, • mode of the running associated component, • a pre-state and a post-state of the program. The predicate Resource is mathematically defined as: Resource := P(ModeMap × Mode × FVal × I × Mode × State × State⊥ ) where Mode := {normal, compromised} ModeMap := P(Mode × Fval × FVal × Vulnerability) 3.1.12 Function Values The semantics domain Function defines and formalizes a specification function of System Architectural Model and can be defined mathematically as: S F unction = n∈N F unctionn where F unctionn = V aluen → V alue 3.1.13 Component Values The semantics domain Component formalizes the model of the components of the target system which are specified by the corresponding behaviors in the System Architectural Model. A Component is defined as a predicate over a structural behavior of the component, a normal behavior of the component, its corresponding compromised behavior, a pre-state and a post-state of the program as follows: Component = P(SBehavior × NBehavior × CBehavior × State × State⊥ ) where SBehavior := P(Value∗ × Value∗ × Value∗ × State × State⊥ ) NBehavior = CBehavior := P(Value∗ × Value∗ × State × State⊥ ) Furthermore, a structural behavior is defined as a predicate over a sequence of input values, sequence of output value, sequence of allowable values (as a consequence of allowable events), a pre-state and a post-state of the behavior. Also, a normal (functional) behavior and corresponding compromised behavior are defined as a predicates NBehavior and CBehavior over a sequence of input values, sequence of output values, a pre-state and a corresponding post-state respectively. Note that the two predicates are the valuation functions of corresponding syntactic domains. 17 3.1.14 Split Values The semantics domain Split formalizes the control flow behavior of a certain unit of a computational module of System Architectural Model and is defined as a predicate over a sequence of parameter values of the split as follows: Split := P(Value∗ ) 3.1.15 Attack Values The semantics domain AtkModel formalizes the attack model and is defined as a predicate over an attack name, probability of the attack and the corresponding vulnerability causing the attack; the attack model is formulated as follows: AtkModel := P(Identifier × FVal × Vulnerability) These values are the result of the valuation function for the corresponding syntactic domain. 3.2 Signatures of Valuation Functions A valuation function defines a mapping of a language’s abstract syntax structures to its corresponding meanings (semantic algebras) [4]. A valuation function VF for a syntax domain VF is usually formalized by a set of equations, one per alternative in the corresponding BNF Register for each syntactic domain of specification expression. We define the result of valuation function as a predicate. In this section we first give the definitions of various relations and functions that are used in the definition of valuation functions. For example the behavioral relation (BehRelation) is defined as a predicate over an environment, a pre-state and a post-state. The corresponding relation is defined as follows: BehRelation := P(Environment × State × State⊥ ) 3.2.1 System Architectural Model The valuation function for the abstract syntax domain system architectural model values of SAM is defined as follows: 〚SAM〛: Environment → BehRelation 3.2.2 Behavioral Models The valuation functions for abstract syntax domains of Register, structural, behavioral and split model values (RuleMod, StrMod, BehMod and SpltMod respectively) are the same and can be defined similarly; however in the following we give only the signature of valuation function for the behavioral model: 18 〚BehMod〛: Environment → BehRelation In the following section we define the auxiliary functions and predicates used in the formal semantics of the specification language (and associated domains). 3.3 Auxiliary Predicates and Functions In the following subsections auxiliary functions and predicates for the use in semantics definition of sequence, binding and special expressions are defined. • monitors ⊂ N × RTEvent × Component × Environment∗ × Environment∗ × State∗ × State∗⊥ monitors(i, 〚rte〛, 〚c〛, e, e’, s, s’) ⇔ ( eqMode(s(i), “running”) ∨ eqMode(s(i), “ready”) ) ∧ 〚c〛(e(i))(e’(i), s(i), s’(i)) ∧ ∃ oe ∈ ObEvent: equals(rte, store(〚name(rte)〛)(e(i))) ∧ IF entryEvent(oe, c) THEN data(c, s(i), s’(i)) ∧ ( preconditions(c, e(i), e’(i), s(i), s’(i), “compromised”) ⇒ equals(s(i+1), s(i)) ∧ equals(s’(i+1), s(i+1)) ∧ setFlag(inState(s’(i+1)), “compromised”) ) ∨ ( preconditions(c, e(i), e’(i), s(i), s’(i), “normal”) ⇒ setMode(s(i), “running”) ∧ LET cseq = components(c) IN equals(s(i+1), s’(i)) ∧ equals(e(i+1), e’(i)) ∧ ∀ c1 ∈ cseq, rte1 ∈ RTEvent: arrives(rte1 , s(i+1)) ∧ monitor(i+1, rte1 , c1 , e(i+1), e’(i+1), s(i+1), s’(i+1)) END ) ELSE IF exitEvent(oe, c) THEN data(c, s(i), s’(i)) ∧ eqMode(inState(s’(i)), “completed”) ∧ postconditions(c, e(i), e’(i), s(i), s’(i), “normal”) ⇒ equals(s(i+1), s’(i)) ∧ equals(e(i+1), e’(i)) ∧ setMode(inState(s’(i+1), “completed”) ELSE IF allowableEvent(oe, c) THEN equals(s(i+1), s’(i)) ∧ equals(e(i+1), e’(i)) ELSE equals(s(i+1), s(i)) ∧ equals(s’(i+1), s(i+1)) ∧ setFlag(inState(s’(i+1)), “compromised”) END The predicate “monitors” captures the core semantics of the monitor which is defined as a relation on – number of observation i with respect to iteration of a component, – an observation (runtime event) rte, 19 – corresponding component c under observation, – a sequence of pre-environments e, – a sequence of post-environments e′ , – a sequence of pre-states s and – a sequence of post-states s′ . The predicate monitors is defined such that, at any arbitrary observation if the current execution state s(i) of component c is “ready” or “running” and behavior of component c has been evaluated and there is a prediction oe which is semantically equal to an observation rte and any of the following can happen: – either the prediction respectively observation is an entry event of the component c, then it waits until the complete data for the component c arrives, if so, then ∗ either preconditions of “normal” behavior of the component hold; if so then, the subnetwork of the component is initiated and the components in the subnetwork are monitored iteratively with the corresponding arrival of the observation ∗ or preconditions of “compromised” behavior of the component hold, in this case the state is marked to “compromised” and returns – or the observation is an exit event and after the completion of data arrival the postconditions hold and the resulting state is marked as “completed” – or the observation is an allowable event and just continues the execution – or the observation is an unexpected event (or any of the above does not hold), then the state is marked as “compromised” and returns. The predicate monitors is used later in the semantics of the Execution Monitor. • entryEvent ⊂ ObEvent × Component: returns true only if the given event is in a set of entry events of the given component. • exitEvent ⊂ ObEvent × Component: returns true only if the given event is in a set of exit events of the given component. • allowableEvent ⊂ ObEvent × Component: returns true only if the given event is in a set of allowable events of the given component. 20 • data ⊂ Component × State × State⊥ : returns true only if all the data for the given component is received by transforming a given pre-state (former) into a corresponding given post-state (latter). • arrives ⊂ RTEvent × State: returns true only if the given runtime event (observation) arrives in a given state. • preconditions ⊂ Component × Environment × Environment × State × State⊥ × Mode returns true only if all the preconditions of the given component hold in a given pair of pre- and post-environments, a pair of pre- and poststates and in a given mode. • postconditions ⊂ Component × Environment × Environment × State × State⊥ × Mode returns true only if all the postconditions of the given component hold in a given pair of pre- and post-environments, a pair of pre- and post-states and in a given mode. • startup ⊂ State × Target System: returns true only if the given state is an initial state of the execution of the given target system. • isTop ⊂ Component × (Environment → BehRelation): returns true only if the given component is a top level component of the given semantics of a System Architectural Model. • enableDiagnosis: Environment → P(State × Value): results in a given recovered state and a boolean value (true, if recovered safely, false otherwise) from a given environment. • respectsOrder ⊂ Identifier Sequence × Identifier Sequence returns true only if the identifiers in the latter sequence has the same order as the identifiers in the former sequence. • buildEnv ⊂ Environment × List* × List* × List* × List* → Environment builds the resulting environment by updating the given environment with given sequences of values of – resources – resource mappings – model mappings and – vulnerabilities respectively. 21 3.4 Definition of Valuation Functions In this section we give the definition of the formal semantics of the interesting syntactic domains (and associated domains) of the specification language, e.g. system architectural model, Register mode, behavioral model and split model. The semantics of other domains of the specification language are very simple and can be easily rehearsed. 3.4.1 System Architectural Model The System Architectural Model is give by the syntactic domain SAM such that • the Register model (syntactic domain RegModSeq) is defined at the top of the System Architectural Model which gives the registered events to be monitored at runtime • followed by – a hierarchical structural behavior (syntactic domain StrModSeq) of components, – a normal respectively compromised behavior (syntactic domain BehModSeq) and – corresponding split behaviors (syntactic domain SplModSeq) occurring in any of the structural behavior of the components. For further details on the syntax of the model, please see Appendix A. Semantically, an overall (system architectural) model holds (true) in a given environment e such that it produces a new environment e′ and a post-state e′ when executed in a pre-state s as defined below. 〚SAM〛(e)(e’, s, s’) ⇔ ∀ e1 , e2 , e3 ∈ Environment, s1 , s2 , s3 ∈ State: 〚RegModSeq〛(e)(e1 , s, inState⊥ (s1 )) ∧ 〚StrModSeq〛(e1 )(e2 , s1 , inState⊥ (s2 )) ∧ 〚BehModSeq〛(e2 ) (e3 , s2 , inState⊥ (s3 )) ∧ 〚SpltModSeq〛(e3 )(e’, s3 , s’) In detail, the semantics of the System Architectural Model SAM holds in a given environment e resulting in an environment e′ by transforming a pre-state s into post-state s′ and • the evaluation of the registered events in a given environment e results in environment e1 transforming a pre-state s into a post-state s1 and in principle – the structural behavior of components hold in environment e1 (with some auxiliary transformations) and 22 – the functional behavior of components hold in environment e2 (with some auxiliary transformations) and finally – the split behavior of components hold in e3 resulting in given environment s′ and transforming a pre-state s3 into a given poststate s′ . In the following, first we define the semantics of unit elements RegMod, StrMod, BehMod and SplModSeq and then define corresponding sequence domains RegModSeq, StrModSeq, BehModSeq and SplModSeq respectively. 3.4.2 Register Model The syntactic domain (RegMod) defines a registered event as follows: RegMod ::= register-event ’EvntName JavClaName JavMetName ’(JavParamSeq) [ :static ObjName ] [ :output-type JavParam ] [ :bypass ObjNameStr ] [ :EvntName ObjName] Though the domain represents language independent event registration, in this document we focus only on the the Java based target system. The syntactic phrase RegMod states that a registered event can be represented by a name (EvntName) whose source is a Java method (JavMetName) with parameters (JavParmSeq) of corresponding class (JavClaName). The other sub-clauses introduce further characterization of the method, e.g. the clause :output-type represents the return type of the method. A monitoring machinery of Architectural Differencer of the middleware AWDRAT is based on these registered events. In the following we define the semantics of a registered event such that the evaluation of a registered event in a given environment e results in an environment e′ transforming a pre-state s into a post-state s′ . 〚RegMod〛(e)(e’, s, s’) ⇔ ∀ ej ∈ JTypeEnvironment, sj , sj ’ ∈ JState: typeCheck(JavClaName)(ej )(sj , s′j ) ∧ equals(s, sj ) ∧ equals(e, ej ) ∧ (∃ p ∈ JProcedure: equals(p(valseq, val), store(sj ’)(〚JavMetName〛(ej ))) ∧ equals(valseq, store(sj ’)(〚JavParamSeq〛(ej ))) ∧ equals(val, store(sj ’)(〚JavParam〛(ej )))) ∧ isStatic(...) ∧ byPass(...) ∧ otherEvents(...) ∧ e’ = push(e, EvntName) ∧ LET ev(valseq, val, s, s’) ∈ Event IN s’ = update(s, 〚EvntName〛(e’), ev) END 23 In detail, semantically, the Java class (JavClaName) is well-defined respectively type checked in an arbitrary environment ej transforming an arbitrary pre-state sj into a corresponding arbitrary post-state sj ’ while ej and sj are semantically equivalent to s and e respectively and • there is some Java procedure p(valseq, val) which we get by evaluating “JavMetName” with given environment ej such that the sequence of input values valseq equals the evaluation of “JavParamSeq” in given environment ej and the return value val of procedure p equals the evaluation of “JavParam” in environment ej and • finally we get e′ by pushing “EvntName” in given environment e and • s′ is produces by updating the value ev for an identifier “EvntName” in the given pre-state s. 3.4.3 Register Model Sequence The syntax of the syntactic domain RegModSeq is defined as follows: RegModSeq := EMPTY | (RegMod) RegModSeq Semantically, when an EMPTY sub-phrase is evaluated in a given environment e then simply the resulting environment e′ equals e and a post-state s′ equals the given pre-state s as defined below: Case: EMPTY 〚EMPTY〛(e)(e’, s, s’) ⇔ e’ = e ∧ s’ = inState⊥ (s) While in the second alternate of the domain “RegModSeq”, first semantics of the phrase “RegMod” in a given environment e produce an environment e′′ transforming a pre-state s into a post-state s′′ , then the evaluation of the phrase “RegModSeq” in environment e′′ results in a given environment e′ and transforms the pre-state s′′ into a given post-state s′ . The semantics of the second alternative is formalized as follows: Case: (RegMod) RegModSeq 〚(RegMod) RegModSeq〛(e)(e’, s, s’) ⇔ ∀ e” ∈ Environment, s” ∈ State: 〚RegMod〛(e)(e”, s, inState⊥ (s”)) ∧ 〚RegModSeq〛(e”)(e’, s”, s’) 3.4.4 Structural Model The structural behavior of the system is defined by the syntactic phrase “StrMod” which represents a corresponding hierarchical model of the components. The syntax for the overall structural behavior of the component 24 “CompName” is defined by the syntactic phrase “StrMod” where different clauses define three logical parts of the behavior as follows: 1. signals specify global control behavior of the component, e.g. • the clauses :entry-events and :exit-events models the entry and exit events of the component respectively and • the other allowable events (while execution of the component) are modeled with the clause :allowable-events 2. signature of the component consists of • the sequences of objects for the clauses :inputs and :outputs respectively 3. body of the component is modeled as a sub-network which involves different components as represented by the :components clause. These components are connected through various nodes and links as follows: (a) the control flows :controlflows which further have corresponding splits :splits and joins :joins and (b) the propagation of data among the components (via control flows) is represented by the clause :dataflows. (c) while the execution of the body, various computing resources :resources (each with a name, its type and its probabilities of being in normal and hacked modes respectively) are involved which further requires (d) the resource mappings :resource-mappings (where each resource is mapped to a component that uses it) in addition to (e) the model mappings :model-mappings (where the conditional probability between the compromises and misbehaviors for each of the component is given) and (f) the vulnerabilities :vulnerabilities such that each resource is mapped to a corresponding (possible) vulnerability (which is assumed to be defined as the part of an attack plan that is beyond the scope of this document). The syntactic domain of for the structural behavioral model (StrMod) is defined as follows: StrMod ::= define-ensemble CompName :entry-events :auto | (EvntSeq1 ) :exit-events (EvntSeq2 ) :allowable-events (EvntSeq3 ) :inputs (ObjNameSeq1 ) 25 :outputs (ObjNameSeq2 ) :components (CompSeq) :controlflows (CtrlFlowSeq) :splits (SpltCFSeq) :joins (JoinCFSeq) :dataflows (DataFlowSeq) :resources (ResSeq) :resource-mapping (ResMapSeq) :model-mappings (ModMapSeq) :vulnerabilities (VulnrabltySeq) The semantics of the structural behavioral model in a given environment e results in an environment e′ transforming a pre-state s into a post-state s′ as defined below: 〚StrMod〛(e)(e’, s, s’) ⇔ ∀ e, e1 , e2 , e3 , e4 , e5 , e6 , e7 , e8 ∈ Environment, s, s1 , s2 , s3 , s4 , s5 , s6 , s7 , s8 ∈ State, oeseq, oeseq1 , aeseq ∈ ObsEvent*, anameseq, enameseq, enameseq1 ∈ EvntNameSeq: ( eqFlag(s, “running”) ∧ 〚EvntSeq3 〛(e)(e1 , s, inState⊥ (s1 ), enameseq, oeseq) ∧ ∀ ename ∈ enameseq: ∃ se ∈ Event, rte ∈ RTEvent, oe ∈ oeseq: IF equals(se, oe) THEN LET rte = store(s1 )(ename) IN IF equals(rte, se) THEN true ELSE s1 = enableDiagnosis(e1 )(s1 , inBool(true)) END END ELSE s1 = enableDiagnosis(e1 )(s1 , inBool(true)) END ) ∨ ( eqFlag(s, “running”) ∨ eqFlag(s, “ready”) ∧ 〚EvntSeq1 〛(e)(e1 , s, inState⊥ (s1 ), enameseq, oeseq) ∧ ∀ ename ∈ enameseq, oe ∈ oeseq: ∃ se ∈ Event, rte ∈ RTEvent: equals(se, store(s1 )(ename)) ∧ equals(se[1], oe[1]) ∧ LET rte = store(s1 )(ename) IN IF equals(rte[5][1], “entry” ) THEN equals(rte[1], se[1]) ELSE equals(rte[2], se[2]) END 26 END ∧ ∀ inseq ∈ Value∗ , c ∈ Component: 〚ObjNameSeq1 〛(e1 )(inState⊥ (s1 ), inseq) ∧ 〚CompName〛(e1 )(inValue(c)) ∧ IF equals(c[2][1], inseq) THEN eqMode(s1 , “normal”) ELSE s1 = enableDiagnosis(e1 )(s1 , inBool(true)) END ∧ IF equals(c[3][1], inseq) THEN eqMode(s1 , “compromised”) ∧ s1 = enableDiagnosis(e1 )(s1 , inBool(true)) ELSE true END ) ⇒ eqFlag(s1 , “running”) ∧ ∀ compseq ∈ Component∗ : 〚CompSeq〛(e2 )(e3 , s2 , inState⊥ (s3 ), compseq) ∧ ∀ rmseq, crmapseq, cpmapseq, vbltyseq ∈ List∗ : 〚ResSeq〛(e3 )(s3 , inState⊥ (s4 ), rmseq) ∧ 〚ResMapSeq〛(e3 )(s3 , inState⊥ (s4 ), crmapseq) ∧ 〚ModMapSeq〛(e3 )(s3 , inState⊥ (s4 ), cpmapseq) ∧ 〚VulnrabltySeq〛(e3 )(s3 , inState⊥ (s4 ), vbltyseq) ∧ e4 = buildEnv(e3 , rmseq, crmapseq, cpmapseq, vbltyseq) ∧ 〚CtrlFlowSeq〛(e4 )(e5 , s4 , inState⊥ (s5 )) ∧ 〚SpltCFSeq〛(e5 )(e6 , s5 , inState⊥ (s6 )) ∧ 〚JoinCFSeq〛(e6 )(e7 , s6 , inState⊥ (s7 )) ∧ 〚DataFlowSeq〛(e7 )(e8 , s7 , inState⊥ (s8 )) ∧ 〚EvntSeq2 〛(e8 )(e9 , s8 , s’, enameseq1 , oeseq1 ) ∧ ∀ ename ∈ enameseq, oe ∈ oeseq: ∃ se ∈ Event, rte ∈ RTEvent: equals(se, store(inState(s’))(ename)) ∧ equals(se[1], oe[1]) ∧ LET rte = store(inState(s’))(ename) IN IF equals(rte[5][1], “entry” ) THEN equals(rte[1], se[1]) ELSE equals(rte[2], se[2]) END END ⇒ ∀ outseq ∈ Value∗ , c ∈ Component: 〚ObjNameSeq2 〛(e9 )(s’, outseq) ∧ 〚CompName〛(e9 )(inValue(c)) ∧ ( ( IF equals(c[2][2], outseq) THEN eqMode(inState(s’), “normal”) ELSE s’ = enableDiagnosis(e9 )(inState(s’), inBool(true)) END ) ∨ ( IF equals(c[3][2], outseq) THEN eqMode(inState(s’), “compromised”) ∧ 27 s’ = enableDiagnosis(e9 )(inState(s’), inBool(true)) END ) ) ∧ eqMode(inState(s’), “normal”) ∧ eqFlag(inState(s’), “completed”) ∧ LET sbeh = <inseq, outseq, s, s’>, nbeh = c[2], cbeh = c[3] IN e’ = push(e9 , store(inState(s’))(〚CompName〛(e9 )) , c(sbeh, nbeh, cbeh, s, s’)) END In general, the semantics is defined as a big logical implication, where the premise is a disjunction of two formulas as explained below: 1. either the current state s of the component is “running” and it receives allowable events “EvntSeq3 ” and for every event oe in the allowable event sequence oeseq there is a corresponding equivalent registered event se for which we receive an equivalent runtime event rte such that rte is one of the under observation (legal) event se, if not then the runtime event is a result of the misbehavior of the component so the diagnosis component of AWDRAT is activated by calling “enableDiagnosis(...)” which successfully recovers the compromised state s1 2. or the current state s of the component is either “running” or “ready” and it receives the entry events “EvntSeq1 ” (evaluating to oeseq) and for every event oe in the sequence of entry events oeseq there is a corresponding registered event se and the received runtime event rte (equals se depending on its type “entry” or “exit”) is the monitored event and • if the sequence of input values inseq satisfies the pre-conditions of the “normal” behavior (c[2][1])) of the component (c) then the resulting state s1 is in “normal” mode • otherwise (when pre-conditions are not satisfied) then the diagnosis component is activated which recovers the compromised state s1 and • if the sequence of input values inseq satisfies the pre-conditions of the already “compromised” behavior (c[3][1]) of the component (c) then the resulting state s1 is “compromised” state and we restore it by enabling diagnostic engine • otherwise the system is safe true to start executing component respectively body/sub-network. Semantically, if any of the above two holds then the • the current state s1 is “running” and the components of the subnetwork evaluate to compseq and 28 • a new environment e4 is constructed based on the evaluation of the resources, resource mappings, model mappings and vulnerabilities of the sub-network to rmseq, crmapseq, cpmapseq, and vbltyseq respectively (such that all the trust model of the components is known before the actual execution of the body starts) in which • the execution blocks are evaluated (such that the evaluation of the control flows their respective splits and joins and associated data flows results in an environment e8 and a post-state s8 ) to complete the executional behavior and • once all the sub-network is executed (recursively), then the receiving exit events (EvntSeq2 ) evaluate to oeseq1 and if for every event oe in oeseq1 there is an equivalent registered event se and a runtime event rte then – either the sequence of output values outseq satisfies the postconditions of the “normal” behavior (c[2][2]) of the component (c) then the post-state s′ is in “normal” mode otherwise the diagnosis component restores the post-state s′ and – or the sequence of output values outseq satisfies the post-conditions of the misbehavior (c[3][2]) of the component (c) then the poststate must be in “compromised” mode and corresponding diagnosis component is enabled to recover the state back and • the given and transformed final post-state s′ must be in “normal” mode with “completed” flag and • finally the resulting environment e′ is build with the evaluated behavior of the component of the current component. 3.4.5 Structural Model Sequence The syntactic domain StrModSeq is: StrModSeq := EMPTY | (StrMod) StrModSeq Case: EMPTY 〚EMPTY〛(e)(e’, s, s’) ⇔ e’ = e ∧ s’ = inState⊥ (s) Case: (StrMod) StrModSeq 〚(StrMod) StrModSeq〛(e)(e’, s, s’) ⇔ ∀ e” ∈ Environment, s” ∈ State: 〚StrMod〛(e)(e”, s, inState⊥ (s”)) ∧ 〚StrModSeq〛(e”)(e’, s”, s’) 29 The semantics of the domain “StrModSeq” of structural model sequence are similar to the semantics of the domain “RegModSeq” as discussed above in the corresponding section. Similarly, the semantics of the syntactic domains of “BehModSeq” and “SplModSeq” can be exercised which are discussed in the corresponding sections later in this document. 3.4.6 Behavioral Model The behavioral model represents the functional behavior of a component, which can be either “normal” or known “compromised” one. The functional behavior of the component “CompName” consists of the following elements: 1. the inputs of the component as given by the clause :inputs, 2. the outputs of the component as represented by the corresponding clause :outputs, 3. the allowable events :allowable-events represents the auxiliary communication of the component, 4. the pre-conditions of the component are specified in the clause :prerequisites while 5. the corresponding post-conditions are specified by the :postconditions clause. Note that the “compromised” behavior is used to model already known misbehaviors of the component (e.g. some attack) and needs corresponding diagnosis which in this case is already known. The syntactic domain “BehMod” for the behavioral model is defined as follows: BehMod ::= defbehavior-model (CompName normal | compromised) :inputs (ObjNameSeq1 ) :outputs (ObjNameSeq2 ) :allowable-events (EvntSeq) :prerequisites (BehCondSeq1 ) :postconditions (BehCondSeq2 ) Semantically, normal and compromised behavioral models results in modifying the corresponding elements of the environment value “Component” as defined below: 〚BehMod〛(e)(e’, s, s’) ⇔ ∀ e1 ∈ Environment, nseq ∈ EvntNameSeq, eseq ∈ ObsEvent*, inseq, outseq ∈ Value∗ : 〚ObjNameSeq1 〛(e)(inState⊥ (s), inseq) ∧ 〚BehCondSeq1 〛(e) (inState⊥ (s)) ∧ 〚EvntSeq〛(e) (e1 , s, s’, nseq, eseq) 30 〚ObjNameSeq2 〛(e1 )(s’, outseq) ∧ 〚BehCondSeq2 〛(e1 ) (s’) ∧ ∃ c ∈ Component: 〚CompName〛(e1 )(inValue(c)) ∧ IF eqMode(inState⊥ (s’), “normal”) THEN LET sbeh = c[1], nbeh = <inseq, outseq, s, s’>, cbeh = c[3] IN e’ = push(e1 , store(inState(s’))(〚CompName〛(e1 )) , c(sbeh, nbeh, cbeh, s, s’)) END ELSE LET sbeh = c[1], nbeh = c[2], cbeh = <inseq, outseq, s, s’> IN e’ = push(e1 , store(inState(s’))(〚CompName〛(e1 )) , c(sbeh, nbeh, cbeh, s, s’)) END END In detail, if the semantics of of syntactic domain “BehMod” holds in a given environment e resulting in environment e′ and transforming a pre-state s into corresponding post-state s′ then • the inputs “ObjNameSeq1 ” evaluates to a sequence of values inseq in a given environment e and a given state s which satisfies the corresponding pre-conditions “BehCondSeq1 ” in the same e and s and • the allowable events happens whose evaluation results in new environment e1 and given post-state s′ with some auxiliary sequences nseq and eseq and • the outputs “ObjNameSeq2 ” evaluates to a sequence of values outseq in an environment e1 and given post-state s′ which satisfies the corresponding post-conditions “BehCondSeq2 ” in the same environment e1 and state s′ and the given environment e′ can be constructed such that – if the post-state is “normal” then e′ is an update to the normal behavior “nbeh” of the component “CompName” in environment e1 – otherwise e′ is an update to the compromised behavior “cbeh” of the component. In the construction of the environment e′ the rest of the semantics of the component do not change as represented in the corresponding LET-IN constructs. 3.4.7 Behavioral Model Sequence The syntactic domain BehModSeq is: BehModSeq := EMPTY | (BehMod) BehModSeq 31 Case: EMPTY 〚EMPTY〛(e)(e’, s, s’) ⇔ e’ = e ∧ s’ = inState⊥ (s) Case: (BehMod) BehModSeq 〚(BehMod) BehModSeq〛(e)(e’, s, s’) ⇔ ∀ e” ∈ Environment, s” ∈ State: 〚BehMod〛(e)(e”, s, inState⊥ (s”)) ∧ 〚BehModSeq〛(e”)(e’, s”, s’) 3.4.8 Split Model Though the splits of control flows are declared in the “StrBeh” domain but their corresponding definitions are given with the help of the domain “SplMod” which consists of its • name “SpltModName”, • required sequence of parameters “SpltParamSeq” which are used by the various branches of the split as defined in • the split condition branches “SpltCondSeq”. The syntax of the domain “SplMod” is given as follow: SplMod ::= defsplit SpltModName? (SpltParamSeq) SpltCondSeq) If the semantics of the split model “SplMod” in a given environment e results in environment e′ and transforms a pre-state s into post-state s′ then • first the parameters are evaluated in a given environment e which results in an environment e1 and sequence of values vseq transforming a given pre-state s into post-state s1 and • the split conditions “SpltCondSeq” hold in environment e1 producing environment e2 and given post-state s′ and finally • given environment e′ is a result of a push operation on environment e2 updating the value of the split “SpltModName” with the one constructed by the computed values vseq. The semantics of the split behavior is formalized as follows: 〚SplMod〛(e)(e’, s, s’) ⇔ ∀ e1 , e2 ∈ Environment, s1 ∈ State, vseq ∈ Value∗ : 〚SpltParamSeq〛(e)(e1 , s, inState⊥ (s1 ), vseq) ∧ 〚SpltCondSeq〛(e1 ) (e2 , s1 , s’) ∧ LET s ∈ Split IN e’ = push(e2 , store(inState(s’))(〚SpltModName〛(e2 )), s(vseq)) END 32 3.4.9 Split Model Sequence The syntactic domain SplModSeq is: SplModSeq := EMPTY | (SplMod) SplModSeq Case: EMPTY 〚EMPTY〛(e)(e’, s, s’) ⇔ e’ = e ∧ s’ = inState⊥ (s) Case: (SplMod) SplModSeq 〚(SplMod) SplModSeq〛(e)(e’, s, s’) ⇔ ∀ e” ∈ Environment, s” ∈ State: 〚SplMod〛(e)(e”, s, inState⊥ (s”)) ∧ 〚SplModSeq〛(e”)(e’, s”, s’) 3.4.10 Attack Model The attack model represents the different types of known/hypothetical attack, their corresponding probabilities and the respective vulnerabilities causing the attack types. The attack model “AtkModName” has: 1. types of attack and their conditional probabilities as specified by the clause :attack-types and 2. mapping between the types of attack and vulnerabilities as described by the corresponding clause :vulnerability-mapping. Additionally, the attack model is extended by the rules which map conditional probabilities of the attacks and vulnerabilities. The attack rule “AtkRulName” has 1. a sequence of attack conditions which describe the attack situation as specified by the clause if 2. and the attack consequences which map the probabilities of attacks and vulnerabilities; the maps are represented by the clause then. Note that the attack models can be used in the following ways: • the models are already known attacks and thus already know the corresponding diagnosis • or the models can be hypothetical attacks which can be used to generate rigorous monitors for the system. The syntactic domain “AtkMod” for the attack model is defined as follows: 33 AtkMod ::= define-attack-model AtkModName :attack-types (AtkTypeSeq) :vulnerability-mapping (AtkVulnrabltyMapSeq) While the syntactic domain “AtkRule” for defining attack rules is defined as follows: AtkRule ::= defrule AtkRulName (:forward) if AtkCondSeq then AtkConsSeq Semantically, an attack model results in the environment value “AtkModel” as defined below: 〚AtkMod〛(e)(e’, s, s’) ⇔ ∀ s” ∈ State, aseq, aseq’, vnseq ∈ ISeq, apseq ∈ Value∗ : 〚AtkTypeSeq〛(e)(s, inState⊥ (s”), aseq, apseq) ∧ 〚AtkVulnrabltyMapSeq〛(e) (s”, s’, aseq’, vnseq) ∧ respectsOrder(aseq, aseq’) ∧ LET amod ∈ AtkModel IN e’ = push(e, store(inState(s’))(〚AtkModName〛(e)), amod(aseq, apseq, vnseq))) END In detail, the semantics of the syntactic domain “AtkMod” updates the environment e with a attack semantic value amod such that • in a given environment e and state s, the evaluation of “AtkTypeSeq” results in a post-state s′′ , a sequence of attack types aseq and a sequence of values (conditional probabilities) apseq and • in a given environment e and state s, the evaluation of “AtkVulnrabltyMapSeq” results in post-state s′ , a sequence of attack types aseq ′ and a sequence of vulnerabilities vnseq and • the environment e′ is an update of environment e with the semantic value amod which is a triple of 1. a sequence of attack types, 2. a sequence of corresponding probabilities and 3. a sequence of vulnerabilities causing the attack types, respectively. However, if the semantics of the syntactic domain “AtkRule” holds in an environment e, then • there is some resource r such that (as given in “AtkCondSeq” respective “AtkCond”) 1. the resource name is “?resource-name” and 34 2. the resource type is “ResType” and 3. if the resource has been compromised by an attack “AtkTypeName”, then • the resource r (and its associated component c) has behavior as specified by the evaluation of consequences “AtkCodSeq” in an environment e and state s. Formally, the semantics of the syntactic domain “AtkRule” is defined as: 〚AtkRule〛(e)(e’, s, s’) ⇔ ∃ r ∈ Resource, c ∈ Component: 〚AtkCondSeq〛(e)(s, s’, r, c) ∧ 〚AtkConsSeq〛(e) (s, s’, r, c) ∧ e’ = e 3.4.11 Attack Model Sequence The syntactic domain AtkModSeq is: AtkModSeq := EMPTY | (AtkMod) AtkModSeq Case: EMPTY 〚EMPTY〛(e)(e’, s, s’) ⇔ e’ = e ∧ s’ = inState⊥ (s) Case: (AtkMod) AtkModSeq 〚(AtkMod) AtkModSeq〛(e)(e’, s, s’) ⇔ ∀ e” ∈ Environment, s” ∈ State: 〚AtkMod〛(e)(e”, s, inState⊥ (s”)) ∧ 〚AtkModSeq〛(e”)(e’, s”, s’) 4 Execution Monitor In principle, Architectural Differencer synthesizes both the wrappers and the execution monitor where the wrappers traces the execution of the target system by creating an event stream (these traces are also called observations); while the role of an execution monitor is to interpret the stream against the system (Architectural Model) specification (the execution of the specification is also called predictions) by detecting inconsistencies between observations and the predictions, if there are any. We have already discussed the formal syntax and semantics of the predictions in the previous sections, now we first give the formal syntax of the observations in this section and the corresponding formal semantics in the following section. 35 4.1 Observation Model Each runtime event (observation) consists of • a name “EvntName”, • its type, i.e. entry or exit, • depending on the type of event – either sequence of event parameters (if entry event) – or a parameter representing return value of the event (if exit event) • a numeric value “Numeral” representing an operating system level process id, which can be used later to get more information about the event to detect any system level threats and other technical dependencies and • a time “TimeStamp” of the event which later can be used to detect inconsistencies in the sequence of events. The syntax of the runtime event is defined by the syntactic domain “Obsrv” as follow: Obsrv := EvntName entry | exit EvntParamSeq Numeral TimeStamp If the semantics of an observation “Obsrv” in a given environment e results in environment e′ and transforms a pre-state s into post-state s′ then • first the parameters are evaluated in a given environment e which results in an environment e1 and sequence of values pseq transforming a given pre-state s into post-state s1 and • evaluation of the numeric value “Numeral” results in a value n in environment e1 and state s1 and • also time stamp “TimeStamp” evaluates to a value t in environment e1 and state s1 and finally – if the observation is “entry” event the resulting environment e′ is a result of a push operation on environment e2 updating the value of the observation “EvntName” with the semantic value of the observation, i.e. of type “RTEvent” which is constructed with the help of computed input values pseq, process id n and time value t and 36 – if the observation is “exit” event the resulting environment e′ is a result of a push operation on environment e2 updating the value of the observation “EvntName” with the semantic value of the observation, i.e. of type “RTEvent” which is constructed with the help of computed output values pseq (sequence with a single value), process id n and time value t. The semantics of the observation is formalized as follows: 〚Obsrv〛(e)(e’, s, s’) ⇔ ∀ e1 , e2 ∈ Environment, s1 ∈ State, pseq ∈ Value∗ , n, t ∈ Value: 〚EvntParamSeq〛(e)(e1 , s, inState⊥ (s’), pseq) ∧ 〚Numeral〛(e1 ) (inState(s’), n) ∧ 〚TimeStamp〛(e1 ) (inState(s’), t) ∧ LET rte ∈ RTEvent IN IF isEntry(Obsrv) THEN e’ = push(e2 , store(inState(s’))(〚EvntName〛(e2 )) , rte(pseq, EMPTY, s, s’, <“entry”, t, n>)) ELSE e’ = push(e2 , store(inState(s’))(〚EvntName〛(e2 )) , rte(EMPTY, pseq, s, s’, <“exit”, t, n>)) END END 4.1.1 Observations The event respectively observation stream is a sequence of observations, which is modeled by corresponding syntactic domain ObsrvSeq as follows: ObsrvSeq := EMPTY | (Obsrv) ObsrvSeq The semantics of the observation sequence are similar to the other syntactic sequences discussed earlier in this document. Case: EMPTY 〚EMPTY〛(e)(e’, s, s’) ⇔ e’ = e ∧ s’ = inState⊥ (s) Case: (Obsrv) ObsrvSeq 〚(Obsrv) ObsrvSeq〛(e)(e’, s, s’) ⇔ ∀ e” ∈ Environment, s” ∈ State: 〚Obsrv〛(e)(e”, s, inState⊥ (s”)) ∧ 〚ObsrvSeq〛(e”)(e’, s”, s’) 5 Semantics of the Execution Monitor Though the technical details of the operation of the execution monitor are discussed in [5], in the following we give their informal semantics. 37 We presume that a reasonable fine grained level behavior of the target system is specified in the corresponding System Architectural Model. When the target system starts execution, an initial “startup” event is generated and dispatched to the top level component (module) of the system which transforms the execution state of the component into “running” mode. The component instantiates its subnetwork (of components, if there is one) and also propagates the data along its data links by enabling the corresponding control links (if involved). When the data arrives on the input port of the component, the execution monitor checks if it is complete; if so, the execution monitor checks the preconditions of the component for the data and if they succeed, it transform the state of the component into “ready” mode. In case, any of the preconditions fails, it enables diagnosis engine. After the above startup of the target system, the execution monitor starts monitoring the arrival of every observation (runtime event) as follows: 1. If the event is a “method entry”, then the execution monitor checks if this is one of the “entry events” of the corresponding component in the “ready” state; if so, then after receiving the data and the respective preconditions are checked; if they succeed, then the data is applied on the input port of the component and the mode of the execution state is changed to “running”. 2. If the event is a “method exit”, then the execution monitor checks if this one of the “exit events” of the component in the “running” state; if so, it changes its state into “completed” mode and collects the data from the output port of the component and checks for the corresponding postconditions. Should the checks fail, the execution monitor enables the diagnosis engine. 3. If the event is one of the “allowable events” of the component, it continues execution and finally 4. if the event is an unexpected event, i.e. it is neither an “entry event”, nor an “exit event” and also not in “allowable events”, then the execution monitor starts diagnosis. Based on the above behavioral description of the execution monitor, we have formalized the corresponding semantics of the execution monitor as follows: ∀ app ∈ Target System, sam ∈ System Architectural Model, c ∈ Component, s, s’ ∈ State, t, t’ ∈ States , d, d’ ∈ Environments , e, e’ ∈ Environment, rte ∈ RTEvent: 〚sam〛(d)(d’, t, t’) ∧ 〚app〛(e)(e’, s, s’) ∧ startup(s, app) ∧ isTop(c, 〚app〛(e)(e’, s, s’)) ∧ setMode(s, “running”) ∧ arrives(rte, s) ∧ equals(t, s) ∧ equals(d, e) ⇒ ∀ p, p’ ∈ Environment∗ , m, n ∈ State∗⊥ : 38 equals(m(0), s) ∧ equals(p(0), e) ⇒ ∃ k ∈ N, p, p’ ∈ Environment∗ , m, n ∈ State∗⊥ : ∀ i ∈ Nk : monitors(i, rte, c, p, p’, m, n) ∧ ( eqMode(n(k), “completed”) ∧ eqFlag(n(k), “normal”) ∧ equals(s’, n(k)) ∨ eqFlag(n(k), “compromised”) ⇒ enableDiagnosis(p’(k))(n(k), inBool(true)) ∧ equals(s’, n(k)) ) In detail, given a target system “app” and its specification“sam” and their semantices are defined such that their corresponding pre-states are equivalent. Furthermore, if the application starts “startup(...)”, and an arbitrary c is a top-level component “isTop(...)”, then the current state of the component is marked as “running” and when an observation “rte” arrives in this state, then the monitor starts monitoring the event stream/sequence and thus, here, we have formalized the corresponding semantics of the monitor by the two sequences of pre- and post-states [3] and their respective sequences of the pre- and post-environments. Both the former and later sequences are constructed from their corresponding pre- and post objects. The arrival and monitoring of the ith observation (event) transforms state pre(i) into state post(i + 1) from which the state pre(i + 1) is constructed and the same repeats for the construction of the corresponding environments. No event can be accepted in an Error state and the corresponding monitoring terminates either when the application has terminated with “normal” mode or when there is some misbehavior is detected as indicated by the respective “compromised” state. This semantics is formalized with the help of predicate “monitor”, for details please see Subsection 3.3. Finally, when there are sequences of states and environments for which the predicate “monitor” holds, then either the given post-state s′ is equal to the “monitor”ed post-state “n(k)” which is in “completed” mode and has a “normal” flag or post-state “n(k)” is “compromised” and in this case diagnosis is enabled which successfully transforms the compromised state into a normal state which results in the given post-state s′ . 6 Conclusions and Future Work In this report, we gave the formal definition of the syntax and semantices of the System Architectural Model and the Execution Monitor of AWDRAT. These definitions help to understand internal behavior of the corresponding components on one hand, and also serves as a formal basis for ADWRAT to extend the current system on the other hand. Based on this formalism, we 39 are currently working on the formal reliability (soundness) analysis of the Execution Monitor of AWDRAT. In future, we plan to extend AWDRAT such that a target system behavior is specified using Abstract State Machine (ASM) [1] based formalism which then will automatically translate into a semantically equivalent System Architectural Model. This will allow to already check the inconsistencies in the system behavior with existing ASM supported tools [2]. Acknowledgment The authors cordially thank Adam Chilpala for his valuable and constructive remarks and suggestions. 40 References [1] E. Borger and Robert F. Stark. Abstract State Machines: A Method for High-Level System Design and Analysis. Springer-Verlag New York, Inc., Secaucus, NJ, USA, 2003. [2] Jean-Baptiste Jeannin, Guido de Caso, Juan Chen, Yuri Gurevich, Prasad Naldurg, and Nikhil Swamy. Dkal*: Constructing executable specifications of authorization protocols. Technical Report MSR-TR2013-19, March 2013. [3] Muhammad Taimoor Khan. On the Formal Semantics of MiniMaple and Its Specification Language. In Proceedings of the 2012 10th International Conference on Frontiers of Information Technology, FIT ’12, pages 169– 174, Washington, DC, USA, 2012. IEEE Computer Society. [4] Schmidt, David A. Denotational Semantics: a methodology for language development. William C. Brown Publishers, Dubuque, IA, USA, 1986. [5] Howard Shrobe, Robert Laddaga, Bob Balzer, Neil Goldman, Dave Wile, Marcelo Tallis, Tim Hollebeek, and Alexander Egyed. AWDRAT: A Cognitive Middleware System for Information Survivability’. In Proceedings of the 18th Conference on Innovative Applications of Artificial Intelligence - Volume 2, IAAI’06, pages 1836–1843. AAAI Press, 2006. [6] Shrobe, Howard E. Dependency Directed Reasoning for Complex Program Understanding. Technical report, 1979. 41 Appendices Appendix A gives the formal abstract syntax (language grammar) for the specification language “system architectural model” of AWDRAT. A A.1 Formal Syntax of System Architectural Model Declaration of Syntactic Domains /* top level syntactic domains */ SAM ∈ System Architectural Model RegModSeq ∈ Register Model Sequence StrModSeq ∈ Structural Model Sequence BehModSeq ∈ Behavioral Model Sequence SplModSeq ∈ Split Model Sequence AtkModSeq ∈ Attack Model Sequence AtkRuleSeq ∈ Attack Rule Sequence /* top level syntactic sub-domains */ RegMod ∈ Register Model StrMod ∈ Structural Model BehMod ∈ Behavioral Model SplMod ∈ Split Model AtkMod ∈ Attack Model AtkRule ∈ Attack Rule /* event related syntactic domains */ Evnt ∈ Event EvntSeq ∈ Event Sequence EvntName ∈ Event Name EvntNameSeq ∈ Event Name Sequence EvntParamSeq ∈ Event Parameter Sequence /* java related syntactic domains */ JavClaName ∈ Java Class Name JavMetName ∈ Java Method Name JavParam ∈ Java Parameter JavParamSeq ∈ Java Parameter Sequence JavParamName ∈ Java Parameter Name JavParamType ∈ Java Parameter Type /* object related syntactic domains */ ObjName ∈ Object Name ObjtNameStr ∈ Object Name String ObjNameSeq ∈ Object Name Sequence 42 ObjType ∈ Object Type ObjComp ∈ Object Component ObjCompSeq ∈ Object Component Sequence /* behavioral condition, parameter and situation related syntactic domains */ BehCond ∈ Behavioral Condition BehCondSeq ∈ Behavioral Condition Sequence BehCondMode ∈ Behavioral Condition Mode BehParam ∈ Behavioral Parameter BehParamSeq ∈ Behavioral Parameter Sequence BehSit ∈ Behavioral Situation /* branch related syntactic domains */ BrnchName ∈ Branch Name BrnchNameSeq ∈ Branch Name Sequence BrnchCond ∈ Branch Condition /* component related syntactic domains */ Comp ∈ Component CompSeq ∈ Component Sequence CompName ∈ Component Name CompType ∈ Component Type /* control flow related syntactic domains */ CtrlFlow ∈ Control Flow CtrlFlowSeq ∈ Control Flow Sequence /* function related syntactic domains */ FuncName ∈ Function Name FuncParam ∈ Function Parameter FuncParamSeq ∈ Function Parameter Sequence /* split related syntactic domains */ SpltCF ∈ Split SpltCFSeq ∈ Split Sequence SpltName ∈ Split Name SpltModName ∈ Split Model Name SpltParamSeq ∈ Split Parameter Sequence SpltCond ∈ Split Condition SpltCondSeq ∈ Split Condition Sequence /* join related syntactic domains */ JoinCF ∈ Join JoinCFSeq ∈ Join Sequence JoinName ∈ Join Name 43 JoinParamSeq ∈ Join Parameter Sequence /* data flow related syntactic domains */ DataFlow ∈ Data Flow DataFlowSeq ∈ Data Flow Sequence /* resource related syntactic domains */ Res ∈ Resource ResSeq ∈ Resource Sequence ResName ∈ Resource Name ResType ∈ Resource Type ResMap ∈ Resource Mapping ResMapSeq ∈ Resource Mapping Sequence ResModMap ∈ Resource Model Mapping /* model mapping syntactic domains */ ModMap ∈ Model Mapping ModMapSeq ∈ Model Mapping Sequence /* vulnerability related syntactic domains */ Vulnrablty ∈ Vulnerability VulnrabltyName ∈ Vulnerability Name VulnrabltySeq ∈ Vulnerability Sequence /* attack related syntactic domains */ AtkType ∈ Attack Type AtkTypeSeq ∈ Attack Type Sequence AtkModName ∈ Attack Model Name AtkCond ∈ Attack Condition AtkCondSeq ∈ Attack Condition Sequence AtkCons ∈ Attack Consequence AtkConsSeq ∈ Attack Consequence Sequence AtkTypeName ∈ Attack Type Name AtkRulName ∈ Attack Rule Name AtkVulnrabltyMap ∈ Attack Vulnerability Mapping AtkVulnrabltyMapSeq ∈ Attack Vulnerability Mapping Sequence /* other syntactic domains */ MembName ∈ Member Name ParamName ∈ Parameter Name DSCond ∈ Data Structure Condition ISeq ∈ Identifier Sequence 44 A.2 Grammar Based on the declarations of various syntactic domains, in this section we discuss the grammar rules for the domains. /* top level syntactic domains */ SAM ::= RegModSeq StrModSeq BehModSeq SplModSeq RegModSeq ::= EMPTY | (RegMod) RegModSeq StrModSeq ::= EMPTY | (StrMod) StrModSeq BehModSeq ::= EMPTY | (BehMod) BehModSeq SplModSeq ::= EMPTY | (SplMod) SplModSeq AtkModSeq ::= EMPTY | (AtkMod) AtkModSeq AtkRuleSeq ::= EMPTY | (AtkRule) AtkRuleSeq /* top level syntactic sub-domains */ RegMod ::= register-event ’EvntName JavClaName JavMetName ’(JavParamSeq) [ :static ObjName ] [ :output-type JavParam ] [ :bypass ObjNameStr ] [ :EvntName ObjName] StrMod ::= define-ensemble CompName :entry-events :auto | (EvntSeq) :exit-events (EvntSeq) :allowable-events (EvntSeq) :inputs (ObjNameSeq) :outputs (ObjNameSeq) :components (CompSeq) :controlflows (CtrlFlowSeq) :splits (SpltCFSeq) :joins (JoinCFSeq) :dataflows (DataFlowSeq) :resources (ResSeq) :resource-mapping (ResMapSeq) :model-mappings (ModMapSeq) :vulnerabilities (VulnrabltySeq) BehMod ::= defbehavior-model (CompName normal | compromised) :inputs (ObjNameSeq) :outputs (ObjNameSeq) :allowable-events (EvntSeq) 45 :prerequisites (BehCondSeq) :postconditions (BehCondSeq) SplMod ::= defsplit SpltModName? (SpltParamSeq) SpltCondSeq) AtkMod ::= define-attack-model AtkModName :attack-types (AtkTypeSeq) :vulnerability-mapping (AtkVulnrabltyMapSeq) AtkRule ::= defrule AtkRulName (:forward) if AtkCondSeq then AtkConsSeq /* event related syntactic domains */ Evnt ::= EvntName | (EvntName [entry | exit] (EvntParamSeq)) EvntSeq ::= EMPTY | Evnt EvntSeq EvntParam ::= I Iseq | nil I Iseq | I ISeq nil EvntParamSeq ::= EMPTY | EvntParam EvntParamSeq /* java related syntactic domains */ JavClaName ::= ”I” JavMetName ::= ”ID” | ”<I>“ JavParam ::= (JavParamType JavParamName) JavParamSeq ::= EMPTY | JavParam JavaParamSeq JavParamName ::= ”I“ JavParamType ::= ”ID“ | ”ID[]” /* object related syntactic domains */ ObjComp ::= (ObjName CompName?) ObjCompSeq ::= EMPTY | ObjComp ObjCompSeq ObjNameStr ::= ObjName | ”ObjName“ /* behavioral condition related syntactic domains */ BehCond ::= [ DSCond ObjName ObjType BehCondMode ] | [ and BehCond ] | [ or BehCond ] | [ not BehCond ] | [ SpecFuncName BehParamSeq BehSit ] BehCondSeq ::= EMPTY | BehCond BehCondSeq BehCondMode ::= EMPTY | good BehParam ::= ?ObjName | (MembName ?ObjName) 46 BehParamSeq ::= EMPTY | BehParam BehParamSeq BehSit ::= ?before-CompName | ?after-CompName /* branch condition syntactic domain */ BrnchCond ::= FuncName FuncParamSeq /* component related syntactic domains */ Comp ::= (CompName :type CompType :models (normal [compromised])) CompSeq ::= EMPTY | Comp CompSeq /* control flow related syntactic domains */ CtrlFlow ::= (before | after CompName[?-BrnchName]) CtrlFlowSeq ::= EMPTY | CtrlFlow CtrlFlowSeq /* function related syntactic domains */ FuncParam ::= ?ParamName | ’ParamName | ParamName? | not (ParamName) FuncParamSeq ::= EMPTY | FuncParam FuncParamSeq /* split of control flow related syntactic domains */ SpltCF ::= (SpltName? SpltModName? [(SpltParamSeq)] (BrnchNameSeq)) SpltCFSeq ::= EMPTY | SpltCF SpltCFSeq SpltCondSeq ::= EMPTY | SpltCond SplitCondSeq SpltCond ::= (BrnchName (BrnchCond)) /* join of control flow related syntactic domains */ JoinCF ::= (JoinName? [(JoinParamSeq)] (BrnchNameSeq)) JoinCFSeq ::= EMPTY | JoinCF JoinCFSeq /* data flow related syntactic domains */ DataFlow ::= (ObjCompSeq) DataFlowSeq ::= EMPTY | DataFlow DataFlowSeq /* resource related syntactic domains */ Res ::= (ResName ResType [(normal | hacked FVal)]+) ResSeq ::= EMPTY | Res ResSeq ResType ::= File | Port | Mem 47 ResMap ::= (CompName ResName) ResMapSeq ::= EMPTY | ResMap ResMapSeq ResModMap ::= ResName normal | hacked FVal | ((ResName normal | hacked)) FVal /* model mapping related syntactic domains */ ModMap ::= (CompName noromal | compromised ResModMap) ModMapSeq ::= EMPTY | ModMap ModMapSeq /* vulnerability related syntactic domains */ Vulnrablty ::= (ResName VulnrabltyName) VulnrabltySeq ::= EMPTY | Vulnrablty VulnrabltySeq /* attack related syntactic domains */ AtkType ::= (AtkTypeName FVal) AtkTypeSeq ::= EMPTY | AtkType AtkTypeSeq AtkCond ::= [resource ?ensemble ?ResName ?Res] [resource-type-of ?Res ResType] [resource-might-have-been-attacked ?Res AtkTypeName] | [ and AtkCond ] | [ or AtkCond ] | [ not AtkCond ] AtkCondSeq ::= EMPTY | AtkCond AtkCondSeq AtkCons ::= [attack-implies-compromised-mode AtkTypeName ?Res normal | compromised FVal] | [ and AtkCons ] | [ or AtkCons ] | [ not AtkCons ] AtkConsSeq ::= EMPTY | AtkCons AtkConsSeq AtkVulnrabltyMap ::= (VulnrabltyName AtkTypeName) AtkVulnrabltyMapSeq ::= EMPTY | AtkVulnrabltyMap AtkVulnrabltyMapSeq /* syntactic domains of various names and types */ CompName, CompType, FuncName, ObjName, ObjType, EvntName, SpltName, SpltModName ::= I JoinName, ResName, BrnchName, VulnrabltyName, SpecFuncName , ParamName, MembName ::= I AtkModName, AtkTypeName, AtkRulName ::= I 48 /* syntactic domains of various sequences */ ObjNameSeq, SpltParamSeq, JoinParamSeq, BrnchNameSeq ::= ISeq /* other syntactic domains */ DSCond ::= EMPTY | dscs ISeq :: = EMPTY | I ISeq I ::= any valid LISP system name FVal ::= a sequence of decimal digits prefixed by a period (valid float value) B An Example of a System Architectural Model In this section, we give the syntax of an example System Architectural Model of MAF editor system which is discussed in detail in [5]. In the following, we give a brief detail on how to read the example, i.e. maf-editor is the top level component of the application whose structural behavior is specified at first. Every sentence of the specification is self-explanatory. In principle, the behavior of every component in the subnetwork of a parent component has to be specified separately with two corresponding parts, e.g. a component maf-startup (which is in the subnetwork of top-level component as mentioned in :components clause) has 1. structural behavior as specified by clause define-ensemble maf-startup 2. normal behavior as specified by the clause defbehavior-model (maf-startup norml) 3. and a corresponding compromised behavior is specified by the clause defbehavior-model (maf-startup compromised) The former part corresponds to the control level of the specification while the latter two corresponds to the behavioral level of the specification of the component. Furthermore, as explained in Section 2, the split behavior of the component maf-create-events is further specified with the corresponding clauses, e.g. defsplit maf-more-events? Also, any pre/postcondition that is followed by the dscs specifies the data structure consistency property. 49 B.1 MAF Editor Model (define-ensemble maf-editor :entry-events :auto :inputs () :outputs (the-model) :components ((startup :type maf-startup :models (normal compromised)) (create-model :type maf-create-model :models (normal compromised)) (create-events :type maf-create-events :models (normal compromised)) (save :type maf-save :models (normal compromised))) :controlflows ((before maf-editor before startup) (after startup before create-model)) :dataflows ((the-model create-model the-model create-events) (the-model create-events the-model save) (the-model save the-model maf-save-model)) :resources ((imagery image-file (normal .7) (hacked .3)) (code-files loadable-files (normal .8) (hacked .2))) :resource-mappings ((startup imagery) (create-model code-files) (create-events code-files) (save-model code-files)) :model-mappings ((startup normal ((imagery normal)) .99) (startup compromised ((imagery normal)) .01) (startup normal ((imagery hacked)) .9) (startup compromised ((imagery hacked)) .1) (create-model (create-model (create-model (create-model normal ((code-files normal)) .99) compromised ((code-files normal)) .01) normal ((code-files hacked)) .9) compromised ((code-files hacked)) .1) (create-events normal ((code-files normal)) .99) (create-events compromised ((code-files normal)) .01) (create-events normal ((code-files hacked)) .9) (create-events compromised ((code-files hacked)) .1) (save normal ((code-files normal)) .99) (save compromised ((code-files normal)) .001) 50 (save normal ((code-files hacked)) .01) (save compromised ((code-files hacked)) .999)) :vulnerabilities ((imagery reads-complex-imagery) (code-files loads-code) )) (define-ensemble maf-startup :entry-events (startup) :exit-events (startup) :allowable-events (post-validate create-client-frame center-action load-image) :inputs () :outputs ()) (defbehavior-model (maf-startup normal) :inputs () :outputs () :prerequisites () :post-conditions ()) (defbehavior-model (maf-startup compromised) :inputs () :outputs () :prerequisites () :post-conditions ()) ;;; Need defbehaviors for each of these even if its empty (define-ensemble maf-create-model :entry-events (create-mission-action-action-performed) :exit-events (mission-builder-submit) :allowable-events (create-mission-builder-with-client-panel create-mission-builder create-mission-builder-with-hash-table mission-builder-submit (set-initial-info exit (the-model nil)) create-mission-action-action-performed retrieve-info create-mission-action-action-performed (set-initial-info entry) ) :inputs () :outputs (the-model)) 51 (defbehavior-model (maf-create-model normal) :inputs () :outputs (the-model) :prerequisites () :post-conditions ([dscs ?the-model mission-builder good]) ) (defbehavior-model (maf-create-model compromised) :inputs () :outputs (the-model) :prerequisites () :post-conditions ([not [dscs ?the-model mission-builder good]]) ) (define-ensemble maf-create-events :entry-events :auto :exit-events () :allowable-events () :inputs (the-model) :outputs (the-model) :components ((get-next-cmd :type maf-get-next-cmd :models (normal)) (get-event-info :type maf-get-event-info :models (normal compromised)) (add-event-to-model :type maf-add-event-to-model :models (normal compromised)) (get-leg :type maf-get-leg :models (normal compromised)) (get-movement :type maf-get-movement :models (normal compromised)) (get-sortie :type maf-get-sortie :models (normal compromised)) (add-additional-info-to-model :type maf-add-additional-info :models (normal compromised)) (continue :type maf-create-events :models (normal compromised))) :dataflows ((the-model maf-create-events the-model join-exit-exit) (the-model maf-create-events the-model add-event-to-model) (the-cmd get-next-cmd cmd more-events?) (the-event get-event-info the-event add-event-to-model) (the-model add-event-to-model the-model join-events-non-take-off) (the-event get-event-info event takeoff?) (the-leg get-leg the-leg add-additional-info-to-model) (lms-event-counter get-leg event-number add-additional-info-to-model) (the-movement get-movement the-movement add-additional-info-to-model) (the-sortie get-sortie the-sortie add-additional-info-to-model) (the-model add-event-to-model the-model add-additional-info-to-model) (the-model add-additional-info-to-model the-model join-events-take-off) 52 (the-model join-events the-model continue) (the-model continue the-model join-exit-recur) (the-model join-exit the-model maf-create-events) ) :controlflows ((after more-events?-build-event before add-event-to-model) (after more-events?-exit before join-exit-exit) (after takeoff?-get-additional-info before get-leg) (after takeoff?-get-additional-info before get-movement) (after takeoff?-get-additional-info before get-sortie) (after takeoff?-exit before join-events-non-take-off)) :splits ((more-events? maf-more-events? (cmd) (build-event exit)) (takeoff? maf-takeoff? (event) (get-additional-info exit))) :joins ((join-events (the-model) (take-off non-take-off)) (join-exit (the-model) (recur exit))) :resources ((code-files loadable-files (normal .8) (hacked .2))) :resource-mappings ((get-event-info code-files) (add-event-to-model code-files) (get-leg code-files) (get-movement code-files) (get-sortie code-files) (add-additional-info-to-model code-files) (continue code-files)) :model-mappings ((get-event-info normal code-files normal .99) (get-event-info compromised code-files normal .01) (get-event-info normal code-files hacked .9) (get-event-info compromised code-files hacked .1) (add-event-to-model (add-event-to-model (add-event-to-model (add-event-to-model (get-leg (get-leg (get-leg (get-leg normal code-files normal .99) compromised code-files normal .01) normal code-files hacked .9) compromised code-files hacked .1) normal code-files normal .99) compromised code-files normal .001) normal code-files hacked .01) compromised code-files hacked .999) (get-movement normal code-files normal .99) 53 (get-movement compromised code-files normal .001) (get-movement normal code-files hacked .01) (get-movement compromised code-files hacked .999) (get-sortie (get-sortie (get-sortie (get-sortie normal code-files normal .99) compromised code-files normal .001) normal code-files hacked .01) compromised code-files hacked .999) (add-additional-info-to-model (add-additional-info-to-model (add-additional-info-to-model (add-additional-info-to-model (continue (continue (continue (continue normal code-files normal .99) compromised code-files normal .001) normal code-files hacked .01) compromised code-files hacked .999) normal code-files normal .99) compromised code-files normal .001) normal code-files hacked .01) compromised code-files hacked .999)) :vulnerabilities ((code-files loads-code)) ) (defbehavior-model (maf-create-events normal) :inputs (the-model) :outputs (the-model) :prerequisites ([dscs ?the-model mission-builder good]) :post-conditions ([dscs ?the-model mission-builder good]) ) (defbehavior-model (maf-create-events compromised) :inputs (the-model) :outputs (the-model) :prerequisites ([dscs ?the-model mission-builder good]) :post-conditions ([not [dscs ?the-model mission-builder good]]) ) (define-ensemble maf-get-next-cmd :entry-events (next-cmd) :exit-events ((next-cmd exit (the-cmd))) :inputs () :outputs (the-cmd)) (defbehavior-model (maf-get-next-cmd normal) :inputs () 54 :outputs (the-cmd) :prerequisites () :post-conditions ()) (define-ensemble maf-get-event-info :entry-events (create-mission-event-point) :allowable-events (set-current-point (create-mission-event-point exit) create-mission-event-object meo-set-information mpl-action-performed close-form add-new-event-internal) :exit-events ((got-event-info exit (the-event))) :inputs () :outputs (the-event)) (defbehavior-model (maf-get-event-info normal) :inputs () :outputs (the-event) :prerequisites () :post-conditions ([dscs ?the-event event good])) (defbehavior-model (maf-get-event-info compromised) :inputs () :outputs (the-event) :prerequisites () :post-conditions ([not [dscs ?the-event event good]])) (define-ensemble maf-add-event-to-model :entry-events (update-msn-evt) :allowable-events ((update-msn-evt exit (mb event-number event)) add-new-event-internal create-new-additional-mission-info-panel ) :exit-events (mpl-action-performed) :inputs (the-event the-model) :outputs (the-model event-number)) (defbehavior-model (maf-add-event-to-model normal) :inputs (the-event the-model) :outputs (the-model event-number) :prerequisites ([dscs ?the-event event good] 55 [dscs ?the-model mission-builder good]) :post-conditions ([add-to-map (events ?the-model)?event-number ?the-event ?before-maf-add-event-to-model] [dscs ?the-model mission-builder good])) (defbehavior-model (maf-add-event-to-model compromised) :inputs (the-event the-model) :outputs (the-model event-number) :prerequisites ([not [dscs ?the-event event good]] [not [dscs ?the-model mission-builder good]]) :post-conditions ([dscs ?the-model mission-builder good])) (define-ensemble maf-get-leg :entry-events (retrieve-leg) :exit-events ((retrieve-leg exit (nil the-leg lms-event-counter))) :allowable-events (create-mission-leg-object mlo-set-information) :inputs () :outputs (the-leg lms-event-counter)) (defbehavior-model (maf-get-leg normal) :inputs () :outputs (the-leg lms-event-counter) :prerequisites () :post-conditions ([dscs ?the-leg leg good])) (defbehavior-model (maf-get-leg compromised) :inputs () :outputs (the-leg lms-event-counter) :prerequisites () :post-conditions ([not [dscs ?the-leg leg good]])) (define-ensemble maf-get-movement :entry-events (retrieve-movement) :exit-events ((retrieve-movement exit (nil the-movement))) :allowable-events (create-mission-movement-object mmo-set-information) :inputs () :outputs (the-movement)) (defbehavior-model (maf-get-movement normal) :inputs () :outputs (the-movement) 56 :prerequisites () :post-conditions ([dscs ?the-movement movement good])) (defbehavior-model (maf-get-movement compromised) :inputs () :outputs (the-movement) :prerequisites () :post-conditions ([not [dscs ?the-movement movement good]])) (define-ensemble maf-get-sortie :entry-events (retrieve-sortie) :exit-events ((retrieve-sortie exit (nil the-sortie))) :allowable-events (create-mission-sortie-object mso-set-information) :inputs () :outputs (the-sortie)) (defbehavior-model (maf-get-sortie normal) :inputs () :outputs (the-sortie) :prerequisites () :post-conditions ([dscs ?the-sortie sortie good])) (defbehavior-model (maf-get-sortie compromised) :inputs () :outputs (the-sortie) :prerequisites () :post-conditions ([not [dscs ?the-sortie sortie good]])) (define-ensemble maf-add-additional-info :entry-events ((retrieve-sortie exit)) :exit-events (Mission-builder-add-info) :inputs (the-model the-leg the-movement the-sortie event-number) :outputs (the-model)) (defbehavior-model (maf-add-additional-info normal) :inputs (the-model the-leg the-movement the-sortie event-number) :outputs (the-model) :prerequisites ([dscs ?the-leg leg good] [dscs ?the-movement movement good] [dscs ?the-sortie sortie good] [dscs ?the-model mission-builder good]) :post-conditions ([add-to-map (legs ?the-model) ?event-number ?the-leg ?before-maf-add-additional-info] 57 [add-to-map (sorties ?the-model) ?event-number ?the-sortie ?before-maf-add-additional-info] [add-to-map (movements ?the-model) ?event-number ?the-movement ?before-maf-add-additional-info] [dscs ?the-model mission-builder good])) (defbehavior-model (maf-add-additional-info compromised) :inputs (the-model the-leg the-movement the-sortie event-number) :outputs (the-model) :prerequisites ([dscs ?the-leg leg good] [dscs ?the-movement movement good] [dscs ?the-sortie sortie good] [dscs ?the-model mission-builder good]) :post-conditions ([not [dscs ?the-model mission-builder good]])) (defsplit maf-more-events? (cmd) (build-event (equal ?cmd ’new-event)) (exit (equal ?cmd ’save-mission))) (defsplit maf-takeoff? (event) (get-additional-info (take-off-event? ?event)) (exit (not (take-off-event? ?event)))) (define-ensemble maf-save :inputs (the-model) :outputs ()) (defbehavior-model (maf-save normal) :inputs (the-model) :outputs () :prerequisites ([dscs ?the-model mission-builder good]) :post-conditions ([dscs ?the-model mission-builder good])) (defbehavior-model (maf-save compromised) :inputs (the-model) :outputs () :prerequisites ([dscs ?the-model mission-builder good]) :post-conditions ([not [dscs ?the-model mission-builder good]])) ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;; ;;; attack models ;;; ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; 58 (define-attack-model maf-attacks :attack-types ((hacked-image-file-attack .3) (hacked-code-file-attack .5)) :vulnerability-mapping ((reads-complex-imagery hacked-image-file-attack) (loads-code hacked-code-file-attack))) ;;; rules mapping conditional probabilities of vulnerability and attacks (defrule bad-image-file-takeover (:forward) if [and [resource ?ensemble ?resource-name ?resource] [resource-type-of ?resource image-file] [resource-might-have-been-attacked ?resource hacked-image-file-attack]] then [and [attack-implies-compromised-mode hacked-image-file-attack ?resource hacked .9 ] [attack-implies-compromised-mode hacked-image-file-attack ?resource normal .1 ]]) (defrule bad-image-file-takeover-2 (:forward) if [and [resource ?ensemble ?resource-name ?resource] [resource-type-of ?resource code-memory-image] [resource-might-have-been-attacked ?resource hacked-image-file-attack]] then [and [attack-implies-compromised-mode hacked-image-file-attack ?resource hacked .9 ] [attack-implies-compromised-mode hacked-image-file-attack ?resource normal .1 ]]) (defrule hacked-code-file-takeover (:forward) if [and [resource ?ensemble ?resource-name ?resource] [resource-type-of ?resource loadable-files] [resource-might-have-been-attacked ?resource hacked-code-file-attack]] then [and [attack-implies-compromised-mode hacked-code-file-attack ?resource hacked .9 ] [attack-implies-compromised-mode hacked-code-file-attack ?resource normal .1 ]]) (defrule hacked-code-file-takeover-2 (:forward) if [and [resource ?ensemble ?resource-name ?resource] [resource-type-of ?resource loadable-files] [resource-might-have-been-attacked ?resource hacked-code-file-attack]] then [and [attack-implies-compromised-mode hacked-code-file-attack ?resource hacked .9 ] [attack-implies-compromised-mode hacked-code-file-attack ?resource normal .1 ]]) 59 ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;;;;; ;;;;; Hacked Code file attacks ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; (defrule bad-code-file-takeover (:forward) if [and [resource ?ensemble ?resource-name ?resource] [resource-type-of ?resource code-file] [resource-might-have-been-attacked ?resource hacked-code-file-attack]] then [and [attack-implies-compromised-mode hacked-code-file-attack ?resource hacked .9 ] [attack-implies-compromised-mode hacked-code-file-attack ?resource normal .1 ]]) (defrule bad-code-file-takeover-2 (:forward) if [and [resource ?ensemble ?resource-name ?resource] [resource-type-of ?resource code-memory-image] [resource-might-have-been-attacked ?resource hacked-code-file-attack]] then [and [attack-implies-compromised-mode hacked-code-file-attack ?resource hacked .9 ] [attack-implies-compromised-mode hacked-code-file-attack ?resource normal .1 ]]) 60
6cs.PL
Noname manuscript No. (will be inserted by the editor) Discovering More Precise Process Models from Event Logs by Filtering Out Chaotic Activities Niek Tax · Natalia Sidorova · Wil M. P. van der Aalst arXiv:1711.01287v1 [cs.DB] 3 Nov 2017 Received: date / Accepted: date Abstract Process Discovery is concerned with the automatic generation of a process model that describes a business process from execution data of that business process. Real life event logs can contain chaotic activities. These activities are independent of the state of the process and can, therefore, happen at rather arbitrary points in time. We show that the presence of such chaotic activities in an event log heavily impacts the quality of the process models that can be discovered with process discovery techniques. The current modus operandi for filtering activities from event logs is to simply filter out infrequent activities. We show that frequency-based filtering of activities does not solve the problems that are caused by chaotic activities. Moreover, we propose a novel technique to filter out chaotic activities from event logs. We evaluate this technique on a collection of seventeen real-life event logs that originate from both the business process management domain and the smart home environment domain. As demonstrated, the developed activity filtering methods enable the discovery of process models that are more behaviorally specific compared to process models that are discovered using standard frequency-based filtering. Keywords Information Systems · Business Process Intelligence · Process Mining · Knowledge Discovery 1 Introduction Process Mining [1] is a scientific discipline that bridges the gap between process analytics and data analysis and focuses on the analysis of event data logged during the execution of a business process. Events contain information on what was done, by whom, for whom, where, when, etc. Such event data is often readily available from information systems such as ERP, CRM, or BPM systems. Process discovery, which plays a prominent role in process mining, is the task of automatically Department of Mathematics and Computer Science Eindhoven University of Technology P.O. Box 513, 5600MB Eindhoven, The Netherlands Email: E-mail: {n.tax,n.sidorova,w.m.p.v.d.aalst}@tue.nl 2 Niek Tax et al. generating a process model that accurately describes a business process based on such event data. Many process discovery techniques have been developed over the last decade (e.g. [7, 15, 16, 17, 20, 33, 47]), producing process models in various forms, such as Petri nets [29], process trees [7], and BPMN models [30]. Figure 1b shows an example process model from [1] that describes a compensation request process. The process model consists of eight process steps (called activities): (A) register request, (B) examine thoroughly, (C) examine casually, (D) check ticket, (E) decide, (F) re-initiate request, (G) pay compensation, and (H) reject request. Figure 1a shows a small example event log consisting of six execution trails of the process model. The Inductive Miner [20] process discovery algorithm provides the guarantee that it can re-discover the process model from an event log given that all pairs of activities that can directly follow each other in the process are present in the event log, i.e., the log is directly-follows complete. Since the log in Figure 1a is directly-follows complete, applying the Inductive Miner to this log results in the process model in Figure 1b, which generated the log. However, the presence of activities that can occur spontaneously at any point in the process execution, which we will call chaotic activities, substantially impacts the quality of the resulting process models obtained with process discovery techniques. Figure 2a contains the event log obtained from the one in Figure 1a by adding activity (X) the customer calls at random points, since customers can call the call center multiple times at any point in time during the execution of the process. Figure 2b shows the resulting process model discovered by the Inductive Miner [20] from the event log of Figure 2a. The process model discovered from the “clean” example log without activity X (Figure 1b) was very simple, interpretable, and accurate with respect to the behavior allowed in the process. In contrast, the process model discovered from the log containing X (Figure 2b) is very complex, hard to interpret, and it overgeneralizes by allowing for too much behavior that is not possible in the process. We consider X to be a so-called chaotic activity because it does not have a clear position in the process model and it complicates the discovery of the rest of the process. The reason for the decline in the quality of process models discovered from logs with chaotic activities is that the directly follows relations, which many process discovery algorithms operate on, are affected by chaotic activities. Examples of such process discovery algorithms include the Inductive Miner [19], the Heuristics Miner [45], and Fodina [4]. In a sequence of activities h. . . , A, C, . . . i, where A was directly followed by C, the addition of a chaotic activity X can turn the sequence into h. . . , A, X, C, . . . i, thereby obfuscating the directly-follows relation between activities A and C. Event sequences hA,B,D,E,Hi hA,D,C,E,Gi hA,C,D,E,F,B,D,E,Gi hA,D,B,E,Hi hA,C,D,E,F,D,C,E,F,C,D,E,Hi hA,C,D,E,Gi B G A C D E H F (b) (a) Fig. 1 (a) Event log with A=register request, B=examine thoroughly, C=examine casually, D=check ticket, E=decide, F=re-initiate request, G=pay compensation, H=reject request, and (b) the Petri net mined from this log with the Inductive Miner [20]. Title Suppressed Due to Excessive Length 3 D Event sequences hX,A,B,D,E,Hi hA,D,C,E,Gi hA,X,C,D,E,F,B,D,X,E,Gi hA,D,B,E,Hi hA,C,D,E,F,D,C,E,F,C,D,E,X,Hi hA,C,X,D,E,Gi E X B F A G C H (a) (b) Fig. 2 (a) The event log from Figure 1a with an added chaotic activity X, and (b) the Petri net mined from this log with the Inductive Miner [20]. In this paper, we show that existing approaches do not solve the problem of chaotic activities and we present a technique to handle the issue. This paper is structured as follows: in Section 2 we introduce basic concepts used throughout the paper. In Section 3 we propose an approach to filter out chaotic activities. In Section 4 we evaluate our technique using synthetic data where we artificially insert chaotic activities and check whether the filtering techniques can filter out the inserted chaotic activities. Additionally, Section 4 proposes a methodology to evaluate activity filtering techniques in a real-life setting where there is no ground truth knowledge on which activities are truly chaotic, and motivates this methodology by showing that its results are consistent with the synthetic evaluation on the synthetic datasets. In Section 5 the results on a collection of seventeen real-life event logs are discussed. In Section 6 we discuss how the activity filtering techniques can be used in a toggle-based approach for human-in-the-loop process discovery. In Section 7 we discuss related techniques in the domains of process discovery and the filtering of event logs. Section 8 concludes this paper and discusses several directions for future work. 2 Preliminaries In this section, we introduce concepts and notation throughout this paper. X = {a1 , a2 , . . . , an } denotes a finite set. P(X) denotes the power set of X, i.e., the set of all possible subsets of X. X\Y denotes the set of elements that are in set X but not in set Y , e.g., {a, b, c}\{a, c}={b}. X ∗ denotes the set of all sequences over a set X and σ = ha1 , a2 , . . . , an i denotes a sequence of length n, with σ(i) = ai and hi the empty sequence. σX is the projection of σ on X, e.g. ha, b, c, a, b, ci{a,c} = ha, c, a, ci. σ1 · σ2 denotes the concatenation of sequences σ1 and σ2 , e.g., ha, b, ci · hd, ei = ha, b, c, d, ei. A partial function f ∈X9Y with domain dom(f ) can be lifted to sequences over X using the following recursive definition: (1) f (hi) = hi; (2) for any σ∈X ∗ and x ∈ X: 4 Niek Tax et al.  f (σ · hxi) = f (σ) if x∈dom(f / ), f (σ) · hf (x)i if x∈dom(f ). A multiset (or bag) over X is a function B : X→N which we write as w2 wn + 1 [aw 1 , a2 , . . . , an ], where for 1≤i≤n we have ai ∈X and wi ∈N . The set of all multisets over X is denoted B(X). In the context of process mining, we assume the set of all process activities Σ to be given. Event logs consist of sequences of events where each event represents a process activity. Definition 1 (Event, Trace, and Event Log) An event e in an event log is the occurrence of an activity e∈Σ. We call a (non-empty) sequence of events σ∈Σ + a trace. An event log L∈B(Σ + ) is a multiset of traces. L=[ha, b, ci2 , hb, a, ci3 ] is an example event log over process activities Σ = {a, b, c}, consisting of 2 occurrences of trace ha, b, ci and three occurrences of trace hb, a, ci. Activities(L) denotes the set of process activities Σ that occur in L, e.g., Activities(L) = {a, b, c}. #(a, L) denotes the number of occurrences of activity a in log L, e.g., #(a, L) = 5. A process model notation that is frequently used in the area of process mining is the Petri net. Petri nets can be automatically transformed into process model notations that are commonly used in business environments, such as BPMN and BPEL [23]. A Petri net is a directed bipartite graph consisting of places (depicted as circles) and transitions (depicted as rectangles), connected by arcs. A transition describes an activity, while places represent the enabling conditions of transitions. Labels of transitions indicate the type of activity that they represent. Unlabeled transitions (τ -transitions) represent invisible transitions (depicted as gray rectangles), which are only used for routing purposes and are not recorded in the event log. Definition 2 (Labeled Petri net) A labeled Petri net N = hP, T, F, `i is a tuple where P is a finite set of places, T is a finite set of transitions such that P ∩T =∅, F ⊆(P ×T )∪(T ×P ) is a set of directed arcs, called the flow relation, and `:T 9Σ is a partial labeling function that assigns a label to a transition, or leaves it unlabeled (the τ -transitions). We write •n and n• for the input and output nodes of n ∈ P ∪ T (according to F ). A state of a Petri net is defined by its marking m∈B(P ) being a multiset of places. A marking is graphically denoted by putting m(p) tokens on each place p∈P . State changes occur through transition firings. A transition t is enabled (can fire) in a given marking m if each input place p∈•t contains at least one token. Once t fires, one token is removed from each input place p∈•t and one token is added to each output place p0 ∈t•, leading to a new marking m0 =m− •t + t•. A firing of a transition t leading from marking m to marking m0 is denoted as t step m−→m0 . Steps are lifted to sequences of firing enabled transitions, written γ 0 m−→m and γ∈T ∗ is a firing sequence. Defining an initial and a set of final markings allows defining the language accepted by a Petri net as a set of finite sequences of activities. Definition 3 (Accepting Petri Net) An accepting Petri net is a triplet APN = (N, m0 , MF ), where N is a labeled Petri net, m0 ∈B(P ) is its initial marking, and Title Suppressed Due to Excessive Length 5 MF ⊆B(P ) is its set of possible final markings. A sequence σ∈Σ ∗ is a trace of γ an accepting Petri net APN if there exists a firing sequence m0 −→mf such that ∗ mf ∈MF , γ∈T and `(γ)=σ. In the Petri nets that are shown in this paper, places that belong to the initial marking contain a token and places belonging to a final marking contain a bottom right label fi with i a final marking identifier or are simply marked as in case of a single final marking. The language L(APN ) is the set of all its traces, i.e., L(APN ) = {l(γ)| γ γ∈T ∗ ∧∃mf ∈M F m0 −→mf }, which can be of infinite size when APN contains loops. While we define the language for accepting Petri nets, in theory, L(M ) can be defined for any process model M with formal semantics. We denote the universe of process models as M. For each M ∈M, L(M ) ⊆ Σ + is defined. A process discovery method is a function PD : B(Σ + ) → M that provides a process model for a given event log. The goal is to discover a process model that is a good description of the process from which the event log was obtained, i.e., it should allow for all the behavior that was observed in the event log (called fitness) while it should not allow for too much behavior that was not seen in the event log (called precision). For an event log L, L̃={σ∈Σ + |L(σ)>0} is the trace set of L. For example, for log L=[ha, b, ci2 , hb, a, ci3 ], L̃={ha, b, cihb, a, ci}. For an event log L and a process model M , we say that L is fitting on M if L̃⊆L(M ). Precision is related to the behavior that is allowed by a model M that was not observed in the event log L, i.e., L(M )\L̃. 3 Information-Theoretic Approaches to Activity Filtering We consider a chaotic activity to be an activity that can occur at any point in the process and that thereby complicates the discovery of the rest of the process by obfuscating the directly-follows relations of the event log. In this section, we propose a technique to detect chaotic activities in event logs and to filter them out from those event logs. We extend the function #(a, L) to the function #(σ, L) to count the number of occurrence P of a sequence σ, in L: #(σ, L)= σ0 ∈L |{0≤i≤|σ 0 |−|σ| ∀1≤j≤|σ| σ 0 (i+j)=σ(j)}|. The directly-follows ratio, denoted dfr (a, b, L), represents the ratio of the events of activity a that are directly followed by an event of activity b in event log L, i.e., dfr (a, b, L)= #(ha,bi,L) #(a,L) . Likewise, the directly-precedes ratio, denoted dpr (a, b, L), represents the ratio of the events of activity a that are directly preceded by an event of activity b in event log L, i.e., dpr (a, b, L)= #(hb,ai,L) #(a,L) . Lc contains the traces of event log L appended with an artificial end event that we represent with c. For each σ = he1 , e2 , . . . , en i in log L, log Lc contains a trace σ c = he1 , e2 , . . . , en , ci. Likewise, Lb contains the traces of event log L prepended with an artificial start event b, i.e., for each σ = he1 , e2 , . . . , en i in log L, log Lb contains a trace σ b = hb, e1 , . . . , en i. The artificial start and end events allow us to define the ratio of start events of an activity, e.g., dfr (a, c, Lc ) and dpr (a, b, Lb ) 6 Niek Tax et al. represent the ratio of events of activity a that respectively occur at the end of a trace and at the beginning of a trace. Assuming an arbitrary but consistent order over the set of process activities Activities(L), dfr (a, L) represents the vector of values dfr (a, b, Lc ) for all b∈Activities(L) ∪ {c} and dpr (a, L) represents the vector of values dpr (a, b, Lb ) for all b ∈ Activities(L) ∪ {b}. From a probabilistic point of view, we can regard dfr (a, L) and dpr (a, L) as the empirical estimates of the categorical distributions over respectively the activities directly prior to a and directly after a, where the empirical estimates are based on #(a, L) trials. 3.1 Direct Entropy-based Activity Filtering We define the entropy of an activity in an event log L based on its directly-follows ratio vector and the directly-precedes ratio vector by using the Pusual definition of function for the categorical probability distribution: H(X) = − x∈X x log2 (x). We define the entropy of activity a ∈ Activities(L) in log L as: H(a, L) = H(dfr (a, L))+ H(dpr (a, L)). In case there are zero probability values in the directly follows or directly precedes vectors, i.e., 0 ∈ dfr (a, L) ∨ 0 ∈ dpr (a, L), then the value of the corresponding summand 0 log2 (0) is taken as 0, which is consistent with the limit lim p log2 (p) = 0. p→0+ For example, let event log L = [ha, b, c, xi10 , ha, b, x, ci10 , ha, x, b, ci10 ], then 20 10 , 0, 30 , 0i, using the arbitrary but consistent ordering ha, b, c, x, ci, dfr (a, L) = h0, 30 indicating that 20 out of 30 events of activity a are followed by b and 10 out of 30 by x. Likewise dpr (a, L)=h0, 0, 0, 0, 1i, using the arbitrary but consistent ordering ha, b, c, x, bi, indicating that all events of activity a are preceded by b. This leads to H(dfr (a, L)) = 0.918, H(dpr (a, L)) = 0, and H(a, L) = 0.918. Furthermore, H(b, L) = 1.837, H(c, L) = 1.837, and H(x, L) = 3.170, showing that activity x has the highest entropy of the probability distributions for preceding and succeeding activities. We conjecture that activities that are chaotic and behave randomly to a high degree have high values of H(a, L). Algorithm 1 An activity filtering approach based on entropy. Input: event log L Output: list of event logs Q Initialisation : 0 1: L = L 0 2: Q = hL i Main Procedure: 0 3: while |Activities(L )| > 2 do 4: acts = Activities(L0 ) 5: a0 = arg maxa∈acts H(a, L0 ) 6: L0 = L0 acts\{a0 } 7: Q = Q · hL0 i 8: end while 9: return Q Title Suppressed Due to Excessive Length 7 Algorithm 1 describes a greedy approach to iteratively filter the most randomly behaving (chaotic) activity from the event log. The algorithm takes an event log L as input and produces a list of event logs, such that the first element of the list contains a version of L with one activity filtered out, and each following element of the list has one additional activity filtered out compared to the previous element. In the example event log L, Algorithm 1 starts by filtering out activity x, followed by activity b or c. The algorithm stops when there are two activities left in the event log. The reason not to filter any more activities past this point is closely related to the aim of process discovery: uncovering relations between activities. From an event log with less than two activities no relations between activities can be discovered. 3.2 The Entropy of Infrequent Activities and Laplace Smoothing We defined entropy of the activities in an event log L is based on the directly-follows ratios dfr and the directly-precedes ratios dpr of the activities in L. The empirical estimates of the categorical distributions dfr (a, L) and dpr (a, L) become unreliable for small values of #(a, L). In the extreme case, when #(a, L)=1, dfr (a, L) assigns an estimate of 1 to the activity that the single activity a in L happens to be preceded by and contains a probability of 0 for the other activities. Likewise, when #(a, L)=1, dpr (a, L) assigns value 1 to one activity and value 0 to all others. Therefore, #(a, L)=1 leads to H(dfr (a, L))=0 and H(dfr (a, L))=0. This shows an undesirable consequence of Algorithm 1, infrequent activities are unlikely to be filtered out. In the extreme case, the activities that occur only once, which are the last in line activities to be filtered out. This effect is undesired, as very infrequent activities should not be the primary focus of the process model discovered from an event log. We aim to mitigate this effect by applying Laplace smoothing [48] to the empirical estimate of the categorical distributions over the preceding and succeeding activities. Therefore, we define a smoothed version of the directly-follows and α + #(ha,bi,L) directly-precedes ratios, dfr s (a, b, L)= α(|Activities(L)|+1)+#(a,L) , with smoothing parameter α∈R≥0 . The value of dfr s (a, b, L) will always be between the empirical 1 estimate dfr (a, b, L) and the uniform probability |Activities(L)|+1 , depending on s the value α. Similar to dfr and dpr , dfr (a, L) represents the vector of values dfr s (a, b, Lc ) for all b∈Activities(L) ∪ {c} and dpr s (a, L) represents the vector of values dpr s (a, b, Lb ) for all b ∈ Activities(L) ∪ {b}. From a Bayesian point of view, Laplace smoothing corresponds to the expected value of the posterior distribution that consists of the categorical distribution given by dfr (a, L) and a Dirichlet distributed prior that assigns equal probability to each of the possible number of next activities |Activities(L)| + 1 (including c). Parameter α indicates the weight that is assigned to the prior belief w.r.t. the evidence that is found in the data. An alternative definition of the entropy of log L, based on the smoothed distributions over the preceding and succeeding activities, is as follows: H s (a, L) = H(dfr s (a, L)) + H(dpr s (a, L)). The smoothed direct entropy-based activity filter is similar to Algorithm 1, where function H in line 5 of the algorithm is replaced by H s . Function H(a, L) starts from the assumption that an activity is non-chaotic unless we see sufficient evidence in the data for it’s chaoticness, function H s (a, L) 8 Niek Tax et al. Algorithm 2 An indirect activity filtering approach based on entropy. Input: event log L Output: list of event logs Q Initialisation : 0 1: L = L 0 2: Q = hL i Main Procedure: 0 3: while |Activities(L )| > 2 do 4: acts = Activities(L0 ) 5: a0 = arg mina∈acts H(L0 acts\{a} ) 6: L0 = L0 acts\{a0 } 7: Q = Q · hL0 i 8: end while 9: return Q in contrast starts from the assumption that is is chaotic, unless we see evidence sufficient evidence in the data for it’s non-chaoticness. Categorical distribution dfr (a, L) consists of |Activities(L)| + 1, therefore, the maximum entropy of an activity decreases as more activities get filtered out of the event log. The keep the values of H s (a, L) comparable between iterations of the filtering algorithm, we propose to gradually increase the weight of the prior by 1 setting weight parameter α to |Activities(L)| . 3.3 Indirect Entropy-based Activity Filtering An alternative approach to the method proposed in Algorithm 1 is to filter out activities such that the other activities in the log become less chaotic. We define the total entropy of an Pevent log L as the sum of the entropies of the activities in the log, i.e., H(L) = a∈Activities(L) H(a, L). Algorithm 2 describes a greedy approach that iteratively filters out the activity that results in the lowest total log entropy. We call this approach the indirect entropy-based activity filter, as opposed to the direct entropy-based activity filter (Algorithm 1), which selects the to-be-filtered activity directly based on the activity entropy, instead of based on the total log entropy after removal. 3.4 An Indirect Entropy-based Activity Filter with Laplace Smoothing Just like the direct entropy-based activity filter, the indirect entropy-based activity filter is sensitive to infrequent activities. To deal with this problem, the ideas of the indirect entropy-based activity filtering method and Laplace smoothing can be combined, using the following definition for smoothed log entropy: P H s (L) = a∈Activities(L) H s (a, L). The algorithm for indirect entropy-based activity filtering with Laplace smoothing is identical to Algorithm 2, in which function H in line 5 is replaced by function H s. Title Suppressed Due to Excessive Length (2) 9 Log with Frequent Randomly-Positioned Activities insert k frequent randomly-positioned activities (3) Filtered Event Log filter activities k = 1, 2, . . . Process Model Synthetic (1) generate Event Log (2) insert k infrequent Log randomly-positioned activities with Infrequent Randomly-Positioned Activities (3) Filtered Event Log filter activities k = 1, 2, . . . (2) insert k uniform randomly-positioned activities (4) Log with Uniform Randomly-Positioned Activities (3) Filtered Event Log filter activities k = 1, 2, . . . compare Fig. 3 An overview of the proposed evaluation methodology on synthetic data. 4 Evaluation using Synthetic Data In this section we evaluate the activity filtering techniques using synthetic data. Figure 3 gives an overview of the evaluation methodology. First, as step (1), we generate a synthetic event log from a process model such that we know that all activities of this model are non-chaotic. We take well-known process models introduced by Maruster et al. [27], which respectively consist of 12 and 22 activities and are commonly referred to as the Maruster A12, A22 models. The Maruster A12 and A22 models are shown respectively in Figures 4a and 5a. We generated 25 traces by simulation from Maruster A12 to form log LA12 and generated 400 traces from Maruster A22 to form log LA22 . Then, in step (2), we artificially insert activities that we position at random positions in the log. Since we chose the positions in the log of those activities randomly, we assume those activities to be chaotic. We vary the number (k) of randomly-positioned activities that we insert, to assess how well the chaotic activity filtering techniques are able to deal with different numbers of randomly-positioned activities in the event log. Furthermore, we vary the frequency of the randomly-positioned activities that we insert, where we distinguish between three types of randomly-positioned activities: Frequent randomly-positioned activities the number of events inserted for all k randomly-positioned activities is maxa∈Activities(L) #(a, L). Infrequent randomly-positioned activities the number of events inserted for all k randomly-positioned activities is mina∈Activities(L) #(a, L). Uniform randomly-positioned activities for each of the k inserted randomlypositioned activities the frequency is chosen at randomly from a uniform probability distribution with minimum value mina∈Activities(L) #(a, L) and maximum value maxa∈Activities(L) #(a, L). In step (3) we filter out all the inserted randomly-positioned activities from the event log, by removing activities one-by-one using the activity filtering approaches, until all k artificially inserted activities have been removed again. We then count how many of the activities that were originally in the process model we also removed during this procedure (step (4)). Using this approach, we compare the direct entropy-based activity filtering approach (with and without Laplace smoothing) 10 Niek Tax et al. (a) (b) (c) Fig. 4 (a) The synthetic process model Maruster A12, from which we generate an event log L, consisting of 25 traces, from which the process model can be rediscovered with the Inductive Miner [19], (b) the process model discovered by the Inductive Mining when we insert one uniform randomly-positioned activity X to LA12 , and (c) the process model discovered by the Inductive Miner after inserting a second randomly-positioned activity Y to LA12 . with the indirect entropy-based activity filtering approach (with and without Laplace smoothing). Furthermore, we compare those activity filtering techniques with activity filtering techniques that are based on the frequency of activities, such as filtering out the activities starting from the least frequent activity (leastfrequent-first), or starting from the most frequent activity (most-frequent-first). Frequency-based activity filtering techniques are the current default approach for filtering activities from event logs. The original process models A12 and A22 can be rediscovered from generated event logs LA12 and LA22 with the Inductive Miner [19] when there are no added randomly-positioned activities. Figure 4b shows the process model discovered by the Inductive Miner [19] after inserting one uniform randomly-positioned activity, Title Suppressed Due to Excessive Length 11 (a) (b) Fig. 5 (a) The synthetic process model Maruster A22, from which we generate an event log LA22 , consisting of 400 traces, from which the process model is re-discoverable with the Inductive Miner [19], and (b) the process model discovered by the Inductive Miner after inserting a uniform randomly-positioned activity X to LA22 . activity X, into LA12 . The insertion of activity X causes the Inductive Miner to create a model that overgeneralizes the behavior of the event log, as indicated by many silent transitions in the process model that allow activities to be skipped. Adding a second uniform randomly-positioned activity Y to LA12 results in the Inductive Miner discovering a process model (shown in Figure 4c) that overgeneralizes even further, allowing for almost all sequences over the set of activities. Figure 5b shows the process model discovered by the Inductive Miner after inserting two uniform randomly-paced activities (X and Y ) into LA22 . The addition of X and Y has the effect that activity C is no longer positioned at the correct place in the process model, but it is instead put in parallel to the whole process, making the process model overly general, as it wrongly allows for activity C to occur before A and B, or after D, E, F , and G. Figures 4b, 4c and 5b further motivate the need for filtering out chaotic activities. 12 Niek Tax et al. Table 1 The number of incorrectly filtered activities per filtering approach on LA12 and LA22 with k added Uniform (U) / Frequent (F) /Infrequent (I) chaotic activities. Approach Direct 1 Direct (α= |A| ) Indirect 1 Indirect (α= |A| ) Least-frequent-first Most-frequent-first 1 Maruster A12 (Number of inserted randomly-positioned activities →) 4 8 16 32 64 128 U F I U F I U F I U F I U F I U F I U F I U F I 0 0 0 0 9 11 0 0 0 0 12 0 0 0 0 0 0 12 0 0 0 0 11 3 0 0 0 0 12 0 0 0 0 0 0 12 0 0 0 0 6 7 0 0 0 0 12 0 0 0 0 0 0 12 0 0 0 0 11 10 0 0 0 0 12 0 0 0 1 1 0 12 0 0 1 1 11 12 0 0 0 0 12 0 0 0 1 1 0 12 0 0 1 1 12 12 0 0 0 0 12 0 12 0 1 1 0 12 4 4 2 2 12 12 0 0 0 0 12 0 12 6 1 1 0 12 10 6 3 2 12 12 1 2 1 1 12 0 12 12 6 10 0 12 2 Maruster A22 (Number of inserted randomly-positioned activities →) 4 8 16 32 64 U F I U F I U F I U F I U F I U F I U F I U F I 0 0 0 0 16 7 0 0 0 0 22 0 0 0 0 0 0 22 0 0 0 0 17 8 0 0 0 0 22 0 0 0 0 0 0 22 0 0 0 0 6 19 0 0 0 0 22 0 0 0 0 0 0 22 0 0 0 0 21 17 0 0 0 0 22 0 1 1 1 1 0 22 0 0 0 0 19 19 0 0 0 0 22 0 0 0 1 1 0 22 0 0 1 1 22 22 0 0 0 0 22 0 0 0 1 1 0 22 0 0 1 0 22 22 0 0 0 0 22 0 0 0 1 1 0 22 0 0 1 1 22 22 0 0 0 0 22 0 5 5 1 1 0 22 Approach Direct 1 Direct (α= |A| ) Indirect 1 Indirect (α= |A| ) Least-frequent-first Most-frequent-first 2 1 128 Frequent randomly-positioned activities will impact the quality of process models discovered with process discovery to a higher degree than infrequent randomlypositioned activities. Each randomly-positioned activity that is inserted at a random position in the event log is placed in-between two existing events in that log (or at the start or end of the trace). By inserting randomly-positioned activity X in-between two events of activities A and C respectively, the directly-follows relation between activities A and C gets weakened. Therefore, the impact of randomly-positioned activity X is proportional to its frequency #(X, L). 4.1 Results Table 1 reports the number of activities that were originally part of the synthetic process models A12 and A22 that were wrongly filtered out from LA12 and LA22 as an effect of removing all inserted randomly-positioned activities from these logs. If this number is 12 for Maruster A12 or 22 for Maruster A22 this indicates that all activities of the original process model needed to be filtered out before the activity filtering technique was able to remove all inserted chaotic activities. The results show that the direct filtering approach can perfectly distinguish between actual activities from the process and artificial chaotic activities for up to 32 uniform randomly-positioned activities inserted activities to LA12 , up to 64 frequent randomly-positioned activities, and up to 16 infrequent randomlypositioned activities. Infrequent randomly-positioned activities are the hardest type of randomly-positioned activities to correctly filter out, as their infrequency can have the effect that the probability distributions over their surrounding activities 1 can by chance have low entropy. Using Laplace smoothing with α = |Activities(L)| mitigates this effect, but does not completely solve it: the number of incorrectly removed activities drops from 12 to 0 as an effect of Laplace smoothing for 32 added randomly-positioned activities, and from 12 to 6 for 64 added randomlypositioned activities. The indirect activity filter starts making errors already at lower numbers of added randomly-positioned activities than the direct activity filter; however, it is more stable to errors for higher numbers of added randomlypositioned activities, i.e., fewer activities get incorrectly removed for 64 and 128 Title Suppressed Due to Excessive Length 13 added randomly-positioned activities. In contrast to direct activity filtering, Laplace smoothing does not seem to reduce the number of wrongly removed activities for indirect activity filtering. In fact, surprisingly, the number of incorrectly removed activities even increased from 6 to 10 as an effect of using Laplace smoothing for 128 infrequent randomly-positioned activities added to LA12 . The direct and indirect filtering approaches, both with and without Laplace smoothing, outperform the currently widely used approach of filtering out infrequent activities from the event log (least-frequent-first filtering). Furthermore, a second frequency-based activity filtering technique is included in the evaluation in which the most-frequent activities are removed from the event log (most-frequent first filtering). Both Frequency-based filtering approaches are not able to filter out the randomly-positioned activities inserted to LA12 and LA22 , even for small numbers of added randomly-positioned activities. 4.2 An Evaluation Methodology for Event Data without Ground Truth Information In a real-life data evaluation that we perform in the following section, there is no ground truth knowledge on which activities of the process are chaotic. This motivates a more indirect evaluation in which we evaluate the quality of the process model discovered from the event log after filtering out activities with the proposed activity filtering techniques. In this section we propose a methodology for evaluation of activity filtering techniques by assessing the quality of discovered process models, we apply this evaluation methodology to the Maruster A12 and Maruster A22 event logs, and we discuss the agreement between the findings of Table 1 and the quality of the discovered process models. There are several ways to quantify the quality of a process model for an event log. Ideally, a process model M should allow for all behavior that was observed in the event log L, i.e., L̃ \ L(M ) should be as small as possible, preferably empty. The fitness quality dimension covers this. Furthermore, model M should not allow for too much additional behavior that was not seen in the event log, i.e., L(M ) \ L̃ should be as small as possible. This aspect is called precision. For each process model that we discovered, we measure fitness and precision with respect to the filtered log. Fitness is measured using the alignment-based fitness measure [3] and we measure precision using negative event precision [44]. Based on the fitness and precision results we also calculate F-score [11], i.e., the harmonic mean between fitness and precision. Precision is likely to increase by filtering out one or more activities from an event log independently of which activities are removed from the log, as a result of two factors. First, precision measures express L(M ) \ L̃ in terms of the number of activities that are enabled at certain points in the process, w.r.t. the number of activities seen that were actually observed at these points in the process. With the log and model containing fewer activities after filtering, the number of enabled activities is likely to decrease as well. Secondly, activity filtering leads to log L0 that contains less behavior than original log L (i.e., L̃0 is smaller than L̃), this makes it easier for process discovery methods to discover a process model with less behavior. These two factors make precision values between event logs with different numbers of activities filtered out incomparable. The degree to which the behavior of filtered 14 Niek Tax et al. 1.00 Maruster A12 − 0 added Maruster A12 − 1 added Maruster A12 − 2 added 0.75 0.50 0.25 0.00 0.00 F−score 1.00 0.25 0.50 0.75 0.00 0.25 Maruster A12 − 4 added 0.50 0.75 0.00 Maruster A12 − 8 added 0.25 0.50 0.75 Maruster A12 − 16 added 0.75 0.50 0.25 0.00 0.00 1.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 Maruster A12 − 32 added 0.50 0.75 Filter 0.75 Direct 0.50 Direct (a=1/|A|) Indirect 0.25 0.00 0.00 Indirect (a=1/|A|) 0.25 0.50 0.75 Least−frequent−first Minimum % of activities explained Fig. 6 F-score on the log generated from the Maruster A12 model with inserted artificial chaotic activities. Maruster A12 − 0 added Maruster A12 − 1 added 5.0 0.5 Nondeterminism 0.0 0.00 6 2.5 0.25 0.50 0.75 0.25 0.50 0.75 Maruster A12 − 8 added 16 12 8 2 25 20 15 10 5 0 0.00 0.0 0.00 Maruster A12 − 4 added 4 0 0.00 Maruster A12 − 2 added 7.5 1.0 4 0.25 0.50 0.75 0 0.00 0.25 0.50 0.75 4 3 2 1 0 0.00 25 20 15 10 5 0 0.00 0.25 0.50 0.75 Maruster A12 − 16 added 0.25 0.50 0.75 Filter Maruster A12 − 32 added Direct Direct (a=1/|A|) Indirect Indirect (a=1/|A|) 0.25 0.50 0.75 Least−frequent−first Minimum % of activities explained Fig. 7 Nondeterminism on the log generated from the Maruster A12 model with inserted artificial chaotic activities. log L0 decreases w.r.t. an unfiltered log L depends on the activities that are filtered out: when very chaotic activities are filtered from L the behavior decreases much more than when very structured activities are filtered from L. One effect of this is that too much behavior in a process model affects the precision of that model more for the log from which the non-chaotic activities are filtered out than for the log from which the chaotic activities are filtered out. To measure the behavior allowed by the process model independent of which activities are filtered from the event log is to determine the average number of enabled activities when replaying the traces of the log on the model. To deal with traces of the event log that do not fit the behavior of the process model, we calculate alignments [3] between log and model. Alignments are a function Γ m : M × Σ + → B(P )+ that map each trace from the event log to a sequence of markings hm0 , . . . , mf i that are reached to replay that trace on the model, Title Suppressed Due to Excessive Length 15 with m0 the initial marking and mf ∈MF , such that for each two consecutive markings hmi , mi+1 i there exists a transition t ∈ T such that mi+1 = mi − •t + t•. Furthermore, alignments also provide a function Γ t : M × Σ + → T + that provides the sequence of transitions ht0 , . . . tn i that matches the changes in the sequence of markings, i.e., m1 = m0 − •t0 + t0 •, etc. For each trace σ ∈ Σ + that fits a process model N ∈ M the alignment l(Γ t (N, σ)) = σ. For unfitting traces σ ∈ Σ + , the alignment is such that l(Γ t (N, σ)) is as close as possible to l according to some cost function. We refer to Adriansyah et al. [3] for a more exhaustive introduction of alignments. Let Γ t denote the sequence consisting of only the visible transitions in Γ t , and let Γ m correspondingly denote the sequence of markings prior to each firing of a visible transition. Given a marking m ∈ B(P ) we define the nondeterminism of that marking to be the number of reachable visible transitions that can be fired γ as first next visible transition from m, i.e., nondeterminism(m) = |{a∈Σ|m −→ mi ∧ t∈γ ∧ l(t) = a ∧ ∀γi ∈γ γi ∈dom(l) =⇒ γi =t}|. We define the nondeterminism of a model N ∈ M given a trace σ ∈ Σ + as the average nondeterminism of the markings Γ m (N, σ) and define the nondeterminism for a model N and a log L as the average nondeterminism over the traces of L. Figure 6 shows the F-scores measured for different percentages of activities filtered out from the Maruster LA12 log with different numbers of uniform chaotic activities added. Note that the line stops when further removal of activities does not lead to further improvement in F-score. Note that on the original event log with 0 chaotic activities added the F-score on the original log is already 1.0, resulting in no lines being drawn. With one chaotic activity added, the least-frequent-first filter needs to remove 75% of the activities before it ends up with F-score 1, which can be explained by the fact that 9 out of 12 non-chaotic needed to be removed in order with the least-frequent-first filter to remove all uniform chaotic activities, as shown in Table 1. All entropy-based activity filtering techniques remove the chaotic activity in the first filtering step, immediately leading to an F-score of 1.0. Up until 8 added chaotic activities there is no difference between the entropy-based activity filtering techniques in terms of F-score of the resulting process models, which is consistent with the fact that all these filtering techniques were found to filter without errors for these number of inserted chaotic activities in Table 1. For 16 and 32 activities, the direct filtering methods outperform the indirect filtering methods, consistent with the fact that the indirect approach made one filtering error according to the ground truth for these numbers of added chaotic activities. Note that the least-frequent-first filter is outperformed by the entropy-based filtering methods in terms of F-score of the discovered models, as would be expected given the filtering results according to the ground truth. Figure 7 shows the results in terms of nondeterminism measured for different percentages of activities filtered out from the Maruster LA12 log with various numbers of uniform chaotic activities added. The results show very clearly that when filtering out a number of activities that is identical to the number of added chaotic activities (this corresponds to 92% for one added activity, 86% for two added activities, 75% for 4 added activities, 60% for 8 added activities, 43% for 16 added activities, and 27% for 32 added activities), the nondeterminism reaches a value of 1.5, which is the nondeterminism value of the model discovered from the original log without added chaotic activities. The least-frequent-first filter, however, leads to process models where many activities are enabled on average, therefore 16 Niek Tax et al. Table 2 An overview of the event logs used in the experiments Name BPI’12 [41] BPI’12 resource 10939 [39] Environmental permit [6] SEPSIS [26] Traffic Fine [10] Bruno [5] CHAD 1600010 [28] MIT A [36] MIT B [36] Ordonez A [31] van Kasteren [18] Cook hh102 labour [9] Cook hh102 weekend [9] Cook hh104 labour [9] Cook hh104 weekend [9] Cook hh110 labour [9] Cook hh110 weekend [9] Category Business Business Business Business Business Human behavior Human behavior Human behavior Human behavior Human behavior Human behavior Human behavior Human behavior Human behavior Human behavior Human behavior Human behavior # traces # events # activities 13087 49 1434 1050 150370 57 26 16 17 15 23 18 18 43 18 21 6 164506 1682 8577 15214 561470 553 238 2772 1962 409 220 576 210 2100 864 695 184 23 14 27 16 11 14 10 27 20 12 7 18 18 19 19 17 14 overgeneralizing the process behavior, as an effect of filtering out nonchaotic activities instead of the added chaotic activities. 5 Evaluation using Real Life Data For the experiments on real-life event logs we do not artificially insert chaotic activities to event logs, but instead filter directly on the activities that are present in these logs. Whether these logs contain chaotic activities that impact process discovery results is not known upfront. Therefore, we apply different activity filtering techniques to these logs and use them to filter out a varying number of activities, after which we assess the quality of the process model that is discovered from these filtered logs. Table 2 gives an overview of the real-life event logs that we use in the experiment. In total, we include five event logs from the business domain. Furthermore, we include twelve event logs that contain events of human behavior, recorded in smart home environments or through wearable devices. Mining process model descriptions of daily life is a novel application of process mining that has recently gained popularity [12, 22, 35, 40, 38]. Furthermore, human behavior event data are often challenging for process discovery because of the presence of highly chaotic activities, like going to the toilet. We perform the experiments with activity filtering techniques on real-life data with RapidProM [2], which is an extension that adds process mining capabilities to the RapidMiner platform for repeatable scientific workflows. For each event log, we apply seven different activity filtering techniques for comparison: 1) direct entropy filter without Laplace smoothing, 2) direct entropy filter 1 with Laplace smoothing (α= |Activities(L)| ), 3) indirect entropy filter without Laplace 1 smoothing, 4) indirect entropy filter with Laplace smoothing (α= |Activities(L)| ), 5) least-frequent-first filtering, 6) most-frequent-first filtering, 7) filtering the activities from the log in a random order. Recall that the activity filtering procedure stops at the point where all but two activities are filtered from the event log because process models that contain just one activity do not communicate any information Title Suppressed Due to Excessive Length BPI '12 BPI '12 resource 10939 17 Environmental permit SEPSIS Traffic Fine Management 1.00 0.75 IM 0.50 Filter F−score 0.25 Direct Direct (a=1/|A|) 0.00 1.00 Indirect Indirect (a=1/|A|) Least−frequent−first 0.75 IMf 20 0.50 0.25 0.00 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 Minimum % of activities explained Fig. 8 F-score on business logs dependent on the minimum share of activities remaining. regarding the relations between activities. For each event log and for each activity filtering approach we discover a process model after each filtering step (i.e., after each removal of an activity). The process discovery step is performed with two process discovery approaches: the Inductive Miner [19], and the Inductive Miner infrequent (20%) [20]. 5.0.1 Results on Business Process Event Logs Figure 8 shows the F-score of the process models discovered with the Inductive Miner [19] and the Inductive Miner with infrequent behavior filtering [20] (20% filtering) on the five business event logs for different percentages of activities filtered out and different activity filtering techniques. The figure shows an increasing trend in F-score for all event logs when more activities are filtered from the event log. Furthermore, the line for the least-frequent-first filtering approach is below the lines of the entropy-based filtering techniques for most of the percentages of activities removed on most event logs, which shows that entropy-based filtering enables the discovery of models with higher F-score compared to simply filtering out infrequent activities. There are a few exceptions where filtering out infrequent activities outperforms the entropy-based techniques, e.g., the Inductive Miner on the BPI ’12 resource 10939 event log (around 40% of activities explained) and the traffic fines event log (around 55% of activities explained). It differs between event logs which of the entropy-based techniques performs best: for the environmental permit log the indirect filter without Laplace smoothing almost dominates the other techniques while for the SEPSIS log the direct filter without Laplace smoothing outperforms the other techniques. Generally, it seems that the use of Laplace smoothing harms F-score, as most parts of the lines of indirect filtering with Laplace smoothing are below the lines of the indirect approach without Laplace smoothing, and similar for the direct approach with and without Laplace smoothing. However, the detrimental effect of Laplace smoothing does not seem to be large, and in some cases, the usage of Laplace smoothing in filtering increases the F-score of the discovered models. Figure 9 shows the nondeterminism of the process models as a function of the minimum percentage of activities. The green dashed line indicates the nondeterminism of the flower model, i.e., the process model that allows for all behavior over the 18 Niek Tax et al. BPI '12 BPI '12 resource 10939 Environmental permit SEPSIS Traffic Fine Management 15 10 IM Filter Nondeterminism 5 Direct Direct (a=1/|A|) 0 Indirect Indirect (a=1/|A|) 6 Least−frequent−first Flower model IMf 20 4 2 0 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 Minimum % of activities explained Fig. 9 Nondeterminism on business behavior logs dependent on the minimum share of the activities remaining. 1.00 BPI '12 BPI '12 resource 10939 Environmental permit SEPSIS Traffic Fine Management 0.75 Filter Direct (a=1/|A|) 0.50 IMf 20 Fitness Direct Indirect Indirect (a=1/|A|) Least−frequent−first Most−frequent−first Random 0.25 0.00 Fig. 10 Fitness on business logs with least 75% of the activities remaining. activities. The lines stop when further removal of activities does not lead to further improvement of nondeterminism. It is clear that the filtering mechanism of the Inductive Miner helps to discover process models that are more behaviorally constrained, as the nondeterminism values are lower for the Inductive Miner infrequent 20% compared to the Inductive Miner without filtering. However, the results show even when already using the 20% frequency filter of the Inductive Miner infrequent, the chaotic activity filter can lead to an additional reduction of nondeterminism. Furthermore, the results on the environmental permit log and the SEPSIS log show that filtering several chaotic activities from the event log also enables the discovery of a model with low nondeterminism using the Inductive Miner without filtering. Which of the activity filtering approaches works best seems to be dependent on the event log: the indirect entropy-based filter leads to the models with the lowest nondeterminism on the traffic fine event log, the environmental permit event log, while the direct entropy-based filter works better for some percentages of remaining activities for the SEPSIS log and the BPI ’12 resource 10939 log. Title Suppressed Due to Excessive Length BPI '12 BPI '12 resource 10939 Environmental permit 19 SEPSIS Traffic Fine Management 0.5 0.4 IM 0.3 0.2 Precision 0.1 0.0 0.5 0.4 IMf 20 0.3 0.2 0.1 0.0 Fig. 11 Precision on business logs with least 75% of the activities remaining. Figures 10 and 11 show the fitness and precision values for the business process event logs at the filtering step that leads to the highest F-score while describing at least 75% of the activities of the original log. In addition to the filtering techniques shown in Figure 8 it also shows the frequency-based activity filter where the most frequent activities are filtered out first, and a random baseline is shown which iteratively picks a random activity from the event log to filter out. The error bar for the random activity filter indicates one standard error of the mean (SEM) based on eight repetitions of applying the filter. The black dotted horizontal lines indicate the fitness and precision values of the process models discovered from the original event log without filtering any activities. Note that the fitness values are only shown for the Inductive Miner infrequent 20% [20] because the Inductive Miner without infrequent behavior filter [19] provides the formal guarantee that the fitness of the discovered model is 1. Figure 10 shows that generally, the differences in fitness between the models discovered from the filtered logs are very minor, and very close to the fitness of the unfiltered log (i.e., the dotted line). Figure 11, however, shows that the entropy-based filtering approaches outperform filtering out activities based on frequency and filtering out random activities from the event log. The F-scores of the discovered process models is determined mostly by the precision of the models because the activity filtering impacts precision more than it impacts fitness. One exception is the BPI’12 resource 10939 log [39], where the fitness decreases to below 0.75 as a result of applying one of the two frequency-based filters, while the precision increase as an effect of applying the filter is only minor. 5.0.2 Results on Human Behavior Event Logs Figure 12 shows the maximum F-score for different human behavior event logs as a function of the minimum percentage of activities that are remaining in the log. Again, the general pattern is that the F-score of the discovered process model decreases when the minimum percentage of events explained increases, as the process discovery task gets easier for smaller numbers of activities. The figure shows that filtering infrequent activities from the event log is dominated in terms 20 Niek Tax et al. Bruno CHAD 1600010 MIT A MIT B Ordonez A van Kasteren 1.00 0.75 IM 0.50 Filter F−score 0.25 Direct Direct (a=1/|A|) 0.00 1.00 Indirect Indirect (a=1/|A|) Least−frequent−first 0.75 IMf 20 0.50 0.25 0.00 0.00 0.25 0.50 0.75 0.0 0.2 0.4 0.6 0.8 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.0 0.2 0.4 0.6 0.8 Minimum % of activities explained Fig. 12 F-score on human behavior logs dependent on the minimum share of activities. Bruno CHAD 1600010 MIT A MIT B Ordonez A van Kasteren 15 Nondeterminism IM 10 Filter 5 Direct Direct (a=1/|A|) 0 Indirect Indirect (a=1/|A|) Least−frequent−first 10 Flower model IMf 20 5 0 0.00 0.25 0.50 0.75 0.0 0.2 0.4 0.6 0.8 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.0 0.2 0.4 0.6 0.8 Minimum % of activities explained Fig. 13 Nondeterminism on human behavior logs dependent on the minimum share of the activities remaining. of F-score by the entropy-based filtering techniques. Like on the business process event logs, there are mixed results on which of the four configurations of the entropy-based filtering technique leads to the highest F-score: on the CHAD event log the indirect activity filter outperforms the direct activity filter when using the Inductive Miner infrequent 20%; however, the direct activity filter leads to higher F-score for the Inductive Miner when filtering more than 50% of the activities. Figure 13 shows the nondeterminism results for the human behavior event logs. It is noticeable that the nondeterminism values of the process models that are discovered when filtering very few activities are much closer to the flower model compared to what we have seen before for the business process event logs. This is caused by human behavior event logs having much more variability in behavior compared to execution data from business processes, resulting in a much harder process discovery task. After filtering several chaotic activities, the nondeterminism drops significantly to ranges comparable to nondeterminism values seen for logs from the business process domain. This shows that the problem of chaotic activities is much more prominent in human behavior event logs than in business process event logs. The entropy-based activity filtering approaches lead to more deterministic Title Suppressed Due to Excessive Length Bruno CHAD MIT A 21 MIT B Ordonez A van Kasteren 0.8 0.6 IM 0.4 Filter Direct Precision 0.2 Direct (a=1/|A|) 0.0 Indirect 0.8 Least−frequent−first Indirect (a=1/|A|) Most−frequent−first 0.6 IMf 20 0.4 Random 0.2 0.0 Fig. 14 Precision on human behavior logs with at least 50% of the activities. process models compared to filtering out infrequent activities. Two clear examples of this are the MIT B log and the Ordonez A log, on which filtering out infrequent activities after several filtering steps results in a flower model (i.e., nondeterminism is identical to that of the flower model), while entropy-based activity filters enable the discovery of a model with nondeterminism close to one (i.e., very close to a sequential model) while at the same time keeping 75% of the activities in the event log. Figure 14 shows the precision values for the human behavior logs for the filtering step that leads to the highest F-score while describing at least 50% of the activities of the original log. Similarly to what we have seen in the nondeterminism graph, removing random activities from the log and removing infrequent activities from the log results in smaller precision increases compared to the entropy-based activity filters. Furthermore, it is noticeable that removing frequent activities from the log works quite well to improve the precision of models discovered from the human behavior application domain. The reason for this is that some of the chaotic activities that are present in many of those event logs, including going to the toilet and getting a drink, also happen to be frequent. On the van Kasteren event log the indirect activity filter with Laplace smoothing leads to the largest increase in precision when mining a model with at least 50% of the activities (from 0.324 to 0.732 with the Inductive Miner infrequent 20%). Table 3 shows in which order activities are filtered from the van Kasteren event log by 1) the indirect entropy-based activity filter with Laplace smoothing and 2) the least-frequent-first filter. It shows that the entropy-based filter filters use toilet as the first activity, which from domain knowledge we know to be a chaotic activity, as people generally just go to the toilet whenever they need to, regardless of which other activities they have just performed. For the infrequent activity filter use toilet would be the last choice of the activities to filter out, because it is the most frequent activity in the van Kasteren event log. Figures 15a and 15b show the corresponding process models discovered with the Inductive Miner infrequent 20% from the logs filtered with the indirect activity filter with Laplace smoothing and the infrequent activity filter respectively. The 22 Niek Tax et al. Table 3 Left: the order in which activities are filtered using the direct activity filter with 1 Laplace smoothing (α = |Activities(L)| ) on the van Kasteren log. Right: the order in which the activities are filtered using the least-frequent-first filter. Order 1 2 3 4 5 6 7 Filtered activity (indirect entropy-based filter with Laplace smoothing) Filtered activity (least-frequent-first filter) Use toilet Get drink Leave house Take shower Go to bed Prepare breakfast Prepare dinner Prepare dinner Get drink Prepare breakfast Take shower Go to bed Leave house Use toilet (a) (b) Fig. 15 (a) The model discovered with Inductive Miner infrequent 20% on the Van Kasteren log after filtering all but four activities with the indirect approach with Laplace smoothing, and (b) the model discovered from the same log with the same miner when filtering all but four activities when filtering out the least frequent activities. process model discovered after filtering three activities with the Indirect entropybased activity filter with Laplace smoothing is very specific on the behavior that it described: after going to bed, either the logging ends, or prepare breakfast occurs next, followed by taking a shower. After taking a shower, there is a possibility to either go to bed again or to prepare dinner before going to bed. The process model discovered after filtering three activities with the infrequent activity filter allows for many more traces: it starts with go to bed followed by use toilet, after which any of the activities go to bed, take shower, and leave house can occur as next event or the logging can end. Furthermore, the activities leave house and take shower can occur in any order, and take shower can also be skipped. Figure 16 shows the results on F-score for the human behavior event logs by Cook et al. [9]. The results on the Cook event logs are in-line with the results on the human behavior event logs, however, on these event logs, it is even more clear Title Suppressed Due to Excessive Length hh102 labour hh102 weekend hh104 labour 23 hh104 weekend hh110 labour hh110 weekend 1.00 0.75 IM 0.50 Filter F−score 0.25 Direct Direct (a=1/|A|) 0.00 1.00 Indirect Indirect (a=1/|A|) Least−frequent−first 0.75 IMf 20 0.50 0.25 0.00 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 Minimum % of activities explained Fig. 16 F-score on cook’s human behavior logs dependent on the minimum share of the activities remaining. hh102 labour hh102 weekend hh104 labour hh104 weekend hh110 labour hh110 weekend 16 12 IM Nondeterminism 8 Filter 4 Direct Direct (a=1/|A|) 0 Indirect 12.5 Indirect (a=1/|A|) Least−frequent−first 10.0 Flower model IMf 20 7.5 5.0 2.5 0.0 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 0.00 0.25 0.50 0.75 Minimum % of activities explained Fig. 17 Nondeterminism on cook’s human behavior logs dependent on the minimum share of the activities remaining. that filtering out infrequent activities leads to suboptimal process models in terms of F-score. Which of the filtering approaches results in the optimal process model in terms of F-score is very dependent on the event log and the minimum number of activities to be remained after filtering: each of the four configurations of the entropy-based filtering approach is optimal for at least one combination of log and minimum percentage of activities explained. Figure 17 shows the results in terms of nondeterminism for the same event logs. Filtering infrequent activities at high percentages of activities explained has much lower nondeterminism compared to the flower model, while further left on the graph, after filtering out more activities, the nondeterminism of filtering out infrequent activities gets closer to the flower model. This shows that filtering out infrequent activities can even be harmful to the quality of the obtained process discovery result. The nondeterminism values obtained with the four configurations of the entropy-based filtering approach are generally close to each other, where the optimal configuration is dependent on the log and the number of filtered activities. 24 Niek Tax et al. Average Winning Number 4 Filter 3 Direct Direct (a=1/|A|) Indirect Indirect (a=1/|A|) 2 Least−frequent−first Most−frequent−first Random 1 0 0.00 0.25 0.50 0.75 Minimum % of activities explained Fig. 18 The average winning number for the seven activity filtering techniques dependent on the minimum ratio of activities explained, averaged over the 17 event logs used in the experiment. Table 4 Kendall τb rank correlation between five activity filtering methods, mean and standard deviation over the 17 event logs. Direct 1 Direct (α= |A| ) Indirect 1 Indirect (α= |A| ) Least-frequent-first Direct 1 Direct (α= |A| ) Indirect 1 Indirect (α= |A| ) Least-frequent-first 1.0 0.2956 0.0829 0.1408 0.0504 0.2956 1.0 0.0698 0.0536 0.1454 0.0829 0.0698 1.0 0.6852 -0.0275 0.1408 0.0536 0.6852 1.0 -0.0392 0.0504 0.1454 -0.0275 -0.0392 1.0 5.0.3 Aggregated Analysis Over All Event Logs We have observed in Figures 9, 13, and 17 that the entropy-based activity filtering techniques perform differently on different datasets and for different numbers of activities filtered. To evaluate the overall performance of activity filtering techniques, we use the number of other filtering techniques that it can beat over all the seventeen event logs of Table 2. This metric, known as winning number, is commonly used for evaluation in the Information Retrieval (IR) field [32, 37]. Formally, winning number is defined as P P7 x x Wix = 17 j=1 k=1 1{Ni (j)<Nk (j)} where j is the index of an event log, i and k are indices of activity filtering techniques, Nix (j) is the performance of the i-th algorithm on the j-th event log in terms of nondeterminism where each least x% of activities are explained and 1{Nix (j)<Nkx (j)} is the indicator function ( 1, if Nix (j) < Nkx (j), 1{Nix (j)<Nkx (j)} = 0, otherwise. x Wx We define W i = 17i as the average number of other activity filtering techniques that are outperformed by filtering technique i at the point where at least x% of activities are explained. x Figure 18 shows the average winning number W i for different values of x and for the seven different activity filtering techniques. We observe that for higher ratios Title Suppressed Due to Excessive Length 25 Table 5 Number of event logs for which we can reject the null hypothesis that the orderings of activities returned by activity filters are uncorrelated, according to the tau test. Direct 1 Direct (α= |A| ) Indirect 1 Indirect (α= |A| ) Least-frequent-first Direct 1 Direct (α= |A| ) Indirect 1 Indirect (α= |A| ) Least-frequent-first 17 5 1 2 0 5 17 1 1 3 1 1 17 17 3 2 1 17 17 3 0 3 3 3 17 of activities explained the differences between filtering techniques are smaller than for lower numbers of activities explained. Intuitively this can be explained by the fact that for lower ratios of activities explained more activities have been filtered out from the log. Therefore the effect of the filtering techniques is more clearly visible. The figure shows that, up until +-74% of activities explained, the indirect entropy-based activity filtering technique leads to the most deterministic process models averaged over all event logs included in the experiment, where it outperforms between 4 and 4.5 other filtering techniques. Between +-75% and +- 87.5% the indirect entropy-based activity filtering technique with Laplace smoothing results in the highest average winning number, although the difference with the indirect entropy-based filtering technique seems negligible. Filtering out random activities from the event log outperforms none of the 6 other activities filtering techniques for the most of the graph, indicating that frequency-based filtering clearly outperforms filtering random activities. To investigate to what degree the order in which activities are removed from the logs differs between the activity filtering techniques we calculate Kendall’s tau (τb ) rank correlation for each log between the activity filtering techniques in a pairwise way. Table 4 shows the rank correlation values found between the activity filters, averaged over the 17 event logs. The indirect activity filter with Laplace smoothing and the indirect activity filter without Laplace smoothing generate orderings over the activities of a log that are strongly correlated. Between the direct activity filter without Laplace smoothing and the direct activity filter without Laplace smoothing there is only a weak correlation. All the other activity filtering techniques are uncorrelated or very weakly correlated. Using the Kendall τb statistic, we apply a tau test for each pair of activity filtering techniques on each event log to test the null hypothesis that the two orderings in which activities are filtered by the two activity filtering techniques are uncorrelated, using a significance level α = 0.05. For each pair of activity filtering techniques Table 5 shows the number of event logs for which the null hypothesis was rejected, i.e., the number of event logs for which the order in which activities are filtered is statistically correlated. The indirect activity filters with and without Laplace smoothing create correlated orderings of activities for all seventeen event logs. For all other pairs of activity filtering techniques the orderings in which activities are filtered are only correlated with for low numbers of event logs. 26 Niek Tax et al. Fig. 19 A mockup of the proposed way to use the activity filters in an interactive setting. 6 Entropy-based Toggles for Process Discovery In the previous section we have shown that all four configurations of the entropybased activity filtering technique lead to more deterministic process models compared to simply filtering out infrequent activities. However, the differences in determinism of the process models that are discovered after applying any of the four configurations are small and dependent on the event log to which they are applied. Furthermore, all four configurations of the activity filtering technique simply impose an ordering over the activities, but do not specify at which step the filtering should be stopped. Additionally, the proposed filtering technique ignores the semantics of activities: activities that are chaotic may still be relevant for the process. Leaving them out of the process model to discover will harm the usefulness of the discovered process model. To address the three issues we propose to use the filtering technique as a sorting technique over the activities in combination with toggles that interactively allow the process analyst to “disable” (filter out) or “enable” activities, and then rediscover and visualize the process model according to the new settings. This approach is similar to the Inductive Visual Miner [21], an interactive implementation of the Inductive Miner [20] algorithm which allows the process analyst to filter the event log interactively using a slider-based approach. The Inductive visual miner contains two sliders: with one slider activities can be filtered using the least-frequent-first filter, where the user can control how many activities are filtered out by moving the slider up and down. We propose to replace this slider with a sorted list of activities and toggles, as this allows the process analyst to override the ordering of the activities that is determined by the activity filtering technique with domain knowledge. Figure 19 shows a mockup of the proposed way to use the activity filter. Activities are by default sorted using the chaotic activity filter, showing the entropy to indicate the assessed degree of chaoticness of each activity. Based on this information, the process analyst can choose to rely on the filtering technique and filter out the top of the list or to override this list with domain knowledge. Furthermore, other activity filtering techniques, such as the least-frequent-first filter, can be included as an additional column on which the activities of the process Title Suppressed Due to Excessive Length 27 can be sorted. This allows the process analyst to control how many activities, and which activities, are filtered out of the process model, and thereby also empowers the user to prevent the removal of semantically important activities that should not be removed. Furthermore, this approach allows the process analyst to explore himself which of the filtering techniques leads to the most useful process model from the event log that he is analyzing. 7 Related Work Real life events logs often contain all sorts of data quality issues [34], include incorrectly logged events, events that are logged in the wrong order, and events that took place without being logged. Instances of such data quality issues are often referred to as noise. Many event log filtering techniques have been proposed to address the problem of noise. Existing filtering techniques in the process mining field can be classified into four categories: 1) event filtering techniques, 2) process discovery techniques that have an integrated filtering mechanism build in, 3) trace filtering techniques, and 4) activity filtering techniques. We use these categories to discuss and structure related work. 7.1 Event filtering Conforti et al. [8] recently proposed a technique to filter out outlier events from an event log. The technique starts by building a prefix automaton of the event log, which is minimal in terms of the number of arcs in the automaton, using an Integer Linear Programming (ILP) solver. Infrequent arcs are removed from the minimal prefix automaton, and finally, the events belonging to removed arcs are filtered out from the event log. Lu et al. [25] advocate the use of event mappings [24] to distinguish between events that are part of the mainstream behavior of a process and outlier events. Event mappings compute similar behavior and dissimilar behavior between each two executions of the process as a mapping: the similar behavior is formed by all pairs of events that are mapped to each other, whereas events that are not mapped are dissimilar behavior. Fani Sani et al. [13] proposes the use of sequential pattern mining techniques to distinguish between events that are part of the mainstream behavior and outlier events. All three of the event filtering techniques listed above aim filter out outlier events from the event log, while keeping the mainstream behavior. Event filtering techniques model the frequently occurring contexts of activities and filter out the contexts of activities that occur infrequently in the log. For example, consider an activity B such that 98% of its occurrences are in context h. . . , A, B, C, . . . i, with the remaining 2% of the events of activity B are in context h. . . , D, B, E, . . . i, then the B events that occur between D and E will be filtered out by event filtering techniques. Note that our filtering technique is orthogonal to event filtering: it would consider activity B to be nonchaotic and would not filter out anything. However, when a log L contains a chaotic activity X, then event filtering techniques are not able to remove all events of this chaotic activity. One of the contexts of X will 28 Niek Tax et al. by chance be more frequent than other contexts, i.e., for some activity A, it will hold that ∀B ∈ Activities(L) : #(hA, Xi, L) > #(hB, Xi, L), even though hA, Xi might only be slightly more frequent. This will result in X events after a B being removed, while the X events after an A remain in the log. Applying a process discovery technique to this filtered log will then result in a process model where activity X is misleadingly positioned after activity A, while in fact X can happen anywhere in the process. The activity filtering technique presented in this paper will instead detect that activity X is chaotic, and completely remove it from the event log, preventing the misleading effect of event filtering. 7.2 Process Discovery Techniques with Integrated Filtering Several process discovery algorithms offer integrated filtering mechanisms as part of the approach. The Inductive Miner (IM) [19] is a process discovery algorithm which first discovers a directly-follows graph from the event logs, where activities are connected that directly follow each other in the log, from which in a second step a process model is discovered. The directly-follows relations are affected by the presence of a chaotic activity X: sequence h. . . , A, X, C, . . . i leads to false directly-follows relations between A and X and between X and C, while the directly-follows relation between A and C is obfuscated by X. The Inductive Miner infrequent (IMf) [20] is an extension of the IM where infrequent directly-follows relations are filtered out from the set of directly-follows relations that are used to generate to process models. The filtering mechanism of IMf can help to filter out the directly-follows relations between A and X and between X and C, but it does not help to recover the obfuscated directly-follows relation between A and C. Instead, the activity filtering technique presented in this paper filters out the chaotic activity X, leading to sequence h. . . , A, X, C, . . . i being transformed into h. . . , A, C, . . . i, thereby recovering the directly follows relation between A and C. The Heuristics Miner [45] and the Fodina algorithm [4], in addition to the directly-follows relation, defines an eventually-follows relation between activities and allows the process analyst to filter out infrequent directly-follows and eventually follows relations. Two activities A and B are in an eventually-follows relation when A is eventually followed by B, before the next appearance of A or B. The eventuallyfollows relation, unlike the directly-follows relation, is not impacted by the presence of chaotic activities. The Heuristic Miner [45] and Fodina [4] both include filtering methods for the directly-follows and eventually-follows relations that are similar in nature to the filtering mechanism that is used in the Inductive Miner infrequent [20]. However, the use of sequential orderings and parallel constructs in the mining approaches of the Heuristic Miner [11] and Fodina [4] is based on the directlyfollows relations only, with the eventually follows relations being used for the mining of long-term dependencies. Furthermore, in contrast to the Inductive Miner, the process models discovered with the Heuristic Miner [45] or Fodina [4] can be unsound, i.e., the can contain deadlocks. The ILP-miner [46] is a process discovery algorithm where a set of behavioral constraints over activities is discovered for each prefix (called the prefix-closure) of the event log, based on which a process model is discovered that satisfies these constraints using Integer Linear Programming (ILP). Van Zelst et al. [47] proposed a filtering technique for the ILP-miner where the prefix closure of the event log Title Suppressed Due to Excessive Length 29 is filtered prior to solving the ILP problem by removing infrequently observed prefixes. It is easy to see that a chaotic activity X affect the prefix-closure that is discovered from the event log: given log consisting of two traces hA, X, Ci and hX, A, Ci, activity X causes the prefixes closures of the two traces to have no overlap in states, while without activity X the two traces are identical. This makes the filtering method of the prefix-closure proposed by Van Zelst et al. [47] less effective, as frequent prefixes randomly get distributed over several infrequent prefixes when chaotic activities are present. Instead, the chaotic activity filtering technique presented in this paper would remove chaotic activity X, leading to traces hA, X, Ci and hX, A, Ci becoming identical after filtering, therefore leading to a simpler process model while still describing the behavior of the event log accurately. The Fuzzy Miner [16] is a process discovery algorithm that aims at mining models from flexible processes, and it discovers a process model without formal semantics. The Fuzzy Miner discovers this graph by extracting the eventually follows relation from the event log, which is not affected by chaotic activities. Similar to the Heuristics Miner [45] and Fodina [4] the Fuzzy Miner allows to filter out infrequent eventually-follows relations between activities. In practice, the lack of formal semantics of the Fuzzy Miner models hinders the usability of the models, as the models are not precise on what behavior is allowed in the process under analysis. 7.3 Trace filtering Ghionna et al. [14] proposed a technique to identify outlier traces from the event log that consists of two steps: 1) mining frequent patterns from the event log, and 2) applying MCL clustering [43] on the traces, where the similarity measure for traces is defined on the number of patterns that jointly characterize the execution of the traces. Traces that are not assigned to a cluster by the MCL clustering algorithm are considered to be outlier traces and are filtered from the event log. It is easy to see that trace filtering techniques address a fundamentally different problem than chaotic activity filtering: in the event log shown in Figure 2b there are only two traces that do not contain an instance of chaotic activity X, therefore, even if a trace filtering technique would be able to perfectly filter out traces that contain a chaotic event, the number of remaining traces will become too small to mine a fitting and precise process model when the chaotic activity is frequent. 7.4 Activity filtering The modus operandi for filtering activities is to simply filter out infrequent activities from the event log. The plugin ’Filter Log using Simple Heuristics’ in the ProM process mining toolkit [42] offers tool support for this type of filtering. The Inductive Visual Miner [21] is an interactive process discovery tool that implements the Inductive Miner [20] process discovery algorithm in an interactive way: the process analyst can filter the event log using sliders and is then shown the process model that is discovered from this filtered log. One of the available sliders in the Inductive Visual Miner offers the same frequency-based activity filtering functionality. The 30 Niek Tax et al. working assumption behind filtering out infrequent activities is that when there are just a few occurrences of an activity, there is probably not enough evidence to establish their relation to other activities to model their behavior. However, as we have shown in this paper, for frequent but chaotic activities, while they are frequent enough to establish their relation to other activities, complicate the process discovery task by lowering directly-follows counts between other activities in the event log. The activity filtering technique presented in this paper is able to filter out chaotic activities, thereby reconstructing the directly-follows relations between the non-chaotic activities of the event log, at the expense of losing the chaotic activities. 8 Conclusion & Future Work In this paper, we have shown the possible detrimental effect of the presence of chaotic activities in event logs on the quality of process models produced by process discovery techniques. We have shown through synthetic experiments that frequencybased techniques for filtering activities from event logs, which is currently the modus operandi for activity filtering in the process mining field, do not necessarily handle chaotic activities well. As shown, chaotic activities can be frequent or infrequent. We have proposed four novel techniques for filtering chaotic from event logs, which find their roots in information theory and Bayesian statistics. Through experiments on seventeen real-life datasets, we have shown that all four proposed activity filtering techniques outperform frequency-based filtering on real data. The indirect entropy-based activity filter has been found to be the best performing activity filter overall averaged over all datasets used in the experiments; however, the performance of the four proposed activity filtering techniques is highly dependent on the characteristics of the event log. Because the performance of the filtering techniques was found to be logdependent, we propose the use the activity filtering techniques in a slider-based approach where the user can filter activities interactively and directly see the process model discovered from the filtered event log. Ultimately, only the user can decide which activities to include. In future work, we aim to construct a hybrid activity filtering technique that combines the four techniques proposed in this paper by using supervised learning techniques from the data mining field to predict the effect of removing a particular activity. References 1. van der Aalst WMP (2016) Process mining: data science in action. Springer 2. van der Aalst WMP, Bolt A, van Zelst SJ (2017) RapidProM: Mine your processes and not just your data. In: Hofmann M, Klinkenberg R (eds) RapidMiner: Data Mining Use Cases and Business Analytics Applications, Chapman & Hall/CRC Data Mining and Knowledge Discovery Series, p To Appear. 3. Adriansyah A, van Dongen BF, van der Aalst WMP (2011) Conformance checking using cost-based fitness analysis. In: Proceedings of the 15 IEEE International Enterprise Distributed Object Computing Conference (EDOC), IEEE, pp 55–64 Title Suppressed Due to Excessive Length 31 4. vanden Broucke SKLM, De Weerdt J (2017) Fodina: a robust and flexible heuristic process discovery technique. Decision Support Systems 5. Bruno B, Mastrogiovanni F, Sgorbissa A, Vernazza T, Zaccaria R (2013) Analysis of human behavior recognition algorithms based on acceleration data. In: Proceedings of the IEEE International Conference on Robotics and Automation, IEEE, pp 1602–1607 6. Buijs JCAM (2014) Receipt phase of an environmental permit application process (WABO), CoSeLoG project. doi:10.4121/uuid: a07386a5-7be3-4367-9535-70bc9e77dbe6 7. Buijs JCAM, van Dongen BF, van der Aalst WMP (2012) A genetic algorithm for discovering process trees. In: Proceedings of the 2012 IEEE Congress on Evolutionary Computation, IEEE, pp 1–8 8. Conforti R, La Rosa M, ter Hofstede AHM (2017) Filtering out infrequent behavior from business process event logs. IEEE Transactions on Knowledge and Data Engineering 29(2):300–314 9. Cook DJ, Crandall AS, Thomas BL, Krishnan NC (2013) CASAS: A smart home in a box. Computer 46(7):62–69 10. De Leoni M, Mannhardt F (2015) Road traffic fine management process. doi:10.4121/uuid:270fd440-1057-4fb9-89a9-b699b47990f5 11. De Weerdt J, De Backer M, Vanthienen J, Baesens B (2011) A robust Fmeasure for evaluating discovered process models. In: Proceedings of the IEEE Symposium on Computational Intelligence and Data Mining (CIDM), IEEE, pp 148–155 12. Dimaggio M, Leotta F, Mecella M, Sora D (2016) Process-based habit mining: Experiments and techniques. In: Proceedings of the International IEEE Conference on Ubiquitous Intelligence & Computing, IEEE, pp 145–152 13. Fani Sani M, van Zelst SJ, van der Aalst WMP (2017) Improving process discovery results by filtering outliers using conditional behavioural probabilities. In: Proceedings of the International Workshop on Business Process Intelligence, Springer 14. Ghionna L, Greco G, Guzzo A, Pontieri L (2008) Outlier detection techniques for process mining applications. In: International Symposium on Methodologies for Intelligent Systems, Springer, pp 150–159 15. Goedertier S, Martens D, Vanthienen J, Baesens B (2009) Robust process discovery with artificial negative events. Journal of Machine Learning Research 10(Jun):1305–1340 16. Günther CW, van der Aalst WMP (2007) Fuzzy mining–adaptive process simplification based on multi-perspective metrics. In: International Conference on Business Process Management, Springer, pp 328–343 17. Herbst J (2000) A machine learning approach to workflow management. In: European Conference on Machine Learning, Springer, pp 183–194 18. van Kasteren T, Noulas A, Englebienne G, Kröse B (2008) Accurate activity recognition in a home setting. In: Proceedings of the 10th International Conference on Ubiquitous Computing, ACM, pp 1–9 19. Leemans SJJ, Fahland D, van der Aalst WMP (2013) Discovering blockstructured process models from event logs - a constructive approach. In: International Conference on Applications and Theory of Petri Nets and Concurrency, Springer, pp 311–329 32 Niek Tax et al. 20. Leemans SJJ, Fahland D, van der Aalst WMP (2013) Discovering blockstructured process models from event logs containing infrequent behaviour. In: International Conference on Business Process Management, Springer, pp 66–78 21. Leemans SJJ, Fahland D, van der Aalst WMP (2014) Process and deviation exploration with inductive visual miner. In: Proceedings of the BPM Demo Track, CEUR-WS.org, vol 1295, p 46 22. Leotta F, Mecella M, Mendling J (2015) Applying process mining to smart spaces: Perspectives and research challenges. In: International Conference on Advanced Information Systems Engineering, Springer, pp 298–304 23. Lohmann N, Verbeek E, Dijkman R (2009) Petri net transformations for business processes–a survey. In: Transactions on petri nets and other models of concurrency II, Springer, pp 46–63 24. Lu X, Fahland D, van der Aalst WMP (2014) Conformance checking based on partially ordered event data. In: International Conference on Business Process Management, Springer, pp 75–88 25. Lu X, Fahland D, van den Biggelaar FJHM, van der Aalst WMP (2015) Detecting deviating behaviors without models. In: Proceedings of the International Workshop on Business Process Intelligence, Springer, pp 126–139 26. Mannhardt F (2016) Sepsis cases - event log. doi:10.4121/uuid: 915d2bfb-7e84-49ad-a286-dc35f063a460 27. Maruster L, Weijters AJMM, Aalst WMPvd, Bosch Avd (2006) A rule-based approach for process discovery: Dealing with noise and imbalance in process logs. Data Mining & Knowledge Discovery 13(1):67–87 28. McCurdy T, Glen G, Smith L, Lakkadi Y (2000) The national exposure research laboratory’s consolidated human activity database. Journal of Exposure Analysis and Environmental Epidemiology 10(6):566–578 29. Murata T (1989) Petri nets: Properties, analysis and applications. Proceedings of the IEEE 77(4):541–580 30. Object Management Group (2011) Notation (BPMN) version 2.0. OMG Specification 31. Ordónez FJ, de Toledo P, Sanchis A (2013) Activity recognition using hybrid generative/discriminative models on home environments using binary sensors. Sensors 13(5):5460–5477 32. Qin T, Liu TY, Xu J, Li H (2010) LETOR: A benchmark collection for research on learning to rank for information retrieval. Information Retrieval 13(4):346–374 33. Solé M, Carmona J (2013) Region-based foldings in process discovery. IEEE Transactions on Knowledge and Data Engineering 25(1):192–205 34. Suriadi S, Andrews R, ter Hofstede AHM, Wynn MT (2017) Event log imperfection patterns for process mining: Towards a systematic approach to cleaning event logs. Information Systems 64:132–150 35. Sztyler T, Völker J, Carmona Vargas J, Meier O, Stuckenschmidt H (2015) Discovery of personal processes from labeled sensor data: An application of process mining to personalized health care. In: Proceedings of the International Workshop on Algorithms & Theories for the Analysis of Event Data, CEURWS.org, pp 31–46 36. Tapia EM, Intille SS, Larson K (2004) Activity recognition in the home using simple and ubiquitous sensors. In: International Conference on Pervasive Computing, Springer, pp 158–175 Title Suppressed Due to Excessive Length 33 37. Tax N, Bockting S, Hiemstra D (2015) A cross-benchmark comparison of 87 learning to rank methods. Information Processing & Management 51(6):757– 772 38. Tax N, Sidorova N, Haakma R, van der Aalst WMP (2016) Event abstraction for process mining using supervised learning techniques. In: Proceedings of the SAI Intelligent Systems Conference, Springer 39. Tax N, Sidorova N, Haakma R, van der Aalst WMP (2016) Mining local process models. Journal of Innovation in Digital Ecosystems 3(2):183–196 40. Tax N, Sidorova N, Haakma R, van der Aalst WMP (2017) Mining process model descriptions of daily life through event abstraction. In: Intelligent Systems and Applications, Springer, p To appear. 41. Van Dongen B (2012) BPI challenge 2012. doi:10.4121/uuid: 3926db30-f712-4394-aebc-75976070e91f 42. Van Dongen BF, de Medeiros AKA, Verbeek HMW, Weijters AJMM, Van Der Aalst WMP (2005) The ProM framework: A new era in process mining tool support. In: International Conference on Application and Theory of Petri Nets, Springer, pp 444–454 43. Van Dongen S (2008) Graph clustering via a discrete uncoupling process. SIAM Journal on Matrix Analysis and Applications 30(1):121–141 44. Vanden Broucke SKLM, De Weerdt J, Vanthienen J, Baesens B (2013) Determining process model precision and generalization with weighted artificial negative events. IEEE Transactions on Knowledge and Data Engineering 45. Weijters AJMM, Ribeiro JTS (2011) Flexible heuristics miner (FHM). In: Proceedings of the IEEE Symposium on Computational Intelligence and Data Mining (CIDM), IEEE, pp 310–317 46. van der Werf JMEM, van Dongen BF, Hurkens CAJ, Serebrenik A (2009) Process discovery using integer linear programming. Fundamenta Informaticae 94(3):387–412 47. van Zelst SJ, van Dongen BF, van der Aalst WMP (2015) Avoiding overfitting in ILP-based process discovery. In: International Conference on Business Process Management, Springer International Publishing, pp 163–171 48. Zhai C, Lafferty J (2004) A study of smoothing methods for language models applied to information retrieval. ACM Transactions on Information Systems 22(2):179–214
2cs.AI
arXiv:1802.01880v1 [cs.CV] 6 Feb 2018 Learning Image Representations by Completing Damaged Jigsaw Puzzles Dahun Kim KAIST Donghyeon Cho KAIST Donggeun Yoo KAIST In So Kweon KAIST [email protected] [email protected] [email protected] [email protected] Abstract In this paper, we explore methods of complicating selfsupervised tasks for representation learning. That is, we do severe damage to data and encourage a network to recover them. First, we complicate each of three powerful self-supervised task candidates: jigsaw puzzle, inpainting, and colorization. In addition, we introduce a novel complicated self-supervised task called “Completing damaged jigsaw puzzles” which is puzzles with one piece missing and the other pieces without color. We train a convolutional neural network not only to solve the puzzles, but also generate the missing content and colorize the puzzles. The recovery of the aforementioned damage pushes the network to obtain robust and general-purpose representations. We demonstrate that complicating the self-supervised tasks improves their original versions and that our final task learns more robust and transferable representations compared to the previous methods, as well as the simple combination of our candidate tasks. Our approach achieves state-of-the-art performance in transfer learning on PASCAL classification and semantic segmentation. 1. Introduction The goal of representation learning is to learn robust and general-purpose visual features. Typically, the amount of labeled data decreases as the extent of annotation increases. The networks trained on limited amount of labeled data are easily overfitted and have poor representation ability. Representation learning is used to avoid this problem by pretraining visual features on large-scale data before training on target tasks. Conventional yet still popular method to learn such features is to pre-train image classification [11, 20, 33, 34] on millions of human-labeled data such as ImageNet [32]. It provides powerful representations and image priors when the target task and data are similar. However, the dependency on human supervision of this traditional method limits its scalability and adaptability to dissimilar target tasks and domains(e.g. depth prediction). (a) (b) Figure 1. Learning image representations by completing damaged jigsaw puzzles. We sample 3-by-3 patches from an image and create damaged jigsaw puzzles. (a) is the puzzles after shuffling the patches, removing one patch, and decolorizing. We push a network to recover the original arrangement, the missing patch, and the color of the puzzles. (b) shows the outputs; while the pixel-level predictions are in ab channels, we visualize with their original L channels for the benefit of the reader. Many researches have been conducted to minimize human supervision in computer vision. For example, weaklysupervised learning [10, 15–17, 27] has been proposed to learn object localization using weak image-level annotations rather than bounding boxes or pixel-level annotations. In the same vein, recent representation learning has also been improved to minimize human supervision. The emerging family of such methods is self-supervised learning; It manufactures a supervised task and labels from raw images, so that unlimited amount of labeled data can be used. A considerable number of such methods [4–6, 21, 22, 25, 26, 30,36–39] have been proposed in last few years. They often train a network to infer geometrical configuration [4,25], recover missing pixels [30] or channels [21,38,39] of images. The features learned by these methods have been successfully transferred to different target tasks, such as classification, detection, and semantic segmentation, and resulted in promising performances. The common intuition of these approaches is that a network obtains useful representations of scenes and objects while struggling to solve a challenge task that requires highlevel reasoning. Based on this idea, we propose a concept of complicating a self-supervised task where we raise the difficulty of the task. More specifically, we design more difficult versions of jigsaw puzzle, inpainting, and colorization tasks. We investigate the effectiveness of our approach by transferring the learned features on PASCAL VOC classification, detection, and segmentation tasks [7, 8]. In order to further the idea, we design a task called “Completing damaged jigsaw puzzle”, which is puzzles with one piece missing and the other pieces without color. Then, jigsaw puzzle, inpainting, and colorization tasks are jointly optimized. The network learned in this way preserves better feature representations for classification, detection and semantic segmentation. In summary, our main contributions are as follows: • We propose an approach of making self-supervised tasks more challenging for representation learning. • We design a problem of completing damaged jigsaw puzzles where three different self-supervised tasks are complicated and incorporated simultaneously. • We show that the representations learned by our approach achieve state-of-the-art performances on PASCAL classification and semantic segmentation [7, 8] when transferred on AlexNet, compared to existing self-supervised learning methods. 2. Related works A considerable number of unsupervised learning approaches have been studied to learn image representations without relying on human-annotation. The most fundamental example is the autoencoder [35], which is a generative model that reconstructs the input data, aiming to extract the data representation. Since then, various generative models rooted in the autoencoder have been proposed. For example, DCGAN [31] and variational auto-encoders [3] have been proposed for further photorealistic reconstruction and feature learning. Our study falls into self-supervised learning which has emerged as a new stream of unsupervised learning. This technique manufactures supervision signal from the raw visual data and achieves promising results in learning discriminative features. Recent methods commonly use images [4, 6, 21, 25, 26, 30, 38, 39], and often video [12, 24, 29, 36], or other sensory data such as egomotion and sound [1, 2, 13, 28]. Different supervision signals encourage the network to pay attention to different characteristics in images. Thus, the virtues of the learned representations also differ across the self-supervised tasks. Recent methods on selfsupervised feature learning can be broadly categorized according to the type of knowledge preferred in the training: spatial configuration, context, and cross-channel relations. Spatial Configuration. The methods that operate on the spatial dimension of images usually extract the patches from the image and learn the network to infer spatial relations between them. Doersch et al. [4] proposed a problem with 3-by-3 puzzles, where the network sees one of the outer patches, and predicts its relative position to the center patch. Noroozi and Favaro [25] learn image representations by solving the jigsaw puzzle with the 3-by-3 patches which imposes a challenging task of estimating what permutation has been used in shuffling. The learned features well capture the geometrical configuration of the objects as mentioned in [4]. Image Context. A contextual autoencoder was proposed by Pathak et al. [30] in order to drive representation learning. The supervisory signal comes from inpainting task where the network is encouraged to recover dropped part of the image from the surrounding pixels. Also, Isola et al. [12] exploited a co-occurance cues as a self-supervision where the network takes two isolated patches and predict whether or not they were taken from nearby locations in an image. These methods allow the network to learn contextual relations between part of an image and the rest or between each object parts/instances in an image. Cross-Channel Relations. The methods that manipulate the images in channel domain have also been proposed. Typically, they remove one subset of the image channels, and train the network to recover it from the remaining channel(s). Zhang et al. [38] and Larsson et al. [21] obtain selfsupervision from the task of colorization where the network predicts ab channels given L channel. Zhang et al. [39] took a one step further by learning colorization together with the inverse mapping from ab channels to L channel. Combining Multiple Self-supervised Tasks. The aforementioned methods are essentially relying on a single supervisory signal. Recently, representation learning by multiple supervisory signals has also emerged. Zhang et al. [39] proposed a bidirectional cross-channel prediction to aggregate complementary image representations. They propose a network split into to two groups, and each subnetworks are trained separately. Wang et al. [37] exploited two selfsupervised approaches to unify different types of invariance appearing in the two approaches. Doersch and Zisserman [5] combine multiple self-supervised tasks to create a single universal representation. However, each of the methods have limitations. In [39], splitting the network reduces the number of parameters by half which might limit the feature transferability. Also, [37] trains two tasks in sequential order. That is, the training on ranking video frames [36] comes only after the training on estimating relative position [4] finishes. Lastly, the involved tasks in [5] operate (a) (b) (c) (d) (e) (f) (g) Figure 2. Illustrations of complicating self-supervised tasks. (a) Conventional 2×2 jigsaw puzzles. (b) Complicated 2×2 jigsaw puzzles; each patch’s L or ab channel is dropped. (c) Complicated 2×2 jigsaw puzzles; one of the patches is completely dropped. (d) Conventional inpainting. (e) Complicated inpainting; it outputs in ab channels from an input in only L channel. (f) Conventional colorization. (g) Complicated colorization; only one-quarter of the entire image is given for colorization. on very different inputs, which hinders simultaneous training of all tasks and requires special handlings. Our study shares the goal with [37,39] and [5] where we want to learn representations that have all-round capability in every downstream task. However, our approach differs in the strategy; We squeeze a network to solve more complicated tasks, and in the same vain, our final method combines the complicated tasks and trains them simultaneously. 3. Approach A number of recent self-supervised learning methods commonly operate via damage-and-recover mechanisms. In other words, the networks are supervised to recover intentionally damaged image data. For the purpose of representation learning, the damages are designed so that the recovery requires the high-level understanding of the objects and the scene. During training, the representations that are necessary for the recovery are learned, resulting in task/damage-specific features. For example, the spatial configuration is damaged in jigsaw puzzles, so the learned representations are focused on the configuration and geometry of objects. Similarly, the representations learned from inpainting and colorization preferably encode contextual and cross-channel relations as analyzed in [30] and [21], respectively. Motivated by the mechanism above, we design a strategy where we drive the network to recover even more severe damage. More specifically, we do further damage to the data in jigsaw puzzle, inpainting, and colorization to make them more challenging as illustrated in Fig. 2. The methods of complicating each of the tasks are explained in Sec. 3.1. Furthermore, in order to maximize the effectiveness of our approach, we incorporate those three tasks in a single problem, “Completing damaged jigsaw puzzles”, as detailed in Sec. 3.2. 3.1. Complicating Each Self-supervised tasks In this section, we briefly review each of jigsaw puzzle, inpainting and colorization, and explain the methods of complicating them. Considering that different damages teach different lessons, we do additional damage to the data domains that have remained intact in the original task. The effectiveness of the complicated versions is quantitatively evaluated in Sec. 5.1. Jigsaw Puzzle. With 2-by-2 puzzles, let us define S a sequence of puzzle patches X 1 -X 4 shuffled by a permutation P . The spatial configuration of objects is intermixed by the permutation. Accordingly, we consider two additional types of damage that make jigsaw puzzles more difficult. First, we do damage in the channel-wise domain, where half of the puzzles have only the L channel and the other half, ab channels, as shown in Fig. 2-(b). Successfully solving the puzzles requires not only the knowledge on spatial configuration, but also the understanding of the cross-channel relations between L and ab channels. Second, we damage the image context by removing one piece from a complete set of puzzles, as shown in Fig. 2-(c). In practice, a piece is discarded with a probability of 0.4 and the missing contents are replaced with Gaussian noise. Doing well on this task may require extra understanding on the full context without seeing the missing area. As in [25], we train an AlexNet-based network to learn a mapping P̂ = f jig (S) to a probability distribution over 24(that is, 4!) possible permutations P̂ ∈ [0, 1]24 with loss, Ljig = − X P log(P̂ ). (1) fc10 fc9 conv1 ~ conv7 * L_jig. * conv8 conv8 conv8 conv1 ~ conv7 * conv10 conv9 conv1 ~ conv7 conv9 L_inp. L_col. : Shuffle : Concatenate : Arrange * : Shared weights Figure 3. The architecture for “Completing damaged jigsaw puzzles”. It is a 9-tower siamese network. The shared tower(colored in gray) consists of AlexNet conv1-7 layers. note f c6-7 are converted into equivalent conv6-7 layers for the pixel-level outputs. The task branches for jigsaw puzzle, inpainting, and colorization are marked in blue, red, and orange, respectively. The learned shared tower is used for transfer learning on downstream tasks. Inpainting. Inpainting is a problem of restoring lost regions of an image. In the field of representation learning, a small patch Xp is removed from the image X, and remaining parts Xr are used for inferring the removed patch Xp . It is formulated as X̂p = f inp (Xr ). (2) By solving this problem, the network learns contextual information of Xr and between Xr and Xp . In order to do damage of a different flavor, we discard a subset of image channels. Unlike the original inpainting where all channels are given (Fig. 2-(d)), our complicated inpainting requires generation of ab channels of the missing region from the surrounding pixels in L channel (Fig. 2-(e)). While struggling to solve this problem, the network learns cross-channel relations as well as the contextual information. We use Euclidean distance between the prediction and the ground truth as a loss as proposed in [30] as Linp = Xˆpab − f inp (XrL ) 2 , 2 (3) where superscripts L and ab denote the input’s L and ab channels, respectively. Colorization. Colorization and other cross-channel prediction tasks [21, 38, 39] discard and recover a subset of image channels to learn cross-channel relations. Additional damage for more difficult colorization takes place in the context domain. We encourage the network to see only part of images, and colorize in the absence of the full context. Specifically, we feed the network with the L channel of only one patch out of the 2×2 puzzles, and push it to colorize the patch as shown in Fig. 3.1-(g). The colorization becomes more difficult since only one-quarter of the entire image is available. As in [38], the network learns a mapping Xˆab = fcol (X L ) to a probability distribution over possible colors Xˆab ∈ [0, 1]313 , where the ab are quantized to 313 values. We train the network with the 313-way classification loss as, Lcol = − X v(X ab log(Xˆab )), (4) where v(·) denotes a color-class rebalancing term. 3.2. Completing Damaged Jigsaw Puzzles In order to further develop our idea, we design our final problem, “Completing damaged jigsaw puzzles”, by involving all the damages and recoveries mentioned above. As its name indicates, this problem requires the simultaneous recovery of the following damages: (1) shuffling the image patches, (2) discarding one patch, (3) dropping ab channels in all the patches. During training, the network is encouraged to arrange the puzzles, recover the missing context, and colorize the patches. In practice, recovering the missing patch is defined as generating ab channels of the missing region from the surrounding pixels in L channel. Recent self-supervised learning methods that use multiple self-supervised tasks either assign separate features to each tasks [39], train each tasks in sequential order [37], or jointly train the tasks [5]. We share with them the goal of learning a single set of well-rounded representations. However, our approach complicates each involved tasks to fuel the damage-and-recover, whereas the previous methods adopt the original form of existing self-supervised tasks. More specifically, our final problem involves a jigsaw puzzle with one piece missing, inpainting across channels, and colorization with a narrower view, which are more complicated than their predecessors. Also, each tasks are intermingled in a way that some tasks share the knowledge. That is, the understanding of cross-channel relation supports both the colorization and the inpainting, and the contextual information is shared across all tasks. As a result, the network learns to effectively integrate and propagate the different knowledge on the spatial configuration, image context, and cross-channel relations into the final representations. Finally, all our involved tasks share the input space: a set of damaged puzzles. This makes our approach immune to the risk in [5, 39] that use different inputs for each tasks, where the network might task-specifically encode the representations depending on the type of inputs, as stated in [5]. In practice, our method operate on 3×3 puzzles rather than 2×2, for more discriminative representations. Architecture and Losses. Our architecture is shown in Fig. 3. It is a 9-tower siamese network as in [25]. The shared tower follows the standard AlexNet [20] to provide a fair comparison with recent self-supervised learning methods [4, 6, 21, 25, 26, 30, 36–39]. The task branches of the jigsaw puzzle, inpainting, and colorization are rooted to the shared tower, and colored in blue, red, and orange, respectively. In the jigsaw branch, 9 sets of the common features (conv7 features) pass through a fully-connected layer, f c8(blue), and are concatenated, then fed into two more fully-connected layers up to f c10(blue), resulting in a 1000long vector. We use the same Ljig as Eq. (1). In the inpainting branch, the 9 features go through a 1×1 convolutional layer. This time, we arrange the features before concatenating them as we know what permutation has been used in the inputs. After two more 1×1 convolutions(conv9, conv10, red), the features have a volume of 7 × 7 × 313, where 313 denotes the number of quantized color values as in [38]. Note that we use a classification loss rather than Eq. (3) as, X Lcls v(Xpab log(Xˆpab )), (5) inp = − where Xˆpab denotes the predicted chromaticity values of the missing puzzle. Each of the 9 features is fed into the colorization branch, resulting in 9 branches. Each branch is an equivalent form of the network in [38] which has two more 1 × 1 convolutions(conv8, conv9, orange) after the shared tower, resulting in features of 7 × 7 × 313. Our colorization loss is a sum of the 9 losses of Eq. (7) as, Lcol 9 X X =− ( v(Xiab log(Xˆiab ))), three losses as, Lf inal = Ljig + αLcls inp + β Lcol , where α and β are weighting parameters. Simple Combination. We also consider combining the original forms of self-supervised tasks, conceptually following [5]. We jointly train original versions of the three tasks: jigsaw puzzles, inpainting, and colorization. Although the types of involved tasks are different to [5], we provide a self-comparison on the effectiveness of our approach and the simple combination in Sec. 5.3. 4. Training We train our proposed network on 1.3M images from the training set of ImageNet without annotations. We resize the input images to 312×312 pixels, and extracted patches of 140×140 and 85×85, in 2-by-2 and 3-by-3 puzzles, respectively. We use caffe [14] for implementation. The network is trained by ADAM optimizer [18] for 350K iterations with batch size of 64 on a machine with a GTX 1080-Ti GPU and an intel i7 3.4GHz CPU. The learning rate is set to 10−3 , and is dropped by a factor of 0.1 every 100K iterations. We use α, β = 0.01 for the experiment in Sec. 3.2. Inpainting and colorization of Sec. 3.1 follow the protocol of their original papers [30, 38], respectively. 5. Results and Discussions In this section, we provide both quantitative and qualitative evaluations and discussions of our self-supervised learning approach. Further transfer learning results on new tasks(e.g. depth prediction) and with deeper network(e.g. vgg [33]) are presented in our supplementary material. 5.1. Fine-tuning on PASCAL In this section we evaluate the effectiveness of both the “Complicating each self-supervised tasks” in Sec. 3.1 and our final task, “Completing damaged jigsaw puzzles” in Sec. 3.2. To do this, we transfer the learned representations to a standard AlexNet [20] and rescale the weights via [19]. We test on some or all of the PASCAL tasks, using VOC 2007 [7] for classification and detection, VOC 2012 [8] for segmentation; these are standard benchmarks for representation learning. 5.1.1 (6) i=1 where Xi denotes ith of the input patches. Finally, our loss for “Completing damaged jigsaw puzzles” is the sum of the (7) Complicating each self-supervised task In Sec. 3.1, we explore the idea of complicating the jigsaw puzzle, inpainting, and colorization to benefit representation learning. We evaluate the effectiveness of each complications by comparing the performances before and after Method Jigsaw( Sec. 3.1) Jigsaw( Sec. 3.1) Jigsaw( Sec. 3.1) Inpainting [30] Inpainting( Sec. 3.1) Colorization [38] Colorization( Sec. 3.1) Complication None L-or-ab dropped A piece removed None Cross-Channel None Narrow view Class. 64.7 65.5 65.3 56.5 57.7 65.9 66.7 Segm. 34.9 35.7 35.7 29.7 30.2 35.7 36.8 Table 1. Effectiveness of complicating self-supervised tasks on PASCAL. Classification is evaluated on PASCAL VOC 2007 with testing frameworks from [19], using mean average precision(mAP) as a performance measure. Segmentation is evaluated on PASCAL VOC 2012 with testing framework from [23], which reports mean intersection over union(mIU). the complications in downstream tasks: classification and semantic segmentation. The results are shown in Table. 1. In all cases, the complicated self-supervised tasks consistently achieve higher scores than their predecessors both in classification and segmentation. These results indicate that the capacity of the network was still above the difficulty of the existing selfsupervised tasks, and that indeed, useful representations can be extracted more via solving more difficult tasks. 5.1.2 Completing Damaged Jigsaw Puzzles We evaluate how beneficial is our final self-supervised task, “Completing damaged jigsaw puzzles”, in learning representations. We transfer the learned weights from the shared tower Fig. 3 on classification, detection, and semantic segmentation. As shown in Table. 2, our method outperforms all the previous methods in classification and segmentation, and achieves the second best performance in the detection task, even though the network has been exposed only on grayscale images during pretraining. We also summarize the comparison on classification and segmentation tasks in Fig. 4 which indicates that our approach learns more robust and general-purpose representations in comparison to each of the involved tasks and all the conventional methods. 5.2. Linear Classification on ImageNet We test the task-generality of our learned representations on large-scale representation learning benchmarks. As proposed in [38], we freeze each layer of our learned features from conv1 to conv5, and initialize the subsequent unfrozen layers with random values. Then, we train linear classifiers on top of each layer on labeled ImageNet [32] dataset. The result is shown in Table. 3. ImageNet-pretrained AlexNet shows the best performance and is the upper bound in this comparison. Since our network only learns from L channel, conv1 features suffer lack of input information, resulting in slightly lower score compared to other meth- Method ImageNet [20] Random RelativePosition [4] Jigsaw [25] Ego-motion [36] Adversarial [6] Inpainting [30] Colorization [38] Split-Brain [39] ColorProxy [21] WatchingObjectMove [29] Counting [26] CDJP Class. 79.9 53.3 65.3 67.6 54.2 58.6 56.5 65.9 67.1 65.9 61.0 67.7 69.2 Det. 56.8 43.4 51.1 53.2 43.9 46.2 44.5 46.9 46.7 52.2 51.4 52.4 Segm. 48.0 19.8 37.6 34.9 29.7 35.6 36.0 38.4 36.6 39.3 Table 2. Evaluation of transfer learning on PASCAL. Classification and detection are evaluated on PASCAL VOC 2007 with testing frameworks from [23] and [9], respectively. Both tasks are evaluated using mean average precision(mAP) as a performance measure. Segmentation is evaluated on PASCAL VOC 2012 with testing framework from [23], which reports mean intersection over union(mIU). Method ImageNet [20] Random RelativePosition [4] Jigsaw [25] Adversarial [6] Inpainting [30] Colorization [38] Split-Brain [39] Counting [26] CDJP conv1 19.3 11.6 16.2 18.2 14.1 17.7 12.5 17.7 18.0 14.5 conv2 36.3 17.1 23.3 28.8 20.7 24.5 24.5 29.3 30.6 27.2 conv3 44.2 16.9 30.2 34.0 21.0 31.0 30.4 35.4 34.3 32.8 conv4 48.3 16.3 31.7 33.9 19.8 29.9 31.5 35.2 32.5 34.3 conv5 50.5 14.1 29.6 27.1 15.5 28.0 30.3 32.8 25.7 32.9 Table 3. Linear classification on ImageNet. We train linear classifiers on top of each layer of the learned feature representations. We use publicly available testing code from [38] and report top1 accuracy of AlexNet on ImageNet 1000-way classification. The learned weights between conv1 and the displayed layer are frozen. ods. However, it overcomes this handicap immediately from conv2 layer, and achieves competitive performances in higher layers. Finally, conv4 and conv5 features achieve the second best and state-of-the-art performances, respectively. As shown in [25], the last layers of the pretrained network tend to be task-specific, while the first layers are general-purpose. In our proposed architecture(Fig. 3), this transition from general-purpose to task-specific is delayed and left to the task branches. Since the last features of the shared tower must support all three different, they should remain as general as possible, rather than get biased to either of the tasks. Also, the network can hardly assign separate features to each tasks since the features required by the tasks often overlap, thus it has to integrate and hold the different features up to the last layers. Combination Class. Segm. Jig. 66.6 36.8 Jig.+Inp. 67.4 37.9 Jig.+Col. 68.4 38.6 Jig.+Inp.+Col./simple 68.0 38.1 Jig.+Inp.+Col.(CDJP) 69.2 39.3 Table 4. Comparing different combinations of self-supervised tasks on PASCAL. we evaluate different combinations of selfsupervised tasks on PASCAL classification and segmentation in the same setting as in Table. 1. We make different combinations using our architecture (Fig. 3) with or without certain task branches; this may have caused slight performance differences from the original task. We also report the result of simple combinations where the original versions of each tasks are jointly trained. 5.3. Comparing Combinations of Self-supervised tasks In order to show the impact of each task, we evaluate different combinations on PASCAL classification and semantic segmentation tasks. We experiment with the same architecture Fig. 3, but with or without certain task branches to make different combinations. In addition, as we mentioned in Sec. 3.2, we provide the result of the simple combination of the tasks in their original form, which conceptually follows [5]. The results are shown in Table. 4. We set the jigsaw puzzle as our starting point and add different tasks to it. We can see that the performances increase every time the tasks are combined. Our final method which combines all three tasks obtains the best scores and improves our jigsaw puzzle by 2.6% and 2.5%scores both in classification and semantic segmentation tasks. The simple combination of the original versions slightly improves their single-task baselines [25, 30, 38] in both test tasks, but not better than our Jig.+Col. and Jig.+Inp.+Col.(CDJP) methods. 5.4. Nearest Neighbor Search The pretrained networks recognize the semantic similarity of data by their own standards. We qualitatively evaluate the validity of this reasoning of the networks by performing ‘nearest neighbor search’ which has been proposed in [4] and further used in [26, 37]. In this experiment we compare AlexNets [20] pretrained by different methods: jigsaw puzzle [25], inpainting [30], colorization [38], ours, and ImageNet classification [20]. We perform retrieval on f c6 (the feature before the concatenation) for jigsaw puzzle, conv5 (the last layer of the encoder) for inpainting, and conv7/f c7 features for the remaining methods. Single-task Baselines. As in figure 5, the learned representations in each methods show distinct characteristics. For example, the jigsaw puzzle representations retrieve ob- Figure 4. Summarization of performances of different selfsupervised learning methods and combinations. We compare the state-of-the-art methods(Table. 2), our final method (CDJP), and each involved tasks in our final method and the simple combination( Table. 4). The involved tasks, their original versions, the simple combination, the other existing methods, and our final method are marked in orange, green, gray, blue and red, respectively. Note that Jig. is what we reproduced in our architecture. jects with the same pose and shape. Even in the blurred image, it retrieves objects with similar silhouettes. In inpainting, objects that would co-occur or share the similar background are retrieved, such as things to ride for horse and caregivers for baby. The features learned by colorization is often color-specific, and retrieves babies wearing pink clothes for baby, and sometimes false samples with bluegreen color for bottle. Also, blurred objects a retrieved for the blurred image. Such color-sensitivity sometimes misrepresent semantics, e.g. a brown chair back is retrieved for horse image. Similarity to ImageNet Classification Pretraining. Note that we consider pretraining on ImageNet classification as our gold standard in this qualitative evaluation. Our approach integrates the characteristics of the single-task baselines, yet mostly complement and overcome the aforementioned sensitivities. First, our approach is more invariant to pose/viewpoint variations compared to jigsaw puzzle baseline, and represents horses and babys in different pose and viewpoint as semantically nearby, which is also the case in ‘ImageNet’ model. Furthermore, our representations are more robust in intra-class color variations, and retrieves objects with various colors according to horse, baby, and bottle query images, which also raise our model closer to our gold standard. Our model also adopts the virtues of the single-task baselines. To illustrate, for blurred object, as in colorization, our model retrieves images that are semantically ambiguous. We can see the same tendency in the Jig. Inp. Col. Ours INet Jig. Inp. Col. Ours INet Figure 5. Nearest Neighbor Search. We perform image retrieval on the object instances cropped from the PASCAL VOC 2012 [8] trainval dataset. The query images are in red boxes. Down from the top rows are the retrieval results of jigsaw puzzle, inpainting, colorization, our method, and ImageNet classification, respectively. ‘ImageNet’ model, where it may consider the query image to be vague, and retrieves also blurred objects in different categories. Finally, our model adopts a reasonable understanding on the image context, which enabled the retrieval of co-occurable objects, e.g., person with horse and parent with baby. Interestingly, we observe that the ‘ImageNet’ retrieves images where person and horse; caregiver and baby appear together, similarly to ours. These results can be viewed as one reason that our approach can propagate the high-level semantics through our model, and raise its robustness and task generality of our representations. ing. Furthermore, we design “Completing damaged jigsaw puzzles” as a more complicated and complex problem for self-supervised representation learning. While learning to recover and colorize original image content simultaneously, rich and general-purpose visual features are encoded into the network. Experiments contain transfer learning on PASCAL VOC classification, detection and segmentation, ImageNet linear classification as well as nearest neighbor search. All of the results clearly show that the features learned by our method generalize well across different highlevel visual tasks. 6. Conclusions Acknowledgements This research is supported by the Study on representation learning for object recognition funded by the Samsung Electronics Co., Ltd (Samsung Research) In this paper, we study complicating self-supervised tasks for representation learning. We propose complicated versions of jigsaw puzzles, inpainting and colorization and show their effectiveness on representation learn- References [1] P. Agrawal, J. Carreira, and J. Malik. Learning to see by moving. In 2015 IEEE International Conference on Computer Vision, ICCV 2015, Santiago, Chile, December 7-13, 2015, 2015. [2] R. Arandjelovic and A. Zisserman. Ambient sound provides supervision for visual learning. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2017. [3] M. W. Diederik P Kingma. Auto-encoding variational bayes. In Proc. of Int’l Conf. on Learning Representations (ICLR), 2014. [4] C. Doersch, A. Gupta, and A. A. Efros. Unsupervised visual representation learning by context prediction. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2015. [5] C. Doersch and A. Zisserman. Multi-task self-supervised visual learning. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2017. [6] J. Donahue, P. Krähenbühl, and T. Darrelln. Adversarial feature learning. In Proc. of Int’l Conf. on Learning Representations (ICLR), 2017. [7] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2007 (VOC2007) Results. http://www.pascalnetwork.org/challenges/VOC/voc2007/workshop/index.html. [8] M. Everingham, L. Van Gool, C. K. I. Williams, J. Winn, and A. Zisserman. The PASCAL Visual Object Classes Challenge 2012 (VOC2012) Results. http://www.pascalnetwork.org/challenges/VOC/voc2012/workshop/index.html. [9] R. Girshick. Fast r-cnn. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2015. [10] H.Bilen and A. Vedaldi. Weakly supervised deep detection networks. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2016. [11] K. He, X. Zhang, S. Ren, and J. Sun. Deep residual learning for image recognition. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2016. [12] P. Isola, D. Zoran, D. Krishnan, and E. H. Adelson. Learning visual groups from co-occurrences in space and time. In ICLR Workshop, 2015. [13] D. Jayaraman and K. Grauman. Learning image representations tied to egomotion from unlabeled video. Int’l Journal of Computer Vision (IJCV), 125(1-3):136–161, 2017. [14] Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. [15] Z. Jie, Y. Wei, X. Jin, J. Feng, and W. Liu. Deep self-taught learning for weakly supervised object localization. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. [16] V. Kantorov, M. Oquab, M. Cho, and I. Laptev. Contextlocnet: Context-aware deep network models for weakly supervised localization. In Proc. of European Conf. on Computer Vision (ECCV), 2016. [17] D. Kim, D. Cho, and D. Yoo. Two-phase learning for weakly supervised object localization. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2017. [18] D. P. Kingma and J. Ba. Adam: A method for stochastic optimization. In Proc. of Int’l Conf. on Learning Representations (ICLR), 2015. [19] P. Krähenbühl, C. Doersch, J. Donahue, and T. Darrell. Datadependent initializations of convolutional neural networks. In Proc. of Int’l Conf. on Learning Representations (ICLR), 2016. [20] A. Krizhevsky, I. Sutskever, and G. E. Hinton. Imagenet classification with deep convolutional neural networks. In Proc. of Neural Information Processing Systems (NIPS), 2012. [21] G. Larsson, M. Maire, and G. Shakhnarovich. Colorization as a proxy task for visual understanding. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. [22] H.-Y. Lee, J.-B. Huang, M. Singh, and M.-H. Yang. Unsupervised representation learning by sorting sequences. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2017. [23] J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2015. [24] I. Misra, C. L. Zitnick, and M. Hebert. Shuffle and learn: Unsupervised learning using temporal order verification. In Proc. of European Conf. on Computer Vision (ECCV), 2016. [25] M. Noroozi and P. Favaro. Unsupervised visual representation learning by context prediction. In Proc. of European Conf. on Computer Vision (ECCV), 2016. [26] M. Noroozi, H. Pirsiavash, and P. Favaro. Representation learning by learning to count. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2017. [27] M. Oquab, L. Bottou, I. Laptev, and J. Sivic. Is object localization for free? - weakly-supervised learning with convolutional neural networks. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2015. [28] A. Owens, J. Wu, J. H. McDermott, W. T. Freeman, and A. Torralba. Look, listen and learn. In Proc. of European Conf. on Computer Vision (ECCV), 2016. [29] D. Pathak, R. B. Girshick, P. Dollár, T. Darrell, and B. Hariharan. Learning features by watching objects move. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017. [30] D. Pathak, P. Krähenbühl, J. Donahue, T. Darrell, and A. A. Efros. Context encoders: Feature learning by inpainting. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2016. [31] A. Radford, L. Metz, and S. Chintala. Unsupervised representation learning with deep convolutional generative adversarial networks. In Proc. of Int’l Conf. on Learning Representations (ICLR), 2016. [32] O. Russakovsky, J. Deng, H. Su, J. Krause, S. Satheesh, S. Ma, Z. Huang, A. Karpathy, A. Khosla, M. Bernstein, A. C. Berg, and L. Fei-Fei. ImageNet Large Scale Visual Recognition Challenge. Int’l Journal of Computer Vision (IJCV), 115(3):211–252, 2015. [33] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. CoRR, abs/1409.1556, 2014. [34] C. Szegedy, W. Liu, Y. Jia, P. Sermanet, S. Reed, D. Anguelov, D. Erhan, V. Vanhoucke, and A. Rabinovich. Going deeper with convolutions. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2015. [35] P. Vincent, H. Larochelle, I. Lajoie, Y. Bengio, and P.-A. Manzagol. Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. J. Mach. Learn. Res., 11:3371–3408, 2010. [36] X. Wang and A. Gupta. Unsupervised learning of visual representations using videos. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2015. [37] X. Wang, K. He, and A. Gupta. Transitive invariance for self-supervised visual representation learning. In Proc. of Int’l Conf. on Computer Vision (ICCV), 2017. [38] R. Zhang, P. Isola, and A. A. Efros. Colorful image colorization. In Proc. of European Conf. on Computer Vision (ECCV), 2016. [39] R. Zhang, P. Isola, and A. A. Efros. Split-brain autoencoders: Unsupervised learning by cross-channel prediction. In Proc. of Computer Vision and Pattern Recognition (CVPR), 2017.
1cs.CV
1 1 PREPRINT VERSION Matrix MultiMatrix Factorization Factorization for for Nonparametric Nonparametric MultiSource Properties SourceLocalization Localization Exploiting Exploiting Unimodal Unimodal Properties arXiv:1711.07457v1 [cs.IT] 20 Nov 2017 Junting JuntingChen Chenand and Urbashi Urbashi Mitra Mitra Ming Hsieh Department of Electrical Engineering, California Ming Hsieh Department of Electrical Engineering, University University of of Southern Southern California Los Angeles, CA 90089 USA, email:{juntingc, ubli}@usc.edu Los Angeles, CA 90089 USA, email:{juntingc, ubli}@usc.edu Abstract—Herein, Abstract—Herein,the theproblem problemofofsimultaneous simultaneous localization localization of ofmultiple multiplesources sourcesgiven givena anumber number ofof energy energy samples samples atat different differentlocations locationsis isexamined. examined.The Thestrategies strategiesdo donot not require require knowledge of of thethe signal knowledge signalpropagation propagationmodels, models,nor nordo dothey theyexploit exploit thethespatial spatialsignatures signaturesofofthe thesource. source.AAnonparametric nonparametric source source localization framework localization frameworkbased basedonona amatrix matrixobservation observationmodel modelisis developed. It It is is shown developed. shownthat thatthe thesource sourcelocation locationcan canbe beestimated estimated byby localizing localizingthethepeaks peaksofofa apair pairofoflocation locationsignature signaturevectors vectors extracted extractedfrom fromthetheincomplete incompleteenergy energyobservation observation matrix. matrix. AA robustpeak peaklocalization localizationalgorithm algorithmisisdeveloped developedand and shown shown toto robust decrease source localizationmean meansquared squarederror error(MSE) (MSE)faster faster decrease thethe source localization 1.51.5 than O(1/M ) with samples.ToToextract extractthe thesource sourcesignature signature than O(1/M ) with MMsamples. vectors from a matrixwith withmixed mixedenergy energyfrom frommultiple multiplesources, sources, vectors from a matrix a unimodal-constrainedmatrix matrixfactorization factorization(UMF) (UMF)problem problemisis a unimodal-constrained formulated, andtwo tworotation rotationtechniques techniquesare aredeveloped developedtotosolve solve formulated, and UMF efficiently. Our numericalexperiments experimentsdemonstrate demonstratethat that thethe UMF efficiently. Our numerical proposed schemeachieves achievessimilar similarperformance performanceasasthe thekernel kernel thethe proposed scheme regression baseline usingonly only1/5 1/5energy energymeasurement measurementsamples samples regression baseline using detecting singlesource, source,and andthe theperformance performancegain gainisismore more in in detecting a asingle significant in the cases of detecting multiple sources. significant in the cases of detecting multiple sources. IndexTerms—Source Terms—Sourcelocalization, localization, unimodal, unimodal, sparse sparse signal signal Index processing, matrixcompletion, completion,nonparametric nonparametricestimation estimation processing, matrix I NTRODUCTION I. I.I NTRODUCTION Source localizationis isimportant importantininmany manydomains, domains,such suchas as Source localization salvage, exploration, tactical surveillance, and hazard findsalvage, exploration, tactical surveillance, and hazard finding.However, However,ininmany manyapplication applicationscenarios, scenarios, itit isis difficult difficult ing. to obtain the correct propagation parameters of the source to obtain the correct propagation parameters of the source signal for localization. For example, in underwater localization signal for localization. For example, in underwater localization with acoustic signals, the signal propagation depends on the with acoustic signals, the signal propagation depends on the water temperature, pressure, and salinity, which are locationwater temperature, pressure, and salinity, which are locationdependent. In gas source localization, the gas diffusion chardependent. In gas source localization, the gas diffusion characteristics depends on the chemical type and the atmospheric acteristics depends on the chemical type and the atmospheric conditions. Therefore, model-based parametric localization conditions. Therefore, model-based localization methods [1]–[6] may not be reliableparametric in application scenarios methods [1]–[6] may not be reliable in application scenarios with a temporal and spatial varying nature. with Model-free a temporal positioning and spatialschemes, varying nature. such as connectivity based Model-free positioning schemes, as connectivity based localizations and weighted centroidsuch localizations (WCL), have localizations and weighted centroid localizations (WCL), have attracted a lot of interest due to their simplicity in impleattracted a lot interest due tototheir simplicity in implementation andof the robustness variations of propagation mentation and the robustness to variations of propagation properties [7]–[12]. However, connectivity based techniques properties [7]–[12]. However, connectivity based techniques [7], [8] can only provide coarse localization results and the [7],performance [8] can only provide coarse localization results and the of WCL [9], [10] highly depends on the choice performance of WCL [9], [10] highly depends on the choice of parameters and the propagation environments. Recently, of machine parameters and the propagation Recently, learning techniques, such environments. as kernel regression and machine learning techniques, such as kernel regression and This research has been funded in part by one or more of the following grants: ONR N00014-15-1-2550, CCF-1718560, This research has been funded inNSF part CNS-1213128, by one or moreNSF of the following NSF ONR CCF-1410009, NSF CPS-1446901, and AFOSR FA9550-12-1-0215. grants: N00014-15-1-2550, NSF CNS-1213128, NSF CCF-1718560, NSF CCF-1410009, NSF CPS-1446901, and AFOSR FA9550-12-1-0215. Figure 1. Left: Energy measurements at different locations (colored-squares) Figure 1. Left: Energy measurements at different locations (colored-squares) to localize two sources (red stars). Right: The underlying energy field appears to localize two sources (red stars). Right: The underlying energy field appears as one peak when the two sources are close to each other. as one peak when the two sources are close to each other. support vector vector machines machines [13]–[15] [13]–[15] have support have also also been been explored explored for localization. However, these methods usually for localization. However, these methods usually require require aa separate training training phase phase which which may may not separate not be be available available in in practice. practice. This paper studies nonparametric methods for This paper studies nonparametric methods for localizing localizing several sources sources based based on on aa few several few energy energy measurements measurements atat different sensing locations as illustrated in Fig. different sensing locations as illustrated in Fig. 1. 1. Our Ourprevious previous works studied the single source case in [11], [16], works studied the single source case in [11], [16], where where aa trust region was developed for targeting the source and a multitrust region was developed for targeting the source and a multistep exploration-exploitation strategy was developed for active step exploration-exploitation strategy was developed for active search using an underwater robot. The results were extended search using an underwater robot. The results were extended to the cases of two or more sources by exploiting novel to the cases of two or more sources by exploiting novel coordinate system rotation techniques [12], [17]. However, coordinate system rotation techniques [12], [17]. However, these works were based on a decomposable assumption on the these works were based on a decomposable assumption on the matrix formed by the energy measurements in a discretized 2D matrix formed by the energy measurements in a discretized 2D area. area. In this paper, we find that the decomposable assumption In this paper, we find that the decomposable assumption is not necessary. Specifically, we show that the source loiscation not necessary. Specifically, we show that the source loin 2D can be found by localizing the peaks of a cation in 2D can be found by localizing the peaks of aa pair of location signature vectors that are obtained from pair of location signature vectors that are obtained from sparsely observed energy matrix based on measurements ina sparsely observed energy measurements a discretized 2D area, andmatrix such a based result on holds universally asin along discretized 2D area, and such a result holds universally as as the signal energy decays in all directions away from long as the signal energy decays in all directions away from the source location. Therefore, the method is robust in a lot of the source propagation location. Therefore, the method is robust a lot of unknown environments. In addition, weinquantify unknown propagation environments. In addition, we quantify the performance degradation when the actual energy matrix is the degradation when the actual energystrategies matrix is notperformance ideally rank-1. Based on this model, we develop not ideally rank-1. Based on this model, we develop strategies to localize multiple sources by overcoming three additional tochallenges: localize multiple by peak overcoming threealgorithms additional First, wesources formulate localization challenges: First, we vectors formulate peak localization algorithms for noise corrupted extracted from a sparse energy for noise corrupted a sparse energy observation matrix. vectors Second, extracted we designfrom matrix factorization observation matrix. we design matrix factorization techniques to extractSecond, the source signature vectors from the techniques to extract the source signature vectors from the PREPRINT VERSION 2 matrix that collects mixed energy from multiple sources. Note that the singular value decomposition (SVD) framework in our preliminary work [12], [16] does not work herein since the signature vectors may not be orthogonal. Third, we develop optimization techniques for the optimal rotation of the coordinate system, which determines how to arrange the measurements into the horizontal and vertical entries of the observation matrix. To summarize, the following contributions are made herein: • We propose an energy matrix observation model and prove that the matrix has a unimodal property, where the left and right dominant singular vectors, corresponding to each source, are unimodal with their peaks representing the source locations. • We develop localization algorithms that exploit the unimodal and symmetric property. We prove that the location MSE decreases faster than O(1/M 1.5 ) in the single source case. • For the case of multiple sources, we develop optimization techniques to establish an optimal coordinate system with an rotation angle adaptive to the unknown source topology. • We show that the optimal rotation can be found by maximizing the normalized dominant singular value of the observation matrix in the two source case. • For the case of arbitrary number of sources, we solve a UMF problem and show that the convergence can be enhanced by rotating the coordinate system to minimize the normalized dominant singular value. The rest of the paper is organized as follows. Section II establishes the matrix observation model and develops the unimodal property of source signature vectors. Section III studies the case of single source and develops the MSE localization performance. Section IV and V develop rotation optimization techniques for establishing the coordinate system in the two source and arbitrary number of sources cases. Numerical results are presented in Section VI and conclusion is given in Section VII. Notation: Vectors are written as bold italic letters x and matrices as bold capital italic letters X . Random variables, random vectors, and random matrices are written as x, bold letters x, and bold capital letters X, respectively. For a matrix X, Xij denotes the entry in the ith row and jth column of X. For a vector x, xi denotes the ith entry of x. For a set X , |X | denote the Cardinality of X , i.e., the number of elements in X . The notation o(x) means limx→0 o(x)/x → 0, and O(x) means lim supx→0 O(x)/x < ∞. II. S YSTEM M ODEL A. Signal Model Assume that there are K sources in an area with radius L/4. The location of source k is denoted by s k ∈ R2 . The sources continuously emit signals that form an aggregated energy field, which can be measured at M different sensing locations that are distributed uniformly and randomly in the target area A with radius L/2. Let d(z , s) = kz − sk2 be the distance between the sensing location at z ∈ R2 and a source location s. The energy measurement h(m) at the mth sensing location z (m) is given by h(m) = K X αk h(d(z (m) , s k )) + n(m) (1) k=1 where αk is the transmit power of source k and n(m) is the additive noise of the mth measurement with zero mean and variance σn2 . The function h(d) is a non-negative strictly decreasing function of the distance d from the source. In addition, we assume that h(d) is Lipschitz continuous and square-integrable. Without loss of generality (w.l.o.g.), assume RR that R2 h(d(z, s))2 dz = 1. Note that neither the source power αk nor the function h(d) are known. B. Non-parametric Matrix Observation Model 1) Matrix Model of the Energy Field: We discretize the L × L area containing the target area, A, into N √1 × N2 grid points. W.l.o.g., assume that N1 = N2 = N ≥ M , and the grid points are equally spaced. Let H (k) ∈ RN ×N be the discretized energy field matrix of source k, i.e., the (i, j)th element of H (k) is given by (k) Hij = L αk h(d(c i,j , s k )) N (2) where c i,j ∈ R2 is the center location of the (i, j)th grid and L is for normalization purposes: the factor N X  L 2 2 h(d(c i,j , s k ))2 H (k) F = α2k N i,j ZZ  L  2 ≈ α2k (3) = α2k h(d(z, s k ))2 dz + o N A where we have assumed that h(d(z, s)) has a negliRR h(d(z, s k ))2 dz ≈ gible tail outside of A, i.e., 2 R RR 2 1 h(d(z, s k )) dz. A P Consider the SVD of H (k) = i σk,i u k,i v Tk,i , where σk,i denote the ith largest singular value of H (k) . In particular, denote uk = uk,1 and vk = vk,1 . Then, we have the following model for the K source energy field. Definition 1 (Signature vector and signature matrix). The signature matrix for all K sources is defined as H , K X k=1 H (k) = K X k=1 σk,1 uk vkT + K X N X σk,i u k,i v Tk,i (4) k=1 i=2 where the vectors uk and vk , are called the signature vectors of source k. Definition 2 (Unimodal). A vector v ∈ RN is unimodal if the following is satisfied: 0 ≤v1 ≤ v2 ≤ · · · ≤ vs vs ≥ vs+1 ≥ · · · ≥ vN ≥ 0 (5) (6) for some integer 1 ≤ s ≤ N , where vi is the ith entry of v. 1 Note that the proposed algorithm does not require such an assumption. This approximation is just for the ease of discussion. PREPRINT VERSION 3 We show that the signature vectors uk and vk are unimodal and symmetric about the source location. Theorem 1 (Unimodal Signature Vector). The signature vectors uk and vk are unimodal. In addition, suppose that source k locates inside the (m, n) th grid. Then the peaks of uk and vk locate at the mth entry of uk and the nth entry of vk , respectively. Proof: See Appendix A. Theorem 1 confirms the unimodal property of the signature vectors extracted from the rank one approximation of any energy field. Such a property holds universally as long as the propagated energy is a strictly decreasing function of the distance from the source. Note that the result in Theorem 1 is not trivial, as such a unimodal property does not hold for other singular vectors uk,i , vk,i , for i = 2, 3, . . . , N . Consider a Cartesian coordinate system C, where the xaxis corresponds to a row of the grid centers and the y-axis corresponds to a column. Denote the vector of x coordinates of a row ci,1 , ci,2 , . . . , ci,N as cX = [cX,1 , cX,2 , . . . , cX,N ] for all rows i, and the vector of y coordinates of a column cN,j , cN −1,j , . . . , c1,j as cY = [cY,1 , cY,2 , . . . , cY,N ] for all columns j. Proposition 1 (Symmetric Signature Vector). For each source k, the signature vectors can be approximated by unimodal and (k) symmetric vectors ůk and v̊k , such that Hij −αk ůk,i v̊k,j ≤ K L h √ , where Kh is a bounded constant such that |h(d1 ) − 2N h(d2 )| ≤ Kh |d1 − d2 | for all d1 ,p d2 ≥ 0. In addition, ůk L/N w(cY,i + δ2 − sk,2 ) and v̊k can be obtained as ů = k,i p and v̊k,j = L/N w(cX,j + δ1 − sk,1 ), where [sk,1 , sk,2 ] = sk are the source coordinates, [δ1 , δ2 ] = sk − cm,n is the distance from the source sk to the nearest grid center cm,n , and w(x) is a non-negative, unimodal, and symmetric function, d i.e., w(x) ≥ 0, w(x) = w(−x), and dx w(x) < 0 for x > 0. Proof: See Appendix B. The results in Theorem 1 and Proposition 1 suggest a decoupled source localization strategy for the x coordinate and the y coordinate, respectively: the source location sk can be found from localizing the peaks of one-dimension data arrays uk and vk extracted as the dominant singular vectors of H (k) . Note that, by contrast, existing nonparametric methods (e.g., weighted centroid and kernel regressions) require iterative search in two-dimensional (or, in general, 2K-dimensional) source location space. Such insight leads to the following observation model. 2) Matrix Observation Model: Let H be the N × N observation matrix that contains the M energy measurements. Specifically, the (i, j)th entry of H is given by Hij = L (m) h N (7) if the mth energy measurement is taken inside the (i, j)th grid. Note that the measurement location z (m) may not be at the center ci,j of the grid. There are two strategies for constructing the observation √ matrix H. In a conservative construction, we choose N = M and the matrix is fully observed.2 We may extract the signature vectors directly √ from H. In an aggressive construction, we choose N > M and the matrix H is partially observed. C. Problem Formulation Denote by UsN the cone specified by the unimodal conS N straints (5) – (6) for a fixed s. Denote U N = N s=1 Us as the non-negative unimodal cone, and U N ×K as the set of N × K real matrices where all the columns are in U N . Let U , V ∈ RN ×K be the matrices that each contains K pairs of signature vectors {uk , vk } to be determined. Let W ∈ RN ×N be an indicator matrix that describes the sampling strategy, where Wij = 1, if (i, j) ∈ Ω, and Wij = 0, otherwise, where Ω denotes the set of entries that are assigned values based on (7), |Ω| = M . Based on the unimodal property developed in Theorem 1, we are interested in extracting from H the vectors that are unimodal. Specifically, the source signature vectors can be extracted by solving the following UMF problem with missing values:  2 P1 : minimize W  H − UV T F (8) U ,V subject to U ∈ U N ×K , V ∈ U N ×K (9) where  denotes the Hadamard product, i.e., W  H is an N × N matrix computed entry-by-entry with W  H ij = Wij Hij . Note that the above sparse matrix factorization problem is formulated under a specific coordinate system C. If we rotate the coordinate system θ degrees from a reference system C0 , the resulting rotated coordinate system is denoted by Cθ . Then the problem P1 is to find Uθ and Vθ from observation matrices Hθ and Wθ in the coordinate system Cθ . In general, P1 is difficult to solve because the objective function is non-convex and the constraints are also nonconvex. However, as to be discussed in the remaining part of this paper, there are some θ that make P1 easier to solve. In the special cases of K = 1, 2, one can even find unique solutions to a relaxed version of P1 for some coordinate system Cθ . III. S PECIAL C ASE I: S INGLE S OURCE In the single source case, the eigenstructure of the signature matrix H is invariant under any rotation of the coordinate system Cθ . We show that the factorization problem P1 can be easily solved by a matrix completion problem followed by SVD. Therefore, the remaining challenge is to estimate the peaks of the signature vectors and to study the localization performance to justify the estimation strategy. A. Solution via Matrix Completion Without the unimodal constraints (9), P1 is a classical rank-K matrix completion problem. It has been shown in the sparse signal processing literature that, under some mild 2 For easy elaboration, assume that the M sensing locations distribute over M distinct grids. PREPRINT VERSION 4 regularization conditions on the low rank matrix H (e.g., strong incoherence property and small rank property of H, see [18], [19]), the matrix H can be recovered, with a high probability, from the sparse and noisy observation W  H. Specifically, the noisy recovery of H can be obtained as a solution, X̂, to the following convex optimization problem [16], [19]: P2 : minimize kXk∗ X X Xij − Hij subject to (10) 2 (i,j)∈Ω ≤ ǫ2 where kXk∗ denotes the nuclear norm of X (i.e., the sum of the singular values of X), and ǫ2 is a small parameter (depending on the observation noise [19]) for the tolerance of the observation noise in H. Note that under exact recovery X̂ = H in the K = 1 case, the signature vectors can be extracted from the SVD of the rank-1 matrix X̂ = α̂1 û1 v̂T1 . The unimodal constraints (9) are then automatically satisfied. As a result, an efficient solution to the sparse matrix factorization problem P1 can be obtained as the dominant singular vectors of X̂ as the solution to P2. B. Peak Localization Exploiting Symmetry We first establish the property of the symmetric function w(x) specified in Proposition 1. The autocorrelation of w(x) is given by Z ∞ τ (t) = w(x)w(x − t)dx (11) −∞ which can be shown to be monotonic for t > 0. Lemma 1 (Monotone property of τ (t)). The autocorrelation function τ (t) is non-negative and symmetric. In addition, τ (t) is strictly decreasing in t > 0. Proof: The result can be easily derived using the unimodal and symmetric property of w(x). The details are omitted here due to page limit. From Lemma 1, τ (t) is maximized as t = 0. As a result, the non-negative, unimodal, and symmetric function w(x − s1,1 ) from Proposition 1 has the following autocorrelation function Z ∞ w(x − s1,1 )w(−x + t − s1,1 )dx (12) −∞ Z ∞ = w(x − s1,1 )w(x − t + s1,1 )dx (13) Z−∞ ∞ = w(z)w(z + 2s1,1 − t)dz (14) −∞ = τ (t − 2s1,1 ) which is maximized at t = 2s1,1 , where the first equality (13) is due to symmetry w(x) = w(−x), and the second equality (14) is from the change of variable z = x − s1,1 . Let v̂1 be the dominant right singular of X̂, the solution to P2. From Proposition 1, v̂1 is a noisy discretization of w(x− s1,1 ). As an estimate of the location s1,1 , the x coordinate of the source, can be given by 1 (15) ŝ1,1 (v̂1 ) = argmax R(t; v̂1 ) 2 t∈R where R(t; v̂) = Z ∞ v̂(x)v̂(−x + t)dx (16) −∞ is the reflected correlation function given v̂ ∈ RN , in which, v̂(x) is a continuous (nonparametric) regression function based on v̂. For example, v̂(x) can be obtained by v(x) = v̂i if x = cX,i , i = 1, 2, . . . , N , and by linear interpolation between v̂i and v̂i+1 if cX,i < x < cX,i+1 , where v̂i is the ith entry of v̂.3 The estimator (15), as motivated by the form of the integral (12), computes the correlation of the data from both sides of the point the function v̂(x) is symmetric about. As a result, the peak location estimator from v̂ uses all N entries for estimation rather than merely a local subset of the entries around the peak location. The location estimate, ŝ1,2 , from û1 can be obtained in a similar fashion. C. Squared Error Bound Let e(x) = v̂(x) − w(x − s1,1 ) be the error between the non-parametric regression function v̂(x) obtained from interpolating v̂1 and the function w(x− s1,1 ) from Proposition 1. Define κ = (σ1,1 − σ1,2 )/α1 as the normalized difference between the first dominant singular value and the second dominant singular value of the energy filed matrix H (1) in (4) for a single source. We have the following theorems to characterize the squared estimation error kŝ1 − s1 k22 of the source location s1 . We first consider the conservative construction of the ob√ servation matrix, where N = M and all the entries of H are observed, and therefore the signature vectors û1 and v̂1 are directly extracted as the dominant left and right singular vectors of H. Theorem 2 (Squared Error Bound under the Conservative Construction). Suppose that there exists 0 < RCe < ∞, ∞ such that the interpolation error e(x) satisfies R −∞ w(x − ∞ s1,1 ) e(−x + t) − e(−x + t′ ) dx ≤ Ce −∞ w(x − ′ s1,1 )e(x)dx for all t, t ≥ 0 and N → ∞. Then, for M = N 2 under asymptotically large N , 8L2 σn2  2Ce  4Kh2 L4 (17) + kŝ1 − s1 k22 ≤ ′′ 2 3 |τ (0)|κ N N α21 with probability 1, where τ ′′ (0) is the second order derivative of τ (t) evaluated at t = 0. Proof: See Appendix C. Remark 1. The terms Kh (Lipschitz continuity parameter) and −τ ′′ (0) capture the sharpness of p the energy field. For a 2 Gaussian source energy field, h(d) = 2γ/πe−γd , one can ′′ calculate that −τ (0) = γ. We now evaluate the case of the aggressive construction, √ where N > M and the matrix H is partially observed. The 3 Other nonparametric smoothing methods can be applied, such as knearest neighbor (KNN) regression and kernel regression [13], [14]. However, determining the best method to obtain v̂(x) is beyond the scope of this paper. PREPRINT VERSION 5 signature vectors û1 and v̂1 are extracted from X̂, a solution to the matrix completion problem P2 based on H. Theorem 3 (Squared Error Bound under the Aggressive Construction). Suppose that the measurement noise n(m) is bounded by |n(m) | < σ̄n and the sampling error of H is P 2 bounded as (i,j) Hij −Hij ≤ ǫ2 , where ǫ is the parameter used in P2. Assume that the matrix dimension N = N (M ) is chosen as the largest integer such that M ≥ βCN (log N )2 for some constant C and β. Then, under the condition of Theorem 2, for asymptotically large N , 512Ce L2  Kh2 L2 kŝ1 − s1 k22 ≤ ′′ + |τ (0)|κ2 2N 2 √ 2Kh L σ̄n σ̄ 2  + n2 (18) N α1 α1 with high probability. Proof: See Appendix C. We draw the following observations from the analytical results in Theorems 2 and 3. Efficiency of the Signature Matrix Model H: The parameter 0 < κ ≤ 1 captures how precisely the outer product u1 v1T of the signature vectors may approximate the energy field matrix H for a single source. In the ideal case where H is rank1, we have κ = 1 leading to a low MSE. For most practical propagation models we have tested (e.g., propagations of radio signals over the air, acoustic signals in the water, etc.), κ is close to 1. Performance Advantage of the Aggressive Construction Strategy: It can be verified that in the high signal-to-noise ratio (SNR) case α1 /σn2 , α1 /σ̄n2 ≫ 1, as the number of samples M increases, the squared error bound (18), which exploits matrix completion techniques under partial sampling, decreases at a higher rate in terms of M than the result in (17) under full sampling. Therefore, with a proper choice of the parameters β and C, the aggressive construction strategy can achieve the same localization performance using fewer measurements. Sparsity and Noise Suppression Tradeoff: While the aggressive construction strategy achieves higher squared error decay rate in terms of the number of samples M under high SNR , α1 /σ̄n2 ≫ 1, it is less tolerant of measurement noise as observed from the last terms in (17) and (18), respectively. Specifically, in the low SNR case, the squared error bound of the aggressive construction strategy scales as 1 1 ), whereas, it scales as O( N SNR ) for the conservative O( SNR construction strategy. Performance Scaling Law: As a performance benchmark, for a naive scheme that estimates the source location directly from the position of the measurement sample that observes the highest power, the localization squared error decreases as O(1/M √ ), whereas, even for the conservative construction case N = M of the proposed scheme, the squared error decreases as O(1/M 3/2 ) in high SNR case α1 /σn2 ≫ 1, order-wise faster than the naive scheme. These results then confirm that by exploiting the unimodal and symmetry properties as well as sparse signal processing techniques, the proposed algorithm will significantly improve the localization resolution. IV. S PECIAL C ASE II: T WO S OURCES In the case of two sources, the SVD may not extract the desired signature vectors from H in (4), because u1 and u2 are not necessarily orthogonal. However, it turns out that by choosing an appropriate coordinate system C, the UMF problem P1 can be trivially solved (under some mild conditions). In this section, we propose rotation techniques to select the optimal coordinate system for source separation and localization. A. Optimal Rotation of the Coordinate System We fix the origin at the center of the target area and rotate the coordinate system such that the two sources are aligned, w.l.o.g., on the y axis. Thus, the source locations satisfy s1,1 = s2,1 . Correspondingly, the signature vectors v1 = v2 , since they are discretized from w(x − s1,1 ) according to Proposition 1. This  approximately yields a rank-1 model H = α1 u1 + α2 u2 v1T by ignoring the minor components in (4). As a result, an algorithm for the two source case can be designed as follows. First, extract the vectors α̂1 û1 + α̂2 û2 and v̂1 by solving the matrix completion problem P2 followed by the SVD as developed in Section III. Second, obtain û1 and û2 from the composite vector α̂1 û1 + α̂2 û2 . If the signature vectors in (4) are unimodal, then the solutions obtained will also satisfy the unimodal constraint (9). The remaining challenge is to find the optimal rotation based on the M measurement samples as the source topology is not known. Denote H(θ) as the observation matrix constructed in coordinate system Cθ with θ degrees of rotation to reference coordinate system C. The desired rotation θ can be obtained as σ12 (H(θ)) (19) ρ(θ) , P3 : maximize P N 2 θ∈[0, π 2] k=1 σk (H(θ)) where σk (H) is defined as the kth largest singular value of X̂(H), the solution to the matrix completion problem P2 based on H. Note that ρ(θ) ≤ 1 for all θ ∈ [0, π2 ]. In addition, ρ(θ∗ ) = 1, when H(θ) becomes a rank-1 matrix where the sources are aligned with one of the axes. The optimization problem P3 is, in general, non-convex. An exhaustive search for the solution θ∗ is computationally expensive, since for each θ, problem P2 might need be solved followed by the SVD to obtain the singular value profile of H(θ). However, it can be shown that ρ(θ) has a nice property that enables efficient optimization. Let H(θ) be the signature matrix defined in (4) under the coordinate system Cθ . If H(θ) can be perfectly recovered from H(θ), i.e., X̂(H(θ)) = H(θ), we can show a locally unimodal property of ρ(θ). Theorem 4 (Property of ρ(θ)). Assume that the two sources have equal transmission power α1 = α2 . In addition, suppose that λk (H(θ)) = λk (H(θ)) for k = 1, 2. Then, ρ(θ) is periodic, i.e., ρ(θ) = ρ(θ + π2 ). In addition, ρ(θ) is strictly increasing over (θ∗ − π4 , θ∗ ) and strictly decreasing over PREPRINT VERSION 6 (θ∗ , θ∗ + π4 ), if the energy field satisfies ′ ′ s · τ (t) > t · τ (s) for all 0 < s < t, where τ ′ (t) , maximizer of ρ(θ). d dt τ (t) (20) and θ∗ is the V. A RBITRARY N UMBER Proof: See Appendix D. The result in Theorem 4 confirms that the function ρ(θ) has a unique local maximum within a π2 -window under a mild condition, in the ideal case of perfect recovery X̂(H(θ)) = H(θ). The property motivates a simple bisection search algorithm to efficiently search for the globally optimal solution, θ∗ , to (19). Note that condition (20) can be satisfied by a variety of energy fields. For example, for Laplacian field h(x, y) = γe−γ|x|−γ|y|, we have the autocorrelation function τ (t) = (1 + γt)e−γt , and its p derivative τ ′ (t) = −γ 2 te−γt ; for 2 Gaussian field h(d) = 2γ/πe−γd , where d2 = x2 + y 2 , 2 2 we have τ (t) = e−γt /2 , and τ ′ (t) = −γte−γt /2 . In both cases, condition (20) is satisfied. B. Source Separation Suppose that in the coordinate system Cθ , the sources are aligned with the y axis. Then, the dominant left and right singular vectors of H(θ) are proportional to α1 u1 + α2 u2 and v1 , respectively. Denote the dominant left and right singular vectors of X̂(H(θ)) (solution to P2) as û1 and v̂1 , respectively. Using a technique similar to that in Section III, we can estimate the x coordinate from 1 (21) ŝ1,1 = ŝ2,1 = argmax R(t; v̂1 ). 2 t∈R To find the y coordinates, if the two sources have equal transmission power α1 = α2 , the combined signature vector α1 u1 + α2 u2 is symmetric about the mid-point c = (s1,2 + s2,2 )/2, which can be estimated as 1 ĉ = argmax R(t; û1 ). 2 t∈R (22) As the two sources have equal distance r to the mid-point (s1,1 , c), the variable r can be estimated as r̂ = argmax Q(r; û1 , v̂1 ) (23) r≥0 where Q(r; û1 , v̂1 ) , 1 2 Z ∞ −∞ that is observed would be unimodal with only one peak in û1 . As a comparison, the proposed procedure (21) – (23) can resolve such a limitation.   û(x) v̂(x − ĉ − r) + v̂(x − ĉ + r) dx in which, û(x) is a non-parametric regression function from the interpolation of û1 and v̂(x) is from interpolating v̂1 . Using calculations similar to (12) – (14), it can be shown that Q(r; u1 + u2 , v1 ) is maximized at r∗ = (s1,2 − s2,2 )/2 if the interpolation is perfect, i.e., û(x) = w(x − s1,2 ) + w(x − s2,2 ) and v̂(x − s1,1 ) = w(x − s1,1 ). As a result, the estimated source locations are given by ŝ1 = (ŝ1,1 , ĉ + r̂) and ŝ2 = (ŝ2,1 , ĉ − r̂). As a benchmark, consider a naive scheme that estimates s1,2 and s2,2 by finding the peaks of û1 . However, such a naive strategy cannot work for close spread sources, because the effective energy field function α1 h(d(z, s1 )) + α2 h(d(z, s2 )) OF S OURCES In the case of an arbitrary number of sources, we first study a general algorithm framework to solve P1. We then discuss efficient approximations for fast implementation of the algorithm. Finally, an optimization of the coordinate system Cθ is studied to enhance the convergence of the algorithm. A. The Gradient Projection  2 Let f (U , V ) = W  H − U V T F . With some algebra and matrix calculus, it can be shown that the gradients of f are ∂ f = −2(W  H)V + 2(W  (U V T ))V ∂U ∂ f = −2(W T  HT )U + 2(W T  (V U T ))U ∂V and the iteration of the projected gradient algorithm can be computed as n o ∂ U (t + 1) = PU U (t) − µt f (U (t), V (t)) (24) ∂U o n ∂ f (U (t + 1), V (t)) (25) V (t + 1) = PU V (t) − νt ∂V where PU {·} is a projection operator to project any N × K matrix onto the unimodal cone U N ×K , and the step size µt and νt are chosen to ensure the decrease of the objective function f (for example, using a back-pressure rule). B. Efficient Unimodal Projection The projection PU {X} onto the unimodal cone is formally defined as the solution that minimizes kX − Y kF over Y ∈ U N ×K . Due to the property of the Frobenius norm, the projection can be computed column-by-column. While it is not straight-forward to efficiently project onto the convex set UsN (specified by constraints (5) – (6)) as it may seem to be, it is relatively easier to compute the projection onto an isotonic cone, where an isotonic sequence is defined as a non-increasing (or non-decreasing) sequence. Recently, a fast algorithm for exact isotonic projection was developed in [20], which finds the solution within N − 1 steps. With such a tool, a fast approximate algorithm to compute PU {X} can be described as follows. Fast approximate unimodal projection: 1) For each s, compute the isotonic projection for xk , the kth column of X, to form an ascend(1) ing branch y1 , y2 , . . . , ys and a descending branch (2) ys , ys+1 , . . . , yN , respectively, using the exact isotonic projection algorithm in [20]. (1) (2) (s) 2) Let ys = max{ys , ys }. Then, x̃k := (y1 , y2, . . . , ys , . . . , yN ) is an approximate unimodal projection for xk with the kth entry taking the maximum value. PREPRINT VERSION 7 Table I E VALUATION OF UNIMODAL PROJECTION ALGORITHMS , ǫ2 = 10−10 Vector Size Brute-force Proposed E{e2 }  P e>ǫ N = 10 2.28 sec 6.41 ms 1.5 × 10−3 0.078 N = 20 5.13 sec 20.5 ms 1.8 × 10−10 0.053 3) Repeat the previous steps to compute a series of projections for s = 1, 2, . . . , N . (s) (s) 4) Choose the solution x̃k that minimizes kx̃k − xk k over s = 1, 2, . . . , N . where Step 2) is an approximation because the way in which ys is determined is not optimal.4 Since Step 1) has complexity at most N , the overall complexity is at most N 2 . In Table I, we compare the performance of the proposed fast projection with a brute-force projection method over independent and identically distributed (i.i.d.) standard Gaussian vectors x ∼ N (0, IN ×N ). In the brute-force method, the vector x is projected to the unimodal cone by solving N convex problems: x̃(s) = arg min ky − xk2 subject to (5) – (6), for s = 1, 2, . . . , N , and pick x̃∗ = x̃(s) to minimize kx̃(s) − xk2 . The projection error is defined as e = kx̃− x̃∗ k2 /kx̃∗ k2 , where x̃ is the solution of the proposed method. It is shown that the proposed fast approximate projection is more than 200 times faster, but has only marginal performance loss. Proposition 2 (Partial convergence). Assume perfect sampling H = H and H in (4) has rank K. Suppose that the algorithm initialization X(0) is close enough to the optimal solution X̂ to P1. Then the following holds   T d (27) E(Xe ) ≤ −2λK (V̂ V̂)kUe k2F + o kUe k2F dt  for kVe kF = o kUe kF , where λK (A) denotes the smallest eigenvalue of A. Moreover,   T d (28) E(Xe ) ≤ −2λK (Û Û)kVe k2F + o kVe k2F dt  for kUe kF = o kVe kF . Proof: See Appendix E. Proposition 2 shows that the rate of convergence depends T T on the eigenvalues of V̂ V̂ and Û Û, where V̂ and Û carry the location signatures of the source. Specifically, if the sources are aligned with either the x axis or the y axis, then either Û or V̂ tends to have identical columns, which leads to rank T T deficiency of matrices Û Û or V̂ V̂, corresponding to small eigenvalues λK and hence slow convergence. Propositions 2 provides useful intuition for algorithm design; they show that gradient type algorithms work better when sources are well-separated in both axes. D. Rotation for Convergence Improvement C. Local Convergence Analysis Specifically, we frame the analysis according to the following two points. First, it observed that the globally optimal solution X̂ = (Û, V̂) is in the interior of the unimodal cone U N ×K × U N ×K , i.e., the unimodal constraints are not active when the algorithm iterate approaches the neighborhood of X̂. As a result, problem (8) becomes an unconstrained one in the neighborhood of X̂. Second, note that the function is bi-convex. Therefore, we can study partial convergence, where the convergence of the variable U is analyzed while fixing the other variable V to be in the neighborhood of V̂. Thus, such analysis serves as a qualitative prediction on the convergence performance. Denote g(X) = [ ∂f /∂U )T ∂f /∂V )T ]T as the gradient function of f (X), where X = (U , V ). Suppose X(0) is sufficiently close to X̂, such that the unimodal constraints are not active. As a continuous counter-part to the discrete iteration (24) – (25), the continuous algorithm trajectory X(t) can be given as d X(t) = −g(X(t)). (26) dt Let E(Xe (t)) = 12 kXe (t)k2F be the normed error function for the convergence error Xe (t) , X(t)− X̂. Let Ue = U − Û and Ve = V − V̂ with the time index t dropped for notational brevity. The following result suggests that if either Ue or Ve is much smaller than the other variable, then the algorithm trajectory X(t) converges exponentially to X̂. 4 In fact, optimizing the value at the sth turning point may involve complexity scaling with N . As it is preferred to analyze the case where the sources are well-separated in both axes of the coordinate system, we may need to establish a coordinate system with the optimal rotation for the desired source topology. However, the challenge is that we have no prior knowledge of the source locations. Recall that H(θ) denotes the observation matrix constructed in coordinate system Cθ with θ degrees of rotation with respect to the reference coordinate system C. Similar to P3, the desired rotation θ can be obtained as P4 : σ12 (H(θ)) ρ(θ) , minimize P N 2 θ∈[0, π 2] k=1 σk (H(θ)) (29) where σk (H) is defined as the kth largest singular value of X̂(H), the solution to the matrix completion problem P2 based on H. While problem P3 is to align the sources with one of the axes, problem P4 tries to avoid alignments with any axes. Fig. 2 demonstrates the performance of the UMF with optimal coordinate system rotation under noise-free sampling σn2 = 0,pwhere L = 1 and the energy field is given by 2γ/π exp(−γd2 ) with λ = 20. The observation h(d) = matrices constructed with dimension N satisfy N 2 /2 ≈ M . There are two key observations: (i) the coordination system rotation does improve the convergence as demonstrated by the comparison between scheme “Rotated UMF”, which solves P1 in the optimal coordinate system Cθ∗ with θ∗ solved from P4, and scheme “Simple UMF”, which solves P1 in a fixed coordinate system C. (ii) UMF performs better in the recovery of sparse unimodal structures as compared to conventional sparse matrix completion methods, scheme “Complete UMF”, which first solves the matrix completion 8 8 PREPRINT VERSION 8 Root MSE [km] Root MSE [km] MSE RootRoot MSE modeled as (1 + d1.5 A(f )d )−1 , where Thorp’s formula [23] −1 modeled as (1 + d1.5 A(f )d )10 , where formula is used to arrive log A(f ) =Thorp’s 0.11f 2/(1 + f 2[23] )+ Simple UMF 1.5 at 10 d −1 modeled as (1 + d A(f ) ) , where Thorp’s formula [23] 2 2 2 2 −4 2 Complete UMF is used to arrive at 10 log A(f ) = 0.11f /(1 + f ) + 44f /(4100 + f ) + 2.75 × 10 f + 0.003 dB/km. The 10 Simple 2 RotatedUMF UMF is used2 to arrive at2(m) 10 log10 A(f ) −4 = 0.11f /(1 + f 2 ) + 2 Complete UMF 44f /(4100 + f ) + 2.75 × 10 f + 0.003 dB/km. The ambient noise n is modeled as a zero mean, Gaussian 0.2 Rotated UMF 44f 2 /(4100 + f 2 ) + 2.75 × 10−4 f 2 + 0.003 dB/km. The 2 ambient noise(m)n(m) isnormalized modeled as a zeroσmean, Gaussian random variable with 0.2 n /P = −34 dB, ambient noise n is modeled as a variance zero mean, 2 Gaussian random normalized variance −34 dB, wherevariable Pvariable = 1 with is with thenormalized total transmission The=sensor has 2 σn /P random variance σpower. n /P = −34 dB, where P = 1 is the total transmission power. The sensor has a receive window of 4 seconds from the detection of the first where P = 1 is the total transmission power. The sensor has apath. receive window 4 seconds thethe detection thematrix first The parameter N for constructing observation a receive window of 4ofseconds fromfrom the detection of theoffirst 2matrix path. The parameter N for constructing the observation H is chosen as the largest integer satisfying N (log N ) ≤ M. path. The parameter N for constructing the observation matrix 0.1 2 H is chosen as the largest integer satisfying N (log ) ≤ M . 2 Ncase The proposed algorithms for the single source ((15) 0.1 H is chosen as the largest integer satisfying N (log N ) ≤ M . The proposed algorithms for the single source case ((15) in Section III), two source ((21) – (23) in Section IV), and The proposed algorithms for the single source case ((15) two source ((21) –(Section (23) in V) Section IV), an Section arbitrary number of((21) sources are compared in in Section III),III), two source – (23) in Section IV), and and an arbitrary number of sources (Section V) are compared two number baselineofschemes. Baseline V) 1, are Naive scheme for an with arbitrary sources (Section compared with baseline schemes. 1, Naive scheme with twotwo baseline schemes. Baseline Naive scheme for for single source: the location ofBaseline the 1,sensor that observes the 0 single source: the location of the sensor that observes the single source: the location of the sensor that observes the 120 20 40 60 80 140 100 highest energy is identified as the source location. Baseline 0 120 20 40 60 Number80of sensors, 140 100M highest energy is identified as the source location. Baselineis highest energy is identified as the source location. Baseline 2, Weighted centroid localization [10]: the location estimate Number of sensors, M 2, Weighted centroid localization the location estimate 2, Weighted centroid localization [10]:[10]: the location estimate is is updated by Figure 2. Localization performance under noise-free sampling in a two source updated by by updated ! (m) (m) Gaussian field. performance Figure 2. energy Localization performanceunder undernoise-free noise-free sampling a two source Figure 2. Localization sampling in aintwo source ̺(m) z P ! m∈R(ŝ(n)) (m) (m) Gaussian energy field. field. ! Gaussian energy ̺ z ŝ(n + 1) =m∈R(ŝ(n)) ̺ z (m) m∈R(ŝ(n)) (m) ̺ ŝ(nŝ(n + 1) +=1) =P ! m∈R(ŝ(n)) ̺(m)̺(m) m∈R(ŝ(n)) m∈R(ŝ(n)) 1 (m) (m) until convergence, where = Weighted centroid 1 (m)̺(m) (m) h(m) are the weights until convergence, where ̺ = h are are the weights until convergence, where ̺ = h the are weights Naive scheme Weighted centroid and R(x) specifies a set of measurements that taken Kernelscheme method andand R(x) specifies a set of measurements that are taken Naive R(x) specifies a set of measurements that are taken Proposed within a radius r from location x, in which, the raKernel method within a radius r from location x, in which, the raDecay rate Proposed within ais radius r L/8 from location x, as in towhich, the M/4 radius r at least or as large include Decay rate dius r is at at leastleast L/8L/8 or as largelarge as toas include M/4M/4 dius r is or to include measurements. Baseline 3, as Kernel regression: The algomeasurements. Baseline 3, Kernel regression: The algomeasurements. Baseline 3, {α Kernel regression: The algorithm chooses parameters , ẑ } and λ to minimize k" rithm parameters {αk , ẑkk} and λ to minimize " chooses ! chooses ! Kparameters(m) {α λ totheminimize P rithm k ,2;ẑλ) k} "h(m)P−K! "22 and 0.1 (m) (m) α B(z , ẑ based measure" " ! k k k=1 m " (m) − k=1K αk B(z ,(m) ẑk ; λ) based on theonmeasure" based m h 0.1 on the measureh − α B(z , ẑ ; λ) (m) (m) k k m (m) k=1 (m) ment {h , z }, where two classes of kernel functions ment {h (m) , z (m) }, where two classes of kernel functions are are ment {h , zGaussian }, where two B classes kernel are− considered, kernel ẑkof;=λ) = functions exp(−λ$z G considered, Gaussian kernel BG (z, ẑ(z, exp(−λkz − k ; λ) considered, Gaussian kernel B (z, ẑ ; λ) = exp(−λ$z −− 2 ) and Laplacian kernel BGLẑ(z, ẑkk ;=λ)exp(−λkz = exp(−λ$z ẑk kẑ2k)$2and Laplacian kernel BL (z, − k ; λ) ẑ $ ) and Laplacian kernel B (z, ẑ ; λ) = exp(−λ$z − 2 L norm. k Cross-validation in which, $1 denotes Cross-validation ẑk kẑ21kk),$21in), which, k · k$1 ·denotes the Lthe 1 L1 norm. ẑisk $used · $1 best denotes thefunction, L1 norm. Cross-validation 1 ), towhich, choose the kernel and the set data is used to in choose the$best kernel function, and the data is set is is used to choose the best kernel function, and the data set is partitioned to 70% for parameter training and 30% for MSE partitioned to 70% for parameter training and 30% for MSE 0.01 partitioned to 70% for parameter training and 30% for MSE 10 100 1000 performance validation. The The parameters ẑk give 0.01 performance validation. parameters ẑk the givelocation the location 10 100 1000 performance validation. The1parameters ẑkcannot give the location Number of samples, M estimates. Note that that Baselines and 2 cannot differentiate estimates. Note Baselines 1 and 2 differentiate Number of samples, M estimates. Note that Baselines 1 and 2 cannot differentiate multiple sources when theythey appear as one. Therefore, these these multiple sources when appear as one. Therefore, Figure 3. MSE MSE of of the thesource sourcelocation locationversus versusthethe number sensors, sources when they appear as one. Therefore, these Figure 3. number of of sensors, M ,M in, in twomultiple baselines are evaluated in the single source case only. two baselines are evaluated in the single source case only. Figure 3. source MSE of the source location versus the number of sensors, M , in the case. the single single source case. two baselines are evaluated in the single source case only. Fig.Fig. 3 shows the the rooted meanmean squared error error (RMSE) of the single source case. 3 shows rooted squared (RMSE) of Fig. 3 shows the rooted mean squared error (RMSE) of thethe source location versus the number of sensors, M , in source location versus the number of sensors, M , in source location the number of outperforms sensors, M , in thethe single source case. versus The proposed scheme , and then the single source case. The proposed scheme outperforms problem P2 in in the the optimal optimalcoordinate coordinatesystem systemCθC∗ ,θ∗and then problem P2 6 naive scheme andcase. the The weighted centroid scheme. It single source proposed scheme outperforms ∗ , and then thethe problem P2for the optimal coordinate system Cθthe solves P1 vector extraction. AsAsthe UMF is is the naive scheme and the weighted centroid scheme.66 It solves P1 forinsignature signature vector extraction. UMF also the kernel method from moderate large It theoutperforms naive scheme and the weighted centroid toscheme. solves P1 for signature vector extraction. As the UMF is the kernel method from moderate to large aware of the “Rotated UMF” aware the unimodal unimodalstructure, structure,the theproposed proposed “Rotated UMF” also outperforms of sensors. Inthe thekernel case ofmethod more than 500moderate sensors, the also outperforms from to large aware of the the unimodal structure, the proposed 5 5 “Rotated UMF” number outperforms number of sensors. In the case of more than 500 sensors, the outperforms the “Complete “CompleteUMF” UMF”scheme. scheme. performance limited In by the the case ambient noise.than The 500 dashed line the number ofissensors. of more sensors, outperforms the “Complete UMF” scheme.5 performance is limited by the ambient noise. The dashed line fitsperformance the performance of theby proposed scheme in the Mdashed = 10 line is limited the ambient noise. The VI. N UMERICAL R ESULTS fits the performance of the proposed scheme in the M = 10 to fits 500the region using logof = a log It gets VI. N UMERICAL R ESULTS 10 RMSE 10 M +inb.the performance the proposed scheme M = 10 VI. N UMERICAL R ESULTS to −0.88 500 region using logMSE = a as logO(1/M b. ).It gets We consider the source and sensor deployment model in a = 10 RMSE 10 M +1.76 and hence decreases 500 region using the log10 RMSE = a log M + b. It gets 1.76 We consider the source and sensor deployment model in to 10 as a = −0.88 and hence the MSE decreases O(1/M Section II with L = 5 km in an underwater environment. Note that Theorem 2 and 3 show that the MSE of the proposed We consider the source and sensor deployment model in a = −0.88 and hence the MSE decreases as O(1/M 1.76 ).). Section II with L = 5 kmtransmit in an underwater environment. 1.5MSE of the proposed Noteshould that Theorem and 3 showO(1/M that the The sources simultaneously signals at f environment. = 5 kHz. scheme decrease22faster ) (fullofsampling Section II with L = 5 km in an underwater that Theorem and 3 than show that the MSE 1.5 the proposed The sources simultaneously transmit signals at f modeled = 5 kHz. Note scheme should decrease faster than O(1/M (full sampling The propagation of the signal from each source is case), which is confirmed by our numerical results. The sources simultaneously transmit signals at f = 5 kHz. scheme should decrease faster than O(1/M 1.5 ))(full sampling The propagation of the signal from each source is modeled Fig. using N = 15 discrete paths, where the path inter-arrival case), which is confirmed by our numerical results. p 4 shows the RMSE of the source locations versus The propagation of the signal from each source is modeled case), which is confirmed by our numerical results. the using N = 15 discrete paths, where the path inter-arrival p − τp are exponentially distributed with mean 100 times τN Fig. showsM the of the locations versus p+1 of 4sensors, , inRMSE two source andsource three source cases. In the using p = 15 discrete paths, where the path inter-arrival number Fig. 4 shows the RMSE of the source locations versus the times τp+1 −path τp are exponentially distributed with mean 100both ms, and the amplitudes are Rayleigh distributed with number of sensors, M , in two source and three source cases. In cases, the proposed methods significantly outperform the times τp+1 − τp are exponentially distributed with mean 100 number of sensors, M , in two source and three source cases. In p −τ1 ) ms, andscaled the path amplitudes are respect Rayleigh distributed with kernel power as e−ϕ(τ with to the first path, methods. Note that the proposed schemes only require both cases, the proposed methods significantly outperform the ms, and the−1path −ϕ(τ amplitudes are Rayleigh distributed with both cases, the proposed methods significantly outperform the p −τ1 ) power e [22]. the first path, ϕ = 2scaled sec as[21], Thewith pathrespect energytoattenuation is kernel methods. Note that the proposed schemes only require power scaled−1as e−ϕ(τp−τ1 ) with respect to the first path, 6kernel methods. Note that experiments the proposed schemes require from our numerical that the weights ̺only and the ϕ 5 = 2 sec −1 [21], [22]. The path energy attenuation is It is observed ϕ However, = 2 sec [22]. we also [21], note that in theThe case path of low energy SNR, i.e., attenuation σn2 ≫ 1, P2 is window 6 R in the weighted centroid scheme should depend on M and h(d). It is observed our numerical experiments thatnon-trivial. the weights ̺ and the 6 It However, thefrom best our weights and window are highly can5 serve as an efficient de-noising step to help faster convergence 2of UMF. ischoosing observed numerical experiments that the weights andh(d). the we also note that in the case of low SNR, i.e., σ2n ≫ 1, P2 window R in thefrom weighted centroid scheme should depend on M ̺and 5However, P2 weefficient also note that in the of low SNR, i.e., σn ≫of1,UMF. window in the weighted shouldare depend M and h(d). can However, serve as an de-noising stepcase to help faster convergence However,Rchoosing the bestcentroid weights scheme and window highlyonnon-trivial. can serve as an efficient de-noising step to help faster convergence of UMF. However, choosing the best weights and window are highly non-trivial. 99 1 1 0.8 0.8 Root MSE [km] Root MSE [km] PREPRINT VERSION 0.6 0.6 0.4 0.4 0.2 KernelKernel method, method, K = 3K = 3 Proposed, Proposed, K = 3K = 3 method, KernelKernel method, K = 2K = 2 Proposed, Proposed, K = 2K = 2 0 0 10 100 100 10 Number of sensors, M Number of sensors, M 9 0.2 10001000 Figure 5. Localizing the three peaks from the elevation data North Jutland, Figure 5. Localizing Localizing thethree three peaks from the elevation of of North Jutland, Figure 5. the peaks from thevisual elevation datadata of North Jutland, Denmark. The result matches with the expectation. Denmark. The result matches with the visual expectation. Denmark. The result matches with the visual expectation. Figure 4. 4. MSE ofofthe thesource sourcelocation locationversus versusthethe number of sensors, , in number sensors, M, ,M FigureFigure 4. MSEMSE of the source location versus the number ofofsensors, M inin two source source and and three threesource sourcecases. cases. two source and three source cases. coordinate system. Our numerical experiments demonstrate coordinate system. Our numerical experiments demonstrate coordinate system. Our numerical experiments demonstrate that the proposed scheme achieves similar performance the that the similar performance as the that the proposed proposedscheme schemeachieves achieves similar performance asasthe baselines using no more measurement samples. h(d) is nonusing no more thanthan 1/5 1/5 measurement samples. the generic generic property propertythat thatthe thesource sourceenergy energyfield field h(d) is non- baselines the generic property that the source energy field h(d) is non- baselines using no more than 1/5 measurement samples. negative and d to thethe source. negative andstrictly strictlydecreasing decreasingininthe thedistance distance d to source. negative and strictly decreasing inalso the distancesuch d toproperty, the source. A PPENDIX A A Although the thethe Although the kernel kernelfunctions functions alsocapture capture such property, A PPENDIX Although the kernel functions also capture such property, the AOF PPENDIX A 1 P ROOF T HEOREM kernel methods suffer from parameter estimation error when kernel methods suffer from parameter estimation error when P ROOF OF T HEOREM 1 kernel methods suffer from parameter estimation error when P ROOF OF T HEOREM 1 fitting the As As the the signature vectors u and v correspond to thetodomfitting the data data toto inaccurate inaccurateparametric parametricmodels. models. k k signature vectors uk and vk(k)correspond the domfitting the data to inaccurate parametric of models. Fig. method As singular the signature vectors ukvk,1 andofvkHcorrespond to theon domvectors u and , we (k)can focus Fig. 55 demonstrates demonstratesthe therobustness robustness ofthetheproposed proposed methodinant k,1 inant singular vectors u and v of H , we can focus on k,1 k,1 (k) Fig. 5localizing demonstrates the robustness of theThe proposed method in several peaks on real data. dataset contains only one source and drop the source index k here for brevity. singular vectors uk,1 and vk,1 of H , P we can focus on in localizing several peaks on real data. The dataset containsinant only one source and drop the source index kN here for brevity. T T in localizing several peaks on real data. The contains altitude data (colored pixels) measured on the networks only ! fromand (4), drop we write H = αuv +k There λiNubrevity. one source the source index for i vi altitude data (colored pixels) measured ondataset theroad road networksSpecifically, i=2 ! Specifically, from (4), we write H = αuv + λi uiTviT N i=2u in North Jutland, Denmark [24], where red pixels represent Specifically, T altitude data (colored pixels) measured on the road networks (for the kth source, where k = 1), in which u and fromsource, (4), wewhere write kH== 1), αuvin + ui i viu in North Jutland, Denmark [24], where red pixels represent (for the kth whichi=2uλiand i high altitude locations. an altitude is selected are the left singular in North DenmarkSuch [24], reddataset pixels vectors ofk H, v1),andinviwhich are theu right source, where = and ui high Jutland, altitude locations. Such where an altitude datasetrepresent is selected(forarethethekth left singular vectors of H, v and v are the right toaltitude emulatelocations. noise-corrupted measurements of an energy field singular vectors, and α is the largest singular value,i α > λi , high to Such an altitude dataset selected singularand vectors of largest H, v singular and vi are theα right emulate noise-corrupted measurements of anis energy fieldare the leftvectors, α is the value, > λi , generated by K = 3 hidden sources. We downsample the i =singular 2, 3, . . . , N . to emulate noise-corrupted measurements of an energy field singular vectors, and α is the largest singular value, α > λi , generated by K = 3 hidden sources. We downsample the T i = 2, 3, . . . , N . datasetby over equallysources. spaced grid points and form R = H H. Then, the (i, j)th entry of R is given generated K 40 =××340 hidden We downsample thea ai =Let T dataset over 40 40 equally spaced grid points and form 2, 3, . . . , N . T R = H H. Then, j)th entry of of H. R isIn given sparse elevation matrix. We find the peaks (black triangles) by RLet , where hi isthe the(i,ith column ij = hi hT dataset overelevation 40 × 40matrix. equally spaced gridpeaks points(black and form a sparse the triangles) Rij ==HhjTH. the (i, entry of R of is given by solving P1 to extractWe the find signature vectors followed by theLet by R hj , Then, where hithat is j)th the columns ith column following lemma, we show the of R areH. In i T sparse elevation matrix. We find the peaks vectors (black triangles) by solving P1 to extract the signature followed by h , where h is the ith column of by R = h peak localization using (15). The result matches with a visual unimodal. i jlemma, we ishow that the columns ofH. theijfollowing R In are by solving P1 to extract the signature vectors followed by 7visual peak localization using (15). The result matches with a the following lemma, we show that the columns of R are determination of possible locations of the hidden sources. unimodal. peakdetermination localization using (15). The result of matches with sources. a visual7 unimodal. Lemma 2. Suppose that the source locates at the (m, n)th of possible locations the hidden thatforthe source locates (m, n)th gridLemma centered2.at Suppose cm,n . Then, each column of R, at thethe entries determination of possible locations of the hidden sources.7 VII. C ONCLUSIONS Lemma 2. Suppose that the source atofthe (m, n)th Rijgrid arecentered increasing, Ri+1,j if ilocates < n, and theythe areentries at cR .< Then, for, each column R, ij m,n VII. C ONCLUSIONS This paper developed nonparametric algorithms for localiz- grid at>cm,n . Then, for R,and the they entries decreasing, Ri+1,j , ij if i< ≥R n.each Rcentered increasing, R , if i <ofn, are ij ij are R i+1,jcolumn VII.based C ONCLUSIONS ingThis multiple on a moderate number offorenergy are increasing, R <, R , if i < n, and they are papersources developed nonparametric algorithms localiz-Rijdecreasing, R > R if i ≥ n. ij i+1,j ij i+1,j Proof: Since the source location s is inside the (m, n)th measurements from different locations. A matrix observation This paper developed nonparametric algorithms for localizRij > Ri+1,j , have if i ≥d(c n. , s) > d(c ing multiple sources based on a moderate number of energydecreasing, grid centered cm,n , wesource , s)(m, ≥ n)th p,i p,i+1the Proof:atSince the location s is inside model was proposed andon proven to have number unimodal syming multiple sources based a moderate energy measurements from different locations. A matrixofand observation d(c , s), for i < n and all p = 1, 2, . . . , N . Similarly, p,n Proof: Sinceatthe inside thep,i+1 (m,,n)th grid centered c source , we location have d(csp,iis, s) > d(c s) ≥ metric properties for every under mildobservation conditions. measurements different locations. matrix model wasfrom proposed and energy provenfield to A have unimodal and sym- d(cp,i , s) < d(cp,i+1 ,m,n i ≥ np and all2, Recall that <s), n for and alld(c =, s) 1, .,N . Similarly, gridd(c centered at cim,n , we have >p.. .d(c , s) ≥ A nonparametric source localization algorithm exploiting the p,n , s), for p,i p,i+1 metric energy fieldunimodal under mild conditions. model was properties proposed for andevery proven to have and sym- Hij = h(d(ci,j , s)) and h(d) is a non-negative decreasing d(c , s)for < id(c , s), all for pi ≥ Recall that , s), <p,i+1 n and = n1, and 2, . . all . , Np.. Similarly, unimodal and symmetric property was developed and shown d(c p,n p,i A properties nonparametric sourceenergy localization algorithm exploiting the function. metric for every field under mild conditions. We thus have 1.5 to decrease the localization MSE faster than O(1/M ) using d(c H = h(d(c , s)) and h(d) is a non-negative decreasing , s) < d(c , s), for i ≥ n and all p. Recall that i,j p,iij p,i+1 unimodal andsource symmetric propertyalgorithm was developed and shown A nonparametric localization exploiting the N X M sensors in the single source case. In the two source case, function. We thus have h(d(c , s)) and h(d) is a non-negative decreasing 1.5 to decrease the localization MSEwas faster than O(1/M shown ) usingHij = unimodal and symmetric property Rij = hTi i,j hj = Hpi Hpj the source locations can be found bydeveloped choosing and the optimal function. N We thus have " 1.5 M sensors in the single source case. In the two source case, p=1 to decrease the localization MSE faster than O(1/M ) using T rotation of the coordinate system such that the normalized h = R = h N j ij i N the source locations canofbe found choosing the case, optimal " Hpi Hpj M sensors in singular the single source case. Inby the two issource X dominant value the sample matrix maximized. T Rij = hi hj<= p=1 pi H HH Hpjpj = hTi+1 hj = Ri+1,j rotation of of thearbitrary coordinate system such that normalized p,i+1 the source locations can benumber found by sources, choosing the optimal In the case of wethe localize the N " p=1 p=1 dominant value of problem the such sample matrix is maximized. rotation of the coordinate system the normalized sources bysingular solving a UMF inthat an optimally rotated Hp,i+1 Hpj = hTi+1 hj =TRi+1,j <N In the case of arbitrary number of sources, we localize the dominant singular value of the sample matrix is maximized. for i < n. Similarly," we can show that TRij = hi hj > p=1 7 In this experiment, we failed to successfully implement the kernel re< i≥ H sources by arbitrary solving anumber UMF problem in anweoptimally rotated hTi+1 hj = Ri+1,j , for n.p,i+1 Hpj = hi+1 hj = Ri+1,j In the case of of sources, localize the gression method to localize the peaks. There are too many local optima of p=1 for i the < condition n. Similarly, we can thatR R hTi hj > Under of Lemma 2, ifshow we raise toijthe=power sources by solving a UMF problem in an the optimally rotated the7 nonlinear regression problem, and furthermore, local optima are not T q In this experiment, we failed to successfully implement the kernel reRi+1,j forwe iare ≥can n. of h q, the of, R unimodal, with R their = peaks necessarily consistent with the peak locations. <hjcolumns n.= Similarly, show that hTi hatj > ij gression method to localize the peaks. There are too many local optima offor ii+1 7 In this experiment, we failed to successfully implement the kernel reUnder the condition of Lemma 2, if we raise R to the power T the nonlinear regression problem, and furthermore, the local optima are nothi+1 hj = Ri+1,j , for i ≥ n. q gression method consistent to localizewith the the peaks. are too many local optima of of q, the columns of R are unimodal, with their necessarily peakThere locations. Under the condition of Lemma 2, if we raise R to thepeaks powerat the nonlinear regression problem, and furthermore, the local optima are not of q, the columns of Rq are unimodal, with their peaks at necessarily consistent with the peak locations. PREPRINT VERSION 10  the nth entry. Specifically, define R(q) , Rq /tr Rq . We show, in the following lemma, that the columns of R(q) are unimodal. (q) (q) Lemma 3. Let Rij be the (i, j)th entry of R(q) . Then, Rij < (q) (q) (q) Ri+1,j , if i < n, and Rij > Ri+1,j , if i ≥ n. Proof: First, it can be easily verified that the result holds for q = 1 according to Lemma 2. Then, suppose (q+1) that =  the result holds  for some q ≥ 1. Note that R tr R(q) R(q) R/tr R(q+1) and that R(q) is symmetric. We have  N tr Rq X (q) (q+1) =  q+1 Rij Rpi Rpj tr R p=1  N tr Rq X (q) (q+1)  < Rpj = Ri+1,j R tr Rq+1 p=1 p,i+1 (q+1) (q+1) > Ri+1,j , for for i < n. Similarly, we can show that Rij i ≥ n. Therefore, by deduction, the result holds for all q ≥ 1.  Let R∞ , limq→∞ Rq /tr Rq . It can be shown that the limit exists and equals R∞ = vv T . To see this, we can easily PN T q 2q T compute + i=2 λ2q i vi vi and the normalization  Rq = α 2qvv P N 2q term tr R = (α + i=2 λi ), and note that (λi /α)2q → 0 as q → ∞, for i = 2, 3, . . . , N , leading to R∞ being rank-1. On the other hand, from Lemma 3, each column of R∞ is unimodal. Note that the ith column of R∞ can be written as vi v, where vi is the ith entry of v. We therefore confirm that v is unimodal, with its nth entry being the peak. Similarly, by constructing Q = HH T, we can also show that u is unimodal with its mth entry being the peak. P ROOF A PPENDIX B OF P ROPOSITION 1 Consider a slight shift of the grids c̊i,j = ci,j + [δ1 , δ2 ], and denote c̊X = cX + δ1 and c̊X = cY + δ2 . As a result, the source locates exactly at the center of the (m, n)th grid, i.e., sk = c̊m,n . Let H̊ (k) be the signature matrix measured at the shifted grids {c̊i,j }. Then, we have Z 1   L (k) (k) h(dij ) − h(dij ) + h′ (dij + tδ̊ij )dt Hij − H̊ij = N 0 Kh L ≤ δ̊ij N Kh L2 ≤√ 2N 2 where dij = kci,j − sk k, δ̊ij = kc̊i,j − sk k − dij , and h′ (d) = limt↓0 1t [h(d + t) − h(d)] denotes the right derivative of h(d). Consider the largest sub-block [H̊ (k) ]J of H̊ (k) that includes rows m − J to m + J, and columns n − J to n + J for the largest possible integer J. The sub-matrix [H̊ (k) ]J then has dimension (2J + 1) × (2J + 1). In addition, the submatrix is symmetric about the (J + 1, J + 1)th entry, where the jthe row and (2J + 2 − j)th row are identical, and the jth column and the (2J + 2 − j)th column are identical. This is because the girds c̊m−i,n−j , c̊m+i,n−j , c̊m−i,n+j , and c̊m+i,n+j have equal distance to the source sk = c̊m,n , and (k) thus the corresponding entries H̊pq are identical. As a result, the rank-1 sub-matrix [H̊ (k) ]Jm ×Jn has symmetric singular vectors that satisfy [ůk ]Jm = [v̊k ]Jn , and the singular vectors are symmetric about the (J + 1)th entry, where Jm and Jn are some index sets that contain 2J + 1 elements, respectively. Note that vectors [ůk ]Jm and [v̊k ]Jn are sub-blocks of the singular vectors ůk and v̊k of the rank1 full matrix H̊ (k) , respectively. We thus know that ůk and v̊k are symmetric vectors about the mth entry and nth entry, respectively. Moreover, ůk and v̊k are unimodal by Theorem 1. Therefore, w.l.o.g., assume m < n ≤ N/2. We can theoretically construct a continuous function w(x) that takes p N/Lv̊k,j value w(x) = p for x = c̊X,j − sk,1 and j = 1, 2, . . . , n − 1, w(x) = N/Lůk,i for x = c̊Y,i − sk,2 and i = m, m + 1, . . . , N , and by smooth interpolation elsewhere such that w(x) is non-negative, unimodal, and symmetric about x = 0. A PPENDIX C P ROOF OF T HEOREM 2 We first compute the peak localization error bound given signature vector perturbations. Let v̂1 be the dominant right singular vectors of H, the observation matrix in the case of conservative construction, √ √ N = M . In the case of aggressive construction, N > M , let v̂1 be the dominant right singular vector of X̂, the solution to P2. Denote e1 = v̂1 − v1 . Recall that the signature vector v1 can be approximately expressed as a discretization of w(x − s1,1 ) from Proposition 1, and in addition, e(x) = v̂(x) − w(x − s1,1 ) is the error of the continuous non-parametric regression v̂(x) obtained from interpolating v̂1 . We denote w1 (x) = w(x − s1,1 ) for the ease of elaboration. From (16), it follows that R(t; v̂1 ) Z ∞   w1 (x) + e(x) w1 (−x + t) + e(−x + t) dx = Z−∞ Z ∞ ∞ = w1 (x)w1 (−x + t)dx + w1 (x)e(−x + t)dx −∞ −∞ Z ∞ Z ∞ e(x)w1 (−x + t)dx + e(x)e(−x + t)dx −∞ −∞ Z ∞ ≈ τ (t − 2s1,1 ) + w1 (x)e(−x + t)dx −∞ Z −∞ e(−y + t)w1 (y)(−dy) (30) + +∞ Z ∞ w1 (x)e(−x + t)dx (31) = τ (t − 2s1,1 ) + 2 −∞ where theR approximation (30) drops the second or∞ der R ∞ term −∞ e(x)e(−x + t)dx and uses the fact that −∞ w1 (x)w1 (−x + t)dx = τ (t − 2s1,1 ) from the integral (12). PREPRINT VERSION 11 As t = 2ŝ1,1 maximizes R(t; v̂1 ) in (31), we have Z ∞ τ (2ŝ1,1 − 2s1,1 ) + 2 w1 (x)e(−x + 2ŝ1,1 )dx −∞ Z ∞ ≥ τ (2s1,1 − 2s1,1 ) + 2 w1 (x)e(−x + 2s1,1 )dx −∞ Z ∞ = τ (0) + 2 w1 (x)e(−x + 2s1,1 )dx −∞ where τ (0) = R∞ w (x)2 dx ≈ −∞ 1 P 2 j v1,j = 1. As a result, τ (0) − τ (2ŝ1,1 − 2s1,1 ) Z ∞ h i w1 (x) e(−x + 2ŝ1,1 ) − e(−x + 2s1,1 ) dx ≤2 −∞ Z ∞ ≤ 2Ce w1 (x)e(x)dx −∞ X v1,j e1,j ≈ 2Ce = j 2Ce v1T e1 . In addition, using the Taylor’s expansion of τ (t) at t = 0, we have τ (2ŝ1,1 − 2s1,1 )  1 2 ≈ τ (0) + τ (0)′ × 2 ŝ1,1 − s1,1 + τ (0)′′ × 4 ŝ1,1 − s1,1 2 ≥ τ (0) − 2Ce v1T e1 where, it can be verified that the first order derivative τ (0)′ = 0 and the second order derivative τ ′′ (0) < 0 by the definition of τ (t) in (11). As a result, ŝ1,1 − s1,1 2 ≤ Ce v T e1 −τ ′′ (0) 1 (32) for asymptotically large N (since all the approximations become accurate for large N ). 2 Similar result can be derived for ŝ1,2 − s1,2 by analyzing the perturbation of u1 , and the result is statistically identical to (32). Therefore, the squared error bound is given by (as τ ′′ (0) < 0) 2Ce v T e1 . kŝ1 − s1 k22 ≤ ′′ |τ (0)| 1 We now derive the signature perturbation v1T e1 by discussing two cases. A. The Case of Conservative Construction N = √ M Consider that the sensing location z (m) is inside the grid centered at ci,j . Then, according to the matrix observation model (1), (2), and (7), we have 2 2 L2  Hij − Hij = 2 h(m) − α1 h(dij ) N Z L2  1 ′ n(m) 2 = α21 2 h (dij + tδ (m) )dt + N α1 0 n(m) n(m) 2  α21 L2  2 Ξ + 2Ξ + = (33) N2 α1 α1 where dij = kci,j − s1 k2 , δ (m) = kz (m) − s1 k2 − dij , h′ (d) = limt↓0 1t [h(t + d) − h(d)] is the right derivative of h(d), and R1 Ξ , 0 h′ (dij + tδ (m) )dt. Note that by the √ Lipschitz continuity of h(d), we have Ξ ≤ Kh δ (m) ≤ Kh L/( 2N ). Therefore, n 2 o α21 Kh2 L4 α2 L2 σ 2 E Hij − Hij ≤ + 1 2 n2 , ω 2 (34) 4 2N N α1 Using (34), we now derive an upper bound of v1T e1 . Note that v1T e1 < 0 because 1 = kv̂1 k22 = kv1 + e1 k22 = 1 + 2v1T e1 + keT1 e1 k22 , and hence, 2v1T e1 = −keT1 e1 k22 < 0. Then, the singular vector perturbation can be obtained as q 2 sin ∠(v1 , v̂1 ) = 1 − v1T (v1 + e1 ) q = −2v1T e1 + (v1T e1 )2 q ≥ 2 v1T e1 (35) where | · | denotes the absolute value operator. Let E = H − H. Using the singular vector perturbation results in [25], we know that 2σ(E) σ1 − σ2 (36) σ(E)2 < σ(Ē)2 ≈ 4ω 2 N (37) sin ∠(v1 , v̂1 ) ≤ where σ(E) is the spectral norm of E, and σ1 and σ2 are the first and second dominant singular values of H. Note that we have σ1 − σ2 = κα1 . We now compute σ(E). From the uniform random sampling strategy for H, the elements of E are independent random variables with zero mean and variance strictly smaller than ω 2 in (34). Let Ē be an N × N matrix whose elements are i.i.d. random variables with zero mean, variance ω 2 and bounded fourth order moment. Then we know that the spectral norm σ(E) < σ(Ē) almost surely for asymptotically large N . On the other hand, using random matrix theory, it has been shown in [26, Theorem 2.1] that ω√1 N σ(Ē) → 2 almost surely, as N → ∞. As a result, we have almost surely. Combining the results in (35) – (37), we have 1  2σ(E) 2 8L2 σn2 4K 2 L4 v1T e1 ≤ ≈ 2h 3 + 2 2 κα1 κ N κ N α21 (38) for asymptotically large N , almost surely. B. The Case of Aggressive Construction N > √ M We first characterize the completed matrix X̂ as the solution to P2. Lemma 4 (Matrix completion with noise [19]). Suppose that the parameter ǫ in P2 is chosen to satisfy ǫ ≥ kPΩ (H−H)kF. In addition, assume the N is the largest integer chosen such that M ≥ βCN (log N )2 for some constant C. Then, with high probability, s (2 + p)N ǫ + 2ǫ (39) η , kX̂ − HkF ≤ 4 p PREPRINT VERSION 12 where p = M/N 2 . In the case of α1 = α2 , it can be shown that the SVD of H is given by Using (33), we have Hij − Hij 2 α2 L2  Kh2 L2 ≤ 12 + N 2N 2 Using the fact that kPΩ (H − H)k2F = X (i,j)∈Ω √ 2Kh L σ̄n σ̄ 2  + n2 , ε̄2 . N α1 α1 2 |Hij − Hij | ≤ M ε̄ 2 √ the choice of parameter ǫ = M ε̄, and M ≈ βCN (log N )2 for asymptotically large N , the bound (39) can be simplified as s √ (2 + βCN (log N )2 /N 2 )N √ η≤4 M ε̄ + 2 M ε̄ CN (log N )2 /N 2 r 32 N √ ≈ M ε̄ βC log N , η̄. (40) Let Ê be an N × N matrix, where the elements are i.i.d. random variables with zero mean and variance ω̃ 2 = η̄ 2 /N 2 , and  bounded fourth order moment. As a result, we have E kÊk2F ≥ kX̂−Hk2F with probability 1. Therefore, using the results in [26, Theorem 2.1], the spectral norm of Ê converges to ω̃√1 N σ(Ê) → 2 almost surely as N → ∞. As a result, σ(X̂ − H)2 < σ(Ê)2 ≈ 4ω̃ 2 N H = σ1 p1 q1T + σ2 p2 q2T (41) where σ1 (θ) = 12 α1 ku1 + u2 k2 kv1 + v2 k2 and σ2 (θ) = 1 2 α1 ku1 − u2 k2 kv1 − v2 k2 are the singular values, and u1 + u2 , ku1 + u2 k2 u1 − u2 p2 = , ku1 − u2 k2 p1 = v 1 + v2 kv1 + v2 k2 v 1 − v2 q2 = kv1 − v2 k2 q1 = are the corresponding singular vectors. Here, all the components are functions of θ. As a result, σ2 (θ)2 σ1 (θ)2 h(w − wc )2 ih(w − ws )2 i ≈ h(w + wc )2 ih(w + ws )2 i   1 − hw · wc i 1 − hw · ws i   = 1 + hw · wc i 1 + hw · ws i µ(θ) , (42) where we have used the factthat h(w−wc )2 i = hw2 i+hwc2 i− 2hw · wc i = 2 1 − hw · wc i . In addition, from properties of calculus, if f (x, θ) and ∂ ∂θ f (x, θ) are continuous in θ, then Z ∞ d d hf i = f (x, θ)dx dθ dθ Z ∞ −∞ D∂ E ∂ f (x, θ)dx = f . = ∂θ −∞ ∂θ almost surely. Using the singular vector perturbation results in [25] and Therefore, defining following similar calculations in (35) – (38), we have d √ wc′ (x, θ) , w(x) x=x−D cos θ 2Kh L σ̄n σ̄n2  256L2  Kh2 L2 1  2σ(Ê) 2 dx T . + + ≈ v1 e 1 ≤ d 2 κα1 κ2 2N 2 N α1 α21 ws′ (x, θ) , w(x) x=x−D sin θ dx we have A PPENDIX D P ROOF OF T HEOREM 4 d ∂ hw · wc i = hw · wc (x, θ)i = hw · wc′ iD sin θ dθ ∂θ W.l.o.g., assume that the two sources locate at s1 = (0, 0) ∂ d and s2 = (D cos θ, D sin θ). Define wc (x, θ) = w(x−D cos θ) hw · ws i = hw · ws (x, θ)i = −hw · ws′ iD cos θ. dθ ∂θ and ws (x, θ) = w(x − D sin θ), where w(x) is the unimodal With some algebra, the derivative of µ(θ) can be obtained and symmetric function R ∞ defined in Proposition 1. In addition, as using (3), we have −∞ w(x)2 dx ≈ 1. h  d Using Proposition 1, we have the following approximation µ(θ) = η D cos θhw · ws′ i 1 − hw · wc i2 Z ∞ dθ 2 i w(x) + wc (x, θ) dx ku1 + u2 k22 ≈ − D sin θhw · wc′ i 1 − hw · ws i2 −∞ h  i , h(w + wc )2 i = η − t · τ ′ (s) 1 − τ (t)2 + s · τ ′ (t) 1 − τ (s)2 −2 −2 where we have defined an integration operator h·i as where η = 2 1 + hw · wc i 1 + hw · ws i , t = D cos θ, Z ∞ and s = D sin θ. hf i , f (x, θ)dx Note that 0 < s < t for 0 < θ < π . Applying condition −∞ for a function f (x, θ). Note that the operator h·i is linear and satisfies the additive property, i.e., haf i = ahf i and hf + gi = hf i + hgi, for a constant a and a function g(x, θ). Similarly, kv1 + v2 k22 ≈ h(w + ws )2 i, ku1 − u2 k22 ≈ h(w − wc )2 i, and kv1 − v2 k22 ≈ h(w − ws )2 i. 4 (20), we have h i  d µ(θ) > η · t · τ ′ (s) 1 − τ (s)2 − 1 − τ (t)2 dθ  = η · t · τ ′ (s) τ (t)2 − τ (s)2 >0 PREPRINT VERSION 13 since τ ′ (s) < 0 and τ (t) < τ (s) for 0 < s < t. This confirms that µ(θ) is a strictly increasing function, and hence ρ(θ) is a strictly decreasing function in θ ∈ (0, π4 ). The result is thus proved. P ROOF A PPENDIX E OF P ROPOSITION 2 For notation brevity, we drop the symbol t for the variables related to the continuous-time algorithm dynamic X(t) wherever the meaning is clear. Denote the Hessian function of f (X) along the direction ξ ∈ RN ×N as i 1h g(X + γξ) − g(X) . h(ξ, X) = lim γ→0 γ Then, a Taylor’s expansion of the gradient function g(X) yields g(X) = g(X̂) + h(sξ, X̂) + o(s) where ξ = γ1 (X − X̂) and γ = kX − X̂kF . Therefore, as g(X̂) = 0, it holds that g(X) ≈ h(Xe , X̂) for small s. In addition, it holds that n o T d d E(Xe (t)) = tr X(t) − X̂ X(t) dt dt n o T = −tr X(t) − X̂ g(X(t)) . n o d As a result, dt E(Xe ) = −tr XTe h(XTe , X̂) + o(kXe k2F ). T Using (24) – (25) and the fact that H = ÛV̂ , it can be shown that   o  1 n T tr Xe h(Xe , X) = tr UTe W  Ue V T V 2    T T T U + V e W  Ve U     + tr UTe W  U VTe V     + tr VTe W T  V UTe U . Note that under H = H, we have W = 1N ×N . In addition, if kVe kF = o kUe kF , i.e., kVe kF ≪ kUe kF , then o n o   1 n T tr Xe h(Xe , X) = tr UTe Ue V T V + o kUe k2F 2  o  n = tr Ue V T V Ue + o kUe k2F = N X j=1 ≥ (e) N X j=1 (e) (e)T uj V T V uj   + o kUe k2F    (e) λK V T V kuj k2 + o kUe k2F where uj is the jth row vector of the matrix Ue . As a result, we have   T d E(Xe ) ≤ −2λK (V̂V̂ )kUe k2F + o kUe k2F dt proving (27).  If kUe kF = o kVe kF , the derivation to show (28) is similar. R EFERENCES [1] A. Beck, P. Stoica, and J. Li, “Exact and approximate solutions of source localization problems,” IEEE Trans. Signal Process., vol. 56, no. 5, pp. 1770–1778, 2008. [2] H.-D. Qi, N. Xiu, and X. Yuan, “A lagrangian dual approach to the single-source localization problem,” IEEE Trans. Signal Process., vol. 61, no. 15, pp. 3815–3826, 2013. [3] X. Sheng and Y.-H. Hu, “Maximum likelihood multiple-source localization using acoustic energy measurements with wireless sensor networks,” IEEE Trans. Signal Process., vol. 53, no. 1, pp. 44–53, 2005. [4] C. Meesookho, U. Mitra, and S. Narayanan, “On energy-based acoustic source localization for sensor networks,” IEEE Trans. Signal Process., vol. 56, no. 1, pp. 365–377, 2008. [5] Y. Liu, Y. H. Hu, and Q. Pan, “Distributed, robust acoustic source localization in a wireless sensor network,” IEEE Trans. Signal Process., vol. 60, no. 8, pp. 4350–4359, 2012. [6] C. Liu, Y. V. Zakharov, and T. Chen, “Broadband underwater localization of multiple sources using basis pursuit de-noising,” IEEE Trans. Signal Process., vol. 60, no. 4, pp. 1708–1717, 2012. [7] H. Chen, Q. Shi, R. Tan, H. V. Poor, and K. Sezaki, “Mobile element assisted cooperative localization for wireless sensor networks with obstacles,” IEEE Trans. Wireless Commun., vol. 9, no. 3, 2010. [8] T. He, C. Huang, B. M. Blum, J. A. Stankovic, and T. Abdelzaher, “Range-free localization schemes for large scale sensor networks,” in Proc. Int. Conf. Mobile Computing and Networking, 2003, pp. 81–95. [9] J. Blumenthal, R. Grossmann, F. Golatowski, and D. Timmermann, “Weighted centroid localization in Zigbee-based sensor networks,” in Prof. IEEE Int. Symp. Intelligent Signal Process., 2007, pp. 1–6. [10] J. Wang, P. Urriza, Y. Han, and D. Cabric, “Weighted centroid localization algorithm: theoretical analysis and distributed implementation,” IEEE Trans. Wireless Commun., vol. 10, no. 10, pp. 3403–3413, 2011. [11] S. Choudhary and U. Mitra, “Analysis of target detection via matrix completion,” in Proc. IEEE Int. Conf. Acoustics, Speech, and Signal Processing, 2015, pp. 3771–3775. [12] J. Chen and U. Mitra, “Rotated eigenstructure analysis for source localization without energy-decay models,” in Proc. Int. Conf. Digital Signal Process., London, UK, Aug. 2017. [13] R. Lefort, G. Real, and A. Drémeau, “Direct regressions for underwater acoustic source localization in fluctuating oceans,” Applied Acoustics, vol. 116, pp. 303–310, 2017. [14] Y. Jin, W.-S. Soh, and W.-C. Wong, “Indoor localization with channel impulse response based fingerprint and nonparametric regression,” IEEE Trans. Wireless Commun., vol. 9, no. 3, pp. 1120–1127, 2010. [15] W. Kim, J. Park, J. Yoo, H. J. Kim, and C. G. Park, “Target localization using ensemble support vector regression in wireless sensor networks,” IEEE Trans. on Cybernetics, vol. 43, no. 4, pp. 1189–1198, 2013. [16] S. Choudhary, N. Kumar, S. Narayanan, and U. Mitra, “Active target localization using low-rank matrix completion and unimodal regression,” arXiv preprint arXiv:1601.07254, 2016. [17] J. Chen and U. Mitra, “Underwater acoustic source localization using unimodal-constrained matrix factorization,” in Proc. Asilomar Conf. Signals, Systems and Computers, Pacific Grove, CA, USA, Nov. 2017. [18] E. Candes and B. Recht, “Exact matrix completion via convex optimization,” Commun. of the ACM, vol. 55, no. 6, pp. 111–119, 2012. [19] E. J. Candes and Y. Plan, “Matrix completion with noise,” Proceedings of the IEEE, vol. 98, no. 6, pp. 925–936, 2010. [20] A. Németh and S. Németh, “How to project onto an isotone projection cone,” Linear Algebra and its Applications, vol. 433, no. 1, pp. 41–51, 2010. [21] C. R. Berger, S. Zhou, J. C. Preisig, and P. Willett, “Sparse channel estimation for multicarrier underwater acoustic communication: From subspace methods to compressed sensing,” IEEE Trans. Signal Process., vol. 58, no. 3, pp. 1708–1721, 2010. [22] S. Beygi and U. Mitra, “Multi-scale multi-lag channel estimation using low rank approximation for OFDM,” IEEE Trans. Signal Process., vol. 63, no. 18, pp. 4744–4755, 2015. [23] L. M. Brekhovskikh, Fundamentals of ocean acoustics. Springer Science & Business Media, 2003. [24] M. Kaul, B. Yang, and C. S. Jensen, “Building accurate 3D spatial networks to enable next generation intelligent transportation systems,” in Proc. IEEE Int. Conf. Mobile Data Management, 2013, pp. 137–146. [25] V. Vu, “Singular vectors under random perturbation,” Random Structures & Algorithms, vol. 39, no. 4, pp. 526–538, 2011. [26] M. Rudelson and R. Vershynin, “Non-asymptotic theory of random matrices: extreme singular values,” arXiv preprint arXiv:1003.2990, 2010.
7cs.IT
An Improved Subsumption Testing Algorithm for the Optimal-Size Sorting Network Problem arXiv:1707.08725v1 [cs.DS] 27 Jul 2017 Cristian Frăsinaru and Mădălina Răschip Faculty of Computer Science, ”Alexandru Ioan Cuza” University, Iaşi, Romania Abstract In this paper a new method for checking the subsumption relation for the optimalsize sorting network problem is described. The new approach is based on creating a bipartite graph and modelling the subsumption test as the problem of enumerating all perfect matchings in this graph. Experiments showed significant improvements over the previous approaches when considering the number of subsumption checks and the time needed to find optimal-size sorting networks. We were able to generate all the complete sets of filters for comparator networks with 9 channels, confirming that the 25-comparators sorting network is optimal. The running time was reduced more than 10 times, compared to the state-of-the-art result described in [6]. Keywords: Comparator networks. Optimal-size sorting networks. Subsumption. 1. Introduction Sorting networks are a special class of sorting algorithms with an active research area since the 1950’s [10], [3], [2]. A sorting network is a comparison Email address: {acf, mionita}@info.uaic.ro (Cristian Frăsinaru and Mădălina Răschip) Preprint submitted to Elsevier July 28, 2017 network which for every input sequence produces a monotonically increasing output. Since the sequence of comparators does not depend on the input, the network represents an oblivious sorting algorithm. Such networks are suitable in parallel implementations of sorting, being applied in graphics processing units [9] and multiprocessor computers [3]. Over time, the research was focused on finding the optimal sorting networks relative to their size or depth. When the size is considered, the network must have a minimal number of comparators, while for the second objective a minimal number of layers is required. In [1] a construction method for sorting network of size O(nlogn) and depth O(logn) is given. This algorithm has good results in theory but it is inefficient in practice because of the large constants hidden in the big-O notation. On the other side, the simple algorithm from [3] which constructs networks of depth O(log 2n) has good results for practical values of n. Because optimal sorting networks for small number of inputs can be used to construct efficient larger networks the research in the area focused in the last years on finding such small networks. Optimal-size and optimal-depth networks are known for n ≤ 8 [10]. In [12] the optimal-depth sorting networks were provided for n = 9 and n = 10. The results were extended for 11 ≤ n ≤ 16 in [4]. The approaches use search with pruning based on symmetries on the first layers. The last results for parallel sorting networks are for 17 to 20 inputs and are given in [8], [5]. On the other side, the paper [6] proved the optimality in size for the case n = 9 and n = 10. The proof is based on exploiting symmetries in sorting networks and on encoding the problem as a satisfiability problem. The use of powerful modern SAT solvers to generate optimal sorting networks is also investigated in [11]. Other recent results can be found in [7], where a revised technique 2 to generate, modulo symmetry, the set of saturated two-layer comparator networks is given. Finding the minimum number of comparators for n > 10 is still an open problem. In this paper, we consider the optimal-size sorting networks problem. Heuristic approaches were also considered in literature, for example approaches based on evolutionary algorithms [15] that are able to discover new minimal networks for up to 22 inputs, but these methods cannot prove their optimality. One of the most important and expensive operation used in [6] is the subsumption testing. This paper presents a new better approach to implement this operation based on matchings in bipartite graphs. The results show that the new approach makes the problem more tractable by scaling it to larger inputs. The paper is organized as follows. Section 2 describes the basic concepts needed to define the optimal-size sorting-network problem and a new model of the subsumption problem. Section 3 presents the problem of finding the minimalsize sorting network. Section 4 discusses the subsumption problem while Section 5 the subsumption testing. Section 6 presents the new way of subsumption testing by enumerating all perfect matchings. Section 7 describes the experiments made to evaluate the approach and presents the results. 2. Basic Concepts A comparator network Cn,k with n channels (also called wires) and size k is a sequence of comparators c1 = (i1 , j1 ); . . . ; ck = (ik ; jk ) where each comparator ct specifies a pair of channels 1 ≤ it < jt ≤ n. We simply denote by Cn a comparator network with n channels, whenever the size of the network is not significant in a certain context. Graphically, a comparator network may be represented as a Knuth diagram 3 [10]. A channel is depicted as a horizontal line and a comparator as a vertical segment connecting two channels. 1 0 0 0 0 0 0 1 1 1 1 0 1 1 0 0 0 1 0 0 1 1 1 1 channel 1 channel 2 channel 3 channel 4 Figure 1: The sorting network C = (1, 2); (3, 4); (2, 4); (1, 3); (2, 3), having 4 channels and 5 comparators, operating on the input sequence 1010. The output sequence is 0011. An input to a comparator network Cn may be any sequence of n objects taken from a totally ordered set, for instance elements in Zn . Let x = (x1 , . . . , xn ) be an input sequence. Each value xi is assigned to the channel i and it will ”traverse” the comparator network from left to right. Whenever the values on two channels reach a comparator c = (i, j) the following happens: if they are not in ascending order the comparator permutes the values (xi , xj ), otherwise the values will pass through the comparator unmodified. Therefore, the output of a comparator network is always a permutation of the input. If x is an input sequence, we denote by C(x) the output sequence of the network C. A comparator network is called a sorting network if its output is sorted ascending for every possible input. The zero-one principle [10] states that if a comparator network Cn sorts correctly all 2n sequences of zero and one, then it is a sorting network. Hence, without loss of generality, from now on we consider only comparator networks with binary input sequences. In order to increase readability, whenever we represent a 4 binary sequence we only write its bits; so 1010 is actually the sequence (1, 0, 1, 0). The output set of a comparator network is outputs(C) = {C(x)|∀x ∈ {0, 1}n }. Let x be a binary input sequence of length n. We make the following notations: zeros(x) = {1 ≤ i ≤ n|xi = 0} and ones(x) = {1 ≤ i ≤ n|xi = 1}. The output set of a comparator network Cn can be partitioned into n + 1 clusters, each cluster containing sequences in outputs(C) having the same number of ones. We denote by cluster(C, p) the cluster containing all sequences having p ones: cluster(C, p) = {x ∈ outputs(C) | |ones(x)| = p}. Consider the following simple network C = (1, 2); (3, 4). The output clusters of C are: cluster(C, 0) = {0000}, cluster(C, 1) = {0001, 0100}, cluster(C, 2) = {0011, 0101, 1100}, cluster(C, 3) = {0111, 1101}, cluster(C, 4) = {1111}. The following proposition states some simple observations regarding the output set and its clusters. Proposition 1. Let C be a comparator network having n channels. (a) C is the empty network ⇔ |outputs(C)| = 2n . (b) C is a sorting network ⇔ |outputs(C)| = n + 1 (each cluster contains exactly one element). (c) |cluster(C, p)| ≤ n p  , 1 ≤ p ≤ n − 1. (d) |cluster(C, 0)| = |cluster(C, n)| = 1. We extend the zeros and ones notations to output clusters in the following manner. Let C be a comparator network. For all 0 ≤ p ≤ n we denote S S zeros(C, p) = {zeros(x)|x ∈ cluster(C, p)} and ones(C, p) = {ones(x)|x ∈ cluster(C, p)}. These sets contain all the positions between 1 and n for which 5 there is at least one sequence in the cluster having a zero, respectively an one, set at that position. Considering the clusters from the previous example, we have: zeros(C, 0) = zeros(C, 1) = zeros(C, 2) = {1, 2, 3, 4}, zeros(C, 3) = {1, 3}, zeros(C, 4) = ∅, ones(C, 0) = ∅, ones(C, 1) = {2, 4}, ones(C, 2) = ones(C, 3) = ones(C, 4) = {1, 2, 3, 4}. We introduce the following equivalent representation of the zeros and ones sets, as a sequence of length n, where n is the number of channels of the network, and elements taken from the set {0, 1}. Let Γ be a cluster: • zeros(Γ) = (γ1 , . . . , γn ), where γi = 0 if i ∈ zeros(Γ), otherwise γi = 1, • ones(Γ) = (γ1′ , . . . , γn′ ), where γi′ = 1 if i ∈ ones(Γ), otherwise γi′ = 0. In order to increase readability, we will depict 1 values in zeros, respectively 0 values in ones with the symbol ∗. Considering again the previous example, we have: zeros(C, 3) = (0 ∗ 0∗) and ones(C, 1) = (∗1 ∗ 1). If C is a comparator network on n channels and 1 ≤ i < j ≤ n we denote by C; (i, j) the concatenation of C and (i, j), i.e. the network that has all the comparators of C and in addition a new comparator connecting channels i and j. The concatenation of two networks C and C ′ having the same number of channels is denoted by C; C ′ and it is defined as the sequence of all comparators in C and C ′ , first the ones in C and then the ones in C ′ . In this context, C represents a prefix of the network C; C ′ . Obviously, size(C; C ′ ) = size(C) + size(C ′ ). Let π be a permutation on {1, . . . , n}. Applying π on a comparator network C = (i1 , j1 ); . . . ; (ik , jk ) will produce the generalized network π(C) = (π(i1 ), π(j1 )); . . . ; (π(ik ), π(jk )). It is called generalized because it may contain comparators (i, j) with i > j, which does not conform to the actual definition of 6 a standard comparator network. An important result in the context of analyzing sorting networks (exercise 5.3.4.16 in [10]) states that a generalized sorting network can always be untangled such that the result is a standard sorting network of the same size. The untangling algorithm is described in the previously mentioned exercise. Two networks Ca and Cb are called equivalent if there is a permutation π such that untangling π(Cb ) results in Ca . Applying a permutation π on a binary sequence x = (x1 , . . . , xn ) will permute the corresponding values: π(x) = (xπ(1) , . . . , xπ(n) ). Applying π on a set of sequences S (either a cluster or the whole output set) will permute the values of all the sequences in the set: π(S) = {π(x)|∀x ∈ S}. For example, consider the permutation π = (4, 3, 2, 1) and the set of sequences S = {0011, 0101, 1100}. Then, π(S) = {1100, 1010, 0011} 3. Optimal-size sorting networks The optimal size problem regarding sorting networks is: ”Given a positive integer n, what is the minimum number of comparators sn needed to create a sorting network on n channels?”. Since even the problem of verifying whether a comparator network is a sorting network is known to be Co-N P complete [13], we cannot expect to design an algorithm that will easily answer the optimal size problem. On the contrary. In order to prove that sn ≤ k, for some k, it is enough to find a sorting network of size k. On the other hand, to show that sn > k one should prove that no network on n channels having at most k comparators is a sorting network. Let Rkn denote the set of all comparator networks having n channels and k comparators. The naive approach to identify the sorting networks is by generating 7 the whole set Rkn , starting with the empty network and adding all possible comparators. In order to find a sorting network on n channels of size k, one could iterate through the set Rkn and inspect the output set of each network. According to proposition 1 (b), if the size of the output is n + 1 then we have found a sorting network. If no sorting network is found, we have established that sn > k. Unfortunately, the size of Rkn grows rapidly since |Rkn | = (n(n − 1)/2)k and constructing the whole set Rkn is impracticable even for small values of n and k. We are actually interested in creating a set of networks Nkn that does not include all possible networks but contains only ”relevant” elements. Definition 1. A complete set of filters [6] is a set Nkn of comparator networks on n channels and of size k, satisfying the following properties: (a) If sn = k then Nkn contains at least one sorting network of size k. opt n (b) If k < sn = k ′ then ∃Cn,k ′ an optimal-size sorting network and ∃Cn,k ∈ Nk such that C is a prefix of C opt . Since the existence of Nkn is guaranteed by the fact that Rkn is actually a complete set of filters, we are interested in creating such a set that is small enough (can be computed in a ”reasonable” amount of time). 4. Subsumption In order to create a complete set of filters in [6] it is introduced the relation of subsumption. Definition 2. Let Ca and Cb be comparator networks on n channels. If there exists a permutation π on {1, . . . , n} such that π(outputs(Ca )) ⊆ outputs(Cb ) 8 we say that Ca subsumes Cb , and we write Ca  Cb (or Ca ≤π Cb to indicate the permutation). For example, consider the networks Ca = (0, 1); (1, 2); (0, 3) and Cb = (0, 1); (0, 2); (1, 3). Their output sets are: ouputs(Ca) = {{0000}, {0001, 0010}, {0011, 0110}, {0111, 1011}, {1111}}, ouputs(Cb) = {{0000}, {0001, 0010}, {0011, 0101}, {0111, 1011}, {1111}}. It is easy to verify that π = (0, 1, 3, 2) has the property that Ca ≤π Cb . Proposition 2. Let Ca and Cb be comparator networks on n channels, having |outputs(Ca)| = |outputs(Cb)|. Then, Ca  Cb ⇔ Cb  Ca . Proof. Assume that Ca ≤π Cb ⇒ π(outputs(Ca)) ⊆ outputs(Cb) and since |outputs(Ca)| = |outputs(Cb)| ⇒ π(outputs(Ca)) = outputs(Cb). That means that π is actually mapping each sequence in outputs(Ca ) to a distinct sequence in outputs(Cb). The inverse permutation π −1 is also a mapping, this time from outputs(Cb) to outputs(Ca), implying that π −1 (outputs(Cb )) = outputs(Ca) ⇒ Cb ≤π−1 Ca . The following result is the key to creating a complete set of filters: Lemma 1. Let Ca and Cb be comparator networks on n channels, both having the same size, and Ca  Cb . Then, if there exists a sorting network Cb ; C of size k, there also exists a sorting network Ca ; C ′ of size k. The proof of the lemma is presented in [6] (Lemma 2) and [4] (Lemma 7). The previous lemma ”suggests” that when creating the set of networks Rkn using the naive approach, and having the goal of creating actually a complete set 9 of filters, we should not add two networks in this set if one of them subsumes the other. The algorithm to generate Nkn Require: n, k ∈ Z+ Ensure: Returns Nkn , a complete set of filters N0n = {Cn,0 } {Start with the empty network} for all p = 1 . . . k do n Npn = ∅ {Generate Npn from Np−1 , adding all possible comparators} n do for all C ∈ Np−1 for all i = 1 . . . n − 1, j = i + 1 . . . n do if the comparator (i, j) is redundant then continue end if C ∗ = C; (i, j) {Create a new network C ∗ } if 6 ∃C ′ ∈ Npn such that C ′  C ∗ then Npn = Npn ∪ C ∗ Remove from Npn all the networks C ′′ such that C ∗  C ′′ . end if end for end for end for return Nkn A comparator c is redundant relative to the network C if adding it at the end of C does not modify the output set: outputs(C; c) = outputs(C). Testing if a 10 comparator c = (i, j) is redundant relative to a network C can be easily implemented by inspecting the values xi and xj in all the sequences x ∈ outputs(C). If xi ≤ xj for all the sequences then c is redundant. The key aspect in implementing the algorithm above is the test for subsumption. 5. Subsumption testing Let Ca and Cb be comparator networks on n channels. According to definition 2, in order to check if Ca subsumes Cb we must find a permutation π on {1, . . . , n} such that π(outputs(Ca)) ⊆ outputs(Cb). If no such permutation exists then Ca does not subsume Cb . In order to avoid iterating through all n! permutations, in [6] several results are presented that identify situations when subsumption testing can be implemented efficiently. We enumerate them as the tests ST1 to ST4 . (ST1 ) Check the total size of the output If |outputs(Ca)| > |outputs(Cb)| then Ca cannot subsume Cb . (ST2 ) Check the size of corresponding clusters (Lemma 4 in [6]) If there exists 0 ≤ p ≤ n such that |cluster(Ca , p)| > |cluster(Cb , p)| then Ca cannot subsume Cb . When applying a permutation π on a sequence in outputs(Ca ), the number of bits set to 1 remains the same, only their positions change. So, if π(outputs(Ca)) ⊆ outputs(Cb ) then ∀0 ≤ p ≤ n π(cluster(Ca ), p) ⊆ cluster(Cb , p), which implies that |cluster(Ca )| = |π(cluster(Ca), p)| ≤ |cluster(Cb, p)| for all 0 ≤ p ≤ n. (ST3 ) Check the ones and zeros (Lemma 5 in [6]) Recall that zeros and ones represent the sets of positions that are set to 0, respec11 tively to 1. If there exists 0 ≤ p ≤ n such that |zeros(Ca , p)| > |zeros(Cb , p)| or |ones(Ca , p)| > |ones(Cb , p)| then Ca cannot subsume Cb . For example, consider the networks Ca = (0, 1); (2, 3); (1, 3); (0, 4); (0, 2) and Cb = (0, 1); (2, 3); (0, 2); (2, 4); (0, 2). cluster(Ca , 2) = {0011, 00110, 01010}, cluster(Cb , 2) = {00011, 01001, 01010}, ones(Ca , 2) = {2, 3, 4, 5}, ones(Cb , 2) = {2, 4, 5}, therefore Ca 6 Cb . (ST4 ) Check all permutations (Lemma 6 in [6]) The final optimization presented in [6] states that if there exists a permutation π such that π(outputs(Ca )) ⊆ outputs(Cb) then ∀0 ≤ p ≤ n zeros(π(Ca , p)) ⊆ zeros(Cb , p) and ones(π(Ca , p)) ⊆ ones(Cb , p). So, before checking the inclusion for the whole output sets, we should check the inclusion for the zeros and ones sets, which is computationally cheaper. The tests (ST1 ) to (ST3 ) are very easy to check and are highly effective in reducing the search space. However, if none of them can be applied, we have to enumerate the whole set of n! permutations, verify (ST4 ) and eventually the definition of subsumption, for each one of them. In [6] the authors focused on n = 9 which means verifying 362, 880 permutations for each subsumption test. They were successful in creating all sets of complete filters Nk9 for k = 1, . . . , 25 and actually proved that s9 = 25. Using a powerful computer and running a parallel implementation of the algorithm on 288 threads, the time necessary for 9 creating these sets was measured in days (more than five days only for N14 ). Moving from 9! to 10! = 3, 628, 800 or 11! = 39, 916, 800 does not seem feasible. We have to take in consideration also the size of the complete filter sets, 9 for example |N14 | = 914, 444. We present a new approach for testing subsumption, which greatly reduces the 12 number of permutations which must be taken into consideration. Instead of enumerating all permutations we will enumerate all perfect matchings in a bipartite graph created for the networks Ca and Cb being tested. 6. Enumerating perfect matchings Definition 3. Let Ca and Cb be comparator networks on n channels. The subsumption graph G(Ca , Cb ) is defined as the bipartite graph (A, B; E(G)) with vertex set V (G) = A ∪ B, where A = B = {1, . . . , n} and the edge set E(G) defined as follows. Any edge e ∈ E(G) is a 2-set e = {i, j} with i ∈ A and j ∈ B (also written as e = ij) having the properties: • i ∈ zeros(Ca , p) ⇒ j ∈ zeros(Cb , p), ∀0 ≤ p ≤ n; • i ∈ ones(Ca , p) ⇒ j ∈ ones(Cb , p), ∀0 ≤ p ≤ n. So, the edges of the subsumption graph G represent a relationship between positions in the two output sets of Ca and Cb . An edge ij signifies that the position i (regarding the sequences in outputs(Ca )) and the position j (regarding Cb ) are ”compatible”, meaning that a permutation π with the property π(outputs(Ca )) ⊆ outputs(Cb) might have the mapping i to j as a part of it. As an example, consider the following zeros and ones sequences, corresponding to Ca = (0, 1); (2, 3); (1, 3); (1, 4) and Cb = (0, 1); (2, 3); (0, 3); (1, 4). zeros(Ca ) = {00000,00000,000-0,000--,000--,-----}, zeros(Cb ) = {00000,00000,00000,000--,000--,-----}, ones(Ca ) = {-----,---11,1-111,11111,11111,11111}, ones(Cb ) = {-----,---11,-1111,11111,11111,11111}. The subsumption graph G(Ca , Cb ) is pictured below: 13 1 2 3 4 5 1 2 3 4 5 Figure 2: The subsumption graph corresponding to the comparator networks Ca = (0, 1); (2, 3); (1, 3); (1, 4) and Cb = (0, 1); (2, 3); (0, 3); (1, 4) A matching M in the graph G is a set of independent edges (no two edges in the matching share a common node). If ij ∈ M we say that i and j are saturated. A perfect matching is a matching that saturates all vertices of the graph. Lemma 2. Let Ca and Cb be comparator networks on n channels. If Ca ≤π Cb then π represents a perfect matching in the subsumption graph G(Ca , Cb). Proof. Suppose that Ca ≤π Cb , π(i) = j and ij 6∈ E(G). That means that ∃0 ≤ p ≤ n such that i ∈ zeros(Ca , p)∧j 6∈ zeros(Cb , p) or i ∈ ones(Ca , p)∧j 6∈ ones(Cb , p). We will asumme the first case. Let x a sequence in cluster(Ca , p) such that x(i) = 0. Since π(outputs(Ca )) ⊆ outputs(Cb) ⇒ π(x) ∈ cluster(Cb , p). But π(i) = j, therefore in cluster(Cb , p) there is the sequence π(x) having the bit at position j equal to 0, contradiction. The previous lemma leads to the following result: Corollary 1. Let Ca and Cb be comparator networks on n channels. Then Ca subsumes Cb if and only if there exists a perfect matching π in the subsumption graph G(Ca , Cb). The graph in figure 2 has only four perfect matchings: (2, 1, 3, 4, 5), (3, 1, 2, 4, 5), (2, 1, 3, 5, 4), (3, 1, 2, 5, 4). So, when testing subsumption, instead of verifying 5! = 120 permutations it is enough to verify only 4 of them. 14 If two clusters are of the same size, then we can strengthen the previous result even more. If there is a permutation π such that π(cluster(Ca , p)) = cluster(Cb , p) then π −1 (cluster(Cb , p) = cluster(Ca , p). Using the same reasoning, when creating the subsumption graph C(Ga , Cb) we add the following two condition when defining an edge ij: • j ∈ zeros(Cb , p) ⇒ i ∈ zeros(Ca , p), ∀0 ≤ p ≤ n such that |cluster(Ca , p)| = |cluster(Cb, p)|, • j ∈ ones(Cb , p) ⇒ i ∈ ones(Ca , p), ∀0 ≤ p ≤ n such that |cluster(Ca , p)| = |cluster(Cb, p)|. In order to enumerate all perfect matchings in a bipartite graph, we have implemented the algorithm described in [14]. The algorithm starts with finding a perfect matching in the subsumption graph G(Ca , Cb ). Taking into consideration the small size of the bipartite graph, we have chosen the Ford-Fulkerson algorithm which is very simple and does not require elaborate data structures. Its time complexity is O(n|E(G)|). If no perfect matching exists, then we have established that Ca does not subsume Cb . Otherwise, the algorithm presented in [14] identifies all other perfect matchings, taking only O(n) time per matching. 7. Experimental results We implemented both variants of subsumption testing: • (1) enumerating all permutations and checking the inclusions described by (ST4 ) before verifying the actual definition of subsumption; • (2) verifying only the permutations that are actually perfect matchings in the subsumption graph, according to Corollary 1. 15 We made some simple experiments on a regular computer (Intel i7-4700HQ @2.40GHz), using 8 concurrent threads. The programming platform was Java SE Development Kit 8. Several suggestive results are presented in the table below: (n, k) |Nkn | total sub perm1 time1 perm2 time2 (7, 9) 678 1, 223, 426 5, 144 26, 505, 101 2.88 33, 120 0.07 (7, 10) 510 878, 995 5, 728 25, 363, 033 2.82 24, 362 0.06 (8, 7) 648 980, 765 2, 939 105, 863, 506 13.67 49, 142 0.14 (8, 8) 2088 9, 117, 107 9, 381 738, 053, 686 94.50 283, 614 0.49 (8, 9) 5703 24, 511, 628 29, 104 4, 974, 612, 498 650.22 1, 303, 340 1.96 The columns of the table have the following significations: • (n, k) - n is the number of channels, k is the number of comparators; • |Nkn | - the size of the complete set of filters generated for the given n and k; • total - the total number of subsumption checks; • sub - the number of subsumptions that were identified; • perm1 - how many permutations were checked, using the variant (1); • time1 - the total time, measured in seconds, using the variant (1); • perm2 - how many permutations were checked, using the variant (2); • time2 - the total time, measured in seconds, using the variant (2); As we can see from this results, using the variant (2) the number of permutations that were verified in order to establish subsumption is greatly reduced. 16 Despite the fact that it is necessary to create the subsumption graph and to iterate through its set of perfect matchings, this leads to a much shorter time needed for the overall generation of the complete set of filters. This new approach enabled us to reproduce the state-of-the-art result concerning optimal-size sorting networks, described in [6]. Using an Intel Xeon E5-2670 @ 2.60GHz computer, with a total of 32 cores, we generated all the complete set of filters for n = 9. The results are presented in the table below. k 1 2 3 4 5 6 7 8 |Nk9 | 1 3 7 20 59 208 807 3415 time(s) 0 0 0 0 0 0 0 0 k 9 10 11 12 13 14 15 16 14343 55991 188730 490322 854638 914444 607164 274212 4 48 769 6688 25186 40896 24161 5511 17 18 19 20 21 22 23 24 25 94085 25786 5699 1107 250 73 27 8 1 610 36 2 0 0 0 0 0 0 |Nk9 | time(s) k |Nk9 | time(s) 9 In [6] the necessary time required to compute |N14 | using the generate-and- prune approach was estimated at more than 5 days of computation on 288 threads. Their tests were performed on a cluster with a total of 144 Intel E8400 cores clocked at 3 GHz. In our experiments, the same set was created in only 11 hours, which is actually a significant improvement. 8. Acknowledgments We would like to thank Michael Codish for introducing us to this research topic and Cornelius Croitoru for his valuable comments. Furthermore, we thank 17 Mihai Rotaru for providing us with the computational resources to run our experiments. 9. Conclusions In this paper we have extended the work in [6], further investigating the relation of subsumption. In order to determine the minimal number of comparators needed to sort any input of a given length, a systematic BFS-like algorithm generates incrementally complete sets of filters, that is sets of comparator networks that have the potential to prefix an optimal-size sorting network. To make this approach feasible it is essential to avoid adding into these sets networks that subsume one another. Testing the subsumption is an expensive operation, invoked a huge number of times during the execution of the algorithm. We described a new approach to implement this test, based on enumerating perfect matchings in a bipartite graph, called the subsumption graph. Computer experiments have shown significant improvements, greatly reducing the number of invocations and the overall running time. The results show that, using appropriate hardware, it might be possible to approach in this manner the optimal-size problem for sorting networks with more than 10 channels. References [1] M. Ajtai, J. Komlós, and E. Szemerédi. An 0(n log n) sorting network. In Proceedings of the Fifteenth Annual ACM Symposium on Theory of Computing, STOC ’83, pages 1–9. ACM, 1983. [2] Sherenaz W. Al-Haj Baddar and Kenneth E. Batcher. Designing Sorting Networks: A New Paradigm. Springer Science & Business Media, 2012. 18 [3] Kenneth E. Batcher. Sorting networks and their applications. In Proceedings of the April 30–May 2, 1968, spring joint computer conference, pages 307– 314. ACM, 1968. [4] Daniel Bundala and Jakub Závodnỳ. Optimal sorting networks. In International Conference on Language and Automata Theory and Applications, pages 236–247. Springer, 2014. [5] Michael Codish, Luı́s Cruz-Filipe, Thorsten Ehlers, Mike Müller, and Peter Schneider-Kamp. Sorting networks: to the end and back again. Journal of Computer and System Sciences, 2016. [6] Michael Codish, Luı́s Cruz-Filipe, Michael Frank, and Peter SchneiderKamp. Twenty-five comparators is optimal when sorting nine inputs (and twenty-nine for ten). In Tools with Artificial Intelligence (ICTAI), 2014 IEEE 26th International Conference on, pages 186–193. IEEE, 2014. [7] Michael Codish, Luı́s Cruz-Filipe, and Peter Schneider-Kamp. The quest for optimal sorting networks: Efficient generation of two-layer prefixes. In Symbolic and Numeric Algorithms for Scientific Computing (SYNASC), 2014 16th International Symposium on, pages 359–366. IEEE, 2014. [8] Thorsten Ehlers and Mike Müller. New bounds on optimal sorting networks. In Conference on Computability in Europe, pages 167–176. Springer, 2015. [9] Peter Kipfer and Rüdiger Westermann. Improved gpu sorting. GPU gems, 2:733–746, 2005. [10] Donald E. Knuth. The Art of Computer Programming, Volume 3: Sorting 19 and Searching (2nd ed.). Addison Wesley Longman Publishing Co., Inc., Redwood City, CA, USA, 1998. [11] Andreas Morgenstern and Klaus Schneider. Synthesis of parallel sorting networks using sat solvers. In MBMV, pages 71–80, 2011. [12] Ian Parberry. A computer-assisted optimal depth lower bound for nine-input sorting networks. Mathematical systems theory, 24(1):101–116, 1991. [13] Ian Parberry. On the computational complexity of optimal sorting network verification. In Parle ’91 Parallel Architectures and Languages Europe: Volume I: Parallel Architectures and Algorithms, pages 252–269. Springer, 1991. [14] Takeaki Uno. Algorithms for enumerating all perfect, maximum and maximal matchings in bipartite graphs. In Proceedings of the 8th International Symposium on Algorithms and Computation, ISAAC ’97, pages 92–101, London, UK, UK, 1997. Springer-Verlag. [15] Vinod K. Valsalam and Risto Miikkulainen. Using symmetry and evolutionary search to minimize sorting networks. Journal of Machine Learning Research, 14:303–331, 2013. 20
8cs.DS
Chained Multi-stream Networks Exploiting Pose, Motion, and Appearance for Action Classification and Detection arXiv:1704.00616v2 [cs.CV] 26 May 2017 Mohammadreza Zolfaghari , Gabriel L. Oliveira, Nima Sedaghat, and Thomas Brox University of Freiburg Freiburg im Breisgau, Germany {zolfagha,oliveira,nima,brox}@cs.uni-freiburg.de Abstract General human action recognition requires understanding of various visual cues. In this paper, we propose a network architecture that computes and integrates the most important visual cues for action recognition: pose, motion, and the raw images. For the integration, we introduce a Markov chain model which adds cues successively. The resulting approach is efficient and applicable to action classification as well as to spatial and temporal action localization. The two contributions clearly improve the performance over respective baselines. The overall approach achieves state-of-the-art action classification performance on HMDB51, J-HMDB and NTU RGB+D datasets. Moreover, it yields state-of-the-art spatio-temporal action localization results on UCF101 and J-HMDB. Figure 1: The chained multi-stream 3D-CNN sequentially refines action class labels by analyzing motion and pose cues. Pose is represented by human body parts detected by a deep network. The spatio-temporal CNN can capture the temporal dynamics of pose. Additional losses on YP ose and YOF are used for training. The final output of the network YRGB is provided at the end of the chain. 1. Introduction Human action recognition is a complex task in computer vision, due to the variety of possible actions is large and there are multiple visual cues that play an important role. In contrast to object recognition, action recognition involves not only the detection of one or multiple persons, but also the awareness of other objects, potentially involved in the action, such as the pose of the person, and their motion. Actions can span various time intervals, making good use of videos and their temporal context is a prerequisite for solving the task to its full extent [38, 37]. The success of convolutional networks in recognition has also influenced action recognition. Due to the importance of multiple visual cues, as shown by Jhuang et al. [12], multistream architectures have been most popular. This trend was initiated by Simonyan and Zisserman [33], who proposed a simple fusion of the action class scores obtained with two separate convolutional networks, where one was trained on raw images and the other on optical flow. The relative success of this strategy shows that deep networks for action recognition cannot directly infer the relevant motion cues from the raw images, although, in principle, the network could learn to compute such cues. In this paper, we propose a three-stream architecture that also includes pose, see Figure 1. Existing approaches model the temporal dynamics of human postures with hand-crafted features. We rather propose to compute the position of human body parts with a fast convolutional network. Moreover, we use a network architecture with spatio-temporal convolutions [37]. This combination can capture temporal dynamics of body parts over time, which is valuable to improve action recognition performance, as we show in dedicated experiments. The pose network also yields the spatial localization of the persons, which allows us to apply the approach to spatial action localization in a straightforward manner. 1 The second contribution is on the combination of the multiple streams, as also illustrated in Figure 1. The combination is typically done by summation of scores, by a linear classifier, or by early or late concatenation of features within the network. In this paper, we propose the integration of different modalities via a Markov chain, which leads to a sequential refinement of action labels. We show that such sequential refinement is beneficial over independent training of streams. At the same time, the sequential chain imposes an implicit regularization. This makes the architecture more robust to over-fitting – a major concern when jointly training very large networks. Experiments on multiple benchmarks consistently show the benefit of the sequential refinement approach over alternative fusion strategies. Since actions may span different temporal resolutions, we analyze videos at multiple temporal scales. We demonstrate that combining multiple temporal granularity levels improves the capability of recognizing different actions. In contrast to some other state-of-the-art strategies to analyze videos over longer time spans, e.g., temporal segmentation networks [43], the architecture still allows the temporal localization of actions by providing actionness scores of frames using a sliding window over video. We demonstrate this flexibility by applying the approach also to temporal and spatio-temporal action detection. Compared to previous spatio-temporal action localization methods, which are typically based on region proposals and action tubes, the pose network in our approach directly provides an accurate person localization at no additional computational costs. Therefore, it consistently outperforms the previous methods in terms of speed and mean average precision. LSTM to classify video sequences. More recently, several CNN based works presented efficient deep models for action recognition [6, 29, 37]. Tran et al. [37] employed a 3D architecture to learn spatio-temporal features from videos. Fusion of multiple modalities. Zisserman et al. [33] proposed a two-stream CNN to capture the complementary information from appearance and motion, each modality in an independent stream. Feichtenhofer et al. [8] investigated the optimal position within a convolution network in detail to combine the separate streams. Park et al. [28] proposed a gated fusion approach. In a similar spirit, Wang et al. [46] presented an adaptive fusion approach, which uses two regularization terms to learn fusion weights. In addition to optical flow, some works made use of other modalities like audio [46], warped flow [43], and object information [11] to capture complementary information for video classification. In the present work, we introduce a new, flexible fusion technique for early or late fusion via a Markov chain and show that it outperforms previous fusion methods. Pose feature based methods. Temporal dynamics of body parts over time provides strong information on the performing action. Thus, this information has been employed for action recognition in several works [4, 19, 39]. Cheron et al. [4] used pose information to extract high-level features from appearance and optical flow. They showed that using pose information for video classification is highly effective. Wang et al. [39] used data mining techniques to obtain a representation for each video and finally, by using a bag-of-words model to classify videos. In the present work, we compute the human body layout efficiently with a deep network and learn the relevant spatio-temporal pose features within one of the streams of our action classification network. 2. Related work Feature based approaches. Many traditional works in the field of action recognition focused on designing features to discriminate action classes [17, 40, 5, 16]. These features were encoded with high order encodings, e.g., bag of words (BoW) [35] or Fisher vector based encodings [31], to produce a global representation for video and to train a classifier on the action labels. Recent research showed that most of these approaches are not only computationally expensive, but they also fail on capturing context and high-level information. CNN based approaches. Deep learning has enabled the replacement of hand-crafted features by learned features, and the learning of whole tasks end-to-end. Several works employed deep architectures for video classification [24, 37, 41]. Thanks to their hiearchical feature representation, deep networks learn to capture localized features as well as context cues and can exploit high-level information from large scale video datasets. Baccouche et al. [2] firstly used a 3D CNN to learn spatio-temporal features from video and in the next step they employed an 3. Inputs to the Network We rely on three input cues: the raw RGB images, optical flow, and human pose in the form of human body part segmentation. All inputs are provided as spatio-temporal inputs covering multiple frames. 3.1. Optical Flow We compute the optical flow with the method from Zach et al. [48], which is a reliable variational method that runs sufficiently fast. We convert the x-component and ycomponent of the optical flow to a 3 channel RGB image by stacking components and magnitude of them [29]. The flow and magnitude values in the image are multiplied by 16 and quantized into the [0,255] interval [18, 29, 42, 43]. 3.2. Body Part Segmentation Encoder-decoder architectures with an up-convolutional part have been used successfully for semantic segmentation tasks [23, 22, 30, 3, 27], depth estimation [20] and optical 2 Figure 2: Human body part segmentation architecture. Convolutions are shown in green, pooling in blue, feature map dropout in brown, up-convolutional layers in red and softmax in yellow. flow estimation [7]. For this work, we make use of Fast-Net [27], a network for human body part segmentation, which will provide our action recognition network with body pose information. Figure 2 illustrates the architecture of FastNet. The encoder part of the network is initialized with the VGG network [34]. Skip connections from the encoder to the decoder part ensure the reconstruction of details in the output up to the original input resolution. We trained the Fast-Net architecture on the J-HMDB [12] and the MPII [1] action recognition datasets. J-HMDB provides body part segmentation masks and joint locations, while MPII provides only joint locations. To make body part masks compatible across datasets, we apply the following methodology, which only requires annotation for the joint locations. First, we derive a polygon for the torso from the joint locations around that area. Secondly, we approximate the other parts by ellipses scaled consistently based on the torso area and the distance between the respective joints; see second column of Fig. 3. We convert the body part segmentation into a 3 channel RGB image, mapping each label to a correspondent pre-defined RGB value. To the best of our knowledge, we are the first who trained a convolutional network on body part segmentation for the purpose of action recognition. Figure 3 shows exemplary results of the body part segmentation technique on J-HMDB and MPII datasets. Clearly, the network provides good accuracy on part segmentation and is capable of handling images with multiple instances. The pose estimation network has a resolution of 150×150 and runs at 33 fps. Figure 3: Qualitative results on J-HMDB and MPII datasets (task with 15 body parts). First column: Input image. Second column: Ground truth. Third column: Result predicted with Fast-Net. First two rows correspond to results on J-HMDB and the last ones on MPII. 4. Action Recognition Network optical flow stream, and finally apply a refinement by the RGB stream. We use the assumption that the class predictions are conditionally independent due to the different input modalities. Consequently, the joint probability over all input streams factorizes into the conditional probabilities over the separate input streams. In a Markov chain, given a sequence of inputs X = {X1 , X2 , ..., XS }, we wish to predict the output sequence Y = {Y1 , Y2 , ..., YS } such that P (Y |X) is maximized. Due 4.1. Multi-stream Fusion with a Markov Chain To integrate information from the different inputs we rely on the model of a multi-stream architecture [33], i.e., each input cue is fed to a separate convolutional network stream that is trained on action classification. The innovation in our approach is the way we combine these streams. In contrast to the previous works, we combine features from the different streams sequentially. Starting with the human body part stream, we refine the evidence for an action class with the 3 YPose YOF YRGB FC2 FC FC FC FC1 FC FC Ypred h1 YPose h2 At each subsequent stage s > 2, we obtain a refined prediction ys by combining the hidden state and the predictions from the previous stage. FC YPose YOF h3 Concatenated Features FC h2 = f ([h1 , 3DCNN(XOF ), (Y1 )]) 3DCNN 3DCNN FC 3DCNN FC 3DCNN FC 3DCNN FC 3DCNN FC Pose OF RGB Pose OF RGB P (Y2 |X, Y<2 ) = softmax(Net2 (h2 )) (4) h3 = f ([h2 , 3DCNN(XRGB ), (Y1 , Y2 )]) P (Y3 |X, Y<3 ) = softmax(Net3 (h3 )) In the proposed model, at each stage, the next prediction is made conditioned on all previous predictions and the new input. Therefore, when training the network, the prediction of the output class label does not only depend on the input, but also on the previous state. Thus, the network in that stream will learn complementary features to refine the class labels from the previous streams. With this chaining and joint training, the information at the previous stages serve as the present belief for the predictions at the current stage, as shown in Figure 4-right. This sequential improvement of the class label enables the combination of multiple cues within a large network, while keeping the risk of over-fitting low. This is in contrast to the fusion approaches that combine features from different, independently trained streams. In such a case, the different streams are not enforced to learn complementary features. In the other extreme, approaches that train all streams jointly but not sequentially, are more prone to over-fitting, because the network is very large, and, in such case, lacks the regularization via the separate streams and their additional losses. It should be expected that the ordering of the sequence plays a role for the final performance. We compared different ordering options in our experiments and report them in the following section. The ordering that starts with the pose as input and ends with the RGB image yielded the best results. It is worth noting that the concept of sequential fusion could be applied to any layer of the network. Here we placed the fusion after the first fully-connected layer, but the fusion could also be applied to the earlier convolutional layers. Figure 4: Baseline fusion architecture (left) and the proposed approach (right). In the chained architecture, there is a separate loss function for each stream. The final class label is obtained at the end of the chain (rightmost prediction). to the Markov property, P (Y |X) can be decomposed: P (Y |X) = P (Y1 |X) S Y P (Ys |X, Y1 , . . . , Ys−1 ) (1) s=2 For the state s ∈ {1, . . . , S}, we denote by hs the hidden state of that stream. We use deep networks to model the likelihood in (1): hs = f ([hs−1 , 3DCNN(Xs ), (Y1 , . . . , Ys−1 )]) P (Ys |X, Y<s ) = softmax(Nets (hs )), (2) where f is a non-linearity unit (ReLU), hs−1 denotes the hidden state from the previous stream, and ys is the prediction of stream s. For the 3DCNN(·), we use the convolutional part of the network presented in Figure 5 to encapsulate the information in the input modality, and Nets is the fully connected part in Figure 5. At each fusion stage, we concatenate the output of the function 3DCNN(·) with the hidden state and the outputs from the previous stream and apply the non-linearity f before feeding them to Nets . Finally, at the output part, we use Nets to predict action labels from hs . With the softmax(·) function we convert these scores into (pseudo-)probabilities. Using the above notation, we consider input modalities as X = {Xpose , XOF , XRGB }, and Xs = {xt }Tt=1 , where xt is the t-th frame in Xs , and T is the total number of frames in Xs . At the stage s = 1, by considering X1 = Xpose we start with an initial hidden state and obtain an initial prediction (see Figure 4-right): h1 = 3DCNN(Xpose ) P (Y1 |X) = softmax(Net1 (h1 )) 4.2. Network Configuration In all streams, we use the C3D architecture [37] as the base architecture, which has 17.5M parameters. The network has 8 three-dimensional convolution layers with kernel size of 3×3×3 and stride 1, 5 three-dimensional pooling layers with kernel size of 2×2×2 and stride 2 and two fully connected layers followed by a softmax; see Figure 5. Each stream is connected with the next stream via layer FC6; see Figure 4-right. Each stream takes 16 frames as input. (3) 4 Figure 5: Base architecture used in each stream of the action recognition network. The convolutional part is a 3DCNN architecture. We define the remaining fully connected layers as N ets . 4.3. Training poral windows across a video and 10 crop scores per clip. Apart from averaging, we also tested a multi-resolution approach, which we call multi-granular (MG), where we trained separate networks for three different temporal resolutions. These are assembled as (1) 16 consecutive frames, (2) 16 frames from a temporal window of 32 frames by a sample rate of 2, and (3) 16 frames sampled randomly from the entire video. For the final score, we take the average over the scores produced by these temporal resolution networks. This approach extends the temporal context that the network can see, which can be useful for more complex actions with longer duration. In case of temporal action detection, we localize the action in time by thresholding the score provided for each frame. Clearly, the MG approach is not applicable here. In addition to the action score, also the human body part network helps in temporal localization: we do not detect an action as long as no human is detected. More details on the spatio-temporal action detection are provided in the experimental section and in the supplemental material. The network weights are learned using mini-batch stochastic gradient descent (SGD) with a momentum of 0.9 and weight decay of 5e−4 . We jointly optimize the whole network without truncating gradients and update the weights of each stream based on the full gradient including the contribution from the following stream. We initialize the learning rate with 1e−4 and decrease it by a factor of 10 every 2k for J-HMDB, 20k for UCF101 and NTU, and at multiple steps for HMDB51. The maximum number of iterations was 20k for J-HMDB, 40k for HMDB51 and 60k for the UCF101 and NTU datasets. We initialize the weights of all streams with an RGB network pre-trained on the large-scale Sports-1M dataset [14]. We split each video into clips of 16 frames with an overlap of 8 frames and feed each clip individually into the network stream with size of 16 × 112 × 112. We apply corner cropping as a form of data augmentation to the training data. Corner cropping extracts regions from the corners and the center of the image. It helps to prevent the network from bias towards the center area of the input. Finally, we resize these cropped regions to the size of 112 × 112. In each iteration, all streams take the same clip from the video with the same augmentation but with different modalities as input. We used Caffe [13] and an NVIDIA Titan X GPU to run our experiments. The training time for the J-HMDB dataset was ∼ 10 hours for the full network. 5. Experiments 5.1. Datasets UCF-101 [36] contains more than 2 million frames in more than 13, 000 videos, which are divided into 101 human action classes. The dataset is split into three folds and each split contains about 8000 videos for training. The UCF101 dataset also comes with a subset for spatiotemporal action detection. HMDB51 [15] contains 6766 videos divided into 51 action classes, each with at least 101 samples. The evaluation follows the same protocol used for UCF-101. J-HMDB contains a subset of videos from the HMDB dataset, for which it provides additional annotation, in particular optical flow and joint localization [12]. Thus, it is well-suited for evaluating the contribution of optical flow, body part segmentation, and the fusion of all cues via a 4.4. Temporal Processing of the Whole Video At test time, we feed the architecture with a temporal window of 16 frames. The stride over the video is 8. Each set of inputs is randomly selected for cropping operations, which are 4 corners and 1 center crop for the original image and their horizontal flipping counterpart. We extract scores before the softmax normalization in the last stream (Y RGB). In case of action classification, the final score of a video is calculated by taking the average of scores over all tem5 Streams 1 RGB+OF 3 w/o GT 3 with GT Variant RGB OF Pose Pose (GT) baseline chained chained+MG baseline chained chained+MG baseline chained UCF101 84.2% 79.6% 56.9% 87.1% 88.9% 89.1% 90.4% 91.3% - HMDB 53.3% 45.2% 36.0% 55.6% 61.7% 66.0% 57.5% 62.1% 71.1% - J-HMDB 60.8% 61.9% 45.5% 56.8% 62.7% 72.8% 70.2% 79.1% 72.0% 83.2% Datasets Methods TS Fusion [8] LTC [38] Two-stream [33] TSN [43] CPD [26] Multi-Granular [18] M-fusion [28] KVMF [49] P-CNN [4] Action tubes [9] TS R-CNN [29] MR-TS R-CNN [29] Ours (chained) Table 1: The value of different cues and their integration for action recognition on the UCF101, HMDB51, and JHMDB datasets (split 1). Adding optical flow and pose is always beneficial. Integration via the proposed Markov chain clearly outperforms the baseline fusion approach. In all cases, the accuracy achieved with estimated optical flow and body parts almost reaches the upper bound performance when providing ground truth values for those inputs. UCF101 HMDB51 J-HMDB 92.5% 91.7% 88.0% 94.2% 92.3% 90.8% 89.1% 93.1% 91.1% 65.4% 64.8% 59.4% 69.4% 66.2% 63.6% 54.9% 63.3% 69.7% 61.1% 62.5% 70.5% 71.1% 76.1% Table 2: Comparison to the state of the art on UCF101, HMDB51, and J-HMDB datasets (over all three splits). is lost due to erroneous optical flow and pose estimates. Surprisingly, the difference between the results is rather small, showing that the network does not suffer much from imperfect estimates. This conclusion can be drawn independently of the fusion method. Finally, the temporal multi-granularity fusion (MG) further improves results. Especially on HMDB51, there is a large benefit. Markov chain. The dataset comprises 21 human actions. The complete dataset has 928 clips and 31838 frames. There are 3 folds for training and testing for this dataset. The videos in J-HMDB are trimmed and come with bounding boxes. Thus, it can be used also as a benchmark for spatial action localization. NTU RGB+D is a recent action recognition dataset that is quite large and provides depth and pose ground truth [32]. It contains more than 56000 sequences and 4 million frames. NTU provides 60 action classes and 3D coordinates for 25 joints. Additionally, the high intra-class variations make NTU one of the most challenging datasets. 5.2.1 Comparison with the state-of-the-art Table 3 compares the proposed network to the state of the art in action classificaation. In contrast to Table 1, the comparison does not show the direct influence of single contributions anymore, since this table compares whole systems that are based on quite different components. Many of these systems also use other features extraction approaches, such as improved dense trajectories (IDT), which generally have a positive influence on the results, but also make the system more complicated and harder to control. Our network outperforms the state of the art on J-HMDB, NTU, and HMDB51. Also, on UCF101 dataset our approach is on par with the current state of the art while it does not rely on any additional hand-crafted features. In two stream case (RGB+OF), if we replace the 3DCNN network by the TSN approach [43], we obtain a classification accuracy of 94.05% on UCF101 (over 3 splits), which is the state of the art also on this dataset. However, the TSN approach does not allow for action detection anymore. Finally, we ran the network on the recent NTU RGB+D dataset, which is larger and more challenging than the previous datasets. The dataset is popular for the evaluation of methods that are based on human body pose. Clearly, the result of our network, shown in Table ??, compares favorably 5.2. Action Classification Table 1 shows that fusion with the sequential Markov chain model outperforms the baseline fusion consistently across all datasets. The baseline fusion is shown in Figure 4 and can be considered a strong baseline. It consists of fusing the multiple modalities through feature concatenation followed by a set of fully connected layers. The network is trained jointly. Adding pose leads to a substantial improvement over the two-stream version. This confirms that pose plays an important role as complementary modality for action recognition tasks. Again, the Markov chain fusion is advantageous with a large margin. For the J-HMDB dataset, ground truth for optical flow and pose is available and can be provided to the method. While not being relevant in practice, running the recognition with this ground truth shows on how much performance 6 Methods Fusion Location FC7 FC6 Cross Subject % Deep LSTM [32] P-LSTM [32] HOGˆ2 [25] FTP DS [10] ST-LSTM [21] Ours (Pose) Ours (RGB+OF+Pose - Baseline) Ours (RGB+OF+Pose - Chained) 60.7% 62.93% 32.2% 60.23% 69.2% 67.8% 76.9% 80.8% UCF101 89.8% 89.6% Dataset J-HMDB (RGB) NTU RGB+D (Pose) OPR 59.8% 86.8% ORP 57.3% 86.2% RPO 54.8% 84.3% ROP 54.1% 84.7% PRO 56.4% 85.1% POR 60.0% 87.1% Y Pose 55.7% 40.9% 47.1% Y OF 83.0% 56.4% 65.3% 5.2.4 Effect of clip length We analyzed the effect of the size of the temporal window on the action recognition performance. Larger windows clearly improve the accuracy on all datasets; see Table 7. For the J-HMDB dataset (RGB modality) we use a temporal window ranging from 4 to 16 frames every 4 frames. The highest accuracy is obtained with a 16 frames clip size. Based on the J-HMDB minimum video size, 16 is the highest possible time frame to be explored. We also tested multiple temporal resolutions for the NTU dataset (pose modality). Again, we obtained the best results for the network with the larger clip length as input. The conducted experiments confirm that increasing the length of the clip, we decrease the chance of getting unrelated parts of an action in a video. In addition, with longer sequences, 3D convolutions can better exploit their ability to capture abstract spatio-temporal features for recognizing actions. to the existing methods. As a result, the used pose estimation network is competitive with pose estimates using depth images and that our way to integrate this information with the raw images and optical flow is advantageous. Ordering of modalities in the Markov chain. Table 4 shows an analysis on how the order of the modalities affects the final classification accuracy. Clearly, the ordering has an effect. The proposed ordering starting with the pose and then adding the optical flow and the RGB images performed best, but there are alternative orders that do not perform much worse. Table 5 quantifies the improvement in accuracy when adding a modality. Clearly, each additional modality improves the results. 5.2.3 Accuracy 44.8% 49.6% 58.7% 60.8% 61.6% 67.8% the outcome of the study by Feichtenhofer et al. [8], where the last convolutional layer worked best. Y RGB 90.4% 62.1% 79.1% Table 5: Sequential improvement of classification accuracy on UCF101, HMDB51 and J-HMDB datasets (Split1) by adding modalities to the chained network. 5.2.2 Clip length 4 8 12 16 16 32 Table 7: Effect of the temporal window size. Using more frames as input to the network consistently increases classification performance. Table 4: Impact of chain order on the performance (clip accuracy) on UCF101 and HMDB51 datasets (split1). ”O” = Optical flow, ”P” = Pose and ”R” = RGB. Dataset UCF101 HMDB51 J-HMDB J-HMDB 73.9% 79.1% Table 6: Classification performance for different fusion locations on UCF101, HMDB51 and J-HMDB datasets (split1). Table 3: Comparison to literature on the NTU RGB+D benchmark. Dataset HMDB51 UCF101 HMDB51 61.3% 62.1% 5.3. Action Detection To demonstrate the generality of our approach, we show also results on action detection on UCF101 and J-HMDB. Many of the top performing methods for action classification are not applicable to action detection, because they integrate information over time in a complex manner, are too slow, or are unable to spatially localize the action. This is different for our approach, which is efficient and can be run in a sliding window manner over time and provides good spatial localization via the human body part segmentation. In order to create temporally consistent spatial detections, we link action bounding boxes over time to pro- Fusion location In principle the chained fusion can be applied to any layer in the network. We studied the effect of this choice. In contrast to the large scale evaluation in Feichtenhofer et al. [8], we tested only two locations: FC6 and FC7. Table 6 shows a clear difference only on the J-HMDB dataset. There it seems that an earlier fusion, at a level where the features are not too abstract yet, is advantageous. This is similar to 7 3DCNN Per-frame scores RGB OF Pose Chained Ground truth Prediction Basketball Basketball Temporal localization Pose Spatial localization Figure 6: Scheme for spatio-temporal action detection. The chained network provides action class scores and body part segmentations per frame. From these we compute action tubes and their actionness scores; see the supplemental material for details. Figure 7: Qualitative results on the action detection task. The first two rows correspond to detections on UCF101, the last ones on J-HMDB. Ground truth bounding boxes are shown in green and detections in red. Our spatial localization is accurate and robust to unusual pose. duce action tube [9]; see the supplemental material for details. We use the frame level action classification scores to make predictions at the tube level. Figure 6 schematically outlines the detection procedure. We also present a set of qualitative action detection experiments for the UCF and J-HMDB datasets. Figure 7 shows several examples where we can robustly localize the action, even when unusual pose, illumination, viewpoints and motion blur are presented. Additional results exploring failure cases are provided in supplementary material. Following recent works on action detection [9, 44, 29], we report video-AP. A detection is considered correct if the intersection over union (IoU) with the ground-truth is above a threshold δ and the action label is predicted correctly. The IoU between two tubes is defined as the IoU over the temporal domain, multiplied by the average of the IoU between boxes averaged over all overlapping frames. VideoAP measures the area under the precision-recall curve of the action tube predictions. Table 8 and Table 9 show the video mAP results on spatial and spatio-temporal action detection with different IoU thresholds on J-HMDB and UCF101 (split1) datasets respectively. Although we did not optimize our approach for action detection, we obtain state-of-the-art results on both datasets. Moreover, the approach is fast: spatial detection runs at a rate of 31 fps and spatio-temporal detection with 10 fps. Compared to the recent works [9, 45, 29, 47], our detection framework has two desirable properties: (1) the pose network directly provides a single detection box per person, which causes a large speed-up; (2) the classification J-HMDB IoU threshold (δ) 0.1 0.2 0.3 0.4 0.5 Actionness [42] 56.4 ActionTubes [9] 53.3 Weinzaepfel et al. [44] 63.1 63.5 62.2 60.7 Peng et al. [29] 74.3 73.1 Ours 78.81 78.20 77.12 75.05 73.47 Table 8: Spatial action detection results (Video mAP) on the J-HMDB dataset. Across all IoU thresholds, our model outperforms the state of the art. UCF101 IoU threshold (δ) 0.05 0.1 0.2 0.3 Weinzaepfel et al. [44] 54.28 51.68 46.77 37.82 Yu et al. [47] 42.80 Peng et al. [29] 54.46 50.39 42.27 32.70 Weinzaepfel et al. [45] 62.8 45.4 Ours 65.22 59.52 47.61 38.00 Table 9: Spatio-temporal action detection results (Video mAP) on UCF101 dataset (split1). Across all IoU thresholds, our model outperforms the state of the art. 8 takes advantage of three modalities and the chained fusion, which yields highly accurate per-frame scores. [9] [10] 6. Conclusion We have proposed a network architecture that integrates multiple cues sequentially via a Markov chain model. We have shown that this sequential fusion clearly outperforms other ways of fusion, because it can consider the mutual dependencies of cues during training while avoiding overfitting due to very large network models. Our approach provides state-of-the-art performance on all four challenging action classification datasets UCF101, HMDB51, J-HMDB and NTU RGB+D while not using any additional handcrafted features. Moreover, we have demonstrated the value of a reliable pose representation estimated via a fast convolutional network. Finally, we have shown that the approach generalizes also to spatial and spatio-temporal action detection, where we obtained state-of-the-art results as well. [11] [12] [13] [14] 7. Acknowledgements [15] We acknowledge funding by the ERC Starting Grant VideoLearn and the Freiburg Graduate School of Robotics. References [16] [1] M. Andriluka, L. Pishchulin, P. Gehler, and B. Schiele. 2d human pose estimation: New benchmark and state of the art analysis. Conference on Computer Vision and Pattern Recognition (CVPR), 2014. 3 [2] M. Baccouche, F. Mamalet, C. Wolf, C. Garcia, and A. Baskurt. Sequential deep learning for human action recognition. In Proceedings of the Second International Conference on Human Behavior Unterstanding, HBU’11, pages 29–39, 2011. 2 [3] V. Badrinarayanan, A. Kendall, and R. Cipolla. Segnet: A deep convolutional encoder-decoder architecture for image segmentation. arXiv preprint arXiv: 1511.00561, 2015. 2 [4] G. Chéron, I. Laptev, and C. Schmid. P-CNN: Pose-based CNN Features for Action Recognition. In ICCV, 2015. 2, 6 [5] N. Dalal and B. Triggs. Histograms of oriented gradients for human detection. In Proceedings of the 2005 IEEE Computer Society Conference on Computer Vision and Pattern Recognition (CVPR’05) - Volume 1 - Volume 01, CVPR ’05, pages 886–893, Washington, DC, USA, 2005. IEEE Computer Society. 2 [6] A. Diba, A. M. Pazandeh, and L. V. Gool. Efficient twostream motion and appearance 3d cnns for video classification. CoRR, abs/1608.08851, 2016. 2 [7] A. Dosovitskiy, P. Fischer, E. Ilg, P. Hausser, C. Hazrba, V. Golkov, P. v.d. Smagt, D. Cremers, and T. Brox. Flownet: Learning optical flow with convolutional networks. In IEEE International Conference on Computer Vision (ICCV), Dec 2015. 3 [8] C. Feichtenhofer, A. Pinz, and A. Zisserman. Convolutional two-stream network fusion for video action recognition. In [17] [18] [19] [20] [21] [22] [23] [24] 9 IEEE Conference on Computer Vision and Pattern Recognition, 2016. 2, 6, 7 G. Gkioxari and J. Malik. Finding action tubes. 2015. 6, 8 J. F. Hu, W. shi Zheng, J. Lai, and J. Zhang. Jointly learning heterogeneous features for rgb-d activity recognition. In Computer Vision and Pattern Recognition (CVPR) (In press), 2015. 7 M. Jain, J. C. van Gemert, and C. G. M. Snoek. What do 15,000 object categories tell us about classifying and localizing actions? In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 46–55, June 2015. 2 H. Jhuang, J. Gall, S. Zuffi, C. Schmid, and M. J. Black. Towards understanding action recognition. In International Conf. on Computer Vision (ICCV), pages 3192–3199, 2013. 1, 3, 6 Y. Jia, E. Shelhamer, J. Donahue, S. Karayev, J. Long, R. Girshick, S. Guadarrama, and T. Darrell. Caffe: Convolutional architecture for fast feature embedding. arXiv preprint arXiv:1408.5093, 2014. 5 A. Karpathy, G. Toderici, S. Shetty, T. Leung, R. Sukthankar, and L. Fei-Fei. Large-scale video classification with convolutional neural networks. In CVPR, 2014. 5 H. Kuehne, H. Jhuang, E. Garrote, T. Poggio, and T. Serre. HMDB: a large video database for human motion recognition. In Proceedings of the International Conference on Computer Vision (ICCV), 2011. 5 I. Laptev. On space-time interest points. Int. J. Comput. Vision, 64(2-3):107–123, Sept. 2005. 2 Y. Lecun, L. Bottou, Y. Bengio, and P. Haffner. Gradientbased learning applied to document recognition. In Proceedings of the IEEE, pages 2278–2324, 1998. 2 Q. Li, Z. Qiu, T. Yao, T. Mei, Y. Rui, and J. Luo. Action recognition by learning deep multi-granular spatio-temporal video representation. In Proceedings of the 2016 ACM on International Conference on Multimedia Retrieval, ICMR ’16, pages 159–166, New York, NY, USA, 2016. ACM. 2, 6 I. Lillo, J. C. Niebles, and A. Soto. A hierarchical pose-based approach to complex action understanding using dictionaries of actionlets and motion poselets. CoRR, abs/1606.04992, 2016. 2 F. Liu, C. Shen, G. Lin, and I. D. Reid. Learning depth from single monocular images using deep convolutional neural fields. IEEE Trans. Pattern Anal. Mach. Intell., 38(10):2024– 2039, 2016. 2 J. Liu, A. Shahroudy, D. Xu, e. B. Wang, Gang”, J. Matas, N. Sebe, and M. Welling. Spatio-Temporal LSTM with Trust Gates for 3D Human Action Recognition, pages 816–833. Springer International Publishing, 2016. 7 W. Liu, A. Rabinovich, and A. C. Berg. Parsenet: Looking wider to see better. arXiv preprint arXiv: 1506.04579, 2015. 2 J. Long, E. Shelhamer, and T. Darrell. Fully convolutional networks for semantic segmentation. CVPR, Nov. 2015. 2 B. Mahasseni and S. Todorovic. Regularizing long short term memory with 3d human-skeleton sequences for action recognition. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 2 [25] E. Ohn-Bar and M. M. Trivedi. Joint angles similarities and hog2 for action recognition. In Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition Workshops, CVPRW ’13, pages 465–470, Washington, DC, USA, 2013. IEEE Computer Society. 7 [26] K. Ohnishi, M. Hidaka, and T. Harada. Improved dense trajectory with cross streams. In Proceedings of the 2016 ACM on Multimedia Conference, MM ’16, pages 257–261, New York, NY, USA, 2016. ACM. 6 [27] G. L. Oliveira, W. Burgard, and T. Brox. Efficient deep models for monocular road segmentation. In IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2016. 2, 3 [28] E. Park, X. Han, T. L. Berg, and A. C. Berg. Combining multiple sources of knowledge in deep cnns for action recognition. In WACV, pages 1–8. IEEE Computer Society, 2016. 2, 6 [29] X. Peng and C. Schmid. Multi-region two-stream R-CNN for action detection. In ECCV 2016 - European Conference on Computer Vision, Amsterdam, Netherlands, Oct. 2016. 2, 6, 8 [30] O. Ronneberger, P.Fischer, and T. Brox. U-net: Convolutional networks for biomedical image segmentation. In Medical Image Computing and Computer-Assisted Intervention (MICCAI), volume 9351 of LNCS, pages 234–241. Springer, 2015. 2 [31] J. Sanchez, F. Perronnin, T. E. J. Mensink, and J. Verbeek. Image classification with the fisher vector: Theory and practice. International Journal of Computer Vision, 2013. 2 [32] A. Shahroudy, J. Liu, T.-T. Ng, and G. Wang. Ntu rgb+d: A large scale dataset for 3d human activity analysis. In The IEEE Conference on Computer Vision and Pattern Recognition (CVPR), June 2016. 6, 7 [33] K. Simonyan and A. Zisserman. Two-stream convolutional networks for action recognition in videos. In Advances in Neural Information Processing Systems, 2014. 1, 2, 3, 6 [34] K. Simonyan and A. Zisserman. Very deep convolutional networks for large-scale image recognition. ICLR, 2015. 3 [35] J. Sivic and A. Zisserman. Video google: A text retrieval approach to object matching in videos. In Proceedings of the Ninth IEEE International Conference on Computer Vision Volume 2, ICCV ’03, pages 1470–, Washington, DC, USA, 2003. IEEE Computer Society. 2 [36] k. Soomro, A. Roshan Zamir, and M. Shah. UCF101: A dataset of 101 human actions classes from videos in the wild. In CRCV-TR-12-01, 2012. 5 [37] D. Tran, L. Bourdev, R. Fergus, L. Torresani, and M. Paluri. Learning spatiotemporal features with 3d convolutional networks. In Proceedings of the 2015 IEEE International Conference on Computer Vision (ICCV), pages 4489–4497, 2015. 1, 2, 4 [38] G. Varol, I. Laptev, and C. Schmid. Long-term temporal convolutions for action recognition. CoRR, abs/1604.04494, 2016. 1, 6 [39] C. Wang, Y. Wang, and A. L. Yuille. An approach to posebased action recognition. In Proceedings of the 2013 IEEE Conference on Computer Vision and Pattern Recognition, [40] [41] [42] [43] [44] [45] [46] [47] [48] [49] 10 CVPR ’13, pages 915–922, Washington, DC, USA, 2013. IEEE Computer Society. 2 H. Wang and C. Schmid. Action recognition with improved trajectories. In Proceedings of the 2013 IEEE International Conference on Computer Vision, ICCV ’13, pages 3551– 3558, Washington, DC, USA, 2013. IEEE Computer Society. 2 L. Wang, Y. Qiao, and X. Tang. Action recognition with trajectory-pooled deep-convolutional descriptors. In CVPR, pages 4305–4314, 2015. 2 L. Wang, Y. Qiao, X. Tang, and L. Van Gool. Actionness estimation using hybrid fully convolutional networks. In Proceedings of the IEEE Conference on Computer Vision and Pattern Recognition, pages 2708–2717, 2016. 2, 8 L. Wang, Y. Xiong, Z. Wang, Y. Qiao, D. Lin, X. Tang, and L. Val Gool. Temporal segment networks: Towards good practices for deep action recognition. In ECCV, 2016. 2, 6 P. Weinzaepfel, Z. Harchaoui, and C. Schmid. Learning to track for spatio-temporal action localization. In ICCV 2015 - IEEE International Conference on Computer Vision, pages 3164–3172, Santiago, Chile, Dec. 2015. IEEE. 8 P. Weinzaepfel, X. Martin, and C. Schmid. Towards weaklysupervised action localization. CoRR, abs/1605.05197, 2016. 8 Z. Wu, Y. Jiang, X. Wang, H. Ye, X. Xue, and J. Wang. Fusing multi-stream deep networks for video classification. CoRR, abs/1509.06086, 2015. 2 G. Yu and J. Yuan. Fast action proposals for human action detection and search. In 2015 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1302–1311, June 2015. 8 C. Zach, T. Pock, and H. Bischof. A duality based approach for realtime tv-l1 optical flow. In Proceedings of the 29th DAGM Conference on Pattern Recognition, pages 214–223, Berlin, Heidelberg, 2007. Springer-Verlag. 2 W. Zhu, J. Hu, G. Sun, X. Cao, and Y. Qiao. A key volume mining deep framework for action recognition. In 2016 IEEE Conference on Computer Vision and Pattern Recognition (CVPR), pages 1991–1999, June 2016. 6
9cs.NE
Approximated Computation of Belief Functions for Robust Design Optimization Massimiliano Vasile1 and Edmondo MInisci2 University of Strathclyde, G1 1XJ , Glasgow, UK Quirien Wijnands3 ESA/ESTEC, 2200 AG, Noordwijk, The Netherlands This paper presents some ideas to reduce the computational cost of evidence-based robust design optimization. Evidence Theory crystallizes both the aleatory and epistemic uncertainties in the design parameters, providing two quantitative measures, Belief and Plausibility, of the credibility of the computed value of the design budgets. The paper proposes some techniques to compute an approximation of Belief and Plausibility at a cost that is a fraction of the one required for an accurate calculation of the two values. Some simple test cases will show how the proposed techniques scale with the dimension of the problem. Finally a simple example of spacecraft system design is presented. Nomenclature SA ta taq Pl A A AL AML ANTemp aPCU B Bel = = = = = = = = = = = = = = = = = = = = = solar array solar aspect angle, rad access time, s acquisition time, s solar array specific mass, kg/m2 amplifier case mass fraction antenna specific mass, kg/m2 solar cell efficiency battery efficiency PCU efficiency generic threshold focal element Faraday rotation, rad cumulative Plausibility function generic proposition archive atmospheric losses, dB antenna misalignment loss, dB antenna noise temperature, K PCU mass coefficient, kg/W onboard data volume, bits cumulative Belief function Bl,i Cmin c Dant D DOD d = = = = = = = generic box in U battery capacity, Wh speed of light, m/s antenna diameter, m design space Depth Of Discharge design parameter vector SA CMR A cell b PCU   f 1 Reader, Mechanical & Aerospace Department, 75 Montrose Street. Lecturer, Mechanical & Aerospace Department, 75 Montrose Street. 3 Senior staff, European Space Research & Technology Centre Postbus 2992200 AG. 1 American Institute of Aeronautics and Astronautics 2 Ed e FL FSL f,g,h fT GAMP Gr HG Id IL Ld P0 Pd PL PLd Pe PSA Rt RA RaL rGS SLAT T TAMP Tdata U u Xe Xd = = = = = = = = = = = = = = = = = = = = = = = = = = = = = = battery energy density, Wh/kg elevation error, rad feeder loss, dB free space loss, dB generic functions carrier frequency, MHz amplifier gain, dB ground station gain, dB ground station altitude, m inherent degradation implementation loss, dB time degradation generated power per unit area, W/m2 power in daylight, W polarization mismatch loss, dB required transmission power, W power in eclipse, W total required power, W data rate, dB rain absorption rain absorption loss, dB distance from the ground station, km horn lateral surface, m2 amplifier type amplifier noise, K transmitted data, bits uncertain space uncertain parameter vector power system efficiency in eclipse power system efficiency in daylight I. Introduction I N recent times, Evidence Theory has been proposed in place of Probability Theory for robust design of engineering systems. Authors like Oberkampf et al.1 demonstrated the potentiality of Evidence Theory to model both epistemic and aleatory uncertainties in the design of engineering systems. Similar examples can be found in the work of Agarwal et al.2 or in the work of Bae et al.3, Fetz et al.4 He et al.5 and Mourela et al. 6, mainly with applications to structural design. Denoeux proposed a technique to compute an inner and outer approximation of Belief and Plausibility functions7. Helton et al.8,9,10 proposed a number of techniques to reduce the dimensionality of problems treated with Evidence-based models. More recently Vasile11 and Croissard et al.12 provided some examples of application of Evidence Theory to the robust optimal design of space systems and space trajectories. The uncertainties in the design parameters of the main spacecraft subsystems were modeled using Evidence Theory. The design process was then formulated as an Optimization Under Uncertainties (OUU) and the Belief function was optimized (maximized) together with all the other criteria that define the optimality of the system. With Evidence Theory, also know as Dempster-Shafer’s theory13, both aleatory and epistemic uncertainties, coming from a poor or incomplete knowledge of the design parameters, can be correctly modeled. The values of uncertain or vague design parameters can be expressed by means of intervals with associated basic belief assignment or bpa. Each expert participating in the design, assigns an interval and a bpa according to their experience. Ultimately, all the pieces of information associated to each interval are fused together to yield two cumulative values, Belief and Plausibility, that express the confidence range in the optimal design point. In particular, the value of Belief expresses the lower limit on the probability that the selected design point remains optimal (and feasible) even under uncertainties. The benefits coming from the use of Evidence Theory are considerable but the computation of Belief and Plausibility requires running a number of optimizations that grows exponentially with the number of dimensions and becomes intractable even for problems of moderate size. 2 American Institute of Aeronautics and Astronautics This paper presents some ideas on how to reduce the computational cost to obtain an approximation of Belief and Plausibility cumulative functions in space system engineering. Some of the techniques presented in this paper are not problem dependent others exploit the partial decomposability of space system engineering design problems. The paper starts with a brief introduction to Evidence Theory and its use in the context of robust design optimization. It then presents some techniques to compute an optimal design solution under uncertainty when Evidence Theory is used for uncertainty quantification. A few ideas are then proposed to reduce the computational cost and their effectiveness is experimentally proven on some scalable analytic functions. The preliminary robust design of an integrated power and telecommunication system of a satellite is then used to illustrate the application of Evidence-based Robust Design Optimization to the design and margin quantification of space systems. A final section introduces a problem decomposition technique that looks promising to solve large scale space system engineering problems in polynomial time. II EVIDENCE-BASED ROBUST DESIGN OPTIMISATION Evidence Theory, developed by Shafer13, belongs to the class of imprecise probability theories conceived to adequately treat both epistemic and aleatory uncertainty when no information of probability distributions is available. The theory does not require additional assumptions when the available information is poor or incomplete and provides a nice framework to incorporate multiple pieces of evidence in support to a statement. In most current engineering design applications of Evidence Theory, domain experts are expected to express their belief on the value of an uncertain parameter u being within a certain set of intervals. Each interval can be considered as an elementary proposition, and all the intervals form the so-called frame of discernment , which is a set of mutually exclusive elementary propositions. The frame of discernment can be viewed as the counterpart of the finite sample space in probability theory. The power set of  is U=2 or the set of all the subsets of  (the uncertain space in the following) The level of confidence an expert has in an element of U is quantified using the Basic Probability Assignment (bpa) m() that satisfies the axioms: m( )  0,   U  2 ; m( )  0,   U  2 ; m()  0; (1)  m( )  1  U Note that the bpa is actually a belief in the values of  rather than an actual probability. An element of U that has a non-zero bpa is named a focal element . When more than one parameter is uncertain, the focal elements are the result of the Cartesian product of all the intervals associated to each uncertain parameter. The bpa of a given focal element is then the product of the bpa of each interval. All the pieces of evidence completely in support of a given proposition form the cumulative belief function Bel while all the pieces of evidence partially in support of a given proposition from the cumulative plausibility function Pl. In mathematical terms the two functions are defined as follows: Bel ( A)   m( ) i  A Pl ( A)   i  A0 i (2) m(i ) where A is the proposition about which the Belief and Plausibility need to be evaluated. For example, the proposition can be expressed as: A  u U | f (u)    (3) where f is the system process and the threshold  is the value of a design budget (e.g. the mass). Thus, focal elements intercepting the set A but not included in A are considered in Pl but not in Bel. It is important to note that the set A can be disconnected or present holes, likewise the focal elements can be disconnected or partially overlapping. A. Robust Design Formulation 3 American Institute of Aeronautics and Astronautics The interest is in a general function f : D U  mn  characterizing an engineering system to be optimized, where D is here called the available design space and U the uncertain space. The function f represents the model of the system budgets (e.g. power budget, mass budget, etc.), and depends on some uncertain parameters u and design parameters d such that: u U  n ; dD  m (4) A bpa is associated to the frame of discernment U of the uncertain parameters u. From the definition of Bel and Pl and from Eq. (3) it is clear that the maximum and minimum of f over every focal element of U should be computed and compared to . The threshold  is the desired or expected value of the system budget. If the maximum and minimum do not occur at one of the vertices of the focal element an optimization problem has to be solved for every focal element and for each new design vector. Because the number of focal elements increases exponentially with the number of uncertain parameters and associated intervals so does the number of optimization problems. Furthermore, what designers are usually interested in are: a design solution d that optimizes performance (i.e. the design budgets) and minimizes the impact of uncertainty, a quantification of the design margins on the system budgets and a quantification of the reliability of the design solution. This information can be obtained for the worst case scenario but that might lead to over conservative decisions. Therefore it is desirable to have also the variation of the design margins and reliability with the threshold , i.e. with the expected value of the design budgets Indeed, it may be relevant to take a little more risk (a slightly lower value of the belief) if the performance gain is significant. Therefore, in practice, it would be desirable to have the trade-off curve, solution of the bi-objective optimization problem: max Bel  f (d, u, )    dD uU (5) min In previous works7,7, the bi-objective problem (5) was approached directly with a multi-objective evolutionary optimizer working on the d and . The whole curve could be reconstructed with a population of agents converging to the optimal pairs of values [Bel ]. However, the computational cost was driven by the identification of A and the number of focal elements included in it. The assumption was that the maxima and minima of f were occurring only at the corners of the focal element. The evaluation of the corners is in itself an operation that grows exponentially with the number of dimensions and is, anyway, not applicable to a general case. In this paper we propose a different way of approaching the problem. First of all, the computation of the Belief function is performed by exploiting the following relationship: (6) Bel ( A)  1  Pl (A) According to (2), the calculation of Pl (A) is computationally cheaper than the calculation of Bel(A). In fact, any subset of U that contains at least one value (even a single sample) above the threshold  contributes to Pl (A) . The computation of Bel(A) instead requires that all the elements of A are below the threshold. III COMPUTATIONAL APPROACH Problem (5) would require the solution of a number of optimization problems that is exponentially increasing with the number of focal elements. However, if one is interested only in the maximization of the Belief and in the f, the exponential complexity can be avoided by solving the following two distinct problems over the Cartesian product of the unit hypercube U and D:  max  min max f  d, u  (7)  min  min min f (d, u) (8) D D U U where U is the normalized collection of all the focal elements in U. In other words, all the focal elements in U are normalized with respect to the maximum range of the uncertain parameters and collected into a compact unit hypercube in which all the focal elements are adjacent and not overlapping. A point in the unit hypercube mapped into the normal space U through the simple affine transformation: xU ,i b  b u U ,i  bUl ,i  u U ,i b l U ,i  xU ,i  b l U ,i b  b u U ,i  bUl ,i  u U ,i b l U ,i  bUl ,i 4 American Institute of Aeronautics and Astronautics U is then (9) u l u where bU ,i and bU ,i are the upper and lower boundaries of the i-th hypercube to which xU ,i belongs and bU ,i and bUl ,i are the upper and lower boundaries of the i-th hypercube to which xU ,i belongs. The transformation is relatively fast as it requires to scan only over the number of intervals per coordinate and not over the focal elements. The computational complexity of the affine transformation is, therefore, linear with the number of dimensions. The advantage is that each point within U belongs to at least one focal element, therefore by sampling U one is guaranteed to sample only the focal elements and not other parts of U. Problem (7) looks for the minimum possible threshold value max such that the entire unit hypercube is admissible, hence the Belief is 1. The solution of problem (7) does not require the exploration or even the generation of the focal elements and sets an upper limit on the value of the cost function. Problem (8) looks for the minimum threshold value min above which the Plausibility is different from 0. As for problem (7), problem (8) does not require the knowledge of the focal elements and sets a lower limit on the value of the cost function. Below that limit the design is not feasible, given the current model and evidence on the design parameters. The min/max problem is solved with a nested evolutionary process: an outer loop minimizes f over D and the inner loop maximizes f over U . For each di vector an evolutionary process over U is run and the u vector with maximum f is associated to di. The outer loop then proceeds till a maximum number of function evaluations is reached. For the inner loop a Matlab implementation of Inflationary Differential Evolution (IDEA) is used in this paper15. For the outer loop a modified version of IDEA, called IDEA, is used. The modification is mainly in the way the objective function is computed. Due to the stochastic nature of the inner loop and the possible presence of multiple maxima the outcome of each inner loop might not be the global maximum or not even near to it. In order to increase the chances to produce optimal results, the local maximum ui ,max , with objective value f max  di , ui ,max  , computed for d i is compared against the local maximum u j ,max , associated to design vector d j . If f max  di , ui ,max   f max  di , u j ,max  then u j ,max and its related maximum are associated to d i . The underlying assumption here is that the cost function is Lipschitz continuous. Furthermore, if the location of the maxima in U does not change with d a full optimization for each d is not required. If instead the location of the maxima is changing with d, then for every di either a local search or a complete optimization is started. In both cases, running a full optimization or a simple local search depends on the vector difference between di at step k and at step k+1 of the evolution. The probability of running a full optimization is P pd dik 1  dik . The assumption here is that for small variations of d there are small variations of the location of the local maxima. This assumption is generally verified in the real-life applications the authors have encountered so far. A further level of verification of the global maximum is introduced npop inner loop calls with probability pd by running a full optimization over U with two times the number of functions evaluations. IDEA implements a memetic type of evolutionary process in which a local search is started when the population collapses to a small region of the search space. The population is then restarted after the local search is completed and all the local minima are collected in an archive (for more details on the general algorithm implemented in IDEA the interested reader can refer to Ref. 15). In the inner loop, the local search is performed with a Quasi-Newton method and with a convergent Nelder-Mead approach in the outer loop. When the Nelder-Mead algorithm calls the inner loop no global search is run. At every restart of the population the archive is examined and the local minima are compared. As for the population, even for the archive the local maximum ui ,max , with objective value f min/max  di ,min , ui ,max  , computed for di ,min is compared against the local maximum u j ,max , associated to local minimum design vector d j ,min . If f min/max  di ,min , ui ,max   f min/max  di ,min , u j ,max  then u j ,max and its related maximum are associated to di ,min . When a given number of function evaluations for the inner and the outer loop is exceeded, the search terminates. The best individual of the final population is added to the archive, the archive is ranked and the best values is validated running a final global optimization over U Because, the maximization and the minimization are based on stochastic processes a global convergence is not guaranteed unless the optimizer is globally convergent. Nonetheless, by using an evolutionary process the computational complexity remains polynomial. The consequence of an incorrect estimation of the global maximum and global minimum is an overestimation of the point with minimum Plausibility and an underestimation of the point with maximum Belief. However, on could argue that if a maximum is difficult to be found it correspond to a very unlikely event that legitimately provide little support to the evidence of a given proposition. Evolutionary process and uncertainty 5 American Institute of Aeronautics and Astronautics quantification are therefore closely entangled as the probability of sampling a particular uncertain value is directly related to the probability of the realization of the event that corresponds to that uncertain value. B. Evolutionary Binary Tree (EBT) Given a design vector d, the value of Bel and Pl, for any  value within [min max], can be computed by building a binary tree in which a branch is pruned if the max of f associated to a leave is below (above) a given threshold  . The binary tree is built as follows. The transformed uncertain space is partitioned by cutting every box Bl ,i (with B0,0  U ) in two halves along the longest edge. The cutting point is the boundary of the uncertain interval that is the closest to the middle point of the edge. The tree is structured in levels with index l and at each level the tree has a number of leaves each one identified by the index i. Now let Bll,i and Blr,i be respectively the left and right halves deriving from the partition of the i-th box (or leave) Bl ,i at level l. If one box contains a maximum below the threshold or a minimum above the threshold the box is removed from the tree, otherwise it is added to the list of the boxes (leaves) that need to be partitioned at the following iteration (see Figure 1). If no maximum or minimum is yet computed either for Bll,i or Blr,i then the box is added to the list of those that need to be explored. The boxes that need to be explored and partitioned are said to be undecidable as a decision cannot be made on whether they contribute to the Belief or not. The exploration of an undecidable box is performed by running a global maximization and a global minimization of f(d,u) for a fixed d and for u  Bll,i ( u  Blr,i respectively). In this implementation, IDEA is used for both the global maximization and minimization. B00 B 0r B0l B11 B21 B12 B22 B23 B24 Figure 1. EBRO Binary Tree Figure 1 shows a simple binary tree in which the right box deriving from splitting the initial uncertain space contains a maximum below the threshold or a minimum above the threshold. The whole branch of the tree is then discarded. The left box instead is undecidable and the branch that descends from that box needs to be explored. The branching and exploration proceed until a decision can be made for all the boxes. The exploration of a branch generates smaller and smaller boxes that eventually coincide with the focal elements. The exploration and branching process generates a number of focal elements clustered in macro boxes and a number of boxes that correspond to individual focal elements. All the discarded boxes with minimum above the threshold and all the boxes with maximum above the threshold are used to compute Pl (A) . All the boxes with a minimum below the threshold are used to compute Pl ( A) . The interesting aspect of this procedure is that Pl (A) and Pl ( A) can be computed even if all the maxima and minima are not identified exactly. In fact for a box to be included in the calculation of Pl (A) it is enough that a single value within the box, even not the actual maximum, is above the threshold. Likewise the calculation of Pl ( A) requires that even s single value, not necessary the actual minimum, is below the threshold. Note that the collection of all the boxes generated for a given threshold  can be used to compute the Belief (Plausibility) values in the interval [  max ]. In fact, the min and max values computed for each box represent additional  values within [  max ]. However, while the value of Bel and Pl can be exactly computed for  with the selected set of boxes, any other value within [  max ] might result to be an underestimation of Bel and overestimation of Pl because of a lack of resolution (i.e. each box includes an excessive number of focal elements). 6 American Institute of Aeronautics and Astronautics Therefore, if the whole curve is required, a refinement process is run by iteratively applying the evolutionary binary tree to the boxes that contain a given  [  max ] . This refinement process provides an exact value for each  but can lead to a number of optimizations that is equal to two times the number of focal elements, if the entire curve is  max  min  , the boxes generated required. It is, however, interesting to note that if one takes an arbitrary     min  2   by the EBT can provide an approximation to the Bel and Pl curves that tend to be good in a neighborhood of  and close to max. This observation allows for the generation of a good estimation of the two curves at a fraction of the computational cost. Further to this approximation, two specific mechanisms have been devised to reduce the computational complexity and compute approximated Bel and Pl curves: the integrated focal element filtering and the approximated min and max evaluation. 1. Integrated Focal Element filtering The bpa associated to each focal element decreases in magnitude as the number of dimensions increases. This observation suggests that an approximation to the value of Bel and Pl can be computed by using only a selected subset of focal elements. The reduction in Bel or increase in Pl due to this approximation can be quantified by looking at the cumulative value of the discarded focal elements. Therefore, during the generation of the binary tree boxes with a bpa below a given filter threshold are discarded until the cumulative bpa associated to those boxes is below the required filter accuracy 2. Approximated Min and Max Evaluation Because the calculation of Pl (A) and Pl ( A) does not always require the exam maximum and minimum, one can consider using an approximation of the min and max values for each subdomain Bl,i to make a decision. The evolutionary search for a maximum and a minimum proceed through an optimal sampling of the uncertain space. A selected subset of all the samples taken during the global exploration can be saved into an archive Au , when maximizing, and into an archive into Al when minimizing, Then when two new subdomains Bll,i and Blr,i are generated by bisection of Bl,i, one can take the maximum element xlsup in Au  Bll,i (respectively Au  Blr,i )and the minimum element xlinf in Al  Bll,i (respectively Al  Blr,i ) instead of running a full optimization for every new box. B00 B0r B0l B11 B21 B12 B22 B23 B24 Figure 2. Binary Tree with Approximated Min-Max Evaluation. Figure 2 shows a modified version of the binary tree in which decisions are made using the values in the archive instead of the actual maxima and minima. This technique produces a substantial reduction in the number of optimizations loops required to build the Belief and Plausibility curves but can introduce a significant error r r depending on the archiving procedure. In order to preserve accuracy the values xlinf , xlsup , xinf and xsup are trusted to be representative of the minimum and maximum values contained in the box with a probability ptrust inversely proportional to the bpa associated to the box, i.e. the higher the bpa the lower the trust in the values xlinf and xlsup r r (respectively xinf and xsup ). In this way boxes with high bpa are properly explored with high probability. In 7 American Institute of Aeronautics and Astronautics r particular, xlsup and xsup are trusted if ptrust>(c+bpa), where c is a trust factor. The use of a this trust factor ensure good accuracy for a single value of . During the refinement process, however, the EBT makes use of existing boxes but with different thresholds. Boxes that are correctly decided, on the basis of suboptimal archive values, for one threshold might not be correctly decided for a different threshold. When a new threshold is considered, the boxes generated for previous thresholds for which maximum and minimum was not exactly identified, are ranked from the one with highest bpa value to the one with the lowest. A maximization is then progressively run on each of them, starting from the one with highest bpa, until the cumulative bpa of the remaining ones is above c. IV TEST CASES The effectiveness of the techniques to reduce the computational cost has been put to the test on a set of simple but representative, scalable problems (see Table 1). All the problems present a number of maxima and minima that grows with the number of dimensions. Problem MV1 for example has a number of maxima in U that grows as 2n. Problem MV2 has maxima that change location with d while MV8 is multimodal and has the maxima that change with d. Table 2 represents the bpa structure for all the problems, with the intervals for each uncertain parameter and the associated bpa. Tests are run considering two possible different bpa structures: with a uniform distribution of bpa (labeled as EQ) and one with a non-uniform distribution. The tests in this paper are limited to three disconnected uncertain intervals per parameter but the results can be generalized to a higher number of intervals and also to overlapping intervals. Table 1. Standard Benchmark. ID MV1 Function Parameters d  [1,5]n ; n f   di ui2 u  [5,3]n i 1 MV2 n f    ui  di  d  [1,5]n ; 2 u  [5,3]n i 1 MV8 n f    2  ui  cos  ui  di  i 1 d  [0,3]n ; u  [0, 2 ]n Table 2. BBA structure for the standard benchmark MV1, MV2 MV8 MV1EQ,MV2EQ MV8EQ Interval bpa Interval bpa Interval bpa Interval bpa [-5 -4] 0.1 [0 1] 0.1 [-5 -4] 0.33 [0 1] 0.33 [-3 0] 0.25 [2 4] 0.25 [-3 0] 0.33 [2 4] 0.33 [1 3] 0.65 [5 2] 0.65 [1 3] 0.34 [5 2] 0.34 Figure 3 presents the number of optimizations required to approximate the Bel and Pl curves for problem MV1 as a function of the number of dimensions, while Figure 4 presents the same result but for function MV2. Figure 5 presents the number of optimizations for problem MV8. Different trust factors and for a combination of the integrated focal element filtering, with a filter accuracy of 0.1, and the approximated min and max evaluation. The use of the approximated min and max evaluation, even with a trust factor of 0.99, leads to a reduction of the number of optimizations down to 25-30% of the number of optimizations required to explore all the focal elements. Reducing the trust factor to 0.90 leads to a further reduction and the combination with the integrated focal element filtering improves the reduction by 5-10%. The reduction is more limited in the case of a uniform distribution of bpa’s. Figure 6 shows the Pl and Bel for problem MV1 with n=6. This problem has a Bel curve with a steep drop at a thresh value of about 50. The figure shows the approximated curves using the approximated min and max evaluation and the combination approximated min and max evaluation+ integrated focal element filtering. The approximated curves well represent the true cumulative Belief curve and correctly identify the steep drop with an error of maximum 0.1 in the Belief values. Plausibility is underestimated but the approximation technique was geared towards an accurate estimation of the Belief. Therefore, an underestimation of the Plausibility was expected. The reduction in computational cost however, is substantial reaching over 80% (see Bel90 with filter 0.1, that corresponds to trust factor of 0.90 and a filter accuracy of 0.1). Figure 7 shows the equivalent result for problem 8 American Institute of Aeronautics and Astronautics MV8. In this case the error in Belief for a trust factor of 0.90 is larger than 0.1 but for a very small difference in . The overall error in the decision of the reliability the estimation of a design margin would be contained but with a massive reduction in computational cost, up to 85%. It is also interesting to note that for all test cases the solution of the min/max problem returned the global maximum and an optimal d. IDEA was set with a population of 10 individuals for the inner loop and 500n/2 number of function evaluations. The population was restarted when the maximum distance among individuals was reaching 10% of the maximum distance experienced during the whole search. IDEA was set with a population of 10 individuals and 5000n/2 function evaluations. The population was restarted when the maximum distance among individuals was reaching 10% of the maximum distance experienced during the whole search, and the probability of running the global search in the inner loop was pd=0.5. Figure 3. MV1: complexity reduction a) b) Figure 4 MV2: complexity reduction a) non uniform bpa structure b) uniform bpa structure a) b) Figure 5 MV8: complexity reduction a) non uniform bpa structure b) uniform bpa structure 9 American Institute of Aeronautics and Astronautics Figure 6 MV1: Bel and Pl curves at different approximation levels Figure 7 MV8: Bel and Pl curves at different approximation levels C. POWER-TELECOM INTEGRATED DESIGN PROBLEM The techniques proposed in this paper were applied to the solution of a realistic case in which an integrated space system made of a power generation unit and telecom subsystem need to be designed under uncertainty. This section describes the power and telecom models used in this paper. The tests in this section aim to show how to use Evidence-Based Robust Optimization can provide a more precise quantification of the design margins, compared to a more traditional approach using rule of the thumb margins. The models in this section are derived from Ref. 16,17,18 and 19. 3. Power System Model The power system (POW) model consists of a solar arrays and a battery. Starting from the required power in daylight and eclipse, the total required power is computed as:  PT   Pd Td  e e  X + X  (10) Psa =  e   d  Td where Pe is the power consumption during eclipse, Te is the orbital eclipse time, Xe is the energy transfer efficiency during eclipse, Pd is the power consumption during daylight, Td is the orbital daylight time, Xd is the energy transfer efficiency during daylight. The generated power at Beginning of Life (BOL)is: Po = cellGS (11) PBOL = Po I d cos SA (12) where Po is the ideal power output per unit area of the solar arrays, cell the solar cell efficiency, GS is the solar flux, Id is the inherent degradation and SA is the worst case angle of incidence of the Sun light. In order for the model to 10 American Institute of Aeronautics and Astronautics calculate the End of Life (EOL) power output per unit area, a solar array degradation over satellite lifetime factor Ld is calculated as follows: Ld = 1   cell  Life (13) where cell is the array degradation per year, Life is the expected satellite lifetime. Once the satellite lifetime factor Ld is computed, the power output during EOL, PEOL, can be calculated, based on the power output per unit area PBOL, as follows: (14) PEOL = PBOL Ld Then the required solar array area Asa can be easily calculated as: P (15) Asa = sa PEOL The solar array mass Msa is then derived from the solar array area Asa as follows: (16) M sa = Asa  sa where SA is the specific mass of the panel. The cell efficiency cell defines the type of solar cell that will be used including its intrinsic characteristics. For every value of cell a database of cells, see Table 3, is used to obtain the rest of the cell characteristics. Table 3. Solar cell intrinsic characteristics. CdTe p c-Si u c-Si 3j GaAs Conc. Multijunc. cells 3j GaAs ηcell 0.165 0.203 0.25 0.30 0.38 0.41 cell 0.05 0.05 0.05 1 0.037 0.037 The PCU power output Ppcu is calculated as follows: Ppcu = Psa / η pcu (17) where ηpcu is the PCU efficiency. Finally the PCU mass Mpcu is calculated as a fraction of the PCU power output: (18) M pcu = a pcu Ppcu where apcu is a PCU mass coefficient. The battery mass Mbat_pack, is computed starting from the energy density Ed, which defines the particular battery chemistry to be used (see Table 4). The efficiency depends on the type of battery and therefore on Ed. The efficiency ηbatt is computed by linearly interpolating the data in Table 4. Furthermore, using a simple linear relationship in logarithmic scale, the depth of discharge DOD is calculated as a function of parameter q in Table 4 and the number of cycles Ncycles. The number of cycles is derived from the orbital characteristics and a fixed input in this analysis. Table 4. Battery intrinsic characteristics NiCd NiH2 Ed (Wh/kg) 60 75 ηbatt (%) 85 86 q 145.8 176.3 The minimum required battery capacity Cmin can then be calculated as follows: PT e e Cmin = DODb and the mass of the battery cells Mb is calculated as: Mb = Cmin Ed 11 American Institute of Aeronautics and Astronautics (19) (20) 4. Telecom System Model The mass and power of the telecom system (TTC) are computed starting from the link budget. The required communication link characteristics are the Bit Error Rate BER, the modulation, and ground station antenna gain Gr. From the BER and modulation, one can compute the required energy per bit to noise ratio EbNo. The EbNo plus the data rate are used to compute the Carrier to Noise Ratio CNratio . The total amount of data to be transmitted is assumed to be Tdata = 103 B where B is the total amount of data coming from the C&DH (Command & Data Handling) system to telecom. Given the access time ta the required data rate Rt is calculated as follows:  Tdata  Rt = 10 log10   t – t  aq   a where taq is the target acquisition time. Given the data rate and the bit to noise ratio, CNratio is simply: CN ratio  Eb N 0  Rt With the Carrier to Noise Ratio one can compute the Equivalent Isotropic Radiated Power (EIRP) as follows: EIRP  CN ratio  G / T  LTOTAL  k (21) (22) (23) where k = 228.6 dB, LTOTAL is the total signal loss and G/T is receiving system performance. The total signal loss is computed adding up all the factors that lead to a loss of signal energy and an increase of the noise. Here most of these losses or sources of noise have been modeled with simple equations or look-up tables. The free space losses FSL are calculated from the distance from the ground station rGS as well as the frequency of the transmitter fT: (24) FSL  32.4  20 log10 rGS  20 log10 fT The polarization mismatch (Ionospheric) losses PL can be computed from the Faraday rotation f using the following relationship: (25) PL = – 20 log10 cos f   The atmospheric losses AL are a function of the ground station altitude HG, are collected in a look-up table (as in Table 5) and interpolated. The dependency of the atmospheric losses on the elevation angle is modeled by introducing a simple sinusoidal function of the elevation angle e: A (26) ALH = L sin e Table 5. Atmospheric losses' change with ground station altitude HG (km) -2 to 2 2.1 to 6 6.1 to 10 10.1 to 14 14.1 to 18 AL (dB) 0.04 0.025 0.008 0.004 0.001 The Rain absorption losses RaL are then calculated by using the data in Ref 16 and 18. The worst case losses for the Feeder loss FL, the Antenna misalignment loss AML and the implementation loss IL are reported in Table 6. Table 6. Worst case losses FL [dB] 2 AML [dB] 0.5 IL [dB] 2 Summing up all the individual losses provides the total loss LTOTAL: LTOTAL = FSL + FL + AM L + ALH + PL + RaL + I L (27) The system noise is computed from the antenna noise temperature ANtemp and from the cabling and receiver losses. The total noise gives the noise figure RNfig: RN fig  AN temp  TAMP 10  LA /10 – 1 ko  10LA /10 10F /10 – 1 ko 10GAMP /10 (28) where TAMP is the amplifier noise, LA the cable loss, GAMP the low noise amplifier gain, F the receiver noise figure and k0 = 290. The transmitter noise temperature Stemp is: 12 American Institute of Aeronautics and Astronautics Stemp  ATtempT  10LT /10 – 1 k  10LT /10  10FT /10 – 1 k   o   o     TeT   GT /10 10 (29) Here ATtempT is the transmitter antenna noise temperature, TeT is the transmitter amplifier noise, LT is the transmitter cable loss, GT is the transmitter low noise amplifier gain, FT is the transmitter noise figure. The rain noise Nrain is then calculated as follows: 1   N rain =  1– RA/10  ko  10  (30) where RA is the rain absorption. The total system noise TSnoise then writes: TSnoise  10log10  RN fig  Stemp  N rain  (31) The receiving system performance G/T is then calculated as follows: G / T  Gr – TSnoise (32) where Gr is the ground station receiver gain. The required transmission power Pld onboard the spacecraft is defined as: PLd  EIRP – Gt (33) where Gt is the transmitter antenna gain. The spacecraft antenna type is chosen on the basis of the required antenna gain Gt. It is well know that the best antenna for 5 dB ≤ gains ≤ 10 dB is the patch one, while the best for 10 dB < gains ≤ 20 dB belongs to the horn type set, therefore the mass of the antenna is computed as follows. The antenna characteristic length (it is the diameter of the normal conical section for conical horns, parabolas, and circular patches, and an equivalent diameter for pyramidal horns and square/rectangular patches) is: Gt  10 10 Dant    ANT  0.5  c    fT  (34) where ANT is the antenna efficiency and c is the speed of light. If 5 ≤ Gt ≤ 10dB the mass of the patch is: M ant , patch   2 Dant 4 0.0015  diel  0.0005 copper  (35) where ρdiel = 2000 kg/m3 and ρcopper = 8940 kg/m3 are the averaged value of a dielectric material density and the copper density, respectively, considering a 2 mm total thickness, with 1.5 mm of dielectric material and 0.5 mm copper. If 10 dB < Gt ≤ 20 dB the lateral surface of the horn, SLAT, is computed as a conical surface: SLAT   and the mass, Mant,horn, is: Dant 2 2 Dant  L2horn 4 M ant ,horn  SLAT  A (36) (37) where Lhorn is the length of the horn antenna can be assumed equal to 2Dant from available data, and ρA is the areal density, which has a mean value of approximately 15 kg/m2 (from available data18). If the gain of the antenna is > 20 dB, the parabola antenna is selected, the diameter of the antenna is computed with Eq.(34), and the mass of the antenna, Mant,par, is: M ant , par   2 Dant 4 A 2 (38) where the surface density has a typical value of 10 kg/m . The mass of the amplifier Mamp is a function of PLd (see Ref. 17) as well as the mass of the case Mcase. An identification parameter T  [0, 1] is used to identify the type of amplifier such that for TWTA type, T = 0 and for solid state type T = 1. Finally, the casing mass Mcase is computed as a fraction of the amplifier mass: M case = M amp CMR (39) where CMR is the ratio between the mass of the case and the amplifier mass. 13 American Institute of Aeronautics and Astronautics 5. Test Results The bpa structure and the design space for both the TTC and POW system are summarized in Table 7 and Table 8. The assumption for the integrated system is that the power demand for the TTC, PLd, is added to a fixed power demand of 900W in daylight and 400W in eclipse. In these tests, it is assumed that the spacecraft spends half of the time in eclipse and half in daylight with a maximum solar aspect angle of 15degrees. Figure 8 and Figure 9 show the Bel and Pl curves for the TTC system and a comparison to the margin quantification using a traditional margin approach. The cost function f is the system mass, i.e. the mass of TTC. Note that some intervals are overlapping. This is an interesting feature of Evidence Theory that allows one to deal with what can be considered as the degree of ignorance on the bpa assignment. The assumption is that the spacecraft is operating at 1.5e6 km from the Earth and has an access time of 1000s to a ground station with a receiving antenna with a gain of 60dB. The volume of data is 120000 bits. The lifetime of the mission is assumed to be 4 years. The Faraday rotation is assumed to be 9 degrees, the gain of the ground station antenna 60dB and the BER is 1e-6. The ground station is assumed to be at altitude 0m with the spacecraft at 30 degrees of elevation angle. The gain of the amplifier is 60dB with cable losses of 8dB, a noise temperature of 400K, and a noise figure of 10. The transmitter amplifier gain is assumed to be 20dB with noise temperature of 400K and noise figure of 10. Note that the characteristics of the POW and TTC subsystems were not selected to reflect a real mission scenario but only to test the proposed methodology. With these values, the difference between the optimal and robust solution is about 1kg for the TTC. ANT CMR Lt Tant Table 7. TTC bpa structure Interval bpa Interval bpa Interval bpa Interval bpa [0.5 0.6] 0.2 [0.1 0.2] 0.5 [1 2] 0.2 [200 250] 0.1 [0.65 0.75] 0.5 [0.25 0.3] 0.35 [2 3] 0.3 [300 370] 0.6 [0.6 0.8] 0.2 [0.1 0.3] 0.15 [3 5] 0.5 [400 500] 0.3 [0.8 0.95] 0.1 Table 8. POW bpa structure Xe Xd Id PCU Interval Bba Interval Bba Interval Bba Interval Bba [0.5 0.6] 0.1 [0.65 0.7] 0.2 [0.8 0.81] 0.7 [0.5 0.6] 0.1 [0.65 0.7] 0.6 [0.75 0.8] 0.6 [0.82 0.83] 0.2 [0.65 0.7] 0.6 [0.72 0.75] 0.3 [0.8 0.85] 0.2 [0.83 0.9] 0.1 [0.8 0.9] 0.3 Table 9. Design space for TTC and POW Parameter fT (MHz) Mod T Gt (dB) cell sa (kg/m2) aPCU (kg/W) Ed (Wh/kg) Low bound 7e3 0 0 5 0.1 1 0.01 60 Upper bound 11e3 1 1 20 0.3 2 0.02 100 The Bel margin curve in Figure 8 was generated assuming that a designer is taking the min/min solution (best absolute performance) from problem (8) and adding a 25% margin to the required TTC power and to the mass of the casing of the electronics. Then a system level margin is added to the total mass of the TTC. The system level margin can range from 0% to 25% of the nominal mass of the TTC. For each mass plus system margin the value of Belief and Plausibility was computed (see red and green thick solid lines). In Figure 9 a more conservative choice is made. 14 American Institute of Aeronautics and Astronautics A 25% margin is added to the mass of antenna and amplifier and then a system level margin is added as before to the total mass of the TTC. The two figures show that the margin approach either underestimates the Belief or overestimates the margin. Figure 8, in fact, shows that the Belief of the mass corresponding to the maximum system level margin is less than 60%. In the more conservative case, Figure 9, the Belief is 1 but the mass is overestimated by about 0.5kg. Figure 8. TTC system : margin approach vs. EBRO: best case margins. Figure 9. TTC system: margin approach vs. EBRO: worst case margins. Figure 10 shows the Bel and Pl curves computed with different c from 0.7 to 0.99. The total number of focal elements is 108 corresponding to 216 optimizations to compute the exact Bel and Pl. With c= 0.99 one can obtain a reduction of the computational cost down to 26% and with no relevant error in Belief. A c= 0.70 bring a reduction down to 8% of the cost for an exact computation but with a limited error. In particular the error is very contained for high values of Belief with a difference of about 0.1 kg in mass for the same Belief of less than 0.1 difference in Belief for the same mass. 15 American Institute of Aeronautics and Astronautics Figure 10. Approximated Bel and Pl curves for the Telecom system Figure 11 shows a similar result for the integrated Power and Telecom system. The total number of focal elements in this case is 8748 corresponding to 17496 optimizations for an exact calculation. The simple application of the integrated filtering technique beings a moderate reduction of computational effort down to 80% of the cost of the exact computation. The resulting Belief is underestimated by maximum 0.1. The application of the approximated min and max evaluation with c= 0.90 brings to a more substantial reduction, down to 22% and with a moderate overestimation that reduces almost to zero close to the left and right extremes of the Belief curve. Figure 11. Approximated Bel and Pl curves for the integrated Power and Telecom system. VI PROBLEM DECOMPOSITION The interesting aspect of space engineering systems is that although the overall design requires the contribution of all the subsystems, some subsystems are relatively decoupled and exchange information only through their specific design budgets. For example, the telecom system and the power system exchange information only through the output power from the telecom system that becomes an input parameter to the power system. Let us consider a function g : D  U  with the following form: Nf g (d1 , u1 ,..., di , ui , u3i ,..., d N f , u N f , u3N f )  f1 (d1, u1,..., di , ui ,..., d N f , u N f )   fi (di , ui , u 3i ) (40) i 2 Now assume that the functional dependency of function f1 on design and uncertain parameters di and ui is realized through a function hi such that: Nf g (d1 , u1 ,..., di , ui , u3i ,..., d N f , u N f , u3 N f )  f1 (d1, u1,..., hi (di , ui ),..., hN f (d N f , u N f ))   fi ( hi (di , ui ), u3i ) (41) i 2 16 American Institute of Aeronautics and Astronautics If hi could be handled as independent variable the two functions f1 and fi could be decoupled and Bel(g<) could be expressed as: Beld ( g   )  Nf    1  A1 i  Ai m(1 )m(i ) i A1  u1  U1  U , h | g    (42) Ai  hi , u3i  U 3i  U | g    If the value of the design parameters and of hi is fixed then the two functions are completely decoupled and the computation of the Belief associated to their sum requires the independent computation of the maxima and minima of f1 and fi over the subspaces U1 and U 3i . If the range of hi is well defined then one could compute the values of fi for different values of hi by solving the following constrained problems: max f i  d, u3i , hi  (43) u3 i hi  d, ui    hi If hi is fixed the computational complexity grows linearly Nf and the computation of the focal elements for each function fi can be performed in parallel. If the vector ui contains a single uncertain parameter the result is an exact representation of the Belief curve. If the vector ui contains multiple uncertain parameters then one can verify that the belief function Beld is equal to the full belief curve Bel only for the  values for which the value of hi is verified. A good choice to fix the value of hi is to take the solution of the min-max problem (7). As an illustrative example consider the following toy problem: 2 2 f 2  d12  d 22  u21  u22  2  u32 h  u21  u22 (44) f1  d 32  u1  h g  f1  f 2 Each uncertain parameter is defined over the three intervals [0 0.1], [0.2 0.4] and [0.5 1] with two different bpa assignments: a) 0.3, 0.6 and 0.1 respectively and b) 0.3, 0.1 and 0.6 respectively. Figure 12 shows a comparison between the exact Bel and Pl curves and the approximated ones. The approximated Bel curves are very close to the exact ones and are almost identical for some values of  The Pl approximation is instead very poor for low values of and good for high values of  The main reason is that only one value of h as used and it was the one corresponding to the solution of the min/max problem. All minimum values within the focal elements of the decomposed problem are therefore overestimated while the maxima are exact for a large number of focal elements at some specific . The main advantage of this approximation becomes clear when one looks at the computational cost. The exact computation requires 162 optimizations, while the approximated computation requires two parallel sets of optimizations with 3 optimizations per set, thus 6 in total. The computational cost of the approximation is therefore 3.7% of the cost of the exact computation and would grow linearly with the number of dimensions. a) Figure 12. Decomposition approximation for bpa structure a) and bpa structure b) 17 American Institute of Aeronautics and Astronautics b) VII FINAL REMARKS The paper presented some strategies to obtain an estimation of Belief and Plausibility at a fraction of the computational cost for their exact calculation. The approach presented in this paper provides the computation of the optimal range of the design margin at a cost that is polynomial with the number of dimensions. An estimation of the full Belief and Plausibility corves could be obtained with a cost reduction by over 80% but maintaining a contained error. The effectiveness of the proposed strategies was proven on some benchmark problems, presenting a number of minima and maxima exponentially increasing with the number of dimensions. Furthermore, two space system design cases are used to show how evidence-based design optimization can improve the design of space systems compared to a more traditional system margin approach. From these test it appeared that, even in the ideal case in which an optimal deterministic design solution is available, a traditional margin approach tend to underestimate the reliability of the design margin or to overestimate their value, given the available information. This justifies the use of a rigorous margin quantification. Finally, a problem decomposition technique was proposed to reduce the computational complexity of space system design problems in which all the components contributing to the overall design budgets are only weakly coupled through a single function (the power in the case of space systems). For these particular problems, it seems possible to obtain massive reductions of the computational cost but, more importantly, a computational cost that increases linearly with the number of integrated systems. The results in this paper, however, are only preliminary and a more in depth investigation is underway. Acknowledgments This work is partially supported through an ESA/ITI grant AO/1-5679/08/NL/CB . References 1 W. Oberkampf and J. C. Helton. Investigation of evidence theory for engineering applications. In 4th Non-Deterministic Approaches Forum, volume 1569. AIAA, April 2002. 2 H. Agarwal, J. E. Renaud, and E. L. Preston. Trust region managed reliability based design optimization using evidence theory. Collection of Technical Papers - AIAA/ASME/ASCE/AHS/ASC Structures, Structural Dynamics and Materials Conference, 5:3449 – 3463, 2003. 3 H.-R. Bae, R. V. Grandhi, and R. A. Canfield. Uncertainty quantification of structural response using evidence theory. Collection of Technical Papers -AIAA/ASME/ASCE/AHS/ASC Structures, Structural Dynamics and Materials Conference, pages 2135 – 2145, 2002. 4 T. Fetz, M. Oberguggenberger, and S. Pittschmann. Applications of plausibility and evidence thoery in civil engineering. In 1st International Symposium on Imprecise Probabilities and Their Appplications, Ghent, Belgium, 29 June- 2 July 1999. 5 L.-P. He and F.-Z. Qu. Possibility and evidence theory-based design optimization: an overview. Kybernetes. 6 Z. P. Mourela and J. Zho. A design 0ptimization method using evidence theory. Journal of Mechanical Design, 128:901 – 908, 2006. 7 T. Denoeux. Inner and outer approximation of belief structures using a hierarchical clustering approach. International Journal of Uncertainty, Fuzziness and Knowlege-Based Systems, 9(4):437 – 460, 2001. 8 J. C. Helton, J. Johnson, W. L. Oberkampf, and C. Sallaberry. Sensitivity analysis in conjunction with evidence theory representations of epistemic uncertainty.Reliability Engineering &amp; System Safety, 91(10-11):1414 – 34, October 2006. 9 J. C. Helton, J. Johnson, W. L. Oberkampf, and C. Storlie. A sampling-based computational strategy for the representation of epistemic uncertainty in model predictions with evidence theory. Computer Methods in Applied Mechanics and Engineering, 196(37-40 SPEC ISS):3980 – 3998, August 2007. 10 J. C. Helton, J. Johnson, C. Sallaberry, and C. Storlie. Survey of sampling based methods for uncertainty and sensitivity analysis. Reliability Engineering &amp; System Safety, 91(10-11):1175 – 209, October 2006. 11 M. Vasile. Robust mission design through evidence theory and multiagent collaborative search. Annals of the New York Academy of Sciences, 1065:152–173, Dec. 2005. 12 N. Croisard, M. Vasile, S. Kemble, and G. Radice. Preliminary space mission design under uncertainty. Acta Astronautica, 66:5 – 6, 2010. 13 G. Shafer. A Mathematical Theory of Evidence. Princeton University Press, 1976. 14 B. Tessem. Approximations for efficient computation in the theory of evidence. Artificial Intelligence. 15 M. Vasile, E. Minisci, and M. Locatelli. An inflationary differential evolution algorithm for space trajectory optimization. IEEE Transactions on Evolutionary Computation, 2011. 16 Dennis Roddy Satellite Communications 3rd ed., McGraw-Hill, 2001. 17 J. Larson, James R. Wertz Space Mission Analysis and Design 3rd ed. , Microcosm Press & Kluwer Academic Publishers. 18 Constantine A. Balanis Antenna Theory Analysis and Design 3rd ed. , Wiley-Interscience, 2005. 19 Mukund R. Patel. Spacecraft Power Systems, CRC Press, 2004. 18 American Institute of Aeronautics and Astronautics
5cs.CE
arXiv:1609.07182v2 [math.RT] 13 Jan 2017 An Enumeration of the Supercharacter Theories of Cp × C2 × C2 for Prime p Alexander Lang April 5, 2018 Abstract The supercharacter theories of Cp ×C2 ×C2 were classified in the language of Schur rings by Evdokimov, Kovács, and Ponomarenko in [EKP16]. It was shown that every nontrivial supercharacter theory of Cp ×C2 ×C2 can be constructed as a wedge product, a direct product, or is generated by automorphisms. We use this classification to give a precise count of the distinct supercharacter theories of Cp × C2 × C2 and describe when a supercharacter theory can be constructed by more than one method. We also present an alternative proof of the classification using the language of supercharacter theories. 1 Introduction A supercharacter theory for a finite group G is a pair of set partitions, one of G and one of the set of irreducible characters Irr(G), satisfying a small set of conditions. They correspond to subalgebras of the group algebra Z(CG) satisfying some special properties. They were first defined by Diaconis and Isaacs [DI08] and were used to assist in understanding the groups UTn (q) of unimodular upper triangular matrices over the finite field Fq . Since then, there has been research connecting supercharacter theories to Hopf algebras and number theory by examining specific classes of supercharacter theories. One natural question that arises is what are all the possible supercharacter theories for a given group G? One important family of groups for which the answer to that question is known is the cyclic groups as described in [LM98] and [LM96]. In this case there are three general methods of constructing supercharacter theories which suffice to construct all possible nontrivial supercharacter theories. The first method generates the supercharacter theory as the orbits of the action of a subgroup of the automorphisms of G. The other two methods build the supercharacter theory from the supercharacter theories of smaller groups. First, if G can be expressed as a direct product of two subgroups, we can form the direct product of any pair of supercharacter theories of the two subgroups of G. Second, we can use what are known as wedge products. We will only describe a special case as it is sufficient for our discussion, although the full generality is required for cyclic groups. For any normal subgroup N of G, the wedge product combines any supercharacter theory for N and any supercharacter theory for G/N to form a supercharacter theory for G. It is possible that a supercharacter theory can be constructed by more than one of these 1 methods, or by the same method in different ways. Also for general Abelian groups, it is known that these three methods are not sufficient. In particular there are nontrivial supercharacter theories for p-groups which cannot be constructed using these methods. It was shown in the proof of Theorem 1.5 in [EKP16] that these three methods are also sufficient to construct every nontrivial supercharacter theory of Cp × C2 × C2 where p is prime. Using this classification, it was proved that Cp × C2 × C2 is a Schur group for any prime p. We use this classification to determine the total number of distinct supercharacter theories of Cp × C2 × C2 for p odd, and further which supercharacter theories can be constructed by each of the methods, and which ones can be constructed in more than one way. Many of these supercharacter theories are isomorphic, however we will consider them distinct if the partitions of Cp × C2 × C2 are distinct regardless of whether they are isomorphic or not. In Sections 3 through 7, we present an alternative proof of the classification using the language and techniques of supercharacter theories. Our proof often uses more elementary and detailed methods than the one presented in [EKP16], however it is also much longer. A key element of our argument is the utilization of the properties of the sums of roots of unity which occur when the supercharacters are evaluated on superclasses. These techniques may potentially allow the classification to be extended in different directions, particularly to supercharacter theories of nonAbelian groups. The proof presented in Theorem 1.5 in [EKP16] is recommended for readers familiar with the language of Schur rings. 2 Preliminaries We will use the following notation. We will denote the cyclic group of order n by Cn . As we will discuss (C2 )3 separately, let p be an odd prime. All groups will be written multiplicatively with identity e. If H1 and H2 are normal subgroups of G such that H1 ∩ H2 = {e} and hH1 , H2 i = G then G ∼ = H1 × H2 and we call H1 and H2 a complementary pair. Given a group G we will let Irr(G) represent the set of irreducible characters of G over C. We shall denote the character of the trivial representation by triv. For K ⊆ G define K (i) = {ki |k ∈ K}, X b = g ∈ CG. K (1) (2) g∈K We begin with the definition of a supercharacter theory for a finite group based on the original description given by Diaconis and Isaacs in [DI08]: Definition 1. [DI08] Given a finite group G, a supercharacter theory for G is a pair (X , K) where X is a partition of Irr(G) and K is a partition of the set of conjugacy classes of G satisfying the following conditions: 1. {e} is an element of K, and {triv} is an element of X , 2. |K| = |X |, 2 3. for all X ∈ X and all K ∈ K the class functions σX = X χ(e)χ satisfy σX (g) = χ∈X σX (h) for all g, h ∈ K. The elements of K are called superclasses and the σX , for all X ∈ X are called supercharacters. We shall denote the superclass containing the element g by [g]K or by [g] when K is clear from context. We shall denote the X ∈ X containing the irreducible character χ by [χ]X or [χ]. We will say that a supercharacter theory (X ′ , K′ ) is a refinement of the supercharacter theory (X , K) if X ′ is a refinement of X as partitions or equivalently K′ is a refinement of K. Proposition 2.1. [DI08, Th. 2.2] If (X , K1 ) and (X , K2 ) are supercharacter theories for G, then K1 = K2 . Similarly if (X1 , K) and (X2 , K) are supercharacter theories for G then X1 = X2 . Lemma 2.1. [Hen08, Lemma 6.1(a)] If (X , K) is a supercharacter theory for G and K ∈ K, then the subgroup of G generated by K is a union of superclasses. We will require the use of an alternative description of a supercharacter theory based on the bijection between the set of supercharacter theories for a finite group G and the set of Schur rings of G which are contained in Z(CG) [Hen10]. For more information, see [Wie64]. Definition 2. The Hadamard product ◦ is defined on CG by     X X X  (ag bg )g. bg g  = ag g ◦  g∈G g∈G (3) g∈G b When necesNote that (CG, ◦) is a commutative associative algebra, with identity G. sary, we will denote the usual product on CG by ∗, to distinguish it from the Hadamard product. Proposition 2.2. [Hen10, Prop. 2.4] For a finite group G there is a bijective correspondence between supercharacter theories (X , K) and C-linear subspaces A of Z(CG) containing e b which are closed under the operations ∗ and ◦. and G Because of the above bijection we shall also refer to such algebras as supercharacter theories. Given such an algebra A we shall denote the corresponding partitions of Irr(G) and G by XA and KA respectively. b ∈ A is equivalent to H being a union of superclasses. Remark 2.1. Note that for H ⊆ G, H Also for a supercharacter θ and an irreducible character χ the inner product hθ, χi = 6 0 is equivalent to χ a summand of θ. We recall the following, for more details see [DI08]. We note that if N is a normal b ∈ A then CN ∩ A is a supercharsubgroup of G with a supercharacter theory A, and N acter theory for N . We shall call such a theory the restriction of A to N , denoted by 3 A|N . We also observe that A|N is the supercharacter theory of N defined by the superclasses {K ∈ KA |K ⊂ N }. The supercharacter theory A = Z(CG) is called the minimal supercharacter theory. The supercharacter theory with K = {{e}, G \ {e}} is called the maximal supercharacter theory, and we will also refer to it as the trivial supercharacter theory. We recall the following methods of constructing supercharacter theories. For cyclic groups, these three methods are sufficient to construct all nontrivial supercharacter theories. We note that it is sometimes possible to construct a given supercharacter theory using more than one of the following constructions. Proposition 2.3. [DI08] A subgroup H of Aut(G) acts on both the set of conjugacy classes of G and Irr(G). Letting K be the set of orbits of the action on the conjugacy classes and X be the orbits of the action on Irr(G) yields a supercharacter theory. We will say that such a supercharacter theory (X , K) is generated by H, or generated by automorphisms. Proposition 2.4. [Hen10, Prop 8.1] Suppose that (XG , KG ) is a supercharacter theory for G and (XH , KH ) is a supercharacter theory for H. Then there is a supercharacter theory for G × H in which the superclasses are given by {K × L|K ∈ KG , L ∈ KH } and the supercharacters are given by {φ × σ|φ ∈ XG , σ ∈ XH }. We will often refer to a supercharacter theory constructed in this way as the direct product of the supercharacter theories (XG , KG ) and (XH , KH ). Proposition 2.5. [Hen10, Th. 4.2] Let N be a normal subgroup of G, and let π : G → G/N be the natural quotient map. Suppose that (XN , KN ) is a supercharacter theory for N , and (XG/N , KG/N ) is a supercharacter theory for G/N . Then there is a supercharacter theory for G in which the set of superclasses is KN ∪ {π −1 (K)|K ∈ KG/N \ {{e}}}. (4) For ψ ∈ Irr(N ) let Irr(G|ψ) be the set of χ ∈ Irr(G) such that hχ|N , ψi > 0. The corresponding partition of Irr(G) is given by [ XG/N ∪ { Irr(G|ψ)|X ∈ XN , X 6= {triv}}. (5) ψ∈X We will call such a supercharacter theory the wedge product of the supercharacter theory for N and the supercharacter theory of G/N , to agree with the conventions in [LM98] and [LM96]. We note that the above construction is a special case of a more general method, see [Hen10]. When classifying the supercharacter theories of cyclic groups the full generality is necessary, but in our case this version will suffice. 3 Structure of the Main Argument We are now ready to present the classification given in the proof of Theorem 1.5 in [EKP16] in our current terminology: 4 Theorem 3.1. [EKP16] Let p be prime, G = Cp × C2 × C2 . Then every nontrivial supercharacter theory A of G is at least one of the following: 1. generated by automorphisms, 2. the direct product of supercharacter theories for a pair of complementary subgroups H1 , H2 ≤ G, 3. the wedge product of supercharacter theories for H ≤ G and G/H. We will now outline the structure of our version of a proof. The following theorem is a key part of our argument. Theorem 3.2. [Wie64, Th. 25.4] If G is an Abelian group of composite order and there exists a prime p such that the p-Sylow subgroup of G is nontrivial and cyclic, then for every nontrivial supercharacter theory A of G there exists a proper nontrivial subgroup b ∈ A. H such that H It is clear that this theorem applies to Cp × C2 × C2 when p is an odd prime. Our classification will be split into four cases based on what collection of proper nontrivial subgroups are unions of superclasses, and by this theorem we know that this collection is nonempty. Every proper nontrivial subgroup of Cp × C2 × C2 is isomorphic to C2 , C2 × C2 , Cp , or Cp × C2 . There are three isomorphic copies of C2 and Cp × C2 respectively. There is one copy of C2 × C2 and one copy of Cp . We see that there are a large number of different possibilities for which subgroups are unions of superclasses. However, we can reduce the number of cases which must be considered in the following way. Recall that if G is Abelian then Irr(G) ∼ = G as groups, although the isomorphism is non-canonical. In [Hen09] the notion of a dual supercharacter theory is introduced using the canonical isomorphism G ∼ = Irr(Irr(G)), and it is shown that every supercharacter theory A of an Abelian group G yields a unique supercharacter theory B of Irr(G) where KB = XA . B is not in general isomorphic to A. We will make frequent use of the following lemma, for convenience we present a proof: Lemma 3.1. [Hen09, Lemma 11.1] Let A be a supercharacter theory for G and let B be its b ∈ A then there exists N ≤ Irr(G) dual supercharacter theory for Irr(G). If H ≤ G and H ∼ c′ ∈ A b such that N = G/H and N ∈ B. Further this relation is inclusion reversing: if H c′ ∈ B. and H ≤ H ′ then there exists N ′ ≤ N such that N ′ ∼ = G/H ′ and N Proof. Consider the dimension three supercharacter theory of G with superclasses {e}, H \ {e}, G \ H. The corresponding partition of Irr(G) is {triv}, N \ {triv}, and Irr(G) \ N where N is the subgroup of Irr(G) satisfying \ ker χ = H. (6) χ∈N Then by considering the superclasses, we see that A is a refinement of this theory. Hence N is a union of elements of XA as desired. It is clear that if H ≤ H ′ , then N ′ ≤ N , as every χ which contains H ′ in its kernel also contains H in its kernel, so we are done. 5 We also recall the following part of Corollary 11.6 of [Hen09]: Lemma 3.2. [Hen09, Cor. 11.6] A supercharacter theory A of G can be constructed as a wedge product iff the dual of A can be constructed as a wedge product. See [Hen09] for details on the dual supercharacter theory, and [EP14] for duality in the Schur ring setting. We note that G = Cp × C2 × C2 has the convenient property that H, H ′ ≤ G with ∼ H = H ′ implies G/H ∼ = G/H ′ . It is now clear that if we describe the collection of all b ∈ A then we also supercharacter theories A of G = Cp × C2 × C2 such that H ≤ G and H b ∈ B where have a description of the collection of all supercharacter theories B of G with N N∼ = G/H by considering the dual supercharacter theory and using any fixed isomorphism G → Irr(G). We first list all possible sets of proper nontrivial subgroups which can occur as unions of superclasses, excluding those sets which contain a complementary pair of subgroups as we will use separate arguments for them. It is a simple exercise to verify that this list is complete: 1. C2 2. C2 × C2 3. one C2 and C2 × C2 4. all three C2 and C2 × C2 5. Cp 6. Cp × C2 7. Cp and Cp × C2 8. Cp and all three Cp × C2 9. C2 and the Cp × C2 containing it 10. C2 , Cp , and the Cp × C2 containing them 11. C2 , the Cp × C2 containing it, and C2 × C2 . We now match these cases into pairs as in Lemma 3.1: (i) Cp × C2 ↔ C2 (ii) Cp ↔ C2 × C2 (iii) Cp × C2 and Cp ↔ C2 × C2 and one C2 (iv) Cp and all three Cp × C2 ↔ C2 × C2 and all three C2 (v) C2 and the Cp × C2 which contains it ↔ C2 and the Cp × C2 which contains it (vi) Cp , C2 , and the Cp ×C2 containing them ↔ C2 , the Cp ×C2 containing it, and C2 × C2 . 6 By the above argument, we only need to consider one of the cases in each corresponding pair. We shall handle Cases (ii), (iii), (iv), and (vi) in one argument, by assuming that cp ∈ A. The remaining two cases, (i) and (v), we shall argue by assuming that one copy C of Cp × C2 satisfies C\ p × C2 ∈ A, and that the C2 contained in it is the only other proper b ∈ A. nontrivial subgroup H which may satisfy H We shall organize our argument as follows. (i) and (v) will be considered in Case 1. cp ∈ A and C\ (ii), (iii), (iv), (vi) will be in Case 2 where we will assume C / A. The 2 × C2 ∈ c1 , H c2 ∈ A will be situation where there exists a complementary pair H1 and H2 with H considered in Cases 3 and 4. We will conclude our proof in section 7, where we consider the case when G = (C2 )3 . We introduce some more notation. Let Cp = hωi and C2 × C2 = {e, a, b, c}. We fix a primitive pth root of unity ρ. We define χ ∈ Irr(Cp × C2 × C2 ) to be the irreducible character defined by χ(ω) = ρ, χ(a) = χ(b) = χ(c) = 1. We let ψa , ψb , and ψc be the irreducible characters defined by ψx (ω) = 1, ψx (x) = 1, ψx (y) = −1 for all x, y ∈ {a, b, c} with x, y distinct. We will let A denote a supercharacter theory of Cp × (C2 × C2 ). If G = H1 × H2 then for K ⊂ G and h ∈ H2 we define M (K, h) = {g ∈ H1 |gh ∈ K}. Hence [ M (K, h)h. (7) K= h∈H2 See Example 9.1. Similarly if Irr(G) = H1 × H2 , and χ ∈ H2 , then for a supercharacter θ = σX we will define M (θ, χ) = {ψ ∈ H1 |ψχ ∈ X}. Note that ψ ∈ M (θ, χ) is equivalent to hθ, ψχi = 6 0. Finally, we note the following observation about ρ: Remark 3.1. Since 1 + t + t2 + . . . + tp−1 is the minimal polynomial of ρ over Q we have p−1 X ρiℓ zi ∈ Z where zi ∈ Q, then for all i, j 6≡ 0 (mod p) zi = zj . that if ℓ 6≡ 0 (mod p) and i=1 4 Case 1 We begin with the case where C\ p × C2 ∈ A and the C2 subgroup contained in this copy b ∈ A. This of Cp × C2 is the only other nontrivial proper subgroup H which may have H \ corresponds to (i) and (v) above. Without loss of generality we let hωi × hai ∈ A and hai b the only other proper nontrivial subgroup H which may have H ∈ A. By Lemma 3.1 this is equivalent to {ψa } ∈ XA and hχ, ψa i is the only other proper nontrivial subgroup of Irr(G) which may be a union of elements of XA . {b} is not a superclass so there exists \ x 6= b such that x ∈ [b]. Since hωi × hai ∈ A x 6= ω ℓ , ω ℓ a for any ℓ. Therefore x = bω ℓ or x = cω ℓ for some ℓ. Similarly bω k ∈ [c] or cω k ∈ [c] for some k. {b, c} a superclass implies [ that hb, ci ∈ A which contradicts our assumption. So we may choose ℓ, k 6≡ 0 (mod p). Let θ 6= ψa , triv be a supercharacter. We will express Irr(G) as H1 × H2 where H1 = hψa , ψb i and H2 = hχi. Hence p−1 X θ= M\ (θ, χi )χi . (8) i=0 7 Since θ(b) = θ(x) we have: p−1 X M\ (θ, χi )(b) = ρℓi M\ (θ, χi )(x) (9) i=0 i=0 p−1 X p−1 X M\ (θ, χi )(b) i=0 ! − M\ (θ, χ0 )(x) = p−1 X ρℓi M\ (θ, χi )(x). (10) i=1 The LHS of the equation above is an integer, therefore by Remark 3.1 for all i, j ≡ 6 0 (mod p): M\ (θ, χi )(x) = M\ (θ, χj )(x) (11) ! p−1 X M\ (θ, χi )(b) − M\ (θ, χ0 )(x) = −M\ (θ, χ)(x). (12) i=0 Case 1a: We begin with the situation where bω ℓ ∈ [b] and bω k ∈ [c] for some ℓ, k 6≡ 0 (mod p), and further cω u ∈ / [b] for any u 6≡ 0 (mod p) and cω v ∈ / [c] for any v 6≡ 0 (mod p). Note that for all i, r M\ (θ, χi )(b) = M\ (θ, χi )(bω r ). (13) Then we have: p−1 X M\ (θ, χi )(b) i=0 p−1 X ! − M\ (θ, triv)(b) = −M\ (θ, χ)(b) M\ (θ, χi )(b) = −M\ (θ, χ)(b) (14) (15) i=1 (p − 1)M\ (θ, χ)(b) = −M\ (θ, χ)(b) (16) M\ (θ, χ)(b) = 0. (17) M\ (θ, χi )(b) = 0. (18) ρri M\ (θ, χi )(b) = M \ (θ, triv)(b). (19) Hence for all i 6≡ 0 (mod p) Then we conclude that for all r r θ(bω ) = p−1 X i=0 So θ is constant on {b, bω, . . . , bω p−1 }. For all r, ψa (bω r ) = −1, so ψa is also constant on {b, bω, . . . , bω p−1 }. Therefore every supercharacter is constant on the set {b, bω, . . . , bω p−1 }, hence it is a subset of a superclass. Since bω ℓ ∈ [b] and bω k ∈ [c], {c, b, bω, . . . , bω p−1 } is a subset of a superclass. By our Case 1a assumption, this must be a superclass. This would imply !2 p−1 p−1 p−1 X X X i i ω i ∈ A. (20) aω + p = e+2 bω c+ i=0 i=0 8 i=0 c ∈ A, which contradicts our assumption for Case 1. Similarly, Since p 6= 2, this implies hωi we have a contradiction in the case of cω ℓ ∈ [b], cω k ∈ [c] for some ℓ, k 6≡ 0 (mod p), bω u ∈ / [b] for any u 6≡ 0 (mod p) and bω v ∈ / [c] for any v 6≡ 0 (mod p). Case 1b: By the above, we can choose x, y ∈ {b, c} so that x 6= y, xω ℓ ∈ [b], ℓ 6≡ 0 (mod p) and yω k ∈ [c], k 6≡ 0 (mod p). Recall that for all i, j 6≡ 0 (mod p) M\ (θ, χi )(b) = M\ (θ, χj )(b) and M\ (θ, χi )(c) = M\ (θ, χj )(c). Then Equation (12) becomes (p − 1)M\ (θ, χ)(b) + M \ (θ, triv)(b) − M \ (θ, triv)(x) = −M\ (θ, χ)(x). (21) Similarly we have (p − 1)M\ (θ, χ)(c) + M \ (θ, triv)(c) − M \ (θ, triv)(y) = −M\ (θ, χ)(y). (22) If x = b and y = c, then M\ (θ, χ)(b) = 0 and M\ (θ, χ)(c) = 0. If x = c and y = b then (p − 1)M\ (θ, χ)(b) + M \ (θ, triv)(b) − M \ (θ, triv)(c) + M\ (θ, χ)(c) = 0, (23) (p − 1)M\ (θ, χ)(c) + M \ (θ, triv)(c) − M \ (θ, triv)(b) + M\ (θ, χ)(b) = 0. (24) Adding these equations gives pM\ (θ, χ)(b) + pM\ (θ, χ)(c) = 0 (25) M\ (θ, χ)(b) = −M\ (θ, χ)(c). (26) We want to show that we cannot have M \ (θ, triv) ∈ {ψb , ψc }. Without loss of generality \ \ we assume that M (θ, triv) = ψb and M (ψa θ, triv) = ψc . Then Equations (23) and (24) yield (p − 1)M\ (θ, χ)(b) + M\ (θ, χ)(c) = −2, (27) (p − 1)M\ (θ, χ)(c) + M\ (θ, χ)(b) = 2. (28) Hence by Equation (26), (p−2)M\ (θ, χ)(c) = 2. Since M\ (θ, χ)(c) ∈ Z, we have p = 3. Then \ \ \ M (θ, χ)(c) = 2 implies M (θ, χ) = triv +ψc . Then M (θ, χ)(b) = 0 which is a contradiction. Hence we must have M \ (θ, triv) = ψb + ψc or M \ (θ, triv) = 0, so Equations (23) and (24) yield (p − 1)M\ (θ, χ)(b) + M\ (θ, χ)(c) = 0, (29) (p − 1)M\ (θ, χ)(c) + M\ (θ, χ)(b) = 0. (30) (p − 2)M\ (θ, χ)(b) − (p − 2)M\ (θ, χ)(c) = 0 (31) Subtracting gives 9 M\ (θ, χ)(b) = M\ (θ, χ)(c). (32) Using Equation (26), we see that this implies M\ (θ, χ)(b) = M\ (θ, χ)(c) = 0. Further we see \ \ \ that M (θ, triv)(b) = M (θ, triv)(c) = 0 as well, since M (θ, triv) = 0 or M \ (θ, triv) = ψb +ψc . \ \ i j Recalling that for all i, j 6≡ 0 (mod p) M (θ, χ )(b) = M (θ, χ )(b) and M\ (θ, χi )(c) = M\ (θ, χj )(c), we can now conclude that for any r θ(ω r b) = p−1 X ρir M\ (θ, χi )(b) = 0, (33) ρir M\ (θ, χi )(c) = 0. (34) i=0 θ(ω r c) = p−1 X i=0 Since ψa (ω r b) = ψa (ω r c) = −1, we have that {b, ωb, . . . , ω p−1 b, c, ωc, . . . , ω p−1 c} (35) \ is a subset of a superclass. Since hωi × hai ∈ A, we see that the above must in fact be a superclass. Therefore this supercharacter theory is a wedge product of a supercharacter theory for Cp × C2 and a supercharacter theory for the quotient (Cp × C2 × C2 )/(Cp × C2 ). Since the quotient group is isomorphic to C2 , there is only one choice of a supercharacter theory for it. Hence this supercharacter theory is completely determined by the choice of a supercharacter theory for Cp × C2 . This completes the classification in the case \ hωi × hai ∈ A and hai is the only other proper nontrivial subgroup H which may have b H ∈ A. 5 Case 2 cp ∈ A and C\ We now consider the case where C / A. By Lemma 3.1 this is equivalent 2 × C2 ∈ c to ψa + ψb + ψc is a sum of supercharacters, and hχi is not a sum of supercharacters. Case 2a: c2 ∈ A, and without loss of generality we let it be We begin by assuming there is a C \ hai which implies by Lemma 3.1 that hψ a , χi is a sum of supercharacters. Since hψa , χi ∩ {ψa , ψb , ψc } = {ψa }, ψa is a supercharacter. Since C\ / A, we know that {b}, {c}, 2 × C2 ∈ \ and {b, c} are not superclasses. Since hω, ai ∈ A, we have that xω ℓ ∈ [b] for some x ∈ {b, c} and ℓ 6≡ 0 (mod p). Let θ be a supercharacter which is a sum of irreducible characters in hχ, ψa i. Since ψa is a supercharacter, M (θ, triv) = 0. Then θ(b) = θ(xω ℓ ) = p−1 X ρiℓ M\ (θ, χi )(x). (36) i=1 Since θ(b) ∈ Z, we conclude by Remark 3.1 that for all i, j 6≡ 0 (mod p), M\ (θ, χi )(x) = M\ (θ, χj )(x). 10 (37) M (θ, χi ) = 0, triv, ψa , or triv +ψa , so M\ (θ, χi )(x) = 0, 1, or −1. If M\ (θ, χi )(x) = 1, then M\ (θ, χi ) = triv. If M\ (θ, χi )(x) = −1, then M\ (θ, χi ) = ψa . If M\ (θ, χi )(x) = 0 then M\ (θ, χi ) = 0 or M\ (θ, χi ) = triv +ψa . If M\ (θ, χ) = triv, then θ = χ + . . . + χp−1 , which p−1 is a contradiction as χ + . . . + χ a sum of supercharacters is equivalent to C2 × C2 \ a union of superclasses. If M (θ, χ) = ψa , then θ = ψa (χ + . . . + χp−1 ), so again we have a contradiction. Therefore we conclude that for every i either M\ (θ, χi ) = 0 or M\ (θ, χi ) = triv +ψa . Hence for all r = 0, . . . , p − 1 we have θ(bω r ) = θ(cω r ) = 0. (38) Let θ̃ be a supercharacter which is a sum of irreducible characters each of which is contained in {ψb χ, ψb χ2 , . . . , ψb χp−1 , ψc χ, ψc χ2 , . . . , ψc χp−1 }. M (θ̃, triv) = 0, and we have similarly: p−1 X ρiℓ M\ (θ̃, χi )(x). (39) θ̃(b) = θ̃(xω ℓ ) = i=1 θ̃(b) ∈ Z, so by Remark 3.1 for all i, j, M\ (θ̃, χi )(x) = M\ (θ̃, χj )(x). (40) \ If θ̃ is a sum of irreducible characters contained in hχ, ψb i, then hχ, ψb i is a sum of supercharacters which by Lemma 3.1 contradicts the assumption that {b} isn’t a superclass. Similarly θ̃ is not a sum of characters contained in hχ, ψc i because {c} isn’t a superclass. Therefore for all i either M\ (θ̃, χi ) = 0 or M\ (θ̃, χi ) = ψ + ψ . Hence for all r = 0, . . . , p − 1 b c we have θ̃(bω r ) = θ̃(cω r ) = 0. (41) Recall that hωi a union of superclasses is equivalent to ψa + ψb + ψc is a sum of supercharacters, and hω, ai a union of superclasses is equivalent to ψa a supercharacter. Since neither hω, bi or hω, ci is a union of superclasses, neither ψb or ψc is a supercharacter. Therefore ψa and ψb + ψc are both supercharacters. We now are able to conclude that all supercharacters are constant on the set {b, bω, . . . , bω p−1 , c, cω, . . . , cω p−1 } (42) and we conclude that it is a superclass. Since it is a hω, ai-coset, we conclude that A is a wedge product as in Case 1. Case 2b: c2 ∈ A. We want to show that every We now assume that there is no C2 with C superclass disjoint from hωi is a union of hωi-cosets. Since C2 × C2 ∈ / A, {a, b, c} is not a superclass, and by assumption {a}, {b} and {c} are not superclasses either. If {a, b} is a [ superclass, then ha, bi ∈ A which contradicts {a, b, c} not a superclass. Similarly {a, c} and {b, c} are not superclasses. Therefore we conclude that if x ∈ {a, b, c}, then there exists 11 y ∈ {a, b, c} and ℓ 6≡ 0 (mod p) such that yω ℓ ∈ [x]. Let θ 6= triv be a supercharacter which is not a summand of ψa + ψb + ψc . Then θ(x) = θ(yω ℓ ) p−1 X M\ (θ, χi )(x) = i=1 p−1 X M\ (θ, χi )(x) = i=0 p−1 X ρℓi M\ (θ, χi )(y) = i=0 (43) p−1 X ρℓi M\ (θ, χi )(y). (44) i=1 Since θ(x) ∈ Z, by Remark 3.1 we see that for all i 6≡ 0 (mod p) θ(yω i ) = −M\ (θ, χ)(y). (45) In particular, note that this implies θ is constant on {yω, yω 2 , . . . , yω p−1 }. For a superclass K let IK = {x ∈ C2 × C2 |∃ℓ such that xω ℓ ∈ K}. Given superclasses K, K ′ which are not subsets of hωi, we claim that IK and IK ′ are either equal or disjoint. Suppose they are not disjoint. Then we have p−1 XX c b xω i ∈ A (46) K hωi = x∈K i=0 c we c′ hωi c′ must be a summand, this implies IK ′ ⊂ IK . However, by considering K since K see that IK ⊂ IK ′ which proves the claim. There are three cases for the classes K disjoint from hωi: 1. |IK | = 1 for all K, 2. there exists z ∈ {a, b, c} such that for every K either IK = {z} or IK = {a, b, c}\{z}, 3. IK = {a, b, c} for all K. If |IK | = 1 for all K then there must exist i 6≡ 0 (mod p) such that aω i ∈ [a]. Then we have Equation (45) for y = a, and hence {a, aω, . . . , aω p−1 } is a subset of a superclass. Similarly we have that {b, bω, . . . , bω p−1 } and {c, cω, . . . , cω p−1 } are subsets of superclasses. Clearly they are in fact superclasses. For the case where IK = {z} or IK = {a, b, c} \ {z}, without loss of generality assume z = a. Then as above there must exist i 6≡ 0 (mod p) such that aω i ∈ [a], and again we have {a, aω, . . . , aω p−1 } is a superclass. There must exist β ∈ {b, c} and j 6≡ 0 (mod p) such that βω j ∈ [b]. If β = b then by Equation (45) {b, bω, . . . , bω p−1 } ⊂ [b]. Therefore if b ∈ IK , then K = [b] so we see that {b, bω, . . . , bω p−1 , c, cω, . . . , cω p−1 } is a superclass. If β = c then cω j ∈ [b] so by Equation (45) {b, cω, . . . , cω p−1 } ⊂ [b]. There also exists t 6≡ 0 (mod p) such that bω t ∈ [c], so {c, bω, . . . , bω p−1 } ⊂ [c]. We are then able to combine Equations (44) and (45) twice, once with x = b, y = c and once with x = c, y = b: We then have (p − 1)M\ (θ, χ)(b) = −M\ (θ, χ)(c), (47) (p − 1)M\ (θ, χ)(c) = −M\ (θ, χ)(b). (48) (θ, χ)(b) = −M\ (θ, χ)(b). − (p − 1)2 M\ (49) 12 Therefore M\ (θ, χ)(b) = M\ (θ, χ)(c) = 0. (50) We conclude that [b] = [c], or equivalently {b, bω, . . . , bω p−1 , c, cω, . . . , cω p−1 } is a superclass. Finally, we consider when IK = {a, b, c} for all K. In this case we want to show that G \ hωi = {a, aω, . . . , aω p−1 , b, bω, . . . , bω p−1 , c, cω, . . . , cω p−1 } (51) is a superclass. There exists x ∈ {a, b, c} and i 6≡ 0 (mod p) such that xω i ∈ [a]. If x = a then by Equation (45) {a, aω, . . . , aω p−1 } ⊂ [a]. Since a ∈ IK implies K = [a] we must have G \ hωi is a superclass. We now suppose that x 6= a and without loss of generality suppose that x = b. Then by Equation (45) with y = b we have {a, bω, . . . , bω p−1 } ⊂ [a]. There exists j such that aω j ∈ [b]. If j ≡ 0 (mod p), then [a] = [b]. b ∈ IK implies K = [a] so G\hωi is a superclass. If j 6≡ 0 (mod p), then by Equation (45) {b, aω, . . . , aω p−1 } ⊂ [b]. As above, we can combine 44 and 45 twice to conclude that [a] = [b]. Since a ∈ IK implies K = [a] we again have G \ hωi is a superclass. We now see that every superclass disjoint from hωi is a union of hωi-cosets. Therefore we see that A is a wedge product of a supercharacter theory for Cp and a supercharacter theory for (Cp × C2 × C2 )/Cp . This supercharacter theory is determined by a choice of the supercharacter theory for Cp and a choice of supercharacter theory for Irr(C2 × C2 ). 6 Complementary Subgroups We now consider the cases where there exist complementary subgroups which are unions of superclasses. We shall first need a few lemmas about supercharacter theories of Cp = hωi. Recall that ρ is a chosen primitive pth root of unity. Lemma 6.1. [Hen08, Lemma 6.9] If p is prime, then every supercharacter theory of Cp is generated by automorphisms. From this we have the following lemma. We will also provide a direct proof. Lemma 6.2. Let A be a supercharacter theory of Cp where p is prime. Then every element of KA other than {e} has the same size, and this is equal to the size of every element of XA other than {triv}. Proof. Fix a supercharacter theory A of Cp . Let θ 6= triv be a supercharacter of A with r irreducible characters as summands such that r is minimal. For k 6≡ 0 (mod p), θ(ω k ) is a sum of r distinct roots of unity. Let χ be an irreducible character which is a summand of θ. Because {ρ, ρ2 , . . . , ρp−1 } is linearly independent over Q we have χ(ω k ) = χ(ω v ) iff ω k = ω v . Hence we see that r is the maximal number of elements a superclass can contain. Let m be the number of superclasses different from {e}, which is equal to the number of supercharacters different from triv. Then since r is the minimal number of irreducible characters which are summands of a nontrivial supercharacter we have rm ≤ p − 1. However, since r is the maximal number of elements in a superclass we see that p − 1 ≤ rm. We conclude that rm = p − 1. Hence every superclass other than {e} has r elements, and every supercharacter other than triv has r irreducible characters as summands. 13 Remark 6.1. The size of every superclass other than {e} is the order of the group of automorphisms which generates the supercharacter theory. Further since Aut(Cp ) ∼ = Cp−1 for p prime, and a cyclic group has at most one subgroup of a given order, we see that the size of the superclasses determines the supercharacter theory. Also the dimension determines the supercharacter theory. Lemma 6.3. Let θ 6= triv be a supercharacter for a supercharacter theory A of Cp where p is prime. If χ1 6= χ2 are summands of θ and x 6= e, then there exists y ∈ [x], y 6= x, such that χ1 (x) = χ2 (y). Proof. Suppose that θ is a sum of r irreducible characters. Since x 6= e, θ(x) is a sum of r distinct roots of unity. By Lemma 6.2, | [x] | = r. Since χ2 (x) = χ2 (z) iff x = z, we see that there are r distinct values that χ2 takes when evaluating elements of [x]. Hence there must be a y ∈ [x] such that χ2 (y) = χ1 (x). Lemma 6.4. Let ω ℓ , ω k ∈ Cp for p prime,  and  let θ 6= triv be a supercharacter for some supercharacter theory A of Cp . If ω ℓ ∈ / ω k then the set of roots of unity which appear as summands of θ(ω ℓ ) are disjoint from those which appear as summands of θ(ω k ). Proof. If either ω ℓ = e or ω k = e, then the result clearly holds. Suppose that ω ℓ 6= e and ω k 6= e. Clearly the result also holds if θ is a single irreducible character, so suppose it is not. Suppose that ρi is a summand of both θ(ω ℓ ) and θ(ω k ). Then there exist χ1 , χ2 ∈ Irr(Cp ), χ1 6= χ2 such that χ1 , χ2 are summands of θ and χ1 (ω ℓ ) = χ2 (ω k ) = ρi .  ′ ′ However, by the previous lemma there exists a ω ℓ ∈ ω k such that χ1 (ω ℓ ) = ρi , which is a contradiction. c1 , H c2 ∈ A for a complementary Suppose that A is a supercharacter theory such that H pair H1 , H2 of Cp × C2 × C2 . This may occur in two ways: H1 ∼ = Cp × C2 and H2 ∼ = C2 ∼ ∼ or H1 = Cp and H2 = C2 × C2 . We leave the proof of the following to the reader: c1 , H c2 ∈ A, then A is a refinement Lemma 6.5. If H1 and H2 are a complementary pair and H of the direct product theory of A|H1 and A|H2 . If H1 ∼ = Cp × C2 and H2 ∼ = C2 , then we see that A must be the direct product supercharacter theory as there is no supercharacter theory A′ which is a refinement of A such that A′ |H2 = A|H2 . Since Cp × C2 is cyclic, all its supercharacter theories have already been classified, see [LM98] and [LM96], and Lemma 8.2. Hence the case we must consider is H1 ∼ = Cp and H2 ∼ = C2 × C2 . Similarly if A|H1 or A|H2 is the minimal supercharacter theory, then A must be the direct product supercharacter theory. We shall divide the remaining possibilities into two cases by considering the dimension of A|ha,bi . By definition the dimension can’t be one, and if the dimension is four A|ha,bi is the minimal supercharacter theory. Case 3 will be when the dimension is equal to three, and Case 4 will be when the dimension is equal to two. 6.1 Case 3 c1 , H c2 ∈ A. By Lemma 3.1, this implies that Suppose that H1 = hωi, H2 = {e, a, b, c} and H c ψa + ψb + ψc and hχi are sums of supercharacters. We consider the case where A|hωi is not 14 the minimal supercharacter theory for hωi, and the dimension of A|ha,bi is equal to three. Without loss of generality we let {a} and {b, c} be superclasses, which implies by Lemma \ 3.1 that ψa and ψb + ψc are supercharacters. Note that this implies hχ, ψa i is a sum of supercharacters. Let TK be the set of superclasses which are disjoint from hω, ai and ha, bi and let K ∈ TK . Similarly let TX be the set of supercharacters which are not a summand of \ \ Irr(hχ, ψa i) or Irr(hψ a , ψb i), and let θ ∈ TX . We note that |TK | = |TX |. {M (θ, ψb )}θ∈TX is a partition of Irr(hωi) \ {triv}. Since M (θ, ψb ) = M (ψa θ, ψc ) and θ ∈ TX iff ψa θ ∈ TX we see that {M (θ, ψc )}θ∈TX is the same partition. Similarly {M (K, b)}K∈TK = {M (K, c)}K∈TK are partitions of hωi \ {e}. We want to show that these partitions define a supercharacter theory of Cp which is a refinement of A|hωi . Since θ(b) = θ(c) we have |M (θ, ψb )| = |M (θ, ψc )|. (52) If M (θ, ψb ) ∩ M (θ, ψc ) 6= ∅, then θ = ψa θ so M (θ, ψb ) = M (θ, ψc ). Hence M (θ, ψb ) and M (θ, ψc ) are either disjoint or equal. Suppose they are disjoint. By Lemma 6.5, θ is a summand of β(ψb + ψc ) for some \ supercharacter β a summand of Irr(hωi). θ(ψb + ψc ) = (M\ (θ, ψb ) + M\ (θ, ψc )) + (M\ (θ, ψb ) + M\ (θ, ψc ))ψa . (53)   M\ (θ, ψb ) + M\ (θ, ψc ) is a summand of β, so M\ (θ, ψb ) + M\ (θ, ψc ) = β. If ω ℓ b ∈ ω k b for ℓ 6≡ k (mod p) then θ(ω ℓ b) = θ(ω k b) (54) M\ (θ, ψb )(ω ℓ ) − M\ (θ, ψc )(ω ℓ ) = M\ (θ, ψb )(ω k ) − M\ (θ, ψc )(ω k ). (55) Since M (θ, ψb ) ∩ M (θ, ψc ) = ∅ this implies M\ (θ, ψb )(ω ℓ ) = M\ (θ, ψb )(ω k ), M\ (θ, ψc )(ω ℓ ) = M\ (θ, ψc )(ω k ).  Similarly if ω ℓ c ∈ ω k c for ℓ 6≡ k (mod p) the above equations hold. Since |TX | = |TK |, we see that (56) (57)  ({M (θ, ψc )}θ∈TX , {M (K, c)}K∈TK ) = ({M (θ, ψb )}θ∈TX , {M (K, b)}K∈TK ) (58) is a supercharacter theory of Cp . It is clearly a refinement of A|hωi since A is a refinement   of a direct product theory by Lemma 6.5. We further observe that for ω ℓ b ∈ ω k c θ(ω ℓ b) = θ(ω k c) (59) M\ (θ, ψb )(ω ℓ ) − M\ (θ, ψc )(ω ℓ ) = −M\ (θ, ψb )(ω k ) + M\ (θ, ψc )(ω k ) (60) M\ (θ, ψb )(ω ℓ ) = M\ (θ, ψc )(ω k ). (61) 15 Similarly, for K ∈ TK we have that M (K, b) and M (K, c) are either equal or disjoint. Suppose that there exists K such that M (K, b) = M (K, c). Let ω k b, ω k c ∈ K and θ ∈ TX . Then θ(ω k b) = θ(ω k c) (62) θ(ω k b) = M\ (θ, ψb )(ω k ) − M\ (θ, ψc )(ω k ) = −θ(ω k c) (63) θ(ω k b) = θ(ω k c) = 0. (64) So M\ (θ, ψb ) and M\ (θ, ψc ) have to take the same value on M (K, b) = M (K, c). For a supercharacter theory of Cp where p is prime, it is impossible for distinct supercharacters to take the same value on a superclass. Therefore either M (θ, ψb ) = M (θ, ψc ) and hence A is a direct product theory, or M (K, b) 6= M (K, c) for every K ∈ TK . Since |TK | = |TX |, the latter case implies M (θ, ψb ) 6= M (θ, ψc ) for every supercharacter θ ∈ TX . This concludes our consideration of the conditions that every supercharacter theory of the form of Case 3 must satisfy. We now consider the sufficient direction and show that any partition that satisfies these conditions is indeed a supercharacter theory. Given a set X we will denote the set of all subsets of X by P(X). We will consider the potential supercharacter theory (X , K) of G = hω, a, bi where X ⊂ P(Irr(G)), K ⊂ P(G), |X | = |K| and further the following are satisfied: • (X ∩ P(Irr(hωi)), K ∩ P(hωi)) is a non-minimal supercharacter theory for Cp and we will denote the corresponding algebra by B. • {a}, {b, c} ∈ K and {ψa }, {ψb , ψc } ∈ X . • (X ∩ P(Irr(hω, ai)), K ∩ P(hω, ai)) is the direct product supercharacter theory of B and the unique supercharacter theory of hai. If (X , K) is a direct product supercharacter theory we are done, so assume that it is not. Suppose that {M (K, b)|K ∈ K, K ⊂ hωi × {b, c}} = {M (K, c)|K ∈ K, K ⊂ hωi × {b, c}} (65) is a supercharacter theory B ′ of Cp which is a refinement of B satisfying the following condition: for every superclass U 6= {e} of B ′ there is a superclass V of B ′ satisfying (A1) |U | = |V | (A2) U ∩ V = ∅ (A3) U ∪ V is a superclass of B (A4) (U × {b}) ∪ (V × {c}) ∈ K (A5) (U × {c}) ∪ (V × {b}) ∈ K. 16 Also, the analogous conditions hold for the supercharacters as well, with σ, σ ′ in the roles of U, V . We also assume that for every such supercharacter of B ′ σ = 6 triv we have for all x ∈ U, y ∈ V σ(x) = σ ′ (y). (66) This is well defined since σ + σ ′ is a supercharacter for B, and hence is constant on U ∪ V . Therefore Equation (66) is equivalent to σ(y) = σ ′ (x). We can view these assumptions as stating that every superclass of B ′ is a superclass of B split into two halves which satisfy Equation (66). Note that U and V correspond to M (K, b) and M (K, c) and similarly σ and σ ′ correspond to M\ (θ, ψb ) and M\ (θ, ψc ). This concludes our listing of assumptions, we shall now show that (X , K) is a supercharacter theory for G. We observe that |X | = |K|, hence we only need to show that all potential supercharacters are constant on all potential superclasses. We begin with K ∈ TK and θ ∈ TX . M\ (θ, ψb ) and M\ (θ, ψc ) are constant on M (K, b) and M (K, c) because they are supercharacters and superclasses for B ′ . By Equation (66) we have that θ is constant on all of K. Since a supercharacter of B is constant on M (K, b) ∪ M (K, c) by assumption (A3), it is constant on M (K, b) and M (K, c), so it is constant on K. Similarly for the supercharacters of Irr(hωi) × {ψa }. Clearly ψa and ψb + ψc are constant on K. Hence every potential supercharacter from X is constant on K ∈ TK . Now let K ∈ K be a superclass which is a subset of hωi. If ω ℓ ∈ K, then for θ ∈ TX we have θ(ω ℓ ) = (M\ (θ, ψb ) + M\ (θ, ψc ))(ω ℓ ). Since M\ (θ, ψb ) + M\ (θ, ψc ) is a supercharacter for B, we see that θ is constant on K. The supercharacters of Irr(hωi) and Irr(hωi) × {ψa } are clearly constant on K. ψb + ψc takes the constant value 2 and ψa takes the constant value 1 on K. In a similar fashion, we see that all potential supercharacters in X are constant on the superclasses which are contained in hωi × {a}. Finally we consider the superclass {b, c}. For θ ∈ TX we have θ(b) = |M (θ, ψb )| − |M (θ, ψc )| = 0, (67) θ(c) = −|M (θ, ψb )| + |M (θ, ψc )| = 0. (68) Clearly any supercharacter of Irr(hωi) or Irr(hωi)×{ψa } is constant on {b, c}. ψa takes the value −1, and ψb + ψc takes the value 0 on {b, c}. Therefore every potential supercharacter is constant on every potential superclass. We conclude that (X , K) defines a supercharacter theory of G. The above argument describes the supercharacter theories of Case 3. We will now present an alternate proof of the sufficient direction above, as it is useful to see that every supercharacter theory of Case 3 which is not a direct product can be generated by a group of automorphisms. Let A be such a supercharacter theory, and let B be the supercharacter theory A|hωi . Let B ′ be a refinement of B satisfying (A1) through (A5). By Lemma 6.1 every supercharacter theory of Cp can be generated by a subgroup of Aut(Cp ) ∼ = Cp−1 . Since every subgroup of a cyclic group is cyclic, there exists φ0 ∈ Aut(hωi) such thathφ0 i generates B. Similarly, there exists φ′ where hφ′ i generates the supercharacter theory B ′ . By Lemma 6.2 we know that every superclass other than {e} in B ′ is the same size, and by (A3) the size of every superclass other then {e} in B is double that size. Further, it is clear that this size equals |hφ′ i|. Since a cyclic group has at most one subgroup of a given 17 order we have hφ′ i = hφ20 i. We now let φ ∈ Aut(G) be defined by φ(ω) = φ0 (ω), φ(a) = a, φ(b) = b, and φ(c) = c. Let ψ ∈ Aut(G) be such that ψ(ω) = ω, ψ(a) = a, ψ(b) = c, and ψ(c) = b. Let A′ be the supercharacter theory generated by the group of automorphisms hφ ◦ ψi. We will show that A = A′ . We see that {a} and {b, c} are superclasses for A′ , and A|hωi = A′ |hωi . Let   ℓ 6≡ 0 (mod p) and let K0 = ω ℓ b ∈ K(A′ ). Then M (K0 , b) = {ω ℓ , φ2 (ω ℓ ), φ4 (ω ℓ ), . . .} and M (K0 , c) = {φ(ω ℓ ), φ3 (ω ℓ ), φ5 (ω ℓ ), . . .}. Hence we see that {M (K, b)}K∈K(A′ ) = {M (K, b)}K∈K(A) , {M (K, c)}K∈K(A′ ) = {M (K, c)}K∈K(A) , and M (K0 , b) ∪ M (K0 , c) ∈ K(A|hωi ). Hence A and A′ have the same superclasses, so we conclude that A = A′ . For a supercharacter theory generated by automorphisms as above, see Example 9.1. 6.2 Case 4 We now consider the final case for p odd. Again suppose that H1 = hωi and H2 = c1 , H c2 ∈ A. Suppose that A|hωi is not the minimal supercharacter theory, {e, a, b, c}, and H and that the dimension of A|ha,bi is equal to 2 which is equivalent to {a, b, c} is a superclass. Let TK be the set of superclasses of A which are disjoint from H1 and H2 , and let TX be the \1 ) or Irr(H \2 ). Again |TK | = |TX |. set of supercharacters which are not a summand of Irr(H Let K ∈ TK and θ ∈ TX . Since {a, b, c} is a superclass, there is a constant r such that b ◦ (a + b + c) = r(a + b + c) ∈ A. ((ω + ω 2 + . . . + ω p−1 )K) (69) Hence |M (K, a)| = |M (K, b)| = |M (K, c)| = r. Similarly |M (θ, ψa )| = |M (θ, ψb )| = b equals: |M (θ, ψc )|. Then (a + b + c)K (M\ (K, a) + M\ (K, b) + M\ (K, c)) + (M\ (K, c)a + M\ (K, a)b + M\ (K, b)c)+ (M\ (K, b)a + M\ (K, c)b + M\ (K, a)c). (70) By Lemma 6.5 K is a subset of α × {a, b, c} for some superclass α of A|hωi , so we have for some constant t, M\ (K, a) + M\ (K, b) + M\ (K, c) = tb α. Then the remaining terms W = (M\ (K, c) + M\ (K, b))a + (M\ (K, a) + M\ (K, c))b + (M\ (K, b) + M\ (K, a))c ∈ A. (71) b is not a summand of W then M (K, a), M (K, b), and M (K, c) are pairwise disjoint. If K b is a summand. Without loss of generality, suppose ω ℓ ∈ M (K, a) ∩ M (K, b) Suppose K with ℓ 6≡ 0 (mod p). Then θ(ω ℓ a) = θ(ω ℓ b) (72) and further by evaluating we see that M\ (θ, ψa )(ω ℓ ) − M\ (θ, ψb )(ω ℓ ) − M\ (θ, ψc )(ω ℓ ) = − M\ (θ, ψa )(ω ℓ ) + M\ (θ, ψb )(ω ℓ ) − M\ (θ, ψc )(ω ℓ ) (73) M\ (θ, ψa )(ω ℓ ) − M\ (θ, ψb )(ω ℓ ) = −M\ (θ, ψa )(ω ℓ ) + M\ (θ, ψb )(ω ℓ ) (74) which becomes 18 M\ (θ, ψa )(ω ℓ ) = M\ (θ, ψb )(ω ℓ ). (75) That implies M (θ, ψa ) = M (θ, ψb ). Since M\ (θ, ψa ) + M\ (θ, ψb ) + M\ (θ, ψc ) is a multiple \ of a Cp supercharacter, we have M (θ, ψc ) = M (θ, ψb ) because M (θ, ψa ) + M\ (θ, ψb ) + \ \ \ M (θ, ψc ) = 2M (θ, ψb ) + M (θ, ψc ) implies that some terms have multiplicity at least 2, hence all terms must have multiplicity 3. Therefore every supercharacter θ ∈ TX satisfies θ = M\ (θ, ψa )(ψa + ψb + ψc ) hence A is a direct product supercharacter theory. Therefore for all K ∈ TK we have M (K, a) = M (K, b) = M (K, c). Hence either M (K, a), M (K, b), and M (K, c) are all equal or all pairwise disjoint. Further, if there is one superclass K ∈ TK with M (K, a) = M (K, b) = M (K, c), then it must be true for all superclasses in TK . Also if M (K, a) = M (K, b) = M (K, c) then b since they both have 6r terms. It is clear that if M (K, a), M (K, b), and M (K, c) W = 2K are pairwise disjoint for all K ∈ TK , then M (θ, ψa ), M (θ, ψb ), and M (θ, ψc ) are pairwise disjoint for all θ ∈ TX . Suppose that M (K, a), M (K, b), and M (K, c) are pairwise disjoint for all K ∈ TK . Fix a K ∈ TK and let ω s , ω t ∈ M (K, a). Then θ(ω s a) = θ(ω t a). (76) Evaluating gives M\ (θ, ψa )(ω s ) − M\ (θ, ψb )(ω s ) − M\ (θ, ψc )(ω s ) = M\ (θ, ψa )(ω t ) − M\ (θ, ψb )(ω t ) − M\ (θ, ψc )(ω t ). (77) Since M (θ, ψa ), M (θ, ψb ), and M (θ, ψc ) are pairwise disjoint we have M\ (θ, ψa )(ω s ) = M\ (θ, ψa )(ω t ). (78) Therefore M\ (θ, ψa ) is constant on M (K, a). Similarly M\ (θ, ψb ) is constant on M (K, b) \ and M (θ, ψc ) is constant on M (K, c). We conclude that the three pairs ({M (θ, ψa )}θ∈TX , {M (K, a)}K∈TK ) , (79) ({M (θ, ψb )}θ∈TX , {M (K, b)}K∈TK ) , (80) ({M (θ, ψc )}θ∈TX , {M (K, c)}K∈TK ) , (81) are all supercharacter theories for Cp after adjoining {triv} and {e}. Using Lemma 6.1 and recalling Remark 6.1, we see that since they are all the same dimension and p is prime, they are all the same supercharacter theory. Suppose ω k ∈ M (K, a) and ω ℓ ∈ M (K, b), then θ(ω k a) = θ(ω ℓ b). (82) Evaluating gives M\ (θ, ψa )(ω k ) − M\ (θ, ψb )(ω k ) − M\ (θ, ψc )(ω k ) = − M\ (θ, ψa )(ω ℓ ) + M\ (θ, ψb )(ω ℓ ) − M\ (θ, ψc )(ω ℓ ). 19 (83) For any j and ψx and ψy where x, y ∈ {a, b, c} and x 6= y we observe that the set of roots of unity which appear as summands of M\ (θ, ψx )(ω j ) and M\ (θ, ψy )(ω j ) are disjoint. Therefore M\ (θ, ψa )(ω k ) = M\ (θ, ψb )(ω ℓ ). (84) Hence for a fixed superclass K, ω k ∈ M (K, a), ω ℓ ∈ M (K, b), and ω r ∈ M (K, c), we have by symmetry M\ (θ, ψa )(ω k ) = M\ (θ, ψb )(ω ℓ ) = M\ (θ, ψc )(ω r ). (85) By Lemma 6.4, we have for ω k ∈ M (K, a) and ω ℓ ∈ M (K, b) that the set of roots of unity which appear as summands of M\ (θ, ψc )(ω k ) is disjoint from those in M\ (θ, ψc )(ω ℓ ). Returning to Equation (83), this implies M\ (θ, ψb )(ω k ) = M\ (θ, ψc )(ω ℓ ), (86) M\ (θ, ψa )(ω ℓ ) = M\ (θ, ψc )(ω k ). (87) Then we proceed in a similar fashion to get M\ (θ, ψa )(ω r ) = M\ (θ, ψb )(ω k ), (88) M\ (θ, ψc )(ω k ) = M\ (θ, ψb )(ω r ). (89) Note that the final set of equations we get by symmetry is redundant, as we may already conclude M\ (θ, ψb )(ω k ) = M\ (θ, ψc )(ω ℓ ) = M\ (θ, ψa )(ω r ), (90) M\ (θ, ψc )(ω k ) = M\ (θ, ψa )(ω ℓ ) = M\ (θ, ψb )(ω r ). (91) Suppose that the supercharacter theories A|hωi and ({M (K, a)}K∈TK , {M (θ, ψa )}θ∈TX ) are given. Then given a superclass α ∈ A|hωi , we have α = α1 ∪ α2 ∪ α3 where α1 , α2 , and α3 are superclasses in the supercharacter theory ({M (K, a)}K∈TK , {M (θ, ψa )}θ∈TX ). Then there are two possibilities: either we have for A the three superclasses {α1 a ∪ α2 b ∪ α3 c}, {α2 a ∪ α3 b ∪ α1 c}, {α3 a ∪ α1 b ∪ α2 c} (92) {α1 a ∪ α3 b ∪ α2 c}, {α2 a ∪ α1 b ∪ α3 c}, {α3 a ∪ α2 b ∪ α1 c}. (93) or The situation is similar for θ ∈ TX . However, we do not have independent possibilities for each K. The above equations tell us that given a single fixed superclass K ∈ TK , for any θ ∈ TX the value of M\ (θ, ψa ) on M (K, a), M (K, b), and M (K, c) determines the values \ \ of M (θ, ψb ) and M (θ, ψc ). Hence the value of a single K as either Equation (92) or (93) determines all supercharacters in TX and hence the value as Equation (92) or (93) for every other K ∈ TK is determined. To understand the two possibilities, consider the algebra automorphism φ : CG → CG defined by φ(ω) = ω, φ(a) = a, φ(b) = c, and φ(c) = b. We see that φ exchanges the superclasses in Equations (92) or (93), so both yield supercharacter theories for G. 20 As in Case 3, we are now ready to consider the sufficient direction. Let B be a supercharacter theory for hωi and let B ′ be a refinement of B such that each superclass not equal to {e} and each supercharacter not equal to triv of B is partitioned into 3 equal sized superclasses and supercharacters respectively in B ′ . We partition G and Irr(G) so that the partition of hωi and Irr(hωi) matches that of B, {a, b, c} is an element of the partition of G, and {ψa , ψb , ψc } is an element of the partition of Irr(G). As before, let TK be the subset of the partition of G disjoint from hωi and ha, bi, and let TX be the \ or Irr(hψ \ set of potential supercharacters which are not summands of Irr(hχi) a , ψb i). We assume that for all K ∈ TK , M (K, a), M (K, b), and M (K, c) are pairwise disjoint, and for all θ ∈ TX , M (θ, ψa ), M (θ, ψb ), and M (θ, ψc ) are pairwise disjoint. Further, we assume that each of ({M (θ, ψa )}θ∈TX , {M (K, a)}K∈TK ), ({M (θ, ψb )}θ∈TX , {M (K, b)}K∈TK ), and ({M (θ, ψc )}θ∈TX , {M (K, c)}K∈TK ), after adjoining {triv} and {e}, match the supercharacter theory B ′ . For all K ∈ TK and θ ∈ TX we assume that M (K, a)∪ M (K, b)∪ M (K, c) is a superclass of B and M (θ, ψa ) ∪ M (θ, ψb ) ∪ M (θ, ψc ) ∈ XB . Further for every K ∈ TK , θ ∈ TX , we suppose that for ω k ∈ M (K, a), ω ℓ ∈ M (K, b), and ω r ∈ M (K, c) the following holds: M\ (θ, ψa )(ω r ) = M\ (θ, ψb )(ω k ) = M\ (θ, ψc )(ω ℓ ), (94) M\ (θ, ψa )(ω k ) = M\ (θ, ψb )(ω ℓ ) = M\ (θ, ψc )(ω r ), (95) M\ (θ, ψa )(ω ℓ ) = M\ (θ, ψb )(ω r ) = M\ (θ, ψc )(ω k ). (96) We want to show that the partition KB ∪ TK ∪ {{a, b, c}} is a set of superclasses for a supercharacter theory of G and that the corresponding supercharacters are those from B, TX , and ψa + ψb + ψc . Clearly the partitions of G and Irr(G) are the same size. Hence we only need to show that every potential supercharacter is constant on every potential superclass. Let θ1 be a supercharacter for B, θ1 6= triv, and let θ2 ∈ TX . b = M\ Let K ∈ TK . Then K (K, a)a + M\ (K, b)b + M\ (K, c)c. Clearly ψa + ψb + ψc is a constant −1 on K. θ1 is a supercharacter for B, so it is constant on M (K, a) ∪ M (K, b) ∪ M (K, c) ∈ KB , hence θ1 is constant on K. Let ω k , ω ℓ , ω r be as above, so ω k a, ω ℓ b, and ω r c are elements of K. Then using Equations (94), (95), and (96) we have θ2 (ω k a) = M\ (θ2 , ψa )(ω k ) − M\ (θ2 , ψb )(ω k ) − M\ (θ2 , ψc )(ω k ) = M\ (θ2 , ψb )(ω ℓ ) − M\ (θ2 , ψc )(ω ℓ ) − M\ (θ2 , ψa )(ω ℓ ) = θ2 (ω ℓ b) = M\ (θ2 , ψc )(ω r ) − M\ (θ2 , ψa )(ω r ) − M\ (θ2 , ψb )(ω r ) = θ2 (ω r c). (97) ′ Now suppose that for x ∈ {a, b, c} we have xω ℓ , xω ℓ ∈ K. Since M (K, x) is a superclass for B ′ and M\ (θ2 , ψa ), M\ (θ2 , ψb ), and M\ (θ2 , ψc ) are supercharacters for B ′ we have θ2 (xω ℓ ) = ′ ℓ θ2 (xω ). Hence θ2 is constant on K. Now suppose K ∈ KB . ψa + ψb + ψc takes the constant value 3 on K. θ1 is constant on K because B is a supercharacter theory for Cp . If ω i ∈ K, then θ2 (ω i ) equals M\ (θ2 , ψa )(ω i ) + M\ (θ2 , ψb )(ω i ) + M\ (θ2 , ψc )(ω i ) = 21 (M \ (θ2 , ψa ) + M\ (θ2 , ψb ) + M\ (θ2 , ψc ))(ω i ). (98) Since M\ (θ2 , ψa )+M\ (θ2 , ψb )+M\ (θ2 , ψc ) is a supercharacter for B, we see that θ2 is constant on K. Finally, let K = {a, b, c}. ψa + ψb + ψc takes the constant value of −1 on K. θ1 is constant on K, taking the value equal to the number of irreducible characters which are summands of θ1 which may be expressed as | [χ] | if χ is a summand of θ1 . We have θ2 (a) = |M (θ2 , ψa )| − |M (θ2 , ψb )| − |M (θ2 , ψc )|, (99) θ2 (b) = −|M (θ2 , ψa )| + |M (θ2 , ψb )| − |M (θ2 , ψc )|, (100) θ2 (c) = −|M (θ2 , ψa )| − |M (θ2 , ψb )| + |M (θ2 , ψc )|. (101) Since |M (θ2 , ψa )| = |M (θ2 , ψb )| = |M (θ2 , ψc )|, we see that θ2 is constant on K. Hence we conclude that all potential supercharacters are constant on all potential superclasses, so the partition KB ∪ TK ∪ {{a, b, c}} is indeed a set of superclasses for a supercharacter theory of Cp × C2 × C2 . As in Case 3 we have presented a direct proof for the sufficient direction. However, such a supercharacter theory can be generated by a group of automorphisms in a similar fashion to Case 3. Let A be a supercharacter theory satisfying the conditions of the sufficient direction above, which is not a direct product supercharacter theory. There exists a φ0 ∈ Aut(hωi) such that hφ0 i generates the supercharacter theory A|hωi . Let φ ∈ Aut(G) be defined by φ(ω) = φ0 (ω) and φ|ha,bi = id. Let ψ ∈ Aut(G) be given by ψ(ω) = ω, ψ(a) = b, ψ(b) = c, and ψ(c) = a. Then by an analogous argument as in Case 3, we see that hφ ◦ ψi generates A. For supercharacter theories generated by automorphisms as above, see Examples 9.2 and 9.3. 7 Case (C2)3 To complete our proof, we will now discuss the supercharacter theories of C2 × C2 × C2 = hxi × hyi × hzi. We first note that there are 5 supercharacter theories for C2 × C2 : the minimal supercharacter theory, the maximal supercharacter theory, and 3 isomorphic to the supercharacter theory with superclasses {e}, {x}, {y, xy}. (102) Let A be a nontrivial supercharacter theory for (C2 )3 . For this group we cannot use Theorem 3.2 to show that there must exist a proper nontrivial subgroup H such that b ∈ A. So we begin by supposing there is no such H. Because A is nontrivial, no H superclass has size 7. Since every element other than the identity has order 2, the only superclass which can have size 1 is {e}. By considering the complement, this implies that no superclass has size 6. We have for {u, v} a superclass (u + v)2 = 2e + 2uv ∈ A. (103) This implies that {uv} is a superclass, so we cannot have a superclass of size 2. Hence we cannot have a superclass of size 5, again by considering complements. This leaves only a 22 superclass of size 3 and a superclass of size 4 as a valid option. If {u, v, w} is the superclass of size 3, then by assumption {e, u, v, w} is not a subgroup. Therefore {u, v, w} is disjoint from {uv, uw, vw}. We have (u + v + w)2 = 3e + 2(uv + uw + vw) ∈ A. (104) Hence {uv, uw, vw} is a union of superclasses and is different from {u, v, w} which is a contradiction. Therefore we see that for every nontrivial supercharacter theory of (C2 )3 b ∈ A. there exists a proper nontrivial subgroup H such that H There are only two isomorphism types for H, either H ∼ = C2 × C2 or H ∼ = C2 . Suppose ∼ b ∈ A, and without loss of generality let that there is at least one H = C2 × C2 such that H H = hx, yi. We consider the possible partitions of the complement of H, {z, xz, yz, xyz}. If {z, xz, yz, xyz} is a superclass then the supercharacter theory is a wedge product of the supercharacter theory of H and the unique supercharacter theory of (C2 )3 /H ∼ = C2 . Such 3 a supercharacter theory of (C2 ) exists for every supercharacter theory of H, and the set of superclasses is KA|H ∪ {{z, xz, yz, xyz}}. (105) If the partition of {z, xz, yz, xyz} contains a singleton, then there exists a subgroup H ′ ∼ = c′ ∈ A and H ∩ H ′ = {e}. By Lemma 6.5 we have that A must be the direct C2 with H product of the supercharacter theories of H and H ′ . The only remaining possible partition of {z, xz, yz, xyz} is two pairs, let them be {t, u} and {v, w}. We note that tu = vw ∈ H, without loss of generality let tu = vw = x. Then A|H is either the minimal supercharacter theory of H or {{e}, {x}, {y, z}}. If it is the minimal supercharacter theory of H, then it is in fact a direct product supercharacter theory of ht, ui and hyi, so we have already accounted for this situation. If the supercharacter theory of H is {{e}, {x}, {y, z}}, then we see that every superclass disjoint from hxi is a hxi-coset, so A is the wedge product of the unique supercharacter theory of hxi and the minimal supercharacter theory of (C2 )3 /hxi ∼ = C2 × C2 . b ∈ A. We now consider the case where there does not exist an H ∼ = C2 × C2 with H c′ ∈ A. If there is a singleton superclass {u} different There must exist H ′ ∼ = C2 with H ′ ′ × hui ∼ ′ × hui ∈ A which contradicts from {e} and H 6= hui, then H\ = C2 × C2 and H\ ′ our assumption. Hence H is the only proper nontrivial subgroup which is a union of superclasses. We determine how many possibilities there are for A by considering the dual supercharacter theory of A, which we will denote by B. There is exactly one proper b ∈ B, and H ∼ nontrivial subgroup H such that H = C2 × C2 . Hence B|H is the maximal supercharacter theory, and by the above argument, the complement of H is a superclass. Hence there is only one isomorphism type for B and so there is only one isomorphism type for A. A must be the wedge product of the supercharacter theory of H ′ and the maximal supercharacter theory of (C2 )3 /H ′ ∼ = C2 × C2 . This completes the proof of Theorem 3.1, as we have considered every case. 23 8 Enumeration of the Supercharacter Theories of Cp ×C2 ×C2 for p odd We will now determine the number of supercharacter theories of Cp ×C2 ×C2 when p is odd, and how many can be obtained by each of the three constructions. Working through the argument provides a method for constructing the complete set of supercharacter theories for a particular choice of p. We will let D(n) equal the number of positive integers that divide n. Lemma 8.1. Let G be a finite group with a complementary pair H, N , and let A be a supercharacter theory for G such that A is the direct product supercharacter theory of A|H and A|N . Then A is generated by automorphisms iff A|H and A|N are both generated by automorphisms. Proof. Since H and N are a complementary pair, G ∼ = H × N . Clearly if A is generated by b ∈ A, then A|K is generated by automorphisms and K is a normal subgroup such that K automorphisms. Hence A|H and A|N are both generated by automorphisms by restriction. Conversely, suppose that there exists H ′ ≤ Aut(H) and N ′ ≤ Aut(N ) such that H ′ and N ′ generate the supercharacter theories A|H and A|N respectively. H ′ includes into Aut(G) by acting trivially on N ≤ G, and similarly N ′ includes into Aut(G) by acting trivially on H ≤ G. Then the subgroup of Aut(G) generated by the images of H ′ and N ′ generates A. Lemma 8.2. If p is an odd prime, then there are 3D(p − 1) + 1 supercharacter theories of Cp × C2 . Further a supercharacter theory of Cp × C2 is generated by automorphisms iff it is a direct product supercharacter theory. Proof. Let Cp × C2 = hωi × hai. Since Cp × C2 ∼ = C2p is cyclic, by [LM96, Th. 3.7] every nonmaximal supercharacter theory can be constructed as a wedge product, a direct product, or is generated by automorphisms. Since p and 2 are relatively prime, it is clear c ∈ A and hai c ∈ A. By Lemma 6.5 A must that if A is generated by automorphisms, hωi be a refinement of the direct product supercharacter theory of A|hωi and A|hai . Since a ∈ A, we see that A must be the direct product supercharacter theory. Conversely, if c ∈ A and hai c ∈ A. By Lemma 6.1 A is a direct product supercharacter theory, then hωi every supercharacter theory of hωi and hai is generated by automorphisms. Therefore by Lemma 8.1 A is generated by automorphisms. The direct product supercharacter theories are in bijection with the supercharacter theories of hωi, and by Lemma 6.1 there are D(p − 1) of them. There are 2D(p − 1) wedge products, D(p − 1) where hωi is the normal group and D(p − 1) where hωi is the quotient group. The only other supercharacter theory is the maximal supercharacter theory, hence Cp × C2 has 3D(p − 1) + 1 supercharacter theories. Lemma 8.3. [Hen09, Lemma 8.1] Let N and H be proper nontrivial normal subgroups of G. If a supercharacter theory of G can be constructed as a wedge product of supercharacter theories for N and G/N and also as a wedge product of supercharacter theories of H and G/H then N ≤ H or H ≤ N . 24 Theorem 8.1. Let p be an odd prime and let p − 1 = 2k 3ℓ n where n is not divisible by 2 or 3. Then the number of distinct supercharacter theories of Cp × C2 × C2 is 3kD(3ℓ n) + 2ℓD(2k n) + 30D(p − 1) + 13. (106) Further, we can enumerate the supercharacter theories by method of construction. There are 3kD(3ℓ n) + 2ℓD(2k n) + 5D(p − 1) supercharacter theories which can be generated by automorphisms, and 11D(p − 1) + 6 supercharacter theories which are direct products, including 5D(p − 1) which can also be generated by automorphisms. If a supercharacter theory is a wedge product, then it is not a direct product or generated by automorphisms. There are 19D(p − 1) + 6 supercharacter theories which are wedge products, and the only remaining supercharacter theory is the maximal supercharacter theory. Proof. By Theorem 3.1, every nonmaximal supercharacter theory of Cp × C2 × C2 is generated by automorphisms, a direct product, or a wedge product. We begin by considering all of the supercharacter theories generated by automorphisms. Every subgroup of Aut(Cp × C2 × C2 ) generates a supercharacter theory of Cp × C2 × C2 , although they are not all distinct. Also note that the minimal supercharacter theory is generated by the trivial subgroup of Aut(Cp × C2 × C2 ). Since Aut(Cp ) ∼ = Cp−1 , Aut(C2 × C2 ) ∼ = S3 , and p is odd we have that Aut(Cp × C2 × C2 ) ∼ = Aut(Cp ) × Aut(C2 × C2 ) ∼ = Cp−1 × S3 . (107) We will now consider all possible subgroups of Aut(Cp )×Aut(C2 ×C2 ). Let Aut(Cp ) = hψi, let A3 be the order three subgroup of Aut(C2 × C2 ) and for x ∈ {a, b, c} let Hx be the order two subgroup of Aut(C2 × C2 ) that fixes x. It follows from Goursat’s Lemma that every subgroup of G1 × G2 can be expressed as R = {(x, y) ∈ H1 × H2 |φ(xN1 ) = yN2 } (108) for a unique choice of N1 E H1 ≤ G1 , N2 E H2 ≤ G2 and an isomorphism φ : H1 /N1 → H2 /N2 , and every such choice gives a subgroup. Let N1 E H1 ≤ Aut(Cp ) and N2 E H2 ≤ Aut(C2 × C2 ). We have Aut(Cp ) ∼ = C2k × C3ℓ × Cn where n is not divisible by 2 or 3. H2 /N2 is isomorphic to the trivial group, C2 , or C3 . Case I: If H2 /N2 ∼ = {e}, then H1 = N1 and H2 = N2 . There is only one choice for φ, so it is easy to see that in this case the subgroup R is the direct product H1 × H2 . Every choice of H1 gives a distinct supercharacter theory of hωi, so there are D(p − 1) choices for H1 . However, Aut(C2 × C2 ) and A3 ≤ Aut(C2 × C2 ) both generate the maximal supercharacter theory of C2 × C2 . We then observe that there are five choices for H2 . Hence there are 5D(p − 1) possibilities. Case II: There are four ways for H2 /N2 ∼ = C2 : H2 = Aut(C2 × C2 ) and N2 = A3 , or H2 is Ha , Hb , or Hc and N2 = {e}. We have H1 = hψ m i and N1 = hψ 2m i where m|p − 1 and (p − 1)/m is even. There is only one choice for φ. If H2 = Aut(C2 × C2 ) and N2 = A3 then (id, σ) and (id, σ 2 ) are elements of the subgroup R where σ(a) = b, σ(b) = c, σ(c) = a. We see that the supercharacter theory generated by this subgroup R is the same one generated by the subgroup for H1′ = N1′ = H1 , H2′ = N2′ = A3 , which is hψ m i × hσi. Hence this supercharacter theory has already been constructed above. 25 So we will only consider H2 = Hx and N2 = {id}. There is only one choice for φ so the resulting subgroup R is hψ m ◦ τ i ∼ = C(p−1)/m , where Hx = hτ i. There are three choices ℓ for H2 , kD(3 n) choices for H1 , and one choice for N1 , which gives 3kD(3ℓ n) new contributions. Note that supercharacter theories of this form correspond to the supercharacter theories in Case 3 of Theorem 3.1 which are not direct products. See also Example 9.1. Case III: When H2 /N2 ∼ = C3 , we must have H2 = A3 and N2 = {e}. Then H1 = hψ m i, 3m N1 = hψ i where m|(p − 1) and 3 divides (p − 1)/m. There are ℓD(2k n) possibilities for H1 , a unique N1 and two choices for φ which yields 2ℓD(2k n) subgroups R = hψ m ◦ σφ i ∼ = C(p−1)/m where φ(ψ m N1 ) = σφ . Note that supercharacter theories of this form correspond to the supercharacter theories in Case 4 of Theorem 3.1 which are not direct products. See Examples 9.2, 9.3. We conclude that there are 3kD(3ℓ n) + 2ℓD(2k n) + 5D(p − 1) supercharacter theories generated by automorphisms. We now consider the supercharacter theories which are direct products. By Lemma 8.1, we see that some direct product supercharacter theories of Cp × C2 × C2 can be generated by automorphisms. In particular, by Lemma 6.1 every supercharacter theory of Cp is generated by automorphisms, and it is easy to see that every supercharacter theory of C2 × C2 is also generated by automorphisms. Hence we have already constructed the 5D(p − 1) direct product supercharacter theories of Cp × C2 × C2 with the complementary pair Cp , C2 × C2 . The other complementary pair to be considered is Cp × C2 , C2 . Let x, y be distinct elements of {a, b, c} and let Cp × C2 = hω, xi, and C2 = hyi. Note that if a supercharacter theory A can be expressed as the direct product for the complementry pair hω, xi, hyi then it is also a direct product for the complementary pair hωi, hx, yi iff A|hω,xi is a direct product supercharacter theory. Therefore we want A|hω,xi to not be a direct product. Hence we need to count the supercharacter theories A which are direct products of A|hω,xi and A|hyi such that A|hω,xi must be a wedge product with hωi normal, a wedge product with hxi normal, or the maximal supercharacter theory. There are six choices for the pair x, y. In the case of hωi normal there are D(p − 1) choices for the supercharacter theory A|hωi , and given y either choice of x yields the same supercharacter theory so there are 3D(p − 1) possibilities. Similarly, for hxi normal there are D(p − 1) supercharacter theories for the quotient, and either choice of y yields the same supercharacter theory so there are 3D(p − 1) possibilities. For the maximal case, all six choices of x, y give distinct supercharacter theories. Hence there are 6D(p − 1) + 6 direct product supercharacter theories of Cp × C2 × C2 which cannot be generated by automorphisms. We now consider the wedge products. First note that if A is a wedge product, there does not exist a complementary pair of subgroups such that both are unions of superclasses of A. Hence A cannot be either a direct product supercharacter theory or generated by automorphisms. If A is a wedge product of the supercharacter theories of a normal subgroup N and G/N , then N is isomorphic to one of C2 , C2 × C2 , Cp , or C2 × Cp . We will avoid constructing a supercharacter theory more than once by using Lemma 8.3. We begin with all wedge products with N ∼ = Cp . There is only one subgroup isomorphic to Cp , so N = hωi. There are D(p − 1) supercharacter theories of N , and five supercharacter theories of the quotient, hence there are 5D(p − 1) such supercharacter theories. Now we consider all wedge products with N ∼ = C2 . There are three possibilities for N : hai, hbi, and hci. N has only 1 supercharacter theory, and by Lemma 8.2 the quotient has 26 3D(p − 1) + 1 supercharacter theories. Hence there are 3(3D(p − 1) + 1) wedge products with N ∼ = C2 normal. We now want to count the wedge products with N ∼ = C2 × C2 which are not also wedge ′ ∼ products of supercharacter theories of N = C2 and G/N ′ . We have N = {e, a, b, c}. It is easy to check that a supercharacter theory A of Cp × C2 × C2 is a wedge product for both N and N ′ iff the dimension of A|N is three. Hence A|N must be either the minimal supercharacter theory, or the maximal supercharacter theory. By Lemma 6.1 there are D(p − 1) supercharacter theories for the quotient, hence we have 2D(p − 1) supercharacter theories. Finally, we count the wedge products where N ∼ = Cp ×C2 which are not wedge products ′′ ′ ∼ ∼ for N = Cp or N = C2 . If A is a wedge product for Cp or C2 then A|N is a wedge product for Cp or C2 respectively. Hence A|N must be either a direct product supercharacter theory or the maximal supercharacter theory, so there are D(p − 1) + 1 choices for A|N . There is only one choice for the supercharacter theory of the quotient, and three choices for N : hω, ai, hω, bi, or hω, ci. Hence there are 3(D(p − 1) + 1) such supercharacter theories. We conclude that there are 19D(p − 1) + 6 wedge products. Adding to this the supercharacter theories generated by automorphisms, the direct product supercharacter theories which are not generated by automorphisms, and the maximal supercharacter theory we see that there are 3kD(3ℓ n) + 2ℓD(2k n) + 30D(p − 1) + 13 supercharacter theories for Cp × C2 × C2 . 9 Examples Example 9.1. Let p = 5. Let φ, ψ be automorphisms of C5 ×C2 ×C2 defined by φ(ω) = ω 2 , φ(a) = a, φ(b) = b, φ(c) = c, and ψ(ω) = ω, ψ(a) = a, ψ(b) = c, ψ(c) = b. Then the supercharacter theory generated by the group hφ ◦ ψi has the following superclasses: {e}, {ω, ω 2 , ω 3 , ω 4 }, (109) {a}, {b, c}, (110) 2 3 4 {ωa, ω a, ω a, ω a}, (111) {ωb, ω 4 b, ω 2 c, ω 3 c}, {ω 2 b, ω 3 b, ωc, ω 4 c}. (112) For K = [ωb] we have M (K, b) = {ω, ω 4 } and M (K, c) = {ω 2 , ω 3 }. We see that {e}, {ω, ω 4 }, {ω 2 , ω 3 } are the superclasses of the supercharacter theory of hωi generated by the group hφ2 |hωi i and that φ2 (ω) = ω −1 . Example 9.2. Let p = 7. {{e}, {ω, ω 2 , ω 4 }, {ω 3 , ω 5 , ω 6 }} is the set of superclasses for the supercharacter theory of C7 generated by hφ0 i where φ0 (ω) = ω 2 . Let φ, ψ ∈ Aut(C7 × C2 × C2 ) be defined by φ(ω) = ω 2 , φ(a) = a, and φ(b) = b, φ(c) = c, and ψ(ω) = ω, ψ(a) = b, ψ(b) = c, ψ(c) = a. Then hφ ◦ ψi generates the supercharacter theory with superclasses: {e}, {ω, ω 2 , ω 4 }, {ω 3 , ω 5 , ω 6 }, (113) {a, b, c}, 27 (114) {ωa, ω 2 b, ω 4 c}, {ω 2 a, ω 4 b, ωc}, {ω 6 a, ω 5 b, ω 3 c}, (115) {ω 5 a, ω 3 b, ω 6 c}, {ω 3 a, ω 6 b, ω 5 c}, {ω 4 a, ωb, ω 2 c}. (116) Note that the supercharacter theory generated by hφ ◦ ψ −1 i is {e}, {ω, ω 2 , ω 4 }, {ω 3 , ω 5 , ω 6 }, (117) {a, b, c}, (118) {ωa, ω 2 c, ω 4 b}, {ω 2 a, ω 4 c, ωb}, {ω 6 a, ω 5 c, ω 3 b}, (119) {ω 5 a, ω 3 c, ω 6 b}, {ω 3 a, ω 6 c, ω 5 b}, {ω 4 a, ωc, ω 2 b}. (120) These supercharacter theories differ according to the 2 possibilities described in Equations (92) and (93), and also the different choices for the isomorphism in Equation (108). Example 9.3. Let ψ be defined as above and let σ ∈ Aut(C7 × C2 × C2 ) be defined by σ(ω) = ω 5 , σ(a) = a, σ(b) = b, and σ(c) = c. Then hσ ◦ ψi generates the following supercharacter theory: {e}, {ω, ω 2 , ω 3 , ω 4 , ω 5 , ω 6 }, (121) {a, b, c}, (122) {ωa, ω 6 a, ω 2 b, ω 5 b, ω 3 c, ω 4 c}, (123) {ω 2 a, ω 5 a, ω 3 b, ω 4 b, ωc, ω 6 c}, (124) {ω 3 a, ω 4 a, ωb, ω 6 b, ω 2 c, ω 5 c}. (125) References [DI08] Persi Diaconis and I. M. Isaacs. Supercharacters and superclasses for algebra groups. Transactions of the American Mathematical Society, 360(5):2359–2392, 2008. [EKP16] Sergei Evdokimov, István Kovács, and Ilya Ponomarenko. On Schurity of Finite Abelian Groups. Communications in Algebra, 44(1):101–117, 2016. [EP14] Sergei Evdokimov and Ilia Ponomarenko. Schur rings over a product of Galois rings. Beiträge zur Algebra und Geometrie / Contributions to Algebra and Geometry, 55(1):105–138, 2014. [Hen08] Anders O. F. Hendrickson. Supercharacter theories of cyclic p-groups. PhD thesis, University of Wisconsin-Madison, 2008. [Hen09] Anders O. F. Hendrickson. Construction of supercharacter theories of finite groups. arXiv:math.GR/0905.3538v1, 2009. [Hen10] Anders O. F. Hendrickson. Supercharacter theories and Schur rings. arXiv:math.GR/1006.1363v1, 2010. 28 [LM96] Ka Hin Leung and Shing Hing Man. On Schur Rings over Cyclic Groups, II. Journal of Algebra, 183(2):273–285, 1996. [LM98] Ka Hin Leung and Shing Hing Man. On schur rings over cyclic groups. Israel Journal of Mathematics, 106(1):251–267, 1998. [Wie64] Helmut Wielandt. Finite Permutation Groups. Academic Press, 1964. Department of Mathematics, University of California, Davis, One Shields Avenue, Davis, CA 95616-8633 E-mail address: [email protected] 29
4math.GR
Binary Search in Graphs Revisited Argyrios Deligkas∗ George B. Mertzios† Paul G. Spirakis‡ arXiv:1702.08899v1 [cs.DS] 28 Feb 2017 Abstract In the classical binary search in a path the aim is to detect an unknown target by asking as few queries as possible, where each query reveals the direction to the target. This binary search algorithm has been recently extended by [Emamjomeh-Zadeh et al., STOC, 2016] to the problem of detecting a target in an arbitrary graph. Similarly to the classical case in the path, the algorithm of Emamjomeh-Zadeh et al. maintains a candidates’ set for the target, while each query asks an appropriately chosen vertex– the “median”–which minimises a potential Φ among the vertices of the candidates’ set. In this paper we address three open questions posed by Emamjomeh-Zadeh et al., namely (a) detecting a target when the query response is a direction to an approximately shortest path to the target, (b) detecting a target when querying a vertex that is an approximate median of the current candidates’ set (instead of an exact one), and (c) detecting multiple targets, for which to the best of our knowledge no progress has been made so far. We resolve questions (a) and (b) by providing appropriate upper and lower bounds, as well as a new potential Γ that guarantees efficient target detection even by querying an approximate median each time. With respect to (c), we initiate a systematic study for detecting two targets in graphs and we identify sufficient conditions on the queries that allow for strong (linear) lower bounds and strong (polylogarithmic) upper bounds for the number of queries. All of our positive results can be derived using our new potential Γ that allows querying approximate medians. Keywords: binary search, graph, approximate query, probabilistic algorithm, lower bound. 1 Introduction The classical binary search algorithm detects an unknown target (or “treasure”) t on a path with n vertices by asking at most log n queries to an oracle which always returns the direction from the queried vertex to t. To achieve this upper bound on the number of queries, the algorithm maintains a set of candidates for the place of t; this set is always a sub-path, and initially it is the whole path. Then, at every iteration, the algorithm queries the middle vertex (“median”) of this candidates’ set and, using the response of the query, it excludes either the left or the right half of the set. This way of searching for a target in a path ∗ Faculty of Industrial Engineering and Management, Technion, Israel. Email: [email protected] † School of Engineering and Computing Sciences, Durham University, UK. Email: [email protected] ‡ Department of Computer Science, University of Liverpool, UK. Email: [email protected] 1 can be naturally extended to the case where t lies on an n-vertex tree, again by asking at most log n queries that reveal the direction in the (unique) path to t [21]. The principle of the binary search algorithm on trees is based on the same idea as in the case of a path: for every tree there exists a separator vertex such that each of its subtrees contains at most half of the vertices of the tree [13], which can be also efficiently computed. Due to its prevalent nature in numerous applications, the problem of detecting an unknown target in an arbitrary graph or, more generally in a search space, has attracted many research attempts from different viewpoints. Only recently the binary search algorithm with log n direction queries has been extended to arbitrary graphs by Emamjomeh-Zadeh et al. [9]. In this case there may exist multiple paths, or even multiple shortest paths form the queried vertex to t. The direction query considered in [9] either returns that the queried vertex q is the sought target t, or it returns an arbitrary direction from q to t, i.e. an arbitrary edge incident to q which lies on a shortest path from q to t. The main idea of this algorithm follows again the same principle as for paths and trees: it always queries a vertex that is the “median” of the current candidates’ set and any response to the query is enough to shrink the size of the candidates’ set by a factor of at least 2. Defining what the “median” is in the case of general graphs now becomes more tricky: Emamjomeh-Zadeh et al. [9] define the median of a set S as the vertex q that minimizes a potential function Φ, namely the sum of the distances from q to all vertices of S. Apart from searching for upper bounds on the number of queries needed to detect a target t in graphs, another point of interest is to derive algorithms which, given a graph G, compute the optimal number of queries needed to detect an unknown target in G (in the worst case). This line of research was initiated in [17] where the authors studied directed acyclic graphs (DAGs). Although computing a query-optimal algorithm is known to be NP-hard on general graphs [4, 7, 15], there exist efficient algorithms for trees; after a sequence of papers [1, 12, 16, 18, 25], linear time algorithms were found in [18, 21]. Different models with queries of non-uniform costs or with a probability distribution over the target locations were studied in [5, 6, 14]. A different line of research is to search for upper bounds and informationtheoretic bounds on the number of queries needed to detect a target t, assuming that the queries incorporate some degree of “noise”. In one of the variations of this model [2, 9, 10], each query independently returns with probability p > 12 a direction to a shortest path from the queried vertex q to the target, and with probability 1 − p an arbitrary edge (possibly adversarially chosen) incident to q. The study of this problem was initiated in [10], where Ω(log n) and O(log n) bounds on the number of queries were established for a path with n vertices. This information-theoretic lower bound of [10] was matched by an improved upper bound in [2]. The same matching bound was extended to general graphs in [9]. In a further “noisy” variation of binary search, every vertex v of the graph is assigned a fixed edge incident to v (also called the “advice” at v). Then, for a fraction p > 21 of the vertices, the advice directs to a shortest path towards t, while for the rest of the vertices the advice is arbitrary, i.e. potentially misleading or adversarially chosen [3]. This problem setting is motivated by the situation of a tourist driving a car in an unknown country that was hit by a hurricane which resulted in some fraction of road-signs being turned in an arbitrary and 2 unrecognizable way. The question now becomes whether it is still possible to navigate through such a disturbed and misleading environment and to detect the unknown target by asking only few queries (i.e. taking advice only from a few road-signs). It turns out that, apart from its obvious relevance to data structure search, this problem also appears in artificial intelligence as it can model searching using unreliable heuristics [3, 19, 22]. Moreover this problem also finds applications outside computer science, such as in navigation issues in the context of collaborative transport by ants [11]. Another way of incorporating some “noise” in the query responses, while trying to detect a target, is to have multiple targets hidden in the graph. Even if there exist only two unknown targets t1 and t2 , the response of each query is potentially confusing even if every query correctly directs to a shortest path from the queried vertex to one of the targets. The reason of confusion is that now a detecting algorithm does not know to which of the hidden targets each query directs. In the context of the above example of a tourist driving a car in an unknown country, imagine there are two main football teams, each having its own stadium. A fraction 0 < p1 < 1 of the population supports the first team and a fraction p2 = 1 − p1 the second one, while the supporters of each team are evenly distributed across the country. The driver can now ask questions of the type “where is the football stadium?” to random local people along the way, in an attempt to visit both stadiums. Although every response will be honest, the driver can never be sure which of the two stadiums the local person meant. Can the tourist still detect both stadiums quickly enough? To the best of our knowledge the problem of detecting multiple targets in graphs has not been studied so far; this is one of the main topics of the present paper. The problem of detecting a target within a graph can be seen as a special case of a two-player game introduced by Renyi [24] and rediscovered by Ulam [26]. This game does not necessarily involve graphs: the first player seeks to detect an element known to the second player in some search space with n elements. To this end, the first player may ask arbitrary yes/no questions and the second player replies to them honestly or not (according to the details of each specific model). Pelc [23] gives a detailed taxonomy for this kind of games. Group testing is a sub-category of these games, where the aim is to detect all unknown objects in a search space (not necessarily a graph) [8]. Thus, group testing is related to the problem of detecting multiple targets in graphs, which we study in this paper. 1.1 Our contribution In this paper we systematically investigate the problem of detecting one or multiple hidden targets in a graph. Our work is driven by the open questions posed by the recent paper of Emamjomeh-Zadeh et al. [9] which dealt with the detection of a single target with and without “noise”. More specifically, Emamjomeh-Zadeh et al. [9] asked for further fundamental generalizations of the model which would be of interest, namely (a) detecting a single target when the query response is a direction to an approximately shortest path, (b) detecting a single target when querying a vertex that is an approximate median of the current candidates’ set S (instead of an exact one), and (c) detecting multiple targets, for which to the best of our knowledge no progress has been made so far. 3 We resolve question (a) in Section 2.1 by proving that any algorithm requires Ω(n) queries to detect a single target t, assuming that a query directs to a path with an approximately shortest length to t. Our results hold essentially for any approximation guarantee, i.e. for 1-additive and for (1 + ε)-multiplicative approximations. Regarding question (b), we first prove in Section √ 2.2 that, for any constant 0 < ε < 1, the algorithm of [9] requires at least Ω( n) queries when we query each time an (1 + ε)-approximate median (i.e. an (1 + ε)-approximate minimizer of the potential Φ over the candidates’ set S). Second, to resolve this lower bound, we introduce in Section 2.3 a new potential Γ. This new potential can be efficiently computed and, in addition, guarantees that, for any constant 0 ≤ ε < 1, the target t can be detected in O(log n) queries even when an (1 + ε)-approximate median (with respect to Γ) is queried each time. Regarding question (c), we initiate in Section 3 the study for detecting multiple targets on graphs by focusing mainly to the case of two targets t1 and t2 . We assume throughout that every query provides a correct answer, in the sense that it always returns a direction to a shortest path from the queried vertex either to t1 or to t2 . The “noise” in this case is that the algorithm does not know whether a query is returning a direction to t1 or to t2 . Initially we observe in Section 3 that any algorithm requires n2 − 1 (resp. n − 2) queries in the worst case to detect one target (resp. both targets) if each query directs adversarially to one of the two targets. Hence, in the remainder of Section 3, we consider the case where each query independently directs to the first target t1 with a constant probability p1 and to the second target t2 with probability p2 = 1 − p1 . For the case of trees, we prove in Section 3 that both targets can be detected with high probability within O(log n) queries. For general graphs, we distinguish between biased queries (p1 > p2 ) in Section 3.1 and unbiased queries (p1 = p2 = 21 ) in Section 3.2. For biased queries, we observe that we can utilize the algorithm of Emamjomeh-Zadeh et al. [9] to detect the first target t1 with high probability in O(log n) queries; this can be done by considering the queries that direct to t2 as “noise”. Thus our objective becomes to detect the target t2 in a polylogarithmic number of queries. Notice here that we cannot apply the “noisy” framework of [9] to detect the second target t2 , since now the “noise” is larger than 12 . We derive a probabilistic algorithm that overcomes this problem and detects the target t2 with high probability in O(∆ log2 n) queries, where ∆ is the maximum degree of a vertex in the graph. Thus, whenever ∆ = O(poly log n), a polylogarithmic number of queries suffices to detect t2 . In contrast, we prove in Section 3.2 that, for unbiased queries, any deterministic (possibly adaptive) algorithm that detects at least one of the targets requires at least n2 − 1 queries, even in an unweighted cycle. Extending this lower bound for two targets, we prove that, assuming 2c ≥ 2 different targets and unbiased queries, any deterministic (possibly adaptive) algorithm requires at least n2 − c queries to detect one of the targets. Departing from the fact that our best upper bound on the number of biased queries in Section 3.1 is not polylogarithmic when the maximum degree ∆ is not polylogarithmic, we investigate in Section 4 several variations of queries that provide more informative responses. In Section 4.1 we turn our attention to “direction-distance” biased queries which return with probability pi both the direction to a shortest path to ti and the distance between the queried vertex 4 and ti . In Section 4.2 we consider another type of a biased query which combines the classical “direction” query and an edge-variation of it. For both query types of Sections 4.1 and 4.2 we prove that the second target t2 can be detected with high probability in O(log3 n) queries. Furthermore, in Sections 4.3 and 4.4 we investigate two further generalizations of the “direction” query which make the target detection problem trivially hard and trivially easy to solve, respectively. 1.2 Our Model and Notation We consider connected, simple, and undirected graphs. A graph G = (V, E), where |V | = n, is given along with a weight function w : E → R+ on its edges; if w(e) = 1 for every e ∈ E then G is unweighted. An edge between two vertices v and u of G is denoted by vu, and in this case v and u are said to be adjacent. The distance d(v, u) between vertices v and u is the length of a shortest path between v and u with respect to the weight function w. Since the graphs we consider are undirected, d(u, v) = d(v, u) for every pair of vertices v, u. Unless specified otherwise, all logarithms are taken with base 2. Whenever an event happens with probability at least 1 − n1α for some α > 0, we say that it happens with high probability. The neighborhood of a vertex v ∈ V is the set N (v) = {u ∈ V : vu ∈ E} of its adjacent vertices. The cardinality of N (v) is the degree deg(v) of v. The maximum degree among all vertices in G is denoted by ∆(G), i.e. ∆(G) = max{deg(v) : v ∈ V }. For two vertices v and u ∈ N (v) we denote by N (v, u) = {x ∈ V : d(v, x) = w(vu) + d(u, x)} the set of vertices x ∈ V for which there exists a shortest path from v to x, starting with the edge vu. Note that, in general, N (u, v) 6= N (v, u). Let T = {t1 , t2 , · · · , t|T | } ⊆ V be a set of (initially unknown) target vertices. A direction query (or simply query) at vertex v ∈ V returns with probability pi a neighbor u ∈ N (v) such that ti ∈ N (u, v), where P|T | i=1 pi = 1. If there exist more than one such vertices u ∈ N (v) leading to ti via a shortest path, the direction query returns an arbitrary one among them, i.e. possibly chosen adversarially, unless specified otherwise. Moreover, if the queried vertex v is equal to one of the targets ti ∈ T , this is revealed by the query with probability pi . 2 Detecting a Unique Target In this section we consider the case where there is only one unknown target t = t1 , i.e. T = {t}. In this case the direction query at vertex v always returns a neighbor u ∈ N (v) such that t ∈ N (u, v). For this problem setting, Emamjomeh-Zadeh et al. [9] provided a polynomial-time algorithm which detects the target t in at most log n direction queries. During its execution, the algorithm of [9] maintains a “candidates’ set” S ⊆ V such that always t ∈ S, where initially S = V . At every iteration the algorithm computes in polynomial time a vertex v (called the median of S) which minimizes a potential ΦS (v) among all vertices of the current set S. Then it queries a median v of S and it reduces the candidates’ set S to S ∩ N (v, u), where u is the vertex returned by the direction query at v. The upper bound log n of the number of queries in this algorithm follows by the fact that always |S ∩ N (v, u)| ≤ |S| 2 , whenever v is the median of S. 5 2.1 Bounds for Approximately Shortest Paths We provide lower bounds for both additive and multiplicative approximation queries. A c-additive approximation query at vertex v ∈ V returns a neighbor u ∈ N (v) such that w(vu) + d(u, t) ≤ d(v, t) + c. Similarly, an (1 + ε)multiplicative approximation query at vertex v ∈ V returns a neighbor u ∈ N (v) such that w(vu) + d(u, t) ≤ (1 + ε) · d(v, t). It is not hard to see that in the unweighted clique with n vertices any algorithm requires in worst case n − 1 1-additive approximation queries to detect the target t. Indeed, in this case d(v, t) = 1 for every vertex v 6= t, while every vertex u ∈ / {v, t} is a valid response of an 1-additive approximation query at v. Since in the case of the unweighted clique an additive 1-approximation is the same as a multiplicative 2-approximation of the shortest path, it remains unclear whether 1-additive approximation queries allow more efficient algorithms for graphs with large diameter. In the next theorem we strengthen this result to graphs with unbounded diameter. Theorem 1 Assuming 1-additive approximation queries, any algorithm requires at least n − 1 queries to detect the target t, even in graphs with unbounded diameter. Proof. To prove the theorem we will construct a graph and a strategy for the adversary such that any algorithm will need n − 1 queries to locate the target t. Consider a horizontal 2 × n2 grid graph where we add the two diagonals in every cell of the grid. Formally, the graph has n2 “top” vertices v1 , . . . , v n2 and n2 “bottom” vertices u1 , . . . , u n2 . For every i ∈ {1, 2, . . . , n2 − 1} we have the edges vi vi+1 , ui ui+1 , vi ui , vi+1 ui+1 , vi ui+1 , vi+1 ui . The strategy of the adversary is as follows. If the algorithm queries a top vertex vi , then the query returns the bottom vertex ui . Similarly, if the algorithm queries a bottom vertex ui , then the query returns the top vertex vi . Observe that, in every case, the query answer lies on a path of length at most one more than a shortest path from the queried vertex and the target t. To see this assume that the algorithm queries a top vertex vi ; the case where the queried vertex is a bottom vertex ui is symmetric. If t = ui , then the edge vi ui clearly lies on the shortest path between vi and t. If t = uj , where j 6= i, then the shortest path uses one of the diagonal edges incident to vi . In this case the edge vi ui leads to a path with length one more than the shortest one. Finally, if t = vj , where j 6= i, then the shortest path has length |j − i| and uses either the edge vi vi−1 or the edge vi vi+1 . In both cases the edge vi ui lies on the path from vi to T with length |j − i| + 1 which uses the edge vi ui and one of the diagonal edges ui+1 vi−1 and ui+1 vi+1 . Hence, after each query at a vertex different than t, the algorithm can not obtain any information about the position of t. Thus, in the worst case the algorithm needs to make n − 1 queries to detect t. In the next theorem we extend Theorem 1 by showing a lower bound of n · 4ε queries when we assume (1 + ε)-multiplicative approximation queries. Theorem 2 Let ε > 0. Assuming (1 + ε)-multiplicative approximation queries, any algorithm requires at least at least n · 4ε queries to detect the target t. 6 Proof. For the proof we use the same construction from Theorem 1, however the adversary we use here is slightly modified. Assume that the distance between the queried vertex and the target t is d. If d + 1 ≤ (1 + ε) · d, or equivalently, if d ≥ 1ε , the adversary can respond in the same way as in Theorem 1. Overall, the adversary proceeds as follows. Initially all vertices are unmarked. Whenever the algorithm queries a vertex vi (resp. ui ), the adversary marks the vertices {vj , uj : |j −i| < 1ε } in order to determine the query response. If at least one unmarked vertex remains in the graph, then the query returns (similarly to Theorem 1) vertex ui (resp. vi ). In this case the adversary can place the target t at any currently unmarked vertex. By doing so, the adversary ensures that the distance between t and any of the previously queried vertices is at least 1ε . If all vertices of the graph have been marked, then the adversary places the target t at one of the last marked vertices and in this case the query returns a vertex on the shortest path between t and the queried vertex. With the above strategy, any algorithm needs to continue querying vertices until there is no unmarked vertex left. Thus, since at every query the adversary marks at most 2/ε new vertices, any algorithm needs to perform at least n/2 2/ε = n · 4ε queries. 2.2 Lower Bound for querying the Approximate Median The potential ΦS : V → R+ of [9], where S ⊆ V , is defined as P follows. For any set S ⊆ V and any vertex v ∈ V , the potential of v is ΦS (v) = u∈S d(v, u). A vertex x ∈ V is an (1 + ε)-approximate minimizer for the potential Φ over a set S (i.e. an (1 + ε)-median of S) if ΦS (x) ≤ (1 + ε) minv∈V ΦS (v), where ε > 0. We prove that an algorithm querying at each √ iteration always an (1 + ε)-median of the current candidates’ set S needs Ω( n) queries. Theorem 3 Let ε > 0. If the algorithm of [9] queries at each √ iteration an (1 + ε)-median for the potential function Φ, then at least Ω( n) queries are required to detect the target t in a graph G with n vertices, even if the graph G is a tree. Proof. We will construct a graph G = (V, E) with n vertices such that √ Ω( n) queries are needed to locate the target. The graph G will be a tree with a unique vertex of degree greater than 2, i.e. G √ √ is a tree that resembles the structure of a star. Formally, G consists of n paths of length n each, where all these paths have a vertex v0 as a common endpoint. Let √ Pi = (v0 , vi,1 , vi,2 , . . . , vi,√n−1 , vi,√n ) be the ith path of G. For every i ≤ n denote by Qi = {vi,2 , vi,3 , . . . , vi,√n } be the v0 and S √ set of vertices of Pi without vi,1 . Furthermore, for every k ∈ {0, 1, . . . , n} define V−k = V \ ( 1≤i≤k Qi ) to be the set of vertices left in the graph by keeping only the first edge from each path Pi , where i ≤ k. Note by definition that V−0 = V . Having constructed the graph G we are now ready to prove the theorem. The target will be the vertex v0 . The main idea for the proof is as follows. At every iteration the central vertex v0 and all its neighbors, who have not yet been queried, are (1 + ε)-medians, while v0 is the exact median for the potential Φ 7 of [9]. For every k ∈ {0, 1, . . . , √ n} we have √ n X √ ΦV−k (v0 ) = k + ( n − k) j j=1 √ 1 √ = k + ( n − k)(n + n). 2 (1) Next we compute ΦV−k (vp,1 ) for every p > k. Note that d(vp,1 , vi,1 ) = 2 for Pk every i ≤ k, and thus i=1 d(vp,1 , vi,1 ) = 2k. Furthermore, for the vertices on the path Pp we have √ n−1 √ n X d(vp,1 , vp,i ) = i=2 X i=1 i= √ 1 (n − n). 2 Finally, for the remaining of the vertices in V−k (denote them by R) we have √ X u∈R n+1 X √ d(vp,1 , u) = 1 + ( n − k − 1) · j j=2 √ 1 √ = 1 + ( n − k − 1)(n + 3 n). 2 Therefore, it follows that √ √ 1 √ 1 ΦV−k (vp,1 ) = 2k + (n − n) + 1 + ( n − k − 1)(n + 3 n). 2 2 (2) Now note that, due to symmetry, v0 is the exact median of the vertex set V (with respect to the potential Φ of [9]), that is, ΦV (v0 ) = minx∈V {ΦV (x)}. √ Furthermore note by (1) and (2) that ΦV−k (vp,1 ) ≥ ΦV−k (v0 ) for every k < n. Moreover, due to symmetry this monotonicity of ΦV−k (·) is extended to all vertices vp,2 , vp,3 , . . . , vp,√n , that is, ΦV−k (vp,j ) ≥ ΦV−k (v0 ) for every 1 ≤ j ≤ √ n. Therefore√v0 remains the exact median of each of the vertex sets V−k , where 0 ≤ k < n. Let ε > 0. √Then (1) and (2) imply that ΦV−k (vp,1 ) ≤ (1 + ε)ΦV−k (v0 ) for every k < n and for large enough n. Now assume that the algorithm of [9] queries always an (1 + ε)-median of the candidates’ set S, where initially S = V . Then the algorithm may query always a different neighbor of v0 . Due to symmetry, we may assume without loss of generality that the algorithm queries the vertices v1,1 , v2,1 , . . . , v√n,1 in this order. Note that these vertices are (1+ε)medians of the candidates’ sets V−0 , V−1 , . . . , V−(√n−1) , respectively. Therefore √ the algorithm makes √ at least n queries, where the total number of vertices in the graph is n − n + 1. 2.3 Upper Bound for querying the Approximate Median In this section we introduce a new potential function ΓS : V → N for every S ⊆ V , which overcomes the problem occured in Section 2.2. This new potential guarantees efficient detection of t in at most O(log n) queries, even when we always query an (1 + ε)-median of the current candidates’ set S (with respect 8 to the new potential Γ), for any constant 0 < ε < 1. Our algorithm is based on the approach of [9], however we now query an approximate median of the current set S with respect to Γ (instead of an exact median with respect to Φ of [9]). Definition 1 ( Potential Γ ) Let S ⊆ V and v ∈ V . max{|N (v, u) ∩ S| : u ∈ N (v)}. Then ΓS (v) = Theorem 4 Let 0 ≤ ε < 1. There exists an efficient adaptive algorithm which log n queries, by querying at each iteration detects the target t in at most 1−log(1+ε) an (1 + ε)-median for the potential function Γ. Proof. Our proof closely follows the proof of Theorem 3 of [9]. Let S ⊆ V be an arbitrary set of vertices of G such that t ∈ S. We will show that there exists a vertex v ∈ V such that ΓS (v) ≤ |S| 2 . First recall the potential ΦS (v) = P d(v, x). Let now v ∈ V be a vertex such that ΦS (v0 ) is minimized, 0 x∈S i.e. ΦS (v0 ) ≤ ΦS (v) for every v ∈ V . Let u ∈ N (v0 ) be an arbitrary vertex + adjacent to v0 . We will prove that |N (v0 , u)∩S| ≤ |S| 2 . Denote S = N (v0 , u)∩S − + + and S = S \S . By definition, for every x ∈ S , the edge v0 u lies on a shortest path from v0 to x, and thus d(u, x) = d(v0 , x) − w(v0 u). On the other hand, trivially d(u, x) ≤ d(v0 , x) + w(v0 u) for every x ∈ S, and thus in particular for every x ∈ S − . Therefore ΦS (v0 ) ≤ ΦS (u) ≤ ΦS (v0 ) + (|S − | − |S + |) · w(v0 u), − + and thus |S + | ≤ |S − |. That is, |N (v0 , u) ∩ S| = |S + | ≤ |S| 2 , since S = S \ S . |S| Therefore which then implies that ΓS (v0 ) ≤ 2 as the choice of the vertex u ∈ N (v0 ) is arbitrary. Let vm ∈ V be an exact median of S with respect to Γ. That is, ΓS (vm ) ≤ ΓS (v) for every v ∈ V . Note that ΓS (vm ) ≤ ΓS (v0 ) ≤ |S| 2 . Now let 0 ≤ ε < 1 and let va ∈ V be an (1 + ε)-median of S with respect to Γ. Then ΓS (va ) ≤ (1 + ε)ΓS (vm ) ≤ 1+ε 2 |S|. Our adaptive algorithm proceeds as follows. Similarly to the algorithm of [9] (see Theorem 3 of [9]), our adaptive algorithm maintains a candidates’ set S, where initially S = V . At every iteration our algorithm queries an arbitrary (1 + ε)-median vm ∈ V of the current set S with respect to the potential Γ. Let u ∈ N (vm ) be the vertex returned by this query; the algorithm updates S with the set N (v, u) ∩ S. Since ΓS (va ) ≤ 1+ε 2 |S| as we proved above, it follows that the updated candidates’ set has cardinality at most 1+ε 2 |S|. Thus, since initially |S| = n, our algorithm detects the target t log n queries. after at most log( 2 ) n = 1−log(1+ε) 1+ε Notice in the statement of Theorem 4 that for ε = 0 (i.e. when we always query an exact median) we get an upper bound of log n queries, as in this case the size of the candidates’ set decreases by a factor of at least 2. Furthermore notice that the reason that the algorithm of [9] is not query-efficient when querying an (1 + ε)-median is that the potential ΦS (v) of [9] can become quadratic in |S|, while on the other hand the value of our potential ΓS (v) can be at most |S| by Definition 1, for every S ⊆ V and every v ∈ V . Furthermore notice that, knowing only the value ΦS (v) for some vertex v ∈ V is not sufficient to provide a guarantee for the proportional reduction of the set S when querying v. In contrast, just knowing the value ΓS (v) directly provides a guarantee that, if we (v) query vertex v the set S will be reduced by a proportion of ΓS|S| , regardless of the response of the query. Therefore, in practical applications, we may not 9 need to necessarily compute an (exact or approximate) median of S to make significant progress. 3 Detecting Two Targets In this section we consider the case where there are two unknown targets t1 and t2 , i.e. T = {t1 , t2 }. In this case the direction query at vertex v returns with probability p1 (resp. with probability p2 = 1−p1 ) a neighbor u ∈ N (v) such that t1 ∈ N (v, u) (resp. t2 ∈ N (v, u)). Detecting more than one unknown targets has been raised as an open question by Emamjomeh-Zadeh et al. [9], while to the best of our knowledge no progress has been made so far in this direction. Here we deal with both problems of detecting at least one of the targets and detecting both targets. We study several different settings and derive both positive and negative results for them. Each setting differs from the other ones on the “freedom” the adversary has on responding to queries, or on the power of the queries themselves. We will say that the response to a query directs to ti , where i ∈ {1, 2}, if the vertex returned by the query lies on a shortest path between the queried vertex and ti . It is worth mentioning here that, if an adversary would be free to arbitrarily choose which ti each query directs to (i.e. instead of directing to ti with probability pi ), then any algorithm would require at least ⌊ n2 ⌋ (resp. n − 2) queries to detect at least one of the targets (resp. both targets), even when the graph is a path. Indeed, consider a path v1 , . . . , vn where t1 ∈ {v1 , . . . , v⌊ n2 ⌋ } and t2 ∈ {v⌊ n2 ⌋+1 , . . . , vn }. Then, for every i ∈ {1, . . . , ⌊ n2 ⌋}, the query at vi would return vi+1 , i.e. it would direct to t2 . Similarly, for every i ∈ {⌊ n2 ⌋ + 1, . . . , n}, the query at vi would return vi−1 , i.e. it would direct to t1 . It is not hard to verify that in this case the adversary could “hide” the target t1 at any of the first ⌊ n2 ⌋ vertices which is not queried by the algorithm and the target t2 on any of the last n − ⌊ n2 ⌋ vertices which is not queried. Hence, at least ⌊ n2 ⌋ queries (resp. n − 2 queries) would be required to detect one of the targets (resp. both targets) in the worst case. As a warm-up, we provide in the next theorem an efficient algorithm that detects with high probability both targets in a tree using O(log2 n) queries. Theorem 5 For any constant 0 < p1 < 1, we can detect with probability at 2  both targets in a tree with n vertices using O(log 2 n) queries. least 1 − logn n Proof. Let G = (V, E) be a tree on n vertices and let T = {t1 , t2 } be the two targets. The algorithm runs in two phases. In each phase it maintains a candidates’ set S ⊆ V such that, with high probability, S contains at least one of the yet undiscovered targets. At the beginning of each phase S = V . Let without loss of generality p1 ≥ p2 . Furthermore let α = − log1p1 ; note that α ≥ 1. The first phase of the algorithm proceeds in log n iterations, as follows. At the beginning of the ith iteration, where 1 ≤ i ≤ log n, the candidates’ set is Si ; note that S1 = V at the beginning of the first iteration. Let vi be a median of Si (with respect to the potential Γ of Section 2.3). In the first iteration we query the median v1 of V once; let u1 be the response of this query. Then we know that one of the two targets belongs to the set N (v1 , u1 ), thus we compute 10 the updated candidates’ set S2 = N (v1 , u1 ). Furthermore, since v1 was chosen to be a median of S1 , it follows that |S2 | ≤ |S21 | = n2 . For each i ≥ 2, the ith iteration proceeds as follows. We query the median vi of the set Si for α log n times. First assume that at least one of these α log n queries at vi directs to a subtree of vi (within Si ) that does not contain the first median v1 of S1 = V , and let u′i be the response of that query. Then we know that the subtree of vi (within Si ) which is rooted at u′i contains at least one of the targets that belong to Si . Thus we compute the updated candidates’ set Si+1 = Si ∩ N (vi , u′i ), where again |Si+1 | ≤ |S2i | . Now assume that all of the α log n queries at vi direct to the subtree of vi that contains the median v1 of the initial candidates’ set S1 = V . Let u′′i be the (unique) neighbor of vi in that subtree, that is, all α log n queries at vi return the vertex u′′i . Then we compute the updated candidates’ set Si+1 = Si ∩ N (vi , u′′i ), where again |Si+1 | ≤ |S2i | . In this case, the probability that at least one of the targets of Si does not belong to the subtree of vi (within log n Si ) which is rooted at u′′i is upper bounded by the probability pα that each 1 of the α log n queries at vi directs to a target that does not belong to Si . That log n is, with probability at least 1 − pα , at least one of the targets of Si (which 1 we are looking for) belongs to the subtree of vi (within Si ) rooted at u′′i . Since at each iteration the size of the candidates’ set decreases by a factor of 2, it follows that |Slog n | = 1. The probability that at each of the log n iterations we maintained a target from the previous candidates’ set to the next one is at least log n  log n = 1 − n1 1 − p1α log n ≥ 1 − logn n by Bernoulli’s inequality. That is, with probability at least 1 − logn n we detect during the first phase one of the two targets in log n iterations, i.e. in α log2 n queries in total. Let t0 be the target that we detected during the first phase. In the second phase we are searching for the other target t′0 ∈ T \ {t0 }. The second phase of the algorithm proceeds again in log n iterations, as follows. Similarly to the first phase, we maintain at the beginning of the ith iteration, where 1 ≤ i ≤ log n, a candidates’ set Si with median vi , where S1 = V at the beginning of the first iteration. For each i ≥ 1, in the ith iteration of the second phase we query α log n times the median vi of the set Si . First assume that at least one of these α log n queries at vi directs to a subtree of vi (within Si ) that does not contain the target t0 that we detected in the first phase, and let u′i be the response of that query. Then we can conclude that the other target t′0 belongs to the set N (vi , u′i ), thus we compute the updated candidates’ set Si+1 = Si ∩ N (vi , u′i ), where |Si+1 | ≤ |S2i | . Now assume that all of the α log n queries at vi direct to the subtree of vi that contains the target t0 . Let u′′i be the (unique) neighbor of vi in that subtree, that is, all α log n queries at vi return the vertex u′′i . Then we compute the updated candidates’ set Si+1 = Si ∩ N (vi , u′′i ), where again |Si+1 | ≤ |S2i | . In this case, the probability that the undiscovered target t′0 does not belong to the subtree of vi (within Si ) which is rooted at u′′i is upper bounded by the log n probability pα that each of the α log n queries at vi directs to t0 . That is, 1 log n with probability at least 1 − pα , the target t′0 belongs to the subtree of vi 1 ′′ (within Si ) rooted at ui . Since at each iteration the size of the candidates’ set decreases by a factor of at least 2, it follows that |Slog n | = 1. The probability 11 that at each of the log n iterations we maintained the target t′0 in the candidates’  log n set is at least 1 − p1α log n ≥ 1 − logn n . That is, with probability at least 1 − logn n we detect in α log2 n queries during the second phase the second target t′0 , given that we detected the other target t0 in the first phase.  2 Summarizing, with probability at least 1 − logn n we detect both targets in 2α log2 n queries. Since in a tree both targets t1 , t2 can be detected with high probability in O(log2 n) queries by Theorem 5, we consider in the remainder of the section arbitrary graphs instead of trees. First we consider in Section 3.1 biased queries, i.e. queries with p1 > 21 . Second we consider in Section 3.2 unbiased queries, i.e. queries with p1 = p2 = 12 . 3.1 Upper Bounds for Biased Queries In this section we consider biased queries which direct to t1 with probability p1 > 21 and to t2 with probability p2 = 1 − p1 < 12 . As we can detect in this case the first target t1 with high probability in O(log n) queries by using the “noisy” framework of [9], our aim becomes to detect the second target t2 with the fewest possible queries, once we have already detected t1 . For every vertex v and every i ∈ {1, 2}, denote by Eti (v) = {u ∈ N (v) : ti ∈ N (v, u)} the set of neighbors of v such that the edge uv lies on a shortest path from v to ti . Note that the sets Et1 (v) and Et2 (v) can be computed in polynomial time, e.g. using Dijkstra’s algorithm. We assume that, once a query at vertex v has chosen which target ti it directs to, it returns each vertex of Eti (v) equiprobably and independently from all other queries. Therefore, each of the vertices of Et1 (v) \ Et2 (v) is returned by the query at v with probability p1 1−p1 |Et (v)| , each vertex of Et2 (v) \ Et1 (v) is returned with probability |Et (v)| , and 1 2 1 each vertex of Et1 (v) ∩ Et2 (v) is returned with probability |Etp1(v)| + |E1−p . We t2 (v)| 1 will show in Theorem 6 that, under these assumptions, we detect the second target t2 with high probability in O(∆ log2 n) queries where ∆ is the maximum degree of the graph. The high level description of our algorithm (Algorithm 1) is as follows. Throughout the algorithm we maintain a candidates’ set S of vertices in which t2 belongs with high probability. Initially S = V . In each iteration we first compute an (exact or approximate) median v of S with respect to the potential Γ (see Section 2.3). Then we compute the set Et1 (v) (this can be done as t1 has already been detected) and we query c∆ log n times vertex v, where 2 1) c = p7(1+p 2 is a constant. Denote by Q(v) the multiset of size c∆ log n that 1 (1−p1 ) contains the vertices returned by these queries at v. If at least one of these O(∆ log n) queries at v returns a vertex u ∈ / Et1 (v), then we can conclude that u ∈ Et2 (v), and thus we update the set S by S ∩ N (v, u). Assume otherwise that all O(∆ log n) queries at v return vertices of Et1 (v). Then we pick a vertex u0 ∈ N (v) that has been returned most frequently among the O(∆ log n) queries at v, and we update the set S by S ∩ N (v, u0 ). As it turns out, u0 ∈ Et2 (v) with high probability. Since we always query an (exact or approximate) median v of the current candidates’ set S with respect to the potential Γ, the size of S decreases by a constant factor each time. Therefore, after O(log n) updates 12 we obtain |S| = 1. It turns out that, with high probability, each update of the candidates’ set was correct, i.e. S = {t2 }. Since for each update of S we perform O(∆ log n) queries, we detect t2 with high probability in O(∆ log2 n) queries in total. Algorithm 1 Given t1 , detect t2 with high probability with O(∆ log2 n) queries 2 1) S ← V ; c ← p7(1+p 2 1 (1−p1 ) while |S| > 1 do Compute an (approximate) median v of S with respect to potential Γ; Compute Et1 (v) Query c∆ log n times vertex v; Compute the multiset Q(v) of these query responses if Q(v) \ Et1 (v) 6= ∅ then Pick a vertex u ∈ Q(v) \ Et1 (v) and set S ← S ∩ N (v, u) else Pick a most frequent vertex u ∈ Q(v) and set S ← S ∩ N (v, u) 1: 2: 3: 4: 5: 6: 7: 8: return the unique vertex in S 9: Recall that every query at v returns a vertex u ∈ Et1 (v) with probability p1 and a vertex u ∈ Et2 (v) with probability 1 − p1 . Therefore, for every v ∈ V the multiset Q(v) contains at least one vertex u ∈ Et2 (v) with probability at least |Q(v)| |c∆ log n| 1 − p1 = 1 − p1 . In the next lemma we prove that, every time we update S using Step 8, the updated set contains t2 with high probability. Lemma 1 Let S ⊆ V such that t2 ∈ S and let S ′ = S ∩ N (v, u) be the updated set at Step 8 of Algorithm 1. Then t2 ∈ S ′ with probability at least 1 − n2 . 2 7(1+p1 ) 1 Proof. Let δ = 1−p 1+p1 and c = p1 (1−p1 )2 be two constants. Recall that each of the vertices of Et1 (v) \ Et2 (v) is returned by the query at v with probability 1−p1 p1 |Et (v)| , each vertex of Et2 (v) \ Et1 (v) is returned with probability |Et (v)| , and 1 2 1 each vertex of Et1 (v) ∩ Et2 (v) is returned with probability |Etp1(v)| + |E1−p . t2 (v)| 1 Observe that these probabilities are the expected frequencies for these vertices in Q(v). Recall that Step 8 is executed only in the case where Q(v) ⊆ Et1 (v). To prove the lemma it suffices to show that, whenever Q(v) ⊆ Et1 (v), the most frequent element of Q(v) belongs to Et1 (v) ∩ Et2 (v) with high probability. First note that, for the chosen value of δ,   1 − p1 p1 p1 (3) < (1 − δ) + (1 + δ) |Et1 (v)| |Et1 (v)| |Et2 (v)| Let u ∈ Et1 (v) \ Et2 (v), i.e. the query at v directs to t1 but not to t2 . We define the random variable Zi (u), such that Zi (u) = 1 if u is returned by the i-th Pc∆ log n Zi (u). query at v and Zi (u) = 0 otherwise. Furthermore define Z(u) = i=1 p1 Since Pr(Zi (u) = 1) = |Et (v)| , it follows that E(Z(u)) = c∆ log n |Etp1(v)| by the 1 1 13 linearity of expectation. Then, using Chernoff’s bounds it follows that   2 p1 δ c∆ log n Pr(Z(u) ≥ (1 + δ)E(Z(u))) ≤ exp − 3 |Et1 (v)|   (1 + p1 )2 log n < exp −2δ 2 (1 − p1 )2 = exp (−2 log n) 1 = 2. n (4) Thus (4) implies that the probability that there exists at least one u ∈ Et1 (v) \ Et2 (v) such that Z(u) ≥ (1 + δ)E(Z(u)) is   p1 1 1 Pr ∃u ∈ Et1 (v) \ Et2 (v) : Z(u) ≥ (1 + δ) < (∆ − 1) 2 < . (5) |Et1 (v)| n n Now let u′ ∈ Et1 (v) ∩ Et2 (v). Similarly to the above we define the random variable Zi′ (u′ ), such that Zi′ (u′ ) = 1 if u′ is returned by the ith query at v and Zi′ (u′ ) = 0 otherwise. Furthermore define Z ′ (u′ ) = Pc∆ log n ′ ′ 1 Zi (u ). Since Pr(Zi′ (u′ ) = 1) = |Etp1(v)| + |E1−p , it follows that i=1 t2 (v)| 1   1−p1 p1 E(Z(u)) = c∆ log n |Et (v)| + |Et (v)| by the linearity of expectation. Then 1 2 we obtain similarly to (4) that    2 p1 1 − p1 δ c∆ log n + Pr(Z ′ (u′ ) ≤ (1 − δ)E(Z ′ (u′ ))) ≤ exp − 2 |Et1 (v)| |Et2 (v)|   2 2 (1 + p1 ) < exp −3δ log n p1 (1 − p1 )2 < exp (−3 log n) 1 < 2. n (6) Thus, it follows by the union bound and by (3), (5), and (6) that Pr(∃u ∈ Et1 (v) \ Et2 (v) : Z(u) ≥ Z ′ (u′ )) ≤ 2 . n (7) That is, the most frequent element of Q(v) belongs to Et1 (v) ∩ Et2 (v) with probability at least 1 − n2 . This completes the proof of the lemma. With Lemma 1 in hand we can now prove the main theorem of the section. Theorem 6 Given t1 , Algorithm 1 detects t2 in O(∆ log2 n) queries with probability at least (1 − n2 )O(log n) . Proof. Since we query at each iteration an (1 + ε)-median for the potential log n function Γ, recall by Theorem 4 that after at most 1−log(1+ε) = O(log n) iterations we will obtain |S| = 1. Furthermore, in every iteration the algorithm queries c∆ log n times the (1 + ε)-median of the current set, and thus the algorithm makes O(∆ log2 n) queries in total. Whenever the algorithm updates S 14 in Step 6 the target t2 belongs to the updated set with probability 1. Moreover, whenever the algorithm updates S in Step 8, Lemma 1 implies that the target t2 belongs to the updated set with probability at least (1 − n2 ). Thus, the probability all the O(log n) updates of S were correct, i.e. t2 belongs to S after each of the O(log n) updates, is at least (1 − n2 )O(log n) . Note by Theorem 6 that, whenever ∆ = O(poly log n) we can detect both targets t1 and t2 in O(poly log n) queries. However, for graphs with larger maximum degree ∆, the value of the maximum degree dominates any polylogarithmic factor in the number of queries. The intuitive reason behind this is that, for an (exact or approximate) median v of the current set S, whenever deg(v) and Et1 (v) are large and Et2 (v) ⊆ Et1 (v), we can not discriminate with a polylogarithmic number of queries between the vertices of Et2 (v) and the vertices of Et1 (v) \ Et2 (v) with large enough probability. Although this argument does not give any lower bound for the number of queries in the general case (i.e. when ∆ is unbounded), it seems that more informative queries are needed to detect both targets with polylogarithmic queries in general graphs. We explore such more informative queries in Section 4. 3.2 Lower Bounds for Unbiased Queries In this section we consider unbiased queries, i.e. queries which direct to each of the targets t1 , t2 with equal probability p1 = p2 = 12 . In this setting every query is indifferent between the two targets, and thus the “noisy” framework of [9] cannot be applied for detecting any of the two targets. In particular we prove in the next theorem that any deterministic (possibly adaptive) algorithm needs at least n2 − 1 queries to detect one of the two targets. Theorem 7 Let p1 = p2 = 12 . Then any deterministic (possibly adaptive) algorithm needs at least n2 − 1 queries to detect one of the two targets, even in an unweighted cycle. Proof. Let G be the unweighted cycle with n = 2k vertices v0 , v1 , . . . , v2k−1 . For simplicity denote vi = vi mod 2k for every i ∈ Z. The targets t1 and t2 are placed by the adversary on two anti-diametrical vertices of the cycle, i.e. t1 = vi and t2 = vi+k , for some i ∈ {0, 1, . . . , 2k − 1}. Thus, for any vertex vx ∈ / {t1 , t2 }, the unbiased query at vx returns vx−1 with probability 21 and vx+1 / {t1 , t2 } the response of the with probability 21 . That is, for each vertex vx ∈ query at vx is exactly the same. Let A be a deterministic algorithm that queries at most k−2 different vertices. Then there exist at least two pairs {vi , vi+k } and {vj , vj+k } of anti-diametrical vertices such that none of these vertices is queried by the algorithm. Then the adversary can place the two targets either at the vertices {vi , vi+k } or at the vertices {vj , vj+k }, without affecting the validity of the previous answers. Thus the algorithm A needs to query at least k−1 = n2 −1 different vertices to detect a target. In the next theorem we generalize the lower bound of Theorem 7 to the case of 2c ≥ 2 different targets T = {t1 , t2 , . . . , t2c } and the query to any vertex 1 for every i ∈ {1, 2, . . . , 2c}. v∈ / T is unbiased, i.e. pi = 2c 1 for Theorem 8 Suppose that there are 2c targets in the graph and let pi = 2c every i ∈ {1, 2, . . . , 2c}. Then, any deterministic (possibly adaptive) algorithm 15 requires at least cycle. n 2 − c queries to locate at least one target, even in an unweighted Proof. Our proof is similar to that of Theorem 7. Let T = {t1 , t2 , . . . , t2c } be the set of targets. Again, let G be the unweighted cycle with n = 2k vertices v0 , v1 , . . . , v2k−1 . For each i ∈ {1, 2, . . . , c} the targets {ti , ti+c } are placed by the adversary on two anti-diametrical vertices of the cycle, i.e. ti = vj and ti+c = vj+k , for some j ∈ {0, 1, . . . , 2k − 1}. Thus, for any vertex vx ∈ / T , the unbiased query at vx returns vx−1 with probability 12 and vx+1 with probability 1 / T the response of the query at vx is exactly 2 . That is, for each vertex vx ∈ the same (similarly to Theorem 7). Let A be a deterministic algorithm that queries at most k − c − 1 different vertices. Then there exist at least c + 1 pairs {vi1 , vi1 +k }, {vi2 , vi2 +k }, . . . , {vic , vic +k } of anti-diametrical vertices such that none of these vertices is queried by the algorithm. Then the adversary can place the 2c targets any c of these c + 1 pairs of anti-diametrical vertices, without affecting the validity of the previous answers. Thus the algorithm A needs to query at least k − c = n2 − c different vertices to detect a target. 4 More Informative Queries for Two Targets A natural alternative to obtain query-efficient algorithms for multiple targets, instead of restricting the maximum degree ∆ of the graph (see Section 3.1), is to consider queries that provide more informative responses in general graphs. As we have already observed in Section 3.1, it is not clear whether it is possible to detect multiple targets with O(poly log n) direction queries in an arbitrary graph. In this section we investigate natural variations and extensions of the direction query for multiple targets which we studied in Section 3. 4.1 Direction-Distance Biased Queries In this section we strengthen the direction query in a way that it also returns the value of the distance between the queried vertex and one of the targets. More formally, a direction-distance query at vertex v ∈ V returns with probability pi a pair (u, ℓ), where u ∈ N (v) such that ti ∈ N (u, v) and d(v, ti ) = ℓ. Note P|T | that here we impose again that all pi ’s are constant and that i=1 pi = 1, where T = {t1 , t2 , . . . , t|T | } is the set of targets. We will say that the response (u, ℓ) to a direction-distance query at vertex v directs to ti if ti ∈ N (v, u) and ℓ = d(v, ti ). Similarly to our assumptions on the direction query, whenever there exist more than one such vertices u ∈ N (v) leading to ti via a shortest path, the direction-distance query returns an arbitrary vertex u among them (possibly chosen adversarially). Moreover, if the queried vertex v is equal to one of the targets ti ∈ T , this is revealed by the query with probability pi . These direction-distance queries have also been used in [9] for detecting one single target in directed graphs. Here we consider the case of two targets and biased queries, i.e. T = {t1 , t2 } where p1 > p2 . Similarly to Section 3.1, initially we can detect the first target t1 with high probability in O(log n) queries using the “noisy” model of [9]. Thus, in what follows we assume that t1 has already been detected. We will show that the second target t2 can be detected with high probability with O(log3 n) additional 16 direction-distance queries using Algorithm 2. The high level description of our algorithm is the following. We maintain a candidates’ set S such that at every iteration t2 ∈ S with high probability. Each time we update the set S, its size decreases by a constant factor. Thus we need to shrink the set S at most log n times. In order to shrink S one time, we first compute an (1 + ε)-median v of the current set S and we query log n times this vertex v. Denote by Q(v) the set of all different responses of these log n direction-distance queries at v. As it turns out, the responses in Q(v) might not always be enough to shrink S such that it still contains t2 with high probability. For this reason we also query log n times each of the log n neighbors u ∈ N (v), such that (u, ℓ) ∈ Q(v) for some ℓ ∈ N. After these log2 n queries at v and its neighbors, we can safely shrink S by a constant factor, thus detecting the target t2 with high probability in log3 n queries. For the description of our algorithm (see Algorithm 2) recall that, for every vertex v, the set Et1 (v) = {u ∈ N (v) : t1 ∈ N (v, u)} contains all neighbors of v such that the edge uv lies on a shortest path from v to t1 . Algorithm 2 Given t1 , detect t2 with high probability with O(log3 n) directiondistance queries 1: S ← V 2: while |S| > 1 do 3: Compute an (approximate) median v of S with respect to potential Γ; Compute Et1 (v) 4: Query log n times vertex v; Compute the set Q(v) of different query responses 5: if there exists a pair (u, ℓ) ∈ Q(v) such that u ∈ / Et1 (v) or ℓ 6= d(v, t1 ) then 6: S ← S ∩ N (v, u) 7: else 8: for every (u, ℓ) ∈ Q(v) do 9: Query log n times vertex u; Compute the set Q(u) of different query responses 10: if for every (z, ℓ′ ) ∈ Q(u) we have ℓ′ = ℓ − w(vu) then 11: S ← S ∩ N (v, u); Goto line 2 12: return the unique vertex of S In the next theorem we prove the correctness and the running time of Algorithm 2. Theorem 9 Given t1 , Algorithm 2 detects t2 in at most O(log3 n) queries with   n . probability at least 1 − O log n · plog 1 Proof. Throughout its execution, Algorithm 2 maintains a vertex set S that contains the second target t2 with high probability. Initially S = V . Let v be an (1 + ε)-median of the set S (with respect to the potential Γ of Section 2.3) at some iteration of the algorithm, and assume that t2 ∈ S. We query log n times vertex v; let Q(v) be the set of all different query responses. Since each query directs to t1 with probability p1 and to t2 with probability p2 , it follows that at n least one of the queries at v directs to t2 with probability at least 1 − plog . 1 17 Consider a response-pair (u, ℓ) ∈ Q(v). If this query directs to t1 , then u ∈ Et1 (v) and ℓ = d(v, t1 ). Hence, if we detect at least one response pair (u, ℓ) ∈ Q(v) such that u ∈ / Et1 (v) or ℓ 6= d(v, t1 ), we can safely conclude that this query directs to t2 (lines 5-6 of Algorithm 2). Therefore, in this case, u ∈ Et2 (v) = {u ∈ N (v) : t2 ∈ N (v, u)}, and thus we safely compute the updated set S ∩ N (v, u) at line 6. Assume now that u ∈ Et1 (v) and ℓ = d(v, t1 ) for every response-pair (u, ℓ) ∈ Q(v) (see lines 8-11 of the algorithm). Then every query at v directs to t1 . However, as we proved above, at least one of these queries (u, ℓ) ∈ Q(v) also n . Therefore directs to t2 (i.e. u ∈ Et2 (v)) with probability at least 1 − plog 1 n ℓ = d(v, t1 ) = d(v, t2 ) with probability at least 1 − plog . Note that, in this 1 case, we can not use only the response-pairs of Q(v) to distinguish which query directs to t2 . In our attempt to detect at least one vertex u ∈ Et2 (v), we query log n times each of vertices u such that (u, ℓ) ∈ Q(v). For each such vertex u denote by Q(u) the set of all different response-pairs from these log n queries at u. Similarly to the above, at least one of these log n queries at u directs to t2 with probability n at least 1 − plog . Recall that d(v, t2 ) = ℓ and let (z, ℓ′ ) ∈ Q(u). If u ∈ Et2 (v) 1 then d(u, t2 ) = ℓ − w(vu), otherwise d(u, t2 ) > ℓ − w(vu). Furthermore note that d(u, t1 ) = ℓ − w(vu), since u ∈ Et1 (v). Therefore, if we detect at least one response-pair (z, ℓ′ ) ∈ Q(u) such that ℓ′ > ℓ − w(vu), then we can safely conclude that u ∈ / Et2 (v). Otherwise, if for every response-pair (z, ℓ′ ) ∈ Q(u) ′ we have that ℓ = ℓ − w(vu), then u ∈ Et2 (v) (i.e. t2 ∈ N (v, u)) with probability n at least 1 − plog . 1 Recall that there exists at least one query at v that directs to t2 with probn , as we proved above. That is, among all response-pairs ability at least 1 − plog 1 (u, ℓ) ∈ Q(v) there exists at least one vertex u ∈ Et2 (v) with probability at n least 1 − plog . Therefore, we will correctly detect a vertex u ∈ Et2 (v) at lines 1 2  n , i.e. with at least 10-11 of the algorithm with probability at least 1 − plog 1 this probability the updated candidates’ set at line 11 still contains t2 . Thus, log n = O(log n) times, we eventually since we shrink the candidates’ set 1−log(1+ε) detect t2 as the unique vertex in the final candidates’ set with probability at O(log n)  n n ≥ 1 − O(log n · plog ) by Bernoulli’s inequality. Finally, least 1 − plog 1 1 it is easy to verify from the above that the algorithm will terminate after at n ). most O(log 3 n) queries with probability at least 1 − O(log n · plog 1 4.2 Vertex-Direction and Edge-Direction Biased Queries An alternative natural variation of the direction query is to query an edge instead of querying a vertex. More specifically, the direction query (as defined in Section 1.2) queries a vertex v ∈ V and returns with probability pi a neighbor u ∈ N (v) such that ti ∈ N (u, v). Thus, as this query always queries a vertex, it can be also referred to as a vertex-direction query. Now we define the edge-direction query as follows: it queries an ordered pair of adjacent vertices (v, u) and it returns with probability pi YES (resp. NO) if ti ∈ N (v, u) (resp. if ti ∈ / N (v, u)). Similarly to our notation in the case of vertex-direction queries, we will say that the response YES (resp. NO) to an edge-direction query at the vertex pair (v, u) refers to ti if ti ∈ N (v, u) (resp. if ti ∈ / N (v, u)). Similar 18 but different edge queries for detecting one single target on trees have been investigated in [9, 12, 20, 25]. Here we consider the case where both vertex-direction and edge-direction queries are available to the algorithm, and we focus again to the case of two targets and biased queries, i.e. T = {t1 , t2 } where p1 > p2 . Similarly to Sections 3.1 and 4.1, we initially detect t1 with high probability in O(log n) vertex-direction queries using the “noisy” model of [9]. Thus, in the following we assume that t1 has already been detected. We will show that Algorithm 3 detects the second target t2 with high probability using O(log2 n) additional vertex-direction queries and O(log3 n) edge–direction queries, i.e. in total O(log3 n) queries. Algorithm 3 Given t1 , detect t2 with high probability with O(log3 n) vertexdirection and edge-direction queries 1: S ← V 2: while |S| > 1 do 3: Compute an (approximate) median v of S with respect to potential Γ; Compute Et1 (v) 4: Apply log n vertex-direction queries at vertex v; Compute the set Q(v) of different query responses 5: if there exists a vertex u ∈ Q(v) such that u ∈ / Et1 (v) then 6: S ← S ∩ N (v, u) 7: else 8: for every u ∈ Q(v) do 9: Apply log n edge-direction queries at (v, u); Compute the set Q(v, u) of different query responses 10: if Q(v, u) = {YES} then 11: S ← S ∩ N (v, u); Goto line 2 12: return the unique vertex of S In the next theorem we prove the correctness and the running time of Algorithm 3. Theorem 10 Given t1 , Algorithm 3 detects t2 in at most O(log2 n) vertexdirection queries and O(log 3 n) edge–direction queries with probability at least n 1 − O(log n · plog ). 1 Proof. The proof follows a similar approach as the proof of Theorem 9. Throughout its execution, Algorithm 3 maintains a vertex set S that contains the second target t2 with high probability. Initially S = V . Let v be an (1 + ε)median of the set S (with respect to the potential Γ of Section 2.3) at some iteration of the algorithm, and assume that t2 ∈ S. We query log n times vertex v; let Q(v) be the set of all different query responses. Similarly to the analysis of Algorithm 2 in the proof of Theorem 9, at least one of the queries at v directs n to t2 with probability at least 1 − plog . 1 Consider a response-vertex u ∈ Q(v). If this query directs to t1 , then u ∈ / Et1 (v), we Et1 (v). Hence, if we detect at least one u ∈ Q(v) such that u ∈ can safely conclude that this query directs to t2 (lines 5-6 of Algorithm 3). Therefore, in this case, u ∈ Et2 (v) = {u ∈ N (v) : t2 ∈ N (v, u)}, and thus we safely compute the updated set S ∩ N (v, u) at line 6. 19 Assume now that u ∈ Et1 (v) for every response u ∈ Q(v) (see lines 8-11 of the algorithm). Then every query at v directs to t1 , although at least one of n , them also directs to t2 (i.e. Q(v)∩Et2 (v) 6= ∅) with probability at least 1−plog 1 as we proved above. Note that, in this case, we can not use only the vertices of Q(v) to distinguish which query directs to t2 . In our attempt to detect at least one vertex u ∈ Et2 (v), we apply log n edge-direction queries at each of the ordered pairs (v, u), where u ∈ Q(v). For each such pair (v, u) denote by Q(v, u) the set of all different YES/NO responses from these log n queries at (v, u). Similarly to the above, at least one of these n log n queries at (v, u) refers to t2 with probability at least 1 − plog . Therefore, 1 if NO∈ Q(v, u), then we can safely conclude that u ∈ / Et2 (v). Otherwise, if Q(v, u) = {YES}, then u ∈ Et2 (v) (i.e. t2 ∈ N (v, u)) with probability at least n 1 − plog . 1 Recall that there exists at least one query at v that directs to t2 with proban bility at least 1−plog . That is, among all responses in Q(v) there exists at least 1 n . Therefore, we will corone vertex u ∈ Et2 (v) with probability at least 1 − plog 1 rectly detect a vertex u ∈ Et2 (v) at lines 10-11 of the algorithm with probability 2  n , i.e. with at least this probability the updated candidates’ at least 1 − plog 1 set at line 11 still contains t2 . Thus, similarly to the proof of Theorem 9, we eventually detect t2 as the unique vertex in the final candidates’ set with proban bility at least 1 − O(log n·plog ). Finally, it is easy to verify from the above that 1 the algorithm will terminate after at most O(log2 n) vertex-direction queries and n log3 n edge–direction queries with probability at least 1 − O(log n · plog ). 1 4.3 Two-Direction Queries In this section we consider another variation of the direction query that was defined in Section 1.2 (or “vertex-direction query” in the terminology of Section 4.2), which we call two-direction query. Formally, a two-direction query at vertex v returns an unordered pair of (not necessarily distinct) vertices {u, u′ } such that t1 ∈ N (v, u) and t2 ∈ N (v, u′ ). Note here that, as {u, u′ } is an unordered pair, the response of the two-direction query does not clarify which of the two targets belongs to N (v, u) and which to N (v, u′ ). Although this type of query may seem at first to be more informative than the standard direction query studied in Section 3, we show that this is not the case. Intuitively, this type of query resembles the unbiased direction query of Section 3.2. To see this, consider e.g. the unweighted cycle where the two targets are placed at two anti-diametrical vertices; then, applying many times the unbiased direction query of Section 3.2 at any specific vertex v reveals with high probability the same information as applying a single two-direction query at v. Based on this intuition the next theorem can be proved with exactly the same arguments as Theorem 7 of Section 3.2. Theorem 11 Any deterministic (possibly adaptive) algorithm needs at least n2 − 1 two-direction queries to detect one of the two targets, even in an unweighted cycle. 20 4.4 Restricted Set Queries The last type of queries we consider is when the query is applied not only to a vertex v of the graph, but also to a subset S ⊆ V of the vertices, and the response of the query is a vertex u ∈ N (v) such that t ∈ N (v, u) for at least one of the targets t that belong to the set S. Formally, let T be the set of targets. The restricted-set query at the pair (v, S), where v ∈ V and S ⊆ V such that T ∩S 6= ∅, returns a vertex u ∈ N (v) such that t ∈ N (v, u) for at least one target t ∈ T ∩ S. If there exist multiple such vertices u ∈ N (v), the query returns one of them adversarially. Finally, if we query a pair (v, S) such that T ∩ S = ∅, then the query returns adversarially an arbitrary vertex u ∈ N (v), regardless of whether the edge vu leads to a shortest path from v to any target in T . That is, the response of the query can be considered in this case as “noise”. In the next theorem we prove that this query is very powerful, as |T | · log n restricted-set queries suffice to detect all targets of the set T . Theorem 12 Let T be the set of targets. There exists an adaptive deterministic algorithm that detects all targets of T with at most |T | · log n restricted-set queries. Proof. To detect the first target we simply apply binary search on graphs. At every iteration we maintain a candidates’ set S (initially S = V ). We compute a median v of S (with respect to the potential Γ of Section 2.3) and we query the pair (v, S). If the response of the query at (v, S) is vertex u ∈ N (v) then we update the candidates’ set as S ∩ N (v, u). We know that there is at least one target in the updated set S and that the size of the candidates’ set decreased by a factor of at least 2 (cf. Theorem 4). Thus, after at most log n restricted-set queries we end up with a candidates’ set of size 1 that contains one target. We repeat this procedure for another |T | − 1 times to detect all remaining targets of T ,as follows. Assume that we have already detected the targets t1 , t2 , . . . , ti ∈ T . To detect the next target of T we initially set S = V \ {t1 , t2 , . . . , ti } and we apply the above procedure. Then, after at most log n restricted-set queries we detect the next target ti+1 . Thus, after at most |T | · log n restricted-set queries in total we detect all targets of T . 5 Conlusions This paper resolves some of the open questions raised by Emamjomeh-Zadeh et al. [9] and makes a first step towards understanding the query complexity of detecting two targets on graphs. Our results provide evidence that different types of queries can significantly change the difficulty of the problem and make it from almost trivial impossible to solve. There are several interesting avenues for future research both for detecting one target and for detecting multiple targets. The potential Γ we introduced in this paper has several interesting properties that have not yet been fully explored. As we mentioned in the paper, just knowing the value ΓS (v) for a vertex v directly provides enough information to quantify the “progress” a direction query can make by querying vertex v, without the need to know the values ΓS (u) for any other vertex u 6= v. This property of Γ may be exploited to provide computationally more efficient algorithms for detecting one target; 21 an algorithm might only need to compute ΓS (v) for all vertices v lying within a wisely chosen subset such that one of these vertices is an approximate median. Of course, this approach cannot break the log n lower bound on the number of queries needed to detect the target (e.g. in the path of n vertices), but it could potentially improve the computational complexity of the detection algorithm. Furthermore, the potential Γ might be a useful tool for deriving an optimal number of queries for classes of graphs other than trees, since every exact median of Γ separates the graph into roughly equal subgraphs. For the setting where two, or more, targets need to be detected there is a plethora of interesting questions. We believe that the most prominent one is to derive lower bounds on the number of queries needed to detect both targets in the biased setting. Preliminary results suggest a lower bound of log n log log n bound for a special type of algorithms. A general lower bound seems to require new techniques. Another interesting question is to decide whether there exists an algorithm that detects both targets with a polylogarithmic number of direction queries. Finally, an intriguing question is to find the minimal requirements a query has to satisfy in order to detect even one target in the unbiased setting. References [1] Y. Ben-Asher, E. Farchi, and I. Newman. Optimal search in trees. SIAM J. Comput., 28(6):2090–2102, 1999. [2] M. Ben-Or and A. Hassidim. The bayesian learner is optimal for noisy binary search (and pretty good for quantum as well). In 49th Annual IEEE Symposium on Foundations of Computer Science, FOCS 2008, October 2528, 2008, Philadelphia, PA, USA, pages 221–230, 2008. [3] L. Boczkowski, A. Korman, and Y. Rodeh. Searching on trees with noisy memory. CoRR, abs/1611.01403, 2016. [4] R. Carmo, J. Donadelli, Y. Kohayakawa, and E. S. Laber. Searching in random partially ordered sets. Theor. Comput. Sci., 321(1):41–57, 2004. [5] F. Cicalese, T. Jacobs, E. S. Laber, and M. Molinaro. On the complexity of searching in trees and partially ordered structures. Theor. Comput. Sci., 412(50):6879–6896, 2011. [6] F. Cicalese, T. Jacobs, E. S. Laber, and C. D. Valentim. The binary identification problem for weighted trees. Theor. Comput. Sci., 459:100– 112, 2012. [7] D. Dereniowski. Edge ranking and searching in partial orders. Discrete Applied Mathematics, 156(13):2493–2500, 2008. [8] D. Du and F. K. Hwang. Combinatorial Group Testing and its Applications. World Scientific, Singapore, 1993. [9] E. Emamjomeh-Zadeh, D. Kempe, and V. Singhal. Deterministic and probabilistic binary search in graphs. In Proceedings of the 48th Annual ACM SIGACT Symposium on Theory of Computing, STOC 2016, Cambridge, MA, USA, June 18-21, 2016, pages 519–532, 2016. 22 [10] U. Feige, P. Raghavan, D. Peleg, and E. Upfal. Computing with noisy information. SIAM J. Comput., 23(5):1001–1018, 1994. [11] E. Fonio, Y. Heyman, L. Boczkowski, A. Gelblum, A. Kosowski, A. Korman, and O. Feinerman. A locally-blazed ant trail achieves efficient collective navigation despite limited information. eLife, page 23 pages, 2016. [12] A. V. Iyer, H. D. Ratliff, and G. Vijayan. Optimal node ranking of trees. Inf. Process. Lett., 28(5):225–229, 1988. [13] C. Jordan. Sur les assemblages de lignes. Journal für die reine und angewandte Mathematik, 70:195–190, 1869. [14] E. S. Laber, R. L. Milidiú, and A. A. Pessoa. On binary searching with non-uniform costs. In Proceedings of the Twelfth Annual Symposium on Discrete Algorithms, January 7-9, 2001, Washington, DC, USA., pages 855–864, 2001. [15] T. W. Lam and F. L. Yue. Edge ranking of graphs is hard. Discrete Applied Mathematics, 85(1):71–86, 1998. [16] T. W. Lam and F. L. Yue. Optimal edge ranking of trees in linear time. Algorithmica, 30(1):12–33, 2001. [17] N. Linial and M. E. Saks. Searching ordered structures. J. Algorithms, 6(1):86–103, 1985. [18] S. Mozes, K. Onak, and O. Weimann. Finding an optimal tree searching strategy in linear time. In Proceedings of the Nineteenth Annual ACMSIAM Symposium on Discrete Algorithms, SODA 2008, San Francisco, California, USA, January 20-22, 2008, pages 1096–1105, 2008. [19] N. J. Nilsson. Problem-Solving Methods in Artificial Intelligence. McGrawHill Pub. Co., 1971. [20] R. Nowak. Noisy generalized binary search. In Y. Bengio, D. Schuurmans, J. D. Lafferty, C. K. I. Williams, and A. Culotta, editors, Advances in Neural Information Processing Systems 22, pages 1366–1374. Curran Associates, Inc., 2009. [21] K. Onak and P. Parys. Generalization of binary search: Searching in trees and forest-like partial orders. In 47th Annual IEEE Symposium on Foundations of Computer Science (FOCS 2006), 21-24 October 2006, Berkeley, California, USA, Proceedings, pages 379–388, 2006. [22] J. Pearl. Heuristics - intelligent search strategies for computer problem solving. Addison-Wesley series in artificial intelligence. Addison-Wesley, 1984. [23] A. Pelc. Searching games with errors - fifty years of coping with liars. Theor. Comput. Sci., 270(1-2):71–109, 2002. [24] A. Renyi. On a problem in information theory. Magyar Tud. Akad. Mat. Kutato Int. Kozl, 6(B):505–516, 1961. 23 [25] A. A. Schäffer. Optimal node ranking of trees in linear time. Information Processing Letters, 33(2):91–96, 1989. [26] S. Ulam. Adventures of a Mathematician. University of California Press, 1991. 24
8cs.DS
International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 ISSN: 1839 - 6291 TOWARDS HIGH PERFORMANCE COMPUTING (HPC) THROUGH PARALLEL PROGRAMMING PARADIGMS AND THEIR PRINCIPLES Dr. Brijender Kahanwal Department of Computer Science & Engineering, Galaxy Global Group of Institutions, Dinarpur, Ambala, Haryana, India ABSTRACT Nowadays, we are to find out solutions to huge computing problems very rapidly. It brings the idea of parallel computing in which several machines or processors work cooperatively for computational tasks. In the past decades, there are a lot of variations in perceiving the importance of parallelism in computing machines. And it is observed that the parallel computing is a superior solution to many of the computing limitations like speed and density; non-recurring and high cost; and power consumption and heat dissipation etc. The commercial multiprocessors have emerged with lower prices than the mainframe machines and supercomputers machines. In this article the high performance computing (HPC) through parallel programming paradigms (PPPs) are discussed with their constructs and design approaches. KEYWORDS Parallel programming languages, parallel programming constructs, distributed computing, high performance computing 1. INTRODUCTION The numerous computational concentrated tasks of the computer science like weather forecast, climate research, the exploration of oil and gas, molecular modelling, quantum mechanics, and physical simulations are performed by the supercomputers as well as mainframe computer. But these days due to the advancements in the technology multiprocessors systems or multi-core processor systems are going to be resembled to perform such type of computations which are performed by the supercomputing machines. Due to the recent advances in the hardware technologies, we are leaving the von Neumann computation model and adopting the distributed computing models which have peer-to-peer (P2P), cluster, cloud, grid, and jungle computing models in it [1]. All these models are used to achieve the parallelism and are high performance computing (HPC) models. Concurrency and Parallelism: The terms concurrency and parallelism must be clear in our minds first. It can be well explained with the help of the threads (light weight processes). When two or more threads are in the middle of execution process at the same time, actually, they may or may not be executing at the same time, but they are in the middle of it. DOI : 10.5121/ijpla.2014.4104 45 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 It is called concurrency [25]. The threads may or may not execute at the single processor or a multiprocessor machine in it. When two or more threads are actually running at the same time on different CPUs, it is known as parallelism [25]. To achieve parallelism, we always require at least two CPUs which may be on a single machine (multiprocessor machine) or more machines. The parallel events may also be called as concurrent events, but the reverse is not true always. It is well described with the help of set theory that parallelism ⊂ concurrency (Parallelism is contained in Concurrency) as shown in Fig.1. Figure 1: Concurrency is the superset of Parallelism On the Von Neumann computing machines, the programming is a single execution sequence. But there might be various subroutines that can be executed simultaneously within a single program. These are called sequential due to the execution of subroutines proceeds in predetermined sequence. In general cases, the programs are termed as concurrent or parallel in which the subroutines can be executed concurrently and these subroutines are known as tasks [2]. Now a day, it is a common practice now to execute various programs concurrently by the computing machines. It may have the architecture with multiprocessors (various CPUs) which share the common memory space as shown in the Fig.2 (a) or another architecture that may have multiprocessors with their independent memories or distributed memories as shown in the Fig.2 (b). (a) Figure 2 (a): Shared Architecture. (b) Figure 2 (b): Distributed Architecture. It is the big challenge for the scientists to utilize these hardware technologies efficiently, effectively, and these processors may work cooperatively. In the present scenario, software technologies (STs) are not having well compatibility with the hardware technology’s growth that the STs can utilize them efficiently and effectively. Hence the parallel computing community is going to be aware that they can build software technologies which are efficient and effective. But till now the programmers as well as the scientists are incompetent to find the solution. So it is the need to get more awareness regarding the parallelism, so we can find the better solutions for high performance computing (HPC). The article contains more sections which are organized as follows: the related works will be available in the section 2. 46 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 2. RELATED WORKS The parallelism is not a novel concept of computing. The Law of Amdahl is the key principle to estimate maximum improvements in the components of the system [3] which brings the idea of parallel computing to find the optimum performance. The time 1960-70 was the boom time for the parallel computing and during this time, we have solved many problems in achieving the optimum performance, but they have encountered today. Multi-core chips are a new paradigm in parallelism. Parallel computation is the never-ending desire for much faster and much cheaper computation of level of supercomputers as well as mainframe computers [4]. Until now we have not remarkable progress in building the efficient and optimal softwares for utilizing the parallel computer architectures of today [5]. 3. PARALLEL PROGRAMMING CONSTRUCTS OR PRINCIPLES It is complicated to write the parallel programs as compared to write sequential programs. We design algorithms and express them in some programming languages to execute on the computing machines. In the case of parallel programming we have to develop the same functioning, but it also adds more challenges to it. Such types of challenges are as follows: structured constructs[6]: structured region; thread based constructs[7]: synchronization, critical sections, and deadlock; and object-oriented constructs [8]: object replication, latency hiding, termination detection, and user-level scheduling; concurrency; data distribution; inter-process communication; computational load balancing; variable definitions [2]; parallel compositions [2]; program structures [2]; and easy implementation and debugging;. All of these are explored in the following sub sections. 3.1. Structured Construct – Structured Region The structured parallel programming construct is introduced as a structured region. It has a region name and a region body which is enclosed with two barriers namely entry barrier as well as exit barrier. A par (or parfor) block has the starting instruction as the region name. A region name has a region keyword then an arbitrary name given to the region by the programmer and a list of the participants (processes) [6]. If the participants list is declared explicitly then the specified names becomes the participants and if the list is not mentioned then all the processes are the participants. This structured region semantics is very easy and clear. The entry in the region is done only if all the participants reach at their specific entry points. There are the unique effects of the execution of the region body. The region is exited by all the participants after the complete execution of all the operations of the region body. A structured region has a single entry and exit point [6]. It wraps up inter-process communication as well as synchronization operations in it and makes the parallel programming easier to understand and less error-prone. It is opposite to the concept of mutual exclusion in which only a single process can enter in the critical region. But in the case hare all the processes can enter in the structured region. 3.2. Thread-Based Constructs The process and the thread are much related terms. A process is program in execution and there may be some independent units within a process which are known as the threads. A thread is dispatch-able work unit. It is also known as the light-weight process. So it is concluded that the 47 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 threads makes a process or it is a subset of a process [10]. Both the process as well as the thread is an active entity and a simple program before execution is a passive entity. The threads of a single process share same address space, so the context-switching as well as communication between threads is inexpensive [10]. The sharing between the threads creates some difficulties which are explored in the following sub-sections. 1. Synchronization: It is the construct which enforces the mechanism for controlling the execution order of the threads and resolves the conflicts among the threads [7]. It is a way of coordinating the execution of the threads and managing the shared address space. In synchronization, mutual exclusion and condition synchronization operations are used widely. In mutual exclusion, one of the threads block the critical section (shared data area by the threads) and other threads will wait for getting their turns one by one. The scheduler controls for the turns. But in the case of conditional synchronization, threads are blocked until some particular condition is satisfied. Here the thread has to wait until a particular condition is achieved. So the synchronization is well managed by the programmer or by the programming system, it is a critical construct for multi-threaded programming. 2. Critical sections: These sections have shared dependency variables and many threads are dependent on them [7]. It is the great programming construct for thread-based programming, so the threads can use these sections mutually exclusively and prevent to use these sections simultaneously. These sections should be minimized in size. 3. Deadlock: It is the situation when a thread holds a lock and waiting for another lock which is held by another thread and this thread is waiting for the lock first to be released. Such as the code: T1: lock (1); lock (2); and T2: lock (2); lock (1); in this code, the deadlock may or may not occur. The four basic conditions need to be hold which are mutual exclusion; hold-and-wait; no pre-emption; and circular wait. 3.3. Object-Oriented Constructs The object-oriented parallel programming has complex computational as well as communicational structures to achieve the efficiency or optimization. For improving the performance in the object-oriented programming languages some of the constructs are discussed in the following sub-sections [8]. 1. Object Replication: This construct highly improves the performance in the distributed memory architectures. When a program is frequently accessing an object then it is better to create a local replica of it for the processor and then there is a big fall in the number of remote messages [8]. 2. Latency Hiding: It is an optimization technique which reduces the waiting time for the remote messages. Here local computations and remote communications are overlapped. In it we break up a single thread into multiple threads manually by modifying the program [8]. 3. Termination Detection: In few parallel applications like search problems, it is a typical task to detect the termination point because of the invoking of the many threads and finding their termination points in absence of the global control on them [8]. 4. User-level Scheduling: A proper scheduling at application level also improves the performance of the parallelism. User-level scheduling facility is not offered in most of the programming language systems, so it becomes necessary to provide it by the programmers explicitly to control the order of execution [8]. 48 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 3.4. Concurrency These days, the processors are inexpensive as compared to the previous time, so we are constructing the distributed systems. Due to such things in the development the concurrency has a little importance. The programmers are working on various types of applications like DBMS, L-S parallel technical computations, real time applications, and embedded systems etc [9]. When a concurrent program shares one or more processors during execution is known as multiprogramming; when its sub-processes are to be executed on independent processor then it is known as multiprocessing; when there is the addition of the communication network then it is known as distributed processing; and any combination of these is known as hybrid approach [9]. Still, it is the fundamental construct to utilize optimally the parallel computing resources. We can't achieve the parallelism without dividing the operations to execute concurrently. A problem has many sub-problems in it for concurrent execution; there is a need to differentiate the concurrent tasks within the main problem. It is the dexterity of the programmers. 3.5. Data Distribution It is a big challenge to distribute the data which creates problem. In the parallelism there are so many processors which are working cooperatively. Now a day, the principle of locality is important for the better performance of the systems. But in the case of parallelism it becomes the problem or a decision making event which data to be localized for the particular processor. It is due to the concept of independent cache memories for each processor in the shared memory systems. For the parallel programmers, it becomes issue to manage it carefully. The performance of the system increases as we store more data in the caches because the processor can access it quickly as compared to the shared memory area. 3.6. Inter-process Communication When we are going to execute a process on two or more processors, it becomes necessary to make communication among them for transferring data from one processor's cache memory to another processor's cache memory. So here is the need of maintaining caches of the processors with the mechanism called cache coherence that may be implemented via hardware or cache coherence protocols. Another case may be that the processors may have distributed memories and all the processors need to be communicated properly. There may be the need of explicit calls to a library which require transferring values among processors. There may be the communication overheads which must be minimized to get the advantage of the parallelism. 3.7. Computational Load Balancing In the parallelism, there are two or more processors or separate machines which are connected through the network, to take the advantage of the parallelism all the processors or machines must be utilized properly and equally. The total computation must be equally distributed among the processors or machines for getting the benefits of high performance computing. 3.8. Variable Definitions Two types of variables may be used in the programming languages namely mutable and definitional. The mutable variables are the normal variables which are used in the sequential programming languages. The assignment may be done to the variables and that may change during the program execution. The definitional variables are those variables in which we can 49 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 assign values only once and they can be accessed by any number of tasks. In such variables there is no need to maintain synchronization. 3.9. Parallel Compositions In the execution process, the statements are executed one after another and they also have additional sequential as well as conditional statements in the sequential programming language. To achieve the parallelism, the parallel statements must be added which becomes the additional threads of control to start the execution. 3.10. Program Structures There may be two types of parallel program execution models. Firstly, transformational in which the main task is to transform the input data into the correct output value. Secondly, reactive or responsive in which the programs works regarding the events which are the external one. 3.11. Ease of Programming and Debugging This is the issue for every type of programming language. The parallel programs must be easily implemented by the programmers. They do not require thinking more about the parallelism. The parallelism should be tackled by the programming language platforms. It is common to be bugs in the program implementation and there are so many side-effects of these bugs. So these may be removed easily with the help of good debugging tools. 4. PARALLEL PROGRAMMING APPROACHES There are basically three approaches to program high performance computers (parallel computers). These are as follows: 4.1. Implicit Parallelism It is also known as automatic parallelism. This approach is headache free for the programmer’s point of view; here the complete working is done by the compilers to make parallel all of the executions [11]. All the parallel language constructs are inherently implemented by the language platform. Such type of job is always done in the pure functional programming languages. With the help of this approach the existing code is utilized on parallel systems. No changing is required in the existing code. It saves the development costs. And it is attractive for the vendors of the high performance computing. Such type of parallelism has its own advantages as well as drawbacks. The advantages are as follows: Firstly, programmer's attention is completely on the algorithms. Secondly, we require very less code for programming. Thirdly, the productivity of the programmers increases as he/she does not care about the parallel programming constructs. Fourthly, the definitions of the algorithms are separated from the parallel executions. Fifthly, the legacy systems are utilized properly and which is the concept of re-usability. The drawbacks are as follows: Firstly, the complete parallelism is not achieved because the programmers have much more information of the parallel potential (not efficient). Secondly, the 50 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 programmers have not the exact control over the parallelism. Thirdly, there is no optimum parallel efficiency achieved. Fourthly, the algorithms which are already implemented may be executed with a low configuration system (architecture + memory) a few or more decade ago. But the recent configurations are very high with more storage capacity and processor speeds. Fifthly, it is a tough task for the scientists and researchers to design the parallel compilers. 4.2. Explicit Parallelism In it the existing programming languages are utilized. The proper extensions are made to them to achieve all the parallel programming constructs [11]. Here the parallel programming principles are defined explicitly by the programmers. Explicit threading is a sub-approach of explicit parallelism in which the programmers creates parallel threads explicitly [22, 23].The explicit parallelism also has its own advantages and disadvantages. The advantages are as follows: Firstly, the programmers are already trained in the existing language. Secondly, it is totally under the understanding and control of the programmers. The disadvantages are as follows: Firstly, it is very hard to debug and difficult to program for the programmers because everything is dependent on the creativity and thinking the programmers. Secondly, there is no standardization because there are so many extensions have been made by the developers with same functionality with different look. 4.3. Hybrid Parallelism It is the mixed up approach which combines the features of implicit as well as explicit parallelism. It will take the advantages of both the above mentioned technique. It is summarized that the language designers may design completely the new programming language paradigms which have all the parallel programming principles or constructs in it. 5. PARALLEL PROGRAMMING PARADIGMS There are too many paradigms available for utilizing the current machines with parallel architectures. Some of the parallel programming languages are as follows: 5.1. Message Passing Interface (MPI) It is a specification for message passing. It is de facto standard for the development of high performance computing applications for the distributed systems (heterogeneous networks) as well as parallel computers and clusters [12]. It has bindings for C, C++ and FORTRAN programming languages. It is highly portable environment. The workload partitioning as well as the work mapping are done explicitly be the programmers like Pthread [25] and UPC. All the communications between the processes take place with the help of message passing paradigm. In it one process sends the data to another process through message passing. 5.2. Fortress It is also a thread-based specification programming language to design the HPC applications [12]. The work management, workload portioning, as well as work mapping may be done implicitly by the compiler as well as explicitly by the programmers. All for loops are parallel by 51 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 default as implicit approach. The synchronization principles like reductions as well as atomic expression are specified by the programmers when there is a data competition in a program. 5.3. POSIX Threads (Pthreads) Programming It is actually a set of C language types as well as procedure calls and all these are maintained or defined in a library named as pthread.h [12]. It is the duty of the programmers to maintain the shared data among the threads for avoiding the deadlocks and data races [25]. The pthread's create function has four parameters the task run thread, attribute, tasks to run in routine call, and routine argument. All has been closed with the help of pthread’s exit function call. The workload partitioning and work mapping is done explicitly by the programmers. 5.4. OpenMP It is also thread based open specification for shared memory architectures. It provides compiler directives, callable runtime library, and environment variables which extends the existing programming languages C, C++, and FORTRAN. It is portable platform [12]. The worker management is done impliedly and a little programmer's effort is required for the workload partitioning and task mappings, they are also performed implicitly. Programmers are required to tell the parallel region with the help of the compiler directives. The synchronization is also maintained implicitly by the OpenMP. 5.5. CILK (pronunciation as ‘silk’) It is a multi-threaded programming language. It is appropriate for the recent multi-core CPU architectures. It is based on the traditional programming language C. Cilk a true parallel extension to C semantically with good performance [13]. In 1994, it was designed by the MIT scientists. In it the work-stealing scheduler is efficiently utilized. A Cilk program is a collection of Cilk procedures and every procedure has a sequence of threads. Every thread is non-blocking C language function which can run independently without waiting or suspension. 5.6. OpenMPI It is the programming tool which is specially designed for the poor scientific programmers for achieving simple and routine parallelism. It is based on the existing programming tool OpenMP [14]. It provides the sufficient directives for achieving the parallelism. All the directives are followed by the notation directive pragma ompi. The few of the directives are distvar (dim=dimension, sleeve=s size) for the distributed array on parallel processes; global for declaring the variable as global variable; for (reduction (operator: variable)) to parallelize the for loop; syn sleeve (var=variable list) for exchanging the sleeve data of the distributed array for correctness ; sync var (var=variable list, master=node id) for synchronizing the global variable by coping the master data to others; and single (master=node id) for executing the next block by one process only as a delegate for other processes. 5.7. JAVA It is the most popular programming language these days because we can create common applications on it and it also supports the parallelism through its multi-threading concept. It uses the Just in time (JIT) compiler and automatic garbage collection to perform the critical task [15]. 52 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 For transparent communication between Java Virtual Machines, it has Remote Method Invocation (RMI). It is utilized to develop high performance computing applications. 5.8. High Performance FORTRAN (HPF) Its name conveys that it is the extension of Fortran 90. It supports the parallel programming principles [16]. It supports the data parallel programming pattern in which one program has the complete control for the distribution of data among all the processors. It works in the distributed memory environment. It is a portable programming language. 5.9. Z-level Programming Language (ZPL) It is a language with parallelized compiler. It is particularly for the high performance computations such as the scientific as well as engineering. It abstracts the Flynn's MIMD (Multiple Instructions and Multiple Data) parallel architecture [17]. The applications developed in this language are portable and the performance is independent of the compiler as well as the machine. It is a good programming language, but the scientists and the engineers have not shown much interest in it. 5.10. Erlang It is a functional programming language. Firstly, it was introduced by the telecommunication giant Ericsson to build the telecommunication switches. Lately in 1998, it becomes open source software [18]. Concurrency is achieved through threads. The applications developed in this language are highly available as well as reliable. In this programming paradigm the explicit threading parallel mechanism is utilized in which the programmers create the explicit threads to achieve the parallelism [23]. 5.11. Unified Parallel C (UPC) It supports both types of architectures shared memory as well as distributed memory. It is based on the partitioned memory principle [12]. The complete memory is partitioned into many small memory areas for every thread. Every thread has a private memory as well as global memory which are shared among the same class of threads. A new principle is used to get high performance that is thread affinity in which memory access performance among the threads of same class is optimized [19]. Workload management in it is implied and the work partitioning as well as workers mapping may be implied or programmer controlled. The thread communication is maintained with the help of pointers. Three types of pointers are utilized here which are as follows: (i) the private pointers who works on their own address spaces, (ii) sharing pointer who works on the shared memory area, and (iii) sharing pointers to share, these are the sharing pointers who works on the other shared memory. So many synchronization mechanisms are utilized in this language like barrier, split phase barriers, fence, locks, and memory consistency control. It resemble with the MPI platform in workload partitioning and worker mapping. 5.12. Streams and Iteration in a Single Assignment Language (SISAL) It is a functional programming language. It offers automatic parallelism through its functional semantics. In it user-defined names are identifiers rather than variables. These identifiers are known as values rather than the memory locations [20]. These values are dynamic entities. The 53 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 identifiers are defined and bound to the values only for the time of execution. The Sisal Compiler is optimizing one which converts the source program into the object code with the execution time system parts needed to automatic managing of memory, tasks, and input/output. The parallelism can be controlled by the users also. In conclusion the programming language has an optimizing compiler with better runtime performance. 5.13. Laboratory Virtual Instrumentation Engineering Workbench (LabVIEW) It is visual programming language from National Instruments. It is a platform as well as development environment. It is also a data-flow programming language in which the execution is decided with the help of structure of a graphical block diagram by drawing the wires for the function nodes [21].These wires propagate the variables and the nodes starts to execute as soon as the input data is available. This programming language is basically utilized for the acquiring data and processing signals, instrument control, automating test and validation systems, and monitoring and controlling embedded systems. It may be run on a number of platforms like MS Windows, UNIX, Linux, and Mac OS X. Multiprocessing as well as multi-threaded hardware are automatically utilized by its inbuilt schedulers. We can also create distributed applications on this platform. Hence it is a good high performance computing technology. The nonprogrammers can also develop the good applications by dragging and dropping the virtual representations of the laboratory equipments to whom they are well-known. 5.14. Manticore Programming language It is a new functional parallel programming language. It is a heterogeneous programming language that provides the parallelism at multiple levels. It provides coarse-grained, explicit parallelism based on Concurrent ML platform. It supports the explicit concurrency with finegrain and implicit threads [22]. The synchronization is provided with first class synchronization message passing which well fits to the nature of the functional programming paradigms [23]. The locally-concurrent/globally-sequential garbage collector is implemented. 6. CONCLUSIONS In this construct, a little survey of parallel programming languages, their design approaches, and their constructs are presented. The current scenario is totally towards the parallelism to achieve the high performance computing (HPC) and the developers must be aware about the new concepts of the technology. And this article is good food for the novice parallel programming lovers who want to do much more in this field. REFERENCES [1] [2] [3] [4] B. Kahanwal & T. P. Singh, (2012) “The Distributed Computing Paradigms: P2P, Grid, Cluster, Cloud, and Jungle”, International Journal of Latest Research in Science and Technology, Vol. 1, No. 2, pp183-187. T. W. Pratt & M. V. Zelkowitz, (2009) Programming Languages: Design and Implementation, Prentice Hall. G. M. Amdahl, (1967) “Validity of Single Processor Approach to Achieving Large Scale Computing Capabilities”, Proc. of AFIPS Spring Joint Computer Conference, pp 483-485. P. J. Denning & J. B. Dennis, (2010) “The Resurgence of Parallelism”, Communication of the ACM, Vol. 53, pp 30-32. 54 International Journal of Programming Languages and Applications ( IJPLA ) Vol.4, No.1, January 2014 [5] [6] [7] [8] [9] [10] [11] [12] [13] [14] [15] [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] E. Kumm & R. Lea, (1994) “Parallel Computing Efficiency: Climbing the Learning Curve”, proc. of IEEE Region 10’s Ninth Annual International Conference (TENCON’ 94), Vol. 2, pp 728-732. Z. Xu & K. Hwang, (1992) “Language Constructs for Structured Parallel Programming”, proc. of International Parallel Processing Symposium, (IPPS), Beverly Hills, CA, pp 454-461. S. Akhter & J. Roberts, (2008) “Threading and Parallel Programming Constructs”, publisher, Intel Press, Intel Corporation, pp 1-22. H. Masuhara, S. Matsuoka & A. Yonezawa, (1996) “Implementing Parallel Language Constructs Using a Reflective Object-Oriented Language”, proc. of Reflection’96, pp 1-13. G. R. Andrews & F. B. Schneider, (1983) “Concepts and Notations for Concurrent Programming”, ACM Computing Survey, Vol. 15, pp 3-43. R. K. Buyya, S. T. Selvi & X. Chu, (2009) “Chapter - 14: Object--Oriented Programming with JAVA”, Tata McGraw Hill Education, Noida, pp 364-387. H. J. Sips, (1996) “Programming Languages for High Performance Computers”, Proc. of 19th CERN School of Computing, Netherland, pp 229-238. H. Kasim, V. March, R. Zhang & S. See, (2008) “Survey on Parallel Programming Model”, Proc. IFIP Int. Conf. Network and Parallel Computing, 5245, pp 266-275. R. D. Blumofe, C. F. Joerg, B. C. Kuszmaul, C. E. Leiserson, K. H. Randall & Y. Zhou, (1996) “Cilk: An Efficient Multithreaded Runtime System”, Journal Parallel and Distributed Computing, Vol. 37, pp 55-69. T. Boku, M. Sato, M. Matsubara & D. Takashashi, (2004) “OpenMPI -- OpenMP Like Tool for Easy Programming in MPI”, Proc. 6th European Workshop on OpenMP (EWOMP'04), pp 83-88. A. E. Walsh, J. Couch & D.~H. Steinberg, (2000) Java -- 2 Bible, Wiley Publishing. C. Koebel, D. Loveman, R. Schreiber, G. Steele (Jr.) & M. Zosel, (1994) The High Performance Fortran Handbook, MIT Press. L. Snyder, (2007) “The Design and Development of ZPL”, Proc 3rd ACM SIGPLAN History of Programming Languages Conf., pp 8--1--8--37. S. Vinoski, (2007) “Reliability with Erlang”, IEEE Internet Computing, Vol. 11, pp 79-81. P. Husbands, C. Iancu & K. Yelick, (2003) “A Performance Analysis of hte Berkeley UPC Compiler”, In: ACM ICS 2003: Proc. of the 17th Annual Int. Conf. on Supercomputing, New York, pp 63-73. J. L. Gaudiot, W. Bohm, W. Najjar, T. DeBoni, J. Feo & P. Miller, (1997) “The Sisal Model of Functional Programming and its Implementation”, Proc. 2nd Aizu Int. Symp. on Parallel Algorithms Architectures Synthesis (pAs '97), Aizu-Wakamatsu, Japan, pp 1-12. T. Bress, (2013) “Effective LabVIEW Programming”, National Technology and Science Press, Allendale, NJ. M. Fluet, N. Ford, M. Rainey, J. Reppy, A. Shaw & Y. Xiao, (2007) “Status Report: The Manticore Project”, Proc. of ACM SIGPLAN Workshop on ML, New York, pp 15-24. M. Fluet, L. Bergstrom, N. Ford, M. Rainey, J. Reppy, A. Shaw & Y. Xiao, (2010) “Programming in Manticore, a Heterogenous Parallel Functional Language”, in Proc. of the 3rd Summer School Conf. on Central European Functional Programming School, CEFP'09, Berlin, Heidelberg, pp 94145. R. L. Graham, G. M. Shipman, B. W. Barrett, R. H. Castain, G. Bosilca & A. Lumsdaine, (2006) “OpenMPI: A high-performance, heterogeneous MPI”, In 5th Int. Workshop on Algorithms, Models and Tools for Parallel Computing on Heterogenous Networks (HeteroPar '06), Barcelona, Spain, pp 1-9. B. Lewis & D. J. Berg, (1996) “PThreads Primer”, SunSoft Press--A Printice Hall Title. 55
6cs.PL
Spectrum Sharing for LTE-A Network in TV White Space Meghna Khaturia∗ , Sweety Suman∗ , Abhay Karandikar and Prasanna Chaporkar arXiv:1707.07676v1 [cs.NI] 24 Jul 2017 Department of Electrical Engineering, Indian Institute of Technology Bombay, Mumbai-400076 Email: {meghnak,sweetysuman,karandi,chaporkar}@ee.iitb.ac.in Abstract—Rural areas in the developing countries are predominantly devoid of Internet access as it is not viable for operators to provide broadband service in these areas. To solve this problem, we propose a middle mile Long Term Evolution Advanced (LTEA) network operating in TV white space to connect villages to an optical Point of Presence (PoP) located in the vicinity of a rural area. We study the problem of spectrum sharing for the middle mile networks deployed by multiple operators. A graph theory based Fairness Constrained Channel Allocation (FCCA) algorithm is proposed, employing Carrier Aggregation (CA) and Listen Before Talk (LBT) features of LTE-A. We perform extensive system level simulations to demonstrate that FCCA not only increases spectral efficiency but also improves system fairness. I. I NTRODUCTION The world has seen a vast growth in communication technology and yet 52% of the global population is still unconnected [1], majority of which live in developing countries. The broadband penetration in the rural areas of developing countries is even worse due to high cost of infrastructure, difficult terrain, sparse population density and low Average Revenue per User (ARPU). A low cost broadband access to the end users in these areas can be provided by deploying WiFi Access Points (APs). However, laying fiber to backhaul each and every Wi-Fi AP becomes infeasible as it is time consuming and expensive. If an optical Point of Presence (PoP) is located in the vicinity of a rural area, then a wireless middle mile network, as proposed in [2], can be established to connect the optical PoP to the WiFi APs in the villages. A possible solution for connecting the PoP to the APs is to use TV UHF band in the middle mile network as it is highly underutilized in many developing countries. In India, more than 100 MHz of TV UHF band (470-585 MHz) is unused (commonly referred to as TV white space) [3]. Owing to the propagation characteristics of this band, it is possible to obtain large coverage area even with low power transmission. This will enable the use of renewable energy sources which is a highly desirable feature to develop an affordable technology for rural areas. Consequently, the operators can be encouraged to deploy a middle mile network in these areas. However, a middle mile network using the TV UHF band is not a plug and play solution. As multiple operators have to coexist in the same band, there will be huge interference among them which will lead to low spectral efficiency. Hence, it is important to design a spectrum sharing scheme which not only increases the spectral efficiency but also guarantees a fair share of spectrum to the operators. The major challenge ∗ These authors have contributed equally to this work. in designing the above scheme is that it should be based on trivial information which can be easily availed from operators since they will be unwilling to share sensitive information. The above-mentioned spectrum sharing scenario is very similar to the limited spectrum pooling where a limited number of operators share a common pool of spectrum, obeying the rules of spectrum access set by multi-lateral agreements. Limited spectrum pooling has been studied in the context of heterogeneous networks in [4] and [5]. In [4], two operators pool equal bandwidth for sharing among small cells. An operator has preemptive priority over its own share of pooled spectrum. In [5], spectrum sharing is studied for a dense small cell network of two operators. In our system, the operators have equal priority over the spectrum in contrast to the preemptive nature of the scheme in [4]. Moreover, in [4], [5], scheduling information has to be shared among operators which is infeasible in general. In literature, game theoretic models are also employed to solve the problem of spectrum sharing. Two operators dynamically share the spectrum by playing a non-zero sum game in [6]. In [7], the authors model spectrum sharing among operators as a non-cooperative repeated game. The main concern in the above models is that it may result in inefficient Nash Equilibrium depending on the utility function selected by the operator. Moreover, the schemes discussed in [6], [7] do not guarantee fairness and are also difficult to implement in realistic scenario. All the above literature discusses the spectrum sharing among only two operators. Generalization to multiple operators has not been studied in literature and is a challenging problem that we tackle in this paper. In this paper, we address the above issues while solving the spectrum sharing problem in rural setting. The main contributions of this paper are: • • • Analysis of low power middle mile LTE-A network in TV UHF band with its coverage radius estimates. A graph theory based algorithm for spectrum sharing among multiple operators employing Listen Before Talk (LBT) and Carrier Aggregation (CA) features provided by LTE-A standard. Performance evaluation of the proposed algorithm by system level simulations using Network Simulator-3 (ns3) [8]. The organization of the rest of the paper is as follows. In Section II, we discuss spectrum sharing among multiple operators and also establish mathematical formulation for the same. In Section III, we propose a channel allocation algorithm to solve the spectrum sharing problem. In Section IV, we analyse the performance of the proposed algorithm using ns-3 simulations. Finally, Section V concludes the paper. II. S PECTRUM S HARING P ROBLEM A. Network Architecture We consider a middle mile LTE-A network operating in the TV UHF band. We assume that a portion of this band is available to multiple operators to deploy their networks in rural areas. This portion is divided into multiple orthogonal channels of equal bandwidth. The multi-operator middle mile network architecture is illustrated in Fig. 1. The network comprises of a centralized entity called the Spectrum Manager (SM) which is responsible for channel allocation to the operators. Multiple low power evolved NodeBs (eNBs) are deployed in a given area, preferably, in the vicinity of an optical PoP. Even though an eNB transmits at a very low power, the coverage area is typically large owing to the propagation characteristics of TV UHF band. Each operator has an entity called Gateway Controller (GC) which acts as an interface to communicate with the SM. Multiple LTE-A Customer Premise Equipments (CPEs) are served by each eNB. A CPE connects to one or many WiFi APs installed in a village. An end user accesses broadband services through a WiFi AP. We assume that the end users are uniformly distributed in a given area. The operator registers itself with the SM to access the TV UHF band. GC collects the topology details like antenna height, location and transmit power of each eNB under an operator and communicates it to the SM. No other details such as user scheduling information are shared to the SM for channel allocation. The SM then maintains a database of the information shared by GCs of all operators. The SM treats all operators equally. As we have considered that the end users are uniformly distributed in a given area, the average throughput requirement at each eNB is equal. Hence, an operator gives equal priority to all its eNBs. Note that in further discussion we consider each eNB as an independent network entity. Henceforth, we study the spectrum sharing problem with respect to an eNB, irrespective of the operator. The channel allocated by the SM is communicated to an eNB of an operator through its GC. Fig. 1: Overview of a multi-operator middle mile network For simplicity, we consider the Protocol Interference Model [9] to model the interference between eNBs. In accordance with this model, two eNBs interfere with each other if they are operating on the same channel and the euclidean distance between them is less than a certain threshold distance. The protocol model formulates interference state as a binary symmetric matrix, where each element of the matrix indicates whether or not the two eNBs interfere with each other. B. System Model Consider a set K = {1, 2, ..., K} representing total number of eNBs belonging to all the operators in the network. Let Lk = {1, 2, ..., Lk } be the set of Lk CPEs served by the eNBk ∀k ∈ K. The set of channels available at the SM is given by M = {1, 2, ..., M }. Also, let Mk ⊂ M be the set of channels assigned to eNBk . The eNBk allocates resources to its users from the assigned channels. The SM allocates channel to the eNBs depending on the interference state of the network. Let C = {ck,j |ck,j ∈ {0, 1}}KxK be a binary symmetric KxK matrix where (k, j) ∈ KXK, represents the interference state such that ck,j = 1 when eNBk and eNBj interfere with each other, else ck,j = 0. In addition to allocating channels, SM also defines the mode in which the channel has to be used. The mode of access can be shared or dedicated. If the mode of a channel assigned to an eNB is dedicated, then that channel does not get allocated to its neighbours. If the mode of access of the assigned channel is shared, then it is to be shared with the neighbours using some sharing mechanism. The channel allocation is given by the two matrices A and B which are defined as follows: • • Channel Allocation Matrix (A): We define channel allocation matrix as A = {ak,m |ak,m ∈ {0, 1}}KxM where k ∈ K and m ∈ M such that ak,m = 1, if channel m is assigned to eNBk , otherwise ak,m = 0. Mode Allocation Matrix (B): B = {bk,m |bk,m ∈ {0, 1}}KxM is a K by M binary matrix where k ∈ K and m ∈ M. B represents the mode of access on the allocated channel such that bk,m = 1, if allocated channel ak,m is to be shared, otherwise bk,m = 0. SM assigns a single channel or multiple channels to an eNB. Carrier Aggregation (CA) feature is required at eNB for cross channel scheduling of resources [10]. When the mode of the allocated channel is shared, Listen Before Talk (LBT) is used for sharing the channel. LBT is a mechanism in which a radio transmitter performs Clear Channel Assessment (CCA) to opportunistically transmit over an idle channel. The LBT mechanism has been discussed for the coexistence of LTE-A and Wi-Fi system [11]. We have used LBT for the coexistence among LTE-A systems in this work. Once the channel assignment is done by the SM, an eNB allocates resources from the assigned channels to its associated CPEs in a proportional fair manner. The sum throughput at eNBk is a function of A and B and is given by Tk (A, B). We quantify the fairness F of the system using Jain’s Fairness Index (JFI) as below: 2 K P Tk (A, B) F = k=1K . (1) P 2 Tk (A, B) K× k=1 C. Problem Formulation The spectrum sharing problem can be modeled as a system throughput maximization problem under the fairness constraint. Mathematically, the problem can be stated as follows: ! K X ? ? (A , B ) = arg max Tk (A, B) , (2) A,B k=1 subject to F > δ. where δ is the constrained value of fairness. There are two major challenges in obtaining an optimal solution of this problem. Firstly, this is a combinatorial optimization problem which is known to be NP-complete. Secondly, to determine an optimal solution, a closed form expression for throughput is required at the eNB. The mathematical expression for LBT throughput can be obtained only for a network which forms a complete graph. In our case the network graph is not complete. Therefore, in the following section, we propose a heuristic based graph theoretic algorithm to solve the above problem sub-optimally. III. FAIRNESS C ONSTRAINED C HANNEL A LLOCATION (FCCA) We first review the traditional graph coloring problem and then describe FCCA algorithm in detail. The system can be modeled as a conflict graph G(V, E), where V represents set of all eNBs and E denotes the set of edges. An edge between any two eNBs implies that the eNBs are interfering with each other i.e. E := {(k, j)|ck,j = 1, ∀k, j ∈ K} where ck,j is an element of the interference matrix, C defined in Section II-B. In the traditional Graph Coloring problem, colors are to be assigned to the vertices such that vertices with an edge between them do not get the same color. The colors represent the available set of channels denoted by M. Note that the numbers of colors i.e. the channels are considered to be fixed. We now exploit the above graph coloring technique in our algorithm. The FCCA algorithm takes graph G as an input and outputs the allocation matrices, A and B. Here, G is the graph representing the network as discussed above. In this method, the channels are assigned to the eNBs according to two sub-algorithms which are described next. 1) Multiple Dedicated Channel Allocation (MDCA): In this sub-algorithm, multiple dedicated channels are assigned to an eNB by using greedy graph-coloring method iteratively. It is possible to assign multiple channels to an eNB if the total number of neighbours of an eNB is less than the total number of channels. 2) One Dedicated Rest Shared Channel Allocation (ODRSCA): In this sub-algorithm, the channel assignment is done in two steps. In the first step, a single dedicated channel is assigned to each eNB. Then, the set Nk , containing all the channels which are not assigned to the neighbours of eNBk is obtained. In the second step, all the channels contained in Nk are assigned to eNBk in shared mode. For a given network topology, the output of the above mentioned sub-algorithms are compared to decide the final channel allocation as described in Algorithm 1. There is always a guarantee that at least one channel will be allocated to each eNB irrespective of which sub-algorithm is chosen. Hence, a certain level of fairness is always ensured. Ideally, the value of δ should be equal to 1 for complete fairness. However, if we give more preference to the fairness, the system throughput will be compromised. Hence, we choose the above δ equal to 0.75 to strike a balance between throughput and fairness. Algorithm 1 Fairness Constrained Channel Allocation Require: Graph G δ = 0.75 Sub-Algorithm 1 : MDCA while Nk is non empty for all K do for each k from 1 to K do find Ek , set of channels assigned to neighbours of k obtain Nk = {M} \ {Ek }, set of feasible channels for eNBk , q ← min Nk , ak,q ← 1, bk,q ← 0 end for end while T1 ← T (A, B), F1 ← F (A, B), A1 ← A, B1 ← B Sub-Algorithm 2 : ODRS-CA for each k from 1 to K do find Ek obtain Nk = {M} \ {Ek } q ← min Nk , ak,q ← 1, bk,q ← 0 end for for each k from 1 to K do find Ek obtain Nk = {M} \ {Ek } ak,q ← 1, bk,q ← 1 ∀q ∈ Nk end for T2 ← T (A, B), F2 ← F (A, B), A2 ← A, B2 ← B Result: Check F1 and F2 and choose (A? , B ? ) such that the fairness is greater than δ. If both are greater than δ then choose (A? , B ? ) corresponding to max(T1 , T2 ). return A∗ , B ∗ IV. P ERFORMANCE A NALYSIS In this section, we present the results of ns-3 simulations to assess the performance of FCCA algorithm. We also compare the proposed approach with few other coexistence approaches. TABLE I: Simulation Parameters Parameters Central Frequency(fc ) Transmit Power (Pt ) Receiver Sensitivity (RS) Cable Loss (CL) Receiver Noise Figure (N F ) Transmitter Antenna Gain (Gt ) Receiver Antenna Gain (Gr ) Transmitter Antenna Height (ht ) Receiver Antenna Height (hr ) Slot Time Transmit Opportunity (T xOp) Detection Threshold Simulation time where RS, Pt , Gt , Gr , CL, N F , ht , hr and fc are as per the Table I. P L(d, ht , hr , fc ) is the path loss which is also a function of distance d between transmitter and receiver. Hata model for Suburban Areas is used to calculate path loss [12]. The transmit power, Pt , of an eNB is 18 dBm which is significantly low. For the values of the parameters given in Table I, the coverage radius of eNB comes out to be approximately 3 km. C. Results Values 500-520 MHz 18 dBm −101 dBm [13] 2 dB 7 dB 10 dB 0 dB 30 m 5m 9 µs 10 ms −62 dBm 30 s A. Scenario Description We assume that 20 MHz of the TV UHF band is available for middle mile network. This band is further divided into 4 orthogonal channels of 5 MHz each. All channels are assumed to be identical. As the rural areas are sparsely populated, we assume that an eNB will not get interference from three or more eNBs. The eNBs are deployed uniformly at random in an area of 100 km2 as shown in Fig. 2. The CPEs are distributed uniformly within the coverage area of an eNB. Each eNB is assumed to serve 5 stationary CPEs. For constructing the conflict graph using protocol interference model, we consider a distance of 4 km between eNBs. If the distance between eNBs is less than 4 km, then they interfere with each other. We perform ns-3 simulations over 100 random topologies. All the performance metrics are averaged over such realizations. The simulation parameters are given in Table I. With a static rural environment along with stationary CPEs, it is reasonable to rule out fast fading effects in our scenario. We consider only saturated downlink transmission in this work i.e. at each eNB, saturated traffic is generated for each of the associated CPEs. 10000 eNB CPE 2 8000 Y Coordinates 3 6000 4000 1 4 2000 0 0 2000 4000 6000 8000 10000 X Coordinates Fig. 2: An example topology of the network. B. Coverage Radius of eNB operating in TV UHF band The coverage radius of a transmitter is defined as the maximum allowed distance between the transmitter and the receiver such that they can communicate. We calculate the coverage radius of an eNB using the equation: RS = Pt + Gt + Gr − P L(d, ht , hr , fc ) − CL − N F, (3) We analyze three performance metrics to assess the performance of the proposed FCCA algorithm: a) Spectral Efficiency b) Average System Throughput per eNB and c) Jain’s Fairness Index. The performance of these metrics are observed with respect to an increase in the network density i.e. we increase the number of eNBs from 3 to 10 in a fixed area of 100 km2 . In our results we present spectral efficiency per eNB which is measured in bits/s/Hz. We have used Jain’s Fairness Index to quantify how fairly the available band is shared among the eNBs. In Fig. 3, we compare the spectral efficiency and the average system throughout of FCCA with two other schemes i) LTE with no-coexistence mechanism ii) LTE with LBT as the coexistence mechanism. Clearly, the FCCA algorithm outperforms both the schemes in both the metrics. In the first scheme, the entire 20 MHz band is used by all eNBs without any coexistence mechanism. Here the spectral efficiency is poor due to interference among the eNBs. In the second scheme, the entire 20 MHz band is shared among all the eNBs using LBT. In this case, the performance is poor as the transmission time is wasted in contention. The FCCA algorithm performs better than the above schemes as it takes the topology into consideration for allocating the channels. As shown in Fig. 4, the fairness of the FCCA algorithm is also better than the other two schemes. The proposed algorithm guarantees an excellent fairness index of 0.76 even in the case 10 eNBs per 100 km2 . It is important to analyse the performance of the proposed algorithm under the best case and the worst case scenario. Consider a very sparse network (best case) where only three eNBs are deployed in the given area. When 100 random topologies are simulated under this setting, it is observed that in 50% of the cases MDCA is preferred and in the remaining cases ODRS-CA is preferred. This result highlights the fact that orthogonal channel allocation may not always give the best result. In a very dense network (worst case) where 10 eNBs are deployed in the given area, in 61% cases ODRSCA is preferred between the two sub-algorithm. This result further emphasizes the use of LBT as sharing mechanism for better system performance in terms of spectral efficiency and fairness. D. Average Throughput vs Demand We now consider a typical rural setting in India. An optical PoP is present at the village office called Gram Panchayat (GP) which typically serves 2 villages. Approximately 5 GPs are present in an area of 100 km2 serving 10 villages. The average (a) Spectral Efficiency of eNB vs. number of eNBs deployed in 100 km2 area (b) Average throughput per eNB vs. number of eNBs deployed in 100 km2 area Fig. 3: Comparative analysis of average system throughput and spectral efficiency for the three schemes. operators in a network. We have also compared the obtained average throughput with the throughput demand generated by a rural setting in India. We note that the proposed scheme easily meets the throughput demand in a rural area. R EFERENCES Fig. 4: An example topology of the network. population of a village in India is 1000. There is one subscriber per household i.e. one person in a house of 5 will subscribe to broadband service. Consider a minimum broadband throughput of 2 Mbps with the contention ratio of 1 : 50. Thus, the average throughput requirement under the above scenario is (1000 people×10 villages×2 Mbps)/(50 × 5) = 80 Mbps. If 5 eNBs are deployed, each at one GP, the average throughput demand that can be served using FCCA algorithm is approximately 83 Mbps. Hence, the average throughput requirement of the above setting can be easily met. V. C ONCLUSION We have discussed the problem of poor broadband penetration in rural areas of developing countries. To solve this problem, we have proposed a middle mile LTE-A network operating in TV UHF band. We have presented a centralized graph theory based channel allocation algorithm with a novel concept of allocating a combination of shared and dedicated channel to an eNB. The performance of the algorithm has been studied using ns-3 simulations. The results demonstrate that it increases both the spectral efficiency and the fairness among [1] http://www.broadbandcommission.org/documents/reports/ bb-annualreport2016.pdf. [2] A. Kumar, A. Karandikar, G. Naik, M. Khaturia, S. Saha, M. Arora and J. Singh, “Toward enabling broadband for a billion plus population with TV white spaces,” IEEE Communications Magazine, vol. 54, no. 7, pp. 28-34, July 2016. [3] G. Naik, S. Singhal, A. Kumar and A. Karandikar, “Quantitative assessment of TV White Space in India,” National Conference on Communications (NCC), pp. 16, 2014. [4] A. Alsohaily and E. S. Sousa, “Spectrum sharing LTE-advanced small cell systems,” International Symposium on Wireless Personal Multimedia Communications, Atlantic City, NJ, 2013, pp. 1-5. [5] Y. Teng, Y. Wang and K. Horneman, “Co-primary spectrum sharing for denser networks in local area,” International Conference on Cognitive Radio Oriented Wireless Networks and Communications, Oulu, 2014, pp. 120-124. [6] H. Kamal, M. Coupechoux and P. Godlewski, “Inter-operator spectrum sharing for cellular networks using game theory,” International Symposium on Personal, Indoor and Mobile Radio Communications, Tokyo, 2009, pp. 425-429. [7] B. Singh, K. Koufos, O. Tirkkonen and R. Berry, “Co-primary interoperator spectrum sharing over a limited spectrum pool using repeated games,” International Conference on Communications, London, 2015, pp. 1494-1499. [8] https://www.nsnam.org. [9] K. Jain, J. Padhye, V. N. Padmanabhan and L. Qiu. “Impact of interference on multi-hop wireless network performance,” in Proceedings of the 9th annual international conference on Mobile computing and networking, MOBICOM, 2003, New York, pp. 66-80. [10] http://www.3gpp.org/technologies/keywords-acronyms/ 101-carrier-aggregation-explained. [11] 3GPP Technical specifications TS 36.889: https://portal.3gpp.org/ desktopmodules/Specifications/SpecificationDetails.aspx?specificationId= 2579. [12] M. Hata, “Empirical formula for propagation loss in land mobile radio services,” IEEE Transactions on Vehicular Technology, vol. 29, no. 3, pp. 317-325, Aug 1980. [13] http://www.etsi.org/deliver/etsi ts/136100 136199/136104/11.02.00 60/ ts 136104v110200p.pdf.
7cs.IT
c 2018 IEEE. Personal use of this material is permitted. Permission from IEEE must be obtained for all other uses, in any current or future media, including reprinting/republishing this material for advertising or promotional purposes, creating new collective works, for resale or redistribution to servers or lists, or reuse of any copyrighted component of this work in other works. Pre-print of article that will appear in the 2018 IEEE Robotics and Automation Letters (RA-L). arXiv:1709.09905v3 [cs.RO] 16 Feb 2018 Please cite this paper as: A. Gawel, C. Del Don, R. Siegwart, J. Nieto, and C. Cadena. (2018). "X-View: Graph-Based Semantic Multi-View Localization" in IEEE Robotics and Automation Letters (RA-L), 2018. bibtex: @inproceedings{gawel2018x-view, title={X-View: Graph-Based Semantic Multi-View Localization}, author={Gawel, Abel and Del Don, Carlo and Siegwart, Roland and Nieto, Juan and Cadena, Cesar}, booktitle=IEEE Robotics and Automation Letters (RA-L)}, year={2018} } 1 X-View: Graph-Based Semantic Multi-View Localization Abel Gawel∗ , Carlo Del Don∗ , Roland Siegwart, Juan Nieto and Cesar Cadena Abstract—Global registration of multi-view robot data is a challenging task. Appearance-based global localization approaches often fail under drastic view-point changes, as representations have limited view-point invariance. This work is based on the idea that human-made environments contain rich semantics which can be used to disambiguate global localization. Here, we present X-View, a Multi-View Semantic Global Localization system. X-View leverages semantic graph descriptor matching for global localization, enabling localization under drastically different view-points. While the approach is general in terms of the semantic input data, we present and evaluate an implementation on visual data. We demonstrate the system in experiments on the publicly available SYNTHIA dataset, on a realistic urban dataset recorded with a simulator, and on real-world StreetView data. Our findings show that X-View is able to globally localize aerial-to-ground, and ground-to-ground robot data of drastically different view-points. Our approach achieves an accuracy of up to 85 % on global localizations in the multi-view case, while the benchmarked baseline appearance-based methods reach up to 75 %. Index Terms—Localization, Semantic Scene Understanding, Mapping I. INTRODUCTION LOBAL localization between heterogeneous robots is a difficult problem for classic place-recognition approaches. Visual appearance-based approaches such as [1, 2] are currently among the most effective methods for relocalization. However, they tend to significantly degrade with appearance changes due to different time, weather, season, and also view-point [3, 4]. In addition, when using different sensor modalities, the key-point extraction becomes an issue as they are generated from different physical and geometrical properties, for instance intensity gradients in images vs. highcurvature regions in point clouds. Relying on geometrical information, directly from the measurements or from a reconstruction algorithm, on the other hand shows stronger robustness on view-point changes, seasonal changes, and different sensor modalities. However, geometrical approaches typically do not scale well to very large environments, and it remains questionable if very strong view-point changes can be compensated while maintaining G This work was supported by European Union’s Seventh Framework Programme for research, technological development and demonstration under the TRADR project No. FP7-ICT-609763 and by the National Center of Competence in Research (NCCR) Robotics through the Swiss National Science Foundation. ∗ The authors contributed equally to this work. Authors are with the Autonomous Systems Lab, ETH Zurich. [email protected], [email protected], {rsiegwart, nietoj, cesarc}@ethz.ch Figure 1: X-View globally localizes data of drastically different view-points using graph representations of semantic information. Here, samples of the experimental data is shown, i.e., semantically segmented images from the publicly available SYNTHIA and the Airsim datasets. The localization target graph is built from data of one view-point (right images), while the query graph is built from sequences of another view-point (left images). X-View efficiently localizes the query graph in the target graph. only a limited overlap between the localization query and database [5, 6]. Another avenue to address appearance and view-point changes are Convolutional Neural Network (CNN) architectures for place recognition [4, 7]. While these methods show strong performance under appearance changes, their performance is still to be investigated under extreme view-point variations. Recently, topological approaches to global localization regained interest as a way to efficiently encode relations between multiple local visual features [8, 9]. On the other hand, the computer vision community has made great progress in semantic segmentation and classification, resulting in capable tools for extracting semantics from visual and depth data [10– 12]. Based on the hypothesis that semantics can help to mitigate the effects of appearance changes, we present X-View, a novel approach for global localization based on building graphs of semantics. X-View introduces graph descriptors that efficiently represent unique topologies of semantic objects. These can be matched in much lower computational effort, therefore not suffering under the need for exhaustive sub-graph matching [13]. 2 By using semantics as an abstraction between robot viewpoints, we achieve invariances to strong view-point changes, outperforming CNN-based techniques on RGB data. Furthermore, with semantics understanding of the scene, unwanted elements, such as moving objects can naturally be excluded from the localization. We evaluate our global localization algorithm on publicly available datasets of real and simulated urban outdoor environments, and report our findings on localizing under strong view-point changes. Specifically, this paper presents the following contributions: • A novel graph representation for semantic topologies. • Introduction of a graph descriptor based on random walks that can be efficiently matched with established matching methods. • A full pipeline to process semantically segmented images into global localizations. 1 • Open source implementation of the X-View algorithm . • Experimental evaluation on publicly available datasets. The remainder of this paper is structured as follows: Sec. II reviews the related work on global localization, followed by the presentation of the X-View system in Sec. III. We present our experimental evaluation in Sec. IV and conclude our findings in Sec. V. II. RELATED WORK In this section we review the current state-of-the-art in multi-robot global localization in relation to our proposed system. A common approach to global localization is visual feature matching. A large amount of approaches have been proposed in the last decade, giving reliable performance under perceptually similar conditions [1–3]. Several extensions have been proposed to overcome perceptually difficult situations, such as seasonal changes [14, 15], daytime changes [4, 16], or varying view-points using CNN landmarks [7, 17]. However, drastic view-point invariance, e.g., between views of aerial and ground robots continues to be a challenging problem for appearancebased techniques. In our previous work, we demonstrated effective 3D heterogeneous map merging approaches between different viewpoints from camera and LiDAR data, based on overlapping 3D structural descriptors [5, 6]. However, 3D reconstructions are still strongly view-point dependent. While these techniques do not rely on specific semantic information of the scenes, the scaling to large environments has not yet been investigated, and computational time is outside real-time performance with large maps. Other approaches to global localization are based on topological mapping [18, 19]. Here, maps are represented as graphs G = (V , E) of unique vertices V and edges E encoding relationships between vertices. While these works focus on graph merging by exhaustive vertex matching on small graphs, they do not consider graph extraction from sensory data or ambiguous vertices. Furthermore, the computationally expensive matching does not scale to larger graph comparisons. 1 https://github.com/ethz-asl/x-view With the recent advances in learning-based semantic extraction methods, using semantics for localization is a promising avenue [20–22]. In [21, 22] the authors focus on the data association problem for semantic localization using Expectation Maximization (EM) and the formulation of the pose estimation problem for semantic constraints as an error minimization. The semantic extraction is based on a standard object detector from visual key-points. Stumm et al. [8] propose to use graph kernels for place recognition on visual key-point descriptors. Graph kernels are used to project image-wise covisibility graphs into a feature space. The authors show that graph descriptions can help localization performance as to efficiently cluster multiple descriptors meaningfully. However, the use of large densely connected graphs sets limitations to the choice of graph representation. Motivated, by these findings, we propose to use graph descriptors on sparse semantic graphs for global localization. III. X-VIEW In this section, we present our Graph-Based Multi-View Semantic Global Localization system, coined X-View. It leverages graph extraction from semantic input data and graph matching using graph descriptors. Fig. 2 illustrates the architecture of the proposed global localization algorithm, focusing on the graph representation and matching of query semantic input data to a global graph. The localization target map is represented as the global graph. X-View is designed to operate on any given odometry estimation system and semantic input cue. However, for the sake of clarity, we present our system as implemented for semantically segmented images, but it is not limited to it. A. System input We use semantically segmented images containing pixelwise semantic classification as input to the localization algorithm. These segmentations can be achieved using a semantic segmentation method, such as [11, 12]. Also instance-wise segmentation, i.e., unique identifiers for separating overlapping objects of same class in the image space can be considered for improved segmentation, but is not strictly necessary for the approach to work. Furthermore, we assume the estimate of an external odometry system. Finally, we also consider a database semantic graph Gdb , as it could have been built and described on a previous run of our graph building algorithm as presented in the next sub-sections. B. Graph extraction and assembly In this step, we convert a sequence of semantic images I q into a query graph Gq . We extract blobs of connected regions, i.e., regions of the same class label lj in each image. Since semantically segmented images often show noisy partitioning of the observed scene (holes, disconnected edges and invalid labels on edges), we smooth them by dilating and eroding the boundaries of each blob. We furthermore reject blobs smaller than a minimum pixel count to be included in the graph, to 3 Semantic segmentation Odometry system Frame-wise graph extraction Sub-graph assembly Random walk extraction Descriptor matching Global localization estimation loop closure graph fusion visualization etc. Global graph Figure 2: X-View global localization system overview. The inputs to the system are semantically segmented frames (e.g., from RGB images) and the global graph Gdb . First, a local graph is extracted from the new segmentation. Then, the sub-graph Gq is assembled and random walk descriptors are computed on each node of Gq . The system matches the sub-graph random walk descriptors to Gdb , e.g., recorded from a different view-point. Finally, the matches are transferred to the localization back-end module to estimate the relative localization between Gq and Gdb . Consecutively, the relative localization can be used for various purposes such as loop closure, fusing Gq into Gdb or for visualization. mitigate the effect of minor segments. This process removes unwanted noise in the semantically segmented images. The magnitude of this operation is 4 pixels, and has a minor effect on the segmentation result. However, it ensures clean boundaries between semantic segments. Furthermore, the center location pj of the blobs are extracted and stored alongside the blob labels as vertices vj = {lj , pj }. In the case that also instance-wise segmentation is available, it can be considered in the blob extraction step, otherwise the extraction operates only on a class basis. The undirected edges ej between vertices are formed when fulfilling a proximity requirement, which can be either in image- or 3D-space. In the case of image-space, we assume images to be in a temporal sequence to grow graphs over several frames of input data. However, this is not required in the 3D case. Using a depth channel or the depth estimation from, e.g., optical flow, the neighborhood can be formed in 3D-space, using the 3D locations of the image blobs to compute a Euclidean distance. The process is illustrated for image data in Fig. 3 (top). Then, several image-wise graphs are merged into Gq by connecting vertices of consecutive images using their Euclidean distance, see Fig. 3. To prevent duplicate vertices of the same semantic instance, close instances in Gq are merged into a single vertex, at the location of the vertices’ first observation. The strategy of merging vertices into their first observation location is further motivated by the structure of continuous semantic entities, such as streets. This strategy leads to evenly spaced creation of continuous entities’ vertices in Gq . C. Descriptors X-View is based on the idea that semantic graphs hold high descriptive power, and that localizing a sub-graph in a database graph can yield good localization results. However, since subgraph matching is an NP-complete problem [13], a different regime is required to perform the graph registration under real-time constraints, i.e., in the order of seconds for typical robotic applications. In this work, we extract random walk descriptors for every node of the graph [23], and match them in a subsequent step. This has the advantage that the descriptors can be extracted and matched in constant or linear time, given a static or growing database-graph, respectively. Figure 3: Extraction of semantic graphs from one image (top) and a sequence of images (bottom). Vertices are merged and connected from sequences of input data. Note that we omitted some vertices and edges in the sample graphs on the right side for visualization purposes and reduced the graph to a planar visualization, whereas the semantic graphs in our system are connected in 3D-space. The ellipses around each vertex were added for visualization and represent a scaled fitted ellipse on a semantic instance of the segmentation image. Each vertex descriptor is an n × m matrix consisting of n random walks of depth m. Each of the random walks originates at the base vertex vj and stores the class labels of the visited vertices. Walk strategies, such as preventing from immediate returns to the vertex that was visited in the last step, and exclusion of duplicate random walks can be applied to facilitate expressiveness of the random walk descriptors. The process of random walk descriptor extraction is illustrated in Fig. 4. D. Descriptor Matching After both Gq and Gdb are created, we find associations between vertices in the query graph and the ones in the database graph by computing a similarity score between the corresponding graph descriptors. The similarity measure is computed by matching each row of the semantic descriptor of the query vertex to the descriptor of the database vertex. The number of identical random walks on the two descriptors 4 Figure 4: Schematic representation of the random walk extraction. (Left) From a seed vertex, cyan star, the random walker explores its neighborhood. This results in the descriptor of n random walks of depth m (here, m = 4). The highlighted path corresponds to the last line of the descriptor on the right. (Right) Each line of the descriptor starts with the seed vertex label and continues with the class labels of the visited vertices. reflects the similarity score s, which is normalized between 0 and 1. In a second step, the k matches with highest similarity score are selected for estimating the location of the query graph inside the database map. E. Localization Back-End The matching between query graph and global graph, the robot-to-vertex observations, and the robot odometry measurements result in constraints θ i ⊆ Θ(pi , ci ) on the vertex positions pi and robot poses ci with θ i = eTi Ωi ei , the measurement errors ei , and associated information matrix Ωi . Specifically these three types of constraints are denoted as ΘM (pi ), ΘV (pi , ci ), and ΘO (ci ) respectively. The matching constraints ΘM (pi ) stem from the semantic descriptor matching of the previous step, while the robot odometry constraints ΘO (ci ) are created using the robots estimated odometry between consecutive robot poses associated to the localization graph. The robot-to-vertex constraints encode the transformation between each robot-to-vertex observation. Using these constraints, we compute a Maximum a Posteriori (MAP) estimate of P the robot pose ci by minimizing a negative log-posterior E = θ i , i.e., c∗i = argmin ci X Θ(pi , ci ) (1) with Θ(pi , ci ) = {ΘM (pi ), ΘV (pi , ci ), ΘV (pi )} This optimization is carried out by a non-linear Gauss-Newton optimizer. Optionally, the algorithm also allows to reject matching constraints in a sample consensus manner, using RANSAC on all constraints between Gq and Gdb , excluding the specific constraints from the optimization objective. We initialize the robot position at the mean location of all matching vertices’ locations from Gdb . IV. EXPERIMENTS We evaluate our approach on two different synthetic outdoor datasets with forward to rear view, and forward to aerial view, and one real world outdoor dataset with forward to rear view. In this section, we present the experimental set-up, the results, and a discussion. SYNTHIA AdapNet Airsim StreetView Figure 5: Sample images from the datasets used in the experiments: (top) RGB image, (middle) Depth image, (bottom) Semantic segmentation. (left) SYNTHIA with perfect semantic segmentation, (middle left) SYNTHIA with AdapNet semantic segmentation, (middle right) Airsim with perfect semantic segmentation, (right) StreetView with SegNet semantic segmentation. A. Datasets The first of the used datasets is the public SYNTHIA dataset [24]. It consists of several sequences of simulated sensor data from a car travelling in different dynamic environments and under varying conditions, e.g., weather and daytime. The sensor data provides RGB, depth and pixel-wise semantic classification for 8 cameras, with always 2 cameras facing forward, left, backwards and right respectively. The segmentation provides 13 different semantic classes which are labelled class-wise. Additionally, dynamic objects, such as pedestrians and cars are also labelled instance-wise. We use sequence 4, which features a town-like environment. The total travelled distance is 970 m. In the absence of suitable public aerial-ground semantic localization datasets, we use the photo-realistic Airsim framework [25] to generate a simulated rural environment2 . This environment is explored with a top-down viewing Unmanned Aerial Vehicle (UAV) and a car traversing the streets with forward-facing sensors. Both views provide RGB, depth and pixel-wise semantic classification data in 13 different classes with instance-wise labelling. Furthermore, both trajectories are overlapping with only an offset in z-direction and have a length of 500 m each. Please note that we used a pre-built environment, i.e., the objects in the environment have not specifically been placed for enhanced performance. Finally, we evaluate the system on a dataset gathered from Google StreetView imagery. The RGB and depth data of a straight 750 m stretch of Weinbergstrasse in Zurich are extracted via the Google Maps API 3 . Analogously to the SYNTHIA dataset, we use forward and backward facing camera views. While the travelled distance between two image locations in the Airsim dataset is always 1 m, it varies between 0 m to 1 m in the SYNTHIA dataset, and is approximately 10 m between two frames in the StreetView dataset. Sample images of all datasets are depicted in Fig. 5. Our approach relies on semantic representations of scenes. While we do not propose contributions on semantic extraction from raw sensor data, recent advances on semantic segmentation show ever increasing accuracies on visual and depth 2 http://robotics.ethz.ch/~asl-datasets/x-view/ 3 https://goo.gl/iBniJ9 5 data [10–12, 26]. We therefore evaluate the performance on SYNTHIA both using semantic segmentation with AdapNet [11], and the ground truth as provided by the dataset. On the Airsim data, we only use the segmentation from the dataset, and on the StreetView dataset, we use semantic segmentation with SegNet [12]. B. Experimental Setup We evaluate the core components of X-View in different experimental settings. In all experiments, we evaluate XView on overlapping trajectories and the provided depth and segmentation images of the data. First, we focus our evaluation of the different graph settings on the SYNTHIA dataset. We then perform a comparative analysis on SYNTHIA, Airsim, and StreetView. In SYNTHIA, we use the left forward camera for building a database map and then use the left backward camera for localization. Furthermore, we use 8 semantic classes of SYNTHIA: building, street, sidewalk, fence, vegetation, pole, car, and sign, and reject the remaining four classes: sky, pedestrian, cyclist, lanemarking. The AdapNet semantic segmentation model is trained on other sequences of the SYNTHIA dataset with different seasons and weather conditions. Analogously, we use the forward-view of the car in the Airsim dataset to build the database map and then localize the UAV based on a downward-looking camera. Here we use 6 classes (street, building, car, fence, hedge, tree) and reject the remaining from insertion into the graph (powerline, pool, sign, wall, bench, rock), as these are usually only visible by one of the robots, or their scale is too small to be reliably detected from the aerial robot. Finally, in the StreetView data, we use the forward view to build the database and localize using the rear facing view. Out of the 12 classes that we extract using the pre-trained SegNet model4 , we use five, i.e., (road, sidewalk, vegetation, fence, car), and reject the remaining as these are either dynamic (pedestrian, cyclist), unreliably segmented (pole, road sign, road marking), or omni-present in the dataset (building, sky). We build the graphs from consecutive frames in all experiments, and use the 3D information to connect and merge vertices and edges, as described in III-B. The difference between graph construction in image- and 3D-space is evaluated in a separate experiment. No assumptions are made on the prior alignment between the data. The ground-truth alignment is solely used for performance evaluation. C. Localization performance We generate the PR of the localization based on two thresholds. The localization threshold tL is applied on the distance between the estimated robot position c∗i and the ground truth position cgt . It is set as true, if the distance between c∗i and cgt is smaller than tL , i.e., kc∗i − cgt k ≤ tL , and to false for kc∗i − cgt k > tL . The margin tL on the locations is required, since Gq and Gdb do not create vertices in the exact same spot. The same node can be off by up to twice the distance that we 4 goo.gl/EyReyn use for merging vertices in a graph. Here, we use tL = 20 m for SYNTHIA and StreetView, and tL = 30 m for Airsim. For the PR curves, we vary the consistency threshold tc that is applied on the RANSAC-based rejection, i.e., the acceptable deviation from the consensus transformation between query and database graph vertices. The localization estimation yields a positive vote for an estimated consensus value s of s ≤ tc and a negative vote otherwise. Firstly, we evaluate the effect of different options on the description and matching using the random walk descriptors (i.e., random walk parameters, graph coarseness, number of query frames, dynamics classes, graph edge construction technique, and seasonal changes) as described in Sec. III-B - III-D. To illustrate the contrast to appearance-based methods, we also present results on two visual place recognition techniques based on BoW, as implemented by Gálvez-López and Tardos [2], and NetVLAD [4] on the datasets’ RGB data. To generate the PR of the reference techniques, we vary a threshold on the inverse similarity score for BoW, and a threshold on the matching residuals of NetVLAD. Furthermore, we show the performance of the full global localization algorithm on the operating point taken from the PR curves. Our performance metric is defined as the percentage of correct localizations over the Euclidean distance between c∗i and cgt . As for BoW and NetVLAD, we take localization as the best matching image. The localization error is then computed as the Euclidean distance between associated positions of the matched image and the ground truth image. To improve performance of the appearance-based methods, we select the operating points with high performances, i.e., high precisions in the PR curves. D. Results While we illustrate the effects of different attributes of XView in Fig. 6 as evaluated on SYNTHIA, we then also show a comparison on all datasets in Fig. 7. Fig. 6a depicts the effect of varying the random walk descriptors on the graph. Here, a descriptor size with number of random walks n = 200 and walk depth m between 3 − 5, depending on the size of Gq perform best. Both decreasing n or increasing m leads to a decrease in performance. These findings are expected, considering query graph sizes ranging between 20 − 40 vertices. Under these conditions, the graph can be well explored with the above settings. Descriptors with larger walk depth m significantly diverge between Gq and Gdb , as the random walk reaches the size limits of Gq and continues exploring already visited vertices, while it is possible to continue exploring Gdb to greater depth. Secondly, Fig. 6b presents PR-curves for different sizes of Gq , i.e., different numbers of frames used for the construction of Gq . An increase in the query graph size leads to a considerable increase of the localization performance. Also this effect is expected as Gq contains more vertices, forming more unique descriptors. However, it is also desirable to keep the size of Gq limited, as a growing query graph size requires larger overlap between Gq and Gdb . Furthermore, the computational time for descriptor calculation and matching grows with increased query graph size. 1.0 1.0 0.8 0.8 0.8 0.6 0.4 n=200, m=3 n=500, m=3 n=500, m=5 0.2 0.0 0.0 0.2 0.4 BoW NetVLAD Recall 0.6 Precision 1.0 Precision 0.6 0.4 30 frames 15 frames 0.2 0.8 0.0 0.0 1.0 0.2 Recall 0.6 0.6 0.4 0.8 0.0 0.0 1.0 0.8 0.8 0.8 0.6 0.4 0.0 0.0 0.2 0.4 3D to image BoW NetVLAD Recall 0.6 0.6 0.4 Static objects Dynamic objects All objects 0.2 0.8 1.0 0.0 0.0 (d) Construction type. 0.2 0.4 Recall BoW NetVLAD 0.6 0.4 Recall BoW NetVLAD 0.6 0.8 1.0 (c) Graph coarseness. 1.0 3D space Image space Image to 3D 0.2 (b) Query length. 1.0 0.2 Medium coarse Coarse Dense 0.2 1.0 Precision Precision (a) Descriptor parameters. 0.4 BoW NetVLAD Precision Precision 6 0.6 0.4 X-View Summer-Summer X-View Summer-Fall BoW Summer-Summer 0.2 0.8 1.0 (e) Number of Semantic classes. 0.0 0.0 0.2 0.4 Recall BoW Summer-Fall NetVLAD Summer-Summer NetVLAD Summer-Fall 0.6 0.8 1.0 (f) Seasonal changes on same view. 1.0 1.0 0.8 0.8 Precision Precision Figure 6: PR curves for localization of the rear view semantic images against a database graph built from the forward view on the SYNTHIA dataset (except (f)). For all plots we accept a localization if it falls within a distance of 20 m from the ground-truth robot position. This threshold corresponds to the value up to which query graph vertices of the same semantic instance can be off from their corresponding location in the database graph, caused by the graph construction technique. (a) illustrates the effect of different descriptor settings on the localization performance. (b) shows the effect of increasing the amount of frames used for query graph construction, while (c) depicts the effect of using coarser graphs, i.e., a large distance in which we merge vertices of same class label. In (d) we compare the extraction methods in image-, and 3D-space and in (e) the effect of including all semantic objects against including a subset of semantic classes. Lastly, in (f), we evaluate the localization performance on a configuration with the right frontal camera as query and the left frontal camera for the database, under the effect of seasonal changes. In contrast to the other plots where we use the ground truth, we use semantic segmentation with AdapNet on the data. The appearance-based techniques used are visual BoW [2] and NetVLAD [4]. 0.6 0.4 X-View SYNTHIA X-View Airsim NetVLAD SYNTHIA 0.2 0.0 0.0 0.2 0.4 NetVLAD Airsim BoW SYNTHIA BoW Airsim 0.6 0.6 0.4 X-View AdapNet SYNTHIA X-View SegNet StreetView NetVLAD SYNTHIA 0.2 0.8 0.0 0.0 1.0 0.2 0.4 Recall 0.8 1.0 (b) CNN-based Semantic Segmentation. 1.0 1.0 0.8 Success rate [%] Success rate [%] 0.6 Recall (a) Perfect Semantic Segmentation. X-View SYNTHIA X-View Airsim NetVLAD SYNTHIA NetVLAD Airsim BoW SYNTHIA BoW Airsim 0.6 0.4 0.2 0.0 NetVLAD StreetView BoW SYNTHIA BoW StreetView 0.8 X-View AdapNet SYNTHIA X-View StreetView NetVLAD SYNTHIA NetVLAD StreetView BoW SYNTHIA BoW StreetView 0.6 0.4 0.2 0 20 40 60 80 100 Localization Accuracy [m] (c) Perfect Semantic Segmentation. 0.0 0 20 40 60 80 100 Localization Accuracy [m] (d) CNN-based Semantic Segmentation. Figure 7: Localization performance of X-View on the SYNTHIA, Airsim, and the StreetView data compared to the appearance-based methods [2, 4]. The operation points are chosen according to the respective PR curves in (a) and (b), indicated as dots. (c) illustrates the performance on perfectly semantically segmented data on SYNTHIA, and Airsim. (d) shows the system’s performance on the SYNTHIA, and StreetView datasets using CNN-based semantic segmentation. Thirdly, Fig. 6c shows the impact of increased graph coarseness, i.e., larger distances of merging vertices. Here, the coarseness cannot be arbitrarily scaled to low or high values, as it leads to either over- or under-segmented graphs. Our best performing results were obtained with a vertex merging distance of 10 m for the SYNTHIA dataset, and 15 m for Airsim and StreetView datasets, respectively. Fourthly, Fig. 6d illustrates the effect of graph extraction in either image- or 3D-space. The extraction in 3D-space, taking advantage of the depth information as described in Sec. III-B shows superior performance. However, X-View still performs well when localizing a graph built in one space against a graph built in the other. Fifthly, Fig. 6e explores the inclusion of different object classes. The configurations are: Only static object classes, static object classes plus dynamic object classes, and all object 7 Module SYNTHIA Airsim Blob extraction 2.73 ± 0.65 1.76 ± 0.26 Construction of Gq 337.39 ± 92.81 257.40 ± 28.30 Random Walks Generation 1.38 ± 0.82 1.07 ± 0.56 Matching Gq to Gdb 7.30 ± 4.51 4.33 ± 1.25 Localization Back-End 22.50 ± 9.71 5.15 ± 0.63 Total 371.3 ± 108.5 269.71 ± 31.0 Table I: Timing results in ms, reporting the means and standard deviations per frame on the best performing configurations on SYNTHIA and Airsim. The timings were computed on a single core of an Intel Xeon E3-1226 CPU @ 3.30GHz. classes. Here, the results are not conclusive on the SYNTHIA dataset and more evaluations will be needed in the future. Lastly, Fig. 6f shows X-View’s performance under seasonal change. We compare the performance of localizing the query graph built from the right forward facing camera of one season in the database graph built from the left forward facing camera of another season. Here, we consider the summer and fall sequences of SYNTHIA. The BoW-based techniques perform well in this scenario if the seasonal conditions are equal. However, its performance drastically drops for inter-season localization, while X-View, and NetVLAD suffer much less under the seasonal change. The evaluation using PR-curves, and success rates over the localization error is depicted in Fig. 7. X-View has higher success rate in multi-view experiments than the appearancebased techniques on both synthetic datasets at our achievable accuracy of 20 m for SYNTHIA and 30 m on Airsim and using perfect semantic segmentation inputs as depicted in Fig. 7c. These accuracies are considered successful as node locations between Gq and Gdb can differ by twice the merging distance with our current graph merging strategy. On the considered operation point of the PR curve, X-View achieves a localization accuracy of 85 % within 30 m on Airsim, and 85 % on SYNTHIA within 20 m. Furthermore, X-View expresses comparable or better performance for multi-view localization than the appearancebased techniques using CNN-based semantic segmentation on the SYNTHIA, and StreetView datasets respectively. Here we consider successful localizations within 20 m for both datasets. The achieved accuracies on the chosen operation points are 70 % on SYNTHIA, and 65 % on StreetView. Finally, we also report timings of the individual components of our system in Table I. Here, the construction of Gq has by far the largest contribution, due to iteratively matching and merging frames into Gq . As the graphs in SYNTHIA consider more classes and smaller merging distances, these generally contain more vertices and therefore longer computational times. E. Discussion Global registration of multi-view data is a difficult problem where traditional appearance based techniques fail. Semantic graph representations can provide significantly better localization performance under these difficult perceptual conditions. We furthermore give insights how different parameters, choices, and inputs’ qualities affect the system’s performance. Our results obtained with X-View show a better localization performance than appearance-based methods, such as BoW and NetVLAD. During our experiments, we observed that some of the parameters are dependent on each other. Intuitively, the coarseness of the graph has an effect on the random walk descriptors as a coarser graph contains fewer vertices and therefore deeper random walks show decreasing performance as Gq can be explored with short random walks. On the other hand, an increasing amount of frames used for localization has the reverse effect on the descriptor depth as Gq potentially contains more vertices, and deeper random walks do not show a performance drop as they do for smaller query graphs. Also the success rate curves indicate that X-View outperforms the appearance based methods particularly in the presence of strong view-point changes. While the appearancebased methods fail to produce interesting results for the Airsim dataset, they have a moderate to good amount of successful localizations on SYNTHIA and StreetView. On the other hand, X-View has generally higher localization performance and does not show a strong drop in performance among datasets. While computational efficiency has not been the main focus of our research, the achieved timings are close to the typical requirements for robotic applications. Finally, we performed experiments both using ground truth semantic segmentation inputs, and CNN-based semantic segmentation. The performance with semantic segmentation using AdapNet [11] shows to be close to the achievable performance with ground truth segmentation on SYNTHIA. Using the SegNet [12] semantic segmentation on real image data from StreetView demonstrates the effectiveness of our algorithm’s full pipeline on real data, resulting in better performance than the best reference algorithm. Despite the high performance, our system still receives a moderate amount of false localizations, which is due to similar sub-graphs at different locations, and we hope to mitigate this effect by including it into a full SLAM system in the future. Furthermore, 3D locations of the vertices are presently positioned at the blob centers of their first observation. We expect a more precise positioning technique to further disambiguate the associations between graphs. V. CONCLUSIONS In this paper we presented X-View, a multi-view global localization algorithm leveraging semantic graph descriptor matching. The approach was evaluated on one real-world and two simulated urban outdoor datasets with drastically different view-points. Our results show the potential of using graph representations of semantics for large-scale robotic global localization tasks. Alongside further advantages, such as compact representation and real-time-capability, the presented method is a step towards view-point invariant localization. Our current research includes the investigation of more sophisticated graph construction methods, the integration of X-View with a full SLAM system to generate loop closures, and learning-based class selection for discriminative representations. 8 R EFERENCES [1] M. Cummins and P. Newman, “Fab-map: Probabilistic localization and mapping in the space of appearance,” The International Journal of Robotics Research, vol. 27, no. 6, pp. 647–665, 2008. [2] D. Gálvez-López and J. D. Tardos, “Bags of binary words for fast place recognition in image sequences,” IEEE Transactions on Robotics, vol. 28, no. 5, pp. 1188–1197, 2012. [3] S. Lowry, N. Sünderhauf, P. Newman, J. J. Leonard, D. Cox, P. Corke, and M. J. Milford, “Visual place recognition: A survey,” IEEE Transactions on Robotics, vol. 32, no. 1, pp. 1–19, 2016. [4] R. Arandjelovic, P. Gronat, A. Torii, T. Pajdla, and J. Sivic, “Netvlad: Cnn architecture for weakly supervised place recognition,” in IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 5297– 5307. [5] A. Gawel, T. Cieslewski, R. Dubé, M. Bosse, R. Siegwart, and J. Nieto, “Structure-based vision-laser matching,” in IEEE/RSJ International Conference on Intelligent Robots and Systems (IROS), 2016, pp. 182–188. [6] A. Gawel, R. Dubé, H. Surmann, J. Nieto, R. Siegwart, and C. Cadena, “3d registration of aerial and ground robots for disaster response: An evaluation of features, descriptors, and transformation estimation,” in IEEE International Symposium on Safety, Security, 2017. [7] Z. Chen, A. Jacobson, N. Sunderhauf, B. Upcroft, L. Liu, C. Shen, I. Reid, and M. Milford, “Deep learning features at scale for visual place recognition,” 2017. [8] E. Stumm, C. Mei, S. Lacroix, J. Nieto, M. Hutter, and R. Siegwart, “Robust visual place recognition with graph kernels,” in IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 4535–4544. [9] Y. Su, F. Han, R. E. Harang, and X. Yan, “A fast kernel for attributed graphs,” in SIAM International Conference on Data Mining, 2016, pp. 486–494. [10] A. Garcia-Garcia, S. Orts-Escolano, S. Oprea, V. VillenaMartinez, and J. Garcia-Rodriguez, “A review on deep learning techniques applied to semantic segmentation,” arXiv preprint arXiv:1704.06857, 2017. [11] A. Valada, J. Vertens, A. Dhall, and W. Burgard, “Adapnet: Adaptive semantic segmentation in adverse environmental conditions,” in IEEE International Conference on Robotics and Automation (ICRA), 2017, pp. 4644–4651. [12] V. Badrinarayanan, A. Kendall, and R. Cipolla, “Segnet: A deep convolutional encoder-decoder architecture for image segmentation,” IEEE Transactions on Pattern Analysis and Machine Intelligence, 2017. [13] S. A. Cook, “The complexity of theorem-proving procedures,” in ACM symposium on Theory of computing. ACM, 1971, pp. 151–158. [14] M. J. Milford and G. F. Wyeth, “Seqslam: Visual routebased navigation for sunny summer days and stormy winter nights,” in IEEE International Conference on Robotics and Automation (ICRA), 2012, pp. 1643–1649. [15] T. Cieslewski, E. Stumm, A. Gawel, M. Bosse, S. Lynen, [16] [17] [18] [19] [20] [21] [22] [23] [24] [25] [26] and R. Siegwart, “Point cloud descriptors for place recognition using sparse visual information,” in IEEE International Conference on Robotics and Automation (ICRA), 2016, pp. 4830–4836. M. Bürki, I. Gilitschenski, E. Stumm, R. Siegwart, and J. Nieto, “Appearance-based landmark selection for efficient long-term visual localization,” in IEEE International Conference on Intelligent Robots and Systems (IROS), 2016, pp. 4137–4143. N. Sunderhauf, S. Shirazi, A. Jacobson, F. Dayoub, E. Pepperell, B. Upcroft, and M. Milford, “Place recognition with convnet landmarks: Viewpoint-robust, condition-robust, training-free,” Robotics: Science and Systems, 2015. W. H. Huang and K. R. Beevers, “Topological map merging,” The International Journal of Robotics Research, vol. 24, no. 8, pp. 601–613, 2005. D. Marinakis and G. Dudek, “Pure topological mapping in mobile robotics,” IEEE Transactions on Robotics, vol. 26, no. 6, pp. 1051–1064, 2010. I. Kostavelis and A. Gasteratos, “Semantic mapping for mobile robotics tasks: A survey,” Robotics and Autonomous Systems, vol. 66, pp. 86–103, 2015. S. L. Bowman, N. Atanasov, K. Daniilidis, and G. J. Pappas, “Probabilistic data association for semantic slam,” in IEEE International Conference on Robotics and Automation (ICRA), 2017, pp. 1722–1729. N. Atanasov, M. Zhu, K. Daniilidis, and G. J. Pappas, “Semantic localization via the matrix permanent.” in Robotics: Science and Systems, 2014. B. Perozzi, R. Al-Rfou, and S. Skiena, “Deepwalk: Online learning of social representations,” 2014, pp. 701– 710. G. Ros, L. Sellart, J. Materzynska, D. Vazquez, and A. M. Lopez, “The synthia dataset: A large collection of synthetic images for semantic segmentation of urban scenes,” in IEEE Conference on Computer Vision and Pattern Recognition, 2016, pp. 3234–3243. S. Shah, D. Dey, C. Lovett, and A. Kapoor, “Airsim: High-fidelity visual and physical simulation for autonomous vehicles,” in Field and Service Robotics, 2017. H. Noh, S. Hong, and B. Han, “Learning deconvolution network for semantic segmentation,” in IEEE International Conference on Computer Vision, 2015, pp. 1520– 1528.
1cs.CV
1 Training Feedforward Neural Networks with Standard Logistic Activations is Feasible Emanuele Sansone, and Francesco G.D. De Natale, Member, IEEE arXiv:1710.01013v1 [cs.NE] 3 Oct 2017 Abstract—Training feedforward neural networks with standard logistic activations is considered difficult because of the intrinsic properties of these sigmoidal functions. This work aims at showing that these networks can be trained to achieve generalization performance comparable to those based on hyperbolic tangent activations. The solution consists on applying a set of conditions in parameter initialization, which have been derived from the study of the properties of a single neuron from an information-theoretic perspective. The proposed initialization is validated through an extensive experimental analysis. Index Terms—Deep Neural Networks, Recurrent Neural Networks, Sigmoid Activations, Initialization F 1 I NTRODUCTION D EEP LEARNING has received a lot of attention in the last decade due to the impressive performance achieved in numerous computer vision tasks, including object detection [1], human action recognition [2], image restoration [3] and image classification [4], and in natural language tasks, including language modelling [5], parsing [6], machine translation [7] and speech-to-text translation [8]. The success of deep learning is due to the capability of transforming input data into representations that are increasingly more abstract with depth and in a way that resembles the brain structure of primates [9]. Recent theoretical analysis provides partial confirmation on the experimental findings obtained by deep learning models and show that there is an exponential advantage in terms of the complexity of functions computed by deep architectures over shallow ones [10], [11], [12]. 1 Deep learning models are impactful in many real-world applications, and the transfer of this technology to society has created new emerging issues, like the need of model interpretability [14]. The General Data Protection Regulation approved in 2016 by the European parliament, which will be effective in 2018, is a concrete example of the need to provide human understandable justifications for decisions taken by automated data-processing systems [15]. Research could probably be inspired by old literature in neural networks to find better explanations about the dynamics of deep learning and provide more human interpretable solutions. An example of such process is found in standard logistic activation functions, that have been studied extensively in the past, but tend to be substituted by other activation functions in modern neural networks. To understand why this may be the case, it is important to recall the unique properties of the logistic function and therefore analyze the reasons why it has been introduced in neural networks. Firstly, the standard logistic function is biologically plausible. In fact, it is one of the best differentiable approximations to the leaky integrate-and-fire model, used 1. We refer to shallow models to indicate networks with a single hidden layer, while we refer to deep models for networks with more than one hidden layer [13]. in neuroscience to model the spiking behaviour of biological neurons [16]. Biological plausibility can be essential for driving deep learning research towards the uncovering of human learning dynamics and also providing explanations that are effectively interpreted by humans [17]. Secondly, there is theoretical work showing that a family of neural networks provided with standard logistic activations can be equivalently converted into fuzzy rule-based systems [18], thus raising the possibility to perform reasoning using fuzzy logic and potentially extract human interpretable explanations of predictions made by deep learning models [19]. While the standard logistic function is used extensively as activation in shallow neural networks, it receives less attention in deep learning. A common justification supporting this fact is that training these deep neural networks is very challenging due to the intrinsic properties of the standard logistic function, like its non-zero mean output value [20], [21] and its low derivative score in zero [22]. The bounded alternative to the standard logistic activation is the hyperbolic tangent, which allows an easier training. Nevertheless, this function is not biological plausible and does not have any relation with fuzzy logic. This work aims at showing that training deep feedforward neural networks with standard logistic activations can be feasible through careful initialization. In particular, we derive some conditions using information theory that are used as principled criteria for initialization. We show through extensive experimental analysis that our conditions guarantee a better propagation of information through the whole network and that during training no vanishing gradients are observed, thus boosting the convergence speed of the optimizer. The proposed initialization outperforms the other existing strategies also in terms of generalization performance and contribute to bridge the gap between networks with standard logistic activations and networks with hyperbolic tangents. The rest of the paper is organized as follows. Section 3 provides a preliminary discussion on the statistical properties of a single neuron with standard logistic activation function. Section 4 studies the neuron from an informationtheoretic perspective and derives initialization conditions for its parameters. Section 5 relates the proposed conditions 2 with the problem of vanishing gradients. Finally, Section 6 validates the theory over different well-known benchmarks and different networks. 1 x1 x2 2 L ITERATURE R EVIEW In 1986, Rumelhart et al. [23] propose the backpropagation algorithm to train a feedforward neural network.2 In this seminal work, the authors use random weight initialization to break the symmetry of parameters and allow to perform credit assignment during training, namely knowing how to compute each weight contribution to the final error. Nevertheless, the initial choice of parameters plays an important role on determining the generalization performance of the final trained network, as it is demonstrated by subsequent works (see [25] for an empirical comparison among the main works of the period until 2000 and [26] for an updated summary of the related work up to 2004). In that period, the research about initialization focused mainly on shallow architectures, motivated by the fact that (i) shallow neural networks are universal function approximators [27], [28] and (ii) deep networks are more difficult to train than shallow counterparts [29], due to the problem of vanishing and exploding gradients. Authors in [20] are probably among the few to propose initialization strategies for deep learning. In particular, they use random weight initialization in combination with hand-crafted activations for hidden neurons. We will see in the experimental section that their proposed initialization strategy is not particularly suited for standard logistic activations, as it is strongly affected by vanishing/ exploding gradients. The first effective strategy to learn deep models appears in 2006 [30] and consists of splitting the learning process into two stages, called unsupervised pre-training and finetuning, respectively. In the first stage, an unsupervised algorithm is applied layerwise to learn increasingly more complex representations of the input features.3 In the second stage, network parameters are updated/fine-tuned using a supervised criterion and gradient-based optimization. An explanation for this success appears later in [33], where the authors show experimentally that unsupervised pretraining can be regarded as an effective initialization strategy for the subsequent optimization stage. In other words, ”pre-training guides the learning towards basins of attraction of minima that support better generalization from the training data set” [33]. Unsupervised pre-training is extremely expensive from a computational perspective and alternatives are proposed to overcome the problem of vanishing/exploding gradients. In particular, there are solutions, which modify the structure of neural networks with skip connections between hidden layers [34], [35], [36] or with new normalizing layers [37], [38], [39], in order to guarantee the continuous flow of information through the network. Other approaches study the properties of the loss surface and develop training algorithms able to find better minima. In particular, we find 2. Even if, the author in [24] argues that backpropagation is dated back to the early 1960s. 3. Authors in [30] use Restricted Boltzmann machines at each layer to learn deep belief nets, while authors in [31], [32] use stacked autoencoders to learn deterministic networks. .. . b w1 w2 Σ z g(·) y wd xd Fig. 1. Graphical visualization of a single neuron. (i) optimization algorithms based on accelerated gradients, like momentum [40], [41] and Adam [42], which combine information about past and current gradients in order to dampen the oscillations on the loss surface observed during training, thus converging faster to the final solution, and (ii) second-order optimization strategies, like Hessian-free [43] and natural gradient methods [44], [45], which looks for efficient approximations of the Hessian using the GaussNewton [46] and the Fisher information matrices, respectively. There are a plethora of works studying optimization in neural networks, therefore we invite the interested reader to see the recent work in [47], which provides a theorical comparative analysis between different accelerated gradient-based algorithms, and the survey in [48], which presents a more general overview of optimization strategies in machine learning. One of the most influential studies about initialization in the last decade is the work of [21]. In particular, the authors observes that ”the logistic sigmoid activation is unsuited for deep networks with random initialization because of its mean value, which can drive especially the top hidden layer into saturation”. Other more recent works, see for example [22], confirm the fact that the standard logistic activation is more difficult to train than other activations and proper rescaling, making the logistic function similar to the hyperbolic tangent, is required for successful training. Alternative activations are therefore proposed in the literature. The rectifier linear function is one of the most appealing solutions [49],4 because of its unbounded nature that allow the gradient not to vanish. Principled criteria based on orthogonality [51] and normalization of weights [52] are used in combination with random weight initialization to find better starting solutions for training these networks. Recent theoretical analysis on the properties of random inizialization, see [53] for the analysis of rectifier linear functions and [54] for a more general theory validated also on hyperbolic tangents, reveals that there exists a range of values for the variance of weights which are more suited for the propagation of gradients, thus improving the trainability of networks. Our work proposes to study the more difficult problem of training standard logistic activations from the initialization perspective. Furthermore, we shed light on a more general criterion to derive initializating conditions, that explicitly maximizes the amount of information propa- 3 6 µ = -1.5 µ = -0.5 µ = 0.5 µ = 1.5 5 4 3 2 1 0 0.0 0.2 0.4 0.6 0.8 1.0 4.0 3.5 3.0 2.5 2.0 1.5 1.0 0.5 0.0 0.0 (a) density py (y) approaches a Bernoulli distribution.6 This is an extreme case, where information can be propagated, but the ouput becomes discrete (see Fig. 2(b)). In the next section, the behaviour of the neuron is analyzed more in detail from the perspective of information theory. σ = 1.0 σ = 1.5 σ = 2.0 σ = 2.5 4 0.2 0.4 0.6 0.8 1.0 (b) Fig. 2. Visualization of density py (y) for different settings of µ, σ . (a) σ = 0.5 and variable µ, (b) µ = 0 and variable σ . gation in neural networks. 3 S TATISTICAL BACKGROUND Let us recall the statistical properties of a single neuron characterized by an input vector x ∈ Rd , a weight vector w ∈ Rd , a bias b ∈ R and a standard logistic activation function g(z) = 1/(1 + e−z ). Fig. 1 provides a graphical interpretation of the computational unit used in many neural networks. Consider z as the logit of the given neuron, namely P z = di=1 wi xi + b = wT x + b. By modelling the inputs as independent random variables, with densities/distributions characterized by finite means and finite variances, it is possible to exploit the Lyapunov theorem5 and model z as a Gaussian random σ 2 . In Pd variable with mean µ2 and Pdvariance 2 this case, µ = i=1 wi E{xi } + b and σ = i=1 wi V ar{xi }, where E{·} and V ar{·} are the expected value and the variance operators, respectively. It is interesting to note that the mean value of the Gaussian density associated with z is mainly dominated by the parameter b (especially when E{xi } = 0, ∀i = 1, . . . , d, since µ = b), while its variance is influenced only by the weight vector w. Therefore, all subsequent considerations valid for µ and σ will be valid also for b and w, respectively. Due to its nonlinearity, the activation function g(z) produces an output with different statistical properties from the ones associated with logit z . In fact, the density associated with output y ∈ (0, 1) can be expressed by the following relation, namely:  y (ln 1−y − µ)2  1 √ exp − (1) py (y) = 2σ 2 y(1 − y) 2πσ 2 I NFORMATION -T HEORETIC A NALYSIS In this section, we ask the following question: which region of the parameter space (µ, σ) guarantees that the maximum amount of information is propagated through the activation function g(z)? We address this question by formulating the problem as an optimization. Logit z and output y are modelled as continuous random variables distributed according to N (µ, σ 2 ) and py (y), respectively. We choose the entropy of y , viz. H(y), as the objective of the maximization problem and discard for example the mutual information, since it is not defined for this particular case.7 Therefore, the objective can be written in the following way: Z 1 . H(y)=− py (y) ln py (y)dy 0 = Z ∞ −∞ e− √ (z−µ)2 2σ 2 ( 2πσ 2 (z − µ)2 + 2σ 2 ) i √ 2 + ln g(z) 1 − g(z) 2πσ dz h = Z ∞ −∞ e− √ (z−µ)2 2σ 2 2πσ 2 ( ) √ (z − µ)2 0 2 + ln 2πσ + ln g (z) dz 2σ 2 =H(z) + Ez {ln g 0 (z)} (2) 0 where H(z), Ez {·}, g (z) are the entropy, the expected value and the derivative of g(·) computed on variable z , respectively. Note that the second line in (2) is obtained from the first one by a simple change of variable, namely y = g(z). Thus, the information coming out from the neuron is proportial to the information of the logit and the shape of the activation function. In general, the term Ez {ln g 0 (z)} in (2) is difficult to compute analytically and can be approximated using a lower and an upper bound (see Appendix A). This brings us to the following inequalities: HB (µ, σ) − 2 ln 2 ≤ H(y) < HB (µ, σ) (3) which is not any more a Gaussian density, as can be seen from Fig. 2. It is important to mention that µ and σ controls the mean and variance of py (y), and therefore also the amount of information that can be propagated through the neuron. In fact, for very large or very small values of µ, we have no information propagation, since the activation function is saturated and the output variance tends to zero (see Fig. 2(a)). The same happens for small values of σ , because in this case py (y) behaves similarly to a Dirac delta centered at g(µ). It can be shown that, when σ → ∞, the where erf (·) is the error function [55] and the function HB (µ, σ) can be visualized in Fig. 3. From 3, HB (µ, σ) defines both the lower and upper bounds of H(y). Therefore, it can be used as a surrogate objective for our maximization 4. Many different extensions are also proposed. For example, [50] parameterize the rectifier linear function to allow non-zero gradient in the negative region. 5. This is an extension of the central limit theorem, which relaxes the assumptions over the random variables and require that the random variables are independent but not necessarily identically distributed. 6. py (y) → 0 on the interval (0, 1) and the mass fully concentrates on the extrema of the interval. 7. It is not defined because of Dirac delta distributions, which come from the fact that g(·) is deterministic and that the variables are continuous. and .1 1 HB (µ, σ) = + ln(2πσ 2 )− 2 2   µ2 µ 2σ √ −µ erf − √ e− 2σ2 σ 2 2π (4) 4 0.4 0.0 0.4 0.8 1.2 1.6 2.0 2.4 2.8 1 0 1 2 3 3 2 1 5 lies in the linear region of its sigmoid activation, thus constraining the whole network to approximate only a linear function. In the next sections, we provide theoretical evidence about the utility of these conditions. 4 5 4 0 µ 3 1 2 2 1 3 0 σ Fig. 3. 3D plot of HB (µ, σ). The dotted curve on the surface represents ∂HB (µ,σ) the set of points for which = 0. ∂σ problem to find the optimal values of µ and σ . Based on this principle, we can enunciate the following theorem (proof in Appendix B). Theorem 1. The optimality conditions for HB (µ, σ), defined in (4), are given by the following statements: • • ∀σ ∈ R+ , ∀µ ∈ R, ∂HB (µ,σ) ∂µ ∂HB (µ,σ) ∂σ = 0 ⇒ µ = 0, =0 ⇒ σ= pπ 2e W 2µ2 π 2  , where W (·) is the principal branch of the Lambert W function [56]. The optimal solution, maximizing HB (µ, p σ), is therefore obtained at the point µ = 0 and σ = π2 ≈ 1.2533. The optimality result given by Theorem 1 is interpreted as a condition on µ and σ to have maximum amount of information propagated through the sigmoid activation. On one Pd hand, the condition µ = 0 implies that b = − i=1 wi E{xi } (following directly from Section 3), meaning that the expected value associated with the logit z must lie in the central part of the sigmoid far away from its saturating p π/2 for regions. On the other hand, the condition σ = Pd µ = 0 implies that i=1 wi2 V ar{xi } = π/2 (following directly from Section 3). Note that, if the variances of inputs are equal to the same constant, p namely V ar{xi } = k for all i = 1, . . . , d,8 then kwk2 = π/(2k). This means that the maximum amount of information propagated thorugh g(z) is obtained when vector w lies on the hypersphere p of radius π/(2k). In Appendix C, we show how to deal with the more general case where the input variances are different from each other. In practice, condition Pd 2 T i=1 wi V ar{xi }. = π/2 may be rewritten as w Dw = π/2, where D = diag(V ar{x1 }, . . . , V ar{xd }). If D is positive definite, then the quadratic equation wT Dw = π/2 characterizes a multidimensional ellipsoid. Vector w must therefore lie on this geometric locus of points to guarantee the maximal information propagation. We argue that the obtained results are useful to define the initial conditions for learning the parameters of neurons with standard logistic activations and that cannot be enforced during training, because they limit the expressivity of the neural network. In fact, they impose that each neuron 8. This is a common assumption used in the theory of neural networks [57]. T HE P ROBLEM OF VANISHING G RADIENTS In this section, we study the implications of maximizing the mutual information at each neuron on the problem of vanishing gradients [29], [58]. In particular, we will show that the conditions established by Theorem 1 ensure that the selected starting point lies far away from the critical point that implies the occurrence of the vanishing gradients. Although the proposed theoretical analysis does not imply that this condition cannot be reached at some later stage of the learning, the effectiveness of the proposed initialization will be also supported by the extensive testing, presented in the experimental section. We study the problem of vanishing gradients by adopting the same methodological analysis of [29], [58] and focus on recurrent neural networks, which can be seen as the deepest version of feedforward neural nets. The obtained results are therefore valid for traditional feedforward neural networks [29], [58]. Recall that a recurrent neural network is fully described by the following equations: E t = g(Wout yt + bout ) yt = g(Wyt−1 + Win xt + b) (5) where t is used to identify time, or equivalently to indicate the layer in a deep feedforward neural net. xt ∈ Rd , yt ∈ Rh and E t ∈ Ro are the input, the hidden state and the output vectors of the network, respectively. Win ∈ Rh×d , W ∈ Rh×h and Wout ∈ Ro×h are the weight matrices associated with the connections of neurons, b ∈ Rh and bout ∈ Ro are the bias vectors and g(·) is an element-wise operator that applies the sigmoid function to the incoming vector. Recurrent neural networks are usually trained by minimizing an objective L that sums all loss contributions incurred over a time horizon of duration T , namely L = PT t t o t=1 L , where L : R → R. The training requires computing the gradient of the objective with respect to parameters W [23], namely: T ∂L X ∂Lt = ∂W t=1 ∂W   T ∂Lt X ∂Lt ∂yk = diag ∂W k=1 ∂yk ∂W  tT T ∂Lt ∂L ∂E t ∂yt = ∂yk ∂E t ∂yt ∂yk k+1 k+1 Y ∂yl Y  ∂yt = = diag g 0 (zl ) W ∂yk l=t ∂yl−1 l=t (6) where zl = Wyl−1 + Win xl + b is the vector of logits. By exploiting the fact that for any real matrices A, B and for any real vector v, kAvk2 ≤ kAk∗ kvk2 and kABk∗ ≤ kAk∗ kBk∗ , where k · k∗ is the operator-2 norm, it is possible 5 to derive an upper-bound on the gradient norm fact, ∂Lt k ∂y k k2 . In given that real-world applications usually require hundreds/thousands of hidden neurons per layer. Therefore, even if we cannot conclude that the whole training is exempt of vanishing gradients problems, we inizialize the process with a sufficient margin to prevent the problem in the initial phase, which is typically the most critical. Experimental results will provide evidence of this, as shown later in the paper. (7) 6 T ∂Lt ∂E t ∂yt ∂E t ∂yt ∂yk 2 2 ∂Lt ∂E t ∂yt ≤ ∂E t 2 ∂yt ∗ ∂yk ∗ k+1 ∂Lt ∂E t Y ∂yl ≤ ∂E t 2 ∂yt ∗ l=t ∂yl−1 ∂Lt ∂yk = ∗ Note that from (6) and (7), we can derive the following relations: ∂yl ∂yl−1  ≤ diag g 0 (zl ) ∗ W ∗  = max g 0 (zil ) W i=1,...,h ≤ kW 4 F F F In this section, we evaluate the performance of the proposed initialization theory on several benchmarks. We start by analyzing shallow networks, then consider the case of deep networks and finally extend the analysis to recurrent neural networks (RNNs, being even deeper than previous cases). We compare our initialization against several competitors. Hereunder, we provide a summary of all strategies: • Lecun et al.  [57] initialize  the weights according to (8) In particular, the first inequality in (8) can be obtained using the property kAk∗ ≤ kAkF , where k · kF is the Frobenius norm. The equality in second line follows directly from the fact that the operator-2 norm of a diagonal matrix is equal to the maximum of its diagonal entries, whereas the last inequality is due to the fact that the derivative of a sigmoid function cannot be larger than 1/4. By using the result in (8), the gradient in (7) is bounded by the follwoing inequality: ∂Lt ∂yk 2 ≤ ∂Lt ∂E t 2 t = ∂L ∂E t ∂E t ∂yt k+1 Y ∗ l=t t 2 ∂E ∂yt E XPERIMENTAL R ESULTS  ∗ kW 4 kW 4 F • • F • t−k−1 (9) The vanishing gradient problem refers to the decay of ∂Lt k ∂y k k2 as the number of time instants t − k , or equivalently the number of layers, becomes larger. A sufficient condition for the occurrence of this problem is given by the condition kW F < 4, due to the fact that the bound in (9) tends to zero as t − k → ∞. q Ph 2 Note that kWkF = i=1 kwi k2 , where wi is the i-th row of matrix W corresponding to the weights of the i-th neuron. Furthermore, by the conditions derived in Section 4, viz. kwi k22 = π/(2k) for all i = 1, . . . , h, we have that r πh kWkF = (10) 2k If the number of hidden neurons is less than the quantity . hcritic = 32k/π , which implies that (10) is less than 4, then the vanishing gradient problem is guaranteed to occur. In this case, k refers to the output variance of a sigmoid activation and is less than or equal to 1/4 (derived from the fact that the output density of a neuron is limited by a Bernoulli distribution and its maximum variance is 1/4, see Section 3). Therefore, hcritic ≤ 8/π ≈ 2.55. This means that the sufficient condition for the occurrence of the vanishing gradient problem is met only when the number of hidden neurons is less than 3. In practical cases, this limit is overcome with a very large margin, • √1 , √1 nl nl l wij ∼ U − l wij ∼ U − √ l , where wij is the weight connecting neuron i with neuron j in layer l and nl is the number of input neurons to layer l. The biases are set to zero. Glorot and Bengio [21] (also known as ”Xavier initialization”) initialize the weights  according to  √ 6 , nl +nl+1 √ √ 6 nl +nl+1 . The biases are set to zero. Saxe et al. [51] propose an initialization where each weight matrix is randomly generated from the family of orthogonal matrices, namely Wl is satisfying the T relation Wl Wl = I. The biases are set to zero. Mishkin and Matas [52] extend the initialization of Saxe et al. by normalizing the weight matrix by the output variance in each layer. The biases are set to zero. Our approach exploits the result of Theorem 1 in Secl tion 4, and initializes the weights according to wij = l p π w̃ij 9 l 2k kw̃l k , where w̃ij can be obtained by using j 2 l either random generation, namely w̃ij ∼ U (−1, 1), or the orthogonal initialization in [51]. The biases Pnl l are set according to blj = − i=1 wij E{xli }, where l E{xi } is the expected value of input neuron xli . In the experiments, we use lecun, glorot, ortho and lsuv to identify the results achieved by [57], [21], [51] and [52], respectively. random+EP and ortho+EP are instead used to identify the two versions of our initialization procedure. In this case, the acronym EP stands for ellyptical projection (see Section 4 for a detailed discussion). All experiments presented in the next sections are run on a Linux machine equipped by 4 cpu @ 3.2 GHz, 16 GB RAM and a GPU card (NVIDIA TITAN X). 6.1 XOR Case: Shallow Network In this experiment, we generate 200 samples from four 2dimensional Gaussians. Classes are assigned to create a XOR . 9. k = V ar{x} ≈ 0.0589, where V ar{x} is computed numerically using py (y) at optimality (x is therefore the output of the previous neuron). 1.0 lecun glorot ortho lsuv random+EP ortho+EP 1.0 lecun glorot ortho lsuv random+EP ortho+EP 0.8 0.6 0.4 0.2 0 500 1000 Iterations 1500 2000 0.0 lecun glorot ortho lsuv random+EP ortho+EP 0.8 Test error 1.6 1.4 1.2 1.0 0.8 0.6 0.4 0.2 0.0 Train error Objective 6 0.6 0.4 0.2 0 500 1000 Iterations (a) (b) 1500 2000 0.0 0 500 1000 Iterations 1500 2000 (c) Fig. 4. Learning curves for (a) training objective, (b) training error and (c) test error on the XOR case over different initialization methods. TABLE 1 Quantitative results on MNIST with shallow network [59] and different initialization strategies Method (*sigmoid) lecun* glorot* ortho* lsuv* ortho+EP* random+EP* T.E. (%) 1.91±0.03 1.86±0.04 1.86±0.02 1.87±0.01 1.89±0.02 1.78±0.06 Train Time (103 secs) 2.0 2.0 2.0 2.0 2.0 2.0 TABLE 2 Quantitative results on MNIST with shallow network [59] and dropout (p = 0.5) for different initialization strategies Method (*sigmoid) [59] lecun* glorot* ortho* lsuv* ortho+EP* random+EP* T.E. (%) 1.60 1.65±0.03 1.63±0.02 1.62±0.04 1.61±0.03 1.61±0.03 1.59±0.03 Train Time (103 secs) 6.0 6.0 6.0 6.0 6.0 6.0 configuration. In this case, we use a neural network with one hidden layer containing two hidden units. This is the smallest network that can learn correctly the problem (4 modes can be represented more compactly with 2 binary digits, namely 2 hidden neurons). Gradient descent with momentum equal to 0.9 and learning rate equal to 0.05 is applied to the minimization of the cross-entropy objective function. Fig. 4 shows results over ten repeated experiments (generating new data from the same distribution and initializing the network differently). It is clear from these experiments that our proposed initialization allows to achieve the best solution in a very efficient way. Also, lsuv is able to achieve comparable performance to our method. Moreover, it’s interesting to note that ortho obtains the worst performance, in fact the test error rate, viz. T.E., is about 25%, meaning that this initialization is not particularly suited for this non-linear separable scenario. 6.2 MNIST: Shallow Network In this section, we compare different initialization methods for a shallow network with 800 hidden units characterized by sigmoid activation functions and with softmax output layer on the MNIST bechmark dataset [60]. Mini-batch gradient descent with momentum equal to 0.9 and learning rate equal to 0.001 is applied to the minimization of the cross-entropy objective function. The size of each mini-batch consists of 50 training samples and the training algorithm is run for 900k iterations. All results, including the learning curves, are averaged over 4 different random initializations. Data is normalized and mean-centered to lie in the range [−1, 1]. We plot the training curves for the objective computed on both the training and the validation sets, see Fig. 5. We see that our proposed initialization scheme allows to converge faster even in the case of non-deep models. Furthermore, our strategy is quite robust to the initial generation of weights. Previous attempts have shown that random initializations produces solutions with very different performance, thus requiring very expensive pre-processing strategies to reduce the variance of generalization estimates, like unsupervised pre-training [33]. To the best of our knowledge, this is the very first time that random initialization without unsupervised pre-training allows to converge to solutions with reduced variance in performance (see random+EP Fig. 5a and Fig. 5d). In Table 1, we show the test errors with the related training times.10 Model selection is performed based on the minimization of the validation objective. The performance in terms of generalization are pretty similar for all methods, thus the main advantage of our strategy consists of faster convergence. We apply also dropout [61] (where the dropping probability is set to 0.5) and compare with the state of the art results reported in [59], which are obtained with the same network architecture, but with hand-crafted activation functions. In particular, the authors use squashed hyperbolic tangent activations, defined as f (z) = Atanh(Bz), where A = 1.7159 and B = 2/3 (the parametrization derives by the requirement that f (1) = 1 and f (−1) = −1), because their function gain is close to 1 in the nominal region and the computed gradients are therefore less attenuated [60] compared to sigmoids. Table 2 summarizes the results. To the best of our knowledge, this is the first experimental trial demonstrating that sigmoids achieve similar performance to hyperbolic tangents [59]. 10. All training times are equal, since they represent the time to perform all training epochs. 7 Training objective (Log) 10 1 10 0 10 -1 10 -2 10 -3 Training objective (Log) 10 1 lecun glorot ortho lsuv random+EP ortho+EP 10 0 10 -1 10 -2 10 -4 100 200 300 400 500 600 700 800 Iterations (1K mini-batches) 0 10 0 Iterations (1K mini-batches) 0 Iterations (1K mini-batches) 10 0 10 -1 (c) Validation objective (Log) 10 1 lecun glorot ortho lsuv random+EP ortho+EP random+EP ortho+EP 500 1000 1500 2000 2500 3000 3500 (b) Validation objective (Log) ortho lsuv 10 -1 10 -3 100 200 300 400 500 600 700 800 (a) 10 1 lecun glorot 10 -2 10 -3 0 Training objective (Log) 10 1 lecun glorot ortho lsuv random+EP ortho+EP 10 0 Validation objective (Log) 10 1 lecun glorot ortho lsuv random+EP ortho+EP lecun glorot ortho lsuv random+EP ortho+EP 10 0 10 -1 10 -1 10 -2 0 100 200 300 400 500 600 700 800 0 Iterations (1K mini-batches) 100 200 300 400 500 600 700 800 Iterations (1K mini-batches) (d) 10 -2 0 500 1000 1500 2000 2500 3000 3500 Iterations (1K mini-batches) (e) (f) Fig. 5. Learning curves for training and validation objectives on MNIST (logarithmic scale): (a) and (d) results with shallow network, (b) and (e) results with deep network, (c) and (f) results with deep network with data augmentation. TABLE 3 Quantitative results on MNIST with deep network [62] and different initialization strategies Method (*sigmoid) lecun* glorot* ortho* lsuv* ortho+EP* random+EP* 6.3 T.E. (%) 3.11±0.14 2.94±0.08 3.32±0.11 2.07±0.07 1.85±0.07 1.92±0.08 Train Time (103 secs) 7.3 7.3 7.3 7.3 7.3 7.3 MNIST: Deep Network We repeat the experiments of previous subsection with same setup, but with a deeper network. In particular, we use the same architecture of [62], consisting of 6 layers (5 hidden and 1 output layer), where the number of neurons in each layer is chosen according to a pyramidal structure, namely 2500, 2000, 1500, 1000, 500 and 10 neurons, respectively. From Fig. 5b and Fig. 5e, we observe immediately that our initialization provides a gain in terms of both convergence speed and the quality of the obtained solution. It is also interesting to see that the competitors observe very slow learning in the early stages of training, probably due to the fact that the network parameters are initialized on flat regions of the training objective and the gradients are therefore vanishing. We also analyze the evolution of the statistics of each layer over the first 90k iterations (we consider the mean and the standard deviation of each layer obtained by averaging neuron activities over mini-batches). Fig. 6 shows the behaviour of the network for different initialization strategies. For almost all competitors, the activities in the last hidden layer (layer 5) tend to be biased towards zero and no sig- TABLE 4 Quantitative results on MNIST with deep network [62] and data augmentation for different initialization strategies Method T.E. (%) (*sigmoid) [62] 0.32 [62]+ 0.62 lecun* 0.80 glorot* 0.82 ortho* 0.80 lsuv* 0.79 ortho+EP* 0.81 random+EP* 0.68 + Our implementation Train Time (103 secs) 412.2 35.4 35.4 35.4 35.4 35.4 35.4 35.4 nificant variation is appreciated in the output layer. This is a symptomatic behaviour, that have been already observed in [21] for networks with standard logistic activations. It is interesting to mention that this problem is not visible for lsuv and our proposed initializations. This is probably due to the fact that both impose some conditions on the variance of the weights of each neuron. In particular, lsuv imposes a unit variance, while our conditions require a larger value, which is based on an information-theoretically criterion. This has also some beneficial impact on the generalization performance as shown in Table 3. Therefore, our weight initialization is sufficient to guarantee a better propagation of gradients at all layers for the whole training process, allowing to achieve faster convergence and better solutions. We apply also data augmentation to compare against the state of the art results reported in [62] with squashed hyperbolic tangent activations. In particular, training data are augmented following the methodology suggested in [62]. We use elastic distortion, to emulate uncontrolled oscillations of 8 Train activities for lecun 1.0 Layer 1 Layer 2 0.8 Layer 3 Layer 4 Train activities for glorot 1.0 Layer 5 Layer 6 Layer 1 Layer 2 0.8 Layer 3 Layer 4 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 0 10 20 30 40 50 60 70 80 90 0.0 0 10 20 30 40 (a) Layer 1 Layer 2 0.8 60 70 80 90 0.0 Layer 3 Layer 4 Layer 5 Layer 6 1.0 Train activities for random+EP 0.8 Layer 1 Layer 2 Layer 3 Layer 4 0.4 0.4 0.4 0.2 0.2 0.2 20 30 40 30 50 60 70 80 90 0.0 0 10 20 30 40 (d) 40 50 60 70 80 90 50 60 70 Train activities for ortho+EP 80 Layer 1 Layer 2 0.8 0.6 10 20 1.0 Layer 5 Layer 6 0.6 0 10 Layer 5 Layer 6 (c) 0.6 0.0 0 Layer 3 Layer 4 (b) Train activities for lsuv 1.0 50 Layer 1 Layer 2 0.8 0.6 0.0 Train activities for ortho 1.0 Layer 5 Layer 6 90 0.0 0 10 20 (e) Layer 3 Layer 4 30 40 50 Layer 5 Layer 6 60 70 80 90 (f) Fig. 6. Temporal evolution of statistics (mean and standard deviation) of activations in each layer for different initialization methods over the first 90k iterations. Train activities for lecun 1.0 Layer 1 Layer 2 0.8 Layer 3 Layer 4 Train activities for glorot 1.0 Layer 5 Layer 6 Layer 1 Layer 2 0.8 Layer 3 Layer 4 0.6 0.6 0.4 0.4 0.4 0.2 0.2 0.2 0 50 100 150 200 250 300 350 400 0.0 0 50 100 150 200 250 300 350 400 (a) Layer 1 Layer 2 0.8 Layer 3 Layer 4 0.0 Layer 5 Layer 6 1.0 Train activities for random+EP 0.8 Layer 1 Layer 2 Layer 3 Layer 4 Layer 5 Layer 6 100 150 200 250 300 350 400 0.4 0.4 0.4 0.2 0.2 0.2 100 150 200 250 300 350 400 0.0 0 50 100 150 200 250 300 350 400 (d) (e) Layer 1 Layer 2 0.8 0.6 50 Layer 5 Layer 6 Train activities for ortho+EP 1.0 0.6 0 50 Layer 3 Layer 4 (c) 0.6 0.0 0 (b) Train activities for lsuv 1.0 Layer 1 Layer 2 0.8 0.6 0.0 Train activities for ortho 1.0 Layer 5 Layer 6 0.0 0 50 Layer 3 Layer 4 Layer 5 Layer 6 100 150 200 250 300 350 400 (f) Fig. 7. Temporal evolution of statistics (mean and standard deviation) of activations in each layer for different initialization methods over the first 90k iterations. Data augmentation is applied to improve performance. hand muscles (σ = 5.5 and α = 37, see [62]),11 rotation (with an angle randonly sampled from [−β, β], where β = 7.5 for digits 1 and 7 and β = 15 for all other digits) and horizontal and vertical scaling (with scaling factor randomly sampled 11. Here, σ does not refer to σ introduced in Section 3. from [1 − γ/100, 1 + γ/100], where γ = 17.5). We also rerun the experiments of [62] and use these as baseline, since we were not able to replicate the results. The learning curves in Fig. 5c and Fig. 5f confirms the findings that our method achieves faster convergence and better solutions. It is important to mention that the use of 9 1.09 1.08 1.07 1.06 1.05 1.04 1.03 1.02 1.01 Training objective lecun glorot ortho 0 lsuv random+EP 20 40 ortho+EP LSTM 60 Iterations (1K mini-batches) 80 (a) 1.09 1.08 1.07 1.06 1.05 1.04 1.03 1.02 1.01 Test objective lecun glorot ortho 0 lsuv random+EP 20 40 60 ortho+EP LSTM Iterations (1K mini-batches) 80 (b) Fig. 8. Training and test learning curves on the copy memory problem for different strategies. vt We xt Win LSTM or RNN Wout Et Fig. 9. General architecture used in the experiments with recurrent neural networks. vt , E t are the input and the output vectors, respectively, representing a charater or a word using one-hot encoding, while xt represents the distributed embedding of the input vector. data augmentation plays an important role in achieving better generalization performance and that it can partially overcome to problems incurred by using a wrong initialization. Nevertheless, the advantages of our initialization are still visible. Fig. 7 shows the temporal evolution of statistics for each layer, emphasizing the fact that almost all competitors are subject to the problem of saturation of the last hidden layer in the early stages of training [21]. Table 4 summarizes the quantitative results. Our initialization strategy (random+EP) allows to achieve 0.68% of test error rate, which is very close to the performance (namely 0.62%) obtained by using the hand-crafted hyperbolic tangent of [62]. This provides further evidence that deep networks with standard logistic activations can perform similarly to networks with hyperbolic tangents and that the training is made feasible through some simple conditions at initialization. 6.4 Copying Memory Problem: Recurrent Neural Network In this section, we go even deeper and use RNNs as case study to compare the different initialization strategies. It is well known that these models have difficulties to remember information about inputs for long time intervals. This is due to the fact that during training, RNNs are affected by the problem of vanishing/exploding gradients [29], [58]. The literature contains a plethora of proposed solutions. In particular, the authors in [63], [64] propose a strategy called Echo-State Networks (ESN), which consist in carefully initializing the recurrent weights and training only the output parameters. In practice, the recurrent weight matrix is initialized to have a spectral radius close to one, such that inputs can ”echo” for long time. This represents a very drastic solution, which doesn’t exploit the full potential of RNNs. Authors in [65] show that long-term dependencies can be learnt using Hessian-free optimization, which is provided with information about the curvature of the loss surface and is therefore able to deal with vanishing gradients. Authors in [58] propose a solution to train RNNs, where a regularizer, specifically designed to cope with vanishing gradients, is applied to the loss objective and a simple momentum-based optimizer is used in combination with gradient clipping, that ensures that gradients do no explode. In our experiments, we use the same strategies of [58] and we focus on analyzing the impact of initialization on this problem. It is also important to mention that there is a recent line of research in RNNs, studying unitary recurrent weight matrices, see for example [66], [67], [68]. Nevertheless, in this work we want to study the most general case, where the feasible set consists of the whole parameter space. In order to study the capability of models in learning long-term dependencies, we consider a similar pathological task introduced for the first time in [69], called the copy memory problem. In this task, we are given a dictionary of ten characters, viz. {ai }9i=0 . The input is a T + 6 length sequence containing characters from the dictionary. Specifically, the first three characters in the sequence are drawn uniformly and independently with replacement from the subset {ai }7i=0 and represent the sequence to be memorized. The next T − 1 characters are set to a8 and represent a dummy sequence. The next character is set to a9 and represent a trigger to inform the model that it should start to predict the memorized sequence. The last three characters are set to a8 and represent a dummy sequence. The ground truth output is a T + 6 length sequence, where the first T + 3 entries are set to a8 and the last three characters are the copy of the first characters in the input sequence. Therefore, the task consists in memorizing the input sequence for T time instants and then output the memorized sequence. In the experiments, we set T = 100 and generate training and test datasets consisting of 1000 samples each. We compare RNNs using different initialization strategies and report also the results of two baselines. The first baseline consists in outputting a8 for the first T + 3 entries and randomly sampling from the subset {ai }7i=0 for the last three characters. This is equivalent to having a memoryless strategy. The second baseline consists in predicting the output using a LSTM model [69], which is the most widely used 10 TABLE 5 Quantitative results on the language modelling task for different strategies. Method (*sigmoid) lstm lecun* glorot* ortho* lsuv* ortho+EP* random+EP* T.P. 128.3±0.5 143.1±0.8 155.1±0.9 156.1±0.5 135.9±0.1 135.5±0.3 164.0±0.5 Train Time (103 secs) 77.0 28.7 28.7 28.7 28.7 28.7 28.7 alternative to RNNs and is able to learn long-term dependencies. Performance are measured in terms of perplexity and this quantity is also used as training objective. Note that the perplexity of the first baseline can be analytically 8 computed and is equal to exp 3Tln +6 ≈ 1.06. The network architecture used in the experiments is shown in Fig. 9, where the input and the output vectors represent the one-hot encoding of any character in the dictionary. The size of hidden layers in the recurrent model (which is also used to determine the size of the embedding vector) depends whether we are using RNN or LSTM. In particular, RNN and LSTM have hidden layers of size 100 and 52, respectively, which is equivalent to have roughly 32000 parameters per model. Adam optimizer with learning rate equal to 0.001 is used in training and the algorithm is run for 100k iterations. All results are averaged over 4 different random initializations. Figure 8 shows the learning curves for the different initialization strategies as well as the learning curves of the two baselines. It is possible to see that eventually all approaches perform better than the memoryless strategy, meaning that the networks effectively learn to memorize some information. Furthemore, our initialization (random+EP) outperforms all other approaches during the first 30k iterations, including LSTM. There is a phase between 30k and 50k iterations, in which ortho achieves the best performance. As discussed in [51], an orthogonal initialization can guarantee that the recurrent weight matrix remains orthogonal during the whole training process even in the case of nonlinear activation functions. This is particularly useful in the copying memory problem, since the family of orthogonal matrices contain the solution, that allows the RNN to learn the identity function, namely to copy the exact input sequence to the output. Note that after 50k iterations the performance of ortho degrades due to the problem of exploding gradients. It is interesting to note that at convergence we achieve the best performance among the other initializations and are able to get closer to the results of LSTM. 6.5 TABLE 6 Quantitative results on the language modelling task for different strategies with dropout. Language modelling: Recurrent Neural Network In this section, we conduct experiments on a real-world task, namely the language modelling problem, using the Penn Tree Bank (PTB) dataset [70]. The dataset consists of 929k training words, 73k validation words, 82k test words and the vocabulary has 10k words. The dataset is downloaded from Tomas Mikolov’s webpage.12 12. http://www.fit.vutbr.cz/ imikolov/rnnlm/simple-examples.tgz Method (*sigmoid) lstm lecun* glorot* ortho* lsuv* ortho+EP* random+EP* T.P. 128.7±0.4 147.8±0.6 159.2±0.4 161.2±0.3 139.8±0.4 139.3±0.3 130.1±0.4 Train Time (103 secs) 80.0 32.3 32.3 32.3 32.3 32.3 32.3 We compare RNNs using different initialization strategies and report also the results of the baseline using LSTM [69]. The aim of these experiments is to show that our conditions allow to improve the generalization performance of RNNs. With our initialization, we are able to achieve comparable performance to the one obtained by LSTM. The network architecture is the same as the one used in the copying memory problem with different size of the hidden layers. In particular, we use 200 neurons for RNNs and 190 neurons for LSTM. This corresponds to have roughly 4090k parameters for each model. Adam optimizer with learning rate equal to 0.0001 and gradient clipping [58] is used for training the models and the algorithm is run for 500k iterations. Results are averaged over 4 different random initializations and are shown in Table 5 (the acronym T.P. stands for test perplexity). lsuv and ortho+EP achieve performance closer to the ones of LSTM, while random+EP obtains apparently very bad performance. We argue that the generation of the initial matrices in random+EP allows to sample from a much larger space of matrices and consequently Adam has more chances to overfit. Note that the problem of overfitting of the Adam optimizer is known and is discussed from a theoretical perspective in [47]. To validate this claim and potentially reduce the problem of overfitting, we run also the experiments with dropout following the procedure in [71], where the dropping probability is set to 0.5. Results, shown in Table 6, confirm our initial claim. random+EP outperforms all other initialization and is able to achieve performance comparable to LSTM. Note that RNNs offer a clear advantage in terms of computational complexity over LSTM, as demonstrated by the training times in Table 6. 7 C ONCLUSION This work shows that a careful initialization of the parameters is sufficient to successfully train feedforward neural networks with standard logistic activations. The initialization is based on some conditions, that are derived by studying the properties of a single neuron through information theory. The study is corroborated by numerous experiments over different known benchmarks and different networks. A PPENDIX A D ERIVATION OF B OUNDS (3) Recall that H(y) = H(z) + Ez {ln g 0 (z)} (11) 11 where (we drop the extrema of integration for the sake of brevity in the notation) Z . H(z)= − N (µ, σ 2 ) ln N (µ, σ 2 )dz Z √ 1 2 2 (z − µ) N (µ, σ )dz + ln( 2πσ 2 ) = 2σ 2 1 1 = + ln(2πσ 2 ) (12) 2 2 and . Ez {ln g 0 (z)}= Z N (µ, σ 2 ) ln g 0 (z)dz µ2 e 2σ2 2 (17) =√ σ 2π . µ By the change of variable t = σ√ , (17) simplifies in the 2 following equation: 2 µ tet = √ (18) π whose solution is given by: Z   N (µ, σ 2 ) ln g(z) 1 − g(z) dz   Z ez 2 dz = N (µ, σ ) ln (1 + ez )2 Z Z = zN (µ, σ 2 )dz − 2 N (µ, σ 2 ) ln(1 + ez )dz Z (13) = µ − 2 N (µ, σ 2 ) ln(1 + ez )dz = where the first line is zero if and only if µ = 0, thus proving the first condition in Theorem 1, while, by setting the second line to zero, we obtain the following equation: Note that the integrand in (13) is always positive and that max(0, z) < ln(1 + ez ) ≤ max(0, z) + ln 2 is true for any z . Therefore, we can easily derive the following relations, namely: 0 A(µ, σ) − 2 ln 2 ≤ Ez {ln g (z)} < A(µ, σ) (14) where . A(µ, σ)= µ − 2 Z ∞ Z−∞ ∞ 2 N (µ, σ ) max(0, z)dz zN (µ, σ 2 )dz   µ2 µ 2σ √ = µ − µ − µ erf − √ e− 2σ2 σ 2 2π   2σ − µ22 µ √ − √ e 2σ = −µ erf σ 2 2π =µ−2 0 (15) By adding H(z) to (14) and using (11), we obtain that H(z) + A(µ, σ) − 2 ln 2 ≤ H(y) < H(z) + A(µ, σ) HB (µ, σ) − 2 ln 2 ≤ H(y) < HB (µ, σ) (16) . where HB (µ, σ) = H(z) + A(µ, σ). A PPENDIX B P ROOF OF T HEOREM 1 Recall the definition of the lower bound in (4), namely:   √  µ2 µ 2σ . 1 2 √ − √ e− 2σ2 HB (µ, σ) = + ln 2πσ −µ erf 2 σ 2 2π derf (t) 2 By the fact that = √2π e−t and using standard dt calculus of derivatives, we can get that:   ∂HB (µ, σ) µ √ = −erf ∂µ σ 2 ∂HB (µ, σ) 1 2 − µ22 = − √ e 2σ ∂σ σ 2π 2µ2 π 2 W µ t = √ e− π  (19) where W (·) is the principal branch of the Lambert W function [56]. We can check whether (19) is the solution of (18), by substituting (19) in (18) and see that the equality (18) holds, namely:   2µ2 2µ2 µ2 −W µ −W π µ π e 2 π √ e =√ e π π   2 2µ2 e− e− e− W W W π 2 e 2 2µ π 2 e 2 2µ π 2 e µ2 π e 2µ2 e π W 2µ π −W 2µ2 π −W 2µ2 π 2 =1  2 =1  =1 where the fourth line is obtained by the identity t = W (t)eW (t) , or equivalently te−W (t) = W (t). Therefore, solution (19) can be explicited in terms of σ , thus giving us the second condition in Theorem 1. To prove the optimality of the the obtained solution, we perform a second-order derivative test, namely: r 2 1 − µ22 ∂ 2 HB (µ, σ) = − e 2σ 2 ∂µ πσ r ∂ 2 HB (µ, σ) 1 2 µ2 − µ22 =− 2 − e 2σ 2 ∂σ σ π σ2 r ∂ 2 HB (µ, σ) ∂ 2 HB (µ, σ) 2 µ − µ22 (20) = = e 2σ ∂µ∂σ ∂σ∂µ π σ2 Note that the first two equations in (20) are always negative, while the third equation is zero at µ = 0. Therefore the Hessian matrix for the obtained stationary point is negativedefinite. Q.E.D. A PPENDIX C G ENERAL C ASE OF D IFFERENT I NPUT VARIANCES Suppose that we are given an initial weight vector denoted by w̃ ∈ Rd . In general, w̃ does not satisy the optimality condition given by Theorem 1, namely Pd 2 i=1 w̃i V ar{xi } 6= π/2. We need to find the closest vector to w̃ that satisfies the condition in order to have maximum amount of information propagation. This can be formulated as the following optimization problem: minkw − w̃k22 w s.t. wT Dw = π/2 (21) 12 . where D = diag(V ar{x1 }, . . . , V ar{xd }) and the solution can be obtained by using existing iterative non-convex optimization procedures, due to the fact that the feasible set in (21) is not convex. ACKNOWLEDGMENTS We gratefully acknowledge NVIDIA Corporation with the donation of a Titan X Pascal machine to support this research. We thank Massimo Zanetti for insightful discussion. R EFERENCES [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] R. Girshick, J. Donahue, T. Darrell, and J. Malik, “Region-Based Convolutional Networks for Accurate Object Detection and Segmentation,” TPAMI, vol. 38, no. 1, pp. 142–158, 2016. S. Ji, W. Xu, M. Yang, and K. Yu, “3D Convolutional Neural Networks for Human Action Recognition,” TPAMI, vol. 35, no. 1, pp. 221–231, 2013. C. Dong, C. C. Loy, K. He, and X. Tang, “Image Super-Resolution Using Deep Convolutional Networks,” TPAMI, vol. 38, no. 2, pp. 295–307, 2016. A. Krizhevsky, I. Sutskever, and G. E. Hinton, “Imagenet Classification with Deep Convolutional Neural Networks,” in NIPS, 2012, pp. 1097–1105. R. Jozefowicz, O. Vinyals, M. Schuster, N. Shazeer, and Y. Wu, “Exploring the Limits of Language Modeling,” arXiv preprint arXiv:1602.02410, 2016. O. Vinyals, Ł. Kaiser, T. Koo, S. Petrov, I. Sutskever, and G. Hinton, “Grammar as a Foreign Language,” in NIPS, 2015, pp. 2773–2781. I. Sutskever, O. Vinyals, and Q. V. Le, “Sequence to Sequence Learning with Neural Networks,” in NIPS, 2014, pp. 3104–3112. A. Graves and N. Jaitly, “Towards End-to-End Speech Recognition with Recurrent Neural Networks,” in ICML, 2014, pp. 1764–1772. N. Kruger, P. Janssen, S. Kalkan, M. Lappe, A. Leonardis, J. Piater, A. J. Rodriguez-Sanchez, and L. Wiskott, “Deep Hierarchies in the Primate Visual Cortex: What Can We Learn for Computer Vision?” TPAMI, vol. 35, no. 8, pp. 1847–1871, 2013. G. F. Montufar, R. Pascanu, K. Cho, and Y. Bengio, “On the number of linear regions of deep neural networks,” in NIPS, 2014, pp. 2924–2932. M. Raghu, B. Poole, J. Kleinberg, S. Ganguli, and J. Sohl-Dickstein, “On the Expressive Power of Deep Neural Networks,” ICML, 2017. B. Poole, S. Lahiri, M. Raghu, J. Sohl-Dickstein, and S. Ganguli, “Exponential Expressivity in Deep Neural Networks Through Transient Chaos,” in NIPS, 2016, pp. 3360–3368. Y. Bengio et al., “Learning Deep Architectures for AI,” Foundations and trends R in Machine Learning, vol. 2, no. 1, pp. 1–127, 2009. F. Doshi-Velez and B. Kim, “Towards a Rigorous Science of Interpretable Machine Learning,” arXiv preprint arXiv:1702.08608, 2017. B. Goodman and S. Flaxman, “European Union Regulations on Algorithmic Decision-Making and a ’Right to Explanation’,” arXiv preprint arXiv:1606.08813, 2016. P. Dayan and L. F. Abbott, Theoretical Neuroscience. Cambridge, MA: MIT Press, 2001, vol. 806. D. Hassabis, D. Kumaran, C. Summerfield, and M. Botvinick, “Neuroscience-Inspired Artificial Intelligence,” Neuron, vol. 95, no. 2, pp. 245–258, 2017. J. M. Benı́tez, J. L. Castro, and I. Requena, “Are Artificial Neural Networks Black Boxes?” IEEE Transactions on Neural Networks, vol. 8, no. 5, pp. 1156–1164, 1997. S. Mitra and Y. Hayashi, “Neuro-fuzzy Rule Generation: Survey in Soft Computing Framework,” IEEE Transactions on Neural Networks, vol. 11, no. 3, pp. 748–768, 2000. Y. LeCun, L. Bottou, G. B. Orr, and K.-R. Müller, “Efficient BackProp,” in NIPS Workshop. Springer-Verlag, 1998, pp. 9–50. X. Glorot and Y. Bengio, “Understanding the Difficulty of Training Deep Feedforward Neural Networks,” in AISTATS, 2010. B. Xu, R. Huang, and M. Li, “Revise Saturated Activation Functions,” ICLR Workshop, 2016. D. E. Rumelhart and G. E. Hintonf, “Learning Representations by Back-Propagating Errors,” Nature, vol. 323, p. 9, 1986. J. Schmidhuber, “Deep Learning in Neural Networks: An Overview,” Neural Networks, vol. 61, pp. 85–117, 2015. M. Fernández-Redondo and C. Hernandez-Espinosa, “A Comparison among Weight Initialization Methods for Multilayer Feedforward Networks,” in IJCNN, vol. 4. IEEE, 2000, pp. 543–548. [26] X. M. Zhang, Y. Q. Chen, N. Ansari, and Y. Q. Shi, “MiniMax Initialization for Function Approximation,” Neurocomputing, vol. 57, pp. 389–409, 2004. [27] G. Cybenko, “Approximation by Superpositions of a Sigmoidal Function,” Mathematics of Control, Signals, and Systems (MCSS), vol. 2, no. 4, pp. 303–314, 1989. [28] K. Hornik, M. Stinchcombe, and H. White, “Multilayer Feedforward Networks are Universal Approximators,” Neural networks, vol. 2, no. 5, pp. 359–366, 1989. [29] Y. Bengio, P. Simard, and P. Frasconi, “Learning Long-Term Dependencies with Gradient Descent is Difficult,” IEEE Transactions on Neural Networks, vol. 5, no. 2, pp. 157–166, 1994. [30] G. E. Hinton and R. R. Salakhutdinov, “Reducing the Dimensionality of Data with Neural Networks,” Science, vol. 313, no. 5786, pp. 504–507, 2006. [31] Y. Bengio, P. Lamblin, D. Popovici, and H. Larochelle, “Greedy Layer-Wise Training of Deep Networks,” in NIPS, 2007, pp. 153– 160. [32] C. Poultney, S. Chopra, Y. L. Cun et al., “Efficient Learning of Sparse Representations with an Energy-Based Model,” in NIPS, 2007, pp. 1137–1144. [33] D. Erhan, Y. Bengio, A. Courville, P.-A. Manzagol, P. Vincent, and S. Bengio, “Why Does Unsupervised Pre-training Help Deep Learning?” JMLR, vol. 11, no. Feb, pp. 625–660, 2010. [34] K. He, X. Zhang, S. Ren, and J. Sun, “Deep Residual Learning for Image Recognition,” in CVPR, 2016, pp. 770–778. [35] R. K. Srivastava, K. Greff, and J. Schmidhuber, “Highway Networks,” ICML Workshop, 2015. [36] G. Huang, Z. Liu, K. Q. Weinberger, and L. van der Maaten, “Densely Connected Convolutional Networks,” CVPR, 2017. [37] S. Ioffe and C. Szegedy, “Batch Normalization: Accelerating Deep Network Training by Reducing Internal Covariate Shift,” in ICML, 2015, pp. 448–456. [38] J. L. Ba, J. R. Kiros, and G. E. Hinton, “Layer Normalization,” NIPS Deep Learning Symposium, 2016. [39] T. Salimans and D. P. Kingma, “Weight Normalization: A Simple Reparameterization to Accelerate Training of Deep Neural Networks,” in NIPS, 2016, pp. 901–901. [40] B. T. Polyak, “Some Methods of Speeding up the Convergence of Iteration Methods,” USSR Computational Mathematics and Mathematical Physics, vol. 4, no. 5, pp. 1–17, 1964. [41] I. Sutskever, J. Martens, G. Dahl, and G. Hinton, “On the Importance of Initialization and Momentum in Deep Learning,” in ICML, 2013, pp. 1139–1147. [42] D. Kingma and J. Ba, “Adam: A Method for Stochastic Optimization,” ICLR, 2014. [43] J. Martens, “Deep Learning via Hessian-Free Optimization,” in ICML, 2010, pp. 735–742. [44] S.-I. Amari, “Natural Gradient Works Efficiently in Learning,” Neural Computation, vol. 10, no. 2, pp. 251–276, 1998. [45] R. Grosse and R. Salakhudinov, “Scaling up Natural Gradient by Sparsely Factorizing the Inverse Fisher Matrix,” in ICML, 2015, pp. 2304–2313. [46] N. N. Schraudolph, “Fast Curvature Matrix-Vector Products for Second-Order Gradient Descent,” Neural Computation, vol. 14, no. 7, pp. 1723–1738, 2002. [47] A. C. Wilson, R. Roelofs, M. Stern, N. Srebro, and B. Recht, “The Marginal Value of Adaptive Gradient Methods in Machine Learning,” arXiv preprint arXiv:1705.08292, 2017. [48] L. Bottou, F. E. Curtis, and J. Nocedal, “Optimization Methods for Large-Scale Machine Learning,” arXiv preprint arXiv:1606.04838, 2016. [49] X. Glorot, A. Bordes, and Y. Bengio, “Deep Sparse Rectifier Neural Networks,” in AISTATS, 2011, pp. 315–323. [50] K. He, X. Zhang, S. Ren, and J. Sun, “Delving Deep into Rectifiers: Surpassing Human-Level Performance on Imagenet Classification,” in ICCV, 2015, pp. 1026–1034. [51] A. M. Saxe, J. L. McClelland, and S. Ganguli, “Exact Solutions to the Nonlinear Dynamics of Learning in Deep Linear Neural Networks,” ICLR, 2014. [52] D. Mishkin and J. Matas, “All You Need is a Good Init,” ICLR, 2016. [53] D. Sussillo and L. Abbott, “Random Walk Initialization for Training Very Deep Feedforward Networks,” arXiv preprint arXiv:1412.6558, 2014. [54] S. S. Schoenholz, J. Gilmer, S. Ganguli, and J. Sohl-Dickstein, “Deep Information Propagation,” ICLR, 2017. 13 [55] A. Papoulis and S. U. Pillai, Probability, Random Variables, and Stochastic Processes. Tata McGraw-Hill Education, 2002. [56] R. M. Corless, G. H. Gonnet, D. E. Hare, D. J. Jeffrey, and D. E. Knuth, “On the LambertW Function,” Advances in Computational Mathematics, vol. 5, no. 1, pp. 329–359, 1996. [57] Y. A. LeCun, L. Bottou, G. B. Orr, and K.-R. Müller, “Efficient Backprop,” in Neural Networks: Tricks of the Trade. Springer, 2012, pp. 9–48. [58] R. Pascanu, T. Mikolov, and Y. Bengio, “On the Difficulty of Training Recurrent Neural Networks,” in ICML, 2013, pp. 1310– 1318. [59] P. Y. Simard, D. Steinkraus, J. C. Platt et al., “Best Practices for Convolutional Neural Networks Applied to Visual Document Analysis.” in ICDAR, 2003. [60] Y. LeCun, L. Bottou, Y. Bengio, and P. Haffner, “Gradient-Based Learning Applied to Document Recognition,” Proceedings of the IEEE, vol. 86, no. 11, pp. 2278–2324, 1998. [61] N. Srivastava, G. E. Hinton, A. Krizhevsky, I. Sutskever, and R. Salakhutdinov, “Dropout: A Simple Way to Prevent Neural Networks from Overfitting,” JMLR, vol. 15, no. 1, pp. 1929–1958, 2014. [62] D. C. Cireşan, U. Meier, L. M. Gambardella, and J. Schmidhuber, “Deep, Big, Simple Neural Nets for Handwritten Digit Recognition,” Neural Computation, vol. 22, no. 12, pp. 3207–3220, 2010. [63] H. Jaeger and H. Haas, “Harnessing Nonlinearity: Predicting Chaotic Systems and Saving Energy in Wireless Communication,” Science, vol. 304, no. 5667, pp. 78–80, 2004. [64] M. Lukoševičius and H. Jaeger, “Reservoir Computing Approaches to Recurrent Neural Network Training,” Computer Science Review, vol. 3, no. 3, pp. 127–149, 2009. [65] J. Martens and I. Sutskever, “Learning Recurrent Neural Networks with Hessian-Free Optimization,” in ICML, 2011, pp. 1033–1040. [66] M. Arjovsky, A. Shah, and Y. Bengio, “Unitary Evolution Recurrent Neural Networks,” in ICML, 2016, pp. 1120–1128. [67] L. Jing, Y. Shen, T. Dubček, J. Peurifoy, S. Skirlo, M. Tegmark, and M. Soljačić, “Tunable Efficient Unitary Neural Networks (EUNN) and Their Application to RNNs,” in ICML, 2017, pp. 1733–1741. [68] Z. Mhammedi, A. Hellicar, A. Rahman, and J. Bailey, “Efficient Orthogonal Parametrisation of Recurrent Neural Networks Using Householder Reflections,” pp. 2401–2409, 2017. [69] S. Hochreiter and J. Schmidhuber, “Long Short-Term Memory,” Neural Computation, vol. 9, no. 8, pp. 1735–1780, 1997. [70] M. P. Marcus, M. A. Marcinkiewicz, and B. Santorini, “Building a Large Annotated Corpus of English: The Penn Treebank,” Computational linguistics, vol. 19, no. 2, pp. 313–330, 1993. [71] W. Zaremba, I. Sutskever, and O. Vinyals, “Recurrent Neural Network Regularization,” ICLR, 2015.
9cs.NE
ÉCOLE POLYTECHNIQUE DE MONTRÉAL ELECTRICAL ENGINEERING DEPARTMENT arXiv:1608.05786v1 [cs.SY] 20 Aug 2016 AUTOMATION SECTION DESIGN OF A TRAJECTORY TRACKING CONTROLLER FOR A NANOQUADCOPTER Luis, C., & Le Ny, J. (August, 2016). Design of a Trajectory Tracking Controller for a Nanoquadcopter. Technical report, Mobile Robotics and Autonomous Systems Laboratory, Polytechnique Montreal. Author: Carlos Luis Supervisor: Jérôme Le Ny Abstract The primary purpose of this study is to investigate the system modeling of a nanoquadcopter as well as designing position and trajectory control algorithms, with the ultimate goal of testing the system both in simulation and on a real platform. The open source nanoquadcopter platform named Crazyflie 2.0 was chosen for the project. The first phase consisted in the development of a mathematical model that describes the dynamics of the quadcopter. Secondly, a simulation environment was created to design two different control architectures: cascaded PID position tracker and LQT trajectory tracker. Finally, the implementation phase consisted in testing the controllers on the chosen platform and comparing their performance in trajectory tracking. Our simulations agreed with the experimental results, and further refinement of the model is proposed as future work through closed-loop model identification techniques. The results show that the LQT controller performed better at tracking trajectories, with RMS errors in position up to four times smaller than those obtained with the PID. LQT control effort was greater, but eliminated the high control peaks that induced motor saturation in the PID controller. The LQT controller was also tested using an ultrawide band two-way ranging system, and comparisons with the more precise VICON system indicate that the controller could track a trajectory in both cases despise the difference in noise levels between the two systems. ii Contents List of Figures . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . iv List of Tables . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . vii 1. Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1 1.1 Main Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 2 1.2 Secondary Objectives . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 2. Model of the Quadcopter . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.1 Coordinate Frames . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 2.2 Dynamic Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 5 2.2.1 Force Equations . . . . . . . . . . . . . . . . . . . . . . . . . . . . 7 2.2.2 Momentum Equations . . . . . . . . . . . . . . . . . . . . . . . . . 9 2.3 Physical Parameters . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 12 2.4 Linearization and State Space Representation . . . . . . . . . . . . . . . . 13 2.5 Movement Decoupling . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 16 2.6 Motor Characterization . . . . . . . . . . . . . . . . . . . . . . . . . . . . 17 3. Simulation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3.1 19 Cascaded PID Position Tracker . . . . . . . . . . . . . . . . . . . . . . . . 19 3.1.1 3.1.2 On-Board Control Architecture . . . . . . . . . . . . . . . . . . . . 20 3.1.1.1 Inner Loop: Rate Controller . . . . . . . . . . . . . . . . 21 3.1.1.2 Outer Loop: Attitude Controller . . . . . . . . . . . . . . 22 3.1.1.3 Control Mixer . . . . . . . . . . . . . . . . . . . . . . . . 23 Off-Board Position Controller . . . . . . . . . . . . . . . . . . . . . 24 3.1.2.1 Altitude Controller . . . . . . . . . . . . . . . . . . . . . . 25 3.1.2.2 X-Y Position Controller . . . . . . . . . . . . . . . . . . . 25 3.1.2.3 Yaw Position Controller . . . . . . . . . . . . . . . . . . . 27 3.1.2.4 Controllers Gains . . . . . . . . . . . . . . . . . . . . . . 27 iii 3.1.3 3.2 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 28 Linear-Quadratic Tracker (LQT) . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.1 The Optimization Problem Setup . . . . . . . . . . . . . . . . . . . 32 3.2.2 Kalman Filter for Linear Velocity Estimation . . . . . . . . . . . . 37 3.2.3 Weight Matrices and Integral Action . . . . . . . . . . . . . . . . . 43 3.2.4 Trajectory Generation . . . . . . . . . . . . . . . . . . . . . . . . . 44 3.2.5 Simulation Results . . . . . . . . . . . . . . . . . . . . . . . . . . . 45 4. Hardware Implementation and Experimental Results . . . . . . . . . 4.1 4.2 4.3 4.4 50 PID Controller . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.1.1 ROS Controller Node . . . . . . . . . . . . . . . . . . . . . . . . . 50 4.1.2 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . 53 LQT Controller Implementation . . . . . . . . . . . . . . . . . . . . . . . . 60 4.2.1 ROS Controller Node Modifications . . . . . . . . . . . . . . . . . . 62 4.2.2 MATLAB Interface Details . . . . . . . . . . . . . . . . . . . . . . 63 4.2.3 Experimental Results . . . . . . . . . . . . . . . . . . . . . . . . . 64 Controller Comparisons . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.3.1 Simulation vs Experimental - PID . . . . . . . . . . . . . . . . . . 68 4.3.2 Simulation vs Experimental - LQT . . . . . . . . . . . . . . . . . . 71 4.3.3 Controller Performance: PID vs LQT . . . . . . . . . . . . . . . . 73 LQT with UWB Position Estimation . . . . . . . . . . . . . . . . . . . . . 82 5. Conclusions and Future Work . . . . . . . . . . . . . . . . . . . . . . . 89 Bibliography . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 92 Appendix A . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 95 List of Figures 2.1.1 Body-fixed frame and Inertial frame. . . . . . . . . . . . . . . . . . . . . 4 2.1.2 “+” configuration at the left and “X” configuration at the right. . . . . . 5 2.2.1 Euler angles in the quadcopter’s body. . . . . . . . . . . . . . . . . . . . 6 2.2.2 Force diagram in the body-fixed frame. . . . . . . . . . . . . . . . . . . . 7 iv LIST OF FIGURES 2.2.3 Rotation direction of each motor, courtesy of Bitcraze “Crazyflie 2.0 user guide”. 10 3.1.1 Block Diagram of Simulation environment. . . . . . . . . . . . . . . . . . 19 3.1.2 On-board control architecture, image courtesy of Bitcraze. . . . . . . . . 20 3.1.3 Rate Controller diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . 21 3.1.4 Rate Controller diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.1.5 Onboard control architecture with Control mixer. . . . . . . . . . . . . . 24 3.1.6 Altitude Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25 3.1.7 X-Y Position Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . 26 3.1.8 Yaw Position Controller. . . . . . . . . . . . . . . . . . . . . . . . . . . . 27 3.1.9 Simulation results for Test #1. . . . . . . . . . . . . . . . . . . . . . . . 28 3.1.10 3D Trajectory for Test #1. . . . . . . . . . . . . . . . . . . . . . . . . . . 29 3.1.11 Compound movement interference. . . . . . . . . . . . . . . . . . . . . . 29 3.1.12 Simulation results for a circular trajectory. . . . . . . . . . . . . . . . . . 30 3.1.13 3D Circular Trajectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 31 3.1.14 Helical Trajectory Time response. . . . . . . . . . . . . . . . . . . . . . . 31 3.1.15 3D Helical Trajectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 32 3.2.1 LQT Closed-Loop System. . . . . . . . . . . . . . . . . . . . . . . . . . . 36 3.2.2 Experimental validation of the Kalman Filter using the VICON system raw data of X-Y positions. . . . . . . . . . . . . . . . . . . . . . . . . . . 41 3.2.3 Experimental validation of the Kalman Filter using the UWB system raw data of X-Y positions. . . . . . . . . . . . . . . . . . . . . . . . . . . 42 3.2.4 Experimental validation of the Kalman Filter altitude estimation from VICON raw data of Z position. . . . . . . . . . . . . . . . . . . . . . . . 42 3.2.5 Trajectory generation GUI. . . . . . . . . . . . . . . . . . . . . . . . . . 45 3.2.6 Simulation for steps in x, y and z positions. . . . . . . . . . . . . . . . . 46 3.2.7 Kalman Filter simulation, with VICON and UWB simulated noise. . . . 47 3.2.8 Tracking for complex trajectories. . . . . . . . . . . . . . . . . . . . . . . 48 3.2.9 3D Diagram for a complex trajectory. . . . . . . . . . . . . . . . . . . . . 48 3.2.10 Kalman Filter simulation for a complex trajectory. . . . . . . . . . . . . 49 4.1.1 ROS nodes and topics. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 51 4.1.2 Crazyflie 2.0 with Vicon Sphere and UWB module. . . . . . . . . . . . . 51 4.1.3 Steps in vertical command zc . . . . . . . . . . . . . . . . . . . . . . . . . 54 4.1.4 3D Vertical Trajectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 54 v LIST OF FIGURES 4.1.5 Steps in zc and xc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.1.6 3D Diagonal Trajectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . 55 4.1.7 Steps in yc and ψc . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 56 4.1.8 3D Trajectory with Y-Yaw compound movement. . . . . . . . . . . . . . 57 4.1.9 Time Response for circular trajectory. . . . . . . . . . . . . . . . . . . . 58 4.1.10 3D Circular trajectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 58 4.1.11 Time Response for helix trajectory. . . . . . . . . . . . . . . . . . . . . . 59 4.1.12 3D Helix Trajectory. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 60 4.2.1 Pitch angle calibration rig. . . . . . . . . . . . . . . . . . . . . . . . . . . 61 4.2.2 Implementation diagram. . . . . . . . . . . . . . . . . . . . . . . . . . . . 62 4.2.3 MATLAB Interface diagram to implement the LQT controller. . . . . . . 63 4.2.4 Position plots for Trajectory#1. . . . . . . . . . . . . . . . . . . . . . . . 64 4.2.5 3D Trajectory#1. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 65 4.2.6 Position plots for Trajectory#2. . . . . . . . . . . . . . . . . . . . . . . . 65 4.2.7 3D Trajectory#2. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 66 4.2.8 Position plots for Trajectory#3. . . . . . . . . . . . . . . . . . . . . . . . 66 4.2.9 3D Trajectory#3. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 67 4.2.10 Position plots for Trajectory#4. . . . . . . . . . . . . . . . . . . . . . . . 67 4.2.11 3D Trajectory#4. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 4.3.1 Trajectory using the PID controller to follow a Step in the X position. . 69 4.3.2 Trajectory using the PID controller to follow a Step in the Y position. . 70 4.3.3 Trajectory using the PID controller to follow a Step in the Z position. . 70 4.3.4 Trajectory using the LQT controller to follow a Step in the X position. . 71 4.3.5 Trajectory using the LQT controller to follow a Step in the Y position. . 72 4.3.6 Trajectory using the LQT controller to follow a Step in the Z position. . 72 4.3.7 X-Y Position and error comparison when following a unit step in the X position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 74 4.3.8 Motor commands comparison when following a unit step in the X position. 75 4.3.9 X-Y Position and error comparison when following a unit step in the Y position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 76 4.3.10 Motor commands comparison when following a unit step in the Y position. 77 4.3.11 Z Position and error comparison when following a unit step. . . . . . . . 78 4.3.12 X-Y Position and error comparison when following a unit step in the Z position. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 78 vi 4.3.13 Motor commands comparison when following a unit step in the Z position. 79 4.3.14 X-Y Position and error comparison when following a circular trajectory. 80 4.3.15 Motor command comparison when following a circular trajectory. . . . . 81 4.4.1 Crazyflie 2.0 with UWB module exposed . . . . . . . . . . . . . . . . . . 82 4.4.2 X-Y Position and error comparison while hovering around a point. . . . 83 4.4.3 X-Y Position and error comparison when following Trajectory #1. . . . 84 4.4.4 Comparison of 3D Trajectory#1. . . . . . . . . . . . . . . . . . . . . . . 84 4.4.5 X-Y Position and error comparison when following Trajectory #2. . . . 85 4.4.6 Comparison of 3D Trajectory#2. . . . . . . . . . . . . . . . . . . . . . . 86 4.4.7 X-Y Position and error comparison when following Trajectory #3. . . . 87 4.4.8 Comparison of 3D Trajectory#3. . . . . . . . . . . . . . . . . . . . . . . 87 List of Tables 2.2.1 Notation for vectors and states. . . . . . . . . . . . . . . . . . . . . . . . 6 2.3.1 Physical parameters for the Crazyflie 2.0. . . . . . . . . . . . . . . . . . . 12 3.1.1 Rate Controller’s gains. . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22 3.1.2 Attitude Controller’s gains. . . . . . . . . . . . . . . . . . . . . . . . . . 23 3.1.3 Gains for Off-Board Controllers. . . . . . . . . . . . . . . . . . . . . . . . 27 4.3.1 Error comparison when following a unit step in X position. . . . . . . . . 74 4.3.2 Motor effort comparison when following a unit step in the X position. . . 75 4.3.3 Error comparison when following a unit step in Y position. . . . . . . . . 76 4.3.4 Motor effort comparison when following a unit step in the Y position. . . 77 4.3.5 Error comparison when following a unit step in Z position. . . . . . . . . 79 4.3.6 Motor effort comparison when following a unit step in the Z position. . . 79 4.3.7 Error comparison when following a circular position. . . . . . . . . . . . 80 4.3.8 Motor effort comparison when following a circular trajectory. . . . . . . 81 4.4.1 Error comparison while hovering around a point. . . . . . . . . . . . . . 83 4.4.2 Error comparison while following Trajectory #1. . . . . . . . . . . . . . 85 4.4.3 Error comparison while following Trajectory #2. . . . . . . . . . . . . . 86 vii LIST OF TABLES 4.4.4 Error comparison while following Trajectory #3. . . . . . . . . . . . . . 87 viii Chapter 1 Introduction In the past decade quadcopters have been studied due to their relative simple fabrication in comparison to other aerial vehicles, which turns them into ideal platforms for modeling, simulation and implementation of control algorithms. The fact that they are unmanned vehicles naturally invites developers to explore tasks that require a high degree of autonomy. Past works such as [17, 30] have set the base for developing quadcopter platforms from their construction to the automation techniques necessary to control the highly non-linear dynamics that characterize these vehicles. The scope of the quadcopter technology has changed over the years. The cost and sizes have been reduced, it is now a platform affordable for a broad type of public, from researchers to hobbyists. But beyond the economic revenue these vehicles generate, the manufacturers are searching for more autonomy, longer flight time, high data processing capabilities and adaptation to changing environments, hence the active research on quadcopters. A fairly new type of quadcopters are the so called “nanoquads” that are of considerably low size and weight, making them an ideal platform for indoor usage. The project proposed here considers the study of a commercial platform of a nanoquadcopter called “Crazyflie 2.0” developed by Bitcraze company [33]. Weighting only 27 grams and having 9.2 cm of length and width, this nanoquad has rapidly become one of the preferred platforms for quadcopter research. 1 CHAPTER 1. INTRODUCTION For indoor control of quadcopters different localization techniques can be employed, for example the VICON motion capture system [33] is one of the preferred systems for precise localization and it has been used widely in recent quadcopter studies [11, 26]. A recent low-cost technology based on ultra-wide band radio modules has proven effective for indoor localization in robotics systems and specially in quacopters [35]. Its low costs are inviting developers to create their own implementations and the system is getting more precise and robust. In a few words, the system measures the distance between two ultra-wide band modules, normally called anchor and tag, by measuring the time of flight of an electromagnetic wave. Thus, by the simple relationship between time, distance and velocity (in this case, the speed of light), then the distance can be easily determined. By having at least three anchors constantly calculating the distance between them and a certain tag, a triangulation allows to calculate the position in space of the tag, knowing beforehand the fixed position of each anchor with respect to a frame. The UWB system can be implemented using a two-way ranging protocol or a one-way ranging protocol. In two-way ranging, the tag communicates with each anchor individually following a sequence to go through all the anchors and calculate each distance. On the other hand, in one-way ranging the tag constantly broadcasts messages that are received by every anchor and by precisely synchronising the clocks of the anchors then the distance between each of them and the tag are calculated. One-way ranging is particular useful for multi-robot localization applications as there exists no bottle-neck in the number of tags the system can support. In particular, for this project the two-way ranging system developed in [36] was used to test the control loop behavior using different localization techniques. This system was developed using the decaWave DMW1000 ultra-wide band module [37] which offers an accuracy of 10-20 centimeters in distance measurements. 1.1 Main Objectives The main objectives of the research project were: 1. Develop the mathematical model that describes the dynamics of the Crazyflie 2.0 quadcopter. 2. Create a simulation environment for testing position and trajectory tracking control algorithms. 2 CHAPTER 1. INTRODUCTION 3. Implement, test and compare different control architectures. 4. Evaluate the performance of a low-cost UWB-based localization system when integrated in the control loop. 1.2 Secondary Objectives A set of small milestones were defined to help achieve the main objectives of the project: 1. Investigate past works to identify the physical and aerodynamical parameters of the Crazyflie 2.0. 2. Linearize the quadcopter’s dynamics around hover state. 3. Study and identify the control architecture inside the Crazyflie’s firmware. 4. Design, simulate and implement an off-board position controller using data from the VICON positioning system. 5. Conceive a second control system, from simulation to implementation, to track more demanding trajectories. 6. Compare the performance of both controllers with in-flight data. 7. Compare the performance of the LQT controller using both the VICON and the UWB systems. 3 Chapter 2 Model of the Quadcopter In this section a mathematical model of the Crazyflie 2.0 is proposed. This study was the basis on which the simulation environment was built and an important component in the design of controllers. Thus, it was important to dedicate enough time to understand how the system works and identify correctly some physical parameters that were relevant for the simulation to be useful in the real case scenario. 2.1 Coordinate Frames Before any dynamic study of the quadcopter begins, it is necessary to define the coordinate frames of the body of the quadcopter (non-inertial frame) as well as the inertial frame, also called “world frame”, which in the case of this project refers to the coordinate frame set by the external positioning system (VICON/UWB). Following the conventions set by the “Bitcraze” company when designing their quadcopter, as seen in Figure 2.1.1 the body-fixed frame is defined. Figure 2.1.1: Body-fixed frame and Inertial frame. In the aeronautic systems, a popular axes convention is to define a positive altitude downwards, the Y axis pointing towards the east and the X axis pointing towards the 4 CHAPTER 2. MODEL OF THE QUADCOPTER true north. These types of frames are called NED frames (North, East, Down). It was decided to follow the convention used in the Crazyflie 2.0 firmware, meaning a positive altitude upwards, which defines an ENU frame (East, North, Up). Another remark is that the origin of the body-fixed frame matches with the center of gravity of the quadcopter. Another important remark is knowing the flight configuration of the quadcopter as there are two of them: configuration “+” or configuration “X”. The difference between them is the orientation of the X-Y frame in terms of the arms of the quadcopter, as shown in Figure 2.1.2 taken from the manufacturer’s website [32] and modified accordingly. Figure 2.1.2: “+” configuration at the left and “X” configuration at the right. In the modern conceptions of quadcopters the “X” configuration is prefered over the “+” configuration, mainly because in “X” it is easier to add a camera functionality as the quadcopter’s arms will not be interfering with the images captured. By default the Crazyflie 2.0 is in X mode, so for the rest of this project and during the mathematical modeling it will be considered that the quadcopter is in this configuration. 2.2 Dynamic Equations The dynamic equations of the quadcopter proposed here take into account certain physical properties that are not necessarily perfectly valid in the real platform that is being used in this work, but they are good approximations that simplify greatly the study and comprehension of this type of vehicles. Here are the hypothesis: 1. The quadcopter is a rigid body that cannot be deformed, thus it is possible to use the well-known dynamic equations of a rigid body. 2. The quadcopter is symmetrical in its geometry, mass and propulsion system. 5 CHAPTER 2. MODEL OF THE QUADCOPTER 3. The mass is constant (i.e its derivative is 0). The mechanical classic laws of motion are valid in inertial systems, so to be able to translate these equations into the body frame it is necessary to define a rigid transformation matrix from the inertial frame to the body-fixed frame, in which only the rotational part is meaningful to the discussion and is given by three successive rotations: first a rotation of an angle ψ around the z axis, then a rotation of an angle θ around the intermediate y axis and finally a rotation of an angle φ around the intermediate x axis. Once these three rotations are calculated, the resulting transformation matrix is defined as:   cos θ cos ψ cos θ sin ψ − sin θ   Rib =  sin φ sin θ cos ψ − cos φ sin ψ sin φ sin θ sin ψ + cos φ cos ψ sin φ cos θ  cos φ sin θ cos ψ + sin φ sin ψ cos φ sin θ sin ψ − sin φ cos ψ cos φ cos θ (2.2.1) where φ, θ and ψ represent the roll, pitch and yaw angles of the quadcopter’s body. Figure 2.2.1 shows the direction of said angles in the Crazyflie 2.0 body-fixed frame defined previously. Figure 2.2.1: Euler angles in the quadcopter’s body. The notation convention used during the mathematical analysis of the quadcopter’s dynamics is exhibited in Table 2.2.1, where the state variables are defined. Vector pCG/o Φ VCG/o ωb/o State Description x X position of CoG in the inertial frame y Y position of CoG in the inertial frame z Z position of CoG in the inertial frame φ Roll angle θ Pitch angle ψ Yaw angle u X linear velocity of CoG in the body-fixed frame w.r to the inertial frame v Y linear velocity of CoG in the body-fixed frame w.r to the inertial frame w Z linear velocity of CoG in the body-fixed frame w.r to the inertial frame p Roll angular velocity in the body-fixed frame w.r to the inertial frame q Pitch angular velocity in the body-fixed frame w.r to the inertial frame r Yaw angular velocity in the body-fixed frame w.r to the inertial frame w.r = with respect. Table 2.2.1: Notation for vectors and states. 6 CHAPTER 2. MODEL OF THE QUADCOPTER Furthermore, a left superindex such as o V̇CG/o will indicate in what frame a derivative is taken, while a right superindex indicate a vector coordinates into the specified frame. If a right superindex is not specified as in the example, then the vector does not experience any rotations after the derivative is taken. 2.2.1 Force Equations According to Newton’s Second Law, the expression for the sum of forces is: X (2.2.2) F = mo V̇CG/o The expression of this derivative of velocity can be determined using the Coriolis equation, which gives the following dynamic expression in the body-fixed frame: X F = mo V̇CG/o = m  b V̇CG/o + ωb/o × VCG/o  (2.2.3) Each propeller of the quadcopter creates an aerodynamical force as shown in Figure 2.2.2 that acts upwards in the body-fixed frame. Figure 2.2.2: Force diagram in the body-fixed frame. In a situation where the quadcopter is parallel to the ground, meaning its roll and pitch angles are zero, the aerodynamic forces created by the propellers will search to counteract the effect of the weight and then make the quadcopter move upwards, downwards or stay in a hover position. In Figure 2.2.2 the vector “mg” actually represents the projection of the weight vector from the inertial frame to the body-fixed frame. That being said, this qualitative analysis of how the forces work in the quadcopter’s body can be translated 7 CHAPTER 2. MODEL OF THE QUADCOPTER into (2.2.3) as:           0 0 u̇ p u          b  0  − Ro  0  = m  v̇  +  q  ×  v  Fz mg ẇ r w (2.2.4) From (2.2.4) it is possible to isolate the vector b V̇CG/o :           u̇ 0 0 p u          b  v̇  =  0  − Ro  0  −  q  ×  v  ẇ Fz /m g r w (2.2.5) This equation dictates how the velocity of the center of gravity of the quadcopter evolves in its body-fixed frame. To determine another set of state space variables it is necessary to project this vector in the inertial frame to calculate the velocity in this coordinate system. Note: the matrix Rob is a rotation matrix, so it has the following property: −1  Rob = Rob T = Rbo . Applying it, the projection is calculated:  o b ṗCG/o   b = Rob o ṗCG/o ⇐⇒ o ṗCG/o = Rbo VCG/o    ẋ u     ⇐⇒  ẏ  = Rbo  v  ż w (2.2.6) By integrating (2.2.6) it is possible to know the position of the quadcopter in the inertial frame. Concerning the equations of forces and their state variables, it is necessary to specify the form of the aerodynamical force generated by the propellers. Following the diagram in Figure 2.2.2, the force generated by each propeller has the form:   0   Fib =  0  Ti (2.2.7) where Ti represents the upward thrust force in Newtons generated by each propeller. It is widely known that the thrust generated by a propeller is a function of the square of its angular speed: Ti = CT ωi2 (2.2.8) CT is a thrust coefficient that will be specified in Section 2.3 and ωi is the rotation speed of the i-th motor, in revolutions per minute. As Figure 2.2.2 suggests, each propeller generates a thrust force following (2.2.8) and all in the same direction, which leads to a 8 CHAPTER 2. MODEL OF THE QUADCOPTER sum of all thrust forces:  X  Fib =  CT 2.2.2  0 0 ω12 + ω22 + ω32  2   (2.2.9) + ω4 Momentum Equations These equations dictate the rotational dynamics of the quadcopter. Following the theorem of angular momentum: X M o = o ḣ (2.2.10) where h denotes the angular momentum around the center of gravity. Using Coriolis equation: X M o = o ḣ = b ḣ + ωb/o × h (2.2.11) It is desirable to express (2.2.11) in the body-fixed frame as the momentum equations are more easily calculated, as explained in [31]: X M b = J b ω̇b/o + ωb/o × J ωb/o (2.2.12) here J denotes the inertia matrix of the quadcopter, which in general can be expressed as:   Ixx −Ixy −Ixz   J =  −Ixy Iyy −Iyz  −Ixz −Iyz Izz (2.2.13) but from the hypothesis that the body of the quadcopter is symmetrical around all its axes, the inertia matrix has all crossed terms equal to zero, i.e.,   Ixx 0 0   J =  0 Iyy 0  0 0 Izz (2.2.14) From equation (2.2.12) it is possible to isolate the vector b ω̇b/o :        p p ṗ Mx        −1  = (J ) − × J  My   q   q   q̇  r r ṙ Mz  9 (2.2.15) CHAPTER 2. MODEL OF THE QUADCOPTER The last state equations come from the relation between ωb/o and the Euler angles derivative Φ̇      p 1 0 − sin θ φ̇       q  =  0 cos φ sin φ cos θ   θ̇  r 0 − sin φ cos φ cos θ ψ̇ (2.2.16) with the inverse relation the state vector Φ̇ is isolated:      φ̇ 1 sin φ tan θ cos φ tan θ p π      cos φ − sin φ   q  for θ 6=  θ̇  =  0 2 ψ̇ 0 sin φ/ cos θ cos φ/ cos θ r (2.2.17) To calculare the total momentum generated in the quadcopter system, it is imperative to know the rotation direction of each motor. As seen in Figure 2.2.3, the manufacturer of the Crazyflie 2.0 provides this information [32]. Figure 2.2.3: Rotation direction of each motor, courtesy of Bitcraze “Crazyflie 2.0 user guide”. The expression for the momentum is given as: M= 4 X Pi × Fi + i=1 4 X τi (2.2.18) i=1 where Pi represents the position of each motor in the body-fixed frame and τi represents the induced momentum in the quadcopter’s body generated by the i-th motor. When a rotor turns in a given direction, conservation of angular momentum dictates that the quadcopter’s body will have a tendency to counteract the generated angular momentum, being consistent with Newton’s third law of action and reaction. This reaction momentum due to the spin of a rotor is the induced moment τi . If d denotes the distance from the center of gravity to the center of each motor, the 10 CHAPTER 2. MODEL OF THE QUADCOPTER position of each motor is:    √  √  √  √  d/ 2 −d/ 2 −d/ 2 d/ 2 √  √  √      √  P1 =  −d/ 2  , P2 =  −d/ 2  , P3 =  d/ 2  , P4 =  d/ 2  0 0 0 0  (2.2.19) Then the mometum generated by the thrust force of each motor can be calculated:   √   √  −CT ω12 d/ 2 −CT ω22 d/ 2  √   √    P1b × F1b =  −CT ω12 d/ 2  P2b × F2b =  CT ω22 d/ 2  0 0    √   √  CT ω32 d/ 2 CT ω42 d/ 2 √   √     P3b × F3b =  CT ω32 d/ 2  P4b × F4b =  −CT ω42 d/ 2  0 0  The induced moments τi act only in the Z axis and have an opposite magnitude from the moment generated by each propeller, due to the conservation of angular momentum. In this particular case, given the axis convention that is being used (z axis pointing upwards), applying the right-hand rule indicate that a clockwise spinning rotor yields a negative momentum (one thumb points downward, in the opposite direction of the z axis), thus the induced momentum will be positive. Then, the sum of induced moments in the quadcopter’s body is calculated: 4 X   τib =  i=1 CD  0  0   −ω12 + ω22 − ω32 + ω42 (2.2.20) where CD denotes the aerodynamic drag coefficient that will be specified in Section 2.3. Finally, the total moment has the following form:   √   Mx dCT / 2 −ω12 − ω22 + ω32 + ω42 √      M b =  My  =  dCT / 2 −ω12 + ω22 + ω32 − ω42   CD −ω12 + ω22 − ω32 + ω42 Mz  (2.2.21) In the total momentum equation there are certain terms that include angular accelerations that have been neglected as they tend to be small compared to the other terms of the equation. Gyroscopic moments have also been neglected using the argument that the inertia moment of each motor tends to be small thus their contribution in the total momentum is also small [21, 30]. 11 CHAPTER 2. MODEL OF THE QUADCOPTER 2.3 Physical Parameters The precise measurement of certain physical parameters is the key to create a simulation environment that correctly describes the behavior of the quadcopter. In [1] a study of said physical parameters was undertaken for the Crazyflie 2.0. The aerodynamical coefficients were studied in [2] for the Crazyflie 1.0, but they are the same or at least close to those of the Crazyflie 2.0 given the fact that these coefficients only depend on the geometry of the propellers [3], which remained unchanged between the two models. Results of both works are summarized in Table 2.3.1. Parameter mquad muwb mvicon m d r Ixx Iyy Izz kT kD Description Mass of the quadcopter alone Mass of the UWB module Mass of one VICON marker Total mass Arm length Rotor radius Principal Moment of Inertia around x axis Principal Moment of Inertia around y axis Principal Moment of Inertia around z axis Non-dimensional thrust coefficient Non-dimensional torque coefficient Value 0.27 [Kg] 0.04 [Kg] 0.02 [Kg] 0.33 [Kg] 39.73 × 10−3 [m] 23.1348 × 10−3 [m] 1.395 × 10−5 [Kg × m2 ] 1.436 × 10−5 [Kg × m2 ] 2.173 × 10−5 [Kg × m2 ] 0.2025 0.11 Table 2.3.1: Physical parameters for the Crazyflie 2.0. In addition, as explained in [3], the thrust generated by the propeller is often expressed as: T = kT ρn2 D4 (2.3.1) where kT is the non-dimensional thrust coefficient, ρ is the density of air, n is the propeller speed in revolutions per second and D is the diameter of the rotor. As it will be evident later, it is convenient to express the propeller speed in RPM’s. Knowing that 1 revolution per second is the same as 60 revolutions per minute, (2.3.1) becomes: T = kT ρ (ω/60)2 D4 (2.3.2) where ω is the angular speed of the propeller in RPM. Comparing the above with (2.2.8), it is possible to determine the thrust coefficient CT as: CT = kT ρ (2r)4 /3600 12 (2.3.3) CHAPTER 2. MODEL OF THE QUADCOPTER taking the value of air density constant ρ = 1.225 [Kg/m3 ] and all the other constants defined previously, finally this coefficient is: CT = 3.1582 × 10−10 [N/rpm2 ] (2.3.4) Now for the torque coefficient, as specified in [3], the torque created by the propellers is described by this equation: Q = kD ρn2 D5 (2.3.5) Operating the same variable change as in (2.3.3), then: CD = kD ρ (2r)5 /3600 (2.3.6) CD = 7.9379 × 10−12 [Nm/rpm2 ] (2.3.7) With the parameters specified in Table 2.3.1 and the constants calculated in (2.3.4) and (2.3.7), all the basic physical parameters were determined. Here we use the word “basic” as these parameters are the minimum necessary to be able to simulate the behavior of a quadcopter and because in most applications, this one included, are a good approximation of the real physical system. 2.4 Linearization and State Space Representation The state space representation of a system gives an idea of how the system evolves in time by the following equations: ( ẋ (t) = A (t) x (t) + B (t) u (t) y (t) = C (t) x (t) + D (t) u (t) (2.4.1) In general, this equation describes the evolution of a linear time-varying system, where x (t) is the vector of states, y (t) is the output vector and u (t) is the input vector. For the state space representation of a quadcopter it is conventional to consider the following linear time-invariant realisation of the system, meaning that matrices A, B, C and D are static and don’t change over time: ( ∆ẋ = A∆x + B∆u ∆y = C∆x + D∆u where the prefix ∆ means that the vector is the result of a linearisation process. 13 (2.4.2) CHAPTER 2. MODEL OF THE QUADCOPTER When linearizing a system the important question becomes at around which so-called "trim" trajectory we desire to linearize, or better yet, what is the trim trajectory most well-suited given the needs of the system. This trim trajectory has to be associated with an equilibrium point in which the states of the system do not change over time, meaning ẋe = 0. In the case of the quadcopter, the common trim trajectory is the hover, in which the drone stays stationary at a certain altitude. This fact can be translated as an equilibrium state: xe = h xe ye ze ψe θe φe ue ve we re qe pe iT (2.4.3) At the equilibrium point, the quadcopter’s linear position and yaw angle are indifferent in terms of the linearization calculus, so they can be considered arbitrary constants. For the roll and pitch angles, they need to be zero in order for the quadcopter to keep the stationary position, and so does any linear or angular velocity. Finally the equilibrium vector is as simple as: xe = h xe ye ze ψe 0 0 0 0 0 0 0 0 iT (2.4.4) In order to keep the quadcopter flying in hover mode, knowing that the body is levelled with the floor and there are no gravity components other that in the z axis, the force generated by the propellers need to compensate exactly for the weight of the quadcopter to stay stationary in the air, this means:  2 2 2 2 CT ωe1 + ωe2 + ωe3 + ωe4 = mg (2.4.5) From the hypothesis that the quadcopter’s body is perfectly symmetrical, a quick deduction is that all motors need to rotate with the same speed in order to maintain the body levelled and don’t create any angular momentum, this means that in equilibrium: ωe1 = ωe2 = ωe3 = ωe4 = ωe (2.4.6) Combining (2.4.5) and eqrefeq:32 gives as result: r ωe = mg = 16073 [rpm] 4CT 14 (2.4.7) CHAPTER 2. MODEL OF THE QUADCOPTER This constant specifies the required speed of each rotor in order to maintain the hover position and so the input vector in equilibrium is: ue = h ωe ωe ωe ωe iT (2.4.8) After applying a Taylor’s first order expansion, and taking into account the equilibrium state vector specified in (2.4.4), the linearized equations are:   ∆Fx = m∆u̇ − mg∆θ      ∆Fy = m∆v̇ + mg∆φ     ∆F = m∆ẇ z  ∆Mx = Ixx ∆ṗ      ∆My = Iyy ∆q̇     ∆M = I ∆ṙ z zz (2.4.9) The linearized forces and moments are:     ∆Fx 0     ∆F b =  ∆Fy  =  0  ∆Fz 2CT ωe (∆ω1 + ∆ω2 + ∆ω3 + ∆ω4 ) (2.4.10)    √ 2dCT ωe (−∆ω1 − ∆ω2 + ∆ω3 + ∆ω4 ) ∆Mx     √ ∆M b =  ∆My  =  2dCT ωe (−∆ω1 + ∆ω2 + ∆ω3 − ∆ω4 )  2CD ωe (−∆ω1 + ∆ω2 − ∆ω3 + ∆ω4 ) ∆Mz (2.4.11)  In hover position the body-fixed frame coincides with the inertial frame, meaning:    ∆ẋ = ∆u ∆ẏ = ∆v   ∆ż = ∆w    ∆φ̇ = ∆p ∆θ̇ = ∆q   ∆ψ̇ = ∆r (2.4.12) Merging (2.4.9) to (2.4.12) allows to write the state space representation of the linearized quadcopter:                         ∆ẋ ∆ẏ ∆ż ∆ψ̇ ∆θ̇ ∆φ̇ ∆u̇ ∆v̇ ∆ẇ ∆ṙ ∆q̇ ∆ṗ                         =                       0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 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 g 0 0 0 0 0 0 −g 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 1 0 0 0 0 0 0                         ∆x ∆y ∆z ∆ψ ∆θ ∆φ ∆u ∆v ∆w ∆r ∆q ∆p  0 0 0 0   0 0 0 0       0 0 0 0     0 0 0 0     0 0 0 0       0 0 0 0  + ωe    0 0 0 0     0 0 0 0       2CT /m 2CT /m 2CT /m 2CT /m    −2C /I  2C /I −2C /I 2C /I  √ D zz  √ D zz √ D zz √ D zz   2dC /I 2dCT /Iyy − 2dCT /Iyy  −√2dCT /Iyy  √ T yy √ √ − 2dCT /Ixx − 2dCT /Ixx 2dCT /Ixx 2dCT /Ixx  15                         ∆ω1 ∆ω2 ∆ω3 ∆ω4      CHAPTER 2. MODEL OF THE QUADCOPTER 2.5 Movement Decoupling In the state space realization of the quadcopter’s linear model, the four inputs of the system act directly in just four states of the system. Rewriting together (2.4.10) and (2.4.11) show how each input of the system contributes to each force and momentum.      Fz Mx My Mz        = 2ωe    CT CT CT CT √ √ √ √ −dCT / 2 −dCT / 2 dCT / 2 dCT / 2 √ √ √ √ −dCT / 2 dCT / 2 dCT / 2 −dCT / 2 −CD CD −CD CD      ∆ω1 ∆ω2 ∆ω3 ∆ω4      (2.5.1) From (2.5.1) a transformation matrix can be defined between the forces acting on the quadcopter’s body and the angular speed from the motors:    Γ = 2ωe   CT CT CT CT √ √ √ √ −dCT / 2 −dCT / 2 dCT / 2 dCT / 2 √ √ √ √ −dCT / 2 dCT / 2 dCT / 2 −dCT / 2 −CD CD −CD CD      (2.5.2) If matrix Γ is invertible (i.e: Γ−1 exists) that means that all four lines are independent and thus the vertical and angular forces of the quadcopter act independently from each other. Inverting the matrix:  Γ−1 = 1 2ωe     √ √ 1/ (4CT ) − 2/ (4dCT ) − 2/ (4dCT ) −1/ (4CD ) √ √ 1/ (4CT ) − 2/ (4dCT ) 2/ (4dCT ) 1/ (4CD ) √ √ 2/ (4dCT ) 2/ (4dCT ) −1/ (4CD ) 1/ (4CT ) √ √ 1/ (4CT ) 2/ (4dCT ) − 2/ (4dCT ) 1/ (4CD )      (2.5.3) Now taking the result in (2.5.3), it is possible to find the inverse relation of (2.5.1):      ∆ω1 ∆ω2 ∆ω3 ∆ω4     =  1 2ωe     √ √ 1/ (4CT ) − 2/ (4dCT ) − 2/ (4dCT ) −1/ (4CD ) √ √ 1/ (4CT ) − 2/ (4dCT ) 2/ (4dCT ) 1/ (4CD ) √ √ 1/ (4CT ) 2/ (4dCT ) 2/ (4dCT ) −1/ (4CD ) √ √ 1/ (4CT ) 2/ (4dCT ) − 2/ (4dCT ) 1/ (4CD )      Fz Mx My Mz      (2.5.4) Equation (2.5.4) dictates how each motor contributes to each of the forces acting on the quadcopter’s body. This study confirms that the vertical, lateral, longitudinal and directional (yaw) forces act independently from each other in the mathematical model and thus the quadcopter’s dynamics are decoupled and can be studied as sub-systems. 16 CHAPTER 2. MODEL OF THE QUADCOPTER • Vertical Subsystem This subsystem describes the dynamics of the upward movements of the quadcopter, following this state space equation: " ∆ẇ ∆ż # " = 0 0 1 0 #" ∆w ∆z # " + 1/m 0 # ∆Fz (2.5.5) • Directional Subsystem The yaw angle and its velocity dictate the dynamics of the quadcopter direction in the XY plane, as suggests this following state space equation: " # ∆ṙ ∆ψ̇ " = 0 0 1 0 #" ∆r ∆ψ # " + 1/Izz 0 # ∆Mz (2.5.6) • Lateral Subsystem The lateral dynamic governs the pitch movement of the quadcopter, as well as its Y position in the inertial frame:      ∆ṗ ∆φ̇ ∆v̇ ∆ẏ       =   0 0 0 1 0 0 0 −g 0 0 0 1 0 0 0 0      ∆p ∆φ ∆v ∆y       +   1/Ixx 0 0 0     ∆Mx  (2.5.7) • Longitudinal Subsystem Similar to the lateral subsystem, it rules the movement around the X axis of the bodyfixed frame of the quadcopter, and its X position and velocity in the inertial frame.      2.6 ∆q̇ ∆θ̇ ∆u̇ ∆ẋ       =   0 1 0 0 0 0 g 0 0 0 0 1 0 0 0 0      ∆q ∆θ ∆u ∆x       +   1/Iyy 0 0 0     ∆Mx  (2.5.8) Motor Characterization The inputs of the above state space realization are the angular speed of each motor in RPM’s, but after exploring the Crazyflie’s 2.0 firmware it became evident that this is not the real input of the system. The voltage sent to each DC motor is controlled using a PWM signal specified as a 16 bit number, ranging from 0 to 65535, meaning that the actual input of the system can be considered directly as this PWM signal and not the 17 CHAPTER 2. MODEL OF THE QUADCOPTER actual voltage sent to the motors. In [2] experimental data was retrieved from the motors to identify the relationship between the PWM signal sent to the motors and the RPM’s generated. The experiments proved that the angular speed of the motors have a linear relationship with the PWM input of the system, following the equation: RP M = 0.2685 × P W M + 4070.3 (2.6.1) The characterization of a DC motor usually derives in a first order transfer function that specifies certain response time from the motors as they do not react immediately to the commands sent, but it is a good approximation to assume that this response time is fast enough and that it will not cause much delays in the system, thus (2.6.1) serves as a good approximation for the motor characterization. 18 Chapter 3 Simulation In this section a simulation environment of the quadcopter’s dynamics is proposed with the intention of testing and designing control schemes. Two different controllers are proposed: in the first phase of the project a position PID tracker was considered and in a second phase a trajectory tracker known as the Linear-Quadratic Tracker (LQT) was studied. 3.1 Cascaded PID Position Tracker Figure 3.1.1 presents the simulation model created for this phase of the project. Trajectory xc , yc , zc , ψc Controller PWM State+Noise Motors RP M Sensor’s Noise Quadcopter’s Dynamics State Figure 3.1.1: Block Diagram of Simulation environment. Now an explanation of each simulation block will be given: 1. Trajectory: this block serves as the input of the overall system, specifying a trajectory in the x,y,z and yaw positions. As of now the commands sent by this block are mere constants or signal inputs such as sinusoids, random signals, ramps, etc. It serves as input commands to the controller. 19 CHAPTER 3. SIMULATION 2. Controller: takes the desired trajectory and the quadcopter’s states as inputs and computes the necessary 16-bit PWM signal to send to the motors. 3. Motors: implements the linear relation between the 16-bit PWM signal sent to the motors and the actual angular speed in revolutions per minutes generated by them, as specified in Section 2.6. 4. Quadcopter’s dynamics: this block implements the dynamic equations of Section 2.2. The vectorial form of the equations, as they were developed, is the simplest, most common and elegant way of constructing this block. The non-linear model was linearized using MATLAB’s command “linmod” to verify it was consistent with the theoretical state space model found in the previous section. 5. Sensor’s noise: allows to add additive white Gaussian noise to specific states of the quadcopters, to simulate the sensors that give the real states used by the control system. This block could be modified by the user to define more complex models, e.g., including sensor bias. 3.1.1 On-Board Control Architecture The first steps to control the quadcopter was understanding the already implemented controllers that came with the stock firmware of the Crazyflie 2.0 (Firmware release 2016.02). As seen in Figure 3.1.2 the manufacturers specify the control architecture used: Figure 3.1.2: On-board control architecture, image courtesy of Bitcraze. A two cascaded PID control scheme was found in the Crazyflie’s firmware in order to control the pitch and roll angles. A cascaded control structure can be analysed by decomposing the architecture in an inner and outer control loops, in which the outer loop regulates the inner loop, which in turn regulates the plant of the system. As a 20 CHAPTER 3. SIMULATION common rule in cascaded structures, the inner loop needs to regulate at a faster rate than the outer loop. It is ideal for the inner loop output to reach an steady state value before the outer loop changes the setpoint sent to the inner loop. Synchronization problems will occur between the two controllers if the inner loop response is not as fast as it should, or if the outer loop is faster than it should. In implementation terms this is easily remediable by forcing the inner loop to be, as in this case, twice as fast as the outer loop (Attitude controller running at 250Hz and Rate controller running at 500Hz). 3.1.1.1 Inner Loop: Rate Controller The inputs and outputs of this block are shown in Figure 3.1.3. p c , qc , r c p, q, r Rate Controller ∆φ , ∆θ , ∆ψ Figure 3.1.3: Rate Controller diagram. The goal of this controller is to calculate the input variation from the equilibrium point of the motors in order to create the angular momentum required for the state variables p, q and r to get the values pc , qc and rc respectively. For that, three independent controllers are used: • Roll Rate Proportional controller: calculates ∆φ following this equation, the desired value pc is calculated by the outer loop attitude controller: ∆φ (t) = KP,p (pc (t) − p (t)) (3.1.1) • Pitch Rate Proportional controller: very similar to the roll rate controller, calculates ∆θ from the setpoint value qc : ∆θ (t) = KP,q (qc (t) − q (t)) (3.1.2) • Yaw Rate Proportional-Integral controller: calculates the desired deviation from the base thrust, ∆ψ , from an external setpoint rc that can be specified through a teleoperation system or as it is going to be specified later, by an off-board con- 21 CHAPTER 3. SIMULATION troller. The control law for this compensator is: Z t (rc (τ ) − r (τ )) dτ ∆θ (t) = KP,r (rc (t) − r (t)) + KI,r (3.1.3) 0 Table 3.1.1 contains the gains for each of these controllers, taken directly from the Crazyflie’s firmware. Controller Roll Rate Pitch Rate Yaw Rate KP 70 70 70 KI 16.7 Table 3.1.1: Rate Controller’s gains. 3.1.1.2 Outer Loop: Attitude Controller The inputs and outputs of the attitude controller are as show in Figure 3.1.4. φc , θc φ, θ pc , qc Attitude Controller Figure 3.1.4: Rate Controller diagram. This controller act as a regulator of the rate controller, calculating the appropriate setpoints for the angular velocities around the X and Y axis, in order to stabilize the quadcopter at a certain desired angular position. The attitude controller uses the pitch and roll angles estimates from the sensor fusion algorithm, compares them to the external commands φc and θc (coming from teleoperation, off-board controller, etc) and feeds them to a controller that calculates the desired angular velocities pc and qc . These controllers are as follows: • Roll Attitude Proportional-Integral controller: computes the desired roll rate in the body frame, pc ,using the control law: Z pc (t) = KP,φ (φc (t) − φ (t)) + KI,φ t (φc (τ ) − φ (τ )) dτ (3.1.4) 0 • Pitch Attitude Proportional-Integral controller: works in the same fashion 22 CHAPTER 3. SIMULATION as the roll controller, using the corresponding variables: Z t qc (t) = KP,θ (θc (t) − θ (t)) + KI,θ (θc (τ ) − θ (τ )) dτ (3.1.5) 0 Once again, the gains for these controllers were already specified in the Crazyflie’s firmware release 2016.02, as seen in Table 3.1.2. The same values were used during this project as they turned out to be well tuned according to the simulations and the tests made with the real platform. Controller Roll Attitude Pitch Attitude KP 3.5 3.5 KI 2 2 Table 3.1.2: Attitude Controller’s gains. As it is evident from the gain values in Tables 3.1.1 and 3.1.2, the roll and pitch gains for both controllers are the same, which is consistent with the initial hypothesis that the quadcopter is a symmetrical body around all its axes. 3.1.1.3 Control Mixer The output of the rate controller is the total input variation of the motors from the equilibrium state required to generate a torque in the desired direction of movement. Afterwards this input variation has to be distributed to the motors in the same fashion as in (2.4.11), for it to move and rotate appropriately using the PWM input it received. Given that the quadcopter is in X configuration, the motor effort has to be distributed halfway in each motor for a desired torque around the X or Y axis. All this analysis can be translated in the following equations that are implemented on board of the Crazyflie 2.0, thus specifying a “Control mixer” block in the simulation environment:   P W Mmotor1     PWM motor2  P W M motor3     PWM motor4 = = = = Ω − ∆φ /2 − ∆θ /2 − ∆ψ Ω + ∆φ /2 − ∆θ /2 + ∆ψ Ω + ∆φ /2 + ∆θ /2 − ∆ψ Ω − ∆φ /2 − ∆θ /2 + ∆ψ (3.1.6) where Ω is the PWM base signal for maintaining a certain altitude, a value that will be regulated from an altitude controller; ∆φ , ∆θ and ∆ψ represent the outputs of the Rate Controller and at the same time give an idea of a deviation needed from the base thrust in order to obtain a certain torque in the X, Y or Z axis. From (3.1.6) it is more clearly 23 CHAPTER 3. SIMULATION how, for example, a command ∆φ > 0 will be distributed 50/50 as a reduction of the PWM input supplied to motors 1 and 4, and an increase of the power supplied to motors 2 and 3, thus creating the appropriate angular momentum to obtain certain angle in the pitch direction. Figure 3.1.5 shows a complete diagram of the on-board control scheme. φ, θ ∆φ , ∆θ , ∆ψ pc , qc φc , θc Attitude Controller rc p, q, r Rate Controller Ω Control Mixer PWM Figure 3.1.5: Onboard control architecture with Control mixer. The red inputs in this diagram represent the actual inputs that can be controlled from outside of the firmware, as it was suggested earlier, either by a teleoperation system or by an automated position controller. The other signals come from the sensor fusion algorithm or are intermediate variables in the control process. 3.1.2 Off-Board Position Controller In hopes of controlling the quadcopter by sending waypoints or trajectories in a tridimensional space, it became necessary to add a position controller that in terms of the implementation will be running off-board unlike the controller of the previous section. The job of this controller can be divided into: 1. An altitude controller whose output is the thrust Ω required to maintain a certain position in z. 2. An X-Y position controller whose outputs are the required roll and pitch angles that will be regulated by the on-board controller. 3. A yaw position controller that sends the required angular velocity to the on-board Yaw Rate Controller. As seen in the dynamic analysis of the quadcopter, there exists a theoretical decoupling between the vertical, lateral, longitudinal and yaw movement, meaning that each one of these controllers can be tuned independently from each other, which simplifies the controller design task. 24 CHAPTER 3. SIMULATION 3.1.2.1 Altitude Controller It is common practice to add a feedforward term as in [4] that compensates the weight of the quadcopter, in order to avoid the use of large controller gains that can lead to saturation problems. The structure in Figure 3.1.6 was the one used for this controller. zc z Altitude Controller ∆Ω + Ω + Feedforward Ωe Figure 3.1.6: Altitude Controller. The altitude controller is a simple PID compensator whose inputs are the desired altitude that comes from the trajectory block, and the altitude state that in terms of simulation comes from the quadcopter’s dynamics block. The equation that describes this PID controller is the following: ∆Ω (t) = KP,z (zc (t) − z (t)) + KI,z Rt 0 d (zc (t) − z (t)) (zc (τ ) − z (τ )) dτ + KD,z dt (3.1.7) The output of this PID controller is the 16-bit thrust deviation from the equilibrium point set at the hover state. That means that the feedforward term Ωe in Figure 3.1.6 is the necessary PWM 16-bit signal needed for the quad to maintain its altitude. Using the calculations at the equilibrium, as seen in (2.4.7) and (2.6.1), the feedforward term can be calculated as: Ωe = 3.1.2.2 ωe − 4070.3 = 44705 0.2685 (3.1.8) X-Y Position Controller The objective of this controller is to regulate the on-board Attitude Controller by calculating the necessary roll and pitch angles in order to move the quadcopter between locations in the X-Y plane. The block diagram in Figure 3.1.7 shows the inputs and outputs of this controller. 25 CHAPTER 3. SIMULATION x c , yc x, y ψ xbe , yeb Error to Body Frame u, v X-Y Position Controller φc , θc Figure 3.1.7: X-Y Position Controller. In [5] it was proven that a similar architecture as here gives a good performance in position tracking. The first block calculates the error between the desired and actual X-Y position and does the rotation operation needed to project this error vector in the body frame. This operation is given as: " xe ye #b " = cos (ψ) sin (ψ) − sin (ψ) cos (ψ) #" xe ye #o (3.1.9) doing the calculations, the error in the body frame is defined as: ( xbe = xoe cos (ψ) + yeo sin (ψ) yeb = −xoe sin (ψ) + yeo cos (ψ) (3.1.10) Then the error in the body-fixed frame becomes the setpoint to the velocity in this same frame, the logic behind this apparently odd choice of a setpoint is that the bigger the error is, the more rapidly the quadcopter should move in order to arrive at the desired point as quickly as possible. Otherwise, if the error is small, meaning the drone is near the desired point, the setpoint for the velocity should be also small. A more conventional method to do the position tracker is that the error in the bodyfixed frame dictates the setpoint of the position instead of the velocity, but in practice it was found that in the first method proposed is easier to tune the PID gains as there are only 2 out of 3 gains that need to be adjusted (derivative gain is not used), whereas for the traditional tracker all three gains have to be used for a good performance. The only disadvantage that might have the first method with respect to the second is that in the real system the velocity in the body-fixed frame is not directly measured, thus it is necessary to estimate this states through mathematical means. The controllers that compute the desired attitude use the following control laws: 26 CHAPTER 3. SIMULATION • X Position Proportional-Integral Controller: Z t    φc (t) = KP,x xbe (t) − u (t) + KI,x xbe (τ ) − u (τ ) dτ (3.1.11) 0 • Y Position Proportional-Integral Controller: θc (t) = KP,y  yeb (t)  − v (t) + KI,y Z t  yeb (τ ) − v (τ ) dτ (3.1.12) 0 3.1.2.3 Yaw Position Controller The inputs and outputs of this controller are reflected in Figure 3.1.8: ψc ψ Yaw Position Controller rc Figure 3.1.8: Yaw Position Controller. The controller computes the error between the desired yaw position and the actual position and feeds it to a proportional controller whose output is the desired yaw rate that is regulated by the on-board rate controller. Thus the operation done by the controller is given as: rc (t) = KP,ψ (ψc (t) − ψ (t)) 3.1.2.4 (3.1.13) Controllers Gains After validation both in simulation and in the real platform, the gains for each one of the off-board controllers are summarized in Table 3.1.3. Controller Altitude X Y Yaw KP 11000 30 −30 3 KI 3500 2 −2 - KD 9000 - Output Limit [−20000, 15000] ±30 [deg] ±30 [deg] ±200 [deg/s] Table 3.1.3: Gains for Off-Board Controllers. Note that the gains for the Y Position Controller are inverted, this is because a positive roll angle makes the quadcopter move toward the negative Y axis, so the solution is to invert the gains in order to send the correct attitude commands to the on-board controller. 27 CHAPTER 3. SIMULATION 3.1.3 Simulation Results The simulation environment was built in Simulink following the block diagram in Figure 3.1.1. The goal of said simulations was to test the control system for tracking a desired position [xc , yc , zc , ψc ] and compare the behavior of the non-linear dynamics of the quadcopter with the linear state model. • Linear trajectories This first simulation tests the response of the system when demanded to follow step functions in all 4 trajectory inputs. The setpoints for Test #1 where: xc = 1m ; yc = 1m ; zc = 1m ; ψc = 60°. Figure 3.1.9 shows the simulation of a 15 seconds flight of the quadcopter given the desired trajectory. For the X-Y position the time response is about 3 seconds, with almost no overshoot, whereas for the Z position the response is slower at roughly 8 seconds for a 2% error margin and with a more pronounced overshoot. With the experimental results, this values of PID gains gave the best response after some trial and error in gain-tuning. As for the yaw response, it has a time response of about 2 seconds with no overshoot. X Position 1 1 0.8 0.8 0.6 0.4 0.2 0.6 0.4 0.2 0 0 -0.2 -0.2 0 5 10 15 0 Time (s) 5 60 1 50 Angle (deg) 1.2 0.6 10 15 40 30 0.4 20 0.2 10 0 15 Yaw angle 70 0.8 10 Time (s) Linear Non-linear Reference Z Position 1.4 Position (m) Y Position 1.2 Position (m) Position (m) 1.2 0 0 5 10 15 0 5 Time (s) Time (s) Figure 3.1.9: Simulation results for Test #1. Comparing the behavior of the non-linear model with the linear state space model, there are some notable differences. As shown in Figures 3.1.10a and 3.1.10b, the trajectory followed in the two cases is not exactly the same even though it is clear that in both 28 CHAPTER 3. SIMULATION situations the desired final position was reached. The linear system follows a perfect line from the starting point to the desired point, meaning that all movements are decoupled. In the non-linear system there exist no such perfect decoupling and as suggested by the trajectory followed, the motion dynamics are intertwined and influence each other, meaning for example that the movement in the quadcopter’s X axis has some impact in the Y axis and vice versa, even though they are small. 3D Trajectory 3D Trajectory 1.5 Z (m) 1 Z (m) 0.5 Linear Non-linear Reference 1.5 Linear Non-linear Reference 1 1 0.5 0.8 0 0 1 0.6 1 0.4 0.8 0.5 Y (m) 0 0 0.6 0.4 0.2 0.8 0.6 1.2 1 0.2 0.4 0.2 Y (m) X (m) (a) Standard View. 0 X (m) 0 (b) Top View. Figure 3.1.10: 3D Trajectory for Test #1. This coupled movement is better appreciated in Figures 3.1.11a and 3.1.11b, that show simulation results of a trajectory purely in the X axis, with a rotation of 60 degrees in the yaw angle, in order to study the influence in the Y axis. Simulation results confirm the theory of the interference between movements as this trajectory generates a deviation of 3 centimeters in the Y axis that then returns to zero with the controller action. 3D Trajectory X Position 1.2 Position (m) 1.5 1 1 0.5 Linear Non-linear Reference Linear Non-linear Reference 0 0.8 0 5 10 15 0.6 Time (s) Y Position Position (m) 0.03 0.4 0.02 0.2 0.01 0 0 -0.01 0 5 10 15 0.4 Time (s) 0.3 0.2 0.1 Y (m) (a) Time response. (b) Top View. Figure 3.1.11: Compound movement interference. 29 0 -0.1 X (m) -0.5 CHAPTER 3. SIMULATION • Circular trajectories The simulated system was also tested to track positions that change over time, as a circular trajectory for example. This trajectory is defined as:   xc (t) = 0.5 sin (2π0.05t − π/2)     y (t) = 0.5 sin (2π0.05t) c  z c (t) = 1     ψ (t) = 50t (3.1.14) This trajectory specifies a circle of frequency 0.05Hz and radius of 0.5 meters, at a constant altitude of 1 meter and a constant angular velocity in the yaw angle of 50 degrees per second. Figure 3.1.12 displays the simulation results with these commands. X Position Y Position 0.5 Position (m) Position (m) 0.5 0 -0.5 0 -0.5 0 5 10 15 20 25 30 35 40 0 Time (s) Z Position 1.4 5 10 15 20 25 30 35 40 25 30 35 40 Time (s) Linear Non-linear Reference Yaw angle 2000 1.2 1500 Angle (deg) Position (m) 1 0.8 0.6 0.4 1000 500 0.2 0 0 0 5 10 15 20 25 30 35 40 0 Time (s) 5 10 15 20 Time (s) Figure 3.1.12: Simulation results for a circular trajectory. As there is no trajectory tracker in the control system, the path taken to follow the trajectory specified in (3.1.14) never accomplishes the task of minimizing the error between the quadcopter’s trajectory and the desired trajectory. The position tracker by itself cannot follow a time-varying trajectory when the change rate of said trajectory is too fast. For example if the frequency of the circular trajectory is augmented, the path following will be less precise. Figures 3.1.13a and 3.1.13b show the 3D circular trajectory described by the quadcopter in this simulation: 30 CHAPTER 3. SIMULATION 3D Trajectory 3D Trajectory 1 0.8 1.5 Linear Non-linear Reference 0.6 0.4 1 Y (m) Z (m) 0.2 Linear Non-linear Reference 0.5 0 -0.2 -0.4 0 1 -0.6 0.5 1 0.5 0 -0.8 0 -0.5 -0.5 Y (m) -1 -1 -1 -1 X (m) -0.5 0 0.5 1 X (m) (a) Standard view. (b) Top View. Figure 3.1.13: 3D Circular Trajectory. A helical trajectory can be easily generated by making the altitude command a ramp function, as specified in this next equation:   xc (t) = 0.5 sin (2π0.05t − π/2)     y (t) = 0.5 sin (2π0.05t) c  zc (t) = 0.05t     ψ (t) = 50t (3.1.15) in which the altitude command refers to a linear velocity of 5 centimeters per second in the vertical axis. Simulation results are presented in Figures 3.1.14 and 3.1.15. The newly added time-varying command in altitude worked as expected, following the ramp. X Position 0 -0.5 0 -0.5 0 5 10 15 20 25 30 35 40 0 Time (s) 5 10 15 25 30 35 40 25 30 35 40 Yaw angle 2000 2 20 Time (s) Linear Non-linear Reference Z Position 2.5 1500 Angle (deg) Position (m) Y Position 0.5 Position (m) Position (m) 0.5 1.5 1 1000 500 0.5 0 0 0 5 10 15 20 25 30 35 40 0 Time (s) 5 10 15 20 Time (s) Figure 3.1.14: Helical Trajectory Time response. 31 CHAPTER 3. SIMULATION 3D Trajectory 2 Z (m) 1.5 Linear Non-linear Reference 1 0.5 0 1 0.5 1 0.5 0 0 -0.5 Y (m) -0.5 -1 -1 X (m) Figure 3.1.15: 3D Helical Trajectory. The deficiencies of this control architecture to follow more complicated trajectories justify the need to conceive a higher performance controller for the task at hand. 3.2 Linear-Quadratic Tracker (LQT) As the previous simulation results suggested, a more refined controller is required in order to truly track trajectories that change over time, which can be seen as a problem of being in the appropriate place, at the appropriate time. There exists a wide variety of controllers suited to precisely track trajectories, e.g., Model-Predictive controllers have proven to be quite robust in the case of quadcopters [26]. But this type of nonlinear approach requires heavy calculations and often require powerful processors in order to be effective. On the other hand, the linear-quadratic tracker has proven to be a versatile controller method for trajectory tracking with quadcopters in previous works as [11] and [15], with the advantages of linear controllers and their rapid prototyping and implementation. 3.2.1 The Optimization Problem Setup The LQT algorithm is formulated as an optimization problem to reduce a cost function in terms of the plant’s states, inputs and certain weight functions that must be specified by the controller designer. It is indeed a problem very much alike the well-known LQR, but in this case the states considered for the resolution of the Algebraic Ricatti Equation (ARE) are time-varying, which leads to gains that also vary depending on the trajectory to follow. These characteristics make the LQT controller more appropriate than the 32 CHAPTER 3. SIMULATION LQR when trying to accomplish more precise trajectory following, which is exactly the feature that the previous PID architecture lacked. As the name suggests, the LQT algorithm is part of the family of linear controllers, thus it uses linear state space models (or linearized models, as in this case). The design of this controller was done directly in the discrete-time domain as it makes easier its implementation on the real platform. The linear state space realization obtained in Section 2.4 was first discretized using a time step Ts = 0.01s that corresponds to a frequency of 100 Hz. This time step was chosen as it corresponds to the frequency the controller was going to be working on when implemented in the real system. Considering the state vector: T  ∆x = ∆x ∆y ∆z ∆ψ ∆θ ∆φ ∆u ∆v ∆w ∆r ∆q ∆p (3.2.1) the state space realization obtained in subsection 2.4 went through a discretization process in MATLAB, using the zero-order hold method and sample time Ts . The discretetime system obeys the following dynamic equation: ( ∆ẋ[k + 1] = Ad ∆x[k] + Bd ∆u[k] ∆y[k] = Cd ∆x[k] + Dd ∆u[k] (3.2.2) where the matrices Ad , Bd , Cd , Dd are the result of the discretization. Following the procedure to set up the discrete-time linear quadratic tracking system specified in [23], considering the state space system described by (3.2.2), the performance index to be minimized Jd is defined as: 1 T [Cd ∆x [kf ] − z [kf ]] F [Cd ∆x [kf ] − z [kf ]] (3.2.3) 2 kf −1 o 1 Xn T + [Cd ∆x [kf ] − z [kf ]] Q [Cd ∆x [kf ] − z [kf ]] + ∆uT [k] R∆u [k] 2 Jd = k=k0 where F and Q are state weight matrices, R is the control weight matrix and z [k] is a 12x1 vector that specifies the time-varying trajectory for each state. The final time step, kf , is fixed and the final state value ∆x [kf ] is not fixed nor specified, thus it is called in the literature “free” state. Weight matrices have well-defined characteristics as to obtain a stable close-loop system using the gains given by the optimization algorithm, mainly that F and Q are both positive semidefinite symmetric n × n matrices and R is a p × p 33 CHAPTER 3. SIMULATION positive definite symmetric matrix (in this case n = 12 and p = 4). For simplicity in the next algorithm equations, the following matrices are defined: E = Bd R−1 BdT ; V = CdT QCd ; W = CdT Q (3.2.4) Now, using results from optimal control theory in [23] it is possible to establish a matrix Riccati Difference Equation (RDE) as follows: P [k] = ATd [P [k + 1] + E]−1 Ad + V (3.2.5) this equation must be solved backwards in time using the final condition (3.2.6) P [kf ] = CdT F Cd Also the algorithm requires to solve the following vector difference equation: h  −1 i g [k] = Ad I12×12 − P −1 [k + 1] + E E g [k + 1] + W z [k] (3.2.7) The vector g [k] depends on the desired trajectory and thus contains all information about it. This equation must also be solved backwards in time, with the final condition: (3.2.8) g [kf ] = CdT F z [kf ] After resolving (3.2.5) and (3.2.7), the optimal control law can be computed by: ∆u [k] = −L [k] x + Lg [k] g [k + 1] (3.2.9) where the gain L corresponds to a state feedback gain given by the expression:  −1 T L [k] = R + BdT P [k + 1] Bd B P [k + 1] Ad (3.2.10) and the gain Lg is a trajectory feedforward gain that multiplies the vector g [k] which contains the trajectory information. This gain can be calculated from the following equation:  −1 T Lg [k] = R + BdT P [k + 1] B B 34 (3.2.11) CHAPTER 3. SIMULATION While developing the algorithm, it was noted that matrices P [k], L [k] and Lg [k] only varied at the end to enforce the terminal condition. It was preferred to remove the final "free state" enforcement of the algorithm as it lead to undesired behavior at the end of the trajectory. Hence, the aforementioned matrices were considered time-invariant by taking their constant values before the final state enforcement. Therefore, the only factor in the optimal control law that changes over time is the feedforward vector g [k]. The versatility of this control method is that all gains can be computed offline, meaning before the trajectory is executed. Being a model-based algorithm, the LQT controller performance will be closely related to the accuracy of the linear model of the quadcopter. The previous study with the PID architecture showed that the coupling between the movements, as well as unmodeled phenomena such as blade flapping, body and motor force asymmetry, all contribute as model perturbations to the system. In the light of these real-life unfavorable conditions, during the conception of the LQT controller the addition of integral action was necessary to ensure disturbance rejection and thus a zero steady-state error in the 3D position of the drone. Normally the procedure dictate that an augmentation of the system should be executed to include the state of the integral of the error, but in the LQT algorithm these states can further complicate the task of designing the trajectory z [k] , as it will also require to specify a trajectory for the position integral error. The first simulation trials with this method were not satisfactory, specifying a trivial zero trajectory for the integral of the error states did not yield good results. Instead of searching for a model that might describe the evolution over time of the error, which is by itself a difficult task considering that the position trajectory can take almost any form, a much more convenient solution to resolve the disturbance rejection problem is to simply add the integral action directly into the control vector ∆u [k], as proposed in a similar LQT formulation [27]. In addition to the integral action in the position, it was found in practice that using integral action in the angular position improved the overall performance of the system, by regulating the drone’s Euler angles to zero thus keeping it stable with an increased 35 CHAPTER 3. SIMULATION level of robustness. Finally the command vector adopted the following form: ∆u0 [k] = −L [k] x + Lg [k] g [k + 1] + Kiang kP f −1 k=k0 (eang [k] ∆kang ) + Kipos kP f −1 (epos [k] ∆kpos ) k=k0 (3.2.12) where eang [k] is the angular error vector in regulation mode (error with respect to zero) defined as: T  eang [k] = (3.2.13) −ψ [k] −θ [k] −φ [k] and similarly epos [k] is the position error vector with respect to the desired trajectory z [k]: T  epos [k] = z1 [k] − x [k] z2 [k] − y [k] z3 [k] − z [k] (3.2.14) The coefficients ∆kang and ∆kpos are the time steps corresponding to each integral gain. The block diagram in Figure 3.2.1 represents the closed-loop control system proposed. ue + u + ∆u0 P Kipos (epos ∆kpos ) + + + quadcopter’s Dynamics − ∆u L[k] + Kiang P x Lg [k] g[k + 1] (eang ∆kang ) Integral Action LQT Algorithm calculated offline Figure 3.2.1: LQT Closed-Loop System. With a better understanding of how to setup the LQT problem, the next logical step was to test the algorithm in the quadcopter model and study the feasibility for practical implementation in the Crazyflie 2.0 platform. Before testing the actual control algorithm, it became necessary to address the problem of the observation of the states, mainly to answer the question of how to reconstruct all 12 states of the dynamic model given the data coming from different sensors used in the implementation. The Inertial Measurement Unit inside the Crazyflie 2.0 gives good estimates of the Euler angles and the body-fixed frame angular velocities, by a sensor fusion algorithm that merges data coming from the accelerometer and the gyroscope. A 36 CHAPTER 3. SIMULATION localization system such as the VICON estimates the position of an object with respect to a certain fixed inertial frame, but a priori these type of systems do not directly measure nor estimate the linear velocities. Thus the need of some algorithm that can reconstruct the missing states from a model of how they evolve over time as well from the sensors’ data. 3.2.2 Kalman Filter for Linear Velocity Estimation With the objective of simulating as close as possible real-life scenarios, white Gaussian noise was added to the position values coming from the quadcopter non-linear dynamics, as to reproduce the uncertainties given by any position-fixed system such as VICON or an ultra-wide band system. In addition, the linear velocity is not directly given by any of these systems, thus the need for a state observer capable of filtering the noise coming from the position estimation while correctly computing estimations for the linear velocities in the inertial frame defined by the positioning system. The well-known Kalman Filter is ideal for these type of tasks. Using as reference the example found in [24], the Kalman Filter problem was stated. First a vector containing the estimated variables must be defined: T  x̂ [k] = ˆ ẏˆ żˆ x̂ ŷ ẑ ẋ (3.2.15) As the estimation process only addresses the state variables for the position and linear velocities, this reduced state vector is ideal to set-up the problem. The next step is to describe the state space system based on the dynamics between the position and the velocity of a given rigid body. The following equation defines the dynamics of the state space in discrete-time: ( x̂[k + 1] = Ahat x̂[k] + Gw [k] yhat [k] = Chat x̂[k] + v [k] (3.2.16) where w [k] is the process noise vector, that multiplies a certain matrix G that models how this noise interacts within the state evolution. Then v [k] is a random variable with certain variance that simulates the measurements noise of the position-fixed system and yhat [k] is the noise-infected output of the reduced position-velocity system. Matrix Ahat 37 CHAPTER 3. SIMULATION is the state transition matrix, defined as:  Ahat     =     1 0 0 0 0 0 0 1 0 0 0 0  0 Ts 0 0  0 0 Ts 0   1 0 0 Ts   0 1 0 0    0 0 1 0  0 0 0 1 (3.2.17) then matrix G was modeled:      G=     Ts /2 0 0 0 Ts /2 0 0 0 Ts /2 1 0 0 0 1 0 0 0 1           (3.2.18) Thus, by examining the three lower rows of matrices Ahat and G, the evolution of the linear velocities is defined as:  ˙ ˙   x̂ [k + 1] = x̂ [k] + w1 [k] ŷ˙ [k + 1] = ŷ˙ [k] + w2 [k]   ˙ ẑ [k + 1] = ẑ˙ [k] + w3 [k] (3.2.19) which describes a constant velocity model with and added random variable that accounts for the process noise. As possible improvement, acceleration estimations in the world frame could be added to the model, taking for example the accelerometer measurements and the appropriate rotation estimate. Then, the position evolution was modeled starting by the principle that the position in reality is a continuous variable and the velocity is defined as the derivative of the position: d x̂ = x̂˙ dt (3.2.20) this relationship can be approximated in the discrete domain as: x̂ [n + 1] − x̂ [n] x̂˙ [n + 1] + x̂˙ [n] = Ts 2 (3.2.21) Now, the left hand side of (3.2.21) is the approximation of the derivative in discrete time, while the right hand side describes the approximation of a constant velocity between two time steps. Basically the model proposed works with the idea of a constant velocity and 38 CHAPTER 3. SIMULATION the accelerations that will introduce changes to the velocity are modeled as random variables. Matrix Chat selects which states are truly measured by the position-fixed system, in this particular case that corresponds to the position states, then:  Chat  1 0 0 0 0 0   = 0 1 0 0 0 0  0 0 1 0 0 0 (3.2.22) Now that the system is clearly defined, a noise characterization needs to be done in order to get the best possible estimator. In practice that means to estimate the measurement noise covariance from experimentally-retrieved data. This estimation gives a good approximation for the noise covariance matrix Rkal that is assumed to be diagonal from the principle that there exists no correlation between the noises of the different positions. Then the noise covariance matrix takes the following form: Rkal = diag h σx2 σy2 σz2 i (3.2.23) As for the process noise covariance Qkal , it is analytically difficult to define or estimate its weights. In practice, the values are often found by experimentation rather than modeling process noise as a consequence of unmodeled phenomena. As the dynamical model for each one of the axes is the same, and theoretically decoupled, the matrix Qkal takes also the form of a diagonal, Qkal = diag h 2 σw 1 2 σw 2 2 σw 3 i (3.2.24) There exists an evident coupling between the position and the velocity process noises, but this over complicates the task of a rather simple method of state observation, thus the diagonal form was preferred over a full scale 3x3 matrix. Also note that one advantage of using the matrix G is that it reduces the tuning parameters of the Kalman filter algorithm, by considering a smaller dimension process covariance matrix. Normally, without a matrix G in the model, the process covariance matrix is n × n, but if added, a new matrix Q̄kal defined as: Q̄kal = GQkal GT (3.2.25) is considered for the resolution of the Algebraic Riccati Equation associated with the Kalman filter. Finally, the dimension of matrix Q̄kal is (n − r) × (n − r), where r is the 39 CHAPTER 3. SIMULATION number of columns of matrix G and therefore, the dimension of the vector w [k]. In order to complete the Kalman filter design, the values for the noise matrices must be given. Two scenarios were taken in account: one in which the data was taken from the VICON system and another in which the position estimation came from an ultra-wide band system. 1. VICON system: a simple test leaving the drone steady on the floor allowed the retrieval of data during 1 minute to calculate through MATLAB the variance of the position in each axis . The average results were: σx2 = σy2 = σz2 = 5 × 10−9 [m2 ] (3.2.26) Having fixed the values of the noise covariance matrix Rkal , the process covariance matrix was hand-tuned through simulation and experimentation. These values were: 2 2 2 σw = σw = σw = 8 × 10−8 1 2 3 (3.2.27) The fact that the process covariance matrix has low values indicates that the state space model is good at predicting future values for the estimated state vector. 2. Ultra-wide Band system: the system was used to estimate the X and Y position of the quadcopter, while the altitude was tracked with the VICON. The same procedure as before was applied, giving the following noise variance values: σx2 = σy2 = 5 × 10−5 [m2 ] ; σz2 = 5 × 10−9 [m2 ] (3.2.28) these values suggested that the standard deviation of the UWB is around 100 times greater that the VICON’s. Then for the process covariance matrix, the following values were used: 2 2 σw = σw = 3 × 10−5 ; σz2 = 8 × 10−8 1 2 (3.2.29) The validation of the filter was done using real data from a dummy test using the Crazyflie 2.0 and making a simulated flight by hand, just grabbing the drone and moving it around the test area. Comparisons were made between the raw data of the position estimations with the filter output, and for the velocity a discrete time derivative of the incoming 40 CHAPTER 3. SIMULATION data estimations was taken to contrast it with the output of the filter. First, while using the VICON positioning system and the values of variance in (3.2.26) and (3.2.27), the experimental results obtained are shown in Figure 3.2.2. For the position estimation, the output of the filter superposes with the raw data as the VICON system does already a lot of filtering and the raw data has low levels of noise, hence the Kalman Filter algorithm output for the position is virtually the same as the raw data. As for the velocity estimations, the Kalman filter reduces the noise levels while being fast enough to follow the true dynamics. X Position 0.5 Y Position 0.4 VICON Kalman Filter 0.2 Position (m) Position (m) 0 -0.5 0 -0.2 -0.4 -1 -0.6 -1.5 -0.8 0 5 10 15 20 25 30 35 0 5 10 15 Time (s) X Velocity 4 20 25 30 35 25 30 35 Time (s) Y Velocity 4 Discrete Derivative Kalman Filter 2 Velocity (m/s) Velocity (m/s) 2 0 -2 0 -2 -4 -4 0 5 10 15 20 25 30 35 0 5 10 Time (s) 15 20 Time (s) Figure 3.2.2: Experimental validation of the Kalman Filter using the VICON system raw data of X-Y positions. Then, using the UWB system, the filter was adjusted with the appropriate variance values for Rkal and Qkal , found in (3.2.28) and (3.2.29). The experimental results are displayed in the time plots of Figure 3.2.3. The position raw data is lightly filtered in order to keep low levels of lag in the estimations, while the velocity estimations of the Kalman Filter are more heavily filtered and at the same time fast enough to keep a good convergence speed. 41 CHAPTER 3. SIMULATION X Position 1 Y Position 1.5 UWB Kalman Filter 1 Position (m) Position (m) 0.5 0 -0.5 -1 0.5 0 -0.5 -1.5 -1 0 5 10 15 20 25 30 35 0 5 10 15 Time (s) X Velocity 4 20 25 30 35 25 30 35 Time (s) Y Velocity 4 Discrete Derivative Kalman Filter 2 Velocity (m/s) Velocity (m/s) 2 0 -2 0 -2 -4 -4 0 5 10 15 20 25 30 35 0 5 10 15 Time (s) 20 Time (s) Figure 3.2.3: Experimental validation of the Kalman Filter using the UWB system raw data of X-Y positions. The last step of the filter validation was testing the altitude estimations, which in both cases came from the VICON system. Figure 3.2.4 displays the experimental results for this test. Z Position Position (m) 1.5 VICON Kalman Filter 1 0.5 0 -0.5 0 5 10 20 25 30 35 Time (s) Z Velocity 5 Velocity (m/s) 15 Discrete Derivative Kalman Filter 0 -5 0 5 10 15 20 25 30 35 Time (s) Figure 3.2.4: Experimental validation of the Kalman Filter altitude estimation from VICON raw data of Z position. Similar as the results seen in Figure 3.2.2, the altitude estimation results confirm the quality of the filter developed and therefore validate the conception proposed. 42 CHAPTER 3. SIMULATION 3.2.3 Weight Matrices and Integral Action A simulation environment in MATLAB was created to test the LQT algorithm with the non-linear dynamics of the quadcopter, the added noise to the position states and the Kalman Filter. The LQT algorithm is calculated before the simulation runs, using the discrete time linear model of the quadcopter and the following weight matrices:    Q = diag (2000, 2000, 4000, 4000, 4000, 4000, 20, 20, 10, 10, 10, 10) F =Q   R = 0.00003 × I4×4 (3.2.30) It is common practice to choose state weight matrices such as Q and F to be diagonal, that is a way of imposing individual weights to each one of the states considering that all of them are decoupled. In the case of the quadcopter it is known the existence of some coupling between the movements, although it is minor. Another remark is that being a linear algorithm, the performance will hold as long as the quadcopter stays in the vicinity of the hover point, meaning by default that the three Euler angles will always be regulated at zero degrees. This implies that with the LQT algorithm, as proposed in this project, specifying a trayectory for the yaw angle will not be possible as the linearization will not longer be a valid approximation. Continuing with the setup of the simulation environment for the LQT controller, the angular integral action gain, the matrix Kiang , takes the following format:    Kiang =   −kiang −kiang −kiang kiang kiang −kiang −kiang kiang kiang kiang −kiang kiang      (3.2.31) where kiang was a tuned parameter to compensate modeling errors and other unmodeled phenomena. The tuning procedure is further explained in Section 4.2. The value used both in simulation and in the experimental phase was kiang = 8660. Similarly, the position integral action gain Kipos takes on the form: 43 CHAPTER 3. SIMULATION    Kipos =   kipos −kipos −kipos −kipos −kipos kipos kipos kipos −kipos −kipos −kipos −kipos      (3.2.32) The value chosen for kipos was 5000, after thorough testing both in simulation and practice. The approach to find the correct weight matrices in (3.2.30) was a simple trialand-error method, taking in account some general knowledge about the dynamics of the quadcopter, but most importantly through experimentation with the actual platform. Basically the simulation served as a first good approximation to obtain decent performance in practice and then as a tool to know which parameters to tune further to improve the control system in the real-life scenario. 3.2.4 Trajectory Generation A trajectory for the 12-state vector must be specified before running the LQT algorithm. For the generation of the trajectory, a small angle approach was taken meaning that the trajectory for angular velocities and angular positions was considered as zero throughout the whole trajectory. As for the trajectory of the states [u, v, w], the position trajectory was simply fed to a Kalman Filter similar as the one previously designed to obtain a velocity profile for each axis (in this case the filter acts only as a velocity estimator). Note that in the small angle approximation, the vector [u, v, w] coincides with the vector [ẋ, ẏ, ż], hence a projection from the inertial frame to the body-fixed frame was not necessary. The generation of feasible trajectories for a quadcopter is a complex and open research subject that has been treated before in works such as [25]. In the case of this project these types of studies were not considered and are suggested as future work. The trajectories were generated via MATLAB through a GUI interface (modified version of function get_curve.m) that allowed the user to specify a number of waypoints in the X-Y plane and then a cubic interpolation calculated a trajectory between each one of the waypoints. After this first step was done, a similar window opened to specify the trajectory in the altitude of the drone. The interpolation was done with respect to a time vector with a fixed time step of Ts = 0.01s and a range from 0 to a fixed final time 44 CHAPTER 3. SIMULATION in which the trajectory was to be executed. Then the interpolation function created a position vector of the same length as the time vector, specifying a discrete time trajectory z[k] between the waypoints chosen through the interface. The interpolation method gives two variants to the trajectory generated: 1. “spline” does the classic piecewise cubic interpolation between the waypoints. 2. “pchip” does a shape-preserving cubic interpolation. Figure 3.2.5 shows a series of points chosen by the user and the corresponding interpolation and trajectory generated by the interface. The user must then choose between the “spline” or “pchip” trajectories generated. This method establishes an easy and automated way of generating trajectories, but the feasibility of said trajectories depends mostly on the time allowed to execute them. Use mouse clicks to pick points INSIDE the gridded area 2 1.5 1.5 1 1 0.5 0.5 Y (m) 2 0 Waypoints Spline Pchip 0 -0.5 -0.5 -1 -1 -1.5 -1.5 -2 X-Y Trajectory Generated -2 -2 -1.5 -1 -0.5 0 0.5 1 1.5 2 -2 -1.5 -1 -0.5 When you are done, click OUTSIDE the gridded area 0 0.5 1 1.5 X (m) (a) MATLAB GUI waypoint selection (b) Generated Trajectory Figure 3.2.5: Trajectory generation GUI. 3.2.5 Simulation Results The control system was thoroughly tested in simulation before the implementation phase, even though the final tuning of the controller was done using and getting to know the experimental platform. First the step response was computed for the x, y and z positions, using simulated noise for both the VICON and UWB system. Simulation results are appreciated in Figure 3.2.6. 45 2 CHAPTER 3. SIMULATION X Position Position (m) 1.5 UWB VICON Reference 1 0.5 0 -0.5 0 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 1.5 1 0.5 0 -0.5 0 5 10 15 20 Time (s) Z Position Position (m) 1.5 1 0.5 0 -0.5 0 5 10 15 20 Time (s) Figure 3.2.6: Simulation for steps in x, y and z positions. This first simulation of the LQT algorithm shows an interesting feature for a step response. Instead of obtaining a classical response that starts when the step is commanded, the quadcopter actually starts moving beforehand as to minimize the overall error of the trajectory. This feature is only possible because the trajectory was known by the controller and the algorithm calculated the appropriate feedforward gain g [k] to ensure the “anticipatory” feature seen in simulation. Another important remark after playing around with the simulation is that the overshoot can be reduced easily by decreasing the integral gains Kiang and/or Kipos , but due to later difficulties in the implementation they remained with the values specified before (this subject is further discussed in Section 4.3.2). As to the UWB vs VICON performance, the time plots suggests that both have almost the same exact response in position. The Kalman Filter performance in simulation to estimate the linear velocities is presented in Figure 3.2.7. The filters main job in the control system is to calculate reliable state estimations for the linear velocities in the inertial frame, then the appropriate rotation projects this estimations in the body frame thus obtaining estimates for the states [u, v, w]. Simulation results suggests that the levels of noise in the estimations for the UWB X-Y velocities is greater, but this was expected knowing already that the noise has at least two order of magnitude greater standard deviation than the VICON system. 46 CHAPTER 3. SIMULATION X Velocity in body frame Velocity (m/s) 1 Kalman Filter UWB True Dynamics Kalman Filter VICON True Dynamics 0.5 0 -0.5 -1 0 5 10 15 1 Velocity (m/s) 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Velocity in body frame 0.5 0 -0.5 -1 0 5 10 15 0.5 Velocity (m/s) 20 Time (s) Z Velocity in body frame 0 -0.5 0 5 10 15 20 Time (s) Figure 3.2.7: Kalman Filter simulation, with VICON and UWB simulated noise. Nonetheless, the Kalman Filter in both cases manages a good compromise between the filtering and the convergence speed. As seen in the plots of the X and Y velocities, the UWB Kalman Filter introduced some delay (∼200ms) in the estimations with respect to the true dynamics of the quadcopter. This was the cost for a more aggressive filtering of the noise. In practice the proposed gains provided a satisfactory performance despite the lag introduced, ultimately it was found that if the filtering was less aggressive then too much noise entered the system and the overall performance of the tracker degraded. To truly justify the need of using a more refined trajectory tracker, the simulated system was subject to follow a more complex trajectory to test the tracking capabilities of the LQT algorithm and also to evaluate the Kalman filter performance under more complex situations. Figure 3.2.8 shows simulation results for a trajectory created by the user interface presented in Section 3.2.4. The LQT controller was capable of tracking the desired trajectory, with a low error even in closed curves as suggests the 3D diagrams in Figure 3.2.9. 47 CHAPTER 3. SIMULATION X Position Position (m) 2 UWB VICON Reference 1 0 -1 -2 0 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 2 1 0 -1 -2 0 5 10 15 20 Time (s) Z Position Position (m) 3 2 1 0 0 5 10 15 20 Time (s) Figure 3.2.8: Tracking for complex trajectories. 3D Trajectory 3D Trajectory 2 1.5 2.5 1 2 Y (m) Z (m) 0.5 UWB VICON Reference 1.5 1 -0.5 0.5 0 2 0 -1 2 1 UWB VICON Reference -1.5 0 0 -1 Y (m) -2 -2 -2 -1.5 X (m) -1 -0.5 0 0.5 1 1.5 2 X (m) (a) Standard view (b) XY Plane Figure 3.2.9: 3D Diagram for a complex trajectory. As for the Kalman filter estimations, Figure 3.2.10 shows that the filter performed as expected when asked to track more complex velocity profiles as the one generated by this trajectory. 48 CHAPTER 3. SIMULATION X Velocity in body frame Velocity (m/s) 1 Kalman Filter UWB True Dynamics Kalman Filter VICON True Dynamics 0.5 0 -0.5 -1 0 5 10 15 1 Velocity (m/s) 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Velocity in body frame 0 -1 -2 0 5 10 15 0.4 Velocity (m/s) 20 Time (s) Z Velocity in body frame 0.2 0 -0.2 -0.4 0 5 10 15 20 Time (s) Figure 3.2.10: Kalman Filter simulation for a complex trajectory. The simulation environment for the LQT control system proved to be a useful tool for developing and understanding the mechanics of the newly adopted control technique for trajectory tracking. Going hand by hand with the implementation phase, the simulation proposed in this section served as a helpful guidance while fine tuning the controller in practice, and at the same time serving as reference in terms of the performance to aim for in the control system. 49 Chapter 4 Hardware Implementation and Experimental Results The implementation process was divided in two major phases: first a familiarization with the Crazyflie 2.0 platform and implementation of a PID position controller and secondly the implementation of a linear quadratic algorithm. 4.1 PID Controller After a thorough analysis of the original Crazyflie 2.0 firmware it became evident that some minor changes were needed to be made because the body-fixed frame defined in the embedded system did not match the one adopted during the simulation phase, therefore, for the sake of consistency with the body-fixed frame defined in Figure 2.2.3, certain lines of the original firmware code were changed (see Appendix A: Firmware Modifications). The first step towards the implementation was to test the on-board sensors such as the inertial measurement unit and all its components. Even though the sensors’ data analysis was not part of the project, it was important to at least follow the idea of how the firmware captured said data, ran it, for example, through the sensor fusion algorithm and estimated the states of the quadcopter that were fed to the on-board controllers. After this familiarization phase, the research moved towards the off-board controller implementation using ROS. 4.1.1 ROS Controller Node Starting from the Open source ROS nodes presented in [6], the controller node was modified to implement the equations proposed in Section 3.1.2. Figure 4.1.1 shows the 50 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS ROS nodes and topics concerning the controller implemented. Figure 4.1.1: ROS nodes and topics. A detailed explanation of the internal organization of each one of this nodes and interactions is beyond the scope of this report, but a qualitative analysis is adequate for an overall understanding of the system: • Crazyflie Server: this node defines the core interaction between ROS and the Crazyflie 2.0, through a radio communication. Its primary function in the control process is to serve as a data bridge between the Crazyflie and the off-board controller. On the one hand, it publishes sensors’ readings coming from the quadcopter, such as the IMU, that will serve as state estimations for the control process. On the other hand, the node receives commands coming from the controller node and sends them back to the Crazyflie. More specifically, the data sent in the “/cmd_vel” topic contains the outputs of the off-board controller, that means, messages of the form [ φc θc rc Ω ]. This messages will then be the inputs of the on-board control system, as shown previously in Figure 3.1.5. • VICON Listener: manages the communication with the VICON positioning system. It publishes data concerning the inertial frame coordinates [x, y, z] of a reflective sphere as seen in Figure 4.1.2, sitting on top of the Crazyflie 2.0. Figure 4.1.2: Crazyflie 2.0 with Vicon Sphere and UWB module. 51 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS Ideally, the VICON system should be used with three or more of these spheres, in order for the position estimations to be more resilient against other reflections in the laboratory or even for the Euler angles estimations. However, up to this point, all the tests were done using the configuration shown in Figure 4.1.2. and it did not present any major drawbacks during the tests. • Joystick: this nodes serves basically as an external emergency stop button. It is always a nice idea to keep the security measures “software free” in case something goes wrong during a flight, thus the preference of using a hardware stop button instead of one, probably more elegant, implemented in software such as MATLAB. • Goal: this is a user interactive topic created in MATLAB that lets the user choose between a number of predefined trajectories for the quadcopter to follow. Once the trajectory is selected, through a certain ID number that can be changed in real-time, the MATLAB node publishes the desired waypoint [xc , yc , zc , ψc ]. An additional feature allows the user to choose whether to send position or velocity commands to the yaw angle of the drone. • Controller: this is naturally the core of the real-time control system. The node takes data from the IMU of the Crazyflie and from the VICON system in order to have an estimate of the states of the quadcopter in the control algorithm presented in Section 3.1.2 . However this data only gives estimations of 9 states: the three linear positions in the inertial frame, the three Euler angles and the three angular velocities coming from the gyroscope. The linear velocities in the body frame [u, v, w] are not directly measured by any of the sensors and they need to be estimated somehow as they are used in the X-Y Position Controller. Usually, in this type of scenarios, a state observer (Luenberger’s, Kalman Filter, etc) is required to reconstruct the missing states. However, given the fact that the position estimations of the VICON system are truly precise (error<1mm), the following equations to estimate the velocities in the body-fixed frame using a pseudo-derivative in discrete time of the X-Y positions proved to be good enough for the control system to behave adequately:  x[k] − x[k − 1] ∆t   y[k] − y[k − 1] ∆t  Vx [k] = Vy [k] = (4.1.1) (4.1.2) where Vx [k] and Vy [k] are the linear velocities estimations in the inertial frame. 52 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS The term ∆t is the time step taken between iterations in the control algorithm, given that the controller node runs at 100 Hz, then ∆t = 0.01s. Normally to obtain the velocities in the body-fixed frame a multiplication by the Euler matrix Rob should be executed, but taking a small angle approximation for the pitch and roll angles, then the calculation is simplified to just one rotation of the yaw angle around the Z axis, as shown in the following equation: " u[k] v[k] # " = cos (ψ[k]) sin (ψ[k]) − sin (ψ[k]) cos (ψ[k]) #" Vx [k] Vy [k] # (4.1.3) Finally the linear velocities in the body-fixed frame can be expressed in terms of the measured states:       u[k] = cos (ψ[k]) x[k]−x[k−1] + sin (ψ[k]) y[k]−y[k−1] 0.01 0.01      v[k] = − sin (ψ[k]) x[k]−x[k−1] + cos (ψ[k]) y[k]−y[k−1] 0.01 0.01 (4.1.4) This approximation proved to be good enough for the control architecture proposed to work correctly. 4.1.2 Experimental Results The flight data was retrieved using the MATLAB node mentioned earlier, allowing for a more analytical interpretation of the results. The following section presents a number of these flights with the appropriate analysis. • Linear trajectories For this type of trajectories the tests consisted basically in a take-off, a linear movement in one or more directions, and a landing. For the first test, steps of two different amplitudes were sent in the vertical position of the drone, trying to maintain its X-Y position. The time plots of Figure 4.1.3 present the experimental data retrieved. The two commands were sent to maintain an altitude of either 0.68 meters or 1.18 meter, with all other commands set to zero. The X position stayed within a 6cm margin of error while the Y position had a more prominent error, roughly a 10 cm margin from the initial take-off position. The fact that the drone used for these tests is not entirely symmetrical (see Figure 4.1.2) means that the position holding in one of the axes is better than in the other, as it was in fact the case. Figure 4.1.4 shows different 3D perspectives of the trajectory followed by the Crazyflie during the test. 53 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position 0.08 0.1 0.04 Position (m) Position (m) 0.06 0.02 0 0.05 0 -0.05 -0.02 -0.04 -0.1 0 5 10 15 20 25 30 35 40 0 Time (s) 5 10 15 25 30 35 40 25 30 35 40 Yaw position 12 10 Angular Position (deg) 1.2 20 Time (s) PID Reference Z Position 1.4 1 Position (m) Y Position 0.15 0.8 0.6 0.4 0.2 0 8 6 4 2 0 -2 0 5 10 15 20 25 30 35 40 0 5 10 15 Time (s) 20 Time (s) Figure 4.1.3: Steps in vertical command zc . 3D Trajectory 3D Trajectory 2 1.8 2 1.6 PID Reference 1.5 PID Reference 1.4 Z (m) Z (m) 1.2 1 1 0.8 0.5 0.6 0.4 0 1 0 Y (m) -1 -1 0 -0.5 0.5 0.2 1 0 -1 X (m) -0.5 0 0.5 1 X (m) (a) Standard view (b) ZX Plane Figure 4.1.4: 3D Vertical Trajectory. The next test consisted in sending commands both in the X position and in the altitude, in order to study the quadcopter’s behavior when sending mixed movements. Experimental data is plotted in Figure 4.1.5, showing the in-flight response of the quadcopter. 54 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position 1.2 Y Position 0.1 1 0.05 Position (m) Position (m) 0.8 0.6 0.4 0.2 0 -0.05 0 -0.2 -0.1 0 5 10 15 20 25 30 35 0 5 10 15 Time (s) 20 25 30 35 25 30 35 Time (s) PID Reference Z Position 1.4 Yaw position 15 Angular Position (deg) 1.2 Position (m) 1 0.8 0.6 0.4 0.2 10 0 5 0 -5 0 5 10 15 20 25 30 35 0 5 10 15 Time (s) 20 Time (s) Figure 4.1.5: Steps in zc and xc . Similar to the simulations, the response time for a unity step in the X position was around 4 seconds, whereas for the altitude is around 7 seconds. The Y position remained in a 10 cm error margin and the yaw angle stayed well within a 3 degree margin after the initial take off (which is represented in the peak at 3 seconds). Figure 4.1.6 shows two different 3D perspectives of the experimental flight. 3D Trajectory 3D Trajectory 2 1 PID Reference PID Reference 0.8 0.6 1.5 Y (m) Z (m) 0.4 1 0.2 0 -0.2 0.5 -0.4 -0.6 0 -0.8 1 0 Y (m) -1 -1 -0.5 0 0.5 1 -1 -1 X (m) -0.5 0 0.5 1 X (m) (a) Standard view. (b) XY Plane. Figure 4.1.6: 3D Diagonal Trajectory. It remained only to test step commands in the Y axis and in the yaw position, so this last test in the linear trajectories consisted in sending both steps simultaneously and study the response of the system knowing the movement interference analysed during 55 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS the simulation phase of the project. Test results are showcased in Figure 4.1.7. X Position 0.3 0.4 Position (m) Position (m) 0.2 0.1 0 -0.1 0.2 0 -0.2 -0.2 -0.4 0 10 20 30 40 50 0 Time (s) 10 20 40 50 40 50 Yaw position 100 1.2 30 Time (s) PID Reference Z Position 1.4 Angular Position (deg) 80 1 Position (m) Y Position 0.6 0.8 0.6 0.4 0.2 0 60 40 20 0 -20 0 10 20 30 40 50 0 10 Time (s) 20 30 Time (s) Figure 4.1.7: Steps in yc and ψc . While maintaining an altitude of 1 meter and a position in X of zero, the commands sent were yc = 0.5m and ψ = 90°. The response time for the Y position was, as in the case of the X axis, around 4 seconds. On the other hand, the time response for a command in yaw is much faster, about 1 second. Studying the impact these two movements had in the other positions, for the altitude it is noted how it remained roughly within the same level during the whole trial, meaning that those commands did not have a major impact and the altitude controller compensated any small interference those movements could have generated. As for the X position, aside from the initial deviation due to take-off, the position stayed around the 10 cm error margin, but in this case the effect caused by the movements was much more notable, as seen in the 3D perspectives of Figure 4.1.8. The error in the X position around the initial position is more important than in the other trajectories that were tested. Even as a qualitative analysis from the experimental observations, the simultaneous movement of the Y position and the yaw rotation generated light deviations in the X axis while moving from point A to point B of the trajectory. 56 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 3D Trajectory 0.6 2 0.5 1.5 0.4 PID Reference PID Reference 0.3 1 Y (m) Z (m) 3D Trajectory 0.5 0.2 0.1 0 -1 0 -0.5 -0.1 0 -0.2 0.5 X (m) 1 -1 -0.5 0 0.5 1 -0.3 -1 Y (m) -0.5 0 0.5 1 X (m) (a) Standard view. (b) XY Plane. Figure 4.1.8: 3D Trajectory with Y-Yaw compound movement. • Circular trajectories The next step for testing the position controller was to generate more complicated trajectories and see if the system was capable of following the desired path. To describe a circle, the following function in discrete time was implemented:   xc [k] = x0 + sin (2π0.1k)     y [k] = y + sin (2π0.1k + π/2) c 0  zc [k] = 0.9     ψ[k] = −30k (4.1.5) where the values x0 and y0 represent the initial position of the drone in the X-Y plane. The experimental data retrieved while performing the circular trajectory is presented in Figure 4.1.9. In the X-Y position it is observed that the amplitude of the sine waves did not reach the value of 1m, meaning that the position controller failed to minimize the error as a consequence of not being fast enough for more complicated trajectories. A similar problem occurred with the simulated model and actually the explanation can be reused. Given the fact that the controller is a position tracker, it will try to regulate at each time step of the process the actual position with the desired position. In this case, the rate and amplitude of the trajectory were too high for the position tracker developed to actually make the quadcopter follow the path required. 57 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position 1 0.5 Position (m) 0.5 Position (m) Y Position 1 0 -0.5 0 -0.5 -1 -1 0 10 20 30 40 50 60 0 Time (s) Z Position 1.2 10 20 30 40 50 60 40 50 60 Time (s) PID Reference Yaw position 200 Angular Position (deg) Position (m) 1 0.8 0.6 0.4 0.2 0 100 0 -100 -200 0 10 20 30 40 50 60 0 10 20 Time (s) 30 Time (s) Figure 4.1.9: Time Response for circular trajectory. The 3D trajectories exhibited in Figure 4.1.10 show more clearly the deficiencies in the path followed by the quadcopter. 3D Trajectory 3D Trajectory PID Reference 1 0.8 1.2 0.6 1 0.4 Y (m) Z (m) 0.8 0.6 0.4 PID Reference 0.2 0.2 0 -0.2 -0.4 0 1 -0.6 0.5 1 0.5 0 Y (m) -0.8 0 -0.5 -0.5 -1 -1 -1 -1 X (m) -0.5 0 0.5 1 X (m) (a) Standard view. (b) Top view. Figure 4.1.10: 3D Circular trajectory. The last trajectory tested was the helix as seen during the simulation phase, the discrete time function implemented in the controller was defined as: 58 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS   xc [k] = x0 + sin (2π0.1k)     y [k] = y + sin (2π0.1k + π/2) c 0  zc [k] = 0.9 + 0.04k     ψ[k] = −90k (4.1.6) meaning that in the X-Y plane it described the same circle as before, but this time augmenting the altitude at a ratio of 4 centimeters per second. Experimental data in Figure 4.1.11 shows the performance of the quadcopter while following the helical trajectory. X Position 1 0.5 Position (m) Position (m) 0.5 0 -0.5 0 -0.5 -1 -1 0 5 10 15 20 25 30 35 40 0 Time (s) 5 10 15 Angular Position (deg) 1.5 1 0.5 0 25 30 35 40 25 30 35 40 Yaw position 200 2 20 Time (s) PID Reference Z Position 2.5 Position (m) Y Position 1 100 0 -100 -200 0 5 10 15 20 25 30 35 40 0 Time (s) 5 10 15 20 Time (s) Figure 4.1.11: Time Response for helix trajectory. The increase of the yaw angle velocity did not have a major impact in the performance of the system, the Crazyflie could turn at 90 degrees per second without any complications. The results in the Z position confirms that the altitude controller is good enough to follow a time-varying function such as a straight line, even though the amplitude variation of this trajectory was small. For the X-Y position the same phenomenon occurred as in the case of the circular trajectory. The 3D perspectives in Figure 4.1.12 displays the helicoidal trajectory followed. After take-off, the quadcopter began the regulation of the desired trajectory which presents the same deficiencies as the previous test. The landing was successful as the data shows that the landing site was just a few centimeters away from the take-off point. 59 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 3D Trajectory 3D Trajectory 1.5 0.5 Y (m) Z (m) PID Reference 1 2 1 0 0.5 PID Reference 0 1 0.5 0 Y (m) -0.5 -1 -1 -0.5 0 0.5 -0.5 1 -1 -1 X (m) -0.5 4.2 0.5 1 X (m) (a) Standard view. Figure 4.1.12: 0 (b) Top view. 3D Helix Trajectory. LQT Controller Implementation Having completed the first phase of the implementation process, a broader knowledge of the embedded system and its limitations was gained which was vital in the task of implementing the more delicate LQT system. The word “delicate” in this context refers to the fact that now the design included some low level control that was not done in the previous phase. With the PID controller, the two cascaded architecture embedded in the drone were already designed by the manufacturer, thus the design was reduced just to the off-board position controller. Instead, this new implementation required the careful thought of how to implement every portion of the controller. The design process began with the naive idea of implementing the whole 12 state feedback off-board using the MATLAB/ROS interface to send directly the motor commands through the radio link communicating the computer with the Crazyflie 2.0. This approach became rapidly discarded after some failed trials, mainly due to the latency of the radio link (around 2ms according to the manufacturer’s specifications) and to the refresh rate used in the MATLAB interface (100 Hz). The low level stabilization, meaning the angle and angular velocities, is done in almost every quadcopter inside the embedded system and not through any external software, and there are two main reasons for it: 1. The control must be done at a high frequency rate to compensate the quick angular dynamics of the quadcopter. These rates are seldom obtainable through wireless communication protocols. 60 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 2. The low level control is not robust to the sort of delays introduced by wireless links. If done within the embedded system, this latency is easily eliminated. In order to resolve this issue, the elements of the time-invariant state feedback gain L that corresponded to the angles and angular velocities states were implemented in the embedded system while the elements corresponding to the position and linear velocities of L and also the feedforward gains g [k] and Lg were implemented in MATLAB (see Section 4.2.2). After including the state feedback control in the Crazyflie’s firmware, the first tests of the on-board attitude stabilizer were conducted using a calibration rig as seen in Figure 4.2.1. Although it could only be used to test the feedback of the pitch angle, the roll angle theoretically has similar dynamics and therefore the same tuned gains were used for both pitch and roll. Figure 4.2.1: Pitch angle calibration rig. Even though there exists some non-negligible tension force induced by the cables that attached the quadcopter’s body to the posts, this is a good first test trial to avoid potential crashes. After tuning the gains of the roll and pitch angles the tests suggested that integral action was needed to compensate for different sources of perturbation, such as the asymmetry of the body and asymmetry of the motor’s power. While these effects might also be compensated by the position integral action, the overall performance of the control system was improved when adding the integral action to the angular positions. The implemented architecture is exposed in the block diagram of Figure 4.2.2. On top it shows the angular stabilization loop that runs in the embedded system at a faster rate of 500Hz, while below is the rest of the LQT architecture running off-board at a slower rate of 100 Hz. 61 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS On-Board @ 500Hz Lang [k] ∆uang Kiang P + (eang ∆kang ) P − u Crazyflie2.0 x̂ang [k] upos + Kipos (epos ∆kpos ) + ∆u + + Lpos [k] x̂pos [k] − + Lg [k] g[k + 1] ue Off-Board @ 100Hz Figure 4.2.2: Implementation diagram. The sensor fusion algorithm calculation for the three Euler angles and the angular velocities coming from the gyroscope compose the state vector x̂ang [k] in the following manner: x̂ang = h ψ̂ θ̂ φ̂ r̂ q̂ p̂ iT (4.2.1) The gain Lang is a 4x6 matrix that multiplies accordingly the state vector x̂ang . The system input ∆uang is a deviation from the equilibrium point, ue , to maintain an angle equal to zero in all three Euler angles. The on-board controller runs at 500Hz, thus the time step ∆kang in Figure 4.2.2 is equal to 0.002s. The off-board section of the controller computes the state feedback for the position and linear velocities states captured by the VICON or UWB systems and the Kalman filter developed in Section 3.2.2, therefore composing the following state vector: x̂pos = h x̂ ŷ ẑ û v̂ ŵ iT (4.2.2) Matrix gain Lpos is also a 4x6 matrix that multiplies the state vector x̂pos . For the position integral action, the time step ∆kpos is equal to 0.01s 4.2.1 ROS Controller Node Modifications For the LQT implementation, the ROS controller node presented in Section 4.1.1 that previously implemented the PID controller was modified to only receive the incoming commands from the MATLAB interface and send them to the Crazyflie 2.0 through the 62 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS radio link. The Crazyflie server node was then slightly modified to send the motor PWM signals instead of the desired Euler angles as it did with the previous control system. 4.2.2 MATLAB Interface Details The MATLAB interface was the heart of the LQT algorithm implementation. The ROS and MATLAB communication was done using the Robotics System ToolboxTM , in particular the Simulink blocks that implement ROS publishers and subscribers. All of the off-board section of the controller was executed within this interface, as well as the state vector reconstruction and flight data retrieval for further analysis. Figure 4.2.3 exhibits the structure of the interface developed. MATLAB/ROS Interface @ 100Hz VICON/ [x̂, ŷ, ẑ] UWB ROS Subscribers x̂ang [x̂, ŷ, ẑ] Kalman Filter [ψ̂, θ̂, φ̂, r̂, q̂, p̂] [m1 , m2 , m3 , m4 ] x̂pos LQT Algorithm (Off-board Section) Crazyflie 2.0 upos ROS Publisher [u1 , u2 , u3 , u4 ] Figure 4.2.3: MATLAB Interface diagram to implement the LQT controller. Now a breakdown of each block: • VICON/UWB: block that gives the position estimations of the drone in a previously defined inertial frame. • ROS Subscribers: these subscribers serve as bridge between MATLAB, the positioning system and the Crazyflie angle data. Four subscribers are included: one for the VICON position estimations, one for the UWB system, another one for the IMU data of the Crazyflie 2.0 and the last one to retrieve the PWM commands sent to the motors. • State observer: takes data from the position, Euler angles and angular velocities of the quadcopter to calculate an estimation of the state vector x̂pos . This is done through the Kalman Filter developed in Section 3.2.2. • LQT algorithm: implements the off-board section of the LQT algorithm as suggested in Figure 4.2.2. 63 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS • ROS Publisher: takes the input vector upos and decomposes in its four components, in order to send it to the Crazyflie via radio link in the format [u1 , u2 , u3 , u4 ]. • Crazyflie 2.0: the drone takes the output message of the ROS publisher and adds it to the on-board control section of the LQT algorithm, as suggested once again in Figure 4.2.2. The platform continuously outputs the IMU readings as well as the total 16-bit PWM signal sent to the motors. 4.2.3 Experimental Results A series of trajectories created using the GUI developed in Section 3.2.4 were tested with the LQT algorithm. The RMS error between the desired trajectory and the actual trajectory followed by the drone was used as a measure of the controller’s performance as in past works in UAV control such as [25, 28] . Another performance index was defined, from the basis that a 10 cm error margin from the desired position is ideal, then it was relevant to calculate for each one of the spatial coordinates of the drone the percentage in which each coordinate stayed within this margin of the desired position. These performance indices will be further known as ξx , ξy and ξz . • Trajectory #1: a simple trajectory with fixed altitude of 1 meter was commanded for the quadcopter to follow. The time plots in Figure 4.2.4 present the test results, while Figure 4.2.5 show different 3D perspectives of the flight. X Position Position (m) 2 LQT Reference 1 0 -1 -2 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 2 1 0 -1 -2 5 10 15 20 Time (s) Z Position Position (m) 1.5 1 0.5 0 5 10 15 20 Time (s) Figure 4.2.4: Position plots for Trajectory#1. 64 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 3D Trajectory 3D Trajectory 2 1.5 LQT Reference 1.2 1 1 LQT Reference Y (m) 0.5 0 0.6 0.4 -0.5 2 0.2 0 -1 0 -0.2 2 1.5 1 0.5 0 -0.5 Y (m) -1 -2 -1.5 -1.5 -1.5 X (m) -1 -0.5 0 0.5 1 1.5 X (m) (a) Standard view. (b) XY Plane. Figure 4.2.5: 3D Trajectory#1. For this simple trajectory the RMS errors were low, 6.2cm for the X position, 6.3cm for the Y and 3.9cm for the altitude Z. The corresponding performance indices were ξx = 92.65%, ξy = 90.72% and ξz = 95.87%. The tracking of these type of slow trajectories had an outstanding level of performance. • Trajectory #2: for this second trajectory a varying altitude was also commanded to asses the behavior of the quadcopter while moving simultaneously in all three spatial coordinates. The flight data is displayed in Figures 4.2.6 and 4.2.7. X Position Position (m) 1 LQT Reference 0 -1 -2 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 1 0 -1 -2 5 10 15 20 Time (s) Z Position 2 Position (m) Z (m) 0.8 1.5 1 0.5 0 5 10 15 20 Time (s) Figure 4.2.6: Position plots for Trajectory#2. 65 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 3D Trajectory 3D Trajectory 1 0.5 2 LQT Reference LQT Reference 0 Y (m) 1 -0.5 -1 0.5 1 0 1 -1.5 0 -1 0 -1 -2 Y (m) -2 -2 -1.5 X (m) -1 -0.5 0 0.5 1 X (m) (a) Standard view. (b) XY Plane. Figure 4.2.7: 3D Trajectory#2. Despise adding more difficulty to the trajectory the performance was satisfactory, with RMS errors of 4.72cm, 7.81cm and 4.75cm respectively for the x, y and z positions. The performance indices remained in the high end, with ξx = 93.89%, ξy = 87.30% and ξz = 94.63%. • Trajectory #3: a more complex trajectory is showcased in Figures 4.2.8 and 4.2.9 X Position Position (m) 2 LQT Reference 1 0 -1 -2 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 2 1 0 -1 -2 5 10 15 20 Time (s) Z Position 2 Position (m) Z (m) 1.5 1.5 1 0.5 0 5 10 15 20 Time (s) Figure 4.2.8: Position plots for Trajectory#3. 66 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 3D Trajectory 3D Trajectory 1.5 2 1 0.5 Y (m) LQT Reference 1 LQT Reference 0 -0.5 0.5 -1 0 -2 -1 0 1 Y (m) 2 -1 0 1 2 -2 -1.5 -1.5 X (m) -1 -0.5 0 0.5 1 1.5 X (m) (a) Standard view. (b) XY Plane. Figure 4.2.9: 3D Trajectory#3. Even though the controller kept a good trajectory tracking, it is evident how the performance starts degrading when adding more complexity to the trajectories. In this case the RMS erros were of 7.51cm, 5.97cm and 7.34cm for the X, Y and Z positions. The performance indices were lower than in the two previous trajectories, with ξx = 83.47%, ξy = 88.49% and ξz = 85.12%. • Trajectory #4: a complex spiral trajectory in 3D was commanded. The experimental results can be appreciated in Figures 4.2.10 and 4.2.11. X Position Position (m) 2 LQT Reference 1 0 -1 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 2 1 0 -1 -2 5 10 15 20 Time (s) Z Position 2 Position (m) Z (m) 1.5 1.5 1 0.5 0 5 10 15 20 Time (s) Figure 4.2.10: Position plots for Trajectory#4. 67 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 3D Trajectory 3D Trajectory 1.5 LQT Reference 2 1 1.5 0.5 1 0 0.5 Y (m) Z (m) LQT Reference 0 -0.5 2 -1 1 0 -1.5 -1 Y (m) -2 -1 -0.5 1 0.5 0 1.5 2 -2 -1 -0.5 0 X (m) 0.5 1 1.5 2 X (m) (a) Standard view. (b) XY Plane. Figure 4.2.11: 3D Trajectory#4. The RMS error incurred when following this trajectory was of 7.93cm in X, 11.79cm in Y and 5.44cm in Z. The performance indices were ξx = 79.55%, ξy = 58.19% and ξz = 93.12%. Even more clear than with Trajectory#3, this spiral trajectory shows a performance degradation when the trajectories demand faster movements, closer curves or harder brakes. For example, at the 30 second mark in the X position a sudden brake was required but the controller was not as fast which caused an overshoot. As seen in the simulation phase these type of overshoots are caused mainly by the integral action, but otherwise, if lowered, in practice the position regulation would worsen. 4.3 Controller Comparisons In this section the step response of the control system is used as a measure to compare the performance of the two controllers synthesized in this project, as well as comparing the simulated model and the experimental data to determine how close the simulation predicted the actual test results. Then, to compare trajectory tracking capabilities, the two controllers were tested on identical trials to follow sinusoidal waves. 4.3.1 Simulation vs Experimental - PID Comparing the step response of the simulation model developed in subsection 3.1 and the one obtained during a real flight of the drone was the chosen method to verify the accuracy of the mathematical model of the quadcopter. Three different flights were executed, sending individual steps in the direction of X, Y and Z. 68 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS • Step command in the X direction A step command of 1 meter was commanded in the X coordinate, while maintaining a 1 meter altitude and a zero position in the Y coordinate. The experimental results are presented in Figure 4.3.1. X Position 1.5 Simulation Experimental Reference Position (m) 1 0.5 0 -0.5 10 15 20 25 30 35 25 30 35 25 30 35 Time (s) Y Position Position (m) 0.1 0 -0.1 -0.2 10 15 20 Time (s) Z Position Position (m) 1.2 1 0.8 0.6 10 15 20 Time (s) Figure 4.3.1: Trajectory using the PID controller to follow a Step in the X position. The simulation and experimental step responses had almost identical response time of around 3 seconds with almost to no overshoot. The simulation response shows less damping in the response. The clear difference is in the Y response, the simulation predicted a perfect zero which is clearly impossible in practice, nonetheless the drone maintained a 10 centimeters error margin within the initial Y position. The movement had little impact in the altitude. • Step command in the Y direction The test was conducted in a similar fashion as the previous one, but this time sending the appropriate command to the Y coordinate. Simulation and experimental results were plotted together as show in Figure 4.3.2. 69 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position Position (m) 0.1 0 -0.1 -0.2 10 15 20 25 30 35 Time (s) Y Position 1.5 Simulation Experimental Reference Position (m) 1 0.5 0 -0.5 10 15 20 25 30 35 25 30 35 Time (s) Z Position Position (m) 1.2 1 0.8 0.6 10 15 20 Time (s) Figure 4.3.2: Trajectory using the PID controller to follow a Step in the Y position. Similar to the X step response, the dynamics for the Y direction matches up to some extent those predicted by the simulation. • Step command in the Z direction Finally a step command of 1 meter in altitude was tested, as seen in Figure 4.3.3. X Position Position (m) 0.05 0 -0.05 -0.1 -0.15 10 15 20 25 30 35 25 30 35 Time (s) Y Position Position (m) 0.2 0.1 0 -0.1 -0.2 10 15 20 Time (s) Z Position Position (m) 2.5 Simulation Experimental Reference 2 1.5 1 0.5 10 15 20 25 30 Time (s) Figure 4.3.3: Trajectory using the PID controller to follow a Step in the Z position. 70 35 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS The altitude dynamics were slower in practice than in simulation and with a the experimental data exposes a more pronounced overshoot. 4.3.2 Simulation vs Experimental - LQT Similarly, with the simulation model developed in Section 3.2, the following plots show the step response comparisons between the simulation and the experimental data. • Step command in the X direction Figure 4.3.4 exhibits a comparative plot between the simulation and the experimental data. X Position 1.5 Simulation Experimental Reference Position (m) 1 0.5 0 -0.5 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 0.1 0 -0.1 -0.2 5 10 15 20 Time (s) Z Position Position (m) 1.5 1 0.5 0 5 10 15 20 Time (s) Figure 4.3.4: Trajectory using the LQT controller to follow a Step in the X position. The simulation scenario in the X and Z positions matches the results obtained during the experiment. The main difference is the perturbation around the zero position of the Y coordinate, the simulation predicted an almost perfect hold of this position while in reality the quadcopter oscillated in a 10 cm error margin. • Step command in the Y direction Doing a similar test, but sending a command to the Y coordinate gave the results seen in Figure 4.3.5. 71 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position Position (m) 0.2 Simulation Experimental Reference 0.1 0 -0.1 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 2 1 0 -1 5 10 15 20 Time (s) Z Position Position (m) 1.5 1 0.5 0 5 10 15 20 Time (s) Figure 4.3.5: Trajectory using the LQT controller to follow a Step in the Y position. The dynamics were similar to those of the X step, the simulation proved once again to be accurate in predicting the test results. • Step command in the Z direction The behavior in Figure 4.3.6 corresponds with a 1 meter command in the Z coordinate. X Position Position (m) 0.3 0.2 Simulation Experimental Reference 0.1 0 -0.1 5 10 15 20 25 30 35 40 25 30 35 40 25 30 35 40 Time (s) Y Position Position (m) 0.2 0.1 0 -0.1 -0.2 5 10 15 20 Time (s) Z Position Position (m) 3 2 1 0 5 10 15 20 Time (s) Figure 4.3.6: Trajectory using the LQT controller to follow a Step in the Z position. 72 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS The altitude step simulation matched almost perfectly the one obtained in practice, as the comparison demonstrate. After reviewing this data a few conclusions can be drawn. On the first hand, the PID simulation is precise up to some extent at predicting the response of the system when applying step commands, although it has some considerable differences on the altitude estimation. On the other hand the LQT simulation proved to be more precise, giving accurate information of how the system will behave in the real scenario. Both of these simulations serve the common purpose of validating the mathematical model of the quadcopter. In the LQT simulations there is an important remark to be made before jumping to an early conclusion about the accuracy of the mathematical model. In the X-Y step responses there is an overshoot introduced mainly by the high integral gains Kiang and Kipos , if those gains were to be lowered at least in simulation the overshoot would be reduced giving more pleasant results, however various experimental results suggest that lowering these gains will worsen the overall performance of the controller in practice. The conclusion is that the high integral gain is necessary to compensate all the model deficiencies and future efforts should be made in refining the model in order to lower the integral gains without loosing performance. 4.3.3 Controller Performance: PID vs LQT One of the main goals of the project was to objectively compare the performance of the two controllers synthesized, in terms of tracking accuracy and command effort. First the step responses were compared and then a sinusoidal trajectory showed the tracking capabilities of each controller. For each controller, the results presented correspond to the flight with the best performance after performing a series of trials under the same conditions (gains, weights, etc.). The same performance indices as in Section 4.2.3 were used. To quantify the control effort, the two-norm is used as in [29], then the control effort is defined as: k=kf Ui = X u2i [k] (4.3.1) k=0 where ui [k] is the PWM signal ranging from 0-65536 sent to the i-th motor, and Ui is the   U −UP ID associated control effort. Also, the ratio percentage % LQT is used to quantify UP ID 73 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS the increase or decrease percentage in control effort of the LQT with respect to the PID. • Step command in the X direction Figure 4.3.7 exhibits the experimental results for both controllers when commanded to follow a 1 meter step in the X coordinate. X Position Y Position 0.1 1.2 1 0.05 Position (m) Position (m) 0.8 0.6 0.4 0.2 0 -0.05 -0.1 0 -0.2 -0.15 10 15 20 25 30 35 10 Time (s) 15 X Position Error 30 35 30 35 Y Position Error 0.15 1 0.1 0.5 0.05 Error (m) Error (m) 25 Time (s) 1.5 0 -0.5 -1 10 20 PID LQT Reference 0 -0.05 -0.1 15 20 25 30 35 10 15 Time (s) 20 25 Time (s) Figure 4.3.7: X-Y Position and error comparison when following a unit step in the X position. The error terms for the LQT controller are lower, at the expenditure of a higher overshoot than the PID. By moving before the step command, the LQT controller manages to reduce an otherwise big error of 1 meter. Table 4.3.1 summarizes the performance for both controllers. RMS (ex ) [cm] RMS (ey ) [cm] %ξx %ξy LQT 12.58 3.37 76.53 100 PID 24.63 6.41 74.98 95.08 Table 4.3.1: Error comparison when following a unit step in X position. The RMS error values for the X-Y position with the LQT controller were almost half of those obtained with the PID. The performance indices were slightly better with the LQT controller. 74 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS The motor commands data for both trials were registered and compared as shown in Figure 4.3.8. 7 ×10 4 PWM Commands Motor M1 6 ×10 4 PWM Commands Motor M2 5.5 6 PWM PWM 5 5 4 4.5 4 3.5 3 3 2 10 15 20 25 30 2.5 10 35 15 20 Time (s) 25 30 35 30 35 Time (s) PID LQT 6 ×10 4 PWM Commands Motor M3 6 PWM PWM PWM Commands Motor M4 5 5 4 3 2 10 ×10 4 4 3 2 15 20 25 30 1 10 35 15 Time (s) 20 25 Time (s) Figure 4.3.8: Motor commands comparison when following a unit step in the X position. The control effort is overall greater with the LQT controller, but the PID has control effort discontinuities when the step command goes into action. Around the 32 second mark the motor M1 reached saturation using the PID controller. Furthermore, Table 4.3.2 quantifies the motor’s command effort in both cases. LQT PID %  ULQT −UP ID UP ID  U1 [×1012 ] U2 [×1012 ] U3 [×1012 ] U4 [×1012 ] 5.26 4.66 5.86 4.40 4.66 3.87 5.42 3.46 12.88% 20.41% 8.12% 27.17% Table 4.3.2: Motor effort comparison when following a unit step in the X position. The results show a clear tendency of control effort increase while using the LQT controller with respect to the PID controller. • Step command in the Y direction When commanded to follow a 1 meter step in the Y coordinate, the quadcopter behaved as suggested in Figure 4.3.9. 75 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position Y Position 0.1 1.5 1 Position (m) Position (m) 0.05 0 -0.05 0.5 0 -0.1 -0.15 -0.5 10 15 20 25 30 35 10 Time (s) X Position Error 0.1 1 0.05 0.5 -0.05 25 30 35 30 35 Y Position Error 1.5 0 20 Time (s) 0.15 Error (m) Error (m) 15 LQT PID Reference 0 -0.5 -0.1 10 15 20 25 30 -1 10 35 15 Time (s) 20 25 Time (s) Figure 4.3.9: X-Y Position and error comparison when following a unit step in the Y position. Similar as the last test, the anticipatory feature of the LQT controller allows to reduce the big error the system incurs when sending step commands. The graphical evidence is supported by the error comparison contained in Table 4.3.3. RMS (ex ) [cm] RMS (ey ) [cm] %ξx %ξy LQT 2.53 12.25 100 78.34 PID 3.50 28.39 99.68 65.69 Table 4.3.3: Error comparison when following a unit step in Y position. Once again, the RMS error in the direction the step was send was cut by more than half with the LQT controller. Performance indices show that the LQT was superior in terms of reducing the tracking error. As for the motor commands, Figure 4.3.10 show the same trend as the last test, the LQT algorithm control outputs is overall bigger than the control outputs of the PID system, while this last one displays discontinuities in the commands sent as a consequence of the step demanded. 76 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 5.5 ×10 4 PWM Commands Motor M1 5 5 ×10 4 PWM Commands Motor M2 4.5 PWM PWM 4.5 4 4 3.5 3.5 3 3 2.5 10 15 20 25 30 2.5 10 35 Time (s) 6 ×10 4 PWM Commands Motor M3 5 25 30 35 ×10 4 30 35 PWM Commands Motor M4 4 PWM PWM 20 Time (s) 5 4 3 2 10 15 PID LQT 3 2 1 15 20 25 30 0 10 35 15 Time (s) 20 25 Time (s) Figure 4.3.10: Motor commands comparison when following a unit step in the Y position. The data presented in Table 4.3.4 indicate that the control effort increment of the LQT algorithm with respect to the PID controller can get up to more than a 50%. LQT PID %  ULQT −UP ID UP ID  U1 [×1012 ] U2 [×1012 ] U3 [×1012 ] U4 [×1012 ] 5.66 5.13 6.35 4.88 4.89 3.71 5.49 3.23 15.75% 38.28% 15.66% 51.08% Table 4.3.4: Motor effort comparison when following a unit step in the Y position. • Step command in the Z direction The last comparison for the linear trajectories was done sending a 1 meter step command in the Z coordinate. The test result flight data is exposed in Figures 4.3.11 and 4.3.12, where all three coordinate comparisons between the two controllers are illustrated. The LQT algorithm outperforms by a good margin the PID, by greatly reducing the overshoot and the response time in the Z position. The LQT also kept a more precise X-Y position, both at a constant altitude and when applying the command to ascend 1 meter. 77 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS Z Position Position (m) 2.5 PID LQT Reference 2 1.5 1 0.5 10 15 20 25 30 35 30 35 Time (s) Z Position Error 2 Error (m) 1 0 -1 -2 10 15 20 25 Time (s) Figure 4.3.11: Z Position and error comparison when following a unit step. X Position Y Position 0.1 0.2 0.15 0.05 Position (m) Position (m) 0.1 0 -0.05 0.05 0 -0.05 -0.1 -0.1 -0.15 -0.15 10 15 20 25 30 35 10 Time (s) 15 20 25 30 35 30 35 Time (s) PID LQT Reference X Position Error Y Position Error 0.15 0.15 0.1 0.1 0.05 Error (m) Error (m) 0.05 0 0 -0.05 -0.1 -0.05 -0.15 -0.1 -0.2 10 15 20 25 30 35 10 Time (s) 15 20 25 Time (s) Figure 4.3.12: X-Y Position and error comparison when following a unit step in the Z position. The analysis of the results is summarized in Table 4.3.5. The error comparison confirms the superiority of the LQT with respect to the PID, with reduced RMS values of error and better performance indices. 78 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS RMS (ex ) [cm] RMS (ey ) [cm] RMS (ez ) [cm] %ξx %ξy %ξz LQT 2.82 4.35 13.38 100 99.48 81.48 PID 6.13 5.46 28.59 86.43 91.83 52.68 Table 4.3.5: Error comparison when following a unit step in Z position. The control commands of the motors are visualized in Figure 4.3.13. As in all the other tests, the LQT control effort remained greater than that of the PID. However the LQT plots do not present evident command peaks as the PID when sending the altitude command. 5.5 ×10 4 PWM Commands Motor M1 5.5 5 ×10 4 PWM Commands Motor M2 5 PWM PWM 4.5 4 4.5 4 3.5 3.5 3 2.5 10 15 20 25 30 3 10 35 15 20 Time (s) 25 30 35 30 35 Time (s) PID LQT 5.5 ×10 4 PWM Commands Motor M3 5 4 4 3.5 3.5 3 10 PWM Commands Motor M4 4.5 4.5 PWM PWM 5 ×10 4 15 20 25 30 3 10 35 15 Time (s) 20 25 Time (s) Figure 4.3.13: Motor commands comparison when following a unit step in the Z position. The increase in control effort is exposed by the results in Table 4.3.6. The numbers reveal a maximum increase of around 31% in control effort in one of the motors with the LQT controller with respect to the PID. LQT PID %  ULQT −UP ID UP ID  U1 [×1012 ] U2 [×1012 ] U3 [×1012 ] U4 [×1012 ] 5.32 4.42 5.78 4.13 4.05 4.18 4.98 3.73 31.36% 5.74% 16.06% 10.72% Table 4.3.6: Motor effort comparison when following a unit step in the Z position. 79 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS • Circular trajectory A circular trajectory composing a circle in the X-Y plane was conducted with both controllers to test the tracking of rapidly varying trajectories. The time plot comparisons of the X-Y positions are displayed in Figure 4.3.14. X Position 1 1 0.5 0.5 0 -0.5 0 -0.5 -1 -1.5 -1 5 10 15 20 25 30 Time (s) 35 40 45 50 -1.5 55 10 15 20 25 30 Time (s) 35 40 45 50 55 40 45 50 55 Y Position Error 1.5 1 Error (m) 0.5 Error (m) 5 PID LQT Reference X Position Error 1 0 -0.5 -1 Y Position 1.5 Position (m) Position (m) 1.5 0.5 0 -0.5 5 10 15 20 25 30 Time (s) 35 40 45 50 -1 55 5 10 15 20 25 30 Time (s) 35 Figure 4.3.14: X-Y Position and error comparison when following a circular trajectory. The LQT controller manages to track and stay in phase with the sinusoidal waves, while the PID controller was not capable of such feat nor of obtaining the desired 1 meter amplitude. The error plots expose the improvement in trajectory tracking of the LQT controller with respect to the PID, and are validated by the data shown in Table 4.3.7. RMS (ex ) [cm] RMS (ey ) [cm] %ξx %ξy LQT 10.32 16.69 55.74 55.00 PID 46.05 47.28 14.72 17.68 Table 4.3.7: Error comparison when following a circular position. The RMS error is about 4 times greater with the PID controller than with the LQT algorithm, clearly showing the superiority of the latter in tracking more complex trajectories. The motors’ 16-bit PWM signals of both controllers are compared in Figure 4.3.15. 80 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 6 ×10 4 PWM Commands Motor M1 6 5 4.5 4.5 4 3.5 4 3.5 3 3 2.5 2.5 10 15 20 25 30 35 40 45 50 55 10 Time (s) ×10 4 15 20 25 PWM Commands Motor M3 6 6 5 5 4 4 30 35 40 45 50 55 45 50 55 Time (s) PID LQT PWM PWM 7 PWM Commands Motor M2 5.5 5 PWM PWM 5.5 ×10 4 3 ×10 4 PWM Commands Motor M4 3 2 2 1 10 15 20 25 30 35 40 45 50 55 10 15 20 25 Time (s) 30 35 40 Time (s) Figure 4.3.15: Motor command comparison when following a circular trajectory. The tendency of a greater command effort for the LQT algorithm compared to the PID remained as before, also confirmed by the values in Table 4.3.8. Note that for this trajectory there are important control spikes with the PID controller exactly in the points where the error reached its maximum points in Figure 4.3.14, causing for instance a motor saturation at the 28 second mark in motor M3. LQT PID %  ULQT −UP ID UP ID  U1 [×1012 ] U2 [×1012 ] U3 [×1012 ] U4 [×1012 ] 11.68 10.20 12.50 9.65 8.82 7.69 10.28 6.88 32.43% 32.64% 21.60% 40.26% Table 4.3.8: Motor effort comparison when following a circular trajectory. The comparison between the PID and LQT control systems gave insightful data to draw conclusions about their advantages and disadvantages. Starting with the overall performance in position and trajectory tracking, the LQT was superior at keeping low levels of error with respect to the desired position. The goal of improving the tracking performance of the PID controller was achieved with the LQT algorithm. As for the command effort of the motors, even though the LQT algorithm does an optimization process to minimize it, the experimental data exposed that the PID used less 81 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS effort in every trial. The explanation for this phenomenon are the elevated integral gains and weighting factors used with the LQT algorithm to obtain the desired performance. It is intuitive to think that the correct tracking of more demanding trajectories leads to a greater control effort, as for most control systems design this ends up being a compromise issue, in this case between performance and motor power. This increase in control effort translated in a shorter battery life-time while using the LQT controller with respect to the PID. 4.4 LQT with UWB Position Estimation Using the two-way ranging ultra-wide band system developed in [36], four base stations were placed forming a 7x4m rectangle at 2.5m of height from the floor. Figure 4.4.1 displays how the tag was incorporated to the quadcopter’s body. Figure 4.4.1: Crazyflie 2.0 with UWB module exposed A series of trajectories were followed using the VICON and then the UWB system to test the LQT controller. In both cases the flight data was compared using the VICON measurements as the ground truth in order to study the tracking performance. The UWB estimations were used only for the X and Y position, while the altitude came from the VICON system. The analysis was focused to the tracking in the X-Y plane, while keeping a 1 meter altitude. With each system a certain amount of flights were executed and the one with best performance is the one showcased in this section, so the comparisons were made in the best-case scenario with each localization system. Note: while using the UWB system it was decided to lower the position integral gains as it improved the performance. 82 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS • Hover The first test was a simple hover to asses the controller’s capability of keeping a fixed position. Figure 4.4.2 presents the experimental results for the hover test. X Position Position (m) 0.2 0 -0.2 -0.4 5 10 15 20 25 30 35 Time (s) Y Position 0.2 Position (m) 40 UWB VICON Reference 0 -0.2 -0.4 5 10 15 20 25 30 35 40 Time (s) Figure 4.4.2: X-Y Position and error comparison while hovering around a point. Although in both cases the controller performed similarly, with the UWB system there were more oscillations, specially in the take-off and landing stages at the beginning and end of the time plot. Table 4.4.1 quantifies the error values of the hover flight. RMS (ex ) [cm] RMS (ey ) [cm] %ξx %ξy VICON 4.67 5.03 93.74 94.78 UWB 5.90 6.42 92.15 90.27 Table 4.4.1: Error comparison while hovering around a point. Both hover flights were solid, although the RMS errors and performance indices suggests that with the VICON system the drone hold more precisely its position. • Trajectory #1 The results for the first trajectory are displayed in Figure 4.4.3. 83 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position Y Position 1.5 1.5 1 1 Position (m) Position (m) 0.5 0.5 0 0 -0.5 -1 -0.5 -1.5 -1 -2 5 10 15 20 25 30 35 40 5 Time (s) X Position Error 15 20 25 30 35 40 30 35 40 Time (s) Y Position Error 0.3 0.4 0.2 0.3 0.2 Error (m) 0.1 Error (m) 10 UWB VICON Reference 0 -0.1 0.1 0 -0.1 -0.2 -0.2 -0.3 -0.3 5 10 15 20 25 30 35 40 5 10 15 20 Time (s) 25 Time (s) Figure 4.4.3: X-Y Position and error comparison when following Trajectory #1. Once again, the overall performance in both cases in terms of the errors was similar, but the greater levels of noise of the UWB system with respect to the VICON is translated into more oscillations in the position. The 3D perspectives in Figure 4.4.4 show the smoothness of the system with the VICON with respect to the more oscillating trajectory with the UWB. 3D Trajectory 3D Trajectory 1.5 1 1.2 1 UWB VICON Reference 0.5 0 0.6 Y (m) Z (m) 0.8 UWB VICON Reference 0.4 0.2 -0.5 -1 0 -0.2 2 2 -1.5 1 1 0 0 -1 Y (m) -2 -1 -2 -1 X (m) -0.5 0 0.5 1 1.5 X (m) (a) Standard view. (b) XY Plane. Figure 4.4.4: Comparison of 3D Trajectory#1. As for the performance, the summary in Table 4.4.2 indicates that the overall performance with the VICON system is better, but nonetheless with the UWB system the 84 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS controller manages to follow the trajectory with RMS errors around 10 centimeters. RMS (ex ) [cm] RMS (ey ) [cm] %ξx %ξy VICON 9.16 7.55 73.69 86.39 UWB 10.22 7.82 63.44 79.85 Table 4.4.2: Error comparison while following Trajectory #1. • Trajectory #2 While following a second trajectory, similar in complexity as the first one, the results presented in Figure 4.4.5 illustrate the tracking capabilities of the LQT controller in both cases, despite the higher levels of noise when using the UWB system. The error plots compare the smooth lines in the VICON flight with the more oscillating ones of the UWB. X Position Y Position 2 2 1.5 1 Position (m) Position (m) 1 0.5 0 -0.5 0 -1 -1 -1.5 -2 5 10 15 20 25 30 35 40 5 10 20 25 30 35 40 30 35 40 Time (s) X Position Error Y Position Error 0.4 0.4 0.2 0.2 0 0 Error (m) Error (m) 15 UWB VICON Reference Time (s) -0.2 -0.4 -0.2 -0.4 -0.6 -0.6 5 10 15 20 25 30 35 40 5 Time (s) 10 15 20 25 Time (s) Figure 4.4.5: X-Y Position and error comparison when following Trajectory #2. The 3D perspectives in Figure 4.4.6 illustrate the trajectory followed by the quadcopter in both cases, and specially the X-Y plane view shows the main difference between the two flights: the smoothness and stability with which the quadcopter managed to follow the desired trajectory. 85 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS 3D Trajectory 3D Trajectory 2 UWB VICON Reference 1.5 1.2 1 1 0.5 Y (m) Z (m) 0.8 0.6 UWB VICON Reference 0.4 0.2 0 -0.5 -1 0 -0.2 2 2 -1.5 0 1 0 -1 -2 Y (m) -2 -2 -1.5 X (m) -1 -0.5 0 0.5 1 1.5 2 X (m) (a) Standard view. (b) XY Plane. Figure 4.4.6: Comparison of 3D Trajectory#2. Table 4.4.3 summarizes the performance in trajectory tracking. The UWB system incurred in a greater RMS error than the VICON, around 3.4cm more for the X position and 0.6cm for the Y position. The performance indices ξx and ξy were inferior while using the UWB system, but still close enough to be acceptable. RMS (ex ) [cm] RMS (ey ) [cm] %ξx %ξy VICON 7.71 9.50 82.08 73.17 UWB 11.16 10.15 71.04 70.32 Table 4.4.3: Error comparison while following Trajectory #2. • Trajectory #3 The third trajectory time plots and 3D path are exposed in figures Figures 4.4.7 and 4.4.8. A similar behavior as before is appreciated, both flights had some level of success in following the commanded trajectory, but the error plots suggests a greater noise in the position while using the UWB system. Nonetheless, the top view in Figure 4.4.8b illustrate the trajectory tracking capability in both flights. The position errors reflected in Table 4.4.4 suggest a similar performance in the X position, with a more pronounced discrepancy in the Y position, in both cases being the VICON was the more precise system. 86 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS X Position Y Position 1.5 1.5 1 0.5 0.5 Position (m) Position (m) 1 0 -0.5 -1 0 -0.5 -1 -1.5 -1.5 -2 5 10 15 20 25 30 35 40 5 Time (s) 10 15 X Position Error 25 30 35 40 30 35 40 Y Position Error 0.2 0.3 0.1 0.2 0 0.1 Error (m) Error (m) 20 Time (s) UWB VICON Reference -0.1 -0.2 -0.3 0 -0.1 -0.2 -0.4 -0.3 5 10 15 20 25 30 35 40 5 10 15 Time (s) 20 25 Time (s) Figure 4.4.7: X-Y Position and error comparison when following Trajectory #3. 3D Trajectory 3D Trajectory 1.5 1 1.2 UWB VICON Reference 1 0.5 0 0.6 Y (m) Z (m) 0.8 0.4 UWB VICON Reference 0.2 -1 0 -0.2 2 -1.5 2 1 -0.5 1 0 0 -1 Y (m) -1 -2 -2 -2 -1.5 X (m) -1 -0.5 0 0.5 1 1.5 X (m) (a) Standard view. (b) XY Plane. Figure 4.4.8: Comparison of 3D Trajectory#3. RMS (ex ) [cm] RMS (ey ) [cm] %ξx %ξy VICON 7.56 7.29 84.69 83.00 UWB 9.43 8.11 74.68 78.66 Table 4.4.4: Error comparison while following Trajectory #3. The experimental data confirms the robustness of the control system while using a positioning system with around 100 times greater standard deviation noise than the initial 87 CHAPTER 4. HARDWARE IMPLEMENTATION AND EXPERIMENTAL RESULTS system. The tuning of the Kalman Filter to adapt to this new source of noise was vital to ensure a good compromise between filtering and precision in the estimations. Even though there is a clear advantage on using more precise technology, such as the VICON, the system could still track the desired trajectories with an acceptable degree of precision while using a more cheaper system such as the UWB. The fact that the position integral gains for the X and Y positions had to be lowered while using the UWB system, was a necessary compromise to ensure less oscillations while following the desired trajectory. Such a compromise did not arise while using the VICON system, with which the quadcopter remained stable and followed smoothly the trajectories for a wide range of gain values. If the control system could only use the UWB system, then a more detailed study of how to compensate the different sources of noise and biases should be made. For instance, the UWB system looses precision when the tag is close to one of the anchors, or if the tag is facing away from one of the anchors. All this subtleties, if taken in account while designing the control system, could lead to a better performance than the one obtained and presented in this work. Finally, the video found in [38] shows a summary of the project’s simulation and experimental results. 88 Chapter 5 Conclusions and Future Work The study was set out to explore the dynamics of an open source nanoquadcopter named Crazyflie 2.0, as well as creating a simulation environment for control design and then testing it in the real platform. This type of unmanned aerial vehicles is becoming the preferred platform for testing control algorithms of diverse natures, thus the inherent importance of conceiving a mathematical model of the vehicle that can predict, up to some extent, how the system will evolve over time. Hence, the project started by a modeling of the nanoquadcopter and an identification of certain physical parameters, based in previous work. Working in parallel with the literature and the quadcopter’s embedded firmware was the main key in describing the system behavior just as it is in the real platform, an important milestone for future work as the dynamics of a system is the heart of every simulation environment. The second phase of the project was building the simulation that served as the first testbench of the control architectures proposed. Using both the non-linear dynamics and the linearised state space realisation of the system, the simulation created is a solid testing environment to conceive all types of control systems. It was incredibly useful during the first stages of the project to get a better understanding of how the system worked. In addition, the simulation was used for designing both the PID position controller and the LQT trajectory tracker. An important conclusion is that the initial belief that all dynamics were decoupled as suggested during the linear modeling was not entirely true in the non-linear system. As observed in the simulations, there exists some interference between movements that, for instance, does not allow the quadcopter to describe a perfectly straight line trajectory 89 CHAPTER 5. CONCLUSIONS AND FUTURE WORK when there are more than one movement involved (a yaw rotation for example). The position PID tracker was tested for time-varying trajectories, such as circles and helices. Even though the system could described these trajectories, there were some drawbacks and performance issues, for example not getting fast enough to the desired points which lead to errors in the desired trajectory. The fact that the task at hand was managed by a position tracker and not a trajectory tracker was the main reason of these discrepancies. To address the deficiencies of the PID controller, a new control system was conceived using the LQT algorithm, which proved to have interesting characteristics while following step responses, mainly that it started moving before the command was asked in order to reduce the tracking error. The feature was possible thanks to the off-line calculation of the algorithm and the knowledge of the trajectory beforehand. The comparisons between the PID and the LQT controller indicate a clear superiority of the LQT in terms of reducing the trajectory tracking error, specially in the more demanding trajectories, in which the LQT algorithm reduced up to 4 times the RMS errors obtained with the PID controller. Directly related to the better tracking, the LQT incurred in higher levels of control effort than the PID, but it also eliminated the great command peaks seen in the motor time plots of the PID, thus getting rid of the undesired motor saturations that could lead to unstable states. There are two main drawbacks of the LQT algorithm with respect to the PID: the first one is the inability to specify trajectories for the heading (yaw angle) and the second one is the need to know the trajectory before its execution. Taking in account these shortcomings, it is proposed as future work for this research to incorporate a method to control the yaw angle while keeping the good performance in the LQT algorithm, the author proposes a gain-scheduling method being the yaw angle the scheduling variable as a possible solution for this problem. As for the second drawback of the LQT algorithm, more research should be directed towards an on-line implementation thus making the controller useful in more complex tasks such as planning and execution missions in real-time. The GUI created for trajectory generation proved to be a valuable asset to quickly test different types of trajectories, with varying difficulty. But the tool can be improved by 90 CHAPTER 5. CONCLUSIONS AND FUTURE WORK adding physical constraints to the trajectory generation, as to assure the trajectory is feasible for the quadcopter to follow. Future work in this area should explore feasible trajectory generation as proposed in works such as [25]. The simulation versus experimental comparative time plots show that the simulation environment developed in this project was accurate to some extent, serving its purpose as a useful design tool for the controllers synthesized, but it had its limitations mainly due to unmodeled phenomena, which lead to the need of introducing high integral gains in the controllers to compensate the model errors and other perturbations of the system. As future work, it is suggested a more thorough model identification for the quadcopter, for example using numerical methods such as the closed-loop "black box" identification proposed in [11]. The Kalman Filter approach for estimating the linear velocities from the position data proved to be successful using both the VICON and the UWB, specially with the latter in which the data had 100 times greater standard deviation noise. The VICON versus UWB experiments suggest that in both cases the LQT tracked the desired position, but with obvious different levels of smoothness and precision. Even though both performances were satisfactory in terms of the scope of this work, future research into improving the control system while using the UWB position system would be ideal. Starting from an identification of different sources of added noise and biases of the UWB system, upto different filtering techniques that are more appropriate than the classic Kalman filter proposed in this project are the author’s recommendations to improve the control system performance. This work represents a solid base for future research using this platform, with enough explanation in the calculus for newcomers in the area to understand the basic functioning of the system. The simulation environment was developed in a fashion that corresponds exactly with the equations shown in the mathematical model, which helps in the quick understanding of how everything works and saves time in comprehending an otherwise complex system, plus it is easily customizable for future users to develop their own controllers. The project successfully fulfilled its ultimate goal of characterizing the provided quadcopter platform and doing all the steps needed to develop an efficient control system for trajectory tracking. 91 Bibliography [1] Hanna, W. (2014). Modelling and control of an unmanned aerial vehicle (B.Eng Thesis, Charles Darwin University). [2] Subramanian, G. P. (2015). Nonlinear control strategies for quadrotors and CubeSats (M.S. Thesis, University of Illinois at Urbana-Champaign). [3] Greitzer, E. M., Spakovszky, Z. S., & Waitz, I. A. (2006). Thermodynamics and propulsion. Mechanical Engineering, MIT. [4] Corke, P. (2011). Robotics, vision and control: fundamental algorithms in MATLAB (Vol. 73). Springer. [5] Hartman, D., Landis, K., Mehrer, M., Moreno, S., & Kim, J.(2014) Quadcopter Dynamic Modeling and Simulation (Quadsim) v1.00 (Senior Design project, Drexel University) [6] Hoenig, W., Milanes, C., Scaria, L., Phan, T., Bolas, M., & Ayanian, N. (2015). Mixed reality for robotics. In Intelligent Robots and Systems (IROS), 2015 IEEE/RSJ International Conference on (pp. 5382-5387). IEEE [7] Elruby, A. Y., El-Khatib, M. M., El-Amary, N. H., & Hashad, A. I. (2012). Dynamic modeling and control of quadrotor vehicle. In Fifteenth International Conference on Applied Mechanics and Mechanical Engineering, AMME (Vol. 15). [8] Karwoski, K. (2011). Quadrocopter Control Design and Flight Operation. (Internship Final Report, NASA USRP) [9] Sonnevend, I. (2010). Analysis and model based control of a quadrotor helicopter. (BSc Diploma work, Péter Pázmány Catholic University, Faculty of Information Technology, Budapest, Hungary (supervisor: G. Szederkényi) ) [10] Habib, M. K., Abdelaal, W. G. A., & Saad, M. S. (2014). Dynamic modeling and control of a Quadrotor using linear and nonlinear approaches. (M.S. Thesis, The American University in Cairo). [11] Landry, B. (2015). Planning and control for quadrotor flight through cluttered environments (Master’s Degree Thesis, Massachusetts Institute of Technology). [12] Dunkley, O., Engel, J., Sturm, J., & Cremers, D. (2014). Visual-inertial navigation for a camera-equipped 25g nano-quadrotor. In IROS2014 Aerial Open Source Robotics Workshop. [13] Xu, D., Wang, L., Li, G., & Guo, L. (2012, August). Modeling and Trajectory Tracking Control of a Quad-rotor UAV. In Proceedings of the 2012 International Conference on Computer Application and System Modeling. Atlantis Press. 92 [14] Meyer, J., Sendobry, A., Kohlbrecher, S., Klingauf, U., & Von Stryk, O. (2012). Comprehensive simulation of quadrotor uavs using ros and gazebo. In Simulation, Modeling, and Programming for Autonomous Robots (pp. 400-411). Springer Berlin Heidelberg. [15] Suiçmez, E. C. (2014). Trajectory Tracking of a quadrotor unmanned aerial vehicle (UAV) via attitude and position control (Master’s Degree Thesis, Middle East Technical University). [16] Oh, S. M. (2012). Modeling and Control of a Quad-rotor Helicopter. (M.S. Thesis, University of Florida) [17] Pounds, P. E. I. (2007). Design, construction and control of a large quadrotor micro air vehicle. (Doctoral dissertation, Australian National University.) [18] Tamami, N., Pitowarno, E., & Astawa, I. G. P. (2014). Proportional Derivative Active Force Control for “X” Configuration Quadcopter. Journal of Mechatronics, Electrical Power, and Vehicular Technology, 5(2), 67-74. [19] Roo, M. (2015). Optimal Event Handling by Multiple UAVs. (M.S. Report, University of Twente) [20] Lehnert, C., & Corke, P. (2013). µAV-Design and implementation of an open source micro quadrotor. AC on Robotics and Automation, Eds. [21] Sabatino, F.(2015). Quadrotor control: modeling, nonlinear control design, and simulation. (Master’s Degree Project, KTH Royal Institute of Technology). [22] Kader, S. A., El-henawy, A. E., & Oda, A. N. (2014). Quadcopter System Modeling and Autopilot Synthesis. In International Journal of Engineering Research and Technology (Vol. 3, No. 11 (November-2014)). ESRSA Publications. [23] Naidu, D. S. (2002).Optimal control systems. CRC press. [24] Mathworks®(2015).State Estimation Using Time-Varying Kalman Filter. Retrieved May 16, 2016, from http://www.mathworks.com/help/control/getstart/estimating-states-of-timevarying-systems-using-kalman-filters.html [25] Hoffmann, G. M., Waslander, S. L., & Tomlin, C. J. (2008).Quadrotor helicopter trajectory tracking control. In AIAA guidance, navigation and control conference and exhibit (pp. 1-14). [26] Mueller, M. W., & D’Andrea, R. (2013).A model predictive controller for quadrocopter state interception. In European Control Conference (pp. 1383-1389). [27] Mu, S., Zeng, Y., & Wu, P. (2008).Multivariable control of anaerobic reactor by using external recirculation and bypass ratio. Journal of chemical technology and biotechnology, 83(6), 892-903. [28] Huang, H., Hoffmann, G. M., Waslander, S. L., & Tomlin, C. J. (2009).Aerodynamics and control of autonomous quadrotor helicopters in aggressive maneuvering. In Robotics and Automation, 2009. ICRA’09. IEEE International Conference on (pp. 3277-3282). IEEE. [29] Sujit, P. B., Saripalli, S., & Sousa, J. B. (2014).Unmanned aerial vehicle path following: A survey and analysis of algorithms for fixed-wing unmanned aerial vehicles. IEEE Control Systems, 34(1), 42-59. 93 [30] Bouabdallah, S., Noth, A., & Siegwart, R. (2004).PID vs LQ control techniques applied to an indoor micro quadrotor. In Intelligent Robots and Systems, 2004.(IROS 2004). Proceedings. 2004 IEEE/RSJ International Conference on (Vol. 3, pp. 24512456). IEEE. [31] Peraire, J., & Widnall, S. (2009) Lecture L28 - 3D Rigid Body Dynamics. MIT OpenCourseWare, Dynamics Fall 2009. Available online: http://ocw.mit.edu. [32] Bitcraze®(2015). Crazyflie 2.0 assembly instructions. Retrieved August 3, 2016, from https://wiki.bitcraze.io/projects:crazyflie2:userguide:assembly [33] Bitcraze®(2015). Crazyflie 2.0 Main Page. Retrieved August 5, 2016. from https://www.bitcraze.io/crazyflie-2/ [34] ©Vicon Motion Systems (2015). VICON Motion Capture System Main Page. Retrieved August 5, from https://www.vicon.com/ [35] Mueller, M. W., Hamer, M., & D’Andrea, R. (2015). Fusing ultra-wideband range measurements with accelerometers and rate gyroscopes for quadrocopter state estimation. In 2015 IEEE International Conference on Robotics and Automation (ICRA) (pp. 1730-1736). IEEE. [36] Rafrafi, W., & Le Ny, J. (2016). Intégration d’un système radio à bande ultra-large pour la navigation de robots mobiles. (Master’s Degree Thesis, École Polytechnique de Montréal). [37] ©decaWave(2015). ScenSor DWM1000 Module Product Page. Retrieved August 11, from http://www.decawave.com/products/dwm1000-module [38] Luis, C. (2016). Trajectory Tracking of a Crazyflie 2.0 Nanoquadcopter [Video File]. Retrieved August 13, from https://youtu.be/c-SXovCyhJQ 94 Appendix A: Firmware Modifications The firmware used during this project was “Release 2016.02” found in https://github. com/bitcraze/crazyflie-release/releases, with the following changes: • power_distribution_stock.c lines 58-64 # ifdef QUAD_FORMATION_X i n t 1 6 _ t r = c o n t r o l −> r o l l / 2 . 0 f ; i n t 1 6 _ t p = c o n t r o l −>p i t c h / 2 . 0 f ; motorPower . m1 = l i m i t T h r u s t ( c o n t r o l −>t h r u s t motorPower . m2 = l i m i t T h r u s t ( c o n t r o l −>t h r u s t motorPower . m3 = l i m i t T h r u s t ( c o n t r o l −>t h r u s t motorPower . m4 = l i m i t T h r u s t ( c o n t r o l −>t h r u s t − − + + r r r r − + + − p p p p − + − + c o n t r o l −>yaw ) ; c o n t r o l −>yaw ) ; c o n t r o l −>yaw ) ; c o n t r o l −>yaw ) ; • controller_pid.c lines 64-84 a t t i t u d e C o n t r o l l e r C o r r e c t A t t i t u d e P I D ( s t a t e −>a t t i t u d e . r o l l , −s t a t e −>a t t i t u d e . p i t c h , s t a t e −>a t t i t u d e . yaw , s e t p o i n t −>a t t i t u d e . r o l l , s e t p o i n t −>a t t i t u d e . p i t c h , a t t i t u d e D e s i r e d . yaw , &r a t e D e s i r e d . r o l l , &r a t e D e s i r e d . p i t c h , &r a t e D e s i r e d . yaw ) ; // Bypass A t t i t u d e c o n t r o l l e r if Rate mode active i f ( s e t p o i n t −>mode . r o l l == m o d e V e l o c i t y ) { r a t e D e s i r e d . r o l l = s e t p o i n t −>a t t i t u d e R a t e . r o l l ; } i f ( s e t p o i n t −>mode . p i t c h == m o d e V e l o c i t y ) { r a t e D e s i r e d . p i t c h = s e t p o i n t −>a t t i t u d e R a t e . p i t c h ; } i f ( s e t p o i n t −>mode . yaw == m o d e V e l o c i t y ) { r a t e D e s i r e d . yaw = s e t p o i n t −>a t t i t u d e R a t e . yaw ; } a t t i t u d e C o n t r o l l e r C o r r e c t R a t e P I D ( s e n s o r s −>g y r o . x , s e n s o r s −>g y r o . y , s e n s o r s −>g y r o . z , r a t e D e s i r e d . r o l l , r a t e D e s i r e d . p i t c h , r a t e D e s i r e d . yaw ) ; a t t i t u d e C o n t r o l l e r G e t A c t u a t o r O u t p u t (& c o n t r o l −>r o l l , &c o n t r o l −>p i t c h , &c o n t r o l −>yaw ) ; 95
3cs.SY
BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE arXiv:1801.09852v3 [math.AC] 9 Mar 2018 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN 1. Introduction The purpose of this paper is to prove that certain limits of polynomial rings are themselves polynomial rings, and show how this observation can be used to deduce some interesting results in commutative algebra. In particular, we give two new proofs of Stillman’s conjecture. The first is similar to that of Ananyan–Hochster [AH16], though more streamlined; in particular, it establishes the existence of small subalgebras. The second proof is completely different, and relies on a recent noetherianity result of Draisma [Dra17]. 1.1. Polynomiality results. For a commutative ring A, let AJJx1 , x2 , . . .KK be the inverse limit of the standard-graded polynomial rings A[x1 , . . . , xn ] in the category of graded rings. A degree d element of this ring is a (possibly infinite) formal A-linear combination of degree d monomials in the variables {xi }i≥1 . Fix a field k, and let R = kJJx1 , x2 , . . .KK. Our first polynomiality theorem is: Theorem 1.1. Assume k is perfect. Then R is (isomorphic to) a polynomial ring. The set of variables in the polynomial ring is uncountable; hence the phrase “big polynomial rings” in the title of the paper. We deduce Theorem 1.1 from the following general criterion. For a graded ring1 R, we write R+ for the ideal of positive degree elements. Theorem 1.2. Let R be a graded ring with R0 = k a perfect field. Assume: • Characteristic 0: R has enough derivations (Definition 2.1), that is, for every nonzero x ∈ R+ there is a derivation ∂ of negative degree such that ∂(x) 6= 0. • Positive characteristic: R has enough Hasse derivations (see Definition 2.10). Then R is a polynomial ring. Precisely, for any set of positive degree homogeneous elements 2 {fi }i∈I whose images in R+ /R+ form a k-basis, the k-algebra homomorphism k[Xi ]i∈I → R taking Xi to fi is an isomorphism. The proof of Theorem 1.2 is elementary: essentially, if one had an algebraic relation among some of the fi , then one could apply an appropriate (Hasse) derivation to get a lower degree relation, and eventually reach a contradiction. To prove Theorem 1.1, we simply observe that (Hasse) derivatives with respect to the variables xi extend continuously to R and furnish it with enough (Hasse) derivations. The inverse limit R is one way to make sense of a limit of finite polynomial rings. A different way is through the use of ultrapowers, or, more generally, ultraproducts (see §4.1 Date: March 9, 2018. 2010 Mathematics Subject Classification. 13A02, 13D02. DE was partially supported by NSF DMS-1302057 and NSF DMS-1601619. SS was partially supported by NSF DMS-1500069 and DMS-1651327 and a Sloan Fellowship. AS was supported by NSF DMS-1303082 and DMS-1453893 and a Sloan Fellowship. 1In this paper, all graded rings are supported in non-negative degrees. 1 2 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN for background). Let S be the graded ultrapower of the standard-graded polynomial ring k[x1 , x2 , . . .]. We also prove: Theorem 1.3. Assume k is perfect. Then S is a polynomial ring. This also follows quickly from Theorem 1.2. The perfectness hypotheses in this section can be relaxed; for instance, Theorems 1.1 and 1.3 hold if [k : kp ] is finite, see Remarks 2.12 and 5.4. However, we do not know if they can be eliminated entirely. 1.2. Connection to the work of Ananyan–Hochster. We recall (and slightly extend) the notion of strength from [AH16]: Definition 1.4. Let R be a graded ring with R0 = k a field, and let f be a homogeneous element of R.P The strength of f is the minimal integer k ≥ −1 for which there is a decomposition f = k+1 i=1 gi hi with gi and hi homogeneous elements of R of positive degree, or ∞ if no such decomposition exists. The collective strength of a set of homogeneous elements {fi }i∈I of R is the minimal strength of a non-trivial homogeneous k-linear combination.  Example 1.5. (a) In k[x1 , . . . , xn ], non-zero elements of degree one have infinite strength, while non-zero elements of degree > 1 have strength < n. P (b) In R, there are a wealth of interesting elements of infinite strength, such as i≥1 xdi (if d is invertible in k). 2 (c) In any graded ring R, the ideal R+ is exactly the ideal of finite strength elements.  Many of the results of Ananyan–Hochster are instances of the following general principle: elements in a polynomial ring of sufficiently large collective strength behave approximately like independent variables. Theorem 1.1 shows that this approximation becomes exact in the limiting ring R. Indeed, suppose {fi }i∈I are elements of R+ that form a basis modulo R2+ . Thus no linear combination of the fi belongs to R2+ , i.e., has finite strength (Example 1.5(c)), and so {fi } has infinite collective strength. The Ananyan–Hochster principle thus suggests that the {fi } should be independent variables, and this is exactly the content of Theorem 1.1. 1.3. Stillman’s conjecture via ultraproducts. While ultraproducts may be less familiar to readers than inverse limits, Theorem 1.3 leads to our most efficient proof of Stillman’s conjecture [PS09, Problem 3.14]. As in [AH16] (see §4.3), both the existence of small subalgebras and Stillman’s conjecture can be reduced to the following statement: Theorem 1.6. Fix integers d1 , . . . , dr . Then there exists an integer N with the following property. If k is an infinite perfect field, and f1 , . . . , fr ∈ k[x1 , . . . , xn ] are polynomials of degrees d1 , . . . , dr with collective strength at least N, then f1 , . . . , fr is a regular sequence. Ananyan–Hochster prove this theorem via a multi-tiered induction, where elements of increasingly high strength obtain an array of increasingly nice properties. Our proof using Theorem 1.3 is more direct. Here is the idea. Suppose that f1,i , . . . , fr,i ∈ k[x1 , x2 , . . . ], for i ∈ N, are polynomials of the given degrees with collective strength tending to infinity. It suffices to show that f1,i , . . . , fr,i eventually forms a regular sequence. For each j, the sequence fj,• defines an element fj in the ultraproduct ring S. It is easy to see that f1 , . . . , fr has infinite collective strength (Proposition 4.5). Thus, by Theorem 1.3, f1 , . . . , fr are independent variables in S, and hence form a regular sequence. We then apply a result (Corollary 4.9) comparing codimension in S to codimension in k[x1 , x2 , . . .] to conclude that f1,i , . . . , fr,i is eventually a regular sequence. BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 3 As in [AH16], we show that the bound in Theorem 1.6 (and Stillman’s conjecture as well) is independent of the field k. To do so, we prove a generalization of Theorem 1.3 (see §4.2) where S is replaced with an ultraproduct of polynomial rings with variable coefficient fields. 1.4. Stillman’s conjecture via inverse limits. Returning to the inverse limit, Theorem 1.1 enables a proof of Stillman’s conjecture that follows the very general rubric in algebraic geometry of proving a result generically, spreading out to an open set, and then inductively treating proper closed subsets. The basic idea in characteristic zero is as follows. Suppose that A is a characteristic 0 domain with fraction field K, and M is a finitely presented AJJx1 , x2 , . . .KK-module. Then K ⊗A M is a finitely presented module over the ring K ⊗A AJJx1 , x2 , . . .KK. While K ⊗A AJJx1 , x2 , . . .KK is not isomorphic to KJJx1 , x2 , . . .KK, Theorem 1.2 shows it is also an abstract polynomial ring. It then follows from simple homological properties of infinite polynomial rings that K ⊗A M has a finite length resolution by finite free modules. A flatness argument produces an open dense subset U of Spec(A) such that My has the same Betti table as K ⊗A M for all y ∈ U. We can then restrict our attention to Spec(A)\U, and apply the same argument. This shows that there is some (perhaps infinite) stratification of Spec(A) such that on each stratum the fibers of M have the same Betti table. We apply this as follows. Fix positive integers d1 , . . . , dr , and let A be the symmetric algebra on the vector space Symd1 (k∞ ) ⊕ · · · ⊕ Symdr (k∞ ). Then Spec(A) is the space of forms f1 , . . . , fr ∈ kJJx1 , x2 , . . .KK of degrees d1 , . . . , dr . We let M be the universal module AJJx1 , x2 , . . .KK/(f1 , . . . , fr ). The stratification constructed in the previous paragraph can be made compatible with the GL∞ action on Spec(A). A recent theorem of Draisma [Dra17] asserts that Spec(A) is GL∞ -noetherian, and hence this stratification is finite. We conclude that there are only finitely many resolution types for ideals generated by f1 , . . . , fr of the given degrees. This, in particular, implies Stillman’s conjecture in characteristic zero. The same idea works in positive characteristic, but when K fails to be perfect, we need to bootstrap from the perfect case to produce the open subset with constant Betti numbers. 1.5. Connections to other work. The Milnor–Moore theorem [MM65], and generalizations [Sjö80], establish that certain commutative graded rings are polynomial rings via properties of a comultiplication. While this, and its extensions to non-commutative rings, can be applied to examples in commutative algebra, it is of a fairly distinct nature from the criteria in the present paper. Theorem 1.1 is an example of the meta-principle that inverse limits of free objects tend to be free themselves. See [Ser97, §I.4.2, Corollary 4] for an example of this principle with prop-groups. Alexandru Chirvasitu informed us that he can prove a non-commutative version of Theorem 1.1 where polynomial rings are replaced by non-commutative polynomial rings. The use of ultraproducts in commutative algebra was famously employed in [vdDS84] to establish a variety of bounds (with the number of variables fixed). See [Sch10] for more discussion and examples. The Gröbner theory of the inverse limit ring kJJx1 , x2 , . . .KK was studied by Snellman in [Sne98b, Sne98a]. Shortly after a draft of this article was posted, [DLL18] applied Theorem 1.1 to obtain finiteness results for grevlex Gröbner bases over R, and then used this to answer some questions raised by Snellman and to give a generic initial ideal proof of Stillman’s Conjecture. 4 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN The use of GL∞ -noetherianity of spaces to prove the existence of uniform bounds in algebraic geometry has been used in several papers. See [Dra14] for a survey. 1.6. Outline. In §2, we establish our polynomiality criteria (summarized in Theorem 1.2). In §3, we prove some easy results concerning dimension theory in polynomial rings with an infinite number of variables. In §4, we prove that the ultraproduct ring is a polynomial ring (Theorem 1.3), and use this to deduce our first proof of Stillman’s conjecture. Finally, in §5, we prove that the inverse limit ring is a polynomial ring (Theorem 1.1), and use this to deduce our second proof of Stillman’s conjecture. Acknowledgements. We thank Craig Huneke and Gregory G. Smith for useful conversations. We also thank Alexandru Chirvasitu for informing us about his work on the noncommutative analogue of Theorem 1.1 and the reference in [Ser97]. 2. Criteria for polynomiality Let R be a graded ring with R0 = k a field. We say that R is a polynomial ring if there are elements {xi }i∈I of R, each homogeneous of positive degree, such that the natural map k[Xi ] → R sending Xi to xi is an isomorphism. The xi ’s need not have degree 1, and the set I need not be finite. The purpose of this section is to characterize polynomial rings via derivations. 2.1. Characteristic 0. We first treat the case where k has characteristic 0, for which the following definition and theorem constitute our criterion for polynomiality. We say that a derivation ∂ of a graded ring R is homogeneous of degree d if deg ∂(x) = deg(x) + d for all homogeneous x ∈ R. Definition 2.1. Let R be a graded ring with R0 = k a field. We say that R has enough derivations if for every non-zero homogeneous element x of positive degree there is a homogeneous derivation ∂ of negative degree such that ∂(x) 6= 0.  Theorem 2.2. Let R be a graded k-algebra with R0 = k a field of characteristic 0. Then R is a polynomial ring if and only if R has enough derivations. Proof. In this proof, “derivation” will mean “homogeneous derivation of negative degree.” It is clear that a polynomial ring has enough derivations. We prove the converse. 2 Let E be a set of homogeneous elements of R+ that gives a basis of R+ /R+ . By Nakayama’s lemma, E generates R as a k-algebra, so it suffices to show that E is algebraically independent. Let E≤d (resp. Ed ) be the set of elements in E of degree ≤ d (resp. d). We prove that E≤d is algebraically independent for all d by induction on d. Suppose that we have shown E≤d−1 is algebraically independent. To prove that E≤d is algebraically independent, it suffices to prove the following statement: if E≤d−1 ⊂ E ⊂ E≤d is algebraically independent and x ∈ Ed \ E, then E ′ = E ∪ {x} is algebraically independent. Indeed, this statement implies that all sets of the form E≤d−1 ∪ E ′′ with E ′′ a finite subset of Ed are algebraically independent, which implies that E≤d is algebraically independent. Thus let E, E ′ , and x as above be given. Let A ⊂ R be the k-subalgebra generated by E. Pn ′ i To prove that E is algebraically independent, it suffices to show that if 0 = i=0 ai x with ai ∈ A then ai = 0 for all i. Before proceeding, we note that if ∂ is any derivation of R then ∂(E≤d ) ⊂ A since ∂ decreases degrees, and so ∂(A) ⊂ A and ∂(x) ∈ A. BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 5 P Suppose that 0 = ni=0 ai xi with ai ∈ A and an 6= 0. Of all such relations, choose one of minimal degree (i.e., with deg(an xn ) minimal). Suppose that an has positive degree. By assumption, there exists a derivation ∂ such that ∂(an ) 6= 0. Applying ∂ to our given relation Pn−1 i yields 0 = ∂(an )xn + i=0 bi x where the bi are elements of A. This is a contradiction, since ∂(an ) has smaller degree than an . Thus deg(an ) = 0, and so we may assume an = 1. 2 Since E is linearly independent modulo R+ , we see that x ∈ / A, and so n ≥ 2 and nx+ an−1 is non-zero. It follows that there exists a derivation ∂ such that + an−1 ) 6= 0. Applying Pn−2 ∂(nx i n−1 This is a ∂ to our original relation gives 0 = ∂(nx + an−1 )x + i=0 bi x for some bi ∈ A. P smaller degree relation, which is a contradiction. We thus see that no relation 0 = ni=0 ai xi exists with an non-zero, which completes the proof.  2.2. Positive characteristic. Theorem 2.2 obviously fails in characteristic p: since pth powers are killed by every derivation, no reduced ring has enough derivations. The most obvious adjustment would be to ask that if x is a homogeneous element of R that is not a pth power then there is a derivation ∂ such that ∂(x) 6= 0. The following two examples show that this condition is insufficient to conclude that R is a polynomial ring. Example 2.3. Let R = k[x]/(xp ) where k is perfect of characteristic p and x has degree 1. d Then dx is a well-defined derivation on R, and thus R has enough derivations.  Example 2.4. Let R = k[x, y, xyp ] where k is perfect of characteristic p, x has degree 1, d d and y has degree p + 1. Then dx and xp dy are well-defined derivations on R, and every homogeneous element of R that is not a pth power is not annihilated by one of them.  To extend our criterion to the positive characteristic case, we employ the following extension of the notion of a derivation (see [Gol03, pp. 27–29] for additional discussion). Definition 2.5. Let R be a k-algebra. A Hasse derivation on R is a sequence ∂ • = (∂ n )n≥0 where each ∂ n is a k-linear endomorphism of R such that ∂ 0 is the identity and X ∂ n (xy) = ∂ i (x)∂ j (y) i+j=n holds for all x, y ∈ R. If R is graded then we say ∂ • is homogeneous of degree d if ∂ n (x) has degree deg(x) + nd for all homogeneous x ∈ R.  Remark 2.6. Giving a Hasse derivation on R is equivalent to giving a ring homomorphism ϕ : R → RJtK such that the constant term of ϕ(x) is P x. If ∂ • is a Hasse derivation, then the associated ring homomorphism is defined by ϕ(x) = i≥0 ∂ i (x)ti .   Example 2.7. Suppose R = k[x], with k any field. Define ∂ n (xk ) = nk xk−n . (Note dn • that ∂ n = n!1 dx is a Hasse derivation, called the Hasse n if n! is invertible in k.) Then ∂ derivative. If R is graded with x of degree d then ∂ • is homogeneous of degree −d. The homomorphism ϕ : R → RJtK associated to the Hasse derivative is given by x 7→ x + t.  Remark 2.8. Curiously, Hasse derivatives also play a key role in Draisma’s [Dra17], where they are closely related to his directional derivatives.  Lemma 2.9. Let R be a k-algebra, where k is a field of characteristic p, and let ∂ • be a Hasse derivation on R. Let q be a power of p. Then for x ∈ R and n ∈ N we have ( (∂ n/q x)q if q | n ∂ n (xq ) = . 0 if q ∤ n 6 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN Proof. We have ∂ n (xq ) = X ∂ i1 (x) · · · ∂ iq (x). (i1 ,...,iq ) i1 +···+iq =n If i1 , . . . , iq are not all equal then the orbit of (i1 , . . . , iq ) under the symmetric group Sq has cardinality divisible by p. All elements of this orbit contribute equally to the sum, and thus they all cancel. We thus see that the only surviving term occurs when n is a multiple of q and i1 = · · · = iq = n/q; this term is (∂ n/q x)q .  The following definition and theorem constitute our criterion for polynomiality in positive characteristic. Definition 2.10. Let R be a graded ring with R0 = k a field of characteristic p > 0. We say that R has enough Hasse derivations if the following condition holds: if x is a positive degree homogeneous element of R such that x 6∈ kRp (the k-span of the set Rp ) then there exists a homogeneous Hasse derivation ∂ • of R of negative degree such that ∂ 1 (x) 6= 0.  Theorem 2.11. Let R be a graded ring with R0 = k a perfect field of characteristic p > 0. Then R is a polynomial ring if and only if it has enough Hasse derivations. Proof. In this proof, “Hasse derivation” will mean “homogeneous Hasse derivation of negative degree.” We note that since k is perfect, kRp = Rp . If R is a polynomial ring then it has enough Hasse derivations; one can see this using Hasse derivatives (Example 2.7). We now prove the converse. We first show that R is reduced. Suppose not, and let x ∈ R be a non-zero homogeneous nilpotent element of minimal degree. Note that x 6∈ Rp , for if x = y p then y would be a r lower degree nilpotent element. Let r be such that xp = 0 and let ∂ • be a Hasse derivation r r r such that ∂ 1 (x) 6= 0. Then 0 = ∂ p (xp ) = (∂ 1 x)p (Lemma 2.9), and so ∂ 1 (x) is nilpotent, contradicting the minimality of x. Thus R is reduced. 2 Let E be a set of homogeneous elements of R+ that forms a basis for R+ /R+ . It suffices to prove that E is algebraically independent. For E ⊂ E, consider the following statement: AE : Given distinct elements x1 , . . . , xr ∈ E and a polynomial F ∈ k[X1 , . . . , Xr ] such that F (x1 , . . . , xr ) ∈ Rp , we have F ∈ k[X1 , . . . , Xr ]p . Observe that if AE holds then E is algebraically independent. Indeed, suppose that F (x1 , . . . , xr ) = 0 is a minimal degree algebraic relation among distinct elements of E. Since 0 ∈ Rp , we see that F (X1 , . . . , Xr ) = G(X1 , . . . , Xr )p for some G by AE , and so G(x1 , . . . , xr )p = 0. Since R is reduced, it follows that G(x1 , . . . , xr ) = 0, contradicting the minimality of F . Thus to prove the theorem it suffices to prove AE . We prove that AE holds for all E by induction on E in the following manner. Let E≤d (resp. Ed ) be the set of elements of E of degree ≤ d (resp. d). Suppose that E≤d−1 ⊂ E ⊂ E≤d and let E ′ = E ∪ {x} for some x ∈ Ed \ E. Assuming AE , we prove AE ′ . This will establish AE for all E by the same logic used in the proof of Theorem 2.2. Fix E, E ′ , and x as above. Let A be the k-subalgebra of R generated by E. We claim that AE ′ can be reduced to the following statement, for all n and m: P Bn,m : If ni=0 ai xi ∈ Rp with ai ∈ A and deg(an ) ≤ m then ai ∈ Rp and iai = 0 for all i. Indeed, suppose Bn,m holds for all n and m, and suppose F (x1 , . . . , xr ) ∈ Rp for distinct elements x1 , . . . , xrP ∈ E ′ . We may as well suppose xr = x and x1 , . . . , xr−1 ∈ E. Write n i By Bn,m , we see that F (X1 , . . . , Xr ) = i=0 Gi (X1 , . . . , Xr−1 )Xr for polynomials Gi . BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 7 Gi (x1 , . . . , xr−1 ) ∈ Rp for all i and Gi (x1 , . . . , xr−1 ) = 0 if p ∤ i. By AE , it follows that Gi (X1 , . . . , Xr−1 ) = G′i (X1 , . . . , Xr−1 )p for some polynomial G′i and that Gi (X1 , . . . , Xr ) = 0 if p ∤ i. We thus find  X p ′ i/p F (X1 , . . . , Xr ) = Gi/p (X1 , . . . , Xr−1 )Xr , 0≤i≤n p|i which establishes AE ′ . We now prove Bn,m P by induction on n and m. Clearly, B0,m holds for all m. We note that if Bn,m holds and ni=0 ai xi = 0 with deg(an ) ≤ m then ai = 0 for all i; the proof is the same as the proof given above that AE implies algebraic independence of E. We also note that if ∂ • is any Hasse derivation then ∂ n (E≤d ) ⊂ A for all n > 0, and so ∂ n (A) ⊂ A and ∂ n (x) ∈ A. We now prove B1,m for all m by induction on m. First suppose m = 0, and suppose that 2 ax + b ∈ Rp with a ∈ k and b ∈ A. We thus see that ax + b = 0 in R+ /R+ . Since E is linearly 2 independent in R+ /R+ , it follows that a = 0, and so B1,0 holds. Now suppose B1,m−1 holds, and let us prove B1,m . Thus suppose that ax + b = y p for some y ∈ Rp with a, b ∈ A and deg(a) = m. If ∂ • is any Hasse derivation of R then ∂ 1 (a)x + (a∂ 1 (x) + ∂ 1 (b)) = 0 (Lemma 2.9). Since deg(∂ 1 (a)) < m, we see that ∂ 1 (a) = 0 by B1,m−1 . Since this holds for all ∂ • , we find a ∈ Rp . Suppose a 6= 0, and let q be the maximal power of p such that a ∈ Rq (this exists since deg(a) > 0). Write a = cq , and note c 6∈ Rp . Let ∂ • be a Hasse derivation such that ∂ 1 (c) 6= 0; note then that ∂ q (a) = (∂ 1 c)q 6= 0 (Lemma 2.9). Again by Lemma 2.9, we have ∂ q (a)x + (a∂ q (x) + ∂ q (b)) = ∂ q (y p ) = (∂ q/p y)p ∈ Rp By B1,m−1 , we have ∂ q (a) = 0, a contradiction. Thus a = 0 and B1,m holds. P We now prove Bn,m for n ≥ 2, assuming Bn−1,• and Bn,m−1 . Thus suppose that ni=0 ai xi ∈ Rp with ai ∈ A and deg(an ) ≤ m. Let ∂ • be a Hasse derivation of R. Applying ∂ 1 , we find 0 = ∂ 1 (an )xn + (nan ∂ 1 (x) + ∂ 1 (an−1 ))xn−1 + · · · , where the remaining terms have degree ≤ n − 2 in x. By Bn,m−1 , all the above coefficients vanish. Thus ∂ 1 (an ) = 0 for all ∂ • , and so an ∈ Rp . We now see that the coefficient of xn−1 p is ∂ 1 (nan x + an−1 ). Since this vanishes for all ∂ • , we find nan x + aP n−1 ∈ R , and so nan = 0 n−1 ai xi ∈ Rp . Thus by by B1,• . In particular, p | n if an 6= 0, so an xn ∈ Rp , and hence i=0 Bn−1,• we have ai ∈ Rp and iai = 0 for all 0 ≤ i ≤ n − 1. This proves Bn,m .  Remark 2.12. The perfectness hypothesis in Theorem 2.11 can be omitted. Indeed, letting K be the perfection of k, the theorem shows that K ⊗k R is a polynomial ring, which implies that R is a polynomial ring.  3. Dimension theory in polynomial rings Fix a field k. For a ring A and a (possibly infinite) set U, we let A[U] be the polynomial algebra over A in variables U. We aim to prove a number of basic results on codimension in rings of the form A[U] where A is a finitely generated k-algebra. All of these results are standard when U is finite. We do not impose any gradings in this section. For a prime ideal p in a commutative ring R, the codimension (or height) of p is the maximum integer c for which there exists a chain of prime ideals p0 ( · · · ( pc = p, or ∞ if such chains exist with c arbitrarily large. The codimension of an arbitrary non-unital ideal 8 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN I of R is the minimum of the codimensions of primes containing I, or ∞ if I is not contained in any prime of finite codimension. This will be denoted codimR (I). We start with a basic fact that we will cite often. Proposition 3.1. Let A ⊂ B be a flat integral extension of rings. For any ideal I ⊂ B, we have codimB (I) = codimA (A ∩ I). Proof. We first prove the statement assuming that I = p is prime. Suppose that codimB (p) ≥ c. Let p0 ( p1 ( · · · ( pc = p be a chain of distinct prime ideals. Let qi = A ∩ pi . By incomparability [AK13, Theorem 14.3(2)], the qi are distinct and thus codimA (qc ) ≥ c. In particular, if codimB (p) = ∞, this shows that codimA (A ∩ p) = ∞. Now suppose that codimB (p) is finite and equal to c. If there were some longer chain of primes leading up to qc , then by going down for flat extensions [AK13, Theorem 14.11], we would have codimB (pc ) > c, which is a contradiction. Thus codimA (qc ) = c which finishes the special case when I is prime. Now consider the general case. Given a prime p containing I, we have just shown that codimA (A ∩ p) = codimB (p). On the other hand, given a prime q containing A ∩ I, using [AK13, Theorem 14.3(4)], there is a prime p ⊃ I such that A ∩ p = q. In particular, we deduce that codimB (I) = codimA (A ∩ I).  Proposition 3.2. Let A be a finitely generated k-algebra and let p be a prime ideal of A[U] of finite codimension. Then p is finitely generated. Proof. Let c be the codimension of p. We prove the statement by induction on c. First suppose that c = 0. If p = 0, then we are done. Otherwise, choose a nonzero element g ∈ p. Let V ⊂ U be a finite subset such that g belongs to A[V]. Let p′ = A[U](A[V] ∩ p). Then we have p′ ⊆ p. Since p is prime, so is A[V] ∩ p, and hence so is p′ since A[U] is obtained from A[V] by adjoining variables. In particular, we have p′ = p, and so p is finitely generated. Now suppose c > 0. Choose a prime ideal q ⊂ p of codimension c − 1. By induction, we know that q is finitely generated; let f1 , . . . , fr be generators. Let g ∈ p \ q and let V ⊂ U be a finite subset such that the fi ’s and g belong to A[V]. Let p′ = A[U](A[V] ∩ p). Note that q = A[U](A[V] ∩ q). We thus have q ⊂ p′ ⊂ p. Since p is prime, so is its contraction to A[V], and so is the extension of this back to A[U], since A[U] is obtained from A[V] by adjoining variables. Thus p′ is either q or p; however, it is not q since it contains g. Thus p = p′ , which shows that p is finitely generated.  Proposition 3.3. Let A be a finitely generated k-algebra and let V ⊂ U be sets. If I is a finitely generated ideal of A[V], and J is its extension to A[U], then codimA[V] (I) = codimA[U] (J). Proof. We note that the result is classical if U is finite (as can be seen, for example, using Hilbert polynomials). We will use this twice in the proof of the general case. First suppose that V is finite and I = p is prime. Note then that J = q is prime as well. If p0 ( · · · ( pc = p is a chain of primes in A[V], then letting qi be the extension of pi , we get a chain of primes q0 ( · · · ( qc = q in A[U], and so codimA[U] (q) ≥ c, which shows codimA[U] (q) ≥ codimA[V] (p). Next suppose that q0 ( · · · ( qc = q is a chain of primes in A[U]. For each 0 < i ≤ c, pick fi ∈ qi \ qi−1 . Let V′ be a finite subset of U containing V and such that each fi belongs to A[V′ ]. Then q• ∩ A[V′ ] is a strict chain of primes ideals in A[V′ ], and so we see that codimA[V′ ] (pA[V′ ]) ≥ c (note that the contraction of q to A[V′ ] is equal to the extension of p BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 9 to A[V′ ]). However, codimA[V′ ] (pA[V′ ]) = codimA[V] (p) by classical theory. We thus see that codimA[V] (p) ≥ c, and so codimA[V] (p) ≥ codimA[U] (q). In particular, we have equality and this case has been proven. Next, suppose still that V is finite, but let I be an arbitrary ideal. If p is a codimension c prime of A[V] containing I then pA[U] is a codimension c prime of A[U], by the previous paragraph, containing J. We thus see that codimA[U] (J) ≤ codimA[V] (I). Next, suppose that q is a codimension c prime of A[U] containing J. By Proposition 3.2, there is a finite subset V′ of U (which we can assume contains V) such that q is the extension of an ideal (necessarily prime) q′ of A[V′ ]. By the previous paragraph, q′ has codimension c in A[V′ ]. Since q′ clearly contains the extension of I to A[V′ ], we see that codimA[V′ ] (IA[V′ ]) ≤ c. But codimA[V′ ] (IA[V′ ]) = codimA[V] (I) by classical theory, and so codimA[V] (I) ≤ c. We thus see that codimA[V] (I) ≤ codimA[U] (J). Finally, we treat the case where V is arbitrary. Since I is finitely generated, there is a finite subset V0 of V such that I is the extension of an ideal I0 of A[V0 ]. Thus codimA[V] (I) = codimA[V0 ] (I0 ) = codimA[U] (J), by two applications of the case where V is finite.  Corollary 3.4. Let A be a finitely generated k-algebra. Every finitely generated ideal of A[U] has finite codimension. Proof. Let J be a finitely generated ideal of A[U]. Then J is the extension of an ideal I of some A[V] with V ⊂ U finite. Since codimA[V] (I) ≤ dim A[V] < ∞, Proposition 3.3 implies that codimA[U] (J) is finite as well.  Corollary 3.5. Let U be a set, and let f1 , . . . , fr ∈ k[U]. Then f1 , . . . , fr form a regular sequence if and only if the ideal (f1 , . . . , fr ) has codimension r. Proof. Let V be a finite subset of U such that f1 , . . . , fr ∈ k[V]. Let I (resp. J) be the ideal of k[V] (resp. k[U]) generated by the fi . The fi form a regular sequence in k[V] (or in k[U]) if and only the Koszul complex on the fi is exact; however, since k[U] ⊆ k[V] is faithfully flat, the Koszul complex on the fi is exact over k[U] if and only if it exact over k[V].  Corollary 3.6. Let A be a finitely generated k-algebra, let U be a set, and let J be a finitely generated ideal of A[U] containing a nonzerodivisor f . Let J be the image of J in A[U]/(f ). Then codimA[U]/(f ) (J) = codimA[U] (J) − 1. Proof. Let V be a sufficiently large finite subset of U such that A[V] contains f and some finite generating set of J; thus J is the extension of some ideal I of A[V]. Let B = A[V], which is a finitely generated k-algebra, and note that A[U] = B[U′ ], where U′ = U \ V. Let I be the image of I in B = B/(f ). Since J is the extension of I to B[U′ ] = A[U]/(f ), we obtain codimB (I) = codimA[U]/(f ) (J) and codimB (I) = codimA[U] (J) by two applications of Proposition 3.3. Finally since codimB (I) = codimB (I) − 1 by classical theory (for example, the principal ideal theorem and [Eis95, Corollary 13.4]), the result follows.  Proposition 3.7. Let A be a finitely generated k-algebra and let U be a set. Let J be a finitely generated ideal of A[U][y]. Then A[U] ∩ J is also a finitely generated ideal. Proof. Let V be a finite subset of U such that J is the extension of an ideal I of A[V][y]. Then A[V] ∩ I is finitely generated since A[V] is noetherian. One easily sees that A[U] ∩ J is the extension of A[V] ∩ I, which proves the result.  10 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN Corollary 3.8. Let A be a finitely generated k-algebra, let U be a set, let R = A[U], and let S = R[y]. Let I be a finitely generated ideal of S. Suppose that I contains a positive degree Pn−1 monic polynomial, that is, an element of the form y n + i=0 ai y i with ai ∈ R and n > 0. Then codimR (R ∩ I) = codimS (I) − 1. Proof. Let f ∈ I be a monic polynomial. Let I be the image of I in S/(f ). Then R → S/(f ) is a finite flat extension of rings and R ∩I is the contraction of I along this map. We thus see that codimR (R ∩ I) = codimS/(f ) (I) by Proposition 3.1. But codimS/(f ) (I) = codimS (I) − 1  by Corollary 3.6. 4. Stillman’s conjecture via the ultraproduct ring 4.1. Background on ultraproducts. For more details and references on ultraproducts, see [Sch10, §2.1]. Let I be an infinite set. We fix a non-principal ultrafilter F on I, which is a collection of subsets of I satisfying the following properties: (a) F contains no finite sets, (b) if A ∈ F and B ∈ F, then A ∩ B ∈ F, (c) if A ∈ F and A ⊆ B, then B ∈ F, (d) for all A ⊆ I, either A ∈ F or I \ A ∈ F (but not both). We think of the sets in F as neighborhoods of some hypothetical (and non-existent) point ∗ of I, and refer to them as such. We say that some condition holds near ∗ if it holds in some neighborhood of ∗. Q Given a family of sets {Xi }i∈I , their ultraproduct is the quotient of the usual product i∈I Xi in which two sequences (xi ) and (yi ) are identified if the equality xi = yi holds near ∗. If x is an element of the ultraproduct, we will write xi for the ith coordinate of x, keeping in mind that this is only well-defined in sufficiently small neighborhoods of ∗; in other words, we can think of x as a germ of a function around ∗. Suppose that each Xi is a graded abelian group. We define the graded ultraproduct of the Xi ’s to be the subgroup of the usual ultraproduct consisting of elements x such that deg(xi ) is bounded near ∗. The graded ultraproduct is a graded abelian group; in fact, it is the ultraproduct of the Xi ’s in the category of graded abelian groups. The degree d piece of the graded ultraproduct is the usual ultraproduct of the degree d pieces of the Xi ’s. We apply this construction in particular to the case where the Xi ’s are graded rings; the graded ultraproduct is then again a graded ring. Example 4.1. If K is the ultraproduct of {ki }i∈I , then the graded ultraproduct of ki [x1 , . . . , xn ] (with standard grading) is K[x1 , . . . , xn ] (also with standard grading).  In this subsection, we develop a few basic properties of graded ultraproduct rings. We begin with a simple observation on adjoining variables to ultraproducts. Proposition 4.2. Let {Ri }i∈I be a family of graded rings with graded ultraproduct S. Let y e be the graded ultraproduct of the rings Ri [y]. Then the be a variable of degree 1, and let S e is an isomorphism. natural map S[y] → S P e Then Proof. Suppose that f = dk=0 ak y k is an element of S[y], and let g be its image in S. Pd k gi = k=0 ak,i y . If g = 0 then, passing to some neighborhood of ∗, we can assume gi = 0 for all i, which implies that ak,i = 0 for all i and k, which implies that ak = 0 for all k, which shows that f = 0. Thus the map is injective. BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 11 e of degree d. Then we can write gi = Pd ak,i y k Next, suppose that g is an element of S k=0 for each i, where the ak,i ’s are elements of Ri . Let ak be the element of S defined by the P  sequence (ak,i ). Then g is the image of f = dk=0 ak y k , and so the map is surjective. We now examine how ideals in an ultraproduct relate to ideals in the original rings. Given a family of graded rings {Ri }i∈I and a family of ideals {Ii }i∈I , we say that the Ii are uniformly finitely generated if there exists an integer n such that Ii is generated by at most n elements for all i ∈ I. Proposition 4.3. Let {Ri }i∈I be a family of graded rings with graded ultraproduct S. (a) Suppose that {Ii } is a uniformly finitely generated family of homogeneous ideals. Then their graded ultraproduct I is a finitely generated ideal of S. (b) Suppose that {Ii } and {Ji } are two uniformly finitely generated families of homogeneous ideals whose graded ultraproducts are equal. Then Ii = Ji for all i in some neighborhood. (c) Suppose that I is a finitely generated homogeneous ideal of S. Then there exists a uniformly finitely generated family of homogeneous ideals {Ii } with ultraproduct I. Proof. (a) Suppose that each Ii is generated by ≤ n elements; pick generators f1,i , . . . , fn,i of each Ii . Let f1 , . . . , fn be the elements of S defined by these sequences. We claim that I is generated by f1 , . . . , fn . Indeed, suppose that g is a homogeneous element of I; thus, passing to a small P enough neighborhood, we see that each gi is an element of Ii , and can thus be written as nk=1 ak,i fk,i for some homogeneous elements ak,i ∈ Ri . Let ak be the element of S P defined by the sequence ak,i . Then g = nk=1 ak fk , proving the claim. (Note that for k fixed, each ak,i is homogeneous of some degree, but that the degree may depend on i. However, the degree is bounded by the degree of g, and so in any small enough neighborhood, the degree of ak,i will be independent of i.) (b) Suppose that Ii and Ji are each generated by at most n elements for all i, and pick generators f1,i , . . . , fn,i and g1,i , . . . , gn,i . Let f1 , . . . , fn and g1 , . . . , gn be the elements of S these sequences define. Pn By (a), the fk ’s and gk ’s generate the same Pn ideal of S. Thus we have an expression gk = j=1 aj fj for some aj ∈ S, and so gk,i = j=1 aj,i fj,i holds for all i in some neighboorhood of ∗, and so gk,i belongs to the ideal Ii for all such i. Since there are only finitely many f ’s and g’s, we can pass to some common neighboorhood of ∗ so that gk,i ∈ Ii and fk,i ∈ Ji for all i and k, and so Ii = Ji . (c) Let I be generated by f1 , . . . , fn . Let fk be represented by some sequence (fk,i ), and let Ii be the ideal of Ri generated by f1,i , . . . , fn,i . Then the argument in (a) shows that I is the ultraproduct of the Ii ’s.  Due to this proposition, we can unambiguously speak of the germ of a finitely generated homogeneous ideal I of S. We denote these ideals by Ii , keeping in mind that they are only well-defined for i sufficiently close to ∗. We next show that this construction interacts well with contraction. Proposition 4.4. Let {Ri } be a family of graded rings with graded ultraproduct S, and let {Ri′ } be a family of graded subrings of {Ri } with graded ultraproduct S′ . Let I be a finitely generated homogeneous ideal of S, and suppose that S′ ∩ I is a finitely generated ideal of S′ . Then (S′ ∩ I)i = S′i ∩ Ii in a neighborhood of ∗. Proof. Let g1 , . . . , gm be generators for S′ ∩ I. Then gk,i belongs to S′i ∩ Ii (in some neighborhood of ∗), and so (S′ ∩ I)i is contained in S′i ∩ Ii (in some neighborhood of ∗), since the 12 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN former is generated by g1,i , . . . , gm,i . We now claim that the inclusion (S′ ∩ I)i ⊂ S′i ∩ Ii is an equality in some neighborhood of ∗. Assume not. Then we can find a sequence (hi ) such that hi ∈ S′i ∩ Ii for all i, but in any neighborhood of ∗ there exists i such that hi 6∈ (S′ ∩ I)i . Let h ∈ S be the element defined by (hi ). Then h ∈PS′ , since hi ∈ Ri′ for all i, and h ∈ I, ′ since P hi ∈ Ii for all i. Thus h ∈ S′ ∩ I, and so h = m k=1 ak gk for some ak ∈ S . But then m ′ hi = k=1 ak,i gk,i holds in some neighborhood of ∗, which shows that hi ∈ (S ∩ I)i in some neighborhood of ∗, a contradiction.  We close this subsection with a result on strength in ultraproducts: Proposition 4.5. Let {Ri } be a family of graded rings with graded ultraproduct S. Suppose that the degree 0 piece of Ri is a field ki , so that the degree 0 piece of S is the ultraproduct K of these fields. Let f1 , . . . , fr ∈ S. Suppose that the collective strength of f1,i , . . . , fr,i tends to infinity as i → ∗. Then f1 , . . . , fr has infinite collective strength. P P Proof. Suppose we have a relation rj=1 aj fj = sk=1 gk hk where ai ∈ K are not all zero and gk and hk are elements of positive degree. Represent everything by sequences: Pr aj = (aj,i ), gj = (gj,i), and hj = (hj,i ). Then, by definition of the ultraproduct, we have j=1 aj,i fj,i = P s k=1 gk,i hk,i for all i sufficiently close to ∗, and moreover, not all the aj,i vanish. But this shows that f1,i , . . . , fr,i has collective strength < s in this neighborhood of ∗.  4.2. The main theorems on ultraproduct rings. Let {ki }i∈I be a family of perfect fields with ultraproduct K. The field K is also perfect, as if K has characteristic p > 0, then ki is perfect of characteristic of p for all i sufficiently close to ∗, and so one can take pth roots in K. Let Ri = ki [x1 , x2 , . . .] with standard grading, and let S be the graded ultraproduct of the family {Ri }i∈I . Theorem 4.6. The ring S is a polynomial ring. Proof. We use the criteria of §2. First suppose that K has characteristic 0, and let us prove that S has enough derivations (Definition 2.1). Let f ∈ S be a non-zero homogeneous element of degree d > 0. Passing to a neighborhood of ∗, we can assume that each ki has characteristic 0 or characteristic p with p > d, and that fi 6= 0. For each i, let a(i) be an index such that xa(i) appears in some monomial in fi , and let ∂i be the derivation dxda(i) of Ri . The derivations (∂i ) define a derivation ∂ on S. Since ∂i (fi ) 6= 0 near ∗, we see that ∂(f ) 6= 0, and so S has enough derivations. Thus S is a polynomial ring (Theorem 2.2). Now suppose that K has characteristic p, and let us prove that S has enough Hasse derivations (Definition 2.10). Let f ∈ S be a homogeneous element of positive degree that is not a pth power. Passing to a neighborhood of ∗, we can assume that each fi is not a pth power. For each i, let a(i) be an index such that xa(i) appears in some monomial in fi with exponent not divisible by p, and let ∂i be the Hasse derivative on Ri with respect to xa(i) (Example 2.7). The Hasse derivations ∂i on the Ri induce a Hasse derivation ∂ on S. Since ∂i (fi ) 6= 0 near ∗, we see that ∂(f ) 6= 0, and so S has enough Hasse derivations. Thus S is a polynomial ring (Theorem 2.11).  Theorem 4.7. Assume that for all i sufficiently close to ∗, the fields ki are infinite. If I ⊂ S is a finitely generated ideal, then codimS (I) = codimRi (Ii ) for all i sufficiently close to ∗. Proof. Let c = codimS (I), which is finite by Corollary 3.4. If c = 0 then I = 0, and so Ii = 0 for all i sufficiently close to ∗, and so the formula holds. We now proceed by induction on c. BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 13 Suppose the result holds for c − 1, and let I be an ideal of S of codimension c > 0. Let f ∈ I be a non-zero homogeneous element. For each i, let γi be an automorphism of Ri such that γi (fi ) is monic in x1 , at least for i sufficiently close to ∗ (see Lemma 4.8). The family {γi } induces an automorphism γ of S. Since codimension is invariant under automorphisms, we may replace I with γ(I), and so we can assume that fi is monic in x1 for all i sufficiently close to ∗. Let Ri′ = ki [x2 , . . .] and let S′ be the ultraproduct of {Ri′ }. We have Ri = Ri′ [x1 ] for each i, and so S ∼ = S′ [x1 ] by Proposition 4.2. Under this identification, f corresponds to a monic polynomial in S′ [x1 ]. Let I ′ be the contraction of I to S′ , which is finitely generated by Proposition 3.7. We note that Ii′ is the contraction of Ii to Ri′ , for all i sufficiently close to ∗, by Proposition 4.4. Corollary 3.8 implies that codimS′ (I ′ ) = codimS (I) − 1 = c − 1. Thus, by the inductive hypothesis, we have codimR′i (Ii′ ) = c − 1 for all i sufficiently close to ∗. By Corollary 3.8 again, codimRi (Ii ) = codimR′i (Ii′ ) + 1 = c. The result follows.  Lemma 4.8. Let k be an infinite field, let R = k[x1 , x2 , . . .], and let f ∈ R be a non-zero homogeneous element. Then there exists an automorphism γ of R (as a graded k-algebra) such that γ(f ) is monic in x1 . Proof. See [Eis95, Lemma 13.2(c)].  Corollary 4.9. Assume that for all i in a neighborhood of ∗, the fields ki are infinite. Let f1 , . . . , fr be homogeneous elements of S. Then f1 , . . . , fr form a regular sequence in S if and only if f1,i , . . . , fr,i form a regular sequence in Ri for all i sufficiently close to ∗. Proof. This follows from Theorem 4.7 and Corollary 3.5.  4.3. Stillman’s conjecture. Theorem 4.10. Given positive integers d1 , . . . , dr there exists an integer N = N(d1 , . . . , dr ) with the following property. If f1 , . . . , fr are homogeneous elements of k[x1 , . . . , xn ], for any infinite perfect field k and any n, of degrees d1 , . . . , dr and collective strength at least N then f1 , . . . , fr form a regular sequence. Proof. Suppose that the theorem is false. Then for each j ∈ N, we can find fj,1, . . . , fj,r in kj [x1 , x2 , . . . ], with kj infinite and perfect, which fails to be a regular sequence and where the collective strength goes to ∞ as j → ∞. Choose some function n : I → N where n(i) → ∞ as i → ∗. For each i ∈ I, we let fi,1 , . . . , fi,r be any of the collections in our sequence of collective strength at least n(i). We let f1 = (fi,1 ), . . . , fr = (fi,r ) be the corresponding collection in S. By Proposition 4.5, f1 , . . . , fr has infinite collective strength. However, by  Corollary 4.9, f1 , . . . , fr fail to be a regular sequence. This contradicts Theorem 1.1. For completeness, we now illustrate how Theorem 4.10 implies the existence of small subalgebras and Stillman’s conjecture. This implication is essentially the same as in [AH16]. Theorem 4.11. Given positive integers d1 , . . . , dr there exists an integer s = s(d1 , . . . , dr ) with the following property. If f1 , . . . , fr are homogeneous elements of k[x1 , . . . , xn ], for any infinite perfect field k and any n, with deg(fi ) = di , then: (a) There exists a regular sequence g1 , . . . , gs in k[x1 , . . . , xn ], where each gi is homogeneous of degree at most max(d1 , . . . , dr ), such that f1 , . . . , fr are contained in the subalgebra k[g1 , . . . , gs ]. (b) The ideal (f1 , . . . , fr ) has projective dimension at most s. 14 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN Proof. (a) To each sequence d = (d1 , . . . , dr ) we attach a monomial y(d) = y1b1 y2b2 · · · where bj is the number of times j appears in d. If there is an ideal (f1 , . . . , fr ) of type d that fails to be a regular sequence, then by Theorem 4.10 there is some N, depending only on d, such that some k-linear homogeneous combination of the fi has strength ≤ N. Without loss of generality, weP may replace one of our elements with this linear combination, and call it ′ fi . Taking fi = N j=1 aj gj , and replacing fi by the gj , we get an ideal of type d and where ′ y(d) < y(d ) in the revlex order, and where the difference in total degree is at most N −1. In particular, given y(d) there are only a finite number of possible monomials y(d′ ) that could arise in this way. The descendants of y(d) thus form a tree with finitely many branches at each node and with no infinite chains, and there are thus only finitely many descendants of y(d). Letting s be the max total degree of a descendant of y(d), it follows that f1 , . . . , fr can be embedded in a subalgebra k[g1 , . . . , gs ] where the gi form a regular sequence. (b) Choose g1 , . . . , gs as in (a). Since g1 , . . . , gs form a regular sequence, the extension k[g1 , . . . , gs ] ⊆ k[x1 , . . . , xn ] is flat. Thus, if G is the minimal free resolution of (f1 , . . . , fs ) over k[g1 , . . . , gs ], then the extension of G to k[x1 , . . . , xn ] is the minimal free resolution of this ideal over k[x1 , . . . , xn ]. In particular, the projective dimension of (f1 , . . . , fs ) is ≤ s.  5. The inverse limit ring 5.1. Inverse limit polynomial ring. Recall that AJJx1 , x2 , . . .KK denotes the inverse limit of the standard-graded polynomial rings A[x1 , . . . , xn ] in the category of graded rings. We let K denote a ring containing A, and we write αn : K ⊗A AJJx1 , x2 , . . .KK → K[x1 , . . . , xn ] for the natural surjection. We set R = K ⊗A AJJx1 , x2 , . . .KK. The following hypothesis will be used repeatedly. Hypothesis 5.1. A is an integral domain with fraction field K. If the characteristic p of K is positive, we assume furthermore that the Frobenius map on A is surjective (so that K is perfect) and that K is infinite.  Remark 5.2. If A is normal and its fraction field K is perfect, then because a1/p satisfies the integral equation xp −a, it lies in A. Thus, we can often arrange to satisfy Hypothesis 5.1 by replacing A with its integral closure in an algebraic closure of K.  The following is an analogue of Theorem 4.7 and Corollary 4.9. It implies Theorem 1.1. Theorem 5.3. Suppose Hypothesis 5.1 holds (except we do not require K to be infinite). Then R is a polynomial ring. Proof. We use the criteria of §2. If p = 0, then the partial derivatives dxd i show that R has enough derivations. Now suppose that p > 0. We claim that the Hasse derivatives corresponding to dxd i (Example 2.7) provide R with enough Hasse derivations. Let f ∈ R be such that dxd i f = 0 for all i. This implies that f ∈ K ⊗A AJJxp1 , xp2 , . . .KK. In particular, we can write f = g/a where a ∈ A and g ∈ AJJxp1 , xp2 , . . .KK. Since the Frobenius map is surjective on A and K, both g and a are pth powers, which implies that f is also a pth power.  Remark 5.4. The perfectness hypothesis in Theorem 5.3 can be relaxed. For example, suppose k is a field of characteristic p such that k is a finite extension of the subfield kp , and let R = kJJx1 , x2 , . . .KK. Then kRp consists exactly of all (possibly infinite) k-linear combinations of pth powers of monomials; this uses the hypothesis on k. Thus if f 6∈ kRp BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 15 then some Hasse derivative will not kill f , and so R has enough derivations, and is thus a polynomial ring by Remark 2.12.  Theorem 5.5. Suppose Hypothesis 5.1 holds. Let f1 , . . . , fs ∈ R and let I = (f1 , . . . , fs ). (a) For any n ≫ 0, we have that codimR (I) = codimK[x1,...,xn ] (αn (I)). (b) The sequence f1 , . . . , fs forms a regular sequence if and only if αn (f1 ), . . . , αn (fs ) forms a regular sequence for all n ≫ 0. (c) If αn (f1 ), . . . , αn (fs ) forms a regular sequence for some n, then αm (f1 ), . . . , αm (fs ) forms a regular sequence for all m ≥ n. Proof. (a) We prove this by induction on c = codimR (I), which is finite by Corollary 3.4. If c = 0 then I = 0 and the statement is immediate. Now let c > 0 and pick f ∈ I nonzero. Let n large enough so that αn (f ) 6= 0. Since K is infinite, there is a graded Kalgebra automorphism γ of K[x1 , . . . , xn ] such that γαn (f ) is monic over K[x2 , . . . , xn ] [Eis95, Lemma 13.2(c)]. If γ ′ is the automorphism of R which acts by γ on x1 , . . . , xn and which acts trivially on the other xi , then αn (γ ′ f ) = γαn f . We may thus assume that f is monic over K ⊗A AJJx2 , x3 , . . .KK. The rest of the proof is essentially identical to the proof of Theorem 4.7. (b) This is an immediate consequence of (a) and Corollary 3.5. (c) By Corollary 3.5, we have codim αn (I) = s and it suffices to show that codim αn+1 (I) = s. Since K[x1 , . . . , xn+1 ]/(αn+1 (I) + (xn+1 )) is isomorphic to K[x1 , . . . , xn ]/αn (I), the principal ideal theorem implies that codim αn+1 (I) is either s or s + 1. However, αn+1 (I) is generated by s elements, so its codimension is at most s. Thus codim αn+1 (I) = s.  Definition 5.6. Fix a ring A, a field k, and a point y ∈ Spec(A)(k). For f ∈ AJJx1 , x2 , . . .KK, we let fy denote the image of f in kJJx1 , x2 , . . .KK. Similarly, for an AJJx1 , x2 , . . .KK-module M, we let My = kJJx1 , x2 , . . .KK ⊗AJJx1 ,x2 ,...KK M. We note that k ⊗A AJJx1 , x2 , . . .KK is not generally isomorphic to kJJx1 , x2 , . . .KK. If instead f ∈ A[x1 , . . . , xn ], then we let fy denote its image in k[x1 , . . . , xn ]. If M is an A[x1 , . . . , xn ]-module, then we let My = k[x1 , . . . , xn ] ⊗A[x1 ,...,xn] M.  Corollary 5.7. Suppose Hypothesis 5.1 holds. Let f1 , . . . , fs ∈ AJJx1 , x2 , . . .KK be elements whose images in R form a regular sequence. There exists a dense open set U ⊆ Spec(A) such that for any algebraically closed field k and any y ∈ U(k), the elements f1,y , . . . , fs,y form a regular sequence in kJJx1 , x2 , . . .KK. Proof. By Theorem 5.5, there is some n so that αn (f1 ), . . . , αn (fs ) ∈ K[x1 , . . . , xn ] forms a regular sequence. Let gi = αn (fi ), considered as an element of A[x1 , . . . , xn ]. Let Q = A[x1 , . . . , xn ]/(g1 , . . . , gs ) and let π : Spec(Q) → Spec(A). Since the generic fiber of π has dimension n − s, it follows that the locus U ⊆ Spec(A) of points whose fibers have dimension n − s is dense and Zariski open by semicontinuity of fiber dimension [Stacks, 05F6]. Let k be an algebraically closed field and let y ∈ U(k). Since dim(Q ⊗A k) = n − s, it follows that g1,y , . . . , gs,y forms a regular sequence. But gi,y equals αn (fi,y ), and thus by Theorem 5.5(c) and (b), we have that f1,y , . . . , fs,y forms a regular sequence.  Lemma 5.8. If k is a perfect field and f1 , . . . , fs ∈ kJJx1 , x2 , . . .KK is a regular sequence, then i′ : k[f1 , . . . , fs ] → kJJx1 , x2 , . . .KK is faithfully flat. Proof. By Theorem 5.3, we can write kJJx1 , x2 , . . .KK ∼ = k[V]. There is a finite subset H ⊆ V such that f1 , . . . , fs ∈ k[H]. Since the fi form a regular sequence, we can extend this to a 16 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN maximal regular sequence, f1 , . . . , fs , g1 , . . . , gr on k[H]. The map i′ factors as i i i 1 2 3 k[f1 , . . . , fs ] −→ k[f1 , . . . , fs , g1 , . . . , gr ] −→ k[H] −→ kJJx1 , x2 , . . .KK. For each extension, the larger ring is free over the smaller ring. Both i1 and i3 are extensions of polynomial rings. For i2 , freeness follows from [BH93, Proposition 2.2.11] (the statement there is for a local ring, but the proof also works for a graded ring).  5.2. Constant Betti tables over an open subset. For a graded ring R with R0 = k a field, we set βi,j (M) = dimk TorR i (M, k)j . The Betti table of M is the collection of all βi,j . Definition 5.9. Let A be a commutative ring and let U ⊆ Spec(A) be a locally closed subset. Let M be a finitely presented, graded module over either AJJx1 , x2 , . . .KK or over a polynomial ring over A. We say that M has a constant Betti table over U if for every algebraically closed field k and every y ∈ U(k), the Betti table of My is the same. (Recall that My is defined in Definition 5.6).  The following lemma, which is likely known to experts, shows that a finitely presented module over a finite polynomial ring has a constant Betti table over an open subset. Lemma 5.10. Let A be an integral domain and let R = A[y1 , . . . , yr ] be a graded polynomial ring over A, with deg(yi ) ≥ 1 for 1 ≤ i ≤ r. If M ′ is a finitely presented, graded R-module, then M ′ has a constant Betti table over some dense, open subset U ⊆ Spec(A). ∂p ∂ Proof. Let K be the fraction field of A and let G′K = [0 → G′K,p → · · · →1 G′K,0] be the minimal free resolution of K ⊗A M ′ over K[y1 , . . . , yr ]. Represent each ∂i by a matrix ϕi . The entries of each ϕi have positive degree and, by multiplying by an element in A if needed, we may assume that the entries of each ϕi also lie in R. These matrices can then be used to define a bounded, graded complex G′ of free R-modules. By construction, K ⊗A coker(G′1 → G′0 ) is isomorphic to K ⊗A M ′ . Since both M ′ and coker(G′1 → G′0 ) are finitely presented, this isomorphism extends to an isomorphism over Ag for some g ∈ A. Let N be the direct sum of the homology modules Hi (G′ ) for 1 ≤ i ≤ p. Since N is a finitely generated module over the finitely presented extension A → A[y1 , . . . , yr ], [Stacks, 051S] implies that there is some h ∈ A such that Nh is free over Ah . But taking homology commutes with localization, so K ⊗Ah Nh is isomorphic to the homology of the acyclic complex K ⊗A G′ . Since K ⊗Ah Nh = 0 and Nh is free, this implies that Nh = 0 and G′h is acyclic. By a similar argument, there exists k ∈ A such that the cokernel of G′ is free over Ak . In sum, if f = ghk, then G′f is a free resolution of Mf′ , and Mf′ is a flat Af -module. Let U = Spec(Af ). Let k be a field and y ∈ U(k). Since Mf′ is flat over Af , k ⊗Af G′f is a free resolution of My′ . The resolution is minimal since each entry of ϕi had positive degree, and this remains true under localization at f and specialization to k. The Betti table of My′  is thus determined by the free modules in G′f , and so it does not depend on y. Lemma 5.11. Suppose Hypothesis 5.1 holds. Let M be a finitely presented, graded AJJx1 , x2 , . . .KKmodule. There exist: (a) elements f1 , . . . , fs ∈ AJJx1 , x2 , . . .KK whose images in R form a regular sequence, and (b) an element g ∈ A and a finitely presented Ag [f1 , . . . , fs ]-module M ′ such that the extension of M ′ to Ag ⊗A AJJx1 , x2 , . . .KK is isomorphic to Ag ⊗A M. BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 17 Proof. Let U be a set of homogeneous elements of R+ such that R = K[U]. Since any f ∈ R can be written as a fraction with numerator in AJJx1 , x2 , . . .KK and denominator in A, we may rescale each element of U so that it lies in AJJx1 , x2 , . . .KK. Since R = K[U] is a polynomial ring, for any element f ∈ R, there is a finite subset U′ ⊆ U, and an element γ ∈ A such that f lies in Aγ [U′ ]. The same holds for any finite collection of elements in R. Let Φ be a finite presentation matrix of M. By the above discussion, we can find distinct elements f1 , . . . , fs ∈ U and g ∈ A such that each entry of Φ lies in Ag [f1 , . . . , fs ]. Let Φ′ be the same matrix as Φ, but considered as a map of graded, free Ag [f1 , . . . , fs ]-modules and let M ′ be the cokernel of Φ′ . By construction, the extension of M ′ to Ag ⊗A AJJx1 , x2 , . . .KK is isomorphic to Ag ⊗A M. The elements f1 , . . . , fs ∈ R form a regular sequence as they are “variables” (elements of U).  Theorem 5.12. Suppose Hypothesis 5.1 holds. If M is a finitely presented, graded AJJx1 , x2 , . . .KKmodule, then M has a constant Betti table over some dense open subset U ⊆ Spec(A). Proof. We apply Lemma 5.11, and let M ′ be the Ag [f1 , . . . , fs ]-module satisfying the conclusion of that lemma. Applying Lemma 5.10 to M ′ , we can assume that M ′ has constant Betti table over a dense open subset U1 ⊆ Spec(Ag ). By Corollary 5.7, we can find a dense open subset U2 ⊆ Spec(Ag ) where for all algebraically closed fields k and all y ∈ U2 (k), the sequence f1,y , . . . , fs,y forms a regular sequence. We let U = U1 ∩ U2 . Let k be an algebraically closed field and let y ∈ U(k). We have a commutative diagram Ag [f1 , . . . , fs ] / k[f1,y , . . . , fs,y ] i′   AJJx1 , x2 , . . .KK / Ag ⊗A AJJx1 , x2 , . . .KK / kJJx1 , x2 , . . .KK where the extension of the k[f1,y , . . . , fs,y ]-module My′ by i′ is My . By Lemma 5.8, i′ is faithfully flat, and thus the Betti table of My′ is the same as the Betti table of My . Since M ′ has a constant Betti table over U, the module M also has a constant Betti table over U.  Corollary 5.13. (We do not assume Hypothesis 5.1.) Let A be an integral domain. If M is a finitely presented, graded AJJx1 , x2 , . . .KK-module, then M has a constant Betti table over some dense open subset U ⊆ Spec(A). Proof. Let A be the integral closure of A in an algebraic closure of K, and let K be the fraction field of A. Let M be the extension of M to AJJx1 , x2 , . . .KK. Since A and K satisfy Hypothesis 5.1 (see Remark 5.2), Theorem 5.12 implies that M has a constant Betti table over some dense open subset U ⊆ Spec(A). Since the integral morphism Spec(A) → Spec(A) is closed [Stacks, 01WM], the image of U in Spec(A) contains a dense open set U. Let k be an algebraically closed field and let y ∈ U(k). By integrality, there is k-point y ′ lying over y, and by definition of U, y ′ ∈ U (k). The map y ′ → y induces an isomorphism of M y′ and My as kJJx1 , x2 , . . .KK-modules, and they therefore have the same Betti table. Thus M has a constant Betti table over U.  5.3. Connection with GL-noetherianity and Stillman’s conjecture. We now combine Corollary 5.13 with [Dra17] to prove Stillman’s conjecture. Throughout this section we fix a ground field k. Fix degrees d1 , . . . , dr . Let S be the set of pairs (α, i) where 1 ≤ i ≤ r and α ranges over all exponent vectors of degree di in the variables 18 DANIEL ERMAN, STEVEN V SAM, AND ANDREW SNOWDEN P x1 , x2 , . . . . Let A = k[cα,i | (α, i) ∈ S]. For 1 ≤ i ≤ r, let fei = cα,i xα ∈ AJJx1 , x2 , . . .KK be a universal polynomial of degree di . We let Q = AJJx1 , x2 , . . .KK/(fe1 , . . . , fer ). If k′ is a field over k, then there is a bijection between Spec(A)(k′ ) and tuples f1 , . . . , fr ∈ k′ JJx1 , x2 , . . .KK where deg(fi ) = di ; with notation from Definition 5.6, this bijection is given by y ∈ Spec(A)(k′ ) ↔ fe1,y , . . . , fer,y . There is a natural change of basis action by the group scheme GL∞ on Spec(A). The AJJx1 , x2 , . . .KK-module Q is equivariant with respect to this action. Theorem 5.14. The space Spec(A) decomposes into a finite disjoint union of locally closed subsets {Uj } such that Q has a constant Betti table over Uj for each j. In particular, there are only finitely many distinct Betti tables among all ideals (f1 , . . . , fr ) ⊆ k′ [x1 , . . . , xn ] generated in degrees d1 , . . . , dr , for all n and all fields k′ over k. Proof. Applying Corollary 5.13, we have that Q has a constant Betti table over a dense, open subset U ′ ⊆ Spec(A). Let U be the union of all GL∞ translates of U ′ . Since Betti tables are GL∞ -invariant, Q has a constant Betti table over U. By [Dra17, Theorem 1], Spec(A) \ U consists of finitely many irreducible components, each of which is GL∞ -invariant. Passing to a component, we can apply the same argument. Continuing in this way, we obtain the desired stratification of Spec(A), and it is finite by [Dra17, Theorem 1]. For any field k′ , the canonical map k′ [x1 , . . . , xn ] ⊗k′ k′ JJxn+1 , . . .KK → k′ JJx1 , x2 , . . .KK is an isomorphism. It follows that for f1 , . . . , fr ∈ k′ [x1 , . . . , xn ] the Betti table of k′ [x1 , . . . , xn ]/(f1 , . . . , fr ) is the same as that of k′ JJx1 , x2 , . . .KK/(f1 , . . . , fr ), and this implies the final statement of the theorem for algebraically closed fields k′ . To get the statement for arbitrary k′ , we let k′ be an algebraic closure of k′ and note that the extension k′ [x1 , . . . , xn ] → k′ [x1 , . . . , xn ] is faithfully flat, and hence Betti tables are unchanged under this extension.  Remark 5.15. It would be interesting to extend [Dra17, Theorem 1] to spaces over Z, as this would yield characteristic free bounds in the above result.  Remark 5.16. Theorem 5.14 slightly generalizes Stillman’s conjecture, as it also applies to ideals (f1 , . . . , fr ) in kJJx1 , x2 , . . .KK that use an infinite number of variables.  Remark 5.17. The proof of Theorem 5.14 is much less self-contained than our ultraproduct proof, however it is distinctly different in character: it does not rely on the notion of strength, but rather on a generalized noetherianity principle. This is pursued in more detail in [ESS] to obtain generalizations of Stillman’s conjecture.  References [AK13] Allen Altman and Steven Kleiman, A term of commutative algebra, 2013. http://web.mit.edu/18.705/www/13Ed.pdf. ↑8 [AH16] Tigran Ananyan and Melvin Hochster, Small subalgebras of polynomial rings and Stillman’s conjecture (2016). arXiv:1610.09268v1. ↑1, 2, 3, 13 [BH93] Winfried Bruns and Jürgen Herzog, Cohen-Macaulay rings, Cambridge Studies in Advanced Mathematics, vol. 39, Cambridge University Press, Cambridge, 1993. ↑16 [Dra14] Jan Draisma, Noetherianity up to symmetry, Combinatorial algebraic geometry, Lecture Notes in Math., vol. 2108, Springer, Cham, 2014, pp. 33–61. ↑4 [Dra17] Jan Draisma, Topological noetherianity for polynomial functors (2017). arXiv:1705.01419v1. ↑1, 3, 5, 17, 18 [DLL18] Jan Draisma, Michal Lasoń, and Anton Leykin, Stillman’s Conjecture via generic initial ideals (2018). arXiv:1802.10139v1. ↑3 BIG POLYNOMIAL RINGS AND STILLMAN’S CONJECTURE 19 [Eis95] David Eisenbud, Commutative algebra with a view toward algebraic geometry, Graduate Texts in Mathematics, vol. 150, Springer-Verlag, New York, 1995. ↑9, 13, 15 [ESS] Daniel Erman, Steven V Sam, and Andrew Snowden, Stillman type bounds via twisted commutative algebra. In preparation. ↑18 [Gol03] David M. Goldschmidt, Algebraic functions and projective curves, Graduate Texts in Mathematics, vol. 215, Springer-Verlag, New York, 2003. ↑5 [MM65] John W. Milnor and John C. Moore, On the structure of Hopf algebras, Ann. of Math. (2) 81 (1965), 211–264. ↑3 [PS09] Irena Peeva and Mike Stillman, Open problems on syzygies and Hilbert functions, J. Commut. Algebra 1 (2009), no. 1, 159–195. ↑2 [Sch10] Hans Schoutens, The use of ultraproducts in commutative algebra, Lecture Notes in Mathematics, vol. 1999, Springer-Verlag, Berlin, 2010. ↑3, 10 [Ser97] Jean-Pierre Serre, Galois cohomology, Springer-Verlag, Berlin, 1997. Translated from the French by Patrick Ion and revised by the author. ↑3, 4 [Sjö80] Gunnar Sjödin, Hopf algebras and derivations, J. Algebra 64 (1980), no. 1, 218–229. ↑3 [Sne98a] Jan Snellman, Gröbner bases and normal forms in a subring of the power series ring on countably many variables, J. Symbolic Comput. 25 (1998), no. 3, 315–328. ↑3 [Sne98b] Jan Snellman, A graded subring of an inverse limit of polynomial rings, 1998. http://www.diva-portal.org/smash/get/diva2:195258/FULLTEXT01.pdf. ↑3 [Stacks] The Stacks Project Authors, Stacks Project, 2017. http://stacks.math.columbia.edu. ↑15, 16, 17 [vdDS84] L. van den Dries and K. Schmidt, Bounds in the theory of polynomial rings over fields. A nonstandard approach, Invent. Math. 76 (1984), no. 1, 77–91. ↑3 Department of Mathematics, University of Wisconsin, Madison, WI E-mail address: [email protected] URL: http://math.wisc.edu/~derman/ Department of Mathematics, University of Wisconsin, Madison, WI E-mail address: [email protected] URL: http://math.wisc.edu/~svs/ Department of Mathematics, University of Michigan, Ann Arbor, MI E-mail address: [email protected] URL: http://www-personal.umich.edu/~asnowden/
0math.AC
Under review as a conference paper at ICLR 2018 L OSS F UNCTIONS FOR M ULTISET P REDICTION arXiv:1711.05246v1 [cs.LG] 14 Nov 2017 Sean Welleck, Zixin Yao, Yu Gai, Jialin Mao, Zheng Zhang New York University Shanghai {wellecks,zixin.yao,yg1246,jialin.mao,zz}@nyu.edu Kyunghyun Cho New York University CIFAR Azrieli Global Scholar [email protected] A BSTRACT We study the problem of multiset prediction. The goal of multiset prediction is to train a predictor that maps an input to a multiset consisting of multiple items. Unlike existing problems in supervised learning, such as classification, ranking and sequence generation, there is no known order among items in a target multiset, and each item in the multiset may appear more than once, making this problem extremely challenging. In this paper, we propose a novel multiset loss function by viewing this problem from the perspective of sequential decision making. The proposed multiset loss function is empirically evaluated on two families of datasets, one synthetic and the other real, with varying levels of difficulty, against various baseline loss functions including reinforcement learning, sequence, and aggregated distribution matching loss functions. The experiments reveal the effectiveness of the proposed loss function over the others. 1 I NTRODUCTION A relatively less studied problem in machine learning, particularly supervised learning, is the problem of multiset prediction. The goal of this problem is to learn a mapping from an arbitrary input to a multiset of items. This problem appears in a variety of contexts. For instance, in the context of high-energy physics, one of the important problems in a particle physics data analysis is to count how many physics objects, such as electrons, muons, photons, taus, and jets, are in a collision event (Ehrenfeld et al., 2011). In computer vision, automatic alt-text, such as the one available on Facebook,1 is a representative example of multiset prediction (Welleck et al., 2017; Lempitsky & Zisserman, 2010).2 In multiset prediction, a learner is presented with an arbitrary input and the associated multiset of items. It is assumed that there is no predefined order among the items, and that there are no further annotations containing information about the relationship between the input and each of the items in the multiset. These properties make the problem of multiset prediction unique from other wellstudied problems. It is different from sequence prediction, because there is no known order among the items. It is not a ranking problem, since each item may appear more than once. It cannot be transformed into classification, because the number of possible multisets grows exponentially with respect to the maximum multiset size. In this paper, we view multiset prediction as a sequential decision making process. Under this view, the problem reduces to finding a policy that sequentially predicts one item at a time, while the outcome is still evaluated based on the aggregate multiset of the predicted items. We first propose an oracle policy that assigns non-zero probabilities only to prediction sequences that result exactly in the target, ground-truth multiset given an input. This oracle is optimal in the sense that its prediction 1 https://newsroom.fb.com/news/2016/04/using-artificial-intelligenceto-help-blind-people-see-facebook/ 2 We however note that such a multiset prediction problem in computer vision can also be solved as segmentation, if fine-grained annotation is available. See, e.g., (He et al., 2017). 1 Under review as a conference paper at ICLR 2018 never decreases the precision and recall regardless of previous predictions. That is, its decision is optimal in any state (i.e., prediction prefix). We then propose a novel multiset loss which minimizes the KL divergence between the oracle policy and a parametrized policy at every point in a decision trajectory of the parametrized policy. We compare the proposed multiset loss against an extensive set of baselines. They include a sequential loss with an arbitrary rank function, sequential loss with an input-dependent rank function, and an aggregated distribution matching loss and its one-step variant. We also test policy gradient, as was done by Welleck et al. (2017) recently for multiset prediction. Our evaluation is conducted on two sets of datasets with varying difficulties and properties. According to the experiments, we find that the proposed multiset loss outperforms all the other loss functions. 2 M ULTISET P REDICTION A multiset prediction problem is a generalization of classification, where a target is not a single class but a multiset of classes. The goal is to find a mapping from an input x to a multiset Y =  y1 , . . . , y|Y| , where yk ∈ C. Some of the core properties of multiset prediction are 1. the input x is an arbitrary vector. 2. there is no predefined order among the items yi in the target multiset Y. 3. the size of Y may vary depending on the input x. 4. each item in the class set C may appear more than once in Y. 2.1 R ELATED P ROBLEMS IN S UPERVISED L EARNING Variants of this multiset prediction problem have been extensively studied. However, they differ from our definition of the problem. Here, we go over each variant and discuss how it differs from our definition of multiset prediction. Power Multiset Classification Perhaps the most naive approach to multiset prediction is to transform the class set C into a set M (C) of all possible multisets. This transformation, or the size of M (C), is not well defined unless some constraints are put in place. If the maximum size of a target multiset is set to K, the number of all possible multisets is K X (|C| + k − 1)! k=1 k!(|C| − 1)! . With some constant |C|, we notice that this grows exponentially in the maximum size of the target multiset. Once the class set C is transformed, we can train a multi-class classifier π that maps an input x to one of the elements in M (C). However, this is infeasible in practice and generally intractable. For instance, for the COCO Medium dataset used later in the experiments (see section 4.1), M (C) has roughly 20 thousand elements while the dataset only contains roughly 40 thousand training examples. For the full MS COCO dataset, |M (C)| is on the order of 1049 , making it infeasible to learn a classifier using this method. Ranking A ranking problem can be considered as learning a mapping from a pair of input x and one of the items c ∈ C to its score s(x, c). All the items in the class set are then sorted according to the score, and this sorted order determines the rank of each item. By taking the top-K items from this sorted list, we can turn this problem of ranking into set prediction. Similarly to multiset prediction, the input x is arbitrary, and the target is a set without any prespecific order. However, ranking differs from multiset prediction in that it is unable to handle multiple occurrences of a single item in the target set. Aggregated Distribution Matching Instead of considering the target multiset as an actual multiset, one can convert it into a distribution by computing the frequency of each item from the class set 2 Under review as a conference paper at ICLR 2018 in the target multiset. That is, P p(y|x) = yi ∈Y Iyi =y , |Y| where I· is an indicator function. Then, we can simply minimize a divergence between this distribution and the predictive distribution from a model. This loss function works only when the conditional distribution p(y|x) substantially differs from the marginal distribution p(y), since the model would resort to a trivial solution of predicting the marginal distribution regardless of the input x. We describe this approach in more detail in Sec. 3.1, and test it against our proposal in the experiments. Sequence prediction A sequence prediction problem ischaracterized as finding a mapping from an input x to a sequence of classes Y = y1 , . . . , y|Y| . Representative examples of sequence prediction include machine translation, automatic speech recognition and other tagging problems, such as part-of-speech tagging, in natural language processing. Similarly to multiset prediction, the input x is arbitrary, and an item in the class set C may appear more than once in the target sequence. It is, however, different from multiset prediction in that there is a clear, predetermined order of items in the target sequence. We detail this sequence prediction approach later in Sec. 3.2. 2.2 M ULTISET L OSS F UNCTION FOR M ULTISET P REDICTION In this paper, we propose a novel loss function, called multiset loss, for the problem of multiset prediction. This loss function is best motivated by treating the multiset prediction problem as a sequential decision making process with a model being considered a policy π. This policy takes as input the input x and all the previously predicted classes ŷ<t at time t, and outputs the distribution over the next class to be predicted. That is, πθ (yt |ŷ<t , x). This policy is parametrized with a set θ of parameters. We first define a free label multiset at time t as Definition 1 (Free Label Multiset). Yt ← Yt−1 \ {ŷt−1 } ŷt−1 is the prediction made by the policy at time t − 1. This free label multiset Yt contains all the items that remain to be predicted after t − 1 predictions by the policy. We then construct an oracle policy π∗ . This oracle policy takes as input a sequence of predicted labels ŷ<t and the input x. It outputs a distribution whose entire probability (1) is evenly distributed over all the items in the free label multiset Yt . In other words, Definition 2 (Oracle).  1 |Yt | , if yt ∈ Yt π∗ (yt |ŷ<t , x) = 0, otherwise An interesting and important property of this oracle is that it is optimal given any prefix ŷ<t with respect to both precision and recall. This is intuitively clear by noticing that the oracle policy allows only a correct item to be selected. We call this property the optimality of the oracle. Remark 1. Given an arbitrary prefix ŷ<t , Prec(ŷ<t , Y) ≤ Prec(ŷ<t ∪ ŷ, Y) and Rec(ŷ<t , Y) ≤ Rec(ŷ<t ∪ ŷ, Y), for any ŷ ∼ π∗ (ŷ<t , x). The proof is given in Appendix A. From the remark above, it follows that the oracle policy is an optimal solution to the problem of multiset prediction in terms of precision and recall. Remark 2. Prec(ŷ≤|Y| , Y) = 1 and Rec(ŷ≤|Y| , Y) = 1, for all ŷ≤|Y| ∼ π∗ (y1 |x)π∗ (y2 |y1 , x) · · · π∗ (y|Y| |y<|Y| , x). 3 Under review as a conference paper at ICLR 2018 The proof can be found in Appendix B. It is trivial to show that sampling from such an oracle policy would never result in an incorrect prediction. That is, this oracle policy assigns zero probability to any sequence of predictions that is not a permutation of the target multiset. Remark 3. |Y| Y π∗ (yt |y<t , x) = 0, if multiset(y1 , . . . , y|Y| ) 6= Y. t=1 In short, this oracle policy tells us at each time step t which of all the items in the class set C must be selected. This optimality allows us to consider a step-wise loss between a parametrized policy πθ and the oracle policy π∗ , because the oracle policy provides us with an optimal decision regardless of the quality of the prefix generated so far. We thus propose to minimize the KL divergence from the oracle policy to the parametrized policy at each step separately. This divergence is defined as X 1 KL(π∗t kπθt ) = H(π∗t ) − log πθ (yj |ŷ<t , x), (1) | {z } |Yt | const. w.r.t. θ yj ∈|Yt | H(π∗t ) where is the entropy of the oracle policy at time step t. This entropy term can be safely ignored when learning πθ , since it is constant with respect to θ. We define Lt (x, Y, ŷ<t , θ) = KL(π∗t kπθt ) − H(π∗t ) (2) and call it a per-step loss function. We note that it is indeed possible to use another divergence in the place of the KL divergence. It is intractable to minimize the per-step loss from Eq. (2) for every possible state (ŷ<t , x), since the size of the state space grows exponentially with respect to the size of a target multiset. We thus propose here to minimize the per-step loss only for the state, defined as a pair of the input x and the prefix ŷ<t , visited by the parametrized policy πθ . That is, we generate an entire trajectory (ŷ1 , . . . , ŷT ) by executing the parametrized policy until either all the items in the target multiset have been predicted or the predefined maximum number of steps have passed. Then, we compute the loss function at each time t based on (x, ŷ<t ), for all t = 1, . . . , T . The final loss function is then the sum of all these per-step loss functions. Definition 3 (Multiset Loss Function). T X 1 X log πθ (yj |ŷ<t , x), L(x, Y, θ) = − |Yt | t=1 yj ∈Yt where T is the smaller of the smallest t for which Yt = ∅ and the predefined maximum number of steps allowed. As was shown by Ross et al. (2011), the use of the parametrized policy πθ instead of the oracle policy π∗ allows the upper bound on the learned policy’s error to be linear with respect to the size of the target multiset. If the oracle policy had been used, the upper bound would have grown quadratically with respect to the size of the target multiset. To confirm this empirically, we test the following three alternative strategies for executing the parametrized policy πθ in the experiments: 1. Greedy search: ŷt = arg maxy log πθ (y|ŷ<t , x) 2. Stochastic sampling: ŷt ∼ πθ (y|ŷ<t , x) 3. Oracle sampling: ŷt ∼ π∗ (y|ŷ<t , x) Once the proposed multiset loss is minimized, we evaluate the learned policy by greedily selecting each item from the policy. Variable-Sized Target Multiset We have defined the proposed loss function for multiset prediction while assuming that the size of the target multiset was known. However, this is a major limitation, and we relax this constraint by introducing an additional termination policy. The termination policy πs outputs a stop distribution given the predicted sequence of items ŷ<t and the input x. Because the size of the target multiset is known during training, we simply train this termination policy in a supervised way using a binary cross-entropy loss. At evaluation time, we simply threshold the predicted stop probability at a predefined threshold (0.5). 4 Under review as a conference paper at ICLR 2018 3 OTHER L OSS F UNCTIONS In addition to the proposed multiset loss function, we propose three more loss functions for multiset prediction. They serve as baselines in our experiments later. 3.1 AGGREGATED D ISTRIBUTION M ATCHING In the case of distribution matching, we consider the target multiset Y as a set of samples from a single, underlying distribution q ∗ over the class set C. This underlying distribution can be empirically estimated by counting the number of occurrences of each item c ∈ C in Y. That is, 1 X q∗ (c|x) = Iy=c , |Y| y∈Y where I is the indicator function as before. Similarly, we can construct an aggregated distribution computed by the parametrized policy πθ . As with the proposed multiset loss in Def. 3, we first execute πθ to predict a multiset Ŷ. This is converted into an aggregated distribution qθ in the same way as we turned the target multiset into the oracle aggregate distribution. Learning is equivalent to minimizing the divergence between these two distributions. In this paper, we test two types of divergences. The first one is from a family of Lp distances defined as Lpdm (x, Y, θ) = kq∗ − qθ kp , where q∗ and q are the vectors representing the corresponding categorical distributions. The other is a usual KL divergence defined earlier in Eq. (1): X LKL q∗ (c|x) log qθ (c|x). dm (x, Y, θ) = c∈C One major issue with this approach is that minimizing the divergence between the aggregated distributions does not necessarily result in the optimal policy (see the oracle policy in Def. 2.) That is, a policy that minimizes this loss function may assign non-zero probability to an incorrect sequence of predictions, unlike the oracle policy. This is due to the invariance of the aggregated distribution to the order of predictions. Later when analyzing this loss function, we empirically notice that a learned policy often has a different behaviour from the oracle policy, for instance, reflected by the increasing entropy of the action distribution over time. One-Step Variant We can train an one-step predictor with this aggregate distribution matching criterion, instead of learning a policy πθ . That is, a predictor outputs both a point qθ (·|x) in a |C|dimensional simplex and the size ˆlθ (x) of the target multiset. Then, for each unique item c ∈ C, the number of its occurrences in the predicted multiset Ŷ is #(c) = round(qθc (x) · ˆl(x)). The corresponding loss function is then X L1-step (x, Y, θ) = q∗ (c|x) log qθ (c|x) + λ(ˆlθ (x) − |Y|)2 , c∈C where λ > 0 is a coefficient for balancing the contributions from the two terms. A major weakness of this one-step variant, compared to the approaches based on sequential decision making, is the lack of modelling dependencies among the items in the predicted multiset. We test this approach in the experiments later and observe this lack of output dependency modelling results in substantially worse prediction accuracy. 3.2 S EQUENCE PREDICTION WITH A PREDEFINED ORDER All the loss functions defined so far have not relied on the availability of an existing order of items in a target multiset. However, by turning the problem of multiset prediction into sequential decision 5 Under review as a conference paper at ICLR 2018 making, minimizing such a loss function is equivalent to capturing an order of items in the target multiset implicitly. Here, we instead describe an approach based on explicitly defining an order in advance. This will serve as a baseline later in the experiments. We first define a rank function r that maps from one of the unique items in the class set c ∈ C to a unique integer. That is, r : C → Z. This function assigns the rank of each item and is used to order items yi in a target multiset Y. This results in a sequence S = (s1 , . . . , s|Y| ), where r(si ) ≥ r(sj ) for all j > i, and si ∈ Y. With this target sequence S created from Y using the rank function r, we define a sequence loss function as Lseq (x, S, θ) = − |S| X log πθ (st |s<t , x). t=1 Minimizing this loss function is equivalent to maximizing the conditional log-probability of the sequence S given x. This sequence loss function has two clear disadvantages. First, it does not take into account the actual behaviour of the policy πθ (see, e.g., Bengio et al., 2015; Daumé III & Marcu, 2005; Ross et al., 2011). This makes a learned policy potentially vulnerable to cascading error at test time. Second and more importantly, this loss function requires a pre-specified rank function r. Because multiset prediction does not come with such a rank function by definition, we must design an arbitrary rank function, and the final performance varies significantly based on the choice. We demonstrate this variation in section 4.3. Input-Dependent Rank Function When the input x has a well-known structure, and an object within the input for each item in the target multiset is annotated, it is possible to devise a rank function per input. A representative example is an image input with bounding box annotations. Here, we present two input-dependent rank functions in such a case. First, a spatial rank function rspatial assigns an integer rank to each item in a given target multiset Y such that rspatial (yi |x) < rspatial (yj |x), if posx (xi ) < posx (xj ) and posy (xi ) < posy (xj ), where xi and xj are the objects corresponding to the items yi and yj . Second, an area rank function rarea decides the rank of each label in a target multiset according to the size of the corresponding object inside the input image: rarea (yi |x) < rarea (yj |x), if area(xi ) < area(xj ). The area may be determined based on the size of a bounding box or the number of pixels, depending on the level of annotation. We test these two image-specific input-dependent rank functions against a random rank function in the experiments. 3.3 R EINFORCEMENT L EARNING In (Welleck et al., 2017), an approach based on reinforcement learning was proposed for multiset prediction. Instead of assuming the existence of an oracle policy, this approach solely relies on a reward function r designed specifically for multiset prediction. The reward function is defined as  1, if ŷt ∈ Yt r(ŷt , Yt ) = −1, otherwise The goal is then to maximize the sum of rewards over a trajectory of predictions from a parametrized policy πθ . The final loss function is " T # X LRL = −Eŷ∼πθ r(ŷ<t , Yt ) − λH(πθ (ŷ<t , x)) , (3) t=1 where the second term inside the expectation is the negative entropy multiplied with a regularization coefficient λ. The second term encourages the exploration during training. As in (Welleck et al., 6 Under review as a conference paper at ICLR 2018 2017), we use REINFORCE (Williams, 1992) to stochastically minimize the loss function above with respect to πθ . This loss function is optimal in that the return, i.e., the sum of the step-wise rewards, is maximized when both the precision and recall are maximal (= 1). In other words, the oracle policy, defined in Def. 2, maximizes the expected return. However, this approach of reinforcement learning is known to be difficult, with a high variance (Peters & Schaal, 2008). This is especially true here, as the size of the state space grows exponentially with respect to the size of the target multiset, and the action space of each step is as large as the number of unique items in the class set. 4 E XPERIMENTS AND A NALYSIS In this section, we extensively evaluate the proposed multiset loss function against various baseline loss functions presented throughout this paper. More specifically, we focus on its applicability and performance on image-based multiset prediction. 4.1 DATASETS MNIST Multi MNIST Multi is a class of synthetic datasets. Each dataset consists of multiple 100x100 images, each of which contains a varying number of digits from the original MNIST (LeCun et al., 1998). We vary the size of each digit and also add clutters. In the experiments, we consider the following variants of MNIST Multi: • MNIST Multi (4): |Y| = 4, 20-50 pixel digits • MNIST Multi (1-4): |Y| ∈ {1, . . . , 4}, 20-50 pixel digits • MNIST Multi (10): |Y| = 10, 20 pixel digits Each dataset has a training set with 70,000 examples and a test set with 10,000 examples. We randomly sample 7,000 examples from the training set to use as a validation set, and train with the remaining 63,000 examples. MS COCO As a real-world dataset, we use Microsoft COCO (Lin et al., 2014) which includes natural images with multiple objects. Compared to MNIST Multi, each image in MS COCO has objects of more varying sizes and shapes, and there is a large variation in the number of object instances per image which spans from 1 to 91. The problem is made even more challenging with many overlapping and occluded objects. To control the difficulty in order to better study the loss functions, we create the following two variants: • COCO Easy: |Y| = 2, 10,230 training examples, 24 classes • COCO Medium: |Y| ∈ {1, . . . , 4}, 44,121 training examples, 23 classes In both of the variants, we only include images whose |Y| objects are large and of common classes. An object is defined to be large if the object’s area is above the 40-th percentile across the train set of MS COCO. After reducing the dataset to have |Y| large objects per image, we remove images 1 containing only objects of rare classes. A class is considered rare if its frequency is less than |C| , where C is the class set. These two stages ensure that only images with a proper number of large objects are kept. We do not use fine-grained annotation (pixel-level segmentation and bounding boxes) except for creating input-dependent rank functions from Sec. 3.2. For each variant, we hold out a randomly sampled 15% of the training examples as a validation set. We form separate test sets by applying the same filters to the COCO validation set. The test set sizes are 5,107 for COCO Easy and 21,944 for COCO Medium. 7 Under review as a conference paper at ICLR 2018 4.2 M ODELS MNIST Multi We use three convolutional layers of channel sizes 10, 10 and 32, followed by a convolutional long short-term memory (LSTM) layer (Xingjian et al., 2015). At each step, the feature map from the convolutional LSTM layer is average-pooled spatially and fed to a softmax classifier. In the case of the one-step variant of aggregate distribution matching, the LSTM layer is skipped. MS COCO We use a ResNet-34 (He et al., 2016) pretrained on ImageNet (Deng et al., 2009) as a feature extractor. The final feature map from this ResNet-34 is fed to a convolutional LSTM layer, as described for MNIST Multi above. We do not finetune the ResNet-34 based feature extractor. Training and evaluation For each loss, a model was trained for 200 epochs (350 for MNIST Multi 10). After each epoch, exact match was computed on the validation set. The model state with the highest validation exact match was used for evaluation on the test set. Table 1: Influence of the choice of a rank function on the sequence prediction loss function MNIST Multi (4) COCO Easy EM F1 EM F1 Random 0.920 When evaluating a trained policy, we use Area 0.529 greedy decoding and auxiliary stop prediction Spatial 0.917 for determining the size of a predicted multiset. Each predicted multiset is compared against the ground-truth target multiset, and we report both the accuracy based F-1 score (F1). 0.977 0.830 0.976 0.721 0.700 0.675 0.779 0.763 0.738 on the exact match (EM) and More details about the model architectures and training are in the Appendix C. 4.3 E XPERIMENT 1: I NFLUENCE OF A R ANK F UNCTION ON S EQUENCE P REDICTION First, we investigate the sequence loss function Lseq from Sec. 3.2, while varying a rank funcTable 2: Selection Strategies tion. We test three alternatives: a random rank MNIST Multi (10) COCO Easy function3 r and two input-dependent rank funcEM F1 EM F1 tions rspatial and rarea . We compare these rank functions on MNIST Multi (4) and COCO Easy Greedy 0.920 0.992 0.702 0.788 validation sets. Stochastic 0.907 0.990 0.700 0.790 Oracle 0.875 0.986 0.696 0.780 We present the results in Table 1. It is clear from the results that the performance of the sequence prediction loss function is dependent on the choice of a rank function. In the case of MNIST Multi, the area-based rank function was far worse than the other choices. However, this was not true on COCO Easy, where the spatial rank function was worst among the three. In both cases, we have observed that the random rank function performed best, and from here on, we use the random rank function in the remaining experiments. This set of experiments firmly suggests the need of an order-invariant multiset loss function, such as the multiset loss function proposed in this paper. 4.4 E XPERIMENT 2: E XECUTION S TRATEGIES FOR THE M ULTISET L OSS F UNCTION In this set of experiments, we compare the three execution strategies for the proposed multiset loss function, illustrated in Sec. 3. They are greedy decoding, stochastic sampling and oracle sampling. We test them on MNIST Multi (10) and COCO Easy. As shown in Table 2, greedy decoding and stochastic sampling, both of which consider states that are likely to be visited by the parametrized policy, outperform the oracle sampling. This is consistent with the theory by Ross et al. (2011). Although the first two strategies perform comparably to each other, across both of the datasets and the two evaluation metrics, greedy decoding tends to outperform stochastic sampling. We conjecture this is due to better matching between training and 3 The random rank function is generated before training and held fixed. We verified that generating a new random rank function for each batch significantly decreased performance. 8 Under review as a conference paper at ICLR 2018 Table 3: Loss Function Comparison on the variants of MNIST Multi MNIST Multi (4) MNIST Multi (1-4) MNIST Multi (10) EM F1 EM F1 EM F1 Proposed L LRL L1dm LKL dm Lseq L1-step 0.950 0.912 0.921 0.908 0.906 0.210 0.987 0.977 0.978 0.974 0.973 0.676 0.953 0.945 0.918 0.908 0.891 0.055 0.981 0.980 0.969 0.962 0.952 0.598 0.920 0.665 0.239 0.256 0.592 0.032 0.992 0.970 0.714 0.874 0.946 0.854 testing in the case of greedy decoding. Thus, from here on, we use greedy decoding when training a model with the proposed multiset loss function. 4.5 E XPERIMENT 3: L OSS F UNCTION C OMPARISON We now compare the proposed multiset loss function against the five baseline loss functions: reinforcement learning LRL , aggregate distribution matching–L1dm and LKL dm –, its one-step variant L1-step , and sequence prediction Lseq . MNIST Multi We present the results on the MNIST Multi variants in Table 3. On all three variants and according to both metrics, the proposed multiset loss function outperforms all the others. The reinforcement learning based approach closely follows behind. Its performance, however, drops as the number of items in a target multiset increases. This is understandable, as the variance of policy gradient grows as the length of an episode grows. A similar behaviour was observed with sequence prediction as well as aggregate distribution matching. We were not able to train any decent models with the one-step variant of aggregate distribution matching. This was true especially in terms of exact match (EM), which we attribute to the one-step variant not being capable of modelling dependencies among the predicted items. MS COCO Similarly to the results on the variants of MNIST Multi, the proposed multiset loss function matches or outperforms all the others on the two variants of MS COCO, as presented in Table 4. On COCO Easy, with only two objects to predict per example, both aggregated distribution matching (with KL divergence) and the sequence loss functions are as competitive as the proposed multiset loss. The other loss functions significantly underperform these three loss functions, as they did on MNIST Multi. Table 4: Loss function comparison on the variants of MS COCO COCO Easy COCO Medium EM F1 EM F1 Proposed L LRL L1dm LKL dm Lseq L1-step 0.702 0.672 0.533 0.714 0.709 0.552 0.788 0.746 0.614 0.763 0.774 0.664 0.481 0.425 0.221 0.444 0.457 0.000 0.639 0.564 0.085 0.591 0.592 0.446 The performance gap between the proposed loss and the others, however, grows substantially on the more challenging COCO Medium, which has more objects per example. The proposed multiset loss outperforms the aggregated distribution matching with KL divergence by 3.7 percentage points on exact match and 4.8 on F1. This is analogous to the experiments on the MNIST Multi variants, where the performance gap increased when moving from four to ten digits. 4.6 A NALYSIS : E NTROPY E VOLUTION One property of the oracle policy defined in Sec. 2.2 is that the entropy of the predictive distribution strictly decreases over time, i.e., Hπ∗ (y|ŷ<t , x) > Hπ∗ (y|ŷ≤t , x). This is a natural consequence from the fact that there is no pre-specified rank function, because the oracle policy cannot prefer any item from the others in a free label multiset. Hence, we examine here how the policy learned based 9 Under review as a conference paper at ICLR 2018 on each loss function compares to the oracle policy in terms of per-step entropy. We consider the policies trained on MNIST Multi (10), where the differences among them were most clear. As shown in Fig. 1, the policy trained on MNIST Multi (10) using the proposed multiset loss closely follows the oracle policy. The entropy decreases as the predictions are made. The decreases can be interpreted as concentrating probability mass on progressively smaller free labels sets. The variance is quite small, indicating that this strategy is uniformly applied for any input. The policy trained with reinforcement learning retains a relatively low entropy across steps, with a decreasing trend in the second half. We carefully suspect the low entropy in the earlier steps is due to the greedy nature of policy gradient. The policy receives a high reward more easily by choosing one of many possible choices in an earlier step than in a later step. This effectively discourages the policy from exploring all possible trajectories during training. Figure 1: Comparison of per-step entropies of predictive distributions compared over the validation set. On the other hand, the policy found by aggregated distribution matching (LKL dm ) has the opposite behaviour. The entropy in general grows as more predictions are made. To see why this is sub-optimal, consider the final (10th) step. Assuming the first nine predictions {ŷ1 , ..., ŷ9 } were correct (i.e. they form a subset of Y), there is only one correct class left for the final prediction ŷ10 . The high entropy, however, indicates that the model is placing a significant amount of probability on incorrect sequences. We believe such a policy is found by minimizing the aggregated distribution matching loss function because it cannot properly distinguish between policies with increasing and decreasing entropies. The increasing entropy also indicates that the policy has learned a rank function implicitly and is fully relying on it. Given some unknown free label multiset, inferred from the input, this policy uses the implicitly learned rank function to choose one item from this set. We conjecture this reliance on an inferred rank function, which is by definition sub-optimal,4 resulted in lower performance of aggregate distribution matching. 5 C ONCLUSION We have extensively investigated the problem of multiset prediction in this paper. We rigorously defined the problem, and proposed to approach it from the perspective of sequential decision making. In doing so, an oracle policy was defined and shown to be optimal, and a new loss function, called multiset loss, was introduced as a means to train a parametrized policy for multiset prediction. The experiments on two families of datasets, MNIST Multi variants and MS COCO variants, have revealed the effectiveness of the proposed loss function over other loss functions including reinforcement learning, sequence, and aggregated distribution matching loss functions. The success of the proposed multiset loss brings in new opportunities of applying machine learning to various new domains, including high-energy physics. R EFERENCES Samy Bengio, Oriol Vinyals, Navdeep Jaitly, and Noam Shazeer. Scheduled sampling for sequence prediction with recurrent neural networks. In Advances in Neural Information Processing Systems, pp. 1171–1179, 2015. Hal Daumé III and Daniel Marcu. Learning as search optimization: Approximate large margin methods for structured prediction. In Proceedings of the 22nd international conference on Machine learning, pp. 169–176. ACM, 2005. 4 Note that this synthetic data was created without any specific rank function. 10 Under review as a conference paper at ICLR 2018 Jia Deng, Wei Dong, Richard Socher, Li-Jia Li, Kai Li, and Li Fei-Fei. Imagenet: A large-scale hierarchical image database. In Computer Vision and Pattern Recognition, 2009. CVPR 2009. IEEE Conference on, pp. 248–255. IEEE, 2009. W Ehrenfeld, R Buckingham, J Cranshaw, T Cuhadar Donszelmann, T Doherty, E Gallas, J Hrivnac, D Malon, M Nowak, M Slater, F Viegas, E Vinek, Q Zhang, and the ATLAS Collaboration. Using tags to speed up the atlas analysis process. Journal of Physics: Conference Series, 331(3):032007, 2011. URL http://stacks.iop.org/1742-6596/331/i=3/a=032007. Kaiming He, Xiangyu Zhang, Shaoqing Ren, and Jian Sun. Deep residual learning for image recognition. In Proceedings of the IEEE conference on computer vision and pattern recognition, pp. 770–778, 2016. Kaiming He, Georgia Gkioxari, Piotr Dollár, and Ross Girshick. Mask R-CNN. arXiv preprint arXiv:1703.06870, 2017. Diederik Kingma and Jimmy Ba. Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980, 2014. Yann LeCun, Léon Bottou, Yoshua Bengio, and Patrick Haffner. Gradient-based learning applied to document recognition. Proceedings of the IEEE, 86(11):2278–2324, 1998. V. Lempitsky and A. Zisserman. Learning to count objects in images. In Advances in Neural Information Processing Systems, 2010. Tsung-Yi Lin, Michael Maire, Serge Belongie, James Hays, Pietro Perona, Deva Ramanan, Piotr Dollár, and C Lawrence Zitnick. Microsoft coco: Common objects in context. In European conference on computer vision, pp. 740–755. Springer, 2014. J. Peters and S. Schaal. Reinforcement learning of motor skills with policy gradients. Neural Networks, 21(4):682–697, May 2008. Stéphane Ross, Geoffrey J Gordon, and Drew Bagnell. A reduction of imitation learning and structured prediction to no-regret online learning. In International Conference on Artificial Intelligence and Statistics, pp. 627–635, 2011. Sean Welleck, Kyunghyun Cho, and Zheng Zhang. Saliency-based sequential image attention with multiset prediction. In Advances in neural information processing systems, 2017. to appear. Ronald J Williams. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning, 8(3-4):229–256, 1992. SHI Xingjian, Zhourong Chen, Hao Wang, Dit-Yan Yeung, Wai-Kin Wong, and Wang-chun Woo. Convolutional lstm network: A machine learning approach for precipitation nowcasting. In Advances in neural information processing systems, pp. 802–810, 2015. A P ROOF OF R EMARK 1 Proof. Note that the precision with ŷ<t is defined as P Prec(ŷ<t , Y) = y∈ŷ<t Iy∈Y |ŷ<t | . Because ŷ ∼ π∗ (ŷ<t , x) ∈ Yt , Prec(ŷ≤t , Y) = 1+ P y∈ŷ<t Iy∈Y 1 + |ŷ<t | . Then, 1 − Prec(ŷ<t , Y) ≥ 0, 1 + |ŷ<t | because 0 ≤ Prec(ŷ<t , Y) ≤ 1 and |ŷ<t | ≥ 0. The equality holds when Prec(ŷ<t , Y) = 1. Prec(ŷ≤t , Y) − Prec(ŷ<t , Y) = 11 Under review as a conference paper at ICLR 2018 Similarly, we start with the definition of the recall: P Rec(ŷ<t , Y) = y∈ŷ<t Iy∈Y |Y| . Because ŷ ∼ π∗ (ŷ<t , x) ∈ Yt , Rec(ŷ≤t , Y) = 1+ P y∈ŷ<t Iy∈Y |Y| . Since the denominator is identical, Rec(ŷ≤t , Y) − Rec(ŷ<t , Y) = B 1 ≥ 0. |Y| P ROOF OF R EMARK 2 Proof. When t = 1, Prec(ŷ≤1 , Y) = 1, because ŷ1 ∼ π∗ (∅, x) ∈ Y. From Remark 1, we know that Prec(ŷ≤t , Y) = Prec(ŷ<t , Y), when Prec(ŷ<t , Y) = 1. By induction, Prec(ŷ≤|Y| , Y) = 1. From the proof of Remark 1, we know that the recall increases by that 1 , Rec(ŷ≤1 , Y) = |Y| 1 Y each time, and we also know when t = 1. After |Y| − 1 steps of executing the oracle policy, the recall becomes |Y| X 1 1 Rec(ŷ≤|Y| , Y) = + = 1. |Y| |Y| 0 t =2 C M ODEL D ESCRIPTIONS Figure 2: Graphical illustration of a predictor used throughout the experiments. 12 Under review as a conference paper at ICLR 2018 Model An input x is first processed by a tower of convolutional layers, resulting in a feature 0 0 volume of size w0 × h0 with d feature maps, i.e., H = φ(x) ∈ Rw ×h ×d . At each time step t, 0 0 we resize the previous prediction’s embedding emb(ŷt−1 ) ∈ R(w )(h ) to be a w0 × h0 tensor and 0 0 concatenate it with H, resulting in H̃ ∈ Rw ×h ×(d+1) . This feature volume is then fed into a stack 0 0 of convolutional LSTM layers. The output from the final convolutional LSTM layer C ∈ Rw ×h ×q 0 P 0 P w h is spatially average-pooled, i.e., c = w01h0 i=1 j=1 Ci,j,· ∈ Rq . This feature vector c is then turned into a conditional distribution over the next item after affine transformation followed by a softmax function. When the one-step variant of aggregated distribution matching is used, we skip Pw0 Ph0 the convolutional LSTM layers, i.e., c = w01h0 i=1 j=1 Hi,j,· ∈ Rd . See Fig. 2 for the graphical illustration of the entire network. See Table 5 for the details of the network for each dataset. Data MNIST Multi MS COCO Table 5: Network Architectures CNN emb(ŷt−1 ) conv 5 × 5 max-pool 2 × 2 feat 10 conv 5 × 5 max-pool 2 × 2 feat 10 conv 5 × 5 max-pool 2 × 2 feat 32 81 ResNet-34 361 ConvLSTM conv 3 × 3 feat 32 conv 3 × 3 feat 32 conv 3 × 3 feat 512 conv 3 × 3 feat 512 Preprocessing For MNIST Multi, we do not preprocess the input at all. In the case of MS COCO, input images are of different sizes. Each image is first resized so that its larger dimension has 600 pixels, then along its other dimension is zero-padded to 600 pixels and centered, resulting in a 600x600 image. Training The model is trained end-to-end, except ResNet-34 which remains fixed after being pretrained on ImageNet. For all the experiments, we train a neural network using Adam (Kingma & Ba, 2014) with a fixed learning rate of 0.001, β of (0.9, 0.999) and  of 1e-8. The learning rate was selected based on the validation performance during the preliminary experiments, and the other parameters are the default values. For MNIST Multi, the batch size was 64, and for COCO was 32. 13
1cs.CV
1 TPC Together with Overlapped Time Domain Multiplexing System Based on Turbo Structure Hao Zheng, Mingjun Xing, Yutao Yue, Xue Li, Daoben Li and Chunlin Ji Kuang-Chi Institute of Advanced Technology, Shenzhen, China arXiv:1708.02910v1 [cs.IT] 9 Aug 2017 Email: {hao.zheng, chunlin.ji}@kuang-chi.org Abstract Overlapped time domain multiplexing (OvTDM) is a novel technique for utilizing inter-symbol interference (ISI) to benefit a communication system. We implement the OvTDM technique based on turbo structure and associate a turbo product code (TPC) to construct a novel coded turbo-structure OvTDM system. Two schemes of the iterative receiver and soft input and soft output (SISO) decoding algorithms are presented. Simulation results show the advantage of structures in this paper. In addition, an attractive transmission rate and symbol efficiency of the designed system can also be observed. I. I NTRODUCTION It is well known that most traditional communication systems are designed based on Nyquist criterion [1], in which intersymbol interference (ISI) should be avoided between consequent symbols. In fact, the communication system without ISI is physically unrealizable. On the other hand, people tend to design a communication system with controlled ISI, such as Fasterthan-Nyquist (FTN) signaling [2] and partial response signaling (PRS) [3]. However, these methods also treat the overlap between symbols as interference and do not really utilize it to collect the extra gain. Based on ISI to benefit a communication system, overlapped time domain multiplexing (OvTDM) is proposed in [4]-[6]. The idea of OvTDM is to shift a data-weighted and band-limited multiplexing waveform in the time domain to achieve an overlap between different transmitted symbols and a high transmission rate. It can help to form a convolution structure among consequent symbols, so OvTDM can also be regarded as one kind of waveform convolution coding. In the OvTDM system, these overlapped parts are never regarded as ISI but rather as a beneficial encoding constraint relationship. Therefore, OvTDM can show great performance of the transmission rate and the symbol efficiency that is defined as bits per symbol [4][5]. Maximum likelihood sequence detection (MLSD) [7] and maximum a posteriori (MAP) detection can be utilized to detect OvTDM signals. From the point of view of waveform convolution coding, the detection process can also be called OvTDM decoding. Most previous studies have focused on the single structure of the OvTDM system. However, another way to improve the OvTDM system is to extend the coding structure [8][9]. So, we construct a turbo structure inspired by the turbo code [10] for OvTDM. In addition, turbo product code (TPC) is employed as the forward-error-correction (FEC) module together with the turbo structure of OvTDM. In comparison to another popular FEC code, the low-density parity-check code (LDPC) [11][12], TPC is suitable to be constructed with a shorter code length and requires fewer iterations for decoding [13][14]. Finally, a coding system with three layers is formed, which contains the FEC code, the turbo structure and OvTDM respectively. Comparative simulation studies with the coded QAM system show the significant advantage of the coded turbo-strucutre of OvTDM. 2 Fig. 1. The transmitter structure of the turbo-structure OvTDM together with TPC. II. S YSTEM D ESCRIPTION A. OvTDM Scheme In the OvTDM system, we artificially introduce ISI to form an overlap among different symbols. The mapping relationship between original bits and constellation symbols can follow the rule of ordinary modulation methods. Assuming the transmitted signals followed BPSK as x = [x0 , x1 , · · · , xL−1 ] with length L and the multiplexing waveform as h(t), t ∈ [0, Ts ) with symbol duration Ts , then the transmitted signal after overlapping can be expressed as s(t) = L−1 X i=0 xi h(t − iTs /K) = L−1 X i=0 xi h(t − i∆T ) (1) where ∆T = Ts /K is the time shift between symbols. In (1), K is the number of overlapped symbols during ∆T , which is named the overlapping coefficient or the constraint length. Notice that, the larger the coefficient K is, the more serious the ISI introduced. B. Turbo-Structure OvTDM with FEC Fig.1 shows the transmitter of the turbo-structure OvTDM with FEC. The coded sequence that has passed the FEC encoder and one interleaver is sent to the first OvTDM encoder for the I channel. Meanwhile, the same sequence is sent to pass the other interleaver to form another sequence with a different order, which is encoded by the second OvTDM encoder for the Q channel. The output sequences from both two OvTDM encoders are combined to form a complex sequence. The decoding process at the receiver is the key to the system design. It is based on the idea of iteration and the extrinsic information transformation [10]. During each iteration, the extrinsic information is exchanged between different decoders. The interleaver and the de-interleaver are employed to match the order of received sequences. Exchanging extrinsic information with low correlation can help to improve performance with the increase of iterations. Together with FEC, two schemes are addressed as follows: Scheme A: After one round of decoding between two OvTDM decoders, the soft information is sent to the FEC decoder. Then the FEC decoder sends the soft information back to the OvTDM decoder. The model is shown in Fig.2. In this scheme, the FEC decoder needs to be involved in every iteration of the turbo structure. Scheme B: As shown in Fig.3, OvTDM decoders work iteratively and do not exchange soft information with the FEC decoder at first. After several iterations, the soft information is sent to the FEC decoder. Unlike in Scheme A, the soft information is only exchanged once between OvTDM decoders and the FEC decoder. The Viterbi algorithm [15] is a good choice for detecting the OvTDM signals and selecting the possible sequence that is nearest to the received sequence [4][5]. However, in the turbo structure, we need to exchange the extrinsic information for original bits, so soft output detecting algorithms [16][17] are more appropriate. 3 Fig. 2. The receiver structure of the turbo-structure OvTDM together with TPC (Scheme A). Fig. 3. The receiver structure of the turbo-structure OvTDM together with TPC (Scheme B). III. D ECODING A LGORITHMS A. MAP Algorithm for OvTDM As discussed in the above sections, OvTDM utilizes the ISI as the encoding constraint. Thus, it can also be represented as a trellis graph [5]. The BCJR algorithm [16] is regarded as an optimal MAP method based on the trellis graph, so it can be modified to calculate the maximum a posteriori probability (APP) for OvTDM encoded bits. Denoting the input bit at time t as xt and the received sequence at the receiver as r with length N , the log-likelihood-ratio (LLR) of APP of xt is λt = log = log p(xt = +1|r) p(xt = −1|r) P p(St−1 , St , r) (St−1 ,St ),xt =+1 P (2) p(St−1 , St , r) (St−1 ,St ),xt =−1 where St and St−1 are assumed as states of time t and t − 1 based on the trellis graph. According to properties of OvTDM, p(St−1 , St , r) can be further expressed by p(St−1 , St , r) = αt (St−1 )γt (St−1 , St )βt (St ) where αt (St−1 ) and βt (St ) can be calculated by forward and backward recursion: X αt (St−1 ) = αt−1 (St−2 )γt (St−1 , St ) (3) (4) St−1 βt (St ) = X βt+1 (St+1 )γt+1 (St , St+1 ) (5) St+1 Assuming the corresponding output bit at time t after OvTDM encoding as yt , then γt (St−1 , St ) = p(xt )p(rt |yt ) (6) 4 It is worth noting that there is no input bit in the tail part of OvTDM. So, βL (SL ) can be initialized directly. In the AWGN channel, 1 βL (SL ) = √ K 2πσ  N P 2  (rt − yt )    i=L  exp −  2   2σ (7) where σ 2 is the variance of noise. Let LLR of a prior probability and the extrinsic information be µt and et , in the iterative decoder, the extrinsic information can be obtained by et = λt − µt (8) which is the output of the OvTDM decoding module. B. FBBA for TPC One mainstream method of TPC decoding algorithm is augmented list decoding (ALD) [13][14]. The key idea of ALD is to form a list including the most likely codewords. Based on ALD, the Fang-Battail-Buda-Algorithm (FBBA) [14] is an efficient SISO algorithm for TPC decoding to achieve near-optimum performance. FBBA is concluded as follows: Step 1: Sort the received symbols d in a decreasing order according to the LLR metric l. Step 2: Permute the check matrix H according to the permutation pattern from the Step 1. Then, it has to be adjusted by Gauss-Jordan elimination to obtain a systematic one Hπ that is used to re-code the component codeword to generate a new one cπ(0) . Step 3: A codebook list is obtained through the reversal of certain positions of cπ(0) and sorted in an increasing order according to π(i) Z(l, c )=− n−1 X j=0 log π(i) ) π(0) ) p(lj |cj p(lj |cj (9) where cπ(i) and n are denoted as the ith codeword in the codebook list and the component codeword length. Step 4: The soft output can be calculated by the first codeword cπ(0) and the opposite to the first codeword in jth position in the codebook list. ρj = 1 (||l − cπ(opp) ||2 − ||l − cπ(0) ||2 ) 4 (10) Following the above process, soft outputs can be calculated. Generally, four iterations are sufficient for the BER performance to converge. IV. S IMULATION S TUDIES In this section, we need to investigate the performance through some comparative simulation. We choose the Chebyshev waveform with attenuation level 80dB as the multiplexing waveform for OvTDM. Extended BCH(64, 57) is employed as the 2 component codeword to construct a squared TPC. Thus, the code rate is RT P C = (57/64) = 0.7932. The AWGN channel is considered as the transmission channel in the simulation. As mentioned before, the turbo-structure OvTDM uses the same information sequence for both I and Q channels, so its equivalent coding rate with TPC is ROvT = 1/2 · RT P C · L/N . When the length of the information sequence is large enough, 5 −1 10 The turbo−structure OvTDM with TPC (Scheme A) The turbo−structure OvTDM with TPC (Scheme B) 64−QAM with TPC −2 10 −3 BER 10 −4 10 −5 10 −6 10 4 5 6 7 Eb/No(dB) 8 9 10 Fig. 4. BER performance of the turbo-structure OvTDM (K = 6) and 64-QAM with TPC(64, 57)2 . −1 10 The turbo−structure OvTDM with TPC (Scheme A) The turbo−structure OvTDM with TPC (Scheme B) 256−QAM with TPC −2 10 −3 BER 10 −4 10 −5 10 −6 10 5 6 7 8 9 10 11 Eb/No(dB) 12 13 14 15 Fig. 5. BER performance of the turbo-structure OvTDM (K = 8) and 256-QAM with TPC(64, 57)2 . L/N ≈ 1, so we ignore it in the simulation. BPSK is used as the original modulation for the OvTDM system. Thus, the symbol efficiency of the turbo-structure OvTDM with TPC is ηOvT = ROvT · 2K = RT P C · K (bits/symbol). On the other hand, if we select M -ary QAM with TPC for comparison, its symbol efficiency is ηQAM = log 2(M ) · RT P C (bits/symbol). In order to do the comparative studies under the same symbol efficiency, we select K = 6 and 64-QAM in Fig.4 as well as K = 8 and 256-QAM in Fig.5. The BER plots in both Fig.4 and Fig.5 show the significant advantage of the coded turbo-structure OvTDM. In Fig.4, the same symbol efficiency is 4.7592 (bits/symbol) and the required Eb /N0 of 64-QAM with TPC to achieve the BER < 10−5 is 10dB, but the turbo-structure OvTDM with TPC can achieve BER < 10−5 at 5.8dB. In Fig.5, the same symbol efficiency is 6.3456 (bits/symbol) and the required Eb /N0 of the turbo-structure with TPC using Scheme B to achieve the BER < 10−5 is 7.4dB less than that of 256-QAM with TPC. Moreover, Fig.6 illustrates the comparison result of the symbol efficiency among different schemes when BER < 10−5 . The symbol efficiency of the single structure OvTDM has been shown in [5]. Also, we plot the corresponding symbol efficiency of the Shannon Limit [18]. In Fig.6, the turbo-structure OvTDM with TPC has a obvious improvement, compared with the single structure OvTDM. On the other hand, with the increase of the symbol efficiency, schemes in this paper can achieve it at a lower Eb /N0 than the Shannon Limit that represents traditional communication systems. V. C ONCLUSION This paper mainly focuses on structures and SISO decoding algorithms of the turbo-structure OvTDM with TPC, which demostrate a significant improvement over the single structure OvTDM. In addition, compared with the coded QAM system of 6 8 7 bits/symbol 6 The turbo−structure OvTDM with TPC (Scheme A) The turbo−structure OvTDM with TPC (Scheme B) The single structure Shannon Limit 5 4 3 2 1 0 2 4 6 8 Eb/No(dB) 10 12 14 16 Fig. 6. Comparison of the symbol efficiency (bits/symbol) among different schemes. the same symbol efficiency, the BER performance of the turbo-structure OvTDM with TPC is much better. Simulation results shows the advantage of the turbo-structure OvTDM with TPC in the communication scenario requiring high transmission rate at a relatively low Eb /N0 . R EFERENCES [1] J. G. Proakis, Digital Communications, 4th ed, Macgraw Hill, New York, 2001. [2] J. E. Mazo, “Faster-than-nyquist signaling,” Bell Syst. Tech. J., vol. 54, no. 8, pp. 1451-1462, Oct. 1975. [3] P. Kabal and S. Pasupathy, “Partial-Response Signaling,” IEEE Trans. Commun., vol. 23, no. 9, pp. 921-934, Sep. 1975. [4] D. Li, “A novel high spectral efficiency waveform coding-OVTDM,” International Journal of Wireless Communications and Mobile Computing, Special Issue: 5G Wireless Communication Systems, vol. 2, no. 4-1, pp. 11-26, Dec. 2014. [5] D. Li, Waveform Coding Theory of High Spectral Efficiency–OVTDM and Its Application, Science Press, Beijing, 2013. [6] C. Ji and R. Liu, “Study on a High Spectrum Modulation by Introducing Intersymbol Interference,” in Proc. 2016 IEEE Int. Conf. on Signal Processing, Communications and Computing, Hong Kong, , pp. 2904-2909, Aug. 2016. [7] G. D. Forney, “Maximum Likelihood Sequence Estimation of Digital Sequences in the presence of intersymbol interference,” IEEE Trans. Inform. Theory, vol 18, no. 3, pp. 363-378, May 1972. [8] X. Dong, “Research on the performance of OvTDM and Turbo-OvTDM technology application in multi-carrier system,” M.Sc. Dissertation, Beijing Univ. Posts Telecommun., 2013. [9] B. Liu, “Applications of overlapped multiplexing principle in telecommunications,” Ph.D. Dissertation, Beijing Univ. Posts Telecommun., 2014. [10] C. Berrou and A. Glavieux, “Near optimum error correcting coding and decoding: Turbo codes,” IEEE Trans. Commun., vol. 44, no. 10, pp. 1261-1271, Oct. 1996. [11] R. Gallager, “Low-density parity-check codes,” IRE Trans. Inform. Theory, vol. 8, no. 1, pp. 21-28, Jan. 1968. [12] D. J. C. MacKay and R. M. Neal, “Near shannon limit performance of low density parity check codes,” Electron. Lett., vol. 33, no. 6, pp. 457-458, Mar. 1997. [13] R. Pyndiah, “Near optimum decoding of product codes: block turbo codes,” IEEE Trans. Commun., vol. 46, no. 8, pp. 1003-1010, Aug. 1998. [14] J. Fang, F. Buda and E. Lemois, “Turbo Product Code: a well suitable solution to wireless packet transmission for very low error rates,” in Proc. 2nd Int. Symp. on Turbo Codes & Related Topics, France, pp. 101-111, Sep. 2000. [15] A. J. Viterbi, “Error bounds for convolutional codes and an asymtotically optimum decoding algorithm,” IEEE Trans. Inform. Theory, vol. 13, no. 2, pp. 260-269, Apr. 1967. [16] L. R. Bahl, J. Cocke, F. Jelinek, and J. Raviv, “Optimal decoding of linear codes for minimizing symbol error rate,” IEEE Trans. Inform. Theory, vol. 20, no. 2, pp. 284-287, Mar. 1974. [17] C. Ji, “On Sequential Learning for Parameter Estimation in Particle Algorithms for State-Space Models,” International Journal of Statistics and Probability, vol. 6, no. 1, pp. 13-23, Jan. 2017. [18] C. E. Shannon, “A mathematical theory of communication,” Bell Syst. Tech. J., vol. 27, no. 7, pp. 379-423, 1948.
7cs.IT
Variational Walkback: Learning a Transition Operator as a Stochastic Recurrent Net arXiv:1711.02282v1 [stat.ML] 7 Nov 2017 Anirudh Goyal MILA, Université de Montréal [email protected] Surya Ganguli Stanford University [email protected] Nan Rosemary Ke MILA, École Polytechnique de Montréal [email protected] Yoshua Bengio MILA, Université de Montréal [email protected] Abstract We propose a novel method to directly learn a stochastic transition operator whose repeated application provides generated samples. Traditional undirected graphical models approach this problem indirectly by learning a Markov chain model whose stationary distribution obeys detailed balance with respect to a parameterized energy function. The energy function is then modified so the model and data distributions match, with no guarantee on the number of steps required for the Markov chain to converge. Moreover, the detailed balance condition is highly restrictive: energy based models corresponding to neural networks must have symmetric weights, unlike biological neural circuits. In contrast, we develop a method for directly learning arbitrarily parameterized transition operators capable of expressing nonequilibrium stationary distributions that violate detailed balance, thereby enabling us to learn more biologically plausible asymmetric neural networks and more general non-energy based dynamical systems. The proposed training objective, which we derive via principled variational methods, encourages the transition operator to "walk back" (prefer to revert its steps) in multi-step trajectories that start at datapoints, as quickly as possible back to the original data points. We present a series of experimental results illustrating the soundness of the proposed approach, Variational Walkback (VW), on the MNIST, CIFAR-10, SVHN and CelebA datasets, demonstrating superior samples compared to earlier attempts to learn a transition operator. We also show that although each rapid training trajectory is limited to a finite but variable number of steps, our transition operator continues to generate good samples well past the length of such trajectories, thereby demonstrating the match of its non-equilibrium stationary distribution to the data distribution. Source Code: http://github.com/anirudh9119/walkback_nips17 1 Introduction A fundamental goal of unsupervised learning involves training generative models that can understand sensory data and employ this understanding to generate, or sample new data and make new inferences. In machine learning, the vast majority of probabilistic generative models that can learn complex probability distributions over data fall into one of two classes: (1) directed graphical models, corresponding to a finite time feedforward generative process (e.g. variants of the Helmholtz machine (Dayan et al., 1995) like the Variational Auto-Encoder (VAE) (Kingma and Welling, 2013; Rezende et al., 2014)), or (2) energy function based undirected graphical models, corresponding to sampling from a stochastic process whose equilibrium stationary distribution obeys detailed balance with respect to the energy function (e.g. various Boltzmann machines (Salakhutdinov and Hinton, 2009)). This detailed 31st Conference on Neural Information Processing Systems (NIPS 2017), Long Beach, CA, USA. balance condition is highly restrictive: for example, energy-based undirected models corresponding to neural networks require symmetric weight matrices and very specific computations which may not match well with what biological neurons or analog hardware could compute. In contrast, biological neural circuits are capable of powerful generative dynamics enabling us to model the world and imagine new futures. Cortical computation is highly recurrent and therefore its generative dynamics cannot simply map to the purely feed-forward, finite time generative process of a directed model. Moreover, the recurrent connectivity of biological circuits is not symmetric, and so their generative dynamics cannot correspond to sampling from an energy-based undirected model. Thus, the asymmetric biological neural circuits of our brain instantiate a type of stochastic dynamics arising from the repeated application of a transition operator∗ whose stationary distribution over neural activity patterns is a non-equilibrium distribution that does not obey detailed balance with respect to any energy function. Despite these fundamental properties of brain dynamics, machine learning approaches to training generative models currently lack effective methods to model complex data distributions through the repeated application a transition operator, that is not indirectly specified through an energy function, but rather is directly parameterized in ways that are inconsistent with the existence of any energy function. Indeed the lack of such methods constitutes a glaring gap in the pantheon of machine learning methods for training probabilistic generative models. The fundamental goal of this paper is to provide a step to filling such a gap by proposing a novel method to learn such directly parameterized transition operators, thereby providing an empirical method to control the stationary distributions of non-equilibrium stochastic processes that do not obey detailed balance, and match these distributions to data. The basic idea underlying our training approach is to start from a training example, and iteratively apply the transition operator while gradually increasing the amount of noise being injected (i.e., temperature). This heating process yields a trajectory that starts from the data manifold and walks away from the data due to the heating and to the mismatch between the model and the data distribution. Similarly to the update of a denoising autoencoder, we then modify the parameters of the transition operator so as to make the reverse of this heated trajectory more likely under a reverse cooling schedule. This encourages the transition operator to generate stochastic trajectories that evolve towards the data distribution, by learning to walk back the heated trajectories starting at data points. This walkback idea had been introduced for generative stochastic networks (GSNs) and denoising autoencoders (Bengio et al., 2013b) as a heuristic, and without temperature annealing. Here, we derive the specific objective function for learning the parameters through a principled variational lower bound, hence we call our training method variational walkback (VW). Despite the fact that the training procedure involves walking back a set of trajectories that last a finite, but variable number of time-steps, we find empirically that this yields a transition operator that continues to generate sensible samples for many more time-steps than are used to train, demonstrating that our finite time training procedure can sculpt the non-equilibrium stationary distribution of the transition operator to match the data distribution. We show how VW emerges naturally from a variational derivation, with the need for annealing arising out of the objective of making the variational bound as tight as possible. We then describe experimental results illustrating the soundness of the proposed approach on the MNIST, CIFAR-10, SVHN and CelebA datasets. Intriguingly, we find that our finite time VW training process involves modifications of variational methods for training directed graphical models, while our potentially asymptotically infinite generative sampling process corresponds to non-equilibrium generalizations of energy based undirected models. Thus VW goes beyond the two disparate model classes of undirected and directed graphical models, while simultaneously incorporating good ideas from each. 2 The Variational Walkback Training Process Our goal is to learn a stochastic transition operator pT (s0 |s) such that its repeated application yields samples from the data manifold. Here T reflects an underlying temperature, which we will modify during the training process. The transition operator is further specified by other parameters which must be learned from data. When K steps are chosen to generate a sample, the generative process QK has joint probability p(sK 0 ) = p(sK ) t=1 pTt (st−1 |st ), where Tt is the temperature at step t. We first give an intuitive description of our learning algorithm before deriving it via variational methods in the next section. The basic idea, as illustrated in Fig. 1 and Algorithm 1 is to follow a walkback ∗ A transition operator maps the previous-state distribution to a next-state distribution, and is implemented by a stochastic transformation which from the previous state of a Markov chain generates the next state 2 Figure 1: Variational WalkBack framework. The generative process is represented in the blue arrows with the sequence of pTt (st−1 |st ) transitions. The destructive forward process starts at a datapoint (from qT0 (s0 )) and gradually heats it through applications of qTt (st |st−1 ). Larger temperatures on the right correspond to a flatter distribution, so the whole destructive forward process maps the data distribution to a Gaussian and the creation process operates in reverse. strategy similar to that introduced in Alain and Bengio (2014). In particular, imagine a destructive process qTt+1 (st+1 |st ) (red arrows in Fig. 1), which starts from a data point s0 = x, and evolves it QK K stochastically to obtain a trajectory s0 , . . . , sK ≡ sK 0 , i.e., q(s0 ) = q(s0 ) t=1 qTt (st |st−1 ), where q(s0 ) is the data distribution. Note that the p and q chains will share the same parameters for the transition operator (one going backwards and one forward) but they start from different priors for their first step: q(s0 ) is the data distribution while p(s0 ) is a flat factorized prior (e.g. Gaussian). The training procedure trains the transition operator pT to make reverse transitions of the destructive process more likely. For this reason we index time so the destructive process operates forward in time, while the reverse generative process operates backwards in time, with the data distribution occurring at t = 0. In particular, we need only train the transition operator to reverse time by 1-step at each step, making it unnecessary to solve a deep credit assignment problem by performing backpropagation through time across multiple walk-back steps. Overall, the destructive process generates trajectories that walk away from the data manifold, and the transition operator pT learns to walkback these trajectories to sculpt the stationary distribution of pT at T = 1 to match the data distribution. Because we choose qT to have the same parameters as pT , they have the same transition operator but not the same joint over the whole sequence because of differing initial distributions for each trajectory. We also choose to increase temperature with time in the destructive process, following a temperature schedule T1 ≤ · · · ≤ TK . Thus the forward destructive (reverse generative) process corresponds to a heating (cooling) protocol. This training procedure is similar in spirit to DAE’s (Vincent et al., 2008) or NET (Sohl-Dickstein et al., 2015) but with one major difference: the destructive process in these works corresponds to the addition of random noise which knows nothing about the current generative process during training. To understand why tying together destruction and creation may be a good idea, consider the special case in which pT corresponds to a stochastic process whose stationary distribution obeys detailed balance with respect to the energy function of an undirected graphical model. Learning any such model involves two fundamental goals: the model must place probability mass (i.e. lower the energy function) where the data is located, and remove probability mass (i.e. raise the energy function) elsewhere. Probability modes where there is no data are known as spurious modes, and a fundamental goal of learning is to hunt down these spurious modes and remove them. Making the destructive process identical to the transition operator to be learned is motivated by the notion that the destructive process should then efficiently explore the spurious modes of the current transition operator. The walkback training will then destroy these modes. In contrast, in DAE’s and NET’s, since the destructive process corresponds to the addition of unstructured noise that knows nothing about the generative process, it is not clear that such an agnostic destructive process will efficiently seek out the spurious modes of the reverse, generative process. We chose the annealing schedule empirically to minimize training time. The generative process starts by sampling a state sK from a broad Gaussian p∗ (sK ), whose variance is initially equal to 2 the total data variance σmax (but can be later adapted to match the final samples from the inference trajectories). Then we sample from pTmax (sK−1 |sK ), where Tmax is a high enough temperature so that the resultant injected noise can move the state across the whole domain of the data. The injected noise used to simulate the effects of finite temperature has variance linearly proportional to 3 temperature. Thus if σ 2 is the equivalent noise injected by the transition operator pT at T = 1, we σ2 choose Tmax = σmax to achieve the goal of the first sample sK−1 being able to move across the entire 2 range of the data distribution. Then we successively cool the temperature as we sample “previous” states st−1 according to pT (st−1 |st ), with T reduced by a factor of 2 at each step, followed by n steps at temperature 1. This cooling protocol requires the number of steps to be K = log2 Tmax + n, (1) in order to go from T = Tmax to T = 1 in K steps. We choose K from a random distribution. Thus the training procedure trains pT to rapidly transition from a simple Gaussian distribution to the data distribution in a finite but variable number of steps. Ideally, this training procedure should then indirectly create a transition operator pT at T = 1 whose repeated iteration samples the data distribution with a relatively rapid mixing time. Interestingly, this intuitive learning algorithm for a recurrent dynamical system, formalized in Algorithm 1, can be derived in a principled manner from variational methods that are usually applied to directed graphical models, as we see next. Algorithm 1 VariationalWalkback(θ) Train a generative model associated with a transition operator pT (s | s0 ) at temperature T (temperature 1 for sampling from the actual model), parameterized by θ. This transition operator injects noise of variance T σ 2 at each step, where σ 2 is the noise level at temperature 1. Require: Transition operator pT (s | s0 ) from which one can both sample and compute the gradient of log pT (s|s0 ) with respect to parameters θ, given s and s0 . 2 Require: Precomputed σmax , initially data variance (or squared diameter). Require: N1 > 1 the number of initial temperature-1 steps of q trajectory (or ending a p trajectory). repeat Set p∗ to be a Gaussian with mean and variance of the data. σ2 Tmax ← σmax 2 Sample n as a uniform integer between 0 and N1 K ← ceil(log2 Tmax ) + n Sample x ∼ data (or equivalently sample a minibatch to parallelize computation and process each element of the minibatch independently) Let s0 = (x) and initial temperature T = 1, initialize L = 0 for t = 1 to K do Sample st ∼ pT (s|st−1 ) Increment L ← L + log pT (st−1 |st ) (st−1 |st ) Update parameters with log likelihood gradient ∂ log pT∂θ If t > n, increase temperature with T ← 2T end for Increment L ← L + log p∗ (sK ) Update mean and variance of p∗ to match the accumulated 1st and 2nd moment statistics of the samples of sK until convergence monitoring L on a validation set and doing early stopping 3 Variational Derivation of Walkback The marginal probability of a data point s0 at the end of the K-step generative cooling process is ! K X Y p(s0 ) = pT0 (s0 |s1 ) pTt (st−1 |st ) p∗ (sK ) (2) t=2 sK 1 where sK 1 = (s1 , s2 , . . . , sK ) and v = s0 is a visible variable in our generative process, while the cooling trajectory that lead to it can be thought of as a latent, hidden variable h = sK 1 . Recall the decomposition of the marginal log-likelihood via a variational lower bound, ln p(v) ≡ ln X p(v|h)p(h) = X h p(v, h) +DKL [q(h|v)||p(h|v)]. q(h|v) {z } q(h|v) ln h | L 4 (3) Here L is the variational lower bound which motivates the proposed training procedure, and q(h|v) is a variational approximation to p(h|v). Applying this decomposition to v = s0 and h = sK 1 , we find ln p(s0 ) = X q(sk1 |s0 ) ln sk 1 p(s0 |sk1 )p(sk1 ) + DKL [q(sk1 |s0 ) || p(sk1 |s0 )]. q(sk1 |s0 ) (4) Similarly to the EM algorithm, we aim to approximately maximize the log-likelihood with a 2-step procedure. Let θp be the parameters of the generative model p and θq be the parameters of the approximate inference procedure q. Before seeing the next example we have θq = θp . Then in the first step we update θp towards maximizing the variational bound L, for example by a stochastic gradient descent step. In the second step, we update θq by setting θq ← θp , with the objective to reduce the KL term in the above decomposition. See Sec. 3.1 below regarding conditions for the tightness of the bound, which may not be perfect, yielding a possibly biased gradient when we force the constraint θp = θq . We continue iterating this procedure, with training examples s0 . We can obtain an unbiased Monte-Carlo estimator of L as follows from a single trajectory: L(s0 ) ≈ K X t=1 ln pTt (st−1 |st ) + ln p∗ (sK ) qTt (st |st−1 ) (5) with respect to pθ , where s0 is sampled from the data distribution qT0 (s0 ), and the single sequence sK 1 is sampled from the heating process q(sK 1 |s0 ). We are making the reverse of heated trajectories more likely under the cooling process, leading to Algorithm 1. Such variational bounds have been used successfully in many learning algorithms in the past, such as the VAE (Kingma and Welling, 2013), except that they use an explicitly different set of parameters for p and q. Some VAE variants (Sønderby et al., 2016; Kingma et al., 2016) however mix the p-parameters implicitly in forming q, by using the likelihood gradient to iteratively form the approximate posterior. 3.1 Tightness of the variational lower bound As seen in (4), the gap between L(s0 ) and ln p(s0 ) is controlled by DKL [q(sk1 |s0 )||p(sk1 |s0 )], and is therefore tight when the distribution of the heated trajectory, starting from a point s0 , matches the posterior distribution of the cooled trajectory ending at s0 . Explicitly, this KL divergence is given by K X p(s0 ) Y qTt (st |st−1 ) DKL = q(sk1 |s0 ) ln ∗ . (6) p (sK ) t=1 pTt (st−1 |st ) k s1 As the heating process q unfolds forward in time, while the cooling process p unfolds backwards in time, we introduce the time reversal of the transition operator pT , denoted by pR T , as follows. Under repeated application of the transition operator pT , state s settles into a stationary distribution πT (s) at temperature T . The probability of observing a transition st → st−1 under pT in its stationary state is then pT (st−1 |st )πT (st ). The time-reversal pR T is the transition operator that makes the reverse transition equally likely for all state pairs, and therefore obeys PT (st−1 |st )πT (st ) = PTR (st |st−1 )πT (st−1 ) (7) pR T for all pairs of states st−1 and st . It is well known that is a valid stochastic transition operator and has the same stationary distribution πT (s) as pT . Furthermore, the process pT obeys detailed balance if and only if it is invariant under time-reversal, so that pT = pR T. To better understand the KL divergence in (6), at each temperature Tt , we use relation (7) to replace the cooling process PTt which occurs backwards in time with its time-reversal, unfolding forward in time, at the expense of introducing ratios of stationary probabilities. We also exploit the fact that q and p are the same transition operator. With these substitutions in (6), we find DKL = X sk 1 q(sk1 |s0 ) ln K K Y pTt (st |st−1 ) X p(s0 ) Y πTt (st ) k + q(s |s ) ln . 0 1 p∗ (sK ) t=1 πTt (st−1 ) pR (s |s ) k t=1 Tt t t−1 (8) s1 The first term in (8) is simply the KL divergence between the distribution over heated trajectories, and the time reversal of the cooled trajectories. Since the heating (q) and cooling (p) processes are tied, this KL divergence is 0 if and only if pTt = pR Tt for all t. This time-reversal invariance requirement for vanishing KL divergence is equivalent to the transition operator pT obeying detailed balance at all temperatures. 5 Now intuitively, the second term can be made small in the limit where K is large and the temperature sequence is annealed slowly. To see why, note we can write the ratio of probabilities in this term as, πT (sK−1 ) πTK (sK ) p(s0 ) πT1 (s1 ) · · · K−1 . (9) πT1 (s0 ) πT2 (s1 ) πTK−1 (sK ) p∗ (sK ) which is similar in shape (but arising in a different context) to the product of probability ratios computed for annealed importance sampling (Neal, 2001) and reverse annealed importance sampling (Burda et al., 2014). Here it is manifest that, under slow incremental annealing schedules, we are comparing probabilities of the same state under slightly different distributions, so all ratios are close to 1. For example, under many steps, with slow annealing, the generative process approximately reaches its stationary distribution, p(s0 ) ≈ πT1 (s0 ). This slow annealing to go from p∗ (sK ) to p(s0 ) corresponds to the quasistatic limit in statistical physics, where the work required to perform the transformation is equal to the free energy difference between states. To go faster, one must perform excess work, above and beyond the free energy difference, and this excess work is dissipated as heat into the surrounding environment. By writing the distributions in terms of energies and free energies: πTt (st ) ∝ e−E(st )/Tt , p∗ (sK ) = e−[EK (sK )−FK ] , and p(s0 ) = e−[E0 (s0 )−F0 ] , one can see that the second term in the KL divergence is closely related to average heat dissipation in a finite time heating process (see e.g. (Crooks, 2000)). This intriguing connection between the size of the gap in a variational lower bound, and the excess heat dissipation in a finite time heating process opens the door to exploiting a wealth of work in statistical physics for finding optimal thermodynamic paths that minimize heat dissipation (Schmiedl and Seifert, 2007; Sivak and Crooks, 2012; Gingrich et al., 2016), which may provide new ideas to improve variational inference. In summary, tightness of the variational bound can be achieved if: (1) The transition operator of p approximately obeys detailed balance, and (2) the temperature annealing is done slowly over many steps. And intriguingly, the magnitude of the looseness of the bound is related to two physical quantities: (1) the degree of irreversiblity of the transition operator p, as measured by the KL divergence between p and its time reversal pR , and (2) the excess physical work, or equivalently, excess heat dissipated, in performing the heating trajectory. To check, post-hoc, potential looseness of the variational lower bound, we can measure the degree of irreversibility of pT by estimating the KL divergence DKL (pT (s0 |s)πT (s) || pT (s|s0 )πT (s0 )), which is 0 if and only if pT obeys detailed balance and is therefore time-reversal invariant. This quantity PK pT (st+1 |st ) 1 K can be estimated by K t=1 ln pT (st |st+1 ) , where s1 is a long sequence sampled by repeatedly applying transition operator pT from a draw s1 ∼ πT . If this quantity is strongly positive (negative) then forward transitions are more (less) likely than reverse transitions, and the process pT is not time-reversal invariant. This estimated KL divergence can be normalized by the corresponding entropy to get a relative value (with 3.6% measured on a trained model, as detailed in Appendix). 3.2 Estimating log likelihood via importance sampling We can derive an importance sampling estimate of the negative log-likelihood by the following procedure. For each training example x, we sample a large number of destructive paths (as in Algorithm 1). We then use the following formulation to estimate the log-likelihood log p(x) via Q    K ∗ pT0 (s0 = x|s1 ) t=2 pTt (st−1 |st ) p (sK ) Q  log Ex∼pD ,qT (x)qT (s1 |s0 (x,))(QK qT (st |st−1 ))  K t=2 t 0 1 q (s |s ) qT0 (x)qT1 (s1 |s0 = x) T t t−1 t t=2 (10) 3.3 VW transition operators and their convergence The VW approach allows considerable freedom in choosing transition operators, obviating the need for specifying them indirectly through an energy function. Here we consider Bernoulli and isotropic Gaussian transition operators for binary and real-valued data respectively. The form of the stochastic state update imitates a discretized version of the Langevin differential equation. The Bernoulli (1−α)∗st−1 +α∗Fρ (st−1 ) transition operator computes the element-wise probability as ρ = sigmoid( ). Tt The Gaussian operator computes a conditional mean and standard deviation via µ = (1 − α) ∗ st−1 + α ∗ Fµ (st−1 ) and σ = Tt log(1 + eFσ (st−1 ) ). Here the F functions can be arbitrary parametrized functions, such as a neural net and Tt is the temperature at time step t. 6 A natural question is when will the finite time VW training process learn a transition operator whose stationary distribution matches the data distribution, so that repeated sampling far beyond the training time continues to yield data samples. To partially address this, we prove the following theorem: Proposition 1. If p has enough capacity, training data and training time, with slow enough annealing and a small departure from reversibility so p can match q, then at convergence of VW training, the transition operator pT at T = 1 has the data generating distribution as its stationary distribution. A proof can be found in the Appendix, but the essential intuition is that if the finite time generative process converges to the data distribution at multiple different VW walkback time-steps, then it remains on the data distribution for all future time at T = 1. We cannot always guarantee the preconditions of this theorem but we find experimentally that its essential outcome holds in practice. 4 Related Work A variety of learning algorithms can be cast in the framework of Fig. 1. For example, for directed graphical models like VAEs (Kingma and Welling, 2013; Rezende et al., 2014), DBNs (Hinton et al., 2006), and Helmholtz machines in general, q corresponds to a recognition model, transforming data to a latent space, while p corresponds to a generative model that goes from latent to visible data in a finite number of steps. None of these directed models are designed to learn transition operators that can be iterated ad infinitum, as we do. Moreover, learning such models involves a complex, deep credit assignment problem, limiting the number of unobserved latent layers that can be used to generate data. Similar issues of limited trainable depth in a finite time feedforward generative process apply to Generative Adversarial Networks (GANs) (Goodfellow et al., 2014), which also further eschew the goal of specifically assigning probabilities to data points. Our method circumvents this deep credit assignment problem by providing training targets at each time-step; in essence each past time-step of the heated trajectory constitutes a training target for the future output of the generative operator pT , thereby obviating the need for backpropagation across multiple steps. Similarly, unlike VW, Generative Stochastic Networks (GSN) (Bengio et al., 2014) and the DRAW (Gregor et al., 2015) also require training iterative operators by backpropagating across multiple computational steps. VW is similar in spirit to DAE (Bengio et al., 2013b), and NET approaches (Sohl-Dickstein et al., 2015) but it retains two crucial differences. First, in each of these frameworks, q corresponds to a very simple destruction process in which unstructured Gaussian noise is injected into the data. This agnostic destruction process has no knowledge of underlying generative process p that is to be learned, and therefore cannot be expected to efficiently explore spurious modes, or regions of space, unoccupied by data, to which p assigns high probability. VW has the advantage of using a high-temperature version of the model p itself as part of the destructive process, and so should be better than random noise injection at finding these spurious modes. A second crucial difference is that VW ties weights of the transition operator across time-steps, thereby enabling us to learn a bona fide transition operator than can be iterated well beyond the training time, unlike DAEs and NET. There’s also another related recent approach to learning a transition operator with a denoising cost, developed in parallel, called Infusion training (Bordes et al., 2017), which tries to reconstruct the target data in the chain, instead of the previous step in the destructive chain. 5 Experiments VW is evaluated on four datasets: MNIST, CIFAR10 (Krizhevsky and Hinton, 2009), SVHN (Netzer et al., 2011) and CelebA (Liu et al., 2015). The MNIST, SVHN and CIFAR10 datasets were used as is except for uniform noise added to MNIST and CIFAR10, as per Theis et al. (2016), and the aligned and cropped version of CelebA was scaled from 218 x 178 pixels to 78 x 64 pixels and center-cropped at 64 x 64 pixels (Liu et al., 2015). We used the Adam optimizer (Kingma and Ba, 2014) and the Theano framework (Al-Rfou et al., 2016). More details are in Appendix and code for training and generation is at http://github.com/anirudh9119/walkback_nips17. Image Generation. Figure 3, 5, 6, 7, 8 (see supplementary section) show VW samples on each of the datasets. For MNIST, real-valued views of the data are modeled. Image Inpainting. We clamped the bottom part of CelebA test images (for each step during sampling), and ran it through the model. Figure 1 (see Supplementary section) shows the generated conditional samples. 7 Model bits/dim ≤ NET (Sohl-Dickstein et al., 2015) 5.40 VW(20 steps) 5.20 Deep VAE < 4.54 VW(30 steps) 4.40 DRAW (Gregor et al., 2015) < 4.13 ResNet VAE with IAF (Kingma et al., 2016) 3.11 Table 1: Comparisons on CIFAR10, test set average number of bits/data dimension(lower is better) 6 6.1 Discussion Summary of results Our main advance involves using variational inference to learn recurrent transition operators that can rapidly approach the data distribution and then be iterated much longer than the training time while still remaining on the data manifold. Our innovations enabling us to achieve this involved: (a) tying weights across time, (b) tying the destruction and generation process together to efficiently destroy spurious modes, (c) using the past of the destructive process to train the future of the creation process, thereby circumventing issues with deep credit assignment (like NET), (d) introducing an aggressive temperature annealing schedule to rapidly approach the data distribution (e.g. NET takes 1000 steps while VWB only takes 30 steps to do so), and (e) introducing variable trajectory lengths during training to encourage the generator to stay on the data manifold for times longer than the training sequence length. Indeed, it is often difficult to sample from recurrent neural networks for many more time steps than the duration of their training sequences, especially non-symmetric networks that could exhibit chaotic activity. Transition operators learned by VW can be stably sampled for exceedingly long times; for example, in experiments (see supplementary section) we trained our model on CelebA for 30 steps, while at test time we sampled for 100000 time-steps. Overall, our method of learning a transition operator outperforms previous attempts at learning transition operators (i.e. VAE, GSN and NET) using a local learning rule. Overall, we introduced a new approach to learning non-energy-based transition operators which inherits advantages from several previous generative models, including a training objective that requires rapidly generating the data in a finite number of steps (as in directed models), re-using the same parameters for each step (as in undirected models), directly parametrizing the generator (as in GANs and DAEs), and using the model itself to quickly find its own spurious modes (the walk-back idea). We also anchor the algorithm in a variational bound and show how its analysis suggests to use the same transition operator for the destruction or inference process, and the creation or generation process, and to use a cooling schedule during generation, and a reverse heating schedule during inference. 6.2 New bridges between variational inference and non-equilibrium statistical physics We connected the variational gap to physical notions like reversibility and heat dissipation. This novel bridge between variational inference and concepts like excess heat dissipation in non-equilbrium statistical physics, could potentially open the door to improving variational inference by exploiting a wealth of work in statistical physics. For example, physical methods for finding optimal thermodynamic paths that minimize heat dissipation (Schmiedl and Seifert, 2007; Sivak and Crooks, 2012; Gingrich et al., 2016), could potentially be exploited to tighten lowerbounds in variational inference. Moreover, motivated by the relation between the variational gap and reversibility, we verified empirically that the model converges towards an approximately reversible chain (see Appendix) making the variational bound tighter. 6.3 Neural weight asymmetry A fundamental aspect of our approach is that we can train stochastic processes that need not exactly 8 obey detailed balance, yielding access to a larger and potentially more powerful space of models. In particular, this enables us to relax the weight symmetry constraint of undirected graphical models corresponding to neural networks, yielding a more brain like iterative computation characteristic of asymmetric biological neural circuits. Our approach thus avoids the biologically implausible requirement of weight transport (Lillicrap et al., 2014) which arises as a consequence of imposing weight symmetry as a hard constraint. With VW, this hard constraint is removed, although the training procedure itself may converge towards more symmetry. Such approach towards symmetry is consistent with both empirical observations (Vincent et al., 2010) and theoretical analysis (Arora et al., 2015) of auto-encoders, for which symmetric weights are associated with minimizing reconstruction error. 6.4 A connection to the neurobiology of dreams The learning rule underlying VW, when applied to an asymmetric stochastic neural network, yields a speculative, but intriguing connection to the neurobiology of dreams. As discussed in Bengio et al. (2015), spike-timing dependent plasticity (STDP), a plasticity rule found in the brain (Markram and Sakmann, 1995), corresponds to increasing the probability of configurations towards which the network intrinsically likes to go (i.e., remembering observed configurations), while reverse-STDP corresponds to forgetting or unlearning the states towards which the network goes (which potentially may occur during sleep). In the VW update applied to a neural network, the resultant learning rule does indeed strengthen synapses for which a presynaptic neuron is active before a postsynaptic neuron in the generative cooling process (STDP), and it weakens synapses in which a postsynaptic neuron is active before a presynaptic neuron in the heated destructive process (reverse STDP). If, as suggested, the neurobiological function of sleep involves re-organizing memories and in particular unlearning spurious modes through reverse-STDP, then the heating destructive process may map to sleep states, in which the brain is hunting down and destroying spurious modes. In contrast, the cooling generative dynamics of VW may map to awake states in which STDP reinforces neural trajectories moving towards observed sensory data. Under this mapping, the relative incoherence of dreams compared to reality is qualitatively consistent with the heated destructive dynamics of VW, compared to the cooled transition operator in place during awake states. 6.5 Future work Many questions remain open in terms of analyzing and extending VW. Of particular interest is the incorporation of latent layers. The state at each step would now include both visible x and latent h components. Essentially the same procedure can be run, except for the chain initialization, with s0 = (x, h0 ) where h0 a sample from the posterior distribution of h given x. Another interesting direction is to replace the log-likelihood objective at each step by a GAN-like objective, thereby avoiding the need to inject noise independently on each of the pixels, during each transition step, and allowing latent variable sampling to inject the required high-level decisions associated with the transition. Based on the earlier results from (Bengio et al., 2013a), sampling in the latent space rather than in the pixel space should allow for better generative models and even better mixing between modes (Bengio et al., 2013a). Overall, our work takes a step to filling a relatively open niche in the machine learning literature on directly training non-energy-based iterative stochastic operators, and we hope that the many possible extensions of this approach could lead to a rich new class of more powerful brain-like machine learning models. Acknowledgments The authors would like to thank Benjamin Scellier, Ben Poole, Tim Cooijmans, Philemon Brakel, Gaétan Marceau Caron, and Alex Lamb for their helpful feedback and discussions, as well as NSERC, CIFAR, Google, Samsung, Nuance, IBM and Canada Research Chairs for funding, and Compute Canada for computing resources. S.G. would like to thank the Simons, McKnight, James S. McDonnell, and Burroughs Wellcome Foundations and the Office of Naval Research for support. Y.B would also like to thank Geoff Hinton for an analogy which is used in this work, while discussing contrastive divergence (personnal communication). The authors would also like to express debt of gratitude towards those who contributed to theano over the years (as it is no longer maintained), making it such a great tool. 9 References Al-Rfou, R., Alain, G., Almahairi, A., and et al. (2016). Theano: A python framework for fast computation of mathematical expressions. CoRR, abs/1605.02688. Alain, G. and Bengio, Y. (2014). What regularized auto-encoders learn from the data-generating distribution. J. Mach. Learn. Res., 15(1):3563–3593. Arora, S., Liang, Y., and Ma, T. (2015). Why are deep nets reversible: a simple theory, with implications for training. Technical report, arXiv:1511.05653. Ba, J. L., Kiros, J. R., and Hinton, G. E. (2016). arXiv:1607.06450. Layer normalization. arXiv preprint Bengio, Y., Mesnard, T., Fischer, A., Zhang, S., and Wu, Y. (2015). An objective function for STDP. CoRR, abs/1509.05936. Bengio, Y., Mesnil, G., Dauphin, Y., and Rifai, S. (2013a). Better mixing via deep representations. In Proceedings of the 30th International Conference on Machine Learning (ICML-13), pages 552–560. Bengio, Y., Thibodeau-Laufer, E. r., Alain, G., and Yosinski, J. (2014). Deep generative stochastic networks trainable by backprop. In Proceedings of the 31st International Conference on International Conference on Machine Learning - Volume 32, ICML’14, pages II–226–II–234. JMLR.org. Bengio, Y., Yao, L., Alain, G., and Vincent, P. (2013b). Generalized denoising auto-encoders as generative models. In NIPS’2013, arXiv:1305.6663. Bordes, F., Honari, S., and Vincent, P. (2017). Learning to generate samples from noise through infusion training. CoRR, abs/1703.06975. Burda, Y., Grosse, R. B., and Salakhutdinov, R. (2014). Accurate and conservative estimates of MRF log-likelihood using reverse annealing. CoRR, abs/1412.8566. Crooks, G. E. (2000). Path-ensemble averages in systems driven far from equilibrium. Physical review E, 61(3):2361. Dayan, P., Hinton, G. E., Neal, R. M., and Zemel, R. S. (1995). The helmholtz machine. Neural Comput., 7(5):889–904. Gingrich, T. R., Rotskoff, G. M., Crooks, G. E., and Geissler, P. L. (2016). Near-optimal protocols in complex nonequilibrium transformations. Proceedings of the National Academy of Sciences, page 201606273. Goodfellow, I., Pouget-Abadie, J., Mirza, M., Xu, B., Warde-Farley, D., Ozair, S., Courville, A., and Bengio, Y. (2014). Generative adversarial nets. In Advances in Neural Information Processing Systems, pages 2672–2680. Gregor, K., Danihelka, I., Graves, A., and Wierstra, D. (2015). Draw: A recurrent neural network for image generation. arXiv preprint arXiv:1502.04623. Hinton, G. E., Osindero, S., and Teh, Y.-W. (2006). A fast learning algorithm for deep belief nets. Neural Comput., 18(7):1527–1554. Ioffe, S. and Szegedy, C. (2015). Batch normalization: Accelerating deep network training by reducing internal covariate shift. arXiv preprint arXiv:1502.03167. Kingma, D. and Ba, J. (2014). Adam: A method for stochastic optimization. arXiv preprint arXiv:1412.6980. Kingma, D. P., Salimans, T., and Welling, M. (2016). Improving variational inference with inverse autoregressive flow. CoRR, abs/1606.04934. Kingma, D. P. and Welling, M. (2013). arXiv:1312.6114. Auto-encoding variational bayes. 10 arXiv preprint Krizhevsky, A. and Hinton, G. (2009). Learning multiple layers of features from tiny images. Lillicrap, T. P., Cownden, D., Tweed, D. B., and Akerman, C. J. (2014). Random feedback weights support learning in deep neural networks. arXiv:1411.0247. Liu, Z., Luo, P., Wang, X., and Tang, X. (2015). Deep learning face attributes in the wild. In Proceedings of the IEEE International Conference on Computer Vision, pages 3730–3738. Markram, H. and Sakmann, B. (1995). Action potentials propagating back into dendrites triggers changes in efficacy. Soc. Neurosci. Abs, 21. Neal, R. M. (2001). Annealed importance sampling. Statistics and Computing, 11(2):125–139. Netzer, Y., Wang, T., Coates, A., Bissacco, A., Wu, B., and Ng, A. Y. (2011). Reading digits in natural images with unsupervised feature learning. In NIPS workshop on deep learning and unsupervised feature learning, volume 2011, page 5. Rezende, D. J., Mohamed, S., and Wierstra, D. (2014). Stochastic backpropagation and approximate inference in deep generative models. arXiv preprint arXiv:1401.4082. Salakhutdinov, R. and Hinton, G. (2009). Deep boltzmann machines. In Artificial Intelligence and Statistics. Salimans, T., Goodfellow, I. J., Zaremba, W., Cheung, V., Radford, A., and Chen, X. (2016). Improved techniques for training gans. CoRR, abs/1606.03498. Schmiedl, T. and Seifert, U. (2007). Optimal finite-time processes in stochastic thermodynamics. Physical review letters, 98(10):108301. Sivak, D. A. and Crooks, G. E. (2012). Thermodynamic metrics and optimal paths. Physical review letters, 108(19):190602. Sohl-Dickstein, J., Weiss, E. A., Maheswaranathan, N., and Ganguli, S. (2015). Deep unsupervised learning using nonequilibrium thermodynamics. CoRR, abs/1503.03585. Sønderby, C. K., Raiko, T., Maaløe, L., Sønderby, S. K., and Winther, O. (2016). Ladder variational autoencoders. In Advances in Neural Information Processing Systems, pages 3738–3746. Theis, L., van den Oord, A., and Bethge, M. (2016). A note on the evaluation of generative models. In International Conference on Learning Representations. Vincent, P., Larochelle, H., Bengio, Y., and Manzagol, P.-A. (2008). Extracting and composing robust features with denoising autoencoders. In Proceedings of the 25th international conference on Machine learning, pages 1096–1103. ACM. Vincent, P., Larochelle, H., Lajoie, I., Bengio, Y., and Manzagol, P.-A. (2010). Stacked denoising autoencoders: Learning useful representations in a deep network with a local denoising criterion. J. Machine Learning Res., 11. 11 Supplementary Material A VW transition operators and their convergence Proposition 2. If p has enough capacity, training data and training time, with slow enough annealing and a small departure from reversibility so p can match q, then at convergence of VW training, the transition operator pT at T = 1 has the data generating distribution as its stationary distribution. ) match q(sK+n ), where q(s0 ) is the data distribution. It Proof. With these conditions p(sK+n 0 0 means that p(s0 ) (the marginal at the last step of sampling) is the data distribution when running the annealed (cooling) trajectory for K + n steps, for n any integer between 0 and N1 , where the last n + 1 steps are at temperature 1. Since the last n steps are at temperature 1, they apply the same transition operator. Consider any 2 consecutive sampling steps among these last n steps. Both of these samples are coming from the same distribution (the data distribution). It means that the temperature 1 transition operator leaves the data distribution unchanged. This implies that the data distribution is an eigenvector of the linear operator associated with the temperature 1 transition operator, or that the data generating distribution is a stationary distribution of the temperature 1 transition operator. B Additional Results Image inpainting samples from CelebA dataset are shown in Fig 2, where each top sub-figure shows the masked image of a face (starting point of the chain), and the bottom sub-figure shows the inpainted image. The images are drawn from the test set. The VW samples for CelebA, CIFAR10 and SVHN are shown in Fig 4, 5, 6. Figure 2: VW inpainting in CelebA images. Images on the left are the ground truth images corrupted for their bottom half (which is the starting point of the chain). The goal is to fill in the bottom half of each face image given an observed top half of an image (drawn from test set). Images on the right show the inpainted lower halves for all these images. C VW on Toy Datasets Fig. 7 and 8 shows the application of a transition operator applied on 2D datasets. 12 Figure 3: VW samples on MNIST using Gaussian noise in the transition operator. The model is trained with 30 steps of walking away, and samples are generated using 30 annealing steps. D VW chains Fig. 9, 10, 11, 12, 13, 14, 15 shows the model chains on repeated application of transition operator at temperature = 1. This is to empirically prove the conjecture mentioned in the paper (Preposition 1) that is, if the finite time generative process converges to the data distribution at multiple different VW walkback time-steps, then it remains on the data distribution for all future time at T= 1 E Architecture Details In this section, we provide more details on the architecture that was used for each of the dataset. The details of the hyper parameter and architecture used for each dataset can also be found in Tables 2, 3, 4 and 5. Complete specifications are available as experiment scripts at http://github.com/ anirudh9119/walkback_nips17. E.1 MNIST For lower bound(and IS estimates) comparisons, the network trained on MNIST is a MLP composed of two fully connected layers with 1200 units using batch-normalization (Ioffe and Szegedy, 2015). This network has two different final layers with a number of units corresponding to the image size (i.e 13 Figure 4: VW samples on CelebA dataset using Gaussian noise in the transition operator. Model is trained using 30 steps to walk away and samples are generated using 30 annealing steps. number of pixels) each corresponding to mean and variance for each pixel. We use softplus output for the variance. We don’t share the batch-normalization parameters across different time steps. For the real-values MNIST dataset samples, we used an encoder-decoder architecture with convolutional layers. The encoder consists of 2 convolutional layers with kernel length of 5 and stride of 2 followed by a decoder with strided convolutions. In addition, we used 5 fully connected feedforward layers to connect the encoder and decoder. We applied batch normalization (Ioffe and Szegedy, 2015) to the convolutional Layers, and we applied layer normalization (Ba et al., 2016) to the feedforward layers. The network has 2 separate output layers, one corresponding the mean of the Gaussian sample, and one corresponding to the variance of the added Gaussian noise. We use Adam (Kingma and Ba, 2014) with a learning rate of 0.0001 to optimize the network. Details of the hyper parameter and architecture is also available in Table 2. E.2 CIFAR10, CelebA and SVNH We use a similar encoder-decoder architecture as we have stated above. We use 3 convolutional layers for the encoder as well as for the decoder. We also apply batch normalization (Ioffe and Szegedy, 2015)to the convolutional layers, as well as layer normalization (Ba et al., 2016) to the feedforward layers. Details of the hyper parameter and architecture is also available in Table 4, 5 and 3. 14 Operation Convolution Convolution Fully Connected Fully Connected Fully Connected Fully Connected Fully Connected Strided Convolution Strided Convolution Kernel 5x5 5x5 5x5 5x5 Strides 2 2 2 2 Feature Maps 16 32 16 1 Normalization Batchnorm Batchnorm LayerNorm LayerNorm LayerNorm LayerNorm LayerNorm Batchnorm No Non Linearity Relu Relu Leaky Relu Leaky Relu Leaky Relu Leaky Relu Leaky Relu Relu None Hidden Units 1568 * 1024 1024 * 1024 1024 * 1024 1024 * 1024 1024 * 1568 - Table 2: Hyperparameters for MNIST experiments, for each layer of the encoder-decoder (each row of the table). We use adam as an optimizer, learning rate of 0.0001. We model both mean and variance of each pixel. We use reconstruction error as per-step loss function. We see improvements using layernorm in the bottleneck, as compared to batchnorm. Using Dropout also helps, but all the results reported in the paper are without dropout. Operation Convolution Convolution Convolution Fully Connected Fully Connected Fully Connected Fully Connected Fully Connected Strided Convolution Strided Convolution Strided Convolution Kernel 5x5 5x5 5x5 5x5 5x5 5x5 Strides 2 2 2 2 2 2 Feature Maps 64 128 256 128 64 3 Normalization Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm No Non Linearity Relu Relu Relu Relu Relu Relu Relu Relu Relu Relu None Hidden Units 16384 * 1024 1024 * 1024 1024 * 1024 1024 * 1024 1024 * 16384 - Table 3: Hyperparameters for CelebA experiments, for each layer of the encoder-decoder (each row of the table). We use adam as an optimizer, learning rate of 0.0001. We model both mean and variance of each pixel. We use reconstruction error as per-step loss function. Operation Convolution Convolution Convolution Fully Connected Fully Connected Fully Connected Fully Connected Fully Connected Strided Convolution Strided Convolution Strided Convolution Kernel 5x5 5x5 5x5 5x5 5x5 5x5 Strides 2 2 2 2 2 2 Feature Maps 64 128 256 128 64 3 Normalization Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm Batchnorm No Non Linearity Relu Relu Relu Relu Relu Relu Relu Relu Relu Relu None Table 4: Hyperparameters for Cifar experiments, for each layer of the encoder-decoder (each row of the table). We use adam as an optimizer, learning rate of 0.0001. We model both mean and variance of each pixel. We use reconstruction error as per-step loss function. 15 Hidden Units 4096 * 2048 2048 * 2048 2048 * 2048 2048 * 2048 2048 * 4096 - Figure 5: VW samples on Cifar10 using Gaussian noise in the transition operator. Model is trained using 30 steps to walk away and samples are generated using 30 annealing steps. F Walkback Procedure Details The variational walkback algorithm has three unique hyperparameters. We specify the number of Walkback steps used during training, the number of extra Walkback steps used during sampling and also the temperature increase per step. The most conservative setting would be to allow the model to slowly increase the temperature during training. However, this would require a large number of steps for the model to walk to the noise, and this would not only significantly slow down the training process, but this also means that we would require a large number of steps used for sampling. There may exist a dynamic approach for setting the number of Walkback steps and the temperature schedule. In our work, √we set this hyperparameters heuristically. We found that a heating temperature schedule of Tt = T0 2t at step t produced good results, where T0 = 1.0 is the initial temperature. √ N During sampling, we found good results using the exactly reversed schedule: Tt = √22t , where t is the step index and N is the total number of cooling steps. For MNIST, CIFAR, SVHN and CelelbA, we use K = 30 training steps and N = 30 sampling steps. We also found that we could achieve better quality results if allow the model to run for a few extra steps with a temperature of 1 during sampling. Finally, our model is able to achieve similar results compared to the NET model(Sohl-Dickstein et al., 2015). Considering our model uses only 30 steps for MNIST and NET (Sohl-Dickstein et al., 2015) uses 1000 steps for MNIST. 16 Figure 6: VW samples on SVHN dataset using Gaussian noise in the transition operator. Model is trained using 30 steps to walk away and samples are generated using 30 annealing steps. G Higher Lower Bound: not always better samples We have observed empirically that the variational lower bound does not necessarily correspond to sample quality. Among trained models, higher value of the lower bound is not a clear indication of visually better looking samples. Our MNIST samples shown in Fig 16 is an example of this phenomenon. A model with better lower bound could give better reconstructions while not producing better generated samples. This resonates with the finding of (Theis et al., 2016) H Reversibility of transition operator We measured the degree of reversibility of pT by estimating the KL divergence DKL (pT (s0 |s)πT (s) || pT (s|s0 )πT (s0 )), which is 0 if and only if pT obeys detailed balance and PK pT (st+1 |st ) 1 is therefore time-reversal invariant by computing the Monte-Carlo estimator K t=1 ln pT (st |st+1 ) , where sK 1 is a long sequence sampled by repeatedly applying transition operator pT from a draw s1 ∼ πT , i.e., taking samples after a burn-in period (50 samples). To get a sense of the magnitude of this reversibility measure, and because it corresponds to an estimated KL divergence, we estimate the corresponding entropy (of the forward trajectory) and use it as a normalizing denominator telling us how much we depart from reversibility in nats relative to the number of nats of entropy. To justify this, consider that the minimal code length required to code 17 Figure 7: The proposed modeling framework trained on 2-d swiss roll data. This algorithm was trained on 2D swiss roll for 30 annealing steps using annealing schedule increasing temperator by 1.1 each time. We have shown every 5th sample (ordering is row wise, and within each row it is column-wise. Figure 8: The proposed modeling framework trained on circle data. This algorithm was trained on circle for 30 annealing time steps using annealing schedule increasing temperature by factor 1.1 each time. We have shown every 5th sample (ordering is row wise, and within each row it is column-wise. samples from a distribution p is the entropy H(p). But suppose we evaluate those samples from p using q instead to code them. Then the code length is H(p) + D(p||q). So the fractional increase in code length due to having the wrong distribution is D(p||q)/H(p), which is what we report here, with p being the forward transition probability and q the backward transition probability. To compute this quantity, we took our best model (in terms of best lower bound) on MNIST, and ran it for 1000 time steps i.e (T = 1000), at a constant temperature. We run the learned generative chain p for T time steps (after a burn in period whose samples we ignore) getting s0 → s1 → s2 → · · · sT and computing log p(s0 → s1 → s2 → · · · sT )/p(sT → · · · → s2 → s1) both under the same generative chain, divided by T to get the per-step average. On the same set of runs, we compute 1/T ∗log p(s0 → s1 → s2 → · · · sT ) under the same generative chain. This is an estimate of the entropy per unit time of the chain. This is repeated multiple times to average over many runs and reduce the variance of the estimator. 18 Figure 9: VW sample chain (vertically, going down) starting from pure noise. Model trained using K = 30 steps to walk away and samples are generated using 30 steps of annealing. The figure shows every 3rd sample of the chain in each column. The obtained ratio (nats/nats) is 3.6%, which seems fairly low but also suggests that the trained model is not perfectly reversible. I Some Minor Points • In all the image experiments, we observed that by having different batchnorm papemeters for different steps, actually improves the result considerably. Having different batchnorm parameters was also necessery for making it work on mixture on gaussian. The authors were not able to make it work on MoG without different parameters. One possible way, could be to let optimizer know that we are on different step by giving the temperature information to the optimizer too. • We observed better results while updating the parameters in online-mode, as compared to batch mode. (i.e instead of accumulating gradients across different steps, we update the parameters in an online fashion) 19 Figure 10: VW sample chain. Each coloumn above corresponds to one sampling chain. We have shown every 10th sample. We applied the transition operator for 5000 time-steps at temperature = 1, to demonstrate that even over very long chain, the transition operator continues to generate good samples. J Inception Scores on CIFAR We computed the inception scores using 50,000 samples generated by our model. We compared the inception scores with (Salimans et al., 2016) as the baseline model. 20 Figure 11: VW sample chain. Each column above corresponds to one sampling chain. We have shown every 10th sample. We applied the transition operator for 5000 time-steps at temperature = 1, to demonstrate that even over very long chain, the transition operator continues to generate good Operation Kernel Strides Feature Maps Normalization Non Linearity samples. Convolution 5x5 2 64 Batchnorm Relu Convolution 5x5 2 128 Batchnorm Relu Convolution 5x5 2 256 Batchnorm Relu Fully Connected Batchnorm Relu Fully Connected Batchnorm Relu Fully Connected Batchnorm Relu Fully Connected Batchnorm Relu Fully Connected Batchnorm Relu Strided Convolution 5x5 2 128 Batchnorm Relu Strided Convolution 5x5 2 64 Batchnorm Relu Strided Convolution 5x5 2 3 No None Table 5: Hyperparameters for SVHN experiments, for each layer of the encoder-decoder (each row of the table). We use adam as an optimizer, learning rate of 0.0001. We model both mean and variance of each pixel. We use reconstruction error as per-step loss function. 21 Hidden Units 4096 * 1024 1024 * 1024 1024 * 1024 1024 * 1024 1024 * 4096 - Figure 12: VW sample chain. Each column above corresponds to one sampling chain. We have shown every 10th sample. We applied the transition operator for 5000 time-steps temperature = 1. Model Real Data Salimans (semi-supervised) Salimans (unsupervised) Salimans (supervised training without minibatch features) VW(20 steps) VW(30 steps) Table 6: Inception scores on CIFAR 22 Inception Score 11.24 8.09 4.36 3.87 3.72 4.39 ± 0.2 Figure 13: VW sample chain. Each column above corresponds to one sampling chain. We have shown every 10th sample. We applied the transition operator for 5000 time-steps at temperature = 1, to demonstrate that even over very long chain, the transition operator continues to generate good samples. 23 Figure 14: VW sample chain. Each column above corresponds to one sampling chain. We have shown every 10th sample. We applied the transition operator for 5000 time-steps at temperature = 1, to demonstrate that even over very long chain, the transition operator continues to generate good samples. 24 Figure 15: VW sample chain. Each column above corresponds to one sampling chain. We have shown every 10th sample. We applied the transition operator for 5000 time-steps at temperature = 1, to demonstrate that even over very long chain, the transition operator continues to generate good samples. 25 Figure 16: Samples from two VW models (left and right) which have a higher lower bound than the one whose samples are shown in Figure 5 (and comparable but slightly better importance sampling estimators of the log-likelihood): yet, the generated samples are clearly not as good, suggesting that either the bound is sometimes not tight enough or that the log-likelihood is not always a clear indicator of sample quality. 26
9cs.NE
Online Buy-at-Bulk Network Design Deeparnab Chakrabarty∗ Alina Ene† Ravishankar Krishnaswamy‡ arXiv:1509.03212v1 [cs.DS] 10 Sep 2015 Debmalya Panigrahi§ Abstract We present the first non-trivial online algorithms for the non-uniform, multicommodity buy-at-bulk (MC-BB) network design problem. Our competitive ratios qualitatively match the best known approximation factors for the corresponding offline problems. In particular, we show • A polynomial time online algorithm with a poly-logarithmic competitive ratio for the MC-BB problem in undirected edge-weighted graphs. • A quasi-polynomial time online algorithm with a poly-logarithmic competitive ratio for the MCBB problem in undirected node-weighted graphs. 1 • For any fixed  > 0, a polynomial time online algorithm with a competitive ratio of Õ k 2 + ) (where k is the number of demands, and Õ(.) hides polylog factors) for MC-BB in directed graphs. • Algorithms with matching competitive ratios for the prize-collecting variants of all the above problems. Prior to our work, a logarithmic competitive ratio was known for undirected, edge-weighted graphs only for the special case of uniform costs (Awerbuch and Azar, FOCS 1997), and a polylogarithmic competitive ratio was known for the edge-weighted single-sink problem (Meyerson, SPAA 2004). To the best of our knowledge, no previous online algorithm was known, even for uniform costs, in the node-weighted and directed settings. Our main engine for the results above is an online reduction theorem of MC-BB problems to their single-sink (SS-BB) counterparts. We use the concept of junction-tree solutions (Chekuri et al., FOCS 2006) that play an important role in solving the offline versions of the problem via a greedy subroutine – an inherently offline procedure. Our main technical contribution is in designing an online algorithm using only the existence of good junction-trees to reduce an MC-BB instance to multiple SS-BB subinstances. Along the way, we also give the first non-trivial online node-weighted/directed single-sink buy-at-bulk algorithms. In addition to the new results, our generic reduction also yields new proofs of recent results for the online node-weighted Steiner forest and online group Steiner forest problems. ∗ Microsoft Research, 9 Lavelle Road, Bangalore, India. Email: [email protected]. Department of Computer Science and DIMAP, University of Warwick, Coventry, UK. Email: [email protected]. ‡ Microsoft Research, 9 Lavelle Road, Bangalore, India. Email: [email protected]. § Department of Computer Science, Duke University, Durham, NC, USA. Email: [email protected]. † 1 Introduction In a typical network design problem, one has to find a minimum cost (sub) network satisfying various connectivity and routing requirements. These are fundamental problems in combinatorial optimization, operations research, and computer science. To model economies of scale in network design, Salman et al. [32] proposed the buy-at-bulk framework, which has been studied extensively over the last two decades (e.g., [6, 20, 33, 22, 29, 28, 15, 14]). In this framework, each network element is associated with a subadditive function representing the cost for a given utilization. Given a set of connectivity demands comprising k source-sink pairs, the goal is to route integral flows from the sources to the corresponding sinks concurrently to minimize the total cost of the routing. An important application of the problem is capacity planning in telecommunication networks or in the Internet. As observed by Awerbuch and Azar [6], this application is inherently “online” in that terminalpairs arrive over time and need to be served without knowledge of future pairs. The authors of [6] give a logarithmic-competitive online algorithm for the uniform case where every edge is associated with the same cost function. However, uniformity is not always a feasible assumption, especially in heterogeneous, dynamic networks like the Internet. Indeed recent research (e.g., [29, 28, 15]) has focused on the nonuniform setting with a different sub-additive function for every network element. In this non-uniform setting, Meyerson [28] gives a polylogarithmic-competitive algorithm for the special case when all terminal-pairs share the same sink. To the best of our knowledge, no non-trivial online algorithm is known for the general multicommodity setting, which is the focus of our paper. We consider, in increasing order of generality, undirected edge-weighted graphs, undirected nodeweighted graphs, and directed edge-weighted graphs.1 It is also convenient to classify the problems that we study into the single-sink version where all the terminal-pairs share a common sink, and the general multicommodity version where the sinks in the terminal-pairs may be distinct. For notational convenience, we use the following shorthand forms for our problems: X-Y-BB where X = SS or MC (single-sink and multicommodity, respectively) and Y = E or N or D (undirected edge-weighted, undirected node-weighted, and the general directed case, respectively). 1.1 Our Contributions We obtain the following new results (unless otherwise noted, our algorithms run in polynomial time): • A poly-logarithmic competitive online algorithm for the MC-E-BB problem. • A poly-logarithmic competitive online algorithm for MC-N-BB and SS-N-BB that runs in quasipolynomial time. 1 • An Õ(k 2 +ε )-competitive online algorithm for MC-D-BB for any constant ε > 0 with running time nO(1/ε) , where Õ(.) hides polylogarithmic factors. For SS-D-BB, the ratio improves to Õ(k  ), translating to a polylogarithmic competitive ratio in quasi-polynomial time. • Online algorithms for prize-collecting versions of all the above problems with the same competitive ratio. Up to exponents in the logarithm, our online algorithms match the best known offline approximation algorithms (Chekuri et al. [15] for MC-E/N-BB and Antonakopoulos [5] for MC-D-BB); for MC-N-BB, 1 In undirected graphs, node costs can simulate edge costs; in directed graphs they are equivalent. 2 however, a polynomial time, polylogarithmic approximation is known [14], whereas our algorithm runs in quasi-polynomial time. Furthermore, a logarithmic lower bound, even for SS-E-BB, follows from the lower bound for the online Steiner tree problem [26], and a polylogarithmic lower bound for online SS-N-BB follows from a matching one for set cover [3]. From a technical perspective, we derive all the multicommodity results using a generic online reduction theorem that reduces a multicommodity instance to several single-sink instances, for which we either use existing online algorithms or give new online algorithms. Informally, one can view this as the “online analog” of the junction-tree approach pioneered by Chekuri et al. [15] for offline multicommodity network design. We discuss this approach in the next subsection. 1.2 An Online Reduction to Single Sink Instances Multicommodity network design problems, both online and offline, are typically more challenging than their single-sink counterparts, and have historically2 required new ideas every time depending on the specific problem at hand. The situation is no different for buy-at-bulk, both for uniform and non-uniform costs. In the offline buy-at-bulk setting, this shortcoming is addressed by Chekuri et al. [15] (expanded to other problems by [14, 13, 5]), who introduce a generic combinatorial framework for mapping a single instance of a multicommodity problem to multiple instances of the corresponding single-sink problem. At the heart of this scheme is the following observation that holds for many multicommodity problems such as (edge/node) Steiner forest, directed Steiner network, buy-at-bulk, and set connectivity: there exists a nearoptimal3 junction-tree solution for the multicommodity problem that decomposes into solutions to multiple single-sink problems where each single-sink problem connects some subset of the original terminal-pairs to a particular root. The problem now reduces to finding good junction-trees to cover all the terminal-pairs. The offline techniques [15, 13, 5] tackle this using a greedy algorithm for finding the single-sink solutions; more precisely, in each step they find the best density (cost per terminal-pair) solution that routes a subset of terminalpairs via a single sink. A set cover style analysis then bounds the loss for repeating this procedure until all terminal-pairs are covered. However, as the reader may have already noticed, the greedy optimization approach is inherently offline, as finding the best-density solution requires knowledge of all terminal-pairs upfront. Our main technical contribution in this work is an online version of the junction-tree framework. Indeed, we show how to reduce any multicommodity buy-at-bulk instance to a collection of single-sink instances online. (Informal Theorem) If the junction-tree approximation factor of the MC-BB problem is α, the integrality gap of a natural LP relaxation of the SS-BB problem is β, and there is a γ-competitive online algorithm for the SS-BB problem, then there is an O(αβγ · polylog(n))-competitive algorithm for the MC-BB problem. To prove the above theorem, we first write a composite-LP, which has (a) an outer-LP comprising assignment variables that fractionally assign terminal-pairs to roots, and (b) many inner-LPs which correspond to the natural LP relaxations for the SS-BB problem for each root and the terminal-pairs fractionally assigned to it by the outer-LP. We then apply the framework of online primal-dual algorithms (see [10] for instance) to solve the composite-LP online. However, there are two main challenges we need to surmount. • First, the existing framework has been mostly applied to purely covering/packing LPs4 and our inner2 For instance, compare [29] and [12] for the SS-E-BB and MC-E-BB problem, and compare Naor et al. [31] and Hajiaghayi et al. [24] for the online node-weighted Steiner tree and Steiner forest problem. 3 We call the quality of such a solution the junction-tree approximation factor; e.g., it is O(log n) for MC-E-BB and MC-NBB [15] 4 Our current understanding of mixed packing-covering is limited [7] and does not capture the problem we want to solve. 3 LPs have both kinds of constraints, and moreover, there is an outer-LP encapsulating them. We show nonetheless that it can be extended to solving our LP fractionally up to polylogarithmic factors. Indeed, we use the specific flow-structure of the inner-LP, and each step of our algorithm solves many (auxiliary) min-cost max-flow problems. • The second difficulty is in rounding this fractional solution online. This is a hard problem, and currently we do not know how to do so even for basic network design problems such as the Steiner tree problem. To circumvent this, we show that it suffices to only partially round the LP. More precisely, we round the LP solution so that only the outer-LP (assignment variables) become integral, and the inner-LPs remain fractional. This gives us an integral assignment of the terminal-pairs to different single-sink instances, with bounded total fractional cost. Now, from the bounded integrality gap of the inner-LPs, we know that there exist good single-sink solutions for our assignment of terminal-pairs to roots, even though we cannot find them online5 . Using this knowledge, our final step is to run online single-sink algorithms for each root, and send the terminal-pairs to the root as determined by the outer-LP assignment. Figure 1 summarizes our overall approach. initialize multiple online algorithms for the single-sink problem (one for each vertex as root). when (si , ti ) arrives update the fractional solution of the composite LP to satisfy the new request round the composite LP to get an integral solution to the outer LP, which gives us an assignment of (si , ti ) to some root r send both si and ti to the instance of the single-sink online algorithm with root r Figure 1: Online Framework for Multicommodity Network Design Problems The results mentioned in Section 1.1 follow by bounding α, β, γ for the corresponding problems. For MC-E-BB, all of these are known to be O(polylog(n)) ([15, 29, 28] respectively). For MC-N-BB, it is known both α, β are bounded by O(polylog(n)) [14], and we bound γ in Section 5 by giving the first online algorithms for SS-N-BB. For MC-D-BB, we need some additional work. In this case we cannot directly bound β, since the integrality gap of the natural LP relaxation is not known to be bounded. Nevertheless, in Section 4, we show that it suffices to work only with more structured instances for which we can bound the integrality gap. Finally, we illustrate the generality of our reduction theorem by noting that, when combined with existing bounds on α, β, and γ, it immediately implies (up to polylogarithmic factors) some recent results in online network design, such as online node-weighted Steiner forest [24], and online edge-weighted group Steiner forest [31] – two problems for which specialized techniques were needed, even though their single-sink counterparts were known earlier. 5 The difficulty comes from the fact that the online solution we maintain must be monotonic, i.e., the decisions are irrevocable. 4 1.3 Related Work Buy-at-bulk network design problems have received considerable attention over the last two decades, both in the offline and online settings. For the uniform cost model, Awerbuch and Azar [6] give an O(log n)approximation for MC-E-BB, while O(1)-approximations are known [20, 33, 22] for SS-E-BB. We also note that O(1)-approximations have been obtained in special cases for the multicommodity problem, such as in the rent-or-buy setting [21]. Meyerson et al. [29] give an O(log k) √ approximation for the general SS-E-BB, and the first non-trivial algorithm for MC-E-BB is an exp(O( log n log log n))-approximation due to Charikar and Karagiozova [12]. This was improved to a poly-logarithmic factor by Chekuri et al. [15] who also solve MC-N-BB [14] with similar guarantees. For directed graphs, our knowledge is much sparser. Even for special cases like directed √ Steiner tree and forest, the best polytime approximation factors known are O(k ε ) [34, 11] and min(O( k, n2/3 )) [13, 18, 8] respectively, and these ideas were extended to MC-D-BB by Antonakopoulos [5]. On the hardness side, Andrews [4] shows that even the MC-E-BB problem is Ω log1/2−ε n)-hard, while MC-D-BB (in fact directed Steiner forest) is known to be label-cover hard [17]. The online Steiner tree problem (a special case of online SS-E-BB) was first studied by Imase and Waxman [26] who give an O(log k)-competitive algorithm. Berman and Coulston [9] give an O(log k)competitive algorithm for online Steiner forest, and both these results are tight, i.e., there is an Ω(log k) lower bound. As mentioned earlier, Awerbuch and Azar’s algorithm [6] can be seen as an O(log n)-competitive online algorithm for the uniform-cost MC-E-BB. For non-uniform buy-at-bulk, the only online algorithm that we are aware of is Meyerson’s [28] polylog-competitive algorithm for the single-sink problem. For online node-weighted network design, developments are much more recent. A polylogarithmic approximation for the node-weighted Steiner tree problem was first given by Naor et al. [31] and later extended to the online node-weighted Steiner forest problem [24] and prize-collecting versions [23]. These algorithms, like ours in this paper, utilize the online adaptation of the primal-dual and LP rounding schemas pioneered by the work of Alon et al. [3] for the online set cover problem (see also [2] for its adaptation to network design problems). We also note that in the node-weighted setting, the online lower bound can be strengthened to Ω(log n log k) using online set cover lower bounds [3, 27]. 2 Preliminaries and Results We now formally state the problem, set up notation that we use throughout the paper, and state our main theorems. 2.1 Our Problems Buy-at-bulk Network Design. In the most general setting of the MC-D-BB problem, an instance I = (G, X ) consists of a directed graph G = (V, E) and a collection X of terminal-pairs (si , ti ) ∈ V × V ; each such si and ti is called a terminal. Each (si , ti ) pair also has a positive integer demand di , which we assume to be 1 for clarity in presentation.6 Additionally, each edge e ∈ E is associated with a monotone, sub-additive7 cost function fe : R≥0 → R≥0 . A feasible solution to the problem is a collection of paths {P1 , . . . , Pk } where Pi is a directed path from si to ti carrying load di . Given a solution {P1 , . . . , Pk }, we 6 We can handle non-uniform demands by incurring an additional O(log D) factor in the competitive ratio and the running time (where D is the maximum demand) by having O(log D) “unit-demand” instances, where the ith instance deals with demands between 2i−1 and 2i . 7 That is, fe (x) ≥ fe (y) whenever x ≥ y, and fe (x + y) ≤ fe (x) + fe (y) 5 P let load(e) = i:e∈Pi diP denote the total load on edge e. The goal is to find a feasible solution minimizing the objective ObjBB := e∈E fe (load(e)). In the online problem, the offline input consists of the graph G and the cost functions fe . The pairs (si , ti ) arrive online in an unknown, possibly adversarial, order. When a pair (si , ti ) arrives, the algorithm must select the path Pi that connects them, and this decision is irrevocable. Reduction to the Two-metric Problem. Following previous work, throughout this paper we consider an equivalent problem (up to constant factors) known as two-metric network design. In this problem, instead of functions fe (.) on the edges, we are given two parameters ce and `e on each edge. One can think of ce as a fixed buying cost, or just cost, of edge e, and `e as a per-unit flow cost, or length, of edge e. The feasible solution space is the P P same P as for the buy-at-bulk problem, and the goal is to minimize the objective Obj2M := e∈S Pi ce + i e∈Pi `e . The following lemma is well known (see e.g., [15]). i Lemma 1. Given an instance of the buy-at-bulk problem, for any ε > 0 one can find an instance of the two-metric network design problem such that, for any feasible solution, Obj2M ≤ ObjBB ≤ (2 + ε)Obj2M . Remark. In light of the above lemma, henceforth we abuse notation and let the buy-at-bulk problem mean the two-metric network design problem. 2.2 Our Tools Junction-tree solutions. Given an instance I = (G, X ) of the buy-at-bulk problem, we consider junctiontree8 solutions, a specific kind of solution to the problem introduced by [15]. In such solutions, the collection of pairs are partitioned into groups and each group is indexed by a root vertex r ∈ V . For all terminal pairs (si , ti ) in a group indexed by r, the path Pi from si to ti contains the root vertex r (see Figure 2). t4 t2 s1 junction s3 t1 t3 s4 s2 Figure 2: A group of terminal pairs routed via a junction-vertex in an undirected graph. Formally, consider an instance I = (G, X ) of the buy-at-bulk problem, and let Opt denote the objective value of the optimum solution. Given a partition Π := (πr1 , . . . , πrq ) of terminal pairs indexed by q different root vertices, a junction-tree solution is one that uses single-sink solutions to connect the original terminalpairs. Indeed, for each part πr indexed by root r, consider the optimal solutions to the single-sink problem on graph G with demands {(si , r) : (si , ti ) ∈ πr } and the single-source problem9 with pairs {(r, ti ) : (si , ti ) ∈ πr }. Let Optr (πr ) denote the sum ofPthe objectives of the optimal solutions to the single-sink and single-source problems, and let Opt(Π) := r∈V Optr (πr ). Let Optjunc denote the minimum Opt(Π) 8 The word tree is misleading since the final solution need not be a tree in directed graphs. Nevertheless, we continue using this term for historical reasons. Junction trees were originally proposed for undirected graphs, where the solution is indeed a tree. 9 The single-source problem in a directed graph is identical to the single-sink problem with all the edges reversed in direction. For undirected graphs, both problems are on the same graph. 6 over all partitions. We call this solution the optimum junction-tree solution for this instance.10 Clearly, Optjunc ≥ Opt. The junction-tree approximation factor of I is defined to be the ratio Optjunc /Opt. LP Relaxation. We now describe a natural flow-based LP relaxation for the single-sink buy-at-bulk problem for an instance I = (G, T ) where T is a set of terminals that need to be connected to the root r. minimize X ce xe + e∈E s.t XX i `e fi (e) (SS-BaB LP) e∈E {fi (e) : e ∈ E(G)} defines a flow from si to r of value 1 fi (e) ≤ xe xe ≥ 0, fi (e) ≥ 0 ∀si ∈ T ∀e ∈ E ∀e ∈ E Recall that the integrality gap of (SS-BaB LP) on the instance I = (G, T ) is defined to be the ratio of Opt to the optimal value of the LP (SS-BaB LP). Also, we define the integrality gap for the graph G to be the worst case integrality gap (over all requests T on graph G) of the corresponding instance I = (G, T ). 2.3 Our Results Main Technical Theorem and its Applications. Now we are ready to state our main theorem; the proof is in Section 3. We say that an online algorithm is γ-competitive for a graph G if, for any sequence of requests X , the online algorithm for buy-at-bulk returns a solution within a γ-factor of Opt(I), where I = (G, X ). Theorem 2 (Reduction to Single-Sink Online Algorithms). Fix an instance I = (G, X ) of the MC-BB problem. Suppose the following three conditions hold. (i) The junction-tree approximation factor of I is at most α. (ii) The integrality gap of (SS-BaB LP) on any single-sink instance on graph G is at most β. (iii) There is a γ-competitive online SS-BB algorithm for any instance on graph G that runs in time T . Then there is an online algorithm for I running in time poly(n, T ) whose competitive ratio is O(αβγ · polylog(n)). Using this theorem, we can immediately obtain the following new results mentioned in the introduction. Theorem 3 (Undirected Edge-weighted Buy-at-Bulk). There is a polylog(n)-competitive, polynomial time randomized online algorithm for the MC-E-BB problem. Proof: The theorem follows directly by combining Theorem 2 with the following results from previous work. Chekuri et al. [15] prove that the junction-tree approximation factor for the undirected edge-weighted buy-at-bulk problem is O(log k). Chekuri et al. [16] prove that the integrality gap of (SS-BaB LP) in undirected edge-weighted graphs is O(log k). Meyerson [28] gives a randomized polynomial time online algorithm for the single-sink buy-at-bulk problem with competitive ratio O(log4 n).  Theorem 4 (Undirected Node-weighted Buy-at-Bulk). For any constant ε > 0, there is an O(k ε polylog(n))competitive, randomized online algorithm for MC-N-BB with running time nO(1/ε) . As a corollary, this yields a polylog(n)-competitive, quasi-polynomial time algorithm for this problem. 10 Note that copies of the same edge appearing in multiple single-sink solutions are treated as distinct edges in the junction-tree solution. Hence, decomposing the optimal multicommodity solution into its constituent paths does not yield Optjunc = Opt. 7  Theorem 5 (Directed Buy-at-Bulk). For any constant ε > 0, there is an O k 1/2+ε polylog(n)) -competitive, polynomial time online algorithm for the MC-D-BB. We again use Theorem 2 to prove the above theorems. However, unlike for MC-E-BB, we are not aware of any online algorithms for the SS-N-BB and SS-D-BB problems. We therefore first give online algorithms for these problems, and then use Theorem 2; the details appear in Sections 5 and 4. Finally, we can almost directly use Theorem 2 to also obtain matching results for prize-collecting versions of the above problems. Recall that in a prize-collecting problem, every terminal-pair also comes with a penalty qi , and the algorithm can opt to not satisfy the request by incurring this value in the objective. We give the extension of our results to the corresponding prize-collecting problems in Section 6. Theorem 6. For each of the above problems, there is an online algorithm with matching running time and competitive ratio for the corresponding prize-collecting version. In addition to the new results mentioned above, we can also use Theorem 2 to give alternative proofs (with slightly worse polylog factors) of some recent results in online network design. By combining Theorem 2 with the polylog(n)-competitive algorithm for online group Steiner Tree due to Alon et al. [2], we obtain a polylog(n)-competitive online algorithm for the group Steiner forest problem – a result shown earlier by Naor et al. [31]. Similarly, by combining Theorem 2 with the polylog(n)-competitive online algorithm for the node-weighted Steiner tree problem due to Naor et al. [31], we obtain a polylog(n)-competitive online algorithm for the node-weighted Steiner forest problem – a result shown earlier by Hajiaghayi et al. [24]. Height Reduction Theorem. One of the technical tools that we use repeatedly in this paper is the following result, which builds on the work of Helvig et al. [25]. We give the proof in Appendix A. Theorem 7. Given a directed graph G = (V, E) with edge costs ce and lengths `e , for all h > 0, we can efficiently find an upward directed, layered graph Gup h on (h + 1) levels and edges (with new costs and lengths) only between successive levels going from bottom (level h) to top (level 0), such that each layer has n vertices corresponding to the vertices of G, and, for any set of terminals X and any root vertex r, (i) the optimal objective value of the single-sink buy-at-bulk problem to connect X (at level h) with 1/h )φ, where φ is the objective value of an optimal r (at level 0) on the graph Gup h is at most O(hk solution of the same instance on the original graph G; (ii) given a integral (resp. fractional solution) of objective value φ for the single-sink buy-at-bulk problem to connect X with r on the graph Gup h , we can efficiently recover an integral (resp. fractional solution) of objective value at most φ for the problem on the original graph G. Likewise, we can obtain a downward directed, layered graph Gdown on (h + 1)-levels with edges going from h top to bottom, with the same properties as above except for single-source instances instead. 3 Proof of Theorem 2 (Online Reduction to Single-Sink Instances) There are three main steps in the proof. In Section 3.1, we describe the composite LP which is a relaxation of optimal junction-tree solutions (for technical reasons, we first need to pre-process the graph). Next, in Section 3.2, we show how to fractionally solve the LP online. Third, in Section 3.3, we show how to partially round the LP online. The resulting solution then decomposes as fractional solutions to different single-sink instances. Finally, we use the bounded integrality gap and the online algorithm for SS-BB to wrap up the proof in Section 3.4. 8 3.1 The Composite-LP Relaxation: MC-BaB LP We first apply Theorem 7 with h = Θ(log n) to obtain layered graphs Gup (resp., Gdown ) of height O(log n) where all the edges are directed upward (resp. downward); see Figure 3 for an illustration. The reason for this preprocessing is that the length of the (si , ti ) paths appear as a factor in our final competitive ratio and the above step bounds it to a logarithmic factor. Recall that the graph Gup (resp., Gdown ) approximately preserves the single-sink (resp., single-source) solutions for any set of terminals and any root. After this step, we can imagine that all the roots (of the single-sink instances we will solve) are vertices in level 0, and all the terminals will be vertices in level h = Θ(log n). For clarity of presentation, we refer to the root and terminal vertices by the same name in both Gup and Gdown (even though the graphs are completely disjoint). Overloading notation, let V denote the vertices in level 0 in both Gup and Gdown , and let E be the union of the edge sets of Gup and Gdown . Furthermore, the cost ce and length `e of these edges are inherited from Theorem 7. v1,0 v2,0 v3,0 v4,0 v5,0 v6,0 (roots are here) v1,0 level 0 v2,0 v3,0 v4,0 v5,0 v6,0 V v1,3 v2,3 v3,3 v4,3 v5,3 v6,3 Gup level 3 v1,3 v2,3 v3,3 v4,3 v5,3 v6,3 (terminals arrive here) Gdown Figure 3: The graphs Gup and Gdown with h = 3, where the original graph G has 6 vertices {v1 , v2 , . . . , v6 }. Now, using the junction-tree decomposition with approximation factor α, we get the following lemma. Lemma 8. There exists a set R∗ ⊆ V of root vertices, a partition Π∗ := {πr : r ∈ R∗ } of the terminalpairs in X , a collection of in-trees {Trup : r ∈ R∗ } rooted at r in Gup , and a collection of out-trees {Trdown : r ∈ R∗ } rooted at r in Gdown such that (i) Each (si , ti ) ∈ X belongs to πr for some r ∈ R∗ . (ii) For each r ∈ R∗ , the in-tree Trup is a feasible solution to the single-sink buy-at-bulk problem connecting {si : (si , ti ) ∈ πr } to r in Gup ; likewise, the out-tree Trdown is a feasible solution to the single-source buy-at-bulk problem connecting r to {ti : (si , ti ) ∈ πr } in Gdown . (iii) The sum of objective values of the single-source and single-sink solutions is at most O(α log n) · Opt(I). Proof: Since the junction-tree approximation ratio of the given instance is α, there exists a junction-tree solution given by a set of roots R∗ and a partition Π∗ := {πr : r ∈ R∗ } such that the total objective value of all the single-sink and single-source junction-trees is at most αOpt(I). Moreover, by Theorem 7, because we choose the height h = Θ(log n), the objective value of each single-sink and single-source solution in G increases by a factor of O(log n) in Gup and Gdown respectively. Thus, the overall objective value of the resulting junction-trees in the graphs Gup and Gdown is O(α log n) · Opt(I).  9 The above lemma motivates the LP relaxation given in Fig. 4 which seeks to assign each (si , ti ) pair to some rooted instance, and then minimizes the total fractional objective value of the rooted instances. Each individual rooted instance is represented by an inner-LP (see the boxed constraints in Fig. 4). minimize XX ce xre + r∈V e∈E s.t X r∈V X XX   r r + f `e f(e,s (e,ti ) i) (MC-BaB LP) (si ,ti )∈X r∈R e∈E zir ≥ 1 ∀i zir ≥ 0 (2b) r } define a flow from si to r of value zir in Gup {f(e,s i) r {f(e,t } define a flow from r to ti of value zir in Gdown i) r f(e,s ≤ xre i) r f(e,t ≤ xre i) r xre ≥ 0, f(·) (2a) ∀i, ∀r ∈ V (2c) ∀i, ∀r ∈ V (2d) ∀i, ∀e, ∀r ∈ V ∀i, ∀e, ∀r ∈ V ≥0 (2e) (2f) (2g) Figure 4: Composite LP for MC-BB. Equations (2a) and (2b) form the outer-LP; (2c)-(2g) form the innerLPs. In the LP, zir denotes the extent to which the pair (si , ti ) chooses root r to route its flow. Within each inner-LP corresponding to a root r, {xre } are the variables which denotes whether edge e is used to route flow r r in the corresponding rooted instance, and f(e,s (resp. f(e,t ) denotes the amount of flow si sends (resp., i) i) ti receives) along e to (resp., from) root r. Observe that if the zir variables are integral, then the inner-LP corresponding to every root r constitutes a feasible fractional solution to (SS-BaB LP) for the single-sink instance I 0 = (Gup , X 0 ) where X 0 = {(si , r) : zir = 1} and the single-source instance I 00 = (Gdown , X 00 ) where X 00 = {(r, ti ) : zir = 1}. The next lemma, which bounds the optimal value of the MC-BaB LP, follows directly from Lemma 8. Lemma 9. The optimum value of (MC-BaB LP) is O(α log n) · Opt(I). 3.2 An online fractional algorithm for the MC-BaB LP Theorem 10. There is a randomized, polynomial-time online algorithm that returns a feasible fractional solution for (MC-BaB LP) of value at most O(α log3 n) · Opt(I). In the remainder of the subsection, we prove the above theorem. We remark that the overall reduction uses Theorem 10 as a black-box and the time-constrained reader can skip the proof and move to Section 3.3. To simplify the exposition, we assume that we know the cost of an optimal solution Opt(I) up to a constant factor, using a standard doubling trick11 . Once we know Opt(I), by re-scaling all the parameters Suppose our online algorithm has a competitive ratio of α, and the true cost of an optimal solution is c∗ . Then, we begin with an initial guess for the optimal cost, and run the online algorithm assuming this guess is the correct estimate for c∗ . If our online algorithm fails to find a feasible solution of cost at most α times the current guess, we double our guess and run the online algorithm again. Eventually, our guess will exceed the optimal cost c∗ by at most a factor of two, and for this guess, the algorithm 11 10 in the problem, we may assume that it equals 1. Next, we delete any edge in Gup or Gdown that has cost ce or length `e larger than 1 as such edges cannot participate in any optimal solution. Subsequently, we initialize all xre variables to 1/n5 . Likewise, we initialize all zir variables to 1/n5 and also send an initial flow of 1/n5 from each si to r in Gup on an arbitrary flow path from si to r and likewise from r to ti in Gdown . This setting ensures that the cost of the initial solution is o(1). In the following, we partition the edge set E into disjoint sets {Ej : 0 ≤ j ≤ h − 1}, where Ej denotes the set of edges in E between levels j and j + 1. Furthermore, for clarity of exposition, we describe a ‘continuous-time’ version of the algorithm where we increase the variables as a function of time. We note that this algorithm can easily be discretized for a polynomial-time12 implementation. The algorithm is given as Algorithm 1. Algorithm 1 Online Fractional Algorithm for (MC-BaB LP) When a terminal-pair (si , ti ) arrives, we update the LP solution using the following steps: (1) Let Ri denote the set of roots r in level 0 such that si is connected to r in Gup and r is connected to ti in Gdown . For each r ∈ Ri , initialize a flow of value 1/n5 using any arbitrary flow path from si to r in Gup and likewise from r to ti in Gdown . Also set zir = 1/n5 for these roots. P (2) Repeat the following while r∈Ri zir < 1: r r (a) Call an edge e ∈ E tight for root r if xre = f(e,s or xre = f(e,t . i) i) (b) Edge Update: For all tight edges e ∈ E, update xre at the rate dxre dt := xre ce . (c) Flow Update: Solve the following min-cost max-flow problem for each r ∈ Ri : maximize ∆ such that r - there exists a flow {g(e,s } sending ∆ units of flow from si to r in Gup , i) r - there exists a flow {g(e,t } sending ∆ units of flow from r to ti in Gdown , i) r r - Capacity constraints: g(e,s ≤ TheAlgorithm(Algorithm 1).xre /ce and g(e,t ≤ xre /ce i) i) for all tight edges e, P P r r ≤ zir . ≤ zir and e `e · g(e,t - Cost constraint: e `e · g(e,s i) i) r (d) Update f(e,s at the rate i) zir at the rate dzir dt r df(e,s dt i) r r := g(e,s , and f(e,t at the rate i) i) r df(e,t i) dt r = g(e,t for all e, and update i) = ∆. We increase the x variables on tight edges at a rate inversely proportional to their cost, similar to the wellknown online set cover algorithm [3]. However, the “flow constraints” are not pure packing (or covering) constraints and there is no general-purpose way of handling them. Indeed, we determine the rate of increase of the flow variables by solving an auxiliary min-cost max-flow subroutine which routes incremental flows of equal value from si to r in Gup and from r to ti in Gdown respecting capacity constraints (i.e., for edges that are tight, the incremental flow is at most the rate of increase of x). This maintains feasibility in the inner LP. Moreover, to bound the rate of increase in objective, we enforce that the total length of the incremental flow will compute a feasible solution of cost at most 2αc∗ . Moreover, since our guesses double every time, the total cost of the edges bought by the online algorithm over all the runs across different guesses is at most Θ(αc∗ ). 12 The polynomial is in the size of the input to this algorithm, which for some of our algorithms/results is quasi-polynomial in the size of the actual problem instance as stated in the introduction. 11 is at most zir (this is the “cost” constraint in the min-cost max-flow problem). We stress that the incremental flows from the auxiliary problem dictate the rate at which we increase the original flow variables in the LP. The final solution is feasible since the algorithm runs until the outer-LP constraint is satisfied. First, note that the total cost of initialization is o(1) over all the edge and flow variables. So it suffices to bound the cost of the updates. The next lemma relates the total cost of the updates to the total time τ for which the algorithm runs, and the subsequent lemma bounds τ in terms of Opt(I). Lemma 11. The LP objective value at the end of the above algorithm is O(log n) · τ , where τ is the (continuous) time for which the algorithm runs. Proof: We show that at any time t, the rate of the increase of the LP objective value in the algorithm is at most O(log n); this proves the lemma.13 The objective increases because of increase in x variables and flow variables f ; we bound these separately. We first upper bound the objective increase due to the changes P in the x variables. Fix P a level j and let Ejtgt denote the set of tight edges in Ej at time t. By definition, e∈E tgt ∩Gup xre (resp., e∈E tgt ∩Gdown xre ) j j equals the total flow on these edges for the pair (si , ti ). j form P a cut separating si from PSince the edges in EP ti , the total flow across this cut is at most zir . Since r zir < 1, we have r e∈E tgt xre < 2. Now, the j rate of increase of each such tight edge is precisely xre /ce , which implies that the total rate of increase of the LP value due to the increase of x is at most X X r e∈E tgt j ce X X dxre ≤ xre ≤ 2. dt tgt r e∈Ej Summing over all levels gives the desired O(log n) bound. Next, we upper bound the objective increase due to the changes in the f variables. When these variables are updated, the total rate of increase of the objective due to the lengths of the (si , r) and (r, ti ) flow paths is at most zir — this is precisely the “cost” constraint in the auxiliary flow problem. Hence the total rate of increase of flow lengths is at most 2, completing the proof.  Given the above lemma, we are left to relate τ to Opt(I) in order to complete the proof of Theorem 10. Lemma 12. The time duration τ of the above algorithm satisfies τ = O(α log2 n) · Opt(I). We will need several new definitions and auxiliary lemmas in order to prove Lemma 12. Recall from Lemma 8 that we can assume that the solution that we are comparing against is the set of junction-trees defined by Trup and Trdown for r ∈ R∗ . Also, recall that the terminal-pairs are partitioned by the groups Π∗ = {πr : r ∈ R∗ }. For every (si , ti ) ∈ X , let Ps∗i denote the path from si to the root r in Trup such that (si , ti ) ∈ πr . Similarly, P let Pt∗i denote the path from r to ti in Trdown . Let `(P ) = e∈P `e for any path P . Lemma 8 asserts that   X X X   ce + `(Ps∗i ) + `(Pt∗i )  = O(α log n) · Opt(I) (3) r∈R∗ e∈Trup ∪Trdown (si ,ti )∈X To bound τ against the optimal junction-tree solution, we use two sets of charging clocks: 13 We remark that the “log n” corresponds to the number of levels in Gh justifying the preprocessing step before the LP description. 12 • We maintain an edge clock on every (e, r) pair such that e ∈ Trup or e ∈ Trdown , i.e., if e is used by the optimal junction-tree solution in the single-source (or single-sink) instance corresponding to r. In particular, note that if an edge e is in multiple junction-trees, then it has a separate clock for each such tree. • We maintain a terminal clock on every terminal-pair (si , ti ) ∈ X . The crucial invariant that we maintain is the following: at any time instant t, at least one clock “ticks,” i.e., augments its counter at unit rate. The overall goal would then be to bound the total time for which all the charging clocks can cumulatively tick. First, we describe the rule for the ticking of the clocks. Fix a time t, and let the terminal-pair (si , ti ) be the pair that is active at time t. Let r denote the root vertex which (si , ti ) has been assigned to in the optimal junction-tree solution from Lemma 8, i.e., (si , ti ) ∈ πr . Now, consider the flow-paths Ps∗i in Gup and Pt∗i in Gdown . We can have one of two situations: - If any variable xre is tight for any edge e ∈ Ps∗i ∪ Pt∗i at time t, then the edge clock on the pair (e, r) ticks at time t. If there are multiple such edges, then all the corresponding clocks tick. - Otherwise, both paths are free of tight edges. In this case, the terminal clock for (si , ti ) ticks at time t. Lemma 13. For any pair (e, r) such that e ∈ Trup ∪ Trdown , its edge clock ticks for O(ce log n) time. Proof: Notice that xre is initialized to 1/n5 for all roots r, and increases at the rate dxre xr = e dt ce (4) at all times when the edge clock on (e, r) ticks. To see why, consider a time t when the clock on (e, r) ticks, and let (si , ti ) denote the active terminal-pair at time t. It must be that (i) (si , ti ) has been assigned to root r r or xre = f(e,t . But in this case, we increase such variables at rate xre /ce r in Π∗ , and (ii) either xre = f(e,s i) i) in our algorithm (Step (2a)). Therefore, we can infer that the value of xre would be 1 after the edge clock on e has ticked for time O(ce log n). But clearly, e cannot be a tight edge for any subsequent terminal-pair (si , ti ) once xe reaches 1; therefore, the edge clock on (e, r) ticks for O(ce log n) time overall.  Lemma 14. For every terminal-pair (si , ti ) connected by the optimal junction-tree solution through the root vertex r, the total time for which the terminal clock ticks is at most O(log n) · max(`(Ps∗i ), `(Pt∗i )). Proof: Recall that if the terminal clock for (si , ti ) is ticking at time t, then it must mean that no edge is tight on either path Ps∗i or Pt∗i . In this case, we show that the variable zir increases at a fast enough rate, where r is the root (si , ti ) is assigned to in the optimal junction-tree, i.e., (si , ti ) ∈ πr . We show this by exhibiting a feasible solution to the auxiliary LP considered in Step (2b) of the algorithm for root r. Indeed, send the flow from si to r along Ps∗i , and likewise from r to ti along Pt∗i . Also set the value of ∆ to be zir / max(`(Ps∗i ), `(Pt∗i )). Clearly, on the edges of these flow paths, we do not have any capacity constraints since no edge is tight. So, the only constraints are the cost constraints which are satisfied by the choice of ∆. Hence, the rate of increase of zir is at least dzir zir ≥ dt max(`(Ps∗i ), `(Pt∗i )) 13 (5) at all times when the terminal clock on (si , ti ) ticks. This proves the claim, for otherwise the variable zir would have reached 1, and the algorithm would have completed processing (si , ti ).  Since at least one clock ticks at all times, the total time clocked is at least τ , the duration of the algorithm. Lemma 13 and Lemma 14 imply that   X X X   ce + `(Ps∗i ) + `(Pt∗i )  τ ≤ O(log n) e∈Trup ∪Trdown r∈R∗ (si ,ti )∈X which together with (3) completes the proof of Lemma 12. Theorem 10 follows from Lemma 11 and Lemma 12. 3.3 Partial Online LP Rounding We partially round the fractional solution returned by Theorem 10 to obtain integral values for only the outer-LP variables zir , i.e., each (si , ti ) pair is integrally assigned to a root. The inner-LP variables x and f continue to be fractional but represent unit fractional flow from si to r and r to ti for the (si , ti ) pairs assigned to r. The partial rounding algorithm is given as Algorithm 2. Algorithm 2 Online Partial Rounding Algorithm (1) Initialization: Each root chooses a threshold τr ∈ [1/2n, 1/(3 log n)] uniformly at random. r = (2) Partial Rounding: At each time, maintain the scaled solution x̃re = min (1, xre /τr ), f˜(·)   r min 1, f(·) /τr . Also set z̃ir = 1 if zir ≥ τr . Theorem 15. The scaled solution (x̃, f˜) component-wise dominates a feasible solution to the outer-LP, and the expected objective value of the scaled solution (x̃, f˜) is at most O(α log5 n) · Opt(I). Moreover, for each (si , ti ), there exists at least one root r such that z̃ir ≥ 1 with probability at least 1 − 1/n3 . Proof: Since each root r chooses its threshold τr independently and uniformly at random from [1/2n, 1/ log n], the probability that z̃ir = 1 is at least zir log n (since z̃ir = 1 if and only if τr ≤ zir ). Since this is independent for different roots, a standard Chernoff-Hoeffding bound application (see, e.g., [30]) shows that each (si , ti ) pair has z̃ir = 1 for some root r with probability at least 1 − 1/n3 . Moreover, the expected value of any variable xre is given by E [x̃re ] ≤ Z log n τr =1/2n xre log ndτr ≤ O(log2 n)xre . τr A similar argument shows that the expected values of scaled flow variables are also bounded by O(log2 n) times their values in the fractional solution. This shows that the expected objective value of the (x̃, f˜) solution is at most O(log2 n) times the value of (x, f ); by Theorem 10, the latter is at most O(α log3 n)Opt(I). Combining these facts gives us the desired bound on the value of the scaled solution. It remains to show that the scaled solution dominates a feasible solution to the LP. To this end, fix some root r and let Xr denote the set of (si , ti ) pairs for which zir = 1. We need to show that installing r capacities of {f˜(e,s } on the edges can support unit flow from si to r in Gup for all (si , ti ) ∈ Xr . Suppose i) 14 for contradiction that there is is a cut Q separating si from r of capacity strictly smaller than 1. This r r implies that every edge e ∈ Q must have f(e,s ≤ τr ; otherwise, we would have an edge e with f˜(e,s = i) i) 1, which contradicts our assumption on the cut capacity. But then the value of the min-cut is precisely P  r f e∈Q (e,si ) /τr , which must be at least 1 because of the following two observations: (i) we know that P r r {f(e,si ) } is a feasible flow from si to r of value zir and hence it must be that e∈Q f(e,s ≥ zir , and (ii) i) since z̃ir = 1, it must be that zir ≥ τr . This contradicts the assumption that the cut capacity is strictly r smaller than 1. A similar argument shows that the variables {f˜(e,t } can support unit flow from r to ti for i) every (si , ti ) with z̃ir = 1.  3.4 Wrapping up: Invoking the Single-Sink Online Algorithm We are now ready to put all the pieces together and present our overall online multicommodity buy-at-bulk algorithm as Algorithm 3. SingleSinkAlg is the online algorithm for SS-BB alluded to in point (iii) of the statement of Theorem 2. Algorithm 3 Online Multicommodity Buy-at-Bulk Algorithm when (si , ti ) arrives (1) update the fractional solution of the composite LP using the algorithm (Algorithm 1, Section 3.2). (2) partially round the solution using algorithm in (Fig. 2, Section 3.3). (3) if(∃r : zir ≥ 1): send both si and ti to the instance of SingleSinkAlg with root r. (4) else: buy a trivial shortest path between si and ti on the metric (c + `) and route along this path Clearly the algorithm produces a feasible solution; so we now argue about the expected objective value. Fix an (si , ti ) pair. Since the probability that a terminal-pair is not assigned to a root is ≤ 1/n3 (by Theorem 15), the expected total contribution of such unassigned terminal-pairs is ≤ 1 = Opt(I). For a root r, let πr be the terminal-pairs assigned to r. We know that (x̃, f˜) restricted to πr dominates a feasible solutionP in (SS-BaB LP). Letting LPr denote the contribution of this restriction to the overall LP value, we get r LPr = O(α log5 n) · Opt(I). By the integrality gap condition, we get that Optr , i.e. the integral optimum objective value of the instance generated by r and πr , is at most β · LPr . (Here we are using the fact from Theorem 7 that moving to the layered instance does not increase the integrality gap.) The objective value of the solution produced by SingleSinkAlg is at most γ · Optr , where γ is the competitive ratio of SingleSinkAlg. Putting these observations together, we conclude that the overall objective value of the solution returned by the online algorithm is O(αβγ log5 n) · Opt(I). This completes the proof of Theorem 2. 4 Online Directed Buy-at-Bulk In this section, we prove Theorem 5. A natural approach is to use the reduction given by Theorem 2. To this end, we need to establish the following: the existence of a junction-tree scheme with a good approximation; a good upper bound on the integrality gap for single-sink instances of the LP given in Section 2; and an online algorithm for single-sink instances with a good competitive ratio. 15 Extending the work of Chekuri √ et al. [13], Antonakopoulos [5] shows the existence of a junction-tree scheme with approximation O( k). Unfortunately, the integrality gap of the LP relaxation is not very well √ understood even for Steiner tree instances; [35] gives an Ω( k) lower bound14 on the integrality gap for the Steiner tree problem and no suitable upper bound is known. We overcome this difficulty as follows. Instead of working with general graphs, we pre-process the instance and obtain a tree-like graph for which we can show that the LP has a good integrality gap. Finally, we give the first non-trivial online algorithm for the directed single-sink buy-at-bulk problem. These results, together with our reduction (Theorem 2), imply the online algorithm for MC-D-BB. We devote the rest of this section to the proof of Theorem 5; to aid the reader, we restate the theorem below. 1 Theorem 16. For any constant ε > 0, there is a O(k 2 +ε polylog(n))-competitive, polynomial time randomized online algorithm for the general buy-at-bulk problem. Pre-processing step. We first give our reduction from general instances of the directed buy-at-bulk problem 1 to much more structured instances; the reduction loses a factor of O(k 2 +ε ) in the approximation ratio. Let h = d1/εe. Given an instance I = (G, X ) of the directed buy-at-bulk problem, we map it to a tree-like instance J = (H, X ) as follows. We start by applying Theorem 7 to G to obtain the graphs Gup and Gdown ; recall that these graphs are layered (h + 1)-level graphs with n vertices (corresponding to the vertices in G) in each level, and the levels are numbered 0, 1, . . . , h with 0 being called the root level. The graph Gup has edges directed from higher numbered levels to lower numbered levels, and Gdown has edges in the opposite direction. To facilitate the construction of the graph H, we now create n trees from Gup and n trees from Gdown as follows. For every “root vertex” r at level 0 in Gup (resp. Gdown ), the tree Trup (resp. Trdown ) is constructed as follows: • The 0th layer of Trup has just one vertex – the root r. • For each i such that 1 ≤ i ≤ h, the i-th layer of Trup contains all (i + 1)-length tuples (r, v1 , . . . , vi ) where vj is a vertex present in the j-th layer of Gup . • For every edge e = (vi , vi−1 ) ∈ Gup , there is an arc from (r, v1 , . . . , vi−1 , vi ) to (r, v1 , . . . , vi−1 ) inheriting the same cost ce and length `e . Therefore each tree Trup is an in-arborescence, with all edges directed towards the root. The tree Trdown is constructed analogously except all edges are directed away from the root. In the following, we use the term leaves to refer to the vertices on layer h of these trees. down , we have 2n After performing the above operation for every root vertex r in level 0 of Gup r and Gr trees. Then the final graph H is obtained as follows (see Figure 5). For each root r ∈ V , we first add an arc from the root of Trup to Trdown of zero cost and length. Finally, for every (si , ti ) pair, we add the vertices si and ti to H and the following arcs connecting them to the trees: for each tree Trup , we add an arc from si to each leaf of Trup of the form (r, v1 , . . . , vh ) with vh = si ; for each tree Trdown , we add an arc to ti from each leaf of Trup of the form (r, v1 , . . . , vh ) with vh = ti . These new arcs have zero cost and length (i.e., ce = `e = 0). This completes the construction of H. Note that the graph H has nO(h) vertices and a similar number of edges. Our new instance is J = (H, X ) and we will apply Theorem 2 to this instance. We first relate the objective values of J and I. 14 However, in these instances, n is exponentially large in k. So, they do not rule out a polylog(n) upper bound. 16 r1 r2 Trup 1 s1 s2 ··· Trdown 1 t1 sk t2 ··· Trup 2 Trdown 2 r2 r2 tk Figure 5: Construction of graph H. Lemma 17. Every feasible solution for J is a junction-tree solution. Proof: Note that any (si , ti ) path in H has the following structure: si connects to a leaf node of Trup for some r ∈ V , then continues to the root r, then traverse the edge to the root of Trdown , then goes down to a leaf of Trdown and finally connects to ti . Thus, for any feasible solution for J , the (si , ti ) pairs can be partitioned based on the root r through which they connect.  Lemma 18. Any feasible solution for J can be mapped to a feasible solution — in fact, a junction-tree solution — for I of equal or smaller objective value. Proof: Note that from the previous lemma, any feasible solution S in J is a junction-tree solution. Therefore, there is a partition ΠS of the (si , ti ) pairs depending on which root vertex they are using to connect. Moreover, it follows from our construction of the trees in H that any edge in Trup (resp. Trdown ) corresponds to an edge in Gup (resp. Gdown ). Therefore, if we map each edge appearing in solution S to its corresponding edge in Gup or Gdown , we obtain a mapping from each junction tree of S rooted at r to a junction tree in Gup ∪ Gdown rooted at r that is connecting the same subset of pairs. Finally, by Theorem 7, each junction tree in Gup ∪ Gdown rooted at r can be mapped, without increasing the objective value, to a junction tree in G rooted at r that is connecting the same subset of pairs. This completes the proof of the lemma.  Lemma 19. Opt(J ) ≤ O(hk 1/h )Optjunc (I), where Optjunc (I) is the objective value of an optimal junctiontree solution for I. Proof: Consider the optimal junction tree solution for I. Let the optimum partition be Π = (πr1 , . . . , πrq ) where R∗ = {r1 , r2 , . . . , rq } is the set of roots of the junction trees. For each r ∈ R∗ , let Xr = {si : (si , ti ) ∈ πr } be the set of sources of πr and Yr be the corresponding sinks. From Theorem 7, we know that the optimum objective value of any one single-sink problem connecting Xr to r in Gup is at most O(hk 1/h ) times the objective value of the optimum solution connecting each source in Xr to r. An analogous upper bound holds for every optimal single-source solution connecting r to each sink in Yr . Therefore, we get that the total sum of objective values of each of the junction trees in Gup and Gdown is at most 17 O(hk 1/h )Optjunc (I). Now notice that any solution SG for (Gup , Xr ) can easily be “simulated” by a solution ST in the tree Trup : indeed, for every root-vertex path (r, v1 , v2 , . . . , vi ) in the solution SG , include the edge from (r, v1 , v2 , . . . , vi ) to (r, v1 , v2 , . . . , vi−1 ) in ST (recall the vertices in Trup exactly correspond to such root-vertex paths). It is easy to see that the objective value of the solution ST in Trup is the same as that of SG . Similarly, any solution for (Gdown , Yr ) can be simulated in Trdown with the same objective value. It follows that there is a feasible solution in J of objective value at most O(hk 1/h )Optjunc (I).  1 Corollary 20. Opt(J ) ≤ O(k 2 +ε )Opt(I). √ Proof Sketch: Antonakopoulos [5] shows that there exists a junction-tree solution of cost at most O( k)Opt(I). The corollary follows from this work and the fact that we set h = Θ(1/ε).  Now we are ready to show that the new instance J has the properties required by the reduction, i.e., Theorem 2 can be applied. In the following lemma, a single-source (resp. single-sink) sub-instance J 0 = (H, T , v) of J = (H, X ) is a single-source (resp. single-sink) instance of the following form: the graph is the same as in J , namely H; the set of terminals T is a subset of the sources (resp. sinks) of X ; the terminals T need to be connected to a root vertex v ∈ V (H) \ {si , ti : i ∈ [k]}. Lemma 21. Let J be the instance described above. Let α, β, γ be as in the statement of Theorem 2. We have (i) The junction-tree approximation factor of J is 1 (i.e., α = 1). (ii) The integrality gap of (SS-BaB LP) for any single-sink/source sub-instance J 0 = (H, T , v) is O(h log n log k) (i.e., β = O(h log n log k)). (iii) There is a O(h2 log2 n log k)-competitive algorithm for any single-sink/source sub-instance J 0 = (H, T , v) (i.e., γ = O(h2 log2 n log k)). Proof: Property (i) follows from Lemma 17. Thus we focus on proving (ii) and (iii). In the following, we assume that we are working with a single-sink sub-instance J 0 of J ; the proof is very similar for singlesource sub-instances and we omit it. In order to show (ii) and (iii), we will map the sub-instance J 0 = (H, T , v) to an instance of the group Steiner tree problem on a tree as follows. Since v ∈ V (H) \ {si , ti : i ∈ [k]}, we have v ∈ Trup ∪ Trdown for some r. We first consider the case when v ∈ Trup . In order to define the tree of the group Steiner tree instance, we start with the subtree Tv of Trup rooted at v. We add the following ‘dangling’ edges to Tv for each source si ∈ T : for each leaf vertex u ∈ Trup such that si has an edge in Trup to u, we add a new vertex u0 to Tv and connect it to u. Let T be the resulting tree. We assign weights to the edges of T as follows. Each of the old edges e ∈ Tv receives a weight equal to ce . Each of the new edges uu0 ∈ E(T ) \ E(Tv ) receives a weight equal to `(Pu ), where Pu is the path of Trup from u to v. Finally, we define the following groups: for each source si ∈ T , we introduce a group Si consisting of all the new vertices u0 ∈ V (T ) \ V (Tv ) such that si is connected to its partner u in Trup (that is, Trup has an edge from si to u). In the resulting group Steiner tree instance, the goal is to connect all of the groups S = {Si : si ∈ T } to the root v using a minimum weight subtree of T ; we let (T, S, v) denote this instance. Now the key claim is that the feasible solutions to the single-sink buy-at-bulk (H, T , v) are in a oneto-one correspondence with feasible solution to the group Steiner tree instance (T, S, v); moreover, the objective value of a solution to the former is equal to the weight of the solution to the latter. To see this, consider a feasible solution P for the single-sink buy-at-bulk instance. Note that, for each source si ∈ T , P has a path connecting si to v; it follows from our construction of H that this path consists of an edge from 18 si to a leaf u of Trup followed by the unique path in Trup from u to v. Thus we can construct a feasible group Steiner tree solution by connecting each group Si using the path of T from u0 to v, where u0 is the partner of the leaf u of Trup through which si connects to the root in the buy-at-bulk solution. The weight of the edge u0 u captures the `-cost of si ’s path and the weight of the path from u to v captures the c-cost of si ’s path. Moreover, we can apply the same argument to fractional solutions to the two problems and show that there is a bijection between feasible fractional solutions to (SS-BaB LP) and feasible fractional solutions to the LP relaxation for group Steiner tree of Garg, Konjevod, and Ravi [19]; as before, these corresponding solutions have the same objective values. Now the desired upper bound on the integrality gap of (SS-BaB LP) follows from the work of [19] who showed that the integrality gap of the group Steiner tree LP is O(log N log K) where N = maxi |Si | is the maximum size of a group and K is the number of groups. In our setting, K ≤ |X | ≤ k and N ≤ nh . Therefore the integrality gap is O(h log n log k), which establishes property (ii). Moreover, notice that the above reduction can also be used to obtain an online algorithm for the singlesink (and single-source) sub-instances. Indeed, we simply use the online group Steiner tree algorithm of Alon et al. [1] which has a competitive ratio O(log2 N log K) = O(h2 log2 n log k). This proves property (iii).  Now we are ready to complete the proof of Theorem 16. Proof of Theorem 16: Given the instance I = (G, X ), we construct the graph H as described above; the time taken to do so is nO(h) . We pass the instance (H, X ) to Theorem 2 and, using Lemma 21, we obtain an online algorithm that, for any collection of pairs X and any adversarial ordering of X , returns a solution of cost O(polylog(n)) · Opt(J ). By Lemma 19 and Corollary 20, we can map solutions for (H, X ) to solutions for (G, X ).  We note that the approach described above also gives us new online algorithms for the single-sink buy-atbulk problem on directed graphs. For single-sink instances, the junction-tree approximation is equal to 1 √ and thus we save a factor of k. Corollary 22. There is a polynomial time O(k ε · polylog(n))-competitive online algorithm for the singlesink (or single-source) buy-at-bulk problem on directed graphs. The competitive ratio can be improved to polylog(n) if the running time can be quasi-polynomial in n. 5 Online Single-sink, Undirected, Node-weighted Buy-at-Bulk In this section, we prove Theorem 4. Again, we use our main theorem (Theorem 2) and reduce the multicommodity buy-at-bulk problem to the single-sink version of the problem. We combine the reduction theorem with the following results from previous work. Chekuri et al. [13] show the existence of a junction-tree scheme with approximation factor O(log k). Moreover, the natural LP relaxation for the single-sink buyat-bulk problem on graphs with node costs is also O(log k) [15]. For the single-source online algorithm, we resort to the algorithms from the previous section for the more general directed single-sink buy-at-bulk problem (see Corollary 22). We now obtain the desired result by the following parameter settings: α = O(log k) β = O(log k) γ = O(polylog(n)) T = nO(log n) . 19 6 Online Prize-Collecting Buy-at-Bulk In the prize-collecting version of the buy-at-bulk problem, each terminal pair (si , ti ) also comes with a penalty qi and the algorithm may choose not to serve this request and incur the penalty in the total cost. We show that our online reduction framework (Theorem 2) can be easily modified to handle prize-collecting versions as follows. Theorem 23. Let I be a buy-at-bulk instance and suppose the three conditions of Theorem 2 hold. Then there is an O(αβγ · polylog(n))-competitive online algorithm for the online, prize-collecting buy-at-bulk problem on I with arbitrary penalties. Proof: We closely follow the proof of Theorem 2. The first difference is in the LP-formulation. Now, for each (si , ti ) pair we have an extra variable zi,0 which indicates whether we choose to discard this pair (and pay the corresponding penalty) or not. We point out the differences with (MC-BaB LP). The new objective function is  XX X XX  X r r minimize ce xre + `e f(e,s + f + qi zi,0 (e,ti ) i) r∈V e∈E (si ,ti )∈X r∈R e∈E (si ,ti )∈X and (2a) is replaced by X r∈V zir + zi,0 ≥ 1 ∀i Observe that the optimum value of this modified LP is at most O(α log n) times the optimum: set zi,0 = 1 for the pairs the integral optimum solution does not connect, and for the rest apply Lemma 9. Also observe that the modified LP can be thought of the old LP on a modified instance where the graphs Gup and Gdown (obtained from Theorem 7) have another vertex “0” at the root level, and each si has a direct path from si to “0” in Gup with total length qi /2 and no fixed cost, and similarly, each ti has a path from “0” to ti in Gdown with total length qi /2 and no fixed cost. The rest of the proof now follows exactly as in Section 3, by also including the special vertex as a possible root while rounding to make the outer LP variables integral.  7 Conclusion In this paper, we gave the first polylogarithmic-competitive online algorithms for the non-uniform multicommodity buy-at-bulk problem. Our result is a corollary of a generic online reduction technique that we proposed in this paper for converting a multicommodity instance into several single-sink instances, which are often easier to design algorithms for. We believe that this reduction will have other applications beyond the buy-at-bulk framework, and illustrate this by showing that recent results on online node-weighted Steiner forest and online generalized connectivity directly follow from our reduction theorem. Our work also opens up new directions for future research. For instance, our algorithm for the node-weighted problem runs in quasi-polynomial time, and a concrete open question is to get a polynomial-time polylogarithmiccompetitive algorithm for the SS-N-BB problem (this suffices for MC-N-BB as well by our main theorem). Another technical question concerns non-uniform demands. While our algorithm can be extended to the case of non-uniform demands, the approximation ratio incurs an additional O(log D) factor, where D is the ratio of the largest to the smallest demand. It would be interesting to eliminate this dependence on D since the corresponding offline results do not have this dependence. More generally, a broader question is to investigate other mixed packing-covering LPs that can be solved and rounded online. 20 Acknowledgements D. Panigrahi is supported in part by NSF Award CCF-1527084, a Google Faculty Research Award, and a Yahoo FREP Award. References [1] N. Alon, B. Awerbuch, Y. Azar, N. Buchbinder, and J. Naor. A general approach to online network optimization problems. In Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 577–586, 2004. [2] N. Alon, B. Awerbuch, Y. Azar, N. Buchbinder, and J. Naor. A general approach to online network optimization problems. ACM Trans. on Alg., 2(4):640–660, 2006. [3] N. Alon, B. Awerbuch, Y. Azar, N. Buchbinder, and J. Naor. The online set cover problem. SIAM J. Comput., 39(2):361–370, 2009. [4] M. Andrews. Hardness of buy-at-bulk network design. In Proceedings, IEEE Symposium on Foundations of Computer Science (FOCS), pages 115–124, 2004. [5] S. Antonakopoulos. Approximating directed buy-at-bulk network design. In Proceedings, Workshop on Approximation and Online Algorithms (WAOA), pages 13–24, 2010. [6] B. Awerbuch and Y. Azar. Buy-at-bulk network design. In Proceedings, IEEE Symposium on Foundations of Computer Science (FOCS), pages 542–547, 1997. [7] Y. Azar, U. Bhaskar, L. Fleischer, and D. Panigrahi. Online mixed packing and covering. In Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 85–100, 2013. [8] P. Berman, A. Bhattacharyya, K. Makarychev, S. Raskhodnikova, and G. Yaroslavtsev. Approximation algorithms for spanner problems and directed steiner forest. Inform. and Comput., 222:93–107, 2013. [9] P. Berman and C. Coulston. On-line algorithms for steiner tree problems (extended abstract). In Proceedings, ACM Symp. on Theory of Computing (STOC), pages 344–353, 1997. [10] N. Buchbinder and J. Naor. Online primal-dual algorithms for covering and packing. Math. Oper. Res., 34(2):270–286, 2009. [11] M. Charikar, C. Chekuri, T. Cheung, Z. Dai, A. Goel, S. Guha, and M. Li. Approximation algorithms for directed steiner problems. J. Algorithms, 33(1):73–91, 1999. [12] M. Charikar and A. Karagiozova. On non-uniform multicommodity buy-at-bulk network design. In Proceedings, ACM Symp. on Theory of Computing (STOC), pages 176–182, 2005. [13] C. Chekuri, G. Even, A. Gupta, and D. Segev. Set connectivity problems in undirected graphs and the directed steiner network problem. ACM Transactions on Algorithms, 7(2):18, 2011. [14] C. Chekuri, M. T. Hajiaghayi, G. Kortsarz, and M. R. Salavatipour. Approximation algorithms for node-weighted buy-at-bulk network design. In Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 1265–1274, 2007. 21 [15] C. Chekuri, M. T. Hajiaghayi, G. Kortsarz, and M. R. Salavatipour. Approximation algorithms for nonuniform buy-at-bulk network design. SIAM J. Comput., 39(5):1772–1798, 2010. [16] C. Chekuri, S. Khanna, and J. Naor. A deterministic algorithm for the cost-distance problem. In Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), volume 7, pages 232–233, 2001. [17] Y. Dodis and S. Khanna. Design networks with bounded pairwise distance. Proceedings, ACM Symp. on Theory of Computing (STOC), pages 750 – 759, 1999. [18] M. Feldman, G. Kortsarz, and Z. Nutov. Improved approximation algorithms for directed steiner forest. J. Comput. System Sci., 78(1):279–292, 2012. [19] N. Garg, G. Konjevod, and R. Ravi. A polylogarithmic approximation algorithm for the group steiner tree problem. J. Algorithms, 37(1):66–84, 2000. [20] S. Guha, A. Meyerson, and K. Munagala. A constant factor approximation for the single sink edge installation problem. SIAM J. Comput., 38(6):2426–2442, 2009. [21] A. Gupta, A. Kumar, M. Pál, and T. Roughgarden. Approximation via cost-sharing: A simple approximation algorithm for the multicommodity rent-or-buy problem. In Proceedings, IEEE Symposium on Foundations of Computer Science (FOCS), pages 606–615, 2003. [22] A. Gupta, A. Kumar, and T. Roughgarden. Simpler and better approximation algorithms for network design. In Proceedings, ACM Symp. on Theory of Computing (STOC), pages 365–372, 2003. [23] M. Hajiaghayi, V. Liaghat, and D. Panigrahi. Near-optimal online algorithms for prize-collecting steiner problems. In Proceedings, International Colloquium on Automata, Languages and Processing (ICALP), pages 576–587, 2014. [24] M. T. Hajiaghayi, V. Liaghat, and D. Panigrahi. Online node-weighted steiner forest and extensions via disk paintings. In Proceedings, IEEE Symposium on Foundations of Computer Science (FOCS), pages 558–567, 2013. [25] C. S. Helvig, G. Robins, and A. Zelikovsky. An improved approximation scheme for the group steiner problem. Networks, 37(1):8–20, 2001. [26] M. Imase and B. M. Waxman. Dynamic steiner tree problem. SIAM J. Discrete Math., 4(3):369–384, 1991. [27] S. Korman. On the use of randomization in the online set cover problem. M.S. thesis, Weizmann Institute of Science, 2005. [28] A. Meyerson. Online algorithms for network design. In Proceedings, ACM Symposium on Parallelism in Algorithms and Architectures (SPAA), pages 275–280, 2004. [29] A. Meyerson, K. Munagala, and S. A. Plotkin. Cost-distance: Two metric network design. SIAM J. Comput., 38(4):1648–1659, 2008. [30] R. Motwani and P. Raghavan. Randomized Algorithms. Cambridge University Press, 1997. [31] J. Naor, D. Panigrahi, and M. Singh. Online node-weighted steiner tree and related problems. In Proceedings, IEEE Symposium on Foundations of Computer Science (FOCS), pages 210–219, 2011. 22 [32] F. S. Salman, J. Cheriyan, R. Ravi, and S. Subramanian. Approximating the single-sink linkinstallation problem in network design. SIAM J. Optimization, 11(3):595–610, 2001. [33] K. Talwar. The single-sink buy-at-bulk LP has constant integrality gap. In Proceedings, MPS Conference on Integer Programming and Combinatorial Optimization (IPCO), pages 475–486, 2002. [34] A. Zelikovsky. A series of approximation algorithms for the acyclic directed steiner tree problem. Algorithmica, 18(1):99–110, 1997. [35] L. Zosin and S. Khuller. On directed steiner trees. In Proceedings, ACM-SIAM Symposium on Discrete Algorithms (SODA), pages 59–63, 2002. A Reduction to Layered Instances (Proof of Theorem 7) In this section, we prove Theorem 7, which is an extension of Zelikovsky’s ‘height reduction lemma’ for the buy-at-bulk problem; Zelikovsky’s original Lemma was for a single metric, whereas in our setting there is both a cost and a length metric. We prove the up-ward case; the down-ward case follows analogously. In order to simplify the notation, we remove the superscript up . For this reduction, we will adapt the notion of layered expansion of a graph, which has been in the folklore for many years and has been used recently by several papers (see, e.g.,[13, 31]). The h-level layered expansion of G is a layered DAG Gh of h+1 levels (we index the level 0, 1, . . . , h) defined as follows: (i) For each i such that 0 ≤ i ≤ h, the vertices in level i are copies of the vertices of G; we let vi to denote the copy of vertex v ∈ V at level i. (ii) For each i such that 1 ≤ i ≤ h, there is a directed edge from every vertex in level i to every vertex in i from level i − 1. The fixed cost of an edge (ui , vi−1 ) is given by that of the shortest directed path Puv 1−i/h ui to vi−1 in G according to the metric ce + k `e . The length of this edge is set to be the length i in the ` metric. of the path Puv We now relate the optimal objective values for the two instances. One of the directions of the reduction is straightforward. Lemma 24. For any root r and any set of terminals X, if there is a feasible integral/fractional solution of objective/LP value φ for the single-sink buy-at-bulk problem connecting X to r on the h-level layered expansion Gh , then there is a feasible integral/fractional solution of objective/LP at most φ for the same problem in G. Proof: Note that for every edge in Gh , there is a corresponding path in G with the property that the sum of edge costs and lengths on the path is at most the cost and length of the edge in G. Therefore, replacing the edges in the solution for the layered graph by the corresponding paths in G yields a feasible solution in G without increasing the overall cost and length. Notice that the same “embedding” of edges in Gh to paths in G can be applied to the fractional solution on Gh as well. This shows property (ii) of the theorem statement.  The more interesting direction is to show that the optimal objective value on the layered graph Gh can be bounded in terms of the optimal objective value on the original graph G. To show this, we will re-purpose the so-called “height reduction” lemma of Helvig, Robins, and Zelikovsky [25]. We restate the lemma in a form that will be useful for us. 23 Lemma 25. For any in-tree T defined on the edges of G that is rooted at r and contains all the terminals in X, and for any integer h ≥ 1, there is an in-tree T 0 (on the same vertices as G but over a different edge set) that is also rooted at r and contains all the terminals, and has the following properties: (i) T 0 contains h + 1 levels of vertices, i.e., has height h. (ii) T 0 is an k 1/h -ary tree, i.e., each non-leaf vertex has k 1/h children. (iii) Each edge e0 = (u0 , v 0 ) in tree T 0 corresponds to the unique directed path pe0 in T from u0 to v 0 . Moreover, the number of terminals in the subtree of T rooted at u0 is exactly k 1−i/h , where e0 is an edge between levels i − 1 and i of T . (iv) Each edge in T is in at most 2hk 1/h such paths pe0 for edges e0 ∈ T 0 . For an edge e0 ∈ T 0 , suppose we define its cost to be the cost of the path pe0 , and its length to be the length of the path pe0 . Then it is easy to see that the overall cost φT 0 of tree T 0 is O(hk 1/h ) times that of tree T ; this is due to the following implications of the above lemma: (a) the total (buying) cost of all edges in T 0 is at most 2hk 1/h times that of T since each edge is reused at most 2hk 1/h times, and (b) for any terminal x ∈ X, the edges on its path to the root in T 0 correspond to disjoint sub-paths in the unique path between x and r in T , and hence the total length cost in T 0 is at most that in T . Using this lemma, we can now complete the reduction by “embedding” the tree T 0 in the layered graph Gh . Lemma 26. If there is a feasible solution of overall cost φ for the single-sink buy-at-bulk problem on G, then there is a feasible solution of overall cost O(hk 1/h φ) for the same problem on the h-level layered extension Gh . Proof: Let T be the union of the paths in the optimum solution on the graph G. It’s easy to see that T is a directed in-tree. First, we use Lemma 25 to transform T to tree T 0 of height h. As noted earlier, the overall cost φT 0 of T 0 is O(hk 1/h φ). Now, we construct a feasible tree Th in Gh using this solution T 0 as follows: consider each edge (u, v) in T 0 where u is at level i and v is at level (i − 1). Then, include the edge (ui , vi−1 ) in Th . Clearly, since T 0 connects all the terminals to the root, so does Th . Moreover, notice that there is a 1-to-1 mapping between edges in T 0 and edges in Th . To bound the objective value of the subtree, we relate the objective value for each edge of the subtree in Gh to its corresponding mapped edge in T 0 . First, note that the overall contribution of an edge e0 = (u0 , v 0 ) between layers i and i + 1 towards φT 0 is equal to the sum of costs and k 1−i/h times the lengths of the edges on the associated path pe0 from u0 to v 0 . This is because, by property (iii) of Lemma 25, the number of demands in the subtree rooted at u0 is exactly k 1−i/h and all of them traverse this edge to reach r. Next, 0 ) between layers i and i + 1 in T is equal to the we note that, by definition, the cost of the edge (u0i , vi+1 h 0 0 1−i/h shortest directed path from u to v in G according to the metric ce + k `e . Since we chose the shortest 0 ) ∈ T is at most the contribution of (u0 , v 0 ) towards path, we get that the buying cost of edge (u0i , vi+1 h φT 0 . Moreover, the total length cost is at most k 1−i/h times the length of the shortest path, which is at most 0 ) ∈ T (again, this uses the fact that there are exactly k 1−i/h terminals which the fixed cost of (u0i , vi+1 h route through this edge in Th also). It therefore follows that the overall cost of the solution that we have inductively constructed in Gh is at most twice the overall cost of T 0 , which is at most O(hk 1/h )φ.  Theorem 7 follows from Lemmas 24 and 26. 24
8cs.DS
Counterfactual Multi-Agent Policy Gradients Jakob N. Foerster1,† Gregory Farquhar1,† [email protected] [email protected] Triantafyllos Afouras1 Nantas Nardelli1 Shimon Whiteson1 [email protected] [email protected] [email protected] arXiv:1705.08926v2 [cs.AI] 14 Dec 2017 1 University of Oxford, United Kingdom Abstract Many real-world problems, such as network packet routing and the coordination of autonomous vehicles, are naturally modelled as cooperative multi-agent systems. There is a great need for new reinforcement learning methods that can efficiently learn decentralised policies for such systems. To this end, we propose a new multi-agent actor-critic method called counterfactual multi-agent (COMA) policy gradients. COMA uses a centralised critic to estimate the Q-function and decentralised actors to optimise the agents’ policies. In addition, to address the challenges of multi-agent credit assignment, it uses a counterfactual baseline that marginalises out a single agent’s action, while keeping the other agents’ actions fixed. COMA also uses a critic representation that allows the counterfactual baseline to be computed efficiently in a single forward pass. We evaluate COMA in the testbed of StarCraft unit micromanagement, using a decentralised variant with significant partial observability. COMA significantly improves average performance over other multi-agent actorcritic methods in this setting, and the best performing agents are competitive with state-of-the-art centralised controllers that get access to the full state. 1 Introduction Many complex reinforcement learning (RL) problems such as the coordination of autonomous vehicles (Cao et al. 2013), network packet delivery (Ye, Zhang, and Yang 2015), and distributed logistics (Ying and Dayong 2005) are naturally modelled as cooperative multi-agent systems. However, RL methods designed for single agents typically fare poorly on such tasks, since the joint action space of the agents grows exponentially with the number of agents. To cope with such complexity, it is often necessary to resort to decentralised policies, in which each agent selects its own action conditioned only on its local action-observation history. Furthermore, partial observability and communication constraints during execution may necessitate the use of decentralised policies even when the joint action space is not prohibitively large. Hence, there is a great need for new RL methods that can efficiently learn decentralised policies. In some settings, the learning itself may also need to be decentralised. However, in many cases, learning can take place in a simulator or a laboratory in which extra state information is available and agents can communicate freely. This centralised † Equal contribution training of decentralised policies is a standard paradigm for multi-agent planning (Oliehoek, Spaan, and Vlassis 2008; Kraemer and Banerjee 2016) and has recently been picked up by the deep RL community (Foerster et al. 2016; Jorge, Kågebäck, and Gustavsson 2016). However, the question of how best to exploit the opportunity for centralised learning remains open. Another crucial challenge is multi-agent credit assignment (Chang, Ho, and Kaelbling 2003): in cooperative settings, joint actions typically generate only global rewards, making it difficult for each agent to deduce its own contribution to the team’s success. Sometimes it is possible to design individual reward functions for each agent. However, these rewards are not generally available in cooperative settings and often fail to encourage individual agents to sacrifice for the greater good. This often substantially impedes multi-agent learning in challenging tasks, even with relatively small numbers of agents. In this paper, we propose a new multi-agent RL method called counterfactual multi-agent (COMA) policy gradients, in order to address these issues. COMA takes an actor-critic (Konda and Tsitsiklis 2000) approach, in which the actor, i.e., the policy, is trained by following a gradient estimated by a critic. COMA is based on three main ideas. First, COMA uses a centralised critic. The critic is only used during learning, while only the actor is needed during execution. Since learning is centralised, we can therefore use a centralised critic that conditions on the joint action and all available state information, while each agent’s policy conditions only on its own action-observation history. Second, COMA uses a counterfactual baseline. The idea is inspired by difference rewards (Wolpert and Tumer 2002; Tumer and Agogino 2007), in which each agent learns from a shaped reward that compares the global reward to the reward received when that agent’s action is replaced with a default action. While difference rewards are a powerful way to perform multi-agent credit assignment, they require access to a simulator or estimated reward function, and in general it is unclear how to choose the default action. COMA addresses this by using the centralised critic to compute an agent-specific advantage function that compares the estimated return for the current joint action to a counterfactual baseline that marginalises out a single agent’s action, while keeping the other agents’ actions fixed. This is similar to cal- culating an aristocrat utility (Wolpert and Tumer 2002), but avoids the problem of a recursive interdependence between the policy and utility function because the expected contribution of the counterfactual baseline to the policy gradient is zero. Hence, instead of relying on extra simulations, approximations, or assumptions regarding appropriate default actions, COMA computes a separate baseline for each agent that relies on the centralised critic to reason about counterfactuals in which only that agent’s action changes. Third, COMA uses a critic representation that allows the counterfactual baseline to be computed efficiently. In a single forward pass, it computes the Q-values for all the different actions of a given agent, conditioned on the actions of all the other agents. Because a single centralised critic is used for all agents, all Q-values for all agents can be computed in a single batched forward pass. We evaluate COMA in the testbed of StarCraft unit micromanagement1 , which has recently emerged as a challenging RL benchmark task with high stochasticity, a large stateaction space, and delayed rewards. Previous works (Usunier et al. 2016; Peng et al. 2017) have made use of a centralised control policy that conditions on the entire state and can use powerful macro-actions, using StarCraft’s built-in planner, that combine movement and attack actions. To produce a meaningfully decentralised benchmark that proves challenging for scenarios with even relatively few agents, we propose a variant that massively reduces each agent’s field-of-view and removes access to these macro-actions. Our empirical results on this new benchmark show that COMA can significantly improve performance over other multi-agent actor-critic methods, as well as ablated versions of COMA itself. In addition, COMA’s best agents are competitive with state-of-the-art centralised controllers that are given access to full state information and macro-actions. 2 Related Work Although multi-agent RL has been applied in a variety of settings (Busoniu, Babuska, and De Schutter 2008; Yang and Gu 2004), it has often been restricted to tabular methods and simple environments. One exception is recent work in deep multi-agent RL, which can scale to high dimensional input and action spaces. Tampuu et al. (2015) use a combination of DQN with independent Q-learning (Tan 1993; Shoham and Leyton-Brown 2009) to learn how to play twoplayer pong. More recently the same method has been used by Leibo et al. (2017) to study the emergence of collaboration and defection in sequential social dilemmas. Also related is work on the emergence of communication between agents, learned by gradient descent (Das et al. 2017; Mordatch and Abbeel 2017; Lazaridou, Peysakhovich, and Baroni 2016; Foerster et al. 2016; Sukhbaatar, Fergus, and others 2016). In this line of work, passing gradients between agents during training and sharing parameters are two common ways to take advantage of centralised training. However, these methods do not allow for extra state information 1 StarCraft and its expansion StarCraft: Brood War are trademarks of Blizzard EntertainmentTM . to be used during learning and do not address the multi-agent credit assignment problem. Gupta, Egorov, and Kochenderfer (2017) investigate actor-critic methods for decentralised execution with centralised training. However, in their methods both the actors and the critic condition on local, per-agent, observations and actions, and multi-agent credit assignment is addressed only with hand-crafted local rewards. Most previous applications of RL to StarCraft micromanagement use a centralised controller, with access to the full state, and control of all units, although the architecture of the controllers exploits the multi-agent nature of the problem. Usunier et al. (2016) use a greedy MDP, which at each timestep sequentially chooses actions for agents given all previous actions, in combination with zero-order optimisation, while Peng et al. (2017) use an actor-critic method that relies on RNNs to exchange information between the agents. The closest to our problem setting is that of Foerster et al. (2017), who also use a multi-agent representation and decentralised policies. However, they focus on stabilising experience replay while using DQN and do not make full use of the centralised training regime. As they do not report on absolute win-rates we do not compare performance directly. However, Usunier et al. (2016) address similar scenarios to our experiments and implement a DQN baseline in a fully observable setting. In Section 6 we therefore report our competitive performance against these state-of-the-art baselines, while maintaining decentralised control. Omidshafiei et al. (2017) also address the stability of experience replay in multi-agent settings, but assume a fully decentralised training regime. (Lowe et al. 2017) concurrently propose a multi-agent policy-gradient algorithm using centralised critics. Their approach does not address multi-agent credit assignment. Unlike our work, it learns a separate centralised critic for each agent and is applied to competitive environments with continuous action spaces. Our work builds directly off of the idea of difference rewards (Wolpert and Tumer 2002). The relationship of COMA to this line of work is discussed in Section 4. 3 Background We consider a fully cooperative multi-agent task that can be described as a stochastic game G, defined by a tuple G = hS, U, P, r, Z, O, n, γi, in which n agents identified by a ∈ A ≡ {1, ..., n} choose sequential actions. The environment has a true state s ∈ S. At each time step, each agent simultaneously chooses an action ua ∈ U , forming a joint action u ∈ U ≡ U n which induces a transition in the environment according to the state transition function P (s0 |s, u) : S × U × S → [0, 1]. The agents all share the same reward function r(s, u) : S × U → R and γ ∈ [0, 1) is a discount factor. We consider a partially observable setting, in which agents draw observations z ∈ Z according to the observation function O(s, a) : S × A → Z. Each agent has an action-observation history τ a ∈ T ≡ (Z × U )∗ , on which it conditions a stochastic policy π a (ua |τ a ) : T × U → [0, 1]. We denote joint quantities over agents in bold, and joint quantities over agents other than a given agent a with the superscript −a. P∞ The discounted return is Rt = l=0 γ l rt+l . The agents’ joint policy induces a value function, i.e., an expectation over Rt , V π (st ) = Est+1:∞ ,ut:∞ [Rt |st ], and an actionvalue function Qπ (st , ut ) = Est+1:∞ ,ut+1:∞ [Rt |st , ut ]. The advantage function is given by Aπ (st , ut ) = Qπ (st , ut ) − V π (st ). Following previous work (Oliehoek, Spaan, and Vlassis 2008; Kraemer and Banerjee 2016; Foerster et al. 2016; Jorge, Kågebäck, and Gustavsson 2016), our problem setting allows centralised training but requires decentralised execution. This is a natural paradigm for a large set of multi-agent problems where training is carried out using a simulator with additional state information, but the agents must rely on local action-observation histories during execution. To condition on this full history, a deep RL agent may make use of a recurrent neural network (Hausknecht and Stone 2015), typically with a gated model such as LSTM (Hochreiter and Schmidhuber 1997) or GRU (Cho et al. 2014). In Section 4, we develop a new multi-agent policy gradient method for tackling this setting. In the remainder of this section, we provide some background on single-agent policy gradient methods (Sutton et al. 1999). Such methods optimise a single agent’s policy, parameterised by θπ , by performing gradient ascent on an estimate of the expected discounted total reward J = Eπ [R0 ]. Perhaps the simplest form of policy gradient is REINFORCE (Williams 1992), in which the gradient is: " T # X g = Es0:∞ ,u0:∞ Rt ∇θπ log π(ut |st ) . (1) t=0 In actor-critic approaches (Sutton et al. 1999; Konda and Tsitsiklis 2000; Schulman et al. 2015), the actor, i.e., the policy, is trained by following a gradient that depends on a critic, which usually estimates a value function. In particular, Rt is replaced by any expression equivalent to Q(st , ut ) − b(st ), where b(st ) is a baseline designed to reduce variance (Weaver and Tao 2001). A common choice is b(st ) = V (st ), in which case Rt is replaced by A(st , ut ). Another option is to replace Rt with the temporal difference (TD) error rt + γV (st+1 ) − V (s), which is an unbiased estimate of A(st , ut ). In practice, the gradient must be estimated from trajectories sampled from the environment, and the (action-)value functions must be estimated with function approximators. Consequently, the bias and variance of the gradient estimate depends strongly on the exact choice of estimator (Konda and Tsitsiklis 2000). In this paper, we train critics f c (·, θc ) on-policy to estimate either Q or V , using a variant of TD(λ) (Sutton 1988) adapted for use with deep neural networks. TD(λ) Pn (n) uses a mixture of n-step returns Gt = l=1 γ l−1 rt+l + γ n f c (·t+n , θc ). In particular, the critic parameters θc are updated by minibatch gradient descent to minimise the following loss: Lt (θc ) = (y (λ) − f c (·t , θc ))2 , (2) P∞ (n) where y (λ) = (1 − λ) n=1 λn−1 Gt , and the n-step (n) returns Gt are calculated with bootstrapped values estimated by a target network (Mnih et al. 2015) with parameters copied periodically from θc . 4 Methods In this section, we describe approaches for extending policy gradients to our multi-agent setting. Independent Actor-Critic The simplest way to apply policy gradients to multiple agents is to have each agent learn independently, with its own actor and critic, from its own action-observation history. This is essentially the idea behind independent Qlearning (Tan 1993), which is perhaps the most popular multi-agent learning algorithm, but with actor-critic in place of Q-learning. Hence, we call this approach independent actor-critic (IAC). In our implementation of IAC, we speed learning by sharing parameters among the agents, i.e., we learn only one actor and one critic, which are used by all agents. The agents can still behave differently because they receive different observations, including an agent-specific ID, and thus evolve different hidden states. Learning remains independent in the sense that each agent’s critic estimates only a local value function, i.e., one that conditions on ua , not u. Though we are not aware of previous applications of this specific algorithm, we do not consider it a significant contribution but instead merely a baseline algorithm. We consider two variants of IAC. In the first, each agent’s critic estimates V (τ a ) and follows a gradient based on the TD error, as described in Section 3. In the second, each agent’s critic estimates Q(τ a , ua ) and follows a gradient based on the advantage: A(τ a , ua ) = Q(τ a , ua ) − P V (τ a ), where V (τ a ) = ua π(ua |τ a )Q(τ a , ua ). Independent learning is straightforward, but the lack of information sharing at training time makes it difficult to learn coordinated strategies that depend on interactions between multiple agents, or for an individual agent to estimate the contribution of its actions to the team’s reward. Counterfactual Multi-Agent Policy Gradients The difficulties discussed above arise because, beyond parameter sharing, IAC fails to exploit the fact that learning is centralised in our setting. In this section, we propose counterfactual multi-agent (COMA) policy gradients, which overcome this limitation. Three main ideas underly COMA: 1) centralisation of the critic, 2) use of a counterfactual baseline, and 3) use of a critic representation that allows efficient evaluation of the baseline. The remainder of this section describes these ideas. First, COMA uses a centralised critic. Note that in IAC, each actor π(ua |τ a ) and each critic Q(τ a , ua ) or V (τ a ) conditions only on the agent’s own action-observation history τ a . However, the critic is used only during learning and only the actor is needed during execution. Since learning is centralised, we can therefore use a centralised critic that conditions on the true global state s, if it is available, or the joint action-observation histories τ otherwise. Each actor conditions on its own action-observation histories τ a , with parameter sharing, as in IAC. Figure 1a illustrates this setup. A naive way to use this centralised critic would be for each actor to follow a gradient based on the TD error estimated from this critic: g = ∇θπ log π(u|τta ) (r + γV (st+1 ) − V (st )) . (3) However, such an approach fails to address a key credit assignment problem. Because the TD error considers only global rewards, the gradient computed for each actor does not explicitly reason about how that particular agent’s actions contribute to that global reward. Since the other agents may be exploring, the gradient for that agent becomes very noisy, particularly when there are many agents. Therefore, COMA uses a counterfactual baseline. The idea is inspired by difference rewards (Wolpert and Tumer 2002), in which each agent learns from a shaped reward Da = r(s, u) − r(s, (u−a , ca )) that compares the global reward to the reward received when the action of agent a is replaced with a default action ca . Any action by agent a that improves Da also improves the true global reward r(s, u), because r(s, (u−a , ca )) does not depend on agent a’s actions. Difference rewards are a powerful way to perform multiagent credit assignment. However, they typically require access to a simulator in order to estimate r(s, (u−a , ca )). When a simulator is already being used for learning, difference rewards increase the number of simulations that must be conducted, since each agent’s difference reward requires a separate counterfactual simulation. Proper and Tumer (2012) and Colby, Curran, and Tumer (2015) propose estimating difference rewards using function approximation rather than a simulator. However, this still requires a user-specified default action ca that can be difficult to choose in many applications. In an actor-critic architecture, this approach would also introduce an additional source of approximation error. A key insight underlying COMA is that a centralised critic can be used to implement difference rewards in a way that avoids these problems. COMA learns a centralised critic, Q(s, u) that estimates Q-values for the joint action u conditioned on the central state s. For each agent a we can then compute an advantage function that compares the Q-value for the current action ua to a counterfactual baseline that marginalises out ua , while keeping the other agents’ actions u−a fixed: X Aa (s, u) = Q(s, u) − π a (u0a |τ a )Q(s, (u−a , u0a )). u0a (4) Hence, Aa (s, ua ) computes a separate baseline for each agent that uses the centralised critic to reason about counterfactuals in which only a’s action changes, learned directly from agents’ experiences instead of relying on extra simulations, a reward model, or a user-designed default action. This advantage has the same form as the aristocrat utility (Wolpert and Tumer 2002). However, optimising for an aristocrat utility using value-based methods creates a selfconsistency problem because the policy and utility function depend recursively on each other. As a result, prior work focused on difference evaluations using default states and actions. COMA is different because the counterfactual baseline’s expected contribution to the gradient, as with other policy gradient baselines, is zero. Thus, while the baseline does depend on the policy, its expectation does not. Consequently, COMA can use this form of the advantage without creating a self-consistency problem. While COMA’s advantage function replaces potential extra simulations with evaluations of the critic, those evaluations may themselves be expensive if the critic is a deep neural network. Furthermore, in a typical representation, the number of output nodes of such a network would equal |U |n , the size of the joint action space, making it impractical to train. To address both these issues, COMA uses a critic representation that allows for efficient evaluation of the baseline. In particular, the actions of the other agents, u−a t , are part of the input to the network, which outputs a Q-value for each of agent a’s actions, as shown in Figure 1c. Consequently, the counterfactual advantage can be calculated efficiently by a single forward pass of the actor and critic, for each agent. Furthermore, the number of outputs is only |U | instead of (|U |n ). While the network has a large input space that scales linearly in the number of agents and actions, deep neural networks can generalise well across such spaces. In this paper, we focus on settings with discrete actions. However, COMA can be easily extended to continuous actions spaces by estimating the expectation in (4) with Monte Carlo samples or using functional forms that render it analytical, e.g., Gaussian policies and critic. The following lemma establishes the convergence of COMA to a locally optimal policy. The proof follows directly from the convergence of single-agent actor-critic algorithms (Sutton et al. 1999; Konda and Tsitsiklis 2000), and is subject to the same assumptions. Lemma 1. For an actor-critic algorithm with a compatible TD(1) critic following a COMA policy gradient " # X a a a a gk = Eπ ∇θk log π (u |τ )A (s, u) (5) a at each iteration k, lim inf ||∇J|| = 0 w.p. 1. (6) Proof. The COMA gradient is given by " # X a a a a g = Eπ ∇θ log π (u |τ )A (s, u) , (7) k a Aa (s, u) = Q(s, u) − b(s, u−a ), (8) where θ are the parameters of all actor policies, e.g. θ = {θ1 , . . . , θ|A| }, and b(s, u−a ) is the counterfactual baseline defined in equation 4. First consider the expected contribution of the this baseline b(s, u−a ): " # X a a a −a gb = −Eπ ∇θ log π (u |τ )b(s, u ) , (9) a A1 t A2 t Critic 1 (h , ) h 1 t (h , ) u 1 = (hat, ) Aa t u t h t 2 h at Actor 2 st u1 t rt u2 t (uat, ( ) 2 Actor 1 o 1t a 2 (hat-1) GRU a t ) COMA {Q(ua=1, u-at,..),. .,Q(ua=|U|, u-at,..)} (hat) o 2t Environment (oat, a, uat-1) (u-at, st, oat, a, ut-1) (a) (b) (c) Figure 1: In (a), information flow between the decentralised actors, the environment and the centralised critic in COMA; red arrows and components are only required during centralised learning. In (b) and (c), architectures of the actor and critic. where the expectation Eπ is with respect to the state-action distribution induced by the joint policy π. Now let dπ (s) be the discounted ergodic state distribution as defined by Sutton et al. (1999): X XX gb = − dπ (s) π(u−a |τ −a) · s a u−a X π (u |τ a )∇θ log π a (ua |τ a )b(s, u−a ) a a (10) ua =− X dπ (s) XX s π(u−a |τ −a) · a u−a X =− dπ (s) XX s a (11) π(u−a |τ −a)b(s, u−a )∇θ 1 u−a = 0. (12) Clearly, the per-agent baseline, although it reduces variance, does not change the expected gradient, and therefore does not affect the convergence of COMA. The remainder of the expected policy gradient is given by: " # X a a a g = Eπ ∇θ log π (u |τ )Q(s, u) (13) a " = Eπ ∇θ log # Y a a a π (u |τ )Q(s, u) . (14) a Writing the joint policy as a product of the independent actors: Y π(u|s) = π a (ua |τ a ), (15) a yields the standard single-agent actor-critic policy gradient: g = Eπ [∇θ log π(u|s)Q(s, u)] . (16) Konda and Tsitsiklis (2000) prove that an actor-critic following this gradient converges to a local maximum of the expected return J π , given that: 1. the policy π is differentiable, amongst several further assumptions. The parameterisation of the policy (i.e., the single-agent joint-action learner is decomposed into independent actors) is immaterial to convergence, as long as it remains differentiable. Note however that COMA’s centralised critic is essential for this proof to hold. 5 ∇θ π (ua |τ a )b(s, u−a ) a ua X 2. the update timescales for Q and π are sufficiently slow, and that π is updated sufficiently slower than Q, and 3. Q uses a representation compatible with π, Experimental Setup In this section, we describe the StarCraft problem to which we apply COMA, as well as details of the state features, network architectures, training regimes, and ablations. Decentralised StarCraft Micromanagement. StarCraft is a rich environment with stochastic dynamics that cannot be easily emulated. Many simpler multi-agent settings, such as Predator-Prey (Tan 1993) or Packet World (Weyns, Helleboogh, and Holvoet 2005), by contrast, have full simulators with controlled randomness that can be freely set to any state in order to perfectly replay experiences. This makes it possible, though computationally expensive, to compute difference rewards via extra simulations. In StarCraft, as in the real world, this is not possible. In this paper, we focus on the problem of micromanagement in StarCraft, which refers to the low-level control of individual units’ positioning and attack commands as they fight enemies. This task is naturally represented as a multi-agent system, where each StarCraft unit is replaced by a decentralised controller. We consider several scenarios with symmetric teams formed of: 3 marines (3m), 5 marines (5m), 5 wraiths (5w), or 2 dragoons with 3 zealots (2d 3z). The enemy team is controlled by the StarCraft AI, which uses reasonable but suboptimal hand-crafted heuristics. We allow the agents to choose from a set of discrete actions: move[direction], attack[enemy id], stop, and noop. In the StarCraft game, when a unit selects an attack action, it first moves into attack range before firing, using the game’s built-in pathfinding to choose a route. These powerful attack-move macro-actions make the control problem considerably easier. To create a more challenging benchmark that is meaningfully decentralised, we impose a restricted field of view on the agents, equal to the firing range of ranged units’ weapons, shown in Figure 2. This departure from the standard setup for centralised StarCraft control has three effects. x Figure 2: Starting position with example local field of view for the 2d 3z map. First, it introduces significant partial observability. Second, it means units can only attack when they are in range of enemies, removing access to the StarCraft macro-actions. Third, agents cannot distinguish between enemies who are dead and those who are out of range and so can issue invalid attack commands at such enemies, which results in no action being taken. This substantially increases the average size of the action space, which in turn increases the difficulty of both exploration and control. Under these difficult conditions, scenarios with even relatively small numbers of units become much harder to solve. As seen in Table 1, we compare against a simple hand-coded heuristic that instructs the agents to run forwards into range and then focus their fire, attacking each enemy in turn until it dies. This heuristic achieves a 98% win rate on 5m with a full field of view, but only 66% in our setting. To perform well in this task, the agents must learn to cooperate by positioning properly and focussing their fire, while remembering which enemy and ally units are alive or out of view. All agents receive the same global reward at each time step, equal to the sum of damage inflicted on the opponent units minus half the damage taken. Killing an opponent generates a reward of 10 points, and winning the game generates a reward equal to the team’s remaining total health plus 200. This damage-based reward signal is comparable to that used by Usunier et al. (2016). Unlike (Peng et al. 2017), our approach does not require estimating local rewards. State Features. The actor and critic receive different input features, corresponding to local observations and global state, respectively. Both include features for allies and enemies. Units can be either allies or enemies, while agents are the decentralised controllers that command ally units. The local observations for every agent are drawn only from a circular subset of the map centred on the unit it controls and include for each unit within this field of view: distance, relative x, relative y, unit type and shield.2 All features are normalised by their maximum values. We do not include any information about the units’ current target. The global state representation consists of similar features, but for all units on the map regardless of fields of view. Absolute distance is not included, and x-y locations are given relative to the centre of the map rather than to a particular agent. The global state also includes health points and cooldown for all agents. The representation fed to the centralised Q-function critic is the concatenation of the global state representation with the local observation of the agent whose actions are being evaluated. Our centralised critic that estimates V (s), and is therefore agent-agnostic, receives the global state concatenated with all agents’ observations. The observations contain no new information but include the egocentric distances relative to that agent. Architecture & Training. The actor consists of 128-bit gated recurrent units (GRUs) (Cho et al. 2014) that use fully connected layers both to process the input and to produce the output values from the hidden state, hat . The IAC critics use extra output heads appended to the last layer of the actor network. Action probabilities are produced from the final layer, z, via a bounded softmax distribution that lower-bounds the probability of any given action by /|U |: P (u) = (1 − )softmax(z)u + /|U |). We anneal  linearly from 0.5 to 0.02 across 750 training episodes. The centralised critic is a feedforward network with multiple ReLU layers combined with fully connected layers. Hyperparameters were coarsely tuned on the 5m scenario and then used for all other maps. We found that the most sensitive parameter was TD(λ), but settled on λ = 0.8, which worked best for both COMA and our baselines. Our implementation uses TorchCraft (Synnaeve et al. 2016) and Torch 7 (Collobert, Kavukcuoglu, and Farabet 2011). Pseudocode and further details on the training procedure are in the appendix. We experimented with critic architectures that are factored at the agent level and further exploit internal parameter sharing. However, we found that the bottleneck for scalability was not the centralisation of the critic, but rather the difficulty of multi-agent exploration. Hence, we defer further investigation of factored COMA critics to future work. Ablations. We perform ablation experiments to validate three key elements of COMA. First, we test the importance of centralising the critic by comparing against two IAC variants, IAC-Q and IAC-V . These critics take the same decentralised input as the actor, and share parameters with the actor network up to the final layer. IAC-Q then outputs |U | Q-values, one for each action, while IAC-V outputs a single state-value. Note that we still share parameters between agents, using the egocentric observations and ID’s as part of the input to allow different behaviours to emerge. The cooperative reward function is still shared by all agents. Second, we test the significance of learning Q instead of 2 After firing, a unit’s cooldown is reset, and it must drop before firing again. Shields absorb damage until they break, after which units start losing health. Dragoons and zealots have shields but marines do not. 90 80 70 60 50 40 30 20 10 0 IAC-V c e ntral-QV he uris tic Ave rag e Win % Ave rag e Win % COMA c e ntral-V 20k 40k 60k 80k 100k 120k 140k # Epis o de s 90 80 70 60 50 40 30 20 10 0 90 80 70 60 50 40 30 20 10 0 10k 20k 30k 40k 50k 60k 70k # Epis o de s (b) 5m 70 Ave rag e Win % Ave rag e Win % (a) 3m IAC-Q 5k 10k 15k 20k 25k 30k 35k # Epis o de s (c) 5w 60 50 40 30 20 10 0 5k 10k 15k 20k 25k 30k 35k 40k # Epis o de s (d) 2d 3z Figure 3: Win rates for COMA and competing algorithms on four different scenarios. COMA outperforms all baseline methods. Centralised critics also clearly outperform their decentralised counterparts. The legend at the top applies across all plots. V . The method central-V still uses a central state for the critic, but learns V (s), and uses the TD error to estimate the advantage for policy gradient updates. Third, we test the utility of our counterfactual baseline. The method central-QV learns both Q and V simultaneously and estimates the advantage as Q − V , replacing COMA’s counterfactual baseline with V . All methods use the same architecture and training scheme for the actors, and all critics are trained with TD(λ). 6 Results Figure 3 shows average win rates as a function of episode for each method and each StarCraft scenario. For each method, we conducted 35 independent trials and froze learning every 100 training episodes to evaluate the learned policies across 200 episodes per method, plotting the average across episodes and trials. Also shown is one standard deviation in performance. The results show that COMA is superior to the IAC baselines in all scenarios. Interestingly, the IAC methods also eventually learn reasonable policies in 5m, although they need substantially more episodes to do so. This may seem counterintuitive since in the IAC methods, the actor and critic networks share parameters in their early layers (see Section 5), which could be expected to speed learning. However, these results suggest that the improved accuracy of policy evaluation made possible by conditioning on the global state outweighs the overhead of training a separate network. Furthermore, COMA strictly dominates central-QV , both in training speed and in final performance across all settings. This is a strong indicator that our counterfactual baseline is crucial when using a central Q-critic to train decentralised policies. Learning a state-value function has the obvious advantage of not conditioning on the joint action. Still, we find that COMA outperforms the central-V baseline in final performance. Furthermore, COMA typically achieves good policies faster, which is expected as COMA provides a shaped training signal. Training is also more stable than central-V , which is a consequence of the COMA gradient tending to zero as the policy becomes greedy. Overall, COMA is the best performing and most consistent method. Usunier et al. (2016) report the performance of their best agents trained with their state-of-the-art centralised controller labelled GMEZO (greedy-MDP with episodic zeroorder optimisation), and for a centralised DQN controller, both given a full field of view and access to attack-move macro-actions. These results are compared in Table 1 against the best agents trained with COMA for each map. Clearly, Local Field of View (FoV) map heur. IAC-V IAC-Q cnt-V cnt-QV 3m 5m 5w 2d 3z 35 66 70 63 47 (3) 63 (2) 18 (5) 27 (9) 56 (6) 58 (3) 57 (5) 19 (21) 83 (3) 67 (5) 65 (3) 36 (6) 83 (5) 71 (9) 76 (1) 39 (5) Full FoV, Central Control COMA mean best 87 (3) 81 (5) 82 (3) 47 (5) 98 95 98 65 heur. DQN GMEZO 74 98 82 68 99 70 61 100 743 90 Table 1: Mean win percentage averaged across final 1000 evaluation episodes for the different maps, for all methods and the hand-coded heuristic in the decentralised setting with a limited field of view. The highest mean performances are in bold, while the values in parentheses denote the 95% confidence interval, for example 87(3) = 87 ± 3. Also shown, maximum win percentages for COMA (decentralised), in comparison to the heuristic and published results (evaluated in the centralised setting). in most settings these agents achieve performance comparable to the best published win rates despite being restricted to decentralised policies and local fields of view. 7 Conclusions & Future Work This paper presented COMA policy gradients, a method that uses a centralised critic in order to estimate a counterfactual advantage for decentralised policies in mutliagent RL. COMA addresses the challenges of multi-agent credit assignment by using a counterfactual baseline that marginalises out a single agent’s action, while keeping the other agents’ actions fixed. Our results in a decentralised StarCraft unit micromanagement benchmark show that COMA significantly improves final performance and training speed over other multi-agent actor-critic methods and remains competitive with state-of-the-art centralised controllers under best-performance reporting. Future work will extend COMA to tackle scenarios with large numbers of agents, where centralised critics are more difficult to train and exploration is harder to coordinate. We also aim to develop more sample-efficient variants that are practical for real-world applications such as self-driving cars. Acknowledgements This project has received funding from the European Research Council (ERC) under the European Union’s Horizon 2020 research and innovation programme (grant agreement number 637713). It was also supported by the OxfordGoogle DeepMind Graduate Scholarship, the UK EPSRC CDT in Autonomous Intelligent Machines and Systems, and a generous grant from Microsoft for their Azure cloud computing services. We would like to thank Nando de Freitas, Yannis Assael, and Brendan Shillingford for helpful comments and discussion. We also thank Gabriel Synnaeve, Zeming Lin, and the rest of the TorchCraft team at FAIR for their work on the interface. 3 5w DQN and GMEZO benchmark performances are of a policy trained on a larger map and tested on 5w References Busoniu, L.; Babuska, R.; and De Schutter, B. 2008. A comprehensive survey of multiagent reinforcement learning. IEEE Transactions on Systems Man and Cybernetics Part C Applications and Reviews 38(2):156. Cao, Y.; Yu, W.; Ren, W.; and Chen, G. 2013. An overview of recent progress in the study of distributed multi-agent coordination. IEEE Transactions on Industrial informatics 9(1):427–438. Chang, Y.-H.; Ho, T.; and Kaelbling, L. P. 2003. All learning is local: Multi-agent learning in global reward games. In NIPS, 807–814. Cho, K.; van Merriënboer, B.; Bahdanau, D.; and Bengio, Y. 2014. On the properties of neural machine translation: Encoder-decoder approaches. arXiv preprint arXiv:1409.1259. Colby, M. K.; Curran, W.; and Tumer, K. 2015. Approximating difference evaluations with local information. In Proceedings of the 2015 International Conference on Autonomous Agents and Multiagent Systems, 1659–1660. International Foundation for Autonomous Agents and Multiagent Systems. Collobert, R.; Kavukcuoglu, K.; and Farabet, C. 2011. Torch7: A matlab-like environment for machine learning. In BigLearn, NIPS Workshop. Das, A.; Kottur, S.; Moura, J. M.; Lee, S.; and Batra, D. 2017. Learning cooperative visual dialog agents with deep reinforcement learning. arXiv preprint arXiv:1703.06585. Foerster, J.; Assael, Y. M.; de Freitas, N.; and Whiteson, S. 2016. Learning to communicate with deep multi-agent reinforcement learning. In Advances in Neural Information Processing Systems, 2137–2145. Foerster, J.; Nardelli, N.; Farquhar, G.; Torr, P.; Kohli, P.; Whiteson, S.; et al. 2017. Stabilising experience replay for deep multi-agent reinforcement learning. In Proceedings of The 34th International Conference on Machine Learning. Gupta, J. K.; Egorov, M.; and Kochenderfer, M. 2017. Coop- erative multi-agent control using deep reinforcement learning. Hausknecht, M., and Stone, P. 2015. Deep recurrent q-learning for partially observable mdps. arXiv preprint arXiv:1507.06527. Hochreiter, S., and Schmidhuber, J. 1997. Long short-term memory. Neural computation 9(8):1735–1780. Jorge, E.; Kågebäck, M.; and Gustavsson, E. 2016. Learning to play guess who? and inventing a grounded language as a consequence. arXiv preprint arXiv:1611.03218. Konda, V. R., and Tsitsiklis, J. N. 2000. Actor-critic algorithms. In Advances in neural information processing systems, 1008–1014. Kraemer, L., and Banerjee, B. 2016. Multi-agent reinforcement learning as a rehearsal for decentralized planning. Neurocomputing 190:82–94. Lazaridou, A.; Peysakhovich, A.; and Baroni, M. 2016. Multi-agent cooperation and the emergence of (natural) language. arXiv preprint arXiv:1612.07182. Leibo, J. Z.; Zambaldi, V.; Lanctot, M.; Marecki, J.; and Graepel, T. 2017. Multi-agent reinforcement learning in sequential social dilemmas. arXiv preprint arXiv:1702.03037. Lowe, R.; Wu, Y.; Tamar, A.; Harb, J.; Abbeel, P.; and Mordatch, I. 2017. Multi-agent actor-critic for mixed cooperative-competitive environments. arXiv preprint arXiv:1706.02275. Mnih, V.; Kavukcuoglu, K.; Silver, D.; Rusu, A. A.; Veness, J.; Bellemare, M. G.; Graves, A.; Riedmiller, M.; Fidjeland, A. K.; Ostrovski, G.; et al. 2015. Humanlevel control through deep reinforcement learning. Nature 518(7540):529–533. Mordatch, I., and Abbeel, P. 2017. Emergence of grounded compositional language in multi-agent populations. arXiv preprint arXiv:1703.04908. Oliehoek, F. A.; Spaan, M. T. J.; and Vlassis, N. 2008. Optimal and approximate Q-value functions for decentralized POMDPs. 32:289–353. Omidshafiei, S.; Pazis, J.; Amato, C.; How, J. P.; and Vian, J. 2017. Deep decentralized multi-task multi-agent rl under partial observability. arXiv preprint arXiv:1703.06182. Peng, P.; Yuan, Q.; Wen, Y.; Yang, Y.; Tang, Z.; Long, H.; and Wang, J. 2017. Multiagent bidirectionally-coordinated nets for learning to play starcraft combat games. arXiv preprint arXiv:1703.10069. Proper, S., and Tumer, K. 2012. Modeling difference rewards for multiagent learning. In Proceedings of the 11th International Conference on Autonomous Agents and Multiagent Systems-Volume 3, 1397–1398. International Foundation for Autonomous Agents and Multiagent Systems. Schulman, J.; Moritz, P.; Levine, S.; Jordan, M. I.; and Abbeel, P. 2015. High-dimensional continuous control using generalized advantage estimation. CoRR abs/1506.02438. Shoham, Y., and Leyton-Brown, K. 2009. Multiagent Systems: Algorithmic, Game-Theoretic, and Logical Foundations. New York: Cambridge University Press. Sukhbaatar, S.; Fergus, R.; et al. 2016. Learning multiagent communication with backpropagation. In Advances in Neural Information Processing Systems, 2244–2252. Sutton, R. S.; McAllester, D. A.; Singh, S. P.; Mansour, Y.; et al. 1999. Policy gradient methods for reinforcement learning with function approximation. In NIPS, volume 99, 1057–1063. Sutton, R. S. 1988. Learning to predict by the methods of temporal differences. Machine learning 3(1):9–44. Synnaeve, G.; Nardelli, N.; Auvolat, A.; Chintala, S.; Lacroix, T.; Lin, Z.; Richoux, F.; and Usunier, N. 2016. Torchcraft: a library for machine learning research on realtime strategy games. arXiv preprint arXiv:1611.00625. Tampuu, A.; Matiisen, T.; Kodelja, D.; Kuzovkin, I.; Korjus, K.; Aru, J.; Aru, J.; and Vicente, R. 2015. Multiagent cooperation and competition with deep reinforcement learning. arXiv preprint arXiv:1511.08779. Tan, M. 1993. Multi-agent reinforcement learning: Independent vs. cooperative agents. In Proceedings of the tenth international conference on machine learning, 330–337. Tumer, K., and Agogino, A. 2007. Distributed agent-based air traffic flow management. In Proceedings of the 6th international joint conference on Autonomous agents and multiagent systems, 255. ACM. Usunier, N.; Synnaeve, G.; Lin, Z.; and Chintala, S. 2016. Episodic exploration for deep deterministic policies: An application to starcraft micromanagement tasks. arXiv preprint arXiv:1609.02993. Weaver, L., and Tao, N. 2001. The optimal reward baseline for gradient-based reinforcement learning. In Proceedings of the Seventeenth conference on Uncertainty in artificial intelligence, 538–545. Morgan Kaufmann Publishers Inc. Weyns, D.; Helleboogh, A.; and Holvoet, T. 2005. The packet-world: A test bed for investigating situated multiagent systems. In Software Agent-Based Applications, Platforms and Development Kits. Springer. 383–408. Williams, R. J. 1992. Simple statistical gradient-following algorithms for connectionist reinforcement learning. Machine learning 8(3-4):229–256. Wolpert, D. H., and Tumer, K. 2002. Optimal payoff functions for members of collectives. In Modeling complexity in economic and social systems. World Scientific. 355–369. Yang, E., and Gu, D. 2004. Multiagent reinforcement learning for multi-robot systems: A survey. Technical report, tech. rep. Ye, D.; Zhang, M.; and Yang, Y. 2015. A multi-agent framework for packet routing in wireless sensor networks. sensors 15(5):10026–10047. Ying, W., and Dayong, S. 2005. Multi-agent framework for third party logistics in e-commerce. Expert Systems with Applications 29(2):431–436. Appendix Training Details and Hyperparameters Training is performed in batch mode, with a batch size of 30. Due to parameter sharing, all agents can be processed in parallel, with each agent for each episode and time step occupying one batch entry. The training cycle progresses in three steps (completion of all three steps constitutes as one episode in our graphs): 1) collect data: collect 30 n episodes; 2) train critic: for each time step, apply a gradient step to the feed-forward critic, starting at the end of the episode; and 3) train actor: fully unroll the recurrent part of the actor, aggregate gradients in the backward pass across all time steps, and apply a gradient update. We use a target network for the critic, which updates every 150 training steps for the feed-forward centralised critics and every 50 steps for the recurrent IAC critics. The feed-forward critic receives more learning steps, since it performs a parameter update for each timestep. Both the actor and the critic networks are trained using RMS-prop with learning rate 0.0005 and alpha 0.99, without weight decay. We set gamma to 0.99 for all maps. Although tuning the skip-frame in StarCraft can improve absolute performance (Peng et al. 2017), we use a default value of 7, since the main focus is a relative evaluation between COMA and the baselines. Algorithm Algorithm 1 Counterfactual Multi-Agent (COMA) Policy Gradients Initialise θ1c , θ̂1c , θπ for each training episode e do Empty buffer do for ec = 1 to BatchSize n s1 = initial state, t = 0, ha0 = 0 for each agent a while st 6= terminal and t < T do t=t+1 for each agent a do  hat = Actor oat , hat−1 , uat−1 , a, u; θi Sample uat from π(hat , (e)) Get reward rt and next state st+1 Add episode to buffer Collate episodes in buffer into single batch for t = 1 to T do // from now processing all agents in parallel via single batch Batch unroll RNN using states, actions and rewards Calculate TD(λ) targets yta using θ̂ic for t = T down to 1 do  ∆Qat = yta − Q saj , u ∆θc = ∇θc (∆Qat )2 // calculate critic gradient c θi+1 = θic − α∆θc // update critic weights Every C steps reset θ̂ic = θic for t = T down to 1 do P Aa (sat , u) = Q(sat , u) − u Q(sat , u, u−a )π(u|hat ) // calculate COMA ∆θπ = ∆θπ + ∇θπ log π(u|hat )Aa (sat , u) // accumulate actor gradients π θi+1 = θiπ + α∆θπ // update actor weights
2cs.AI
An economic approach to vehicle dispatching for ride sharing Mengjing Chen, Weiran Shen, Pingzhong Tang, and Song Zuo IIIS, Tsinghua University ∗ arXiv:1707.01625v2 [cs.SY] 1 Mar 2018 March 2, 2018 Abstract Over the past few years, ride-sharing has emerged as an effective way to relieve traffic congestion. A key problem for these platforms is to come up with a revenue-optimal (or GMV-optimal) pricing scheme and an induced vehicle dispatching policy that incorporate geographic and temporal information. In this paper, we aim to tackle this problem via an economic approach. Modeled naively, the underlying optimization problem may be non-convex and thus hard to compute. To this end, we use a so-called “ironing” technique to convert the problem into an equivalent convex optimization one via a clean Markov decision process (MDP) formulation, where the states are the driver distributions and the decision variables are the prices for each pair of locations. Our main finding is an efficient algorithm that computes the exact revenue-optimal (or GMV-optimal) randomized pricing schemes. We characterize the optimal solution of the MDP by a primal-dual analysis of a corresponding convex program. We also conduct empirical evaluations of our solution through real data of a major ride-sharing platform and show its advantages over fixed pricing schemes as well as several prevalent surge-based pricing schemes. 1 Introduction The recently established applications of shared mobility, such as ride-sharing, bike-sharing, and car-sharing, have been proven to be an effective way to utilize redundant transportation resources and to optimize social efficiency (Cramer and Krueger, 2016). Over the past few years, intensive researches have been done on topics related to the economic aspects of shared mobility (Crawford and Meng, 2011; Kostiuk, 1990; Oettinger, 1999). Despite these researches, the problem of how to design revenue optimal prices and vehicle dispatching schemes has been largely open and one of the main research agendas in sharing economics. There are at least two challenges when one wants to tackle this problem in the real-world applications. First of all, due to the nature of transportation, the price and dispatch scheme must be geographically dependent. Secondly, the price and dispatch scheme must take into consideration the fact that supplies and demands in these environments may change over time. As a result, it may be difficult to compute, or even to represent a price and dispatch scheme for such complex environments. Traditional price and dispatch schemes for taxis (Laporte, 1992; Gendreau et al., 1994; Ghiani et al., 2003) and airplanes (Gale and Holmes, 1993; Stavins, 2001; McAfee and Te Velde, 2006) do not capture the dynamic aspects of the environments: taxi fees are normally calculated by a fixed rate of distance and time and the prices of flight tickets are sold via relatively long booking periods, while in contrast, the customers of shared vehicles make their decisions instantly. The dynamic ride-sharing market studied in this paper is also known to have imbalanced supply and demand, either globally in a city or locally in a particular time and location. Such imbalance in supply and demand is known to cause severe consequences on revenues (e.g, the so-called wild goose chase phenomenon (Castillo et al., 2017)). Surging price is a way to balance dynamic supply and demand (Chen and Sheldon, 2015) but there is no known guarantee that surge based pricing can dispatch vehicles efficiently and solve the imbalanced supplies and demands. Traditional dispatch schemes (Laporte, 1992; Gendreau et al., 1994; Ghiani et al., 2003) focus more on the algorithmic aspect of static vehicle routing, without consider pricing. However, vehicle dispatching and pricing problem are tightly related, since a new price scheme will surely induces a change on supply and demand since the drivers and passengers are strategic. In this paper, we aim to come up with price schemes with desirable induced supplies and demands. ∗ Contacts: [email protected], {emersonswr, kenshinping, songzuo.z}@gmail.com 1 1.1 Our contribution In this paper, we propose a graph model to analyze the vehicle pricing and dispatching problem mentioned above. In the graph, each node refers to a region in the city and each edge refers to a possible trip that includes a pair of origin and destination as well as a cost associated with the trip on this edge. The design problem is, for the platform, to set a price and specify the vehicle dispatch for each edge at each time step. Drivers are considered to be non-strategic in our model, meaning that they will accept whatever offer assigned to them. The objective of the platform can either be its revenue or the GMV or any convex combination between them. Our model naturally induces a Markov Decision Process (MDP) with the driver distributions on each node as states, the price and dispatch along each edge as actions, and the revenue as immediately reward. Although the corresponding mathematical program is not convex (thus computationally hard to compute) in general, we show that it can be reduced to a convex one without loss of generality. In particular, in the resulting convex program where the throughput along each source and destination pair in each time period are the variables, all the constraints are linear and hence the exact optimal solutions can be efficiently computed (Theorem 3.1). We further characterize the optimal solution via primal-dual analysis. In particular, a pricing scheme is optimal if and only if the marginal contribution of the throughput along each edge equals to the system-wise marginal contribution of additional supply minus the difference of the long term contributions of unit supply at the origin and the destination (see Section 5). We also perform extensive empirical analysis based on a public dataset with more than 8.5 million orders. We compare our policy with other intensively studied policies such as surge pricing (Chen and Sheldon, 2015; Cachon et al., 2016; Castillo et al., 2017). Our simulations show that, in both the static and the dynamic environment, our optimal pricing and dispatching scheme outperforms surge pricing by 17% and 33%. Interestingly, our simulations show that our optimal policy has much stronger ability in dispatching the vehicles than other policies, which results directly in its performance boost (see Section 6). 1.2 Related work Driven by real-life applications, a large number of researches have been done on ride-share markets. Some of them employ queuing networks to model the markets (Iglesias et al., 2016; Banerjee et al., 2015; Tang et al., 2016). Iglesias et al. (2016) describe the market as a closed, multi-class BCMP queuing network which captures the randomness of customer arrivals. They assume that the number of customers is fixed, since customers only change their locations but don’t leave the network. In contrast, the number of customer are dynamic in our model and we only consider the one who asks for a ride (or sends a request to the platform). Banerjee et al. (2015) also use a queuing theoretic approach to analyze the ride-share markets and mainly focus on the behaviors of drivers and customers. They assume that the drivers enter or leave the market with certain possibilities. Bimpikis et al. (2016) take account for the spatial dimension of pricing schemes in ride-share markets. They price for each region and their goal is to rebalance the supply and demand of the whole market. However, we price for each routing and aim to maximize the total revenue or social welfare of the platform. We also refer the readers to the line of researches initiated by (Ma et al., 2013) for the problems about the car-pooling in the ride-sharing systems (Alonso-Mora et al., 2017; Zhao et al., 2014; Chan and Shaheen, 2012). Many works on ride-sharing consider both the customers and the drivers to be strategic, where the drivers may reject the requests or leave the system if the prices are too low (Banerjee et al., 2015; Fang et al., 2017). As we mentioned, if the revenue sharing ratios between the platform and the drivers can be dynamic, then the pricing problem and the revenue sharing problem could be independent and hence the drivers are non-strategic in the pricing problem. In addition, the platform can also increase the profit by adopting dynamic revenue sharing schemes (Balseiro et al., 2017). Another work closely related to ours is by Banerjee et al. (2017). Their work is concurrent and has been developed independently from ours. In particular, the customers arrive according to a queuing model and their pricing policy is state-independent and depends on the transition volume. Both their and our models are built upon the underlying Markovian transitions between the states (the distribution of drivers over the graph). The major differences are: (i) our model is built for the dynamic environments with a very large number of customers (each of them is non-atomic) to meet the practical situations, while theirs adopts discrete agent settings; (ii) they overcome the non-convexity of the problem by relaxation and focus only on concave objectives, which makes this work hard to use for real applications, while we solve the problem via randomized pricing and transform the problem to a convex program; (iii) they prove 2 approximation bounds of the relaxation problem, while we give exact optimal solutions of the problem by efficiently solving the convex program. 2 Model A passenger (she) enters the ride-sharing platform and sends a request including her origin and destination to the platform. The platform receives the request and determines a price for it. If user accepts the price, then the platform may decide whether to send a driver (he) to pick her up. The platform is also able to dispatch drivers from one place to another even there is no request to be served. By the pricing and dispatching methods above, the goal of maximizing revenue or social welfare of the entire platform can be achieved. Our model incorporates the two methods into a simple pricing problem. In this section, we define basic components of our model and consider two settings: dynamic environments with a finite time horizon and static environments with an infinite time horizon. Finally we reduce the action space of the problem and give a simple formulation. Requests We use a strongly connected digraph G = (V, E) to model the geographical information of a city. Passengers can only take rides from nodes to nodes on the graph. When a passenger enters the platform, she expects to get a ride from node s to node t, and is willing to pay at most x ≥ 0 for the ride. She then sends to the platform a request, which is associated with the tuple e = (s, t). Upon receiving the request, The platform sets a price p for it. If the price is accepted by the passenger (i.e., x ≥ p), then the platform tries to send a driver to pick her up. We say that the platform rejects the request, if no driver is available. A request is said to be accepted if both the passenger accepts the price p and there are available drivers. Otherwise, the request is considered to end immediately. Drivers Clearly, within each time period, the total number of accepted requests starting from s cannot be more than the number of drivers available at s. Formally, let q(e) denote the total number of accepted request along edge e, then: Õ q(e) ≤ w(v), ∀v ∈ V, (2.1) e∈OUT(v) where OUT(v) is the set of edges starting from v and w(v) is the number of currently available drivers at node v. In particular, we assume that both the total number of drivers and the number of requests are very large, which is often the case in practice, and consider each driver and each request to be non-atomic. For simplicity, we normalize the total amount of drivers on the graph to be 1, thus w(v) is a real number in [0, 1]. We also normalize the number of requests on each edge with the total number of drivers. Note that the amount of requests on an edge e can be more than 1, if there are more requests on e than the total drivers on the graph. Geographic Status For each accepted request on edge e, the platform will have to cover a transportation cost cτ (e) for the driver. In the meanwhile, the assigned driver, who currently at node s, will not be available until he arrives the destination t. Let ∆τ(e) be the traveling time from s to t and τ be the timestep of the driver leaving s. He will be available again at timestep τ + ∆τ(e) on node t. Formally, the amount of available drivers on any v ∈ V is evolving according to the following equations: Õ Õ wτ+1 (v) = wτ (v) − qτ (e) + qτ+1−∆τ(e) (e), (2.2) e ∈OUT(v) e∈IN(v) where IN(v) is the set of edges ending at v. Here we add subscripts to emphasize the timestamp for each quantity. In particular, throughout this paper, we focus on the discrete time step setting, i.e., τ ∈ N. Demand Function As we mentioned, the platform could set different prices for the requests. Such prices may vary with the request edge e, time step t, and the driver distribution but must be independent of the passenger’s private value x as it is not observable. Formally, let Dτ (·|e) : R+ → R+ be the demand function of edge e, i.e., Dτ (p|e) is the amount of requests on edge e with private value x ≥ p in time step τ.1 Then the amount of accepted requests qτ (e) ≤ E[Dτ (pτ (e)|e)], where the expectation is taken over the potential randomness of the pricing rule pτ (e).2 1 In practice, such a demand function can be predicted from historical data Tong et al. (2017); Moreira-Matias et al. (2013). randomized pricing rule may set different prices for the requests on the same edge e. 2 The 3 Design Objectives In this paper, we consider a class of state-irrelevant objective functions. A function is stateirrelevant if its value only depends on the amount of accepted request on each edge q(e) but not the driver distribution of the system w(v). Note that a wide range of objectives are included in our class of objectives, such as the revenue of the platform: Õ REVENUE(p, q) = E[(pτ (e) − cτ (e)) · qτ (e)], e,τ and the social welfare of the entire system: WELFARE(p, q) = Õ E[(x − cτ (e)) · qτ (e)]. e,τ In general, our techniques work for any state-irrelevant objectives. Let g(p, q) denote the general objective function and the dispatching and pricing problem can be formulated as follows: Õ maximize g(pτ (e), qτ (e)|e) (2.3) e,τ subject to (2.1) and (2.2). Static and Dynamic Environment In general, our model is defined for a dynamic environment in the sense that the demand function Dτ and the transportation cost cτ could be different for each time step τ. In particular, we study the problem (2.3) in general dynamic environments with finite time horizon from τ = 1 to T, where the initial driver distribution w1 (v) is given as input. In addition, we also study the special case with static environment and infinite time horizon, where Dτ ≡ D and cτ ≡ c are consistent across each time step. 2.1 Reducing the action space In this section, we rewrite the problem to an equivalent reduced form by incorporating the action of dispatching into pricing, i.e., using p to express q. The idea is straightforward: (i) for the requests rejected by the platform, the platform could equivalently set an infinitely large price; (ii) if the platform is dispatching available drivers (without requests) from node s to t, we can create virtual requests from s to t with 0 value and let the platform sets price 0 for these virtual requests. In fact, we can assume without loss of generality that D(0|e) ≡ 1, the total amount of drivers, because one can always add enough virtual requests for the edges with maximum demand less than 1 or remove the requests with low values for the edges with maximum demand exceeds the total driver supply, 1. As a result, we may conclude that q(e) ≤ D(p|e). Since our goal is to maximize the objective g(p, q), raising prices to achieve the same amount of flow q(e) (such that E[D(p|e)] = q(e)) never eliminates the optimal solution. In other words, Observation 2.1. The original problem is equivalent to the following reduced problem, where the flow variables qτ (e) are uniquely determined by the price variables pτ (e): Õ maximize g(pτ (e), Dτ (pτ (e)|e)) e,τ subject to qτ (e) = E[D(pτ (e)|e)] (2.4) (2.1) and (2.2). 3 Problem Analysis In this section, we demonstrate how the original problem (2.4) can be equivalently rewritten as a Markov decision process with a convex objective function. Formally, Theorem 3.1. The original problem (2.4) of the instance hG, D, g, ∆τi is equivalent to a Markov decision process problem of another instance hG 0, D 0, g 0, ∆τ 0i with g 0 being convex. The proof of Theorem 3.1 will be immediate after Lemma 3.2 and 3.4. The equivalent Markov decision process problem could be formulated as a convex program, and hence can be solved efficiently. 4 3.1 Unifying travel time Note that the original problem (2.4), in general, is not a MDP by itself, because the current state wτ+1 (v) may depend on the action qτ+1−∆τ(e) in (2.2). Hence our first step is to equivalently map the original instance to another instance with traveling time is always 1, i.e., ∆τ(e) ≡ 1: Lemma 3.2 (Unifying travel time). The original problem (2.4) of an general instance hG, D, g, ∆τi is equivalent to the problem of a 1-travel time instance hG 0, D 0, g 0, ∆τ 0i, where ∆τ 0(·) ≡ 1. Intuitively, we tackle this problem by adding virtual nodes into the graph to replace the original edges. This operation splits the entire trip into smaller ones, and at each time step, all drivers become available. Proof. For edges with traveling time ∆τ(e) = 1, we are done. e For edges with traveling time ∆τ(e) > 1, we add ∆τ(e) − 1 virtual nodes into the graph, i.e., v1e, . . . , v∆τ(e)−1 , and the directed edges connecting them to replace the original edge e, i.e., e e e E 0(e) = {(s, v1e ), (v1e, v2e ), . . . , (v∆τ(e)−2 , v∆τ(e)−1 ), (v∆τ(e)−1 , t)}, Ø Ø e E0 = E 0(e), V 0 = {v1e, . . . , v∆τ(e)−1 } ∪ V. e ∈E e ∈E We set the demand function of each new edge e 0 ∈ E 0(e) to be identical to those of the original edge e: D 0(·|e 0) ≡ D(·|e). An important but natural constraint is that if a driver handles a request on edge e of the original graph, then he must go along all edges in E 0(e) of the new graph, because he cannot leave the passenger halfway. To guarantee this, we only need to guarantee that all edges in E 0(e) have the same price. Also, we need to split the objective of traveling along e into the new edges, i.e., each new edge has objective function g 0(p, q|e 0) = g(p, q|e)/∆τ(e), ∀e 0 ∈ E 0(e). One can easily verify that the above operations increase the graph size to at most maxe ∈E ∆τ(e)∗ times of that of the original one. In particular, there is a straightforward bijection between the dispatching behaviors of the original G = (V, E) and the new graph G 0 = (V 0, E 0). Hence we can always recover the solution to the original problem. 3.2 Flow formulation and randomized pricing By Lemma 3.2, the original problem (2.4) can be formulated as an MDP: Definition 3.3 (Markov Decision Process). The vehicle pricing and dispatching problem is a Markov decision process, denoted by a tuple (G, D, g, S, A, W), where G = (V, E) is the given graph, D is the demand function, objective g is the reward function, S = ∆(V) is the state space including all possible driver distributions over the nodes, A is the action space, and W is the state transition rule: Õ Õ wτ+1 (v) = wτ (v) − qτ (e) + qτ (e). (3.1) e∈OUT(v) e ∈IN(v) However, by naïvely using the pricing functions pτ (e) as the actions, the induced flow qτ (e) = E[Dτ (pτ (e)|e)], in general, is neither convex nor concave. In other words, both the reward g and the state transition W of the corresponding MDP is non-convex. As a result, it is hard to solve the MDP efficiently. In this section, we show that by formulating the MDP with the flows qτ (e) as actions, the corresponding MDP is convex. Lemma 3.4 (Flow-based MDP). In the MDP (G, D, g, S, A, W) with all possible flows as the action set A, i.e., A = [0, 1] |E | , the state transition rules are linear functions of the flows and the reward functions g are convex functions of the flows. Proof. To do this, we first need to rewrite the prices pτ (e) as functions of the flows qτ (e). In general, since the prices could be randomized, the inverse function of qτ (e) = E[Dτ (pτ (e)|e)] is not unique. 5 Note that conditional on fixed flows qτ (e), the state transition of the MDP is also fixed. In this case, different prices yielding such specific flows only differs in the rewards. In other words, it is without loss of generality to let the inverse function of prices be as follows: pτ (e) = arg max gτ (pτ (e), qτ (e)|e), s.t. qτ (e) = E[Dτ (pτ (e)|e)]. p In particular, since the objective function g we studied in this paper is linear and weakly increasing in the prices p and the demand function D(p|e) is decreasing in p, the inversed price function could be defined as follows: • Let gτ (q|e) = gτ (Dτ−1 (q|e), q|e), i.e., the objective obtained by setting the maximum fixed price p = Dτ−1 (q|e) such that the induced flow is exactly q; • Let ĝτ (q|e) be the ironed objective function, i.e., the smallest concave function that upper-bounds gτ (q|e) (see Figure 1); • For any given qτ (e), the maximum objective on edge e is ĝτ (qτ (e)|e) and could be achieve by setting the price to be randomized over Dτ−1 (q 0 |e) and Dτ−1 (q 00 |e). Figure 1: Ironed objective function Finally, we prove the above claim to complete the proof of Lemma 3.4. By the definition of ĝτ (q|e), for any randomized price p, E[gτ (Dτ (p|e)|e)] ≤ E[ĝτ (Dτ (p|e)|e)]. p p Since ĝ is concave, applying Jensen’s inequality yields:   E[ĝτ (Dτ (p|e)|e)] ≤ ĝτ E[Dτ (p|e)] e = ĝτ (q̄|e) p p Now it suffices to show that the upper bound ĝτ (q̄|e) is attainable. If ĝτ (q̄|e) = gτ (q̄|e), then the right-hand-side could be achieved by letting pτ (e) be the deterministic price Dτ−1 (q̄|e). Otherwise, let I = (q 0, q 00) be the ironed interval (where ĝτ (q|e) > gτ (q|e), ∀q ∈ I but ĝτ (q 0 |e) = gτ (q 0 |e) and ĝτ (q 00 |e) = gτ (q 00 |e)) containing q̄. Thus q̄ can be written as a convex combination of the end points q 0 and q 00: q̄ = λq 0 + (1 − λ)q 00. Note that the function ĝτ is linear within the interval I. Therefore λgτ (q 0 |e) + (1 − λ)gτ (q 00 |e) = λĝτ (q 0 |e) + (1 − λ)ĝτ (q 00 |e) = ĝτ (λq 0 + (1 − λ)q 00 |e) = ĝτ (q̄|e). In other words, the upper bound ĝτ (q̄|e) could be achieved by setting the price to be q 0 with probability λ and q 00 with probability 1 − λ. In the meanwhile, the flow qτ (e) would retain the same. Proof of Theorem 3.1. The theorem is implied by Lemma 3.2 and Lemma 3.4. In particular, the reward function is the ironed objective function ĝ. In the rest of the paper, we will focus on the following equivalent problem: Õ maximize ĝτ (qτ (e)|e) e,τ subject to (2.1) and (3.1). 6 (3.2) 4 Optimal Solution in Static Environment In this setting, we restrict our attention to the case where the environment is static, hence the objective function does not change over time, i.e., ∀τ ∈ [T], ĝτ (q|e) ≡ ĝ(q|e). We aim to find the optimal stationary policy that maximizes the objective function, i.e., the decisions qτ depends only on the current state wτ . In this section, we discretize the MDP problem and focus on stable policies. With the introduction of the ironed objective function ĝτ , we show that for any discretization scheme, the optimal stationary policy of the induced discretized MDP is dominated by a stable dispatching scheme. Then we formulate the stable dispatching scheme as a convex problem, which means the optimal stationary policy can be found in polynomial time. Definition 4.1. A stable dispatching scheme is a pair of state and policy (wτ , π), such that if policy π is applied, the distribution of available drivers does not change over time, i.e., wτ+1 (v) = wτ (v). In particular, under a stable dispatching scheme, the state transition rule (3.1) is equivalent to the following form: Õ Õ q(e) = q(e). (4.1) e ∈OUT(v) e ∈IN(v) Definition 4.2. Let M = (G, D, ĝ, S, A, W) be the original MDP problem. A discretized MDP DM with respect to M is a tuple (G d, Dd, ĝd, Sd, Ad, Wd ), where G d = G, Dd = D, ĝd = ĝ, Wd = W, Sd is a finite subset of S, and Ad is a finite subset of A that contains all feasible transition flows between every two states in Sd . Theorem 4.3. Let DM and M be a discretized MDP and the corresponding original MDP. Let πd : Sd → Ad be an optimal stationary policy of DM. Then there exists a stable dispatching scheme (w, π), such that the time-average objective of π in M is no less than that of πd in DM. Proof. Consider policy πd in DM. Starting from any state in Sd with policy πd , let {wτ }0∞ be the subsequent state sequence. Since DM has finitely many states and policy πd is a stationary policy, there must be an integer n, such that wn = wm for some m < n and from time step m on, the state sequence become a periodic sequence. Define w̄ = n−1 1 Õ wk , n − m k=m q̄ = n−1 1 Õ πd (wk ) n − m k=m Denote by πd (wk |e) or qd (e) the flow at edge e of the decision πd (wk ). Sum the transition equations for all the time steps m ≤ k < n, and we get: n−1 Õ wk+1 (v) − k=m n−1 Õ k=m wk (v) = n−1 Õ n−1 Õ © ª Õ© Õ ª πd (wk |e)® − πd (wk |e)® ­ ­ k=m «IN(v) ¬ k=m «OUT(v) ¬ © Õ ª ©Õ ª w̄(v) = w̄(v) − ­ q̄(e)® + ­ q̄(e)® «OUT(v) ¬ «IN(v) ¬ Also, policy πd is a valid policy, so ∀v ∈ V and ∀m ≤ k < n: Õ qk (e) ≤ wk (v) OUT(v) Summing over k, we have: Õ q̄(e) ≤ w̄(v) OUT(v) Now consider the original problem M. Let w = w̄ and π be any stationary policy such that: • π(w) = q̄; 7 • starting from any state w 0 , w, policy π leads to state w within finitely many steps. Note that the second condition can be easily satisfied since the graph G is strongly connected. With the above definitions, we know that (w, π) is a stable dispatching scheme. Now we compare the objectives of the two policies πd and π. The time-average objective function is not sensitive about the first finitely many immediate objectives. And since the state sequences of both policies πd and π are periodic, Their time-average objectives can be written as: n−1 1 ÕÕ ĝ(qd (e)|e) n − m k=m e ∈E Õ OBJ(π) = ĝ(q̄(e)|e) OBJ(πd ) = e ∈E By Jensen’s inequality, we have: n−1 Õ 1 ÕÕ OBJ(πd ) = ĝ(qd (e)|e) ≤ ĝ n − m k=m e∈E e∈E " ! # n Õ 1 Õ ĝ(q̄(e)|e) = OBJ(π) qd (e) e = n − m k=m e ∈E With Theorem 4.3, we know there exists a stable dispatching scheme that dominates the optimal stationary policy of the our discretized MDP. Thus we now only focus on stable dispatching schemes. The problem of finding an optimal stable dispatching scheme can be formulated as a convex program with linear constraints: Õ maximize ĝ(q|e) e∈E (4.2) subject to (2.1) and (4.1). Because ĝ(q|e) is concave, the program is convex. Since all convex programs can be solved in polynomial time, our algorithm for finding optimal stationary policy of maximizing the objective functions is efficient. 5 Characterization of optimality In this section, we characterize the optimal solution via dual analysis. For the ease of presentation, we consider Program 4.2 in the static environment with infinite horizon. Our characterization directly extends to the dynamic environment. The Lagrangian is defined to be ! Õ Õ Õ © Õ Õ ª L(q, λ, µ) = − ĝ(q|e) + λ q(e) − 1 + µv ­ q(e) − q(e)® e ∈E e∈E v ∈V IN(v) «OUT(v) ¬ Õ =−λ+ [−ĝ(q|e) + (λ + µs − µt )q(e)] , e ∈E where s and t are the origin and destination of e, i.e., e = (s, t), and λ and µ are Lagrangian multipliers Í with λ ≥ 0. Note that we implicitly transform program 4.2 to the standard form that minimizes the objective − e∈E ĝ(q∗ |e). The Lagrangian dual function is Õ h(λ, µ) = inf L(q, λ, µ) = [−ĝ(q̃|e) + (λ + µs − µt )q̃(e)] , q e ∈E where q̃(e) is a function of λ and µ such that λ + µs − µt = ĝ 0(q̃|e), where ĝ 0(q̃|e) is the derivative of the objective function with respect to flow q. The dual program corresponding to Program 4.2 is maximize h(λ, µ) subject to λ≥0 According to the KKT conditions, we have the following characterization for optimal solutions. 8 (5.1) ∗ ∗ Theorem 5.1. Let q∗ (e) be a feasible solution to the primal program 4.2 and (λ to the dual Í , µ ) be∗a feasible ∗solution ∗ ∗ ∗ program 5.1. Then both q (e) and (λ , µ ) are primal and dual optimal with − e∈E ĝ(q |e) = h(λ , µ∗ ), if and only if ! Õ λ∗ q∗ (e) − 1 = 0 (5.2) e∈E ĝ (q |e) = λ∗ + µ∗s − µ∗t , ∀v ∈ V 0 ∗ (5.3) Proof. According to the definition of h(λ, µ), we have h(λ∗, µ∗ ) = inf q L(q, λ∗, µ∗ ). Since ĝ(q|e) are concave functions, Equation 5.3 is equivalent to the fact that q∗ (e) minimizes the function L(q, λ∗, µ∗ ). h(λ∗, µ∗ ) = inf L(q, λ∗, µ∗ ) q =L(q∗, λ∗, µ∗ ) ! =− Õ ĝ(q |e) + λ ∗ e ∈E =− Õ ∗ Õ q (e) − 1 + ∗ Õ v ∈V e∈E ∗ Õ © Õ ∗ ª µ∗v ­ q (e) − q∗ (e)® IN(v) «OUT(v) ¬ ĝ(q |e), e∈E where the last equation uses the Equation 5.2 and the fact that q∗ (e) is feasible. Continuing with Theorem 5.1, we will analyze the dual variables from the economics angle and some interesting insights into this problem for real applications. 5.1 Economic interpretation The dual variables have useful economic interpretations (see (Boyd and Vandenberghe, 2004, Chapter 5.6)). λ∗ is the system-wise marginal contribution of the drivers (i.e. the increase in the objective function when a small amount of drivers are added to the system). Note that by the complementary slackness (Equation 5.2), if λ∗ > 0, the sum of the total flow must be 1, meaning that all drivers are busy, and more requests can be accepted (hence increase revenue) if more drivers are added to the system. Otherwise, there must be some idle drivers, and adding more drivers cannot increase the revenue. µ∗v is the marginal contribution of the drivers at node v. If we allow the outgoing flow from node v to be slightly more than the incoming flow to node v, then µv is the revenue gain from adding more drivers at node v. 5.2 Insights for applications The way we formulate and solve the problem, in fact, naturally leads to two interesting insights into this problem, which are potentially useful for real applications. 1. Scalability In our model, the size of the convex program increases linearly in the number of edges, hence quadratically in the number of regions. This could be one hidden feature that is potentially an obstacle to real applications, where the number of regions in a city might be quite large. A key observation to the issue is that any dispatching policy induced by a real system is a feasible solution of our convex program and any improvement (maybe via gradient descent) from such policy in fact leads to a better solution for this system. In other words, it might be hard to find the exact optimal or nearly optimal solutions, but it is easy to improve from the current state. Therefore, in practice, the platform can keep running the optimization in background and apply the most recent policy to gain more revenue (or achieve a higher value of some other objectives). 2. Alternative solution As suggested by the characterization and its economic interpretation, instead of solving the convex programs directly, we also have an alternative way to find the optimal policy by solving the dual program. The optimal policy can be easily recovered from dual optimal solutions. In particular, according to the economic interpretation of dual variables, we need to estimate the marginal contributions of drivers. More importantly, the number of dual variables (= the number of regions) is much smaller than the number of primal variables (= the number of edges ≈ square of the former). So solving the dual program may be more efficient when applied to real systems, and is also of independent interest of this paper. 9 6 Empirical Analysis We design experiments to demonstrate the good performance of our algorithms for real applications. In this section, we first describe the dataset and then introduce how to extract useful information for our model from the dataset. Two benchmark policies, FIXED and SURGE, are compared with our pricing policy. The result analysis includes demand-supply balance and instantaneous revenue in both static and dynamic environments. 6.1 Dataset We perform our empirical analysis based on a public dataset from a major ride-sharing company. The dataset includes the orders in a city for three consecutive weeks and the total number of orders is more than 8.5 million. An order is created when a passenger send a ride request to the platform. Each order consists of a unique order ID, a passenger ID, a driver ID, an origin, a destination, and an estimated price, and the timestamp when the order is created (see Table 1 for example). The driver ID might be empty if no driver was assigned to pick up the passenger. There are 66 major regions of the city and the origins and destinations in the dataset are given as the region IDs. We say a request is related to a region if the region is either the origin or the destination of the request. And the popularity of a region is defined as the number of related requests. Since some of the regions in the dataset have very low popularity values, we only consider the most popular 21 or 5 regions in the two settings (see Section 6.4 and Section 6.5 respectively for details). The related requests of the most popular 21 (or 5) regions cover about 90% (or 50%) of the total requests in the original dataset. For ease of presentation, we relabel the region IDs in descending order of their popularities (so region #1 is the most popular region). Figure 2 illustrates the frequencies of requests on different origin-destination pairs. From the figure, one can see that the frequency matrix is almost symmetric and the destination of a request is most likely to be in the same region as the origin. order hash driver hash user hash origin hash dest hash price 37.5 timestamp 01-15 00:35:11 Table 1: An example of a row in the dataset, where “hash” stands for some hash strings of the IDs that we didn’t show the exact value here. Heatmap of Routes Log Frequency 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 12.5 Origin IDs 10.0 7.5 5.0 2.5 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 0.0 Destination IDs Figure 2: The logarithmic frequencies of request routes. 6.2 Data preparation The time consumptions from nodes to nodes and demand curves for edges are known in our model. However, the dataset doesn’t provide such information directly. We filter out "abnormal" requests and apply a linear regression to 10 Log Frequency 8 6 30 0 0 8 6 4 2 0 15 2 15 30 4 Time & Price Filtered Log Frequency Time in Mins 45 60 75 90 105 120 135 150 Time in Mins 45 60 75 90 105 120 135 150 Time & Price 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 0 5 10 15 20 25 30 35 40 45 50 55 60 65 70 75 80 Price in Local Currency 0 Price in Local Currency (a) Time & price without filtering (b) Time & price with filtering Figure 3: The logarithmic frequencies of (time, price) pairs, with or without filtering the “abnormal” requests. 0 Density Request value from region 6 to 2 Density Request value from region 9 to 11 5 10 15 Value 20 25 0 5 10 15 20 Value 25 30 Figure 4: Fitting request values to lognormal distributions. get the relationship of the travel time and the price. It makes possible to infer the travel time from the order price. For the demand curves, we observe the values of each edge and fit them to lognormal distributions. Distance and travel time The distance (or equivalently the travel time) from one region to another is required to perform our simulation. We approximate the travel time by the time interval of two consecutive requests assigned to the same driver. In Figure 3(a), we plot the frequencies of requests with certain (time, price) pairs. We cannot see clear relationship between time and price, which are supposed to be roughly linearly related in this figure.3 We think that this is due to the existence of two types of “abnormal” requests: • Cancelled requests, usually with very short completion time but not necessarily low prices (appeared in the right-bottom part of the plot); • The last request of a working period, after which the driver might go home or have a rest. These requests usually have very long completion time but not necessarily high enough prices (appeared in the left-top part of the plot). With the observations above, we filter out the requests with significantly longer or shorter travel time compared with most of the requests with the same origin and destination. Figure 3(b) illustrates the frequencies of requests after such filtering. As expected, the brightest region roughly surrounds the 30◦ line in the figure. By applying a standard linear regression, the slope turns out to be approximately 0.5117 CNY per minute. One may also notice some “right-shifting shadows” of the brightest region, which are caused by the surge-pricing policy with different multipliers. 3 The price of a ride is the maximum of a two-dimension linear function of the traveled distance and spent time and a minimal price (which is 7 CNY as one can see the vertical bright line at price = 7 in Figure 3). Since the traveled distance is almost linearly related to the spent time, the price, if larger than the minimal price, should also be almost linearly related to the traveling time. Readers may notice that from the figures, there are many requests with price less than 7 (even as low as 0). This is because there are many coupons given to passengers to stimulate their demand for riding and the prices given in the dataset are after applying the coupons. 11 Revenue per Minute Revenue per Minute 1600 1400 1200 1000 800 600 400 200 0 0 20 40 60 80 # of Iterations 100 400 300 200 100 0 120 (a) Static environment 0 100 200 300 400 500 # of Iterations 600 700 800 (b) Dynamic environment Figure 5: Convergence of revenue. Estimation of demand curves To estimate the demand curves, we first gather all the requests along the same edge (also within the same time period for dynamic environment, see Section 6.5) and take the prices associated with the requests as the values of the passengers. Then, we fit the values of each edge (and each time period for dynamic environment) to a lognormal distribution. The reason that we choose the lognormal distribution is two-fold: (i) the data fits lognormal distributions quite well (see Figure 4 as examples); (ii) lognormal distributions are commonly used in some related literatures Ostrovsky and Schwarz (2011); Lahaie and Pennock (2007); Roberts et al. (2016); Shen and Tang (2017). We set the cost of traveling to be zero, because we do not have enough information from the dataset to infer the cost. 6.3 Benchmarks We consider two benchmark policies: • FIXED: fixed per-minute pricing, i.e., the price of a ride equals to the estimated traveling time from the origin to the destination of this ride multiplied by a per-minute price α, where α is a constant across the platform. • SURGE: based on FIXED policy, using surge pricing to clear the local market when supply is not enough. In other words, the price of a ride equals to the estimated traveling time multiplied by αβ, where α is the fixed per-minute price and β ≥ 1 is the surge multiplier. Note that β is dynamic and can be different for requests initiated at different regions, while the requests initiated at the same regions will share the same surge multipliers. In the rest of this section, we evaluate and compare our dynamic pricing policy DYNAM with these two benchmarks in both static and dynamic environments. 6.4 Static environment We first present the empirical analysis for the static environment, which is simpler than the dynamic environment that we will consider next, hence easier to begin with. In the static environment, we use the average of the statistics of all 21 days as the inputs to our model. For example, the demand function D(p|e) is estimated based on the frequencies and prices of the requests along edge e averaged over time. Similarly, the total supply of drivers is estimated based on the total durations of completed requests. With the static environment, we can instantiate the convex program (4.2) and solve via standard gradient descent algorithms. In our case, we simply use the MATLAB function fmincon to solve the convex program on a PC with Intel i5-3470 CPU. We did not apply any additional techniques to speed-up the computation as the optimization of running time is not the main focus of this paper. Figure 5(a) illustrates the convergence of the objective value (revenue) with increasing number of iterations, where each iteration roughly takes 0.2 second. 12 Dynamic Environment 1550 Revenue per Minute Revenue per Minute Static Environment DYNAM FIXED SURGE 1500 1450 1400 1350 1300 1250 1200 0 4 8 12 Hours 16 20 DYNAM FIXED 1000 800 600 400 200 0 24 SURGE 0 4 (a) Static environment 8 12 16 Hours 20 24 (b) Dynamic environment Figure 6: Instantaneous revenue in different environments. 300% 200% 100% 0% 500% 400% 300% 200% 100% 0 4 8 12 Hours 16 20 24 0% 500% 400% 300% 200% 100% 0 4 8 12 Hours 16 20 24 0% 600% 4 8 12 Hours 16 20 24 500% 400% 300% 200% 0% DYNAM FIXED SURGE 700% 100% 0 Region #5 800% DYNAM FIXED SURGE 700% Supply/Demand 400% 600% Region #4 800% DYNAM FIXED SURGE 700% Supply/Demand 500% 600% Region #3 800% DYNAM FIXED SURGE 700% Supply/Demand Supply/Demand 600% Region #2 800% DYNAM FIXED SURGE 700% Supply/Demand Region #1 800% 600% 500% 400% 300% 200% 100% 0 4 8 12 Hours 16 20 24 0% 0 4 8 12 Hours 16 20 24 Figure 7: Instantaneous supply ratios for different regions. To compare the performance of policy DYNAM with the benchmark policies FIXED and SURGE, we also simulates them under the same static environment. In particular, the length of each timestep is set to be 15 minutes and the number of steps in simulation is 96 (so 24 hours in total). For both FIXED and SURGE, we use the per-minute price fitted from data as the base price, α = 0.5117, and allow the surge ratio β to be in [1.0, 5.0]. To make the evaluations comparable, we use the distribution of drivers under the stationary solution of our convex program as the initial driver distributions for FIXED and SURGE. Figure 6(a) shows how the instantaneous revenues evolve as the time goes by, where DYNAM on average outperforms FIXED and SURGE by roughly 24% and 17%, respectively. Note that our policy DYNAM is stationary under the static environment, the instantaneous revenue is constant (the red horizontal line). Interestingly, the instantaneous revenue curves of both FIXED and SURGE are decreasing and the one of FIXED is decreasing much faster. The observation reflects that both FIXED and SURGE are not doing well in dispatching the vehicles: FIXED simply never balances the supply and demand, while SURGE shows better control in the balance of supply and demand because the policy seeks to balance the demand with local supply when supply can not meet the demand. However, neither of them really balance the global supply and demand, so the instantaneous revenue decrease as the supply and demand become more unbalanced. In other words, the empirical analysis supports our insight about the importance of vehicle dispatching in ride-sharing platforms. 6.5 Dynamic environment In the dynamic environment, the parameters (i.e., the demand functions and the total number of requests) are estimated based on the statistics of each hour but averaged over different days. For example, the demand functions Dh (p|e) are defined for each edge e and each of the 24 hours, h ∈ {0, . . . , 23}. In particular, we only use the data from the weekdays (14 days in total)4 among the most popular 5 regions for the estimation. Again, we instantiate the convex program (3.2) for the dynamic environment and solve via the fmincon function on the same PC that we used for the static case. Figure 5(b) shows the convergence of the objective value with increasing number of iterations, where each iteration takes less than 1 minute. 4 The reason that we only use data from weekdays is that the dynamics of demands and supplies in weekdays do have similar patterns but quite different from the patterns of weekends. 13 We setup FIXED and SURGE in exactly the same way as we did for the static environment, except that the initial driver distribution is from the solution of the convex program for dynamic environment. Figure 6(b) shows the instantaneous revenue along the simulation. In particular, the relationship DYNAM  SURGE  FIXED holds almost surely. Moreover, the advantages of DYNAM over the other two policies are more significant at the high-demand “peak times”. For example, at 8 a.m., DYNAM (∼800) outperforms SURGE (∼600) and FIXED (∼500) by roughly 33% and 60%, respectively. Demand-supply balance Balancing the demand and supply is not the goal of our dispatching policy. However, a policy without such balancing abilities are unlikely to perform well. In Figure 7, we plot the supply ratios (defined as the local instantaneous supply divided by the local instantaneous demand) for all the 5 regions during the 24 hours of the simulation. From the figures, we can easily check that comparing with the other two lines, the red line (the supply ratio of DYNAM) tightly surrounds the “balance” line of 100%, which means that the number of available drivers at any time and at each region is close to the number of requests sent from that region at that time. The lines of other two policies sometimes could be very far from the “balance” line, that is, the drivers under policy FIXED and SURGE are not in the location where many passengers need the service. As a result, our policy DYNAM shows much stronger power in vehicle dispatching and balancing demand and supply in dynamic ride-sharing systems. Such advanced techniques in dispatching can in turn help the platform to gain higher revenue through serving more passengers. References Javier Alonso-Mora, Samitha Samaranayake, Alex Wallar, Emilio Frazzoli, and Daniela Rus. 2017. On-demand high-capacity ride-sharing via dynamic trip-vehicle assignment. PNAS (2017), 201611675. Santiago Balseiro, Max Lin, Vahab Mirrokni, Renato Paes Leme, and Song Zuo. 2017. Dynamic revenue sharing. In NIPS 2017. Siddhartha Banerjee, Daniel Freund, and Thodoris Lykouris. 2017. Pricing and Optimization in Shared Vehicle Systems: An Approximation Framework. In EC 2017. Siddhartha Banerjee, Carlos Riquelme, and Ramesh Johari. 2015. Pricing in Ride-share Platforms: A QueueingTheoretic Approach. (2015). Kostas Bimpikis, Ozan Candogan, and Saban Daniela. 2016. Spatial Pricing in Ride-Sharing Networks. (2016). Stephen Boyd and Lieven Vandenberghe. 2004. Convex optimization. Cambridge university press. Gerard P Cachon, Kaitlin M Daniels, and Ruben Lobel. 2016. The role of surge pricing on a service platform with self-scheduling capacity. (2016). Juan Camilo Castillo, Dan Knoepfle, and Glen Weyl. 2017. Surge pricing solves the wild goose chase. In EC 2017. ACM, 241–242. Nelson D Chan and Susan A Shaheen. 2012. Ridesharing in north america: Past, present, and future. Transport Reviews 32, 1 (2012), 93–112. M Keith Chen and Michael Sheldon. 2015. Dynamic pricing in a labor market: Surge pricing and flexible work on the Uber platform. Technical Report. Mimeo, UCLA. Judd Cramer and Alan B Krueger. 2016. Disruptive change in the taxi business: The case of Uber. The American Economic Review 106, 5 (2016), 177–182. Vincent P Crawford and Juanjuan Meng. 2011. New york city cab drivers’ labor supply revisited: Reference-dependent preferences with rationalexpectations targets for hours and income. AER 101, 5 (2011), 1912–1932. Zhixuan Fang, Longbo Huang, and Adam Wierman. 2017. Prices and subsidies in the sharing economy. In Proceedings of the 26th International Conference on World Wide Web. WWW 2017, 53–62. 14 Ian L Gale and Thomas J Holmes. 1993. Advance-purchase discounts and monopoly allocation of capacity. The American Economic Review (1993), 135–146. Michel Gendreau, Alain Hertz, and Gilbert Laporte. 1994. A tabu search heuristic for the vehicle routing problem. Management science 40, 10 (1994), 1276–1290. Gianpaolo Ghiani, Francesca Guerriero, Gilbert Laporte, and Roberto Musmanno. 2003. Real-time vehicle routing: Solution concepts, algorithms and parallel computing strategies. European Journal of Operational Research 151, 1 (2003). Ramon Iglesias, Federico Rossi, Rick Zhang, and Marco Pavone. 2016. A BCMP Network Approach to Modeling and Controlling Autonomous Mobility-on-Demand Systems. arXiv preprint arXiv:1607.04357 (2016). Peter F Kostiuk. 1990. Compensating differentials for shift work. Journal of political Economy 98, 5, Part 1 (1990), 1054–1075. Sébastien Lahaie and David M Pennock. 2007. Revenue analysis of a family of ranking rules for keyword auctions. In EC 2007. ACM, 50–56. Gilbert Laporte. 1992. The vehicle routing problem: An overview of exact and approximate algorithms. European journal of operational research 59, 3 (1992). Shuo Ma, Yu Zheng, and Ouri Wolfson. 2013. T-share: A large-scale dynamic taxi ridesharing service. In ICDE. IEEE, 410–421. R Preston McAfee and Vera Te Velde. 2006. Dynamic pricing in the airline industry. forthcoming in Handbook on Economics and Information Systems, Ed: TJ Hendershott, Elsevier (2006). Luis Moreira-Matias, Joao Gama, Michel Ferreira, Joao Mendes-Moreira, and Luis Damas. 2013. Predicting taxi– passenger demand using streaming data. IEEE Transactions on Intelligent Transportation Systems 14, 3 (2013), 1393–1402. Gerald S Oettinger. 1999. An empirical analysis of the daily labor supply of stadium venors. Journal of political Economy 107, 2 (1999), 360–392. Michael Ostrovsky and Michael Schwarz. 2011. Reserve prices in internet advertising auctions: A field experiment. In EC 2011Practical. ACM, 59–60. Ben Roberts, Dinan Gunawardena, Ian A Kash, and Peter Key. 2016. Ranking and tradeoffs in sponsored search auctions. ACM Transactions on Economics and Computation 4, 3 (2016), 17. Weiran Shen and Pingzhong Tang. 2017. Practical versus Optimal Mechanisms. In AAMAS. 78–86. Joanna Stavins. 2001. Price discrimination in the airline market: The effect of market concentration. Review of Economics and Statistics 83, 1 (2001), 200–202. Christopher S Tang, Jiaru Bai, Kut C So, Xiqun Michael Chen, and Hai Wang. 2016. Coordinating supply and demand on an on-demand platform: Price, wage, and payout ratio. (2016). Yongxin Tong, Yuqiang Chen, Zimu Zhou, Lei Chen, Jie Wang, Qiang Yang, Jieping Ye, and Weifeng Lv. 2017. The simpler the better: a unified approach to predicting original taxi demands based on large-scale online platforms. In KDD 2017. ACM, 1653–1662. Dengji Zhao, Dongmo Zhang, Enrico H Gerding, Yuko Sakurai, and Makoto Yokoo. 2014. Incentives in ridesharing with deficit control. In AAMAS 2014. 15
3cs.SY
Mean Square Capacity of Power Constrained Fading Channels with Causal Encoders and Decoders* arXiv:1509.04784v1 [math.OC] 16 Sep 2015 Liang Xu1 , Lihua Xie1 and Nan Xiao2 Abstract— This paper is concerned with the mean square stabilization problem of discrete-time LTI systems over a power constrained fading channel. Different from existing research works, the channel considered in this paper suffers from both fading and additive noises. We allow any form of causal channel encoders/decoders, unlike linear encoders/decoders commonly studied in the literature. Sufficient conditions and necessary conditions for the mean square stabilizability are given in terms of channel parameters such as transmission power and fading and additive noise statistics in relation to the unstable eigenvalues of the open-loop system matrix. The corresponding mean square capacity of the power constrained fading channel under causal encoders/decoders is given. It is proved that this mean square capacity is smaller than the corresponding Shannon channel capacity. In the end, numerical examples are presented, which demonstrate that the causal encoders/decoders render less restrictive stabilizability conditions than those under linear encoders/decoders studied in the existing works. I. I NTRODUCTION Control over communication networks has been a hot research topic in the past decade [1]. This is mainly motivated by the rapid development of wireless communication technology that enables the connection of geographically distributed systems and devices. However, the insertion of wireless communication networks also poses challenges in analysis and design of control systems due to constraints and uncertainties in communications. One must take the communication networks into consideration and analyze how they affect the stability and performance of the closed-loop control systems. Until now, there have been plentiful results that reveal requirements on communication channels to ensure the stabilizability. For noiseless digital channels, the celebrated data rate theorem is given in [2]. For noisy channels, the problem is complicated by the fact that different channel capacities are required under different stability definitions. For almost sure stability, [3] shows that the Shannon capacity in relation to unstable dynamics of a system constitutes the critical condition for its stabilizability. While for moment stability, [4] shows that the Shannon capacity is too optimistic while the zero-error capacity is too pessimistic, and the anytime *This work was supported by the National Research Foundation of Singapore under Grant NRF2011NRF-CRP001-090 and the National Natural Science Foundation of China under Grant 61304044. 1 Liang Xu and Lihua Xie are with EXQUISITUS, Centre for E-City, School of Electrical and Electronic Engineering, Nanyang Technological University, Singapore 639798, Singapore [email protected], [email protected] 2 Nan Xiao is with search and Technology the Singapore-MIT Centre, Singapore [email protected] Alliance for Re138602, Singapore capacity introduced in this paper characterizes the stabilizability conditions. Essentially, to keep the η-moment of the state of an unstable scalar plant bounded, it is necessary and sufficient for the feedback channel’s anytime capacity corresponding to anytime-reliability α = ηlog2 |λ| to be greater than log2 |λ|, where λ is the unstable eigenvalue of the plant. The anytime capacity has a more stringent reliability requirement than the Shannon capacity. However, it is worthy noting that there exist no systematic method to calculate the anytime capacities of channels. In control community, the anytime capacity is usually studied under the mean square stability requirement, for which the anytime capacity is commonly named as the mean square capacity. For example, [5] characterizes the mean square capacity of a fading channel. [6] studies the mean square stabilization problem over a power constrained AWGN channel and characterizes the critical capacity to ensure mean square stabilizability. They further show that the extension from linear encoders/decoders to more general causal encoders/decoders cannot provide additional benefits of increasing the channel capacity [7]. Specifically, the results stated above deal with fading channels or AWGN channels separately. While in wireless communications, it is practical to consider them as a whole. In this paper, we are interested in a power constrained fading channel which is corrupted by both fading and AWGN. We aim to find the critical condition on the channel to ensure the mean square stabilizability of the system. Note that [8] has derived the necessary and sufficient condition for such kind of channel to ensure mean square stabilizability under a linear encoder/decoder. It is still unknown whether we can achieve a higher channel capacity with more general causal strategies. This paper provides a positive answer to this question. This paper is organized as follows. Problem formulation and some preliminaries are given in Section 2. Section 3 provides the results for scalar systems. Section 4 discusses the extension to vector systems. Section 5 provides numerical illustrations and this paper ends with some concluding remarks in Section 6. II. P ROBLEM F ORMULATION AND P RELIMINARIES This paper studies the following single-input discrete-time linear system xt+1 = Axt + But (1) where x ∈ Rn is the system state and u ∈ R is the control input. Without loss of generality, we assume that all the eigenvalues of A are unstable, i.e., |λi (A)| ≥ 1 for all i = 1, 2, . . . , n [7]. The initial value x0 is randomly generated from a Gaussian distribution with zero mean and bounded covariance Σx0 . The system state xt is observed by a sensor and then encoded and transmitted to the controller through a power constrained fading channel. The communication channel is modeled as rt = gt st + nt (2) in which st denotes the channel input; rt represents the channel output; {gt } is an i.i.d. stochastic process modeling the fading effects and {nt } is the additive white Gaussian noise with zero-mean and known variance σn2 . The channel input st must satisfy an average power constraint, i.e., E{s2t } ≤ P . We also assume that x0 , g0 , n0 , g1 , n1 , . . . are independent. In the paper, it is assumed that after each transmission, the instantaneous value of the fading factor gt is known to the decoder, which is a reasonable assumption for slowly varying channels with channel estimation [9]. The instantaneous Shannon channel capacity is ct = gt2 P  1 with ct being measured in nats/transmission. 2 2 ln 1 + σn The feedback configuration among the plant, the sensor and the controller, and the channel encoder/decoder structure are depicted in Fig. 1. In this paper, we try to find requirements Plant Controller/Decoder Fig. 1. Sensor/Encoder Network control structure over power constraint fading channel on the power constrained fading channel such that there exists a pair of causal encoder/decoder {ft }, {ht } that can mean square stabilize the LTI dynamics (1), i.e., to render limt→∞ E{xt x0t } = 0. To solve this problem, the following preliminaries are needed, which are borrowed from [7]. Throughout the paper, a sequence {χi }ti=0 is denoted by χt ; random variables are denoted by uppercase letters, and their realizations by lower case letters. All random variables are assumed to exist on a common probability space with measure P. The probability density of a random variable X in Euclidean space with respect to Lebesgue measure on the space is denoted by pX , and the probability density of X conditioned on the σ-field generated by the event Y = y by pX|y . Let the expectation operator be denoted by E, and the expectation conditioned on the event Y = y by Ey . We use log to denote the logarithm to the base two, and ln to denote the natural logarithm. The differential entropy of X is defined by H(X) = −E{lnpX }, provided that the defining integral exists. Denote the conditional entropy of X given the event Y = y by Hy (X) = H(X|Y = y) = −Ey {lnpX|y }, and the random variable associated with Hy (X) by HY (X). The average conditional entropy of X given the event Y = y and averaged over Y is defined by H(X|Y ) = E{HY (X)}, and the average conditional entropy of X given the events Y = y and Z = z and averaged only over Y by Hz (X|Y ) = Ez {HY,Z (X)}. The conditional mutual information between two random variables X and Y given the event Z = z is defined by Iz (X; Y ) = Hz (X) − Hz (X|Y ). Given a random variable X ∈ Rn with entropy H(X), the entropy 2 1 e n H(X) . Denote the power of X is defined by N (X) = 2πe conditional entropy power of X given the event Y = y by 2 1 e n Hy (X) , and the random variable associated Ny (X) = 2πe with Ny (X) by NY (X). The average conditional entropy power of X given the event Y = y and averaged over Y is defined by N (X|Y ) = E{NY (X)}, and the average conditional entropy power of X given the events Y = y and Z = z and averaged only over Y by Nz (X|Y ) = Ez {NY,Z (X)}. The following lemma shows that the entropy power of a random variable provides an estimation of the lower bound for its variance. Lemma 1 ([7]): Let X be an n-dimensional random variable. Then Ny (X) ≤ n1 Ey {kXk2 }. Lemma 2: Let X be an n-dimensional random variable, f (X) be a function of X, and Y = f (X) + N with N being a random variable that is independent with X. Then I(X; Y ) = I(f (X); Y ). Proof: Since H(Y |X) = H(Y |X, f (X)) ≤ H(Y |f (X)), we have H(Y ) = I(X; Y ) + H(Y |X) ≤ I(X; Y ) + H(Y |f (X)). Thus H(Y ) − H(Y |f (X)) = I(Y ; f (X)) ≤ I(X; Y ). Besides, noting that X → f (X) → Y forms a Markov chain, the data processing inequality [10] implies that I(X; Y ) ≤ I(f (X); Y ). Combining the two facts, we have I(X; Y ) = I(f (X); Y ). Remark 1: Lemma 2 indicates that for the AWGN channel, the amount of information that the channel output contains about the source is equal to the amount of information that the channel output contains about the channel input. III. S CALAR S YSTEMS To better convey our ideas, we start with scalar systems. Consider the following scalar system xt+1 = λxt + ut E{x20 } σx20 . (3) where |λ| ≥ 1 and = With the communication channel given in (2), the stabilizability result is stated in the following theorem. Theorem 1: There exists a causal encoder/decoder pair {ft }, {ht }, such that the system (3) can be stabilized over the communication channel (2) in mean square sense if and only if 1 σ2 log|λ| < − logE{ 2 n 2 } (4) 2 σn + gt P Theorem 1 indicates that the mean square capacity of the power constraint fading channel is CMSC = σ2 − 12 logE{ σ2 +gn 2 P }. In the following, we will prove the n t necessity and sufficiency of Theorem 1, respectively. The proof essentially follows the same steps as in [11], [7], [12], however, with some differences due to the channel structure. A. Proof of Necessity The proof of necessity follows from the intuition below. In view of Lemma 1, the entropy power provides a lower bound for the mean square value of the system state. We thus can use the average entropy power as a measure of the uncertain region of the system state and analyze its update. At time t, the controller maintains a knowledge of the uncertain region of xt . When it takes action on the plant, the average uncertain region of xt+1 predicated by the controller is expanded to λ2 times that of xt . This is the iteration we term as dynamics update, which describes the update of the uncertain region of x maintained by the controller from time t to t + 1. After receiving information about xt+1 from the sensor through the communication channel, the controller can reduce the predication error of the uncertain region of xt+1 by a factor σ2 of E{ σ2 +gn 2 P }. This is the iteration we term as communin t cation update, which describes the update of the uncertain region of x maintained by the controller at time t + 1 after it has received the information about xt+1 from the sensor through the communication channel. Thus to ensure mean σ2 square stability, the average expanding factor λ2 E{ σ2 +gn 2 P } n t of the system state’s uncertain region should be smaller than one, which gives the necessary requirement in Theorem 1. The formal proof is stated as follows. Here we use the uppercase letters X, S, R, G to denote the random variables of the system state, the channel input, the channel output and the channel fading coefficient. We use the lowercase letters x, s, r, g to denote their realizations. 1) Communication Update: The average entropy power of Xt conditioned on (Rt , Gt ) is N (Xt |Rt ,Gt )=E{NRt ,Gt (Xt )}(a) = (b) E{E{NRt ,Gt (Xt )|Rt−1 ,Gt }} = ≥e 2E{HRt ,Gt (Xt )|Rt−1 =r t−1 ,Gt =g t } (d) = e2H(Xt |Rt ,R t−1 (e) = e2(H(Xt |R t−1 (f ) t−1 (g) t−1 = e2(H(Xt |R ≥ e2(H(Xt |R (h) =r t−1 ,Gt =g t ) =r t−1 ,Gt =g t )−I(Xt ,Rt |Rt−1 =r t−1 ,Gt =g t )) =r t−1 ,Gt =g t )−I(St ,Rt |Rt−1 =r t−1 ,Gt =g t )) =r t−1 ,Gt =g t )−ct ) t−1 t−1 t−1 t−1 = e−2ct e2H(Xt |R =r ,G =g ) where (c) follows from Jensen’s inequality; (d) follows from the definition of conditional entropy; (e) follows from the definition of conditional mutual information; (f ) follows from Lemma 2; (g) follows from the definition of channel capacity, i.e., I(St , Rt |Rt−1 = rt−1 , Gt = g t ) ≤ ct and (h) follows from the fact that Gt is independent with 2H (X ) 1 E{e−2Ct e Rt−1 ,Gt−1 t }= Xt , we have N (Xt |Rt ,Gt )≥ 2πe 2 σn t−1 t−1 E{ 2 2 }N (Xt |R ,G ). σ +g P n t t t t B. Proof of Sufficiency To prove the sufficiency, we need to construct a pair of encoder and decoder. The encoder and decoder are designed following an ”estimation then control” strategy. The controller consecutively estimates the initial state x0 by using the received information from the channel and then applies an equivalent control to the plant. The reason for adopting such strategy is explained as follows. The response of the linear Pt−1 system is xt = λt (x0 − x̂t ) with x̂t = − i=0 λ−1−i ui , which means E{x2t } = λ2t E{(x0 − x̂t )2 }. We can treat x̂t as an estimate of the controller for the initial state x0 . If the estimation error E{(x0 − x̂t )2 } converges to zero at a speed that is greater than λ2 , i.e., there exists η > λ2 and α > 0, such that E{(x0 − x̂t )2 } ≤ ηαt , the mean square value of the  2 t system state would be bounded by E{x2t } ≤ α λη . Thus lim E{x2t } = 0, i.e., system (3) is mean square stable. This t→∞ intuition can be formalized using the following lemma. Lemma 3 ([12]): If there exists an estimation scheme x̂t for the initial system state x0 , such that the estimation error et = x̂t − x0 satisfies the following property, 2H t (Xt ) 1 R ,Gt |Rt−1 ,Gt }} 2πe E{E{e where (a) follows from the law of total expectation and (b) follows from the definition of entropy power. Since E{e2HRt ,Gt (Xt ) |Rt−1 = rt−1 , Gt = g t } (c) t 2) Dynamics Update: Since e2H(Xt+1 |R =r ,G =g ) = t t t t t t t t (i) (j) e2H(λXt +Ut |R =r ,G =g ) = e2H(λXt |R =r ,G =g ) = t t t t t t t t e2H(Xt |R =r ,G =g )+2 ln |λ| = λ2 e2H(Xt |R =r ,G =g ) where (i) follows from the fact that ut = ht (rt , g t ) and (j) follows from Theorem 8.6.4 in [10], we have N (Xt+1 |Rt ,Gt )≥ n o 2 2HRt ,Gt (Xt ) 1 E 2πe λ e =λ2 N (Xt |Rt ,Gt ). 3) Proof of Necessity: Combining the results of communication update and dynamics update, we have σ2 N (Xt+1 |Rt ,Gt )≥λ2 E{ 2 n 2 }N (Xt |Rt−1 ,Gt−1 ). In view of σn +gt P Lemma 1, N (Xt+1 |Rt , Gt ) should converge to zero σ2 asymptotically. Thus λ2 E{ σ2 +gn 2 P } < 1, which is (4) and n t this proves the necessity. lim A t→∞ t E{et } 0 E{et et }(A0 )t =0 (5) =0 (6) then the system (1) can square stabilized  be mean  by the Pt t t−i controller ut = K A x̂t + i=1 A Bui−1 with K being selected such that A + BK is stable. When gt is known at the receiver, channel (2) resembles an AWGN channel. Shannon shows that when estimating a Gaussian random variable through an AWGN channel, the minimal mean square estimation error can be attained by using linear encoders and decoders, respectively [13]. And P σ2 the minimal mean square error variance is given by σ2 +gn2 P . n t Thus through one channel use, we can at best decrease the 2 σ estimation error by a factor of σ2 +gn 2 P . Since gt is i.i.d., n t we can transmit the estimation error from the decoder to the encoder and iteratively conduct the minimal mean square estimation process. Then the estimation error would decrease σ2 σ2 on average at a speed of E{ σ2 +gn 2 P }. If λ2 E{ σ2 +gn 2 P } < n n t t 1, in view of Lemma 3, system (3) can be mean square stabilized. The estimation strategy actually follows the principle of the well-known scheme of Schalkwijk [14], which utilizes the noiseless feedback link to consecutively refine the estimation error. The detailed encoder/decoder design and stability analysis are given as follows. 1) Encoder/Decoder Design: Suppose the estimation of x0 formed by the decoder is x̂t at time t and the estimation error is et = x̂t − x0 . The encoder is designed as s P x0 s0 = σx20 s (7) P st = (x̂t−1 − x0 ) , t ≥ 1 σe2t−1 The decoder is designed as r σx20 x̂0 = r0 P E{rt et−1 |gt } rt , t ≥ 1 x̂t = x̂t−1 − E{rt2 |gt } (8) with σe2t−1 representing the variance of et−1 . 2) Proof of Sufficiency: Since r0 = g0 s0 + n0q , in view σ2 x0 of (7) and (8), we have e0 = (g0 − 1)x0 + P n0 . Because g0 , x0 , n0 are independent and x0 , n0 follows a zero mean Gaussian distribution, we know that the conditional probability distribution of e0 given the event g0 is Gaussian σ2 σ2 and E{e0 |g0 } = 0, E{e20 |g0 } = (g0 − 1)2 σx20 + xP0 n . Thus E{e0 } = E{E{e0 |g0 }} = 0 and E{e20 } = E{E{e20 |g0 }} = σ2 σ2 σ2 IV. V ECTOR S YSTEMS E{(g0 − 1)2 }σx20 + xP0 n . For t ≥ 1, in view of (7) and (8), we have For vector systems, the situation becomes complicated by the fact that we have n sources xi,0 and only one channel, where xi,0 denotes the i-th element of x0 . Firstly, we would analyze the achievable minimal mean square estimation error for estimating x0 over the channel (2) during one channel use. Consider the following Markov chain E{rt et−1 |gt } et = et−1 − rt E{rt2 |gt } s  E{rt et−1 |gt } P E{rt et−1 |gt }  et−1 − nt = 1 − gt σe2t−1 E{rt2 |gt } E{rt2 |gt } Thus the conditional probability distribution for et given the event gt is Gaussian. We also have E{et } = E{E{et |gt }} s n o P E{rt et−1 |gt }  E{e |g } = E 1 − gt t−1 t σe2t−1 E{rt2 |gt } s n P E{rt et−1 |gt } o (a) = E 1 − gt E{et−1 } 2 σet−1 E{rt2 |gt } where (a) follows from the fact that gt is independent with et−1 . Since E{e0 } = 0, we further know that E{et } ≡ 0. The sufficient condition (5) is satisfied. Since et−1 , gt and nt are independent, we have E{e2t−1 |gt } = E{e2t−1 } q and E{n2t |gt } = E{n2t }, which im 2 plies E{rt2 |gt } = E gt σ2P et−1 +nt |gt = σn2 +gt2 P   et−1 q and E{rt et−1 |gt } = E et−1 gt σ2P et−1 + nt |gt = et−1 q 2 t et−1 |gt } gt P σe2t−1 . Since E{e2t |gt } = E{e2t−1 |gt } − E{rE{r , 2 |g } t t we also have σ2 E{e2t−1 } σ2 +gn 2 P n t E{e2t |gt } = E{e2t−1 } , which implies E{e2t } σ2 E{e2t−1 }E{ σ2 +gn 2 P }. Thus if λ2 E{ σ2 +gn 2 P } < 1, the den n t t signed encoder/decoder pair can guarantee (6). In view of Lemma 3, the sufficiency of Theorem 1 is proved. Remark 2: We can show that CMSC is smaller than the Shannon capacity, which is CShannon = E{ct } [9]. From Jensen’s inequality, we know that E{2−2ct } ≥ 2−2E{ct } and the equality holds if and only if ct is a constant. Thus 1 1 ≤ 12 log 2−2E{c it follows that CMSC = 12 log E{2−2c = t} t} E{ct } = CShannon and the equality holds if and only if ct is a constant. Remark 3: By letting gt in (4) be the Bernoulli distribution with failure probability , and taking the limit σn2 → 0 and P → ∞, we can show that the necessary and sufficient condition to ensure mean square stabilizability for the real erasure channel is  < λ12 , which recovers the result in [5]. If we let gt be a constant with gt = 1, then the studied power constrained fading channel degenerates to the AWGN channel and the (4) degenerates to 21 log(1 + σP2 ) < log|λ|, n which recovers the result in [4], [6]. If σn2 = 0 and the event gt = 0 has zero probability measure, the right hand side of (4) becomes infinity. Then for any λ, (4) holds automatically. This is reasonable since we have assumed that gt is known at the decoder side, thus if there is no additive noise, the channel resembles a perfect communication link. Since (3) is controllable, we can always find a pair of encoder and decoder to stabilize the system. g 2 P E{e2 } − tσ2 +g2t−1 n tP = E{E{e2t |gt }} = = X0 → St = ft (X0 ) → Rt → X̂t = ht (Rt ) where X0 ∈ Rn denotes the Gaussian initial state with covariance matrix Σx0 ; ft (·) is a scalar-valued function denoting the channel encoder for (2); Rt denotes the channel output and X̂t is the estimation of X0 formed by the decoder with decoding rule ht (·). Denote the estimation error as et = X0 − X̂t , in view of 2 1 e n H(et |Rt ) . Since Lemma 1, we have n1 trE{et e0t } ≥ 2πe H(et |Rt ) = H(X0 − ht (Rt )|Rt ) = H(X0 |Rt ) = H(X0 ) − I(X0 ; Rt ) (a) = H(X0 ) − I(ft (X0 ); Rt ) 1 1 g2 P ≥ ln((2πe)n det(Σx0 )) − ln(1 + t 2 ) 2 2 σn where (a) follows from Lemma 2, thus we have trE{et e0t } ≥ n det(Σx0 )  n1 σn2 gt2 P + σn2 From the above inequality, we know that the minimal mean 2 σn square error is given in terms of g2 P +σ 2 . However, this t n is only for the sum of the estimation errors ei,t with ei,t being the i-th element of et . There is no indication on the convergence speed for every single ei,t . Lemma 3 implies that we should design the encoder/decoder to render that 2 limt→∞ λ2t i E{ei,t } = 0 for all i, which places separate requirements for the convergence speed of each ei,t . Thus we need to optimally allocate channel resources to each unstable state variable. The previous analysis also implies that we should treat the unstable modes of A separately. Here we focus on the real Jordan canonical form of system (1). Let λ1 , . . . , λd be the distinct unstable eigenvalues (if λi is complex, we exclude from this list the complex conjugates λ∗i ) of A in (1), and let mi be the algebraic multiplicity of each λi . The real Jordan canonical form J of A then has the block diagonal structure J = diag(J1 , . . . , Jd ) ∈ Rn×n , where the block Ji ∈ Rµi ×µi and detJi = λµi i , with  mi if λi ∈ R µi = 2mi otherwise It is clear that we can equivalently study the following dynamical system instead of (1) xk+1 = Jxk + T Bui (9) for some similarity matrix T . Let U = {1, . . . , d} denote the index set of unstable eigenvalues. Theorem 2: There exists a causal encoder/decoder pair {ft }, {ht }, such that the LTI dynamics (1) can be stabilized over the communication channel (2) in mean square sense if d X σ2 1 µi log|λi | < − logE{ 2 n 2 } 2 σn + gt P i=1 (10) and only if (log|λ1 |, . . . , log|λd |) ∈ Rd satisfy that for all vi ∈ {0, . . . , mi } and i ∈ U X   v1 v σn2 (11) ai vi log|λi | < − logE 2 σn2 + gt2 P i∈U P where v = i∈U ai vi , and ai = 1 if λi ∈ R, and ai = 2 otherwise. Proof: For the proof of necessity, notice that each block Ji has an invariant real subspace Avi of dimension ai vi , for any vi ∈ {0, . . . , mi }. Consider the subspace A formed by taking the product of the invariant subspaces Avi for each total dimension of A is P real Jordan block. The V v = a v . Denote by x of the components of x i∈U i i belonging to A. Then xV evolves as V V xV k+1 = J xk+1 + QT uk (12) Πi∈U λai i vi . where Q is a transformation matrix and detJ V = Since Xk is mean square stable, it is necessary that the subdynamics (12) is mean square stable. Similar to the necessity proof in Theorem 1, we may derive the necessary condition (11). And this completes the proof of necessity. Here we prove the sufficiency using the idea of Time Division Multiple Access (TDMA). Based on the previous encoder/decoder design for scalar systems, the following information transmission strategy is designed for the vector system. Without loss of generality, here we assume that λ1 , . . . , λd are real and mi = 1. For other cases, readers can refer to the analysis discussed in Chapter 2 of [1]. Specifically, under this assumption, J is a diagonal matrix and d = n. The sensor transmits periodically with a period of τ . During one channel use, the sensor only transmits the estimation error of the j-th value of x0 using the scheme devised for scalar systems. The relative transmission frequency for the jth value of x0Pis scheduled to be αj among the τ transmission n period with j=1 αj = 1. The receiver maintains an array that represents the most recent estimation of x0 , which is set to 0 for t = 0. When the information about the j-th value of x0 is transmitted, only the estimation of the j-th value of x0 is updated at the decoder side, and the other estimation values remain unchanged. After updating the estimation, the controller takes action as the one designed in Lemma 3. If the diagonal elements of At E{et e0t }(A0 )t converge to zeros 2 asymptotically, i.e., for i = 1, . . . , n, limt→∞ λ2t i E{ei,t } = 0 , the conditions in Lemma 3 can be satisfied. Since the transmission is scheduled periodically, we only need to require that limk→∞ λ2kτ E{e2i,kτ } = 0, ∀i = 1, . . . , n. Following i our designed transmission scheme, we have E{e2i,kτ } = σ2 σ2 E{ σ2 +gn 2 P }αi kτ E{e2i,0 }. If λ2i E{ σ2 +gn 2 P }αi < 1 for all n n t t i = 1, . . . n, the sufficient condition in Lemma 3 can be satisfied. To complete the proof, we only need to show the σ2 equivalence between the requirement λ2i E{ σ2 +gn 2 P }αi < 1 n t P n for all i = 1, . . . n and (10). On one hand, since i=1 αi = 2 σ 1, if λ2i E{ σ2 +gn 2 P }αi < 1 for all i = 1, . . . n, we know that n t (10) holds. On the other hand, if (10) holds, we can simply log|λ i| choose αi = P log|λ , which satisfies the requirement that i| i 2 Pn σn 2 αi < 1 for all i = 1, . . . , n. 2 +g 2 P } i=1 αi = 1 and λi E{ σn t The sufficiency is proved. V. N UMERICAL I LLUSTRATIONS A. Scalar Systems The authors in [8] derive the mean square capacity of a power constrained fading channel with linear encoders/decoders. The necessary and sufficient condition for µ2 P scalar systems is 12 log(1 + σ2 Pg+σ2 ) > log|λ| with µg and g n σg2 being the mean and variance of gt . We can similarly define the mean square capacity of the power constrained fading channel with linear encoders/decoders as CMSL = µ2g P 1 2 ). Simply assume that the fading follows 2 log(1 + σg2 P +σn the Bernoulli distribution with failure probability , then the Shannon capacity, the mean square capacity achievable with causal encoders/decoders and the mean square capacity achievable with linear encoders/decoders are given as 2  σn +P  P 1 , CShannonBD = 1− 2 , CMSCBD = − 2 log 2 +P 2 log 1+ σn σn (1−)2 P  1 2 CMSLBD = 2 log 1 + (1−)P +σ2 . For fixed P and σn , n the channel capacities are functions of . Let P = 1 and σn2 = 1, the channel capacities in relation to the erasure probability are plotted in Fig. 2. It is clear that CShannonBD ≥ CMSCBD ≥ CMSLBD at any given erasure probability . This 0.08 0.5 Capacity Channel 0.4 Necessity in Theorem 2 0.3 CShannon Sufficiency in Theorem 2 0.06 0.2 CMSC 0.1 the Necessary and Sufficient Condition in Theorem 3.1 in [8] 0.0 0.2 0.4 0.6 0.8 1.0 log|λ2 | CMSL 0.0 0.04 Erasure Probability ϵ Fig. 2. 2 =1 Comparison of different channel capacities when P = 1, σn result is obvious since we have proved that the Shannon capacity is no smaller than the mean square capacity with causal encoders/decoders. Besides, we have more freedom in designing the causal encoders/decoders compared with the linear encoders/decoders, thus allowing to achieve a higher capacity. The three kinds of capacity degenerate to the same when  = 0 and  = 1, which represent the AWGN channel case and the disconnected case respectively. B. Vector Systems the two dimensional LTI system (9) with J =  λConsider  1 0 , and the communication channel is (2) in which 0 λ2 the fading follows the Bernoulli distribution with failure probability . In view of Theorem 2, a sufficient condition to ensure mean square stabilizability is that (log|λ1 |, log|λ2 |) should lie in the region of log|λ1 | + log|λ2 | < CMSCBD . The necessary requirement is given by the following region in (log|λ1 |, log|λ2 |) plane   log |λ1 | < CMSCBD , log |λ2 | < CMSCBD σn2  21   log |λ1 | + log |λ2 | < − log  + (1 − ) σn2 + P The necessary and sufficient condition to ensure mean square stability using linear encoders/decoders for this system is given in [8], which states that (log|λ1 |, log|λ2 |) should be in the region constrained by log|λ1 | + log|λ2 | < CMSLBD . Selecting P = 1, σn2 = 1 and  = 0.8, we can plot the regions for (log|λ1 |, log|λ2 |) indicated by the sufficiency and necessity in Theorem 2 and that indicated in Theorem 3.1 in [8] in Fig. 3. We can observe that the region of (log|λ1 |, log|λ2 |) that can be stabilized with the designed causal encoders/decoders in Section IV is much larger than that can be stabilized by linear encoders/decoders in [8]. Thus by extending endocers/decoders from linear settings to causal requirements, we can tolerate more unstable systems. VI. C ONCLUSION This paper characterized the requirement for a power constrained fading channel to allow the existence of a causal encoder/decoder pair that can mean square stabilize a discretetime LTI system. The mean square capacity of the power constrained fading channel with causal encoders/decoders was given. It was shown that this mean square capacity is smaller than the Shannon capacity and they coincide with each other for some special situations. Throughout the paper, the capacity was derived with the assumption that there 0.02 0.00 0.00 0.02 0.04 0.06 0.08 log|λ1 | Fig. 3. Stability region of (log|λ1 |, log|λ2 |) indicated by Theorem 2 for a vector system exists a perfect feedback link from the channel output to the channel input. What would the capacity be for power constrained fading channels when there is no such feedback link or there is only a noisy feedback link is still under investigation. R EFERENCES [1] G. Como, B. Bernhardsson, and A. Rantzer, Information and Control in Networks. New York: Springer, 2014. [2] G. N. Nair and R. J. Evans, “Stabilizability of stochastic linear systems with finite feedback data rates,” SIAM Journal on Control and Optimization, vol. 43, no. 2, pp. 413–436, 2004. [3] A. Matveev and A. Savkin, “An analogue of shannon information theory for detection and stabilization via noisy discrete communication channels,” SIAM Journal on Control and Optimization, vol. 46, no. 4, pp. 1323–1367, 2007. [4] A. Sahai and S. Mitter, “The necessity and sufficiency of anytime capacity for stabilization of a linear system over a noisy communication link - part i: Scalar systems,” IEEE Transactions on Information Theory, vol. 52, no. 8, pp. 3369–3395, 2006. [5] N. Elia, “Remote stabilization over fading channels,” Systems & Control Letters, vol. 54, no. 3, pp. 237–249, 2005. [6] J. H. Braslavsky, R. H. Middleton, and J. S. Freudenberg, “Feedback stabilization over signal-to-noise ratio constrained channels,” IEEE Transactions on Automatic Control, vol. 52, no. 8, pp. 1391–1403, 2007. [7] J. S. Freudenberg, R. H. Middleton, and V. Solo, “Stabilization and disturbance attenuation over a gaussian communication channel,” IEEE Transactions on Automatic Control, vol. 55, no. 3, pp. 795–799, 2010. [8] N. Xiao and L. Xie, “Analysis and design of discrete-time networked systems over fading channels,” in Proceedings of the 30th Chinese Control Conference, (Yantai, China), pp. 6562–6567, 2011. [9] A. J. Goldsmith and P. P. Varaiya, “Capacity of fading channels with channel side information,” IEEE Transactions on Information Theory, vol. 43, no. 6, pp. 1986–1992, 1997. [10] T. M. Cover and J. A. Thomas, Elements of information theory. Hoboken, N.J. : Wiley-Interscience, 2006. [11] P. Minero, M. Franceschetti, S. Dey, and G. N. Nair, “Data rate theorem for stabilization over time-varying feedback channels,” IEEE Transactions on Automatic Control, vol. 54, no. 2, pp. 243–255, 2009. [12] U. Kumar, J. Liu, V. Gupta, and J. Laneman, “Stabilizability across a gaussian product channel: Necessary and sufficient conditions,” IEEE Transactions on Automatic Control, vol. 59, pp. 2530–2535, Sept 2014. [13] A. Gattami, “Kalman meets shannon,” in Proceedings of the 19th IFAC World Congress, (Cape Town, South Africa), pp. 2376–2381, 2014. [14] J. Schalkwijk and T. Kailath, “A coding scheme for additive noise channels with feedback–i: No bandwidth constraint,” IEEE Transactions on Information Theory, vol. 12, no. 2, pp. 172–182, 1966.
3cs.SY
Extending programs with debug-related features, with application to hardware development Nik Sultana[ Salvator Galea[ David Greaves[ Marcin Wójcik[ Noa Zilberman[ Richard Clegg] Luo Mai\ Richard Mortier[ Peter Pietzuch\ Jon Crowcroft[ Andrew W Moore[ arXiv:1705.09902v1 [cs.PL] 28 May 2017 [ Cambridge University \ Imperial College, London Abstract The capacity and programmability of reconfigurable hardware such as FPGAs has improved steadily over the years, but they do not readily provide any mechanisms for monitoring or debugging running programs. Such mechanisms need to be written into the program itself. This is done using ad hoc methods and primitive tools when compared to CPU programming. This complicates the programming and debugging of reconfigurable hardware. We introduce Program-hosted Directability (PhD), the extension of programs to interpret direction commands at runtime to enable debugging, monitoring and profiling. Normally in hardware development such features are fixed at compile time. We present a language of directing commands, specify its semantics in terms of a simple controller that is embedded with programs, and implement a prototype for directing network programs running in hardware. We show that this approach affords significant flexibility with low impact on hardware utilisation and performance. Keywords debugging, FPGA, program directing, profiling, high-level synthesis, aspect-oriented programming 1. Introduction When debugging and monitoring programs running on microprocessors we usually benefit from hardware support that is leveraged by an Operating System to inspect and modify running processes (Gagnon et al. 2007). But when a program is run on reconfigurable hardware platforms, one does not usually have an operating system, a notion of process, nor any hardware support for debugging. Programs must contain additional logic to enable debugging, monitoring, and profiling during their execution, because the environment does not provide visibility into running programs by default. Field-Programmable Gate Array devices (FPGAs) are a form of programmable hardware consisting of a grid of logic blocks whose function and wiring can be flexibly reconfigured. FPGAs are used to perform functions for which a full-featured general-purpose CPU is not appropriate. For such functions, FPGAs can operate at a higher throughput and consume much less electricity than CPUs (Mittal 2014, ] Queen Mary University, London §4.4). This makes FPGAs especially appealing for some problems and environments, a recent example being datacentres (Putnam et al. 2014). Despite their appeal as a computing device, the programmability of FPGAs has been hampered by the need for low-level hardware-description languages traditionally used to program them, such as Verilog and VHDL, which “requires programmers to assume the role of hardware designers” (So et al. 2002). Research has yielded various approaches for high-level synthesis (HLS): this tends to consist of using (fragments of) existing languages, such as C or Java, to describe hardware. In addition to a programmability gap between FPGAs and CPUs, there is a debuggability gap that has received far less attention. The programmability of FPGAs has improved over the years, but they are not debuggable by default (Potkonjak et al. 1995). FPGAs provide no visibility into the running program, and their standard tooling provides very limited support for this. For full visibility one could simulate the program, (e.g., on a workstation) but the simulation can be slower by a factor of 106 (Camera et al. 2005) because of the sheer amount of detail that must be simulated. In this paper we propose to improve the debuggability of programs running on FPGAs by using a domain-specific control language inspired by program directing (Sosič 1992) to generate in-program support for debugging. In addition to debugging, this can be used to monitor and profile programs. We call our approach Program-hosted Directability (PhD). It involves extending the user’s program to service direction commands at runtime. Extending the program involves inserting (i) named extension points which can contain runtime-modifiable code in a computationally weak language (no recursion), and (ii) state to be used for bookkeeping by that code, to implement direction features. For example, the direction command “trace X max_trace_idx” (where X is a variable in the program’s source code) logs updates made to a variable, and appends these updates to a buffer (of size “max_trace_idx” for later inspection). We translate this command into (i) a snippet that gets injected into the program (Figure 1) and (ii) a modification of the program to allocate space for this snippet, if V_trace_idx < max_trace_idx then V_trace_buf [ V_trace_idx ] := V; inc V_trace_idx ; continue else inc V_trace_overflow ; break Figure 1. Code that implements the direction command “trace X max_trace_idx”. If the buffer is not full then the new value of X is logged, the index incremented, and control is handed back to the program that hosts this code. Otherwise indicate depletion of the associated buffer resource and break the program’s execution. and for state require by this snippet: such as the variable V_trace_idx, and array V_trace_buf. More examples are given in §3, and the overall scheme is shown in Figure 2. Idiomatic direction features (such as tracing, breakpoints, etc) are compiled down to a weak language and executed by an interpreter embedded in the program. For consistency with the description of the interpreter’s behaviour as hardware, we refer to it as a controller. The controller is invoked by extension points, which are inserted into the program through transformation. In the above example, the extension points would be added after each update to a variable, to ensure that the update is considered for logging. Extension points are added at compile time depending on what direction commands we want to support at runtime. For example, starting with the sequence of statements . . . ; si ; si+1 ; . . . we insert two extension points @L and @M , resulting in the program . . . ; si ; @L; si+1 ; @M ; . . .. When extension point L is reached at runtime, a stored procedure associated with L is executed by the controller. This procedure ultimately hands back control to the host program, or starts an interactive session with a program director, which can send the controller further commands, and update its stored procedures. Our work systematises ad hoc debugging and profiling extensions to programs, and generalises the facilities currently made available for hardware development. Moreover, we can include only the features needed, thus improving the utilisation of the hardware, and its power consumption. The approach is extensible: one can code additional direction commands, or variations (§3.3). In this paper we show how to give semantics to program direction commands in terms of the placement of extension points, the code that is to be run by the controller, and the interaction between the controller and the direction tool that manages it. We prototype PhD using an HLS and obtain a uniform interface for directing the software and hardware instances of the same program, allowing us to unify the debugging of these instances (which otherwise require diverse tools). We believe that PhD can yield practical benefits in hardware development and deployment. As a technique, PhD is vendor-neutral and compiler-neutral, and the communica- Original program behaviour (Normal interaction with external world) Program Hosted directability Controller Director Figure 2. A controller is embedded into the program, and acts as the agent of the director. The director and controller implement a protocol to exchange commands and their outputs. tion between the director and controller can be adapted to suit the program. For example, in our prototype we send direction commands via the network. PhD can be implemented in different ways: in our prototype we implemented it entirely in a high-level language via HLS, but one could also bolt it onto more finely engineered hardware blocks. Despite running as hardware, the directability features can be enabled and reconfigured at runtime: this consists of updating the code stored by the controller. In contrast, existing techniques for FPGAs involve including fixed function circuits in the design. Finally, PhD extends a program with a direction mode, thus facilitating the in-field debugging of programs. Through PhD we hope to contribute to the convergeance between the debuggability of programs on FPGAs, and those on CPUs, which enjoy extensive hardware and OS support, and which in turn benefits sophisticated monitoring systems such as DTrace (Gregg and Mauro 2011). The ideas described in this paper are not necessarily tied to the languages, compilers, FPGA or other equipment we used in our prototype. We make the following contributions: • We describe how to translate familiar high-level idioms for debugging, profiling and monitoring (§3.1), which we call direction commands, into a low-level language for controlling program state at runtime (§3.2), for an example language §3.4.1. • We relate the direction commands with our low-level lan- guage through a specification (§3.4) in which programs are ordered by the directability features they support. This provides a basis on which we can reason that one program is “more debuggable” than another at runtime. • A prototype implementation and its evaluation (§4), where we measure the effect of directability on FPGA utilisation and performance. 2. FPGA debugging gap Irrespective of how we write our program as a hardware description, once a so-called “bitstream” is generated that configures an FPGA to run our program, the program can only be tested as a black box, and we cannot understand or further influence its behaviour at that stage. The need for better FPGA debugging features is becoming more urgent since: • FPGA chips are getting larger, which allows them to run more complex programs. Complex programs are more likely to be buggy, which necessitates more debugging. • FPGAs are also used for simulating hardware designs, since behavioural simulations are very slow. (Wang et al. 2011; Chu et al. 2015) • FPGAs are being deployed in large production environ- ments, such as Microsoft’s datacentres (Putnam 2014). Hardware development has driven the development of formal methods to establish system correctness (Fix 2008), which enabled the development for methods for software (Ball et al. 2006; Godefroid et al. 2012). Unfortunately the verification is done on the Register-Transfer Level (RTL), a higher-level description of a hardware circuit in languages such as Verilog, and not on the generated bitstream. Thus debugging may still be needed. 2.1 Debugging(FPGA) != Debugging(CPU) Debugging concepts from software do not correspond directly with debugging the same program on an FPGA. A lot of the core issues involved were discussed in the pioneering work of Koch et al. (1998) and in many other work on HLS debugging (Goeders and Wilton 2014; Monson and Hutchings 2015). These are the main points: • Multiple source lines might be executed concurrently in hardware. Code is represented at the source, registertransfer, and gate levels. This has important consequences for debugging, described in the following points. The correspondence between these levels necessitates keeping metadata from compilation for debugging. • Depending on the debugged artefact, stepping by (source) line might be less useful than stepping by cycle. • Breakpoints become more tricky to interpret, since they are usually set on a specific line of code. In hardware there may be several overlapping lines being executed at a breakpoint (Koch et al. 1998, §4.3). Moreover, the output of operations on previous lines might only be available after some clock cycles have elapsed. Depending on what the user wishes to do, they might prefer if the breakpoint is triggered after the elapsing of these cycles. Furthermore, part of the next line of source code might have started executing. This suggests that a strict indication of sequentiality needs to be communicated to the HLS compiler if the usual breakpoint semantics are desired. • As mentioned in the introduction, FPGAs do not provide hardware support such as debug registers to assist with analysing running programs. 2.2 Current techniques for FPGA debugging Some existing techniques help narrow the debugging gap on FPGAs. Co-simulation involves comparing the behavioural simulation between HLS and RTL. This can be considered a special case of relative debugging (Sosič and Abramson 1997) but it does not provide visibility into the hardware instance of a program. Another technique involves in-system testing: testing a large part of the system, though possibly not all. This does not provide visibility into the hardware either. Current practice employs two techniques for FPGA debugging. Trace buffers are the most popular technique for debugging FPGAs. It requires a programmer to identify signals of interest in the circuit at compile time, then an embedded logic analyser is synthesised that uses on-chip memory to record traces for these signals. This suffers from two problems: only a limited number of signals may be viewed (limited by on-chip memory), and traces have a limited window size (for the same reason). Traces may be conditional, to avoid using up buffer space unnecessarily, but this technique is difficult to use because it involves generating the bitstream each time. Register scanning allows you to see the values of all registers on the FPGA, but requires “stopping the world” to enable reading and sending it off-chip. This slows down tests, and thus register scanning has been supplanted by trace buffers. Both register scanning and trace buffers usually send recorded data off-chip via the JTAG (Joint Test Action Group) interface, a standardised instrumentation method (Bennetts and Osseyran 1991). This method is not scalable, since its transfer rate is far less than the FPGA throughput. In summary, existing techniques consist of including “fixed function” modules as part of your hardware description at compile time. This has the advantage of being lightweight since these circuits are specialised to perform a single function, but it has the disadvantage of being inflexible. Generating a hardware bitstream can take hours, and the added overhead costs for runtime-reconfigurable debuggability and monitoring features might not be affordable in some use-cases. Furthermore, these techniques cannot be used in production environments. 2.3 High-Level Synthesis (HLS) HLS involves the use of a high-level language, such as Java, C, C++, and OCaml, to write a hardware description. This takes advantage of the features of, and tooling available for, the high-level language. An RTL description is then generated from the high-level description. Using an HLS to describe hardware enables one to run the HLS description as a software program, and to debug it as such, by using standard tools to compile and debug Java programs for instance. This prunes bugs from the eventual bitstream and avoids regenerating the bitstream. Irrespective of whether testing is directed at software or hardware, it can take many tests to find a fault. Software-based testing could help detect logic errors in our code, but it could not help us find some important classes of problems: ‘[Testing in] the silicon mode permits the analysis of bugs that are “invisible” at the RTL level’ (Calagar et al. 2014). We outline the main cases below: 1. Interface mismatch. We need to understand whether a problem occurs because of a mismatch between one module and the rest of the circuit. Recall that behavioural simulation might not be applied to the whole design, and incorrect assumptions about the enclosing circuit can result in the simulation test succeeding but the hardware tests failing. 2. Reproducability. Some faults are triggered during highthroughput tests, and are difficult to find when testing other instances of the program. Other faults result from features of the hardware and transient environmental states – such as “Single Event Effects” manifested through the flipped or stuck bits from the interaction of charged particles with semiconductors (Sari et al. 2014; Krishnaswamy et al. 2008). 3. Toolchain problems. Diagnosing bugs in the compiler toolchain becomes easier if we can see into the compiled program’s operation. Bugs are not unusual in both HLS and RTL toolchains. 2.4 Current research on FPGA debugging Various improvements have been explored for the techniques described above. For example, one could write summaries to the trace-buffer, rather than the explicit trace (Goeders and Wilton 2014). Another idea consists of multiplexing all signals and choosing which to observe at debug time rather than at compile time (Hung and Wilton 2013), enabling “observation without recompilation”. An additional idea is to buffer into a fast external memory (Panjkov et al. 2015). Table 1 surveys closely related work, classifying it according to the features they provide. Related work is contrasted in more detail in §5. In Table 1 extension points means being able to extend the program at certain points at runtime. Interruption refers to asynchronous interruption of a program by a debugger. Fine granularity means that we can look at arbitrary parts of a program; for instance McKechnie et al. (2009) only allow inspecting at the module boundary. Software instance means that the program can be run on the CPU as a process, independent from the FPGA. Network/Control refers to how a technique is implemented: as a control loop or as a network that feeds signals to a logic analyser. Use leftover resource means that the debug circuitry does not compete with the program’s circuit. And embed at Source/HDL refers to whether the source code or its HDL image is updated to include the debug circuitry. 2.5 PhD design features PhD came about after we found ourselves extending our ad hoc debugging and monitoring code to support additional features, instigating us to study the problem more rigorously. Table 1 shows the features supported by PhD. Initially it supported state inspection and update. Updating state enabled us to influence data-dependant control flow. Extending the controller to include branching and extension points en- abled us to support more features, such as assertion checking, which involves breaking if a condition is satisfied. As an idea, PhD is neither committed to HLS nor HDL description. In our prototype we implemented it in HLS for convenience, but often better performance can be gained by relying partly or fully on modules written in HDL. 3. A language and model for program directing In this section we describe D, a language of direction commands that we extracted by analysing the commands commonly given to profilers and debuggers such as gdb.1 In Figure 1 we described one such command and how we code the high-level direction command as a program that will be executed by the controller. 3.1 Direction language D Our direction language D consists of the commands listed in Table 2. These commands can have three kinds of parameters: (i) symbols relating to the program, (such as variable or function names, or labels), (ii) relations over program variables, which we denote by the symbol hBi, indicating the conditions on which statements might apply, and (iii) measures of resource, which we symbolise by h$i, indicating a finite resource that is allocated for the execution of a command. Symbol X is a metavariable ranging over variable identifiers in the source program, and L is a metavariable ranging over labels in the source program. A label is associated with a single position in the program, (e.g., line 5 in function “main”), but a single position might be associated with multiple labels. below. Let DhBi be the set of possible conditions that can be used. We assume that at least true ∈ DhBi. We can also allow additional truth conditions, and in this model we will have (V1 = V2 ) ∈ DhBi for arbitrary V1 , V2 ranging over program values or variables. For example, “watch v (v = 5)” would instruct the controller to watch a variable v, and switch to interactive directing when v = 5. Dh$i ∈ N describes the maximum quantity of some resource when carrying out a direction command. This value must be less than the compile-time allocation of the resource, to ensure the provision of sufficient resource for the command at runtime. This is needed to size the buffers used for tracing. For example, “count reads v true 5000” will count the number of reads of v, and break after 5000 reads have been made. This could be done to avoid overflow, or to capture some behaviour of interest. Similarly, “trace start v true 500” breaks after 500 instances of v have been recorded in the trace. The trace buffer must accommodate at least 500 entries. 1 https://www.gnu.org/software/gdb/ X X X X X X X X X X X X X X X X X X X X X X X X X X C C C N C C C C X embed at Source/HDL use leftover resource X Network/Control X X HLS (vs HDL) X X runtime reconfigurable X X X software instance (see §2.5) PhD X X X X timing checks X X X hang detection X X X X assertion checking X X X X fine granularity extension points X interruption state updating X stepping trace recording X X break points state inspection X X X X X X X Features (Sosič 1992) Dynascope (Goeders and Wilton 2014) HLS-Scope (Calagar et al. 2014) Inspect (Panjkov et al. 2015) (Hung and Wilton 2014) QuickTrace (Koch et al. 1998) SLE/CADDY (Monson and Hutchings 2015) (Curreri et al. 2011) (Camera et al. 2005) BORPH System S H S H H S H H C Table 1. Survey of features provided by debugging systems. Blacked-out boxes mean “not applicable”. Command print X break L hBi unbreak L backtrace h$i watch X hBi unwatch X   reads X hBi h$i  writes X hBi h$i count    calls fname hBi h$i start X hBi h$i      stop X clear X trace   print X    full X Behaviour Print the value of variable X from the source program. Activate a (conditional) breakpoint at the position of label L. Deactivate a breakpoint. Print the “function call stack”. Break when X is updated and satisfies a given condition. Cancel the effect of the “watch” command. Count the reads or writes to a variable X, or the calls to a function fname. Trace a variable, subject to a condition being satisfied, and up to trace some length. Stop tracing a variable. Clear a variable’s trace buffer. Print the contents of a variable’s trace buffer. Check if a variable’s trace buffer is full. Table 2. Directing commands making up language D. Note that count has similar subcommands to those of trace, to clear the counters, get their current value, and find out if a maximum value has been reached. 3.2 Controller High-level direction commands such as those in Table 2 are ultimately translated into programs that run on a simple controller embedded in the program. We model the controller as a CASP machine (for “Counters, Arrays, and Stored Procedures”, the constituents of the machine’s memory). CASP machines are very weak. They are more structurally complex than register machines (Shepherdson and Sturgis 1963) since they have separate memories for storing arrays and registers, but CASP machines are computationally much weaker than register machines, unable to encode partial computable functions. A limited form of memory indirection is permitted through a collection of arrays. The language lacks any means for defining recursive functions, or branching to arbitrary addresses. Any more complex computation must be done by the director; the controller simply provides a controlled access to the program’s memory. We describe the language of CASP programs in Figure 3. We rely on the following meta-variables and syntax categories: P programs, E expressions, I indices, U updatable values, V values, N numerals (corresponding to Z), X variable identifiers, and R the array identifiers, where the names for variables and those for arrays are disjoint, X ∩ R = ∅. @L : {P } is a placement command: it updates the code at extension point having label L to be P . Note that placement commands may not be nested in our model: for instance, this is not a valid program: P ::= E | U := E | op U op ∈ {inc, dec} | P1 ; P 2 | if E then P1 else P2 | break | continue | @L : {P 0 } E I U V ::= V | −V | V1 op V2 op ∈ {=, <} ::= N | X ::= X | R[I] ::= I | R[I] Figure 3. Syntax for CASP programs. @L : {if x = 1 then @M : {break} else @M : {continue}} We do not want to allow programs to be self-modifying in this way, since it complicates reasoning about them. Ending programs. Both continue and break indicate the end of a CASP program, but differ in what happens before resuming the host program (in which the controller is embedded). continue simply resumes where the host program left off, whereas break switches into an interactive direction mode. In this mode, the controller may receive commands from the director, execute them, and send an acknowledgement back. The remaining syntax forms and constants used above are standard and intuitive. Owing to its simplicity the semantics of this language are straightforward, and are given in §C.1. 3.3 Examples CASP programs are to D what microprograms are to an Instruction Set Architecture (Smith and van Leeuwen 1974). We give some examples of coding program direction commands below, before describing the behaviour of program direction commands in more detail in the next two sections. Conditional tracing. Let BASIC represent the program that codes the behaviour of “trace V...” from Figure 1. We can code the conditional variant of this command, for example when V is less than some threshold value V_trace_threshold (and where >= is syntactic sugaring): if V >= V_trace_threshold then continue else BASIC Sampled tracing. The sampled variant involves allocating an additional variable to count the interval between samples, and storing the desired sample interval: if V_trace_samp = 0 then V_trace_samp := V_trace_samp_interval ; BASIC else dec V_trace_samp ; continue Profiling. The command “count writes v” causes a counter to be incremented each time a variable is updated: if V_count_writes > V_count_writes_max then break else inc V_count_writes ; continue Watchpoints. The command “watch v hBi” causes the program to break (for interactive guidance) when a variable’s value satisfies some predicate. Let B be the CASPlevel value to the D-level hBi parameter (we give such a function in §3.5.1). The code is similar to that in the profiling example above, except that B is user-provided. if B then break else continue Breakpoints. “break L hBi” causes the program to break when it reaches a specific label, and if condition B is satisfied. The coding is identical to that in the watchpoint example, but they differ in their placement: breakpoints are placed at programmer-specified positions in the code whereas watchpoints are associated with labels where variables are updated. This difference cannot be seen from the snippet, but will become evident in the formalisation of the program direction commands, which we start next. 3.4 Directability ordering In this section we define a relation x @ x0 to mean “x0 is more directable than x”, where x, x0 are triples (D, C, p) and (D0 , C 0 , p0 ), each representing three interdependent parties: the director, controller and program. The user (or their agent) issues direction commands to the director, which interacts with the program’s state via its agent, the controller, embedded in the program. We use this relation to give semantics to the direction commands in terms of interaction with CASP machines. Our directability relation gathers information about the three parties involved, and describes how their interdependence is revealed by the directing commands: for example, the director would not be able to execute trace X if the program did not have a variable called X, or if the controller had not been allocated a trace buffer. In our notation, D represents the director’s state (a set of facts representing its knowledge about the controller’s state, such as which breakpoints exist, and whether they are active or not). C is the controller’s state, consisting of a (C, A, SP ) machine, cf §3.2. p is a program. We will define an example language in §3.4.1 to aid our formalisation. We also include in the relation some information about why one triple is less directable than the other. We therefore index the relation by (i) C ⊆ D the direction commands (§3.1) supported by (D, C, p), (ii) c ∈ D the additional command supported by (D0 , C 0 , p0 ), and Dc ∈ (D0 → D0 ) the semantics of this command. Note that C denotes the set of direction commands that is supported simultaneously by (D, C, p), i.e., these commands are allocated separate state. Written out in full, we obtain this relation: c (D, C, p) @C (D0 , C 0 , p0 ) : Dc In §3.5 we will instantiate such a relation by formalising commands from D in terms of CASP machines. Note that this describes how the directing commands are translated into CASP programs, but we do not fully formalise the director: Dc is written in an ML-like pseudocode. Our formalisation is devised in away that avoids the mutual interference of direction commands. That is, the same program can be subjected to any combination of direction commands. To make this non-interference more precise, we introduce some definitions. Let D̆ = D0 \D and C˘ = C 0 \C. We say that Dc is relevant to D0 \D if it only manipulates state or elements introduced in D0 and C 0 . Furthermore commands are disjoint if they introduce non-overlapping state. That is, for any two commands c1 and c2 , for any prior states C and D their respective new states are disjoint: (D1 \D) ∩ (D2 \D) = ∅ = (C1 \C) ∩ (C2 \C). 3.4.1 Program language In this section we specify a first-order imperative language to support our formalisation of program direction commands. Unlike CASP machines (§3.2) this language is computationally strong: recursive functions over the integers can be encoded. The language’s simplicity enables the relation of program direction with CASP machines, while avoiding excessive formal complexity. Formalising transformations for realistic languages—even simple transformations (Schäfer et al. 2008)—is usually fraught with complex definitions, and we avoid that here. The language grammar is given next. Note that for simplicity we deliberately overlay the meta-variables for variables and numerals (X and N ) over those for CASP machines. This simplifies the interface with CASP programs, which will be executed at extension points within host programs. p ranges over programs, s over statements, e over expressions, τ over types, and vdecl and fdecl over the declaration of variables and functions respectively. p vdecl fdecl s e ::= ::= ::= ::= | | | ::= | | | vdecl fdecl return fname(ē) τX τ fname(x̄){s; return e} skip X := e if e then s; s extend{L1 , . . . , Ln } N X fname(ē) e1 op e2 op ∈ {+, −, ==, <} In this language the only data type in τ is the integer type. The only unusual construct in this language is extend{L1 , . . . , Ln }. This indicates an extension point, where control is passed to the CASP machine (§3.2). As before, L is a metavariable ranging over labels drawn from a denumerable set. The semantics of this language are straightforward, and are given in §C.2. Intuitively, the behaviour of extend{L1 , . . . , Ln } is as follows. If n = 0 then the command has no effect. Otherwise, the stored procedure associated with each Li is called, in any order, and run to completion, noting the last instruction of each Li . The last instruction of any CASP program is either ‘continue’ or ‘break’ (§3.2). If all Li end in ‘continue’, then the behaviour of extend{L1 , . . . , Ln } is to continue executing the next statement in the host program. Otherwise, if at least one Li ends in ‘break’, then the controller switches into interactive mode. In this mode, control remains with the controller, until the director sends it a ‘continue’ command, at which point control is returned to the program. We make the simplifying assumption that all the statements in the user’s program are interspersed with ‘extend’: that is, if the user writes s0 ; . . . ; sn then this is translated into extend{}; s0 ; extend{}; . . . ; extend{}; sn ; extend{}. In the next section we populate these extension points with labels, to extend the directability of a program. Semantics for D 3.5 In this section we encode program direction commands (§3.1) into interactions between the director and controller (§3.2). Note that this describes how the directing commands are translated into CASP programs, but we do not fully formalise the director: Dc is written in an ML-like pseudocode. 3.5.1 Break We start by formalising the meaning of the “break” command. Intuitively, this command adds a breakpoint to a program: an extension point is at the position of the breakpoint is labelled with L, and the associated state is set up in the director and controller. To support this command: • A program p is extended to include a label L at the posi- tion where the breakpoint is to be placed. This extension is formalised by the premise p <1L p0 , which means that p is identical to p0 except for the label L occurring at some extension point. This is defined formally in §B along with related definitions, such as that of a position in the program. • The label L must not appear in the original program. We write this as L 6∈ p using an abbreviation defined in §B. • The controller’s state is extended to store the procedure associated with L. Furthermore, the breakpoint is activated by default. We use the abbreviated notation C˘ = {SP [L 7→ break]} to indicate this extension, where SP is the stored-procedure memory in the CASP. • The director’s state is extended to encode whether the breakpoint is currently active or not. It is activated by default, thus: D̆ = {(«bp», L, 1)}, where “«bp»” is a unique token we use for breakpoints, and 1 is a token we use to indicate that the breakpoint is active. Soon we will formalise the “unbreak” command, which flips this value to 0. • The director’s behaviour for the “break” command, Dc , involves activating the breakpoint unless already active. In the definition of Dc below we use the notation P N , which we use to mean that the director sent the CASP program P to the controller, and received the reply N . Thus “@L : {break} pLq” means that the director instructed the controller to store the program break at L, and that it expects to get pLq back (which is a code indicating where the program is stored, as formalised in §C.1). In Dc we use the notation “(«bp», L, 0 7→ 1) :∈ D0 ” to abbreviate {(«bp», L, 1)} ∪ (D0 \{(«bp», L, 0)}). The formalisation of the “break” command follows. We can use a simplified notation since our commands will be both relevant to D0 \D and disjoint: p break L hBi @C L 6∈ p p <1L p0  D̆ = {(«bp», L, 1)}      C˘ = {SP [L 7→ Jbreak L hBiKSP ]}   0 0 0 D 0 c = λD . if («bp», L, 1) ∈ D then D p  else     Jbreak L hBiK pLq;   («bp», L, 0 7→ 1) :∈ D0 where Jbreak L hBiKSP = conditional hBi break Jbreak L hBiK = @L : {Jbreak L hBiKSP } We use Jbreak L hBiK to denote the meaning of “break L hBi” to the director, as a CASP program. Jbreak L hBiKSP is the value used to initialise the stored program associated with L. The meaning of hBi is translated for inclusion in the CASP program by the following function: conditional hBi t =   t  if I1 == I2 then t   else continue if hBi = true if hBi = (I1 = I2 ) We now turn to the “unbreak” direction. To be able to issue this direction, the breakpoint needs to exist—thus we have a dependency on the “break” direction earlier: p unbreak L @C (break L hBi) ∈ C  D̆ = {}      C˘ = {} p Dc = λD0 . if («bp», L, 0) ∈ D0 then D0    else Junbreak LK pLq;   («bp», L, 1 7→ 0) :∈ D0 where Junbreak LK = @L : {continue} Note that the program, and the states of the controller and director are not changed. The only extension is made to the behaviour of the director, which is extended with a function to unset the breakpoint. This time we didn’t set anything in the controller since there is no default behaviour and additional state required for unsetting a breakpoint. This is because unbreaking a breakpoint doesn’t establish the breakpoint, whereas breakpoint does. To print the value of a variable X, that variable needs to exist in the program (X ∈ Varp ), and we need to have at least one extension point (through which we can send the print command). (break L hBi) ∈ C X ∈ Varp  D̆ = {}    ˘ print X C = {} p @C p  N; D = λD0 . X   c print(N ) This time we didn’t use a placement command to update the behaviour of the controller; we simply ran a query. print(N ) is pseudocode that uses a print function in the director. Recall that we formalise directions in terms of CASP machines, and don’t formalise the director’s behaviour. X ∈ Varp ensures that X is a variable in p. Varp is defined in §B. 3.5.2 Trace The most important command related to tracing is “trace start”; the other commands depend on it. X ∈ Varp ∀L ∈ XL . L 6∈ p Positionsp0 (XL ) = PostUpdatep0 (X) p <XL p0 p trace start X hBi h$i @C p0  D̆ =  {(«t», X, 1)}      C [Xi ] = 0, C [Xof ] = 0, A[Xa [h$i]],       SP [L 7→ Jtrace start X hBi h$iKSP ]  C˘ =      for each L ∈ XL    Dc = λD0 . if («t», X, 1) ∈ D0 then D0 else     for each L ∈ XL :     @L : {Jtrace start X hBi h$iKSP }     pLq;    («t», X, 0 7→ 1) :∈ D0 Jtrace start X hBi h$iKSP = conditional hBi  if Xi < h$i then  Xa [Xi ] := X;   inc Xi ;   continue   else   inc Xof ; break                             pLq; where Jtrace stop XKSP = continue. The remaining commands are formalised in §A, supported by program-level predicates and functions defined in §B. 4. Implementation and Evaluation We prototyped the ideas described in the previous section by extending network programs with program-hosted directability, and compiled them to run on an FPGA. We then evaluated the effect of these directability features on the program in which they are embedded. Our approach enables us to make fine-grained modifications to directability, and we evaluate the overhead from supporting different CASP machine instructions. 4.1 ut to Controller Figure 4. Transformation of the program to include a controller. Normal packets are handled as normal, but direction packets are passed to the controller. Pink dots represent extension points, one of which is added within the control flow of the original program in this illustration. Focus. From its description, the PhD idea is not constrained to a specific kind of program. In our prototype we focussed on using it to work with network programs however, for two reasons: 1. It allows us to test remote directing over standard network equipment. In our survey of tools and techniques (Table 1) only Dynascope has network access, but it does not work for FPGAs. 2. It allows us to use industrial high-precision network measuring equipment to see the effects on the program hosting a controller. p D̆ = {} C˘ = {} Dc = λD0 . if («t», X, 0) ∈ D0 then D0 else for each L ∈ XL : @L : {Jtrace stop XKSP } («t», X, 1 7→ 0) :∈ D0 Program ke (trace start X hBi h$i) ∈ C Positionsp (XL ) = PostUpdatep (X) trace stop X @C Program c Pa Applying this rule depends on a set of labels XL in p0 that don’t exist in p. p0 is the least extension of p that includes these labels. Furthermore, these labels coincide with the positions in the program occurring after X has been updated. The controller’s state is extended with the buffer index, Xi , initialised to 0; the overflow indicator Xof , initialised to 0 (for false); and Xa is an array that can hold h$i elements. Each L ∈ XL labels the positions immediately after the variable has been updated. p t in ke c Pa  Prototype In our prototype we manually transformed programs to include the controller. This transformation was straightforward: we wrote the controller (implementing a CASP machine) and added extension points to the program (consisting of calls to the controller to execute a stored procedure). Use-cases. As programs we used implementations of DNS and Memcached that we had written previously to run on FPGAs, as part of earlier research. DNS (Domain Name System) is a ubiquitous name-resolution system used on private and public packet-switched networks such as the Internet (Mockapetris 1987). This implementation was around 700 lines of C# . Memcached (Fitzpatrick 2004) is a wellknown, in-memory key/value store that caches read results in memory to quickly respond to queries. The protocol uses a number of basic commands such as GET (retrieve a value associated with the provided key), SET (store a key/value pair) and DELETE (remove a key/value pair) and has both ASCII and binary protocols. In this work as proof-of-concept we have implemented a limited version of Memcached supporting GET/SET/DELETE using the binary protocol over UDP and supporting 6 byte keys and 8 byte values. This implementation was almost 900 lines of C# . Method. We transformed the DNS and Memcached implementations in two ways: (i) adding code to check whether a received packet is a direction packet intended for the controller (see Figure 4), in which case the controller (and not the original program) processes the packet; (ii) adding an extension point in the body of the (DNS or Memcached) main loop, allowing us to influence and observe the program from that point. We form an enumerated type that corresponds to the program variables whose values the controller may access and change at runtime. The code for each value of the enumerated type is used to refer to the program value, to 10G Port 10G Port 10G Port 10G Port this module, the packets are passed to the physical interfaces and are transmitted. 10G Port Input Arbiter Main Logical Core Output Queues 10G Port 10G Port 10G Port PCIe & DMA PCIe & DMA Figure 5. NetFPGA Reference Pipeline. Each of the implementations in our prototype consists of a separate Main Logical Core. instruct the controller to increment it, for example. Building tool support to automate parts of this process seems feasible. Direction packets. Direction packets are network packets in a custom and simple packet format, whose payload consists of (i) code to be executed by the controller, or (ii) status replies from the controller to the director. It enables us to remotely direct a running program, similar to gdb’s ‘remote serial protocol’.2 Our design uses a simple direction language, and works for instances of a program that run both as software and hardware (on FPGAs), whereas gdb requires special backends for each architecture. Controller. Our controller follows the description of CASP machines very closely (§3.2). It has two features. First, memory is organised into Counters, Arrays and Stored procedures. Counters include variables in the original program, as well as extra registers used for program directing. In this prototype we only support numeric datatypes; structured datatypes could be encoded in principle. Secondly, a function that interprets the language of CASP machines. This is used to branch to stored procedures when their corresponding extension points are reached. Tools and equipment. We wrote our programs in C# , and used the Kiwi high-level synthesis (HLS) system (Singh and Greaves 2008) that statically recompiles .NET bytecode into Verilog. The Verilog code generated by Kiwi was slotted into open-source reference code from the NetFPGA project,3 and compiled to run on the NetFPGA SUME board (Zilberman et al. 2014), a low-cost, PCIe host adapter card able to support 40Gb/s and 100Gb/s applications. At the core of the board is a Xilinx Virtex-7 690T FPGA device. The NetFPGA reference designs share the same FPGA architecture, illustrated in Figure 5, of multiple physical interfaces surrounding a logical data-path. Traffic to the FPGA enters through one of four 10Gb/s ports or from a PCIe interface, and is passed into the main data-path by an input arbiter, which arbitrates between all ingress interfaces. Packets are then processed within the main logical core, and are diverted to their destination through an output queues module. From 2 http://www.embecosm.com/appnotes/ean4/ embecosm-howto-rsp-server-ean4-issue-2.html 3 http://netfpga.org/ 4.2 Evaluation We evaluate our prototype by carrying out a quantitative analysis of the impact that the controller has on the program in which it is embedded. This impact is measured in terms of utilisation of resources on the FPGA, and the performance of the host program. An FPGA consists of an interconnected grid of logic blocks, which in turn contain resources such as memory and logic functions (in the form of so-called look-up tables). Flip-flops are primitive storage circuits. Table 3 shows the utilisation and performance for DNS and Memcached, extended with different controller features. These features show a fine-grained decomposition of the instructions supported by the controller: reading a variable, writing a variable, and incrementing a variable. We see that the impact on utilisation and performance is minimal. Performance is analysed in three ways. The duration is the number of clock cycles that are needed by the program to process a packet within the main logical core, as extracted from simulation. In our hardware, each clock cycle takes 10ns. Latency is the time taken for a program to service requests from the network. Throughput is the rate of requests that can be serviced by the program (before packets start to be dropped). Using the controller we can read and change the program’s state at the packet rate. Using JTAG and the Virtex-7 FPGA we can read data at up to 66Mbps, three orders of magnitude less than the maximum throughput that the NetFPGA can sustain over high speed serial interface –e.g. the PCIe channel. In principle the direction controller could use any slice of that, subject to not interfering with the hosting program too much. In Table 4 we compare DNS extended with one extension point, against DNS extended with an embedded logic analyser (ELA). An ELA is a standard technique in hardware development, and consists of a circuit that passively monitors the program, creating a trace of the program’s execution. DNS+2e is the DNS extended with one extension point that only contains a NOP. In (Count) the extension point’s stored procedure is changed into a counter, and in (Trace) it is changed to emulate the behaviour of the ELA. These results confirm that the resources overhead is minimal, making PhD a feasible solution. We note that in the use-cases detailed below the FPGA resources were never exhausted, and consumed less than 25% of the logic resources, even for complex services. In addition to the quantitative evaluation, we note that PhD is vendor-neutral and runtime-reconfigurable, and can be used for remote in-field debugging, whereas standard techniques for FPGA debugging do not provide this. Artefact Utilisation (%) Logic Performance Duration Latency QueriesFlip-flops (#cycles) (µs) per-sec (KQPS) DNS +R +W +I 100.00 103.40 115.05 109.79 100.00 102.76 106.04 106.12 57 - 1.85 1.85 1.84 1.84 1176 1176 1176 1176 Memcached +R +W +I 100.00 99.17 99.80 100.63 100.00 100.29 100.74 100.69 64 - 2.03 2.03 2.04 2.03 952 952 952 952 Table 3. Profile of utilisation and performance. Read, Write, and Increment are instructions supported by the controller. Latency is indicated at the 99th percentile. The hardware generation process involves an optimisation step to place and route components, and on occasion this results in more utilisation-efficient allocations. The duration for extensions to DNS (clock cycles) did not change since the critical path of the circuit was not affected. Artefact Utilisation (%) Logic Performance Duration Latency QueriesFlip-flops (#cycles) (µs) per-sec (KQPS) DNS+ELA 99.74 100.40 57 1.83 1176 DNS+2e 234.61 (Count) 234.46 (Trace) 218.30 151.06 151.81 151.84 57 62 70 1.86 1.94 1.99 1176 1064 1010 Table 4. Utilisation and performance profile of the DNS+ELA against the DNS having one extension point, where the extension point is NOP, packet counting, or variable tracing. Latency is indicated at the 99th percentile. Test setup. We use a host running Ubuntu server 14.04LTS, kernel version 4.4.0-45-generic. The host hardware is a single 3.5GHz Intel Xeon E5-2637 v4 on a SuperMicro X10DRG-Q motherboard. An Endace 9.2SX2 DAG card (7.5ns time-stamping resolution) and a NetOptics passive-optical tap are used to intercept client-server traffic and permit independent measurement of client & server latency. For the throughput tests, OSNT (Antichi et al. 2014) is used to control the rate of the generated requests. 5. Related work Portable debugging, program directing, and debugging languages. We were inspired by previous work on portable debugging (Ramsey and Hanson 1992; Hood 1996; Hanson and Raghavachari 1996) and program directing (Sosič 1995). That work usually makes the assumption that software is compiled to run on a general-purpose CPU however, whereas we also target reconfigurable hardware. The study of languages for debugging is a decades old subject (Balzer 1969) and includes sophisticated languages for high-level querying of programs (Johnson 1977; Golan and Hanson 1993; Winterbottom 1994). Compared to that work, our work separates more starkly between the role (and language) of the director, and that of the controller, which have separate languages. This separation guided our modelling in §3. Dynascope. Dynascope (Sosič 1992) provides an extremely fine grained execution stream of events–at the level of machine instructions–providing a complete description of a program’s runtime behaviour. We provide selective (and programmable) visibility by default, in the interest of performance. A more detailed stream could be produced if wished. Dynascope is generative by default (since you need to set filters to ignore events) whereas we are generative by direction (you only get events that you inserted code to generate). High-level synthesis and runtime debugging. The closest work is that by McKechnie et al. (2009) who adapt a debugging paradigm first developed for network-on-chip devices (NoC). They provide transaction-level granularity, consisting of domain-specific (high-level) events–less fine grained than Dynascope’s execution stream. Compared to our work they offer a less flexible interface, but they take a more detailed account of different sorts of interconnects between components–formats such as LocalLink and PLB. Many other systems inject code to emit and observe events to aid with debugging of complex designs, such as “System on Chip” designs (Lee and Lysecky 2015). SeaCucumber (Tripp et al. 2002) was the first to support sourcelevel (HLS) debugging, both during behavioural simulation and during hardware execution. Monson and Hutchings (2015) take a different approach: source-code transformation (at the HLS level) to introduce “event observability ports” to enable runtime visibility of variables’ values –but note that it’s not always possible to observe an expression an interest. We took the approach of Monson and Hutchings (2015), relying on source transformation rather than on the HLS system. Overhead can be reduced by being selective about what to monitor, rather than monitoring everything by default. This was studied by Goeders and Wilton (2016) who compared the amount of visibility afforded by different schemes when recording events such as reads and updates. We left the choice of what to observe to the programmer. At present the LegUp HLS system (Calagar et al. 2014) appears to provide the best support for debugging. In a contribution to that system, Hung and Wilton (2014) take a different approach to us: they use a two-step incremental compilation, the second step of which compiles the monitoring system by reclaiming unused FPGA resources. This approach is less likely to interfere with the timing behaviour of the observed circuit. Their model is more specialised to trace-buffers, and it would be interesting to generalise it to support our directing controller. Testing of hardware is traditionally concentrated on the RTL description, where tools and techniques have been developed to verify designs prior to synthesis (Foster 2008; Fix 2008) . The difficulty of checking hardware entirely prior to synthesis has led to research into the inclusion of runtime monitors in hardware (Todman et al. 2015). Curreri et al. (2011) describe a system that translates source-level assertions into monitors. This technique is also used to detect hangs and possible timing overruns. We currently do not support such monitoring, since it requires a source-level notion of time that we currently do not provide, and “watchdog threads” that we currently do not include. Finally, Camera et al. (2005) described a hardware OS, the Berkeley Operating system for ReProgrammable Hardware (BORPH), on which user programs were run. Their stitcher extend the user program to support debugging, providing a rich system. Like BORPH we require the designer to provide “hints to the system of what aspects of the design may need to be explored at runtime.” Formalising program directors. Since ‘debugging’ is such a vague term (compared to ‘compiling’, which has a clearer functional behaviour), its verification objective is hard to formalise. Perhaps as a consequence of this there has been little work on formalising and verifying debuggers, and usually entirely theoretical (Zhu 2001). Kishon et al. (1991) describe transformations over functional programs to include monitoring behaviour. Compared to this work, our transformations are not based on continuations (and we deliberately avoid needing first-order functions to avoid departing too much from the conventional hardware programming mindset). We use an approach based on operational semantics, similar to that used by da Silva (1992), but different in several ways: (i) we support a different set of directing commands, (ii) we don’t insert commands into the bytecode for the debugger to keep track of separations between subexpressions, and to keep track of the path through the expression (program), (iii) da Silva (1992), introduces a language for specifying debuggers whereas we introduce an operational language for inspecting and changing the program’s runtime state, (iv) we do not consider the equivalence between debuggers. Sansom and Peyton Jones (1997) describe the profiling of functional programs by using “cost centres”, a paradigm to identify locations in a program at an expression-level (rather than functional-level) granularity. Others have continued that to make it more practical (Faddegon and Chitil 2015). All the techniques described above rely on program transformation. They all use functional languages as examples whereas we use a simpler imperative language, to model the paradigm of register-level hardware programming more directly. Because of the weaving of debugging code into the program all these techniques can (retrospectively) be seen as special-cases of aspect-oriented programming, described next. Aspect-oriented programming (AOP). AOP involves the inclusion (“weaving”) of code (called “advice”) during compile-time or run-time, depending on whether certain compile- or run-time conditions are satisfied. AOP is a linchpin paradigm for tracing and monitoring (Avgustinov et al. 2006; Hamlen and Jones 2008) but advice can be arbitrary functions, and as a consequence they might have undesirable effects on runtime (Avgustinov et al. 2007). This is an important characteristic to our work, where we wanted to reduce the power of added code. Djoko Djoko et al. (2012) have categorised advice based on the degree of influence they can have on the observable behaviour of a program; and Dantas and Walker (2006) characterise less intrusive advice in their work on “harmless advice”. 6. Conclusion Having poor programming and debugging support hinders the potential of computing architectures such as FPGAs, which are gaining importance in modern datacentres. By using a program directing approach we subsume several activities that can involve the interactive runtime analyses of programs (Sosič 1992). Our language-based approach has two extensibility benefits: (i) more efficient controllers can be implemented without changing the source language, and (ii) third-parties could extend or customise the language of direction commands without changing the controller that these commands compile to. Using a program director brings security risks, since it may alter the control-flow of a program, and this may be exploited (Abadi et al. 2005). We sought to mitigate this risk by making the presence of the debug mode very apparent, to reduce the chances of excessive debug functionality being included in deployment (Pauli 2016). Dynascope was used to diagnose errors in the Dynascope compiler itself (Sosič 1992, §3.1), but bugs could render such a task impossible, for reasons similar to the hereditary potential of vulnerabilities in compilers (Thompson 1984). This highlights the preference to have the code for the director be “correct by construction”, preferably automatically generated. In work such as this we invariable come across the observer effect (Mytkowicz et al. 2008) that monitoring code has on the monitored code. This is known to affect the visibility of timing bugs in software (Neville-Neil 2014), but even “invisible” such bugs can leak important information to an adversary (Cock et al. 2014). The overhead due to monitoring is a very important consideration when evaluating system measurements, and monitoring systems try to do their utmost to reduce it (Gregg and Mauro 2011; Anderson et al. 2014). A key weakness of our prototype is that it does not use low-level (RTL-level) techniques to reduce overhead, but we mitigate this by allowing extension points to be specialised, e.g., these may only be a breakpoint, a watchpoint, or both, etc. This simplifies the circuitry we get. A more sophisticated approach would in- volve organising the director to operate in a different clock domain if possible, following McKechnie et al. (2009). Not having to sustain a large clock-distribution network leads to power saving, since unused logic blocks don’t need to be switched, and less heat is dissipated from leakage. It also makes placement and routing easier, which usually reduces the compilation time. The main strength of our approach is that it provides a uniform interface for the flexible directing of software and hardware instances of programs at runtime. To our knowledge no other system provides this. We used an HLS system that allows us to run the resulting code both on software and on hardware, but the debugging methods used for either were hitherto separate. P. Avgustinov, J. Tibble, and O. de Moor. Making Trace Monitors Feasible. SIGPLAN Not., 42(10):589–608, Oct. 2007. ISSN 0362-1340. doi: 10.1145/1297105.1297070. URL http://doi. acm.org/10.1145/1297105.1297070. Acknowledgments R. G. Bennetts and A. Osseyran. IEEE standard 1149.1-1990 on boundary scan: History, literature survey, and current status. Journal of Electronic Testing, 2(1):11–25, 1991. ISSN 15730727. doi: 10.1007/BF00134941. URL http://dx.doi.org/ 10.1007/BF00134941. We thank the many people who contributed to this paper. Matthew Grosvenor helped us with evaluation ideas and reusing the QJump infrastructure. Olaf Chitil, Paolo Costa, Klaus Gleissenthall, Tim Harris, Simon Moore, and Robert Soulé helped improve the paper through their feedback. This work has received funding from the EPSRC NaaS grant EP/K034723/1, European Union’s Horizon 2020 research and innovation programme 2014-2018 under the SSICLOPS (grant agreement No. 644866), and the Leverhulme Trust Early Career Fellowship ECF-2016-289. References M. Abadi, M. Budiu, U. Erlingsson, and J. Ligatti. Control-flow Integrity. In Proceedings of the 12th ACM Conference on Computer and Communications Security, CCS ’05, pages 340–353, New York, NY, USA, 2005. ACM. ISBN 1-59593-226-7. doi: 10.1145/1102120.1102165. URL http://doi.acm.org/10. 1145/1102120.1102165. T. Ball, E. Bounimova, B. Cook, V. Levin, J. Lichtenberg, C. McGarvey, B. Ondrusek, S. K. Rajamani, and A. Ustuner. Thorough Static Analysis of Device Drivers. SIGOPS Oper. Syst. Rev., 40(4):73–85, Apr. 2006. ISSN 0163-5980. doi: 10.1145/1218063.1217943. URL http://doi.acm.org/10. 1145/1218063.1217943. R. M. Balzer. EXDAMS: EXtendable Debugging and Monitoring System. In Proceedings of the May 14-16, 1969, Spring Joint Computer Conference, AFIPS ’69 (Spring), pages 567– 580, New York, NY, USA, 1969. ACM. doi: 10.1145/1476793. 1476881. URL http://doi.acm.org/10.1145/1476793. 1476881. N. Calagar, S. D. Brown, and J. H. Anderson. Source-level debugging for FPGA high-level synthesis. In 2014 24th International Conference on Field Programmable Logic and Applications (FPL), pages 1–8, Sept 2014. doi: 10.1109/FPL.2014.6927496. K. Camera, H. K.-H. So, and R. W. Brodersen. An Integrated Debugging Environment for Reprogrammble Hardware Systems. In Proceedings of the Sixth International Symposium on Automated Analysis-driven Debugging, AADEBUG’05, pages 111– 116, New York, NY, USA, 2005. ACM. ISBN 1-59593-050-7. doi: 10.1145/1085130.1085145. URL http://doi.acm.org/ 10.1145/1085130.1085145. T. V. Chu, S. Sato, and K. Kise. Ultra-fast NoC emulation on a single FPGA. In 2015 25th International Conference on Field Programmable Logic and Applications (FPL), pages 1–8, Sept 2015. doi: 10.1109/FPL.2015.7294021. J. Anderson, R. N. M. Watson, D. Chisnall, K. Gudka, I. Marinos, and B. Davis. TESLA: Temporally Enhanced System Logic Assertions. In Proceedings of the Ninth European Conference on Computer Systems, EuroSys ’14, pages 19:1–19:14, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2704-6. doi: 10.1145/2592798.2592801. URL http://doi.acm.org/10. 1145/2592798.2592801. D. Cock, Q. Ge, T. Murray, and G. Heiser. The Last Mile: An Empirical Study of Timing Channels on seL4. In Proceedings of the 2014 ACM SIGSAC Conference on Computer and Communications Security, CCS ’14, pages 570–581, New York, NY, USA, 2014. ACM. ISBN 978-1-4503-2957-6. doi: 10.1145/2660267.2660294. URL http://doi.acm.org/10. 1145/2660267.2660294. G. Antichi, M. Shahbaz, Y. Geng, N. Zilberman, A. Covington, M. Bruyere, N. McKeown, N. Feamster, B. Felderman, M. Blott, et al. OSNT: Open source network tester. IEEE Network, 28(5): 6–12, 2014. J. Curreri, G. Stitt, and A. D. George. High-level Synthesis of In-circuit Assertions for Verification, Debugging, and Timing Analysis. Int. J. Reconfig. Comput., 2011:1:1–1:17, Jan. 2011. ISSN 1687-7195. doi: 10.1155/2011/406857. URL http: //dx.doi.org/10.1155/2011/406857. P. Avgustinov, E. Bodden, E. Hajiyev, L. Hendren, O. Lhoták, O. de Moor, N. Ongkingco, D. Sereni, G. Sittampalam, J. Tibble, and M. Verbaere. Aspects for Trace Monitoring. In Proceedings of the First Combined International Conference on Formal Approaches to Software Testing and Runtime Verification, FATES’06/RV’06, pages 20–39, Berlin, Heidelberg, 2006. Springer-Verlag. ISBN 3-540-49699-8, 978-3-540-496991. doi: 10.1007/11940197_2. URL http://dx.doi.org/10. 1007/11940197_2. F. Q. B. da Silva. Correctness Proofs of Compilers and Debuggers: an Approach Based on Structural Operational Semantics. PhD thesis, School of Informatics, University of Edinburgh, Oct. 1992. D. S. Dantas and D. Walker. Harmless Advice. In Conference Record of the 33rd ACM SIGPLAN-SIGACT Symposium on Principles of Programming Languages, POPL ’06, pages 383– 396, New York, NY, USA, 2006. ACM. ISBN 1-59593-027-2. doi: 10.1145/1111037.1111071. URL http://doi.acm.org/ 10.1145/1111037.1111071. S. Djoko Djoko, R. Douence, and P. Fradet. Aspects Preserving Properties. Sci. Comput. Program., 77(3):393–422, Mar. 2012. ISSN 0167-6423. doi: 10.1016/j.scico.2011.10.010. URL http: //dx.doi.org/10.1016/j.scico.2011.10.010. M. Faddegon and O. Chitil. Algorithmic Debugging of Real-world Haskell Programs: Deriving Dependencies from the Cost Centre Stack. In Proceedings of the 36th ACM SIGPLAN Conference on Programming Language Design and Implementation, PLDI ’15, pages 33–42, New York, NY, USA, 2015. ACM. ISBN 9781-4503-3468-6. doi: 10.1145/2737924.2737985. URL http: //doi.acm.org/10.1145/2737924.2737985. B. Fitzpatrick. Distributed caching with memcached. Linux Journal, 2004(124), 2004. L. Fix. Fifteen Years of Formal Property Verification in Intel, pages 139–144. Springer Berlin Heidelberg, Berlin, Heidelberg, 2008. ISBN 978-3-540-69850-0. doi: 10.1007/978-3-540-69850-0_8. URL http://dx.doi.org/10.1007/978-3-540-69850-0_8. H. Foster. Assertion-Based Verification: Industry Myths to Realities, pages 5–10. Springer Berlin Heidelberg, Berlin, Heidelberg, 2008. ISBN 978-3-540-70545-1. doi: 10.1007/ 978-3-540-70545-1_3. URL http://dx.doi.org/10.1007/ 978-3-540-70545-1_3. M. N. Gagnon, S. Taylor, and A. K. Ghosh. Software protection through anti-debugging. IEEE Security Privacy, 5(3):82–84, May 2007. ISSN 1540-7993. doi: 10.1109/MSP.2007.71. P. Godefroid, M. Y. Levin, and D. Molnar. SAGE: Whitebox Fuzzing for Security Testing. Commun. ACM, 55(3):40–44, Mar. 2012. ISSN 0001-0782. doi: 10.1145/2093548.2093564. URL http://doi.acm.org/10.1145/2093548.2093564. J. Goeders and S. J. E. Wilton. Effective FPGA Debug for HighLevel Synthesis Generated Circuits. In 2014 24th International Conference on Field Programmable Logic and Applications (FPL), pages 1–8, Sept 2014. doi: 10.1109/FPL.2014.6927498. J. Goeders and S. J. E. Wilton. Quantifying observability for insystem debug of high-level synthesis circuits. In 2016 26th International Conference on Field Programmable Logic and Applications (FPL), pages 1–11, Aug 2016. doi: 10.1109/FPL. 2016.7577371. M. Golan and D. R. Hanson. Duel – A Very High-Level Debugging Language. In USENIX Winter Conference, pages 107–117, 1993. B. Gregg and J. Mauro. DTrace: Dynamic Tracing in Oracle Solaris, Mac OS X, and FreeBSD. Prentice Hall Professional, 2011. K. W. Hamlen and M. Jones. Aspect-oriented In-lined Reference Monitors. In Proceedings of the Third ACM SIGPLAN Workshop on Programming Languages and Analysis for Security, PLAS ’08, pages 11–20, New York, NY, USA, 2008. ACM. ISBN 9781-59593-936-4. doi: 10.1145/1375696.1375699. URL http: //doi.acm.org/10.1145/1375696.1375699. D. R. Hanson and M. Raghavachari. A machine-independent debugger. Softw., Pract. Exper., 26(11):1277–1299, 1996. R. Hood. The P2D2 Project: Building a Portable Distributed Debugger. In Proceedings of the SIGMETRICS Symposium on Par- allel and Distributed Tools, SPDT ’96, pages 127–136, New York, NY, USA, 1996. ACM. ISBN 0-89791-846-0. doi: 10. 1145/238020.238058. URL http://doi.acm.org/10.1145/ 238020.238058. E. Hung and S. J. Wilton. Towards Simulator-like Observability for FPGAs: A Virtual Overlay Network for Trace-buffers. In Proceedings of the ACM/SIGDA International Symposium on Field Programmable Gate Arrays, FPGA ’13, pages 19–28, New York, NY, USA, 2013. ACM. ISBN 978-1-4503-1887-7. doi: 10.1145/2435264.2435272. URL http://doi.acm.org/10. 1145/2435264.2435272. E. Hung and S. J. E. Wilton. Accelerating FPGA Debug: Increasing Visibility Using a Runtime Reconfigurable Observation and Triggering Network. ACM Trans. Des. Autom. Electron. Syst., 19(2):14:1–14:23, Mar. 2014. ISSN 1084-4309. doi: 10.1145/ 2566668. URL http://doi.acm.org/10.1145/2566668. M. S. Johnson. The Design of a High-level, Language-independent Symbolic Debugging System. In Proceedings of the 1977 Annual Conference, ACM ’77, pages 315–322, New York, NY, USA, 1977. ACM. ISBN 978-1-4503-3921-6. doi: 10. 1145/800179.810221. URL http://doi.acm.org/10.1145/ 800179.810221. A. Kishon, P. Hudak, and C. Consel. Monitoring Semantics: A Formal Framework for Specifying, Implementing, and Reasoning About Execution Monitors. In Proceedings of the ACM SIGPLAN 1991 Conference on Programming Language Design and Implementation, PLDI ’91, pages 338–352, New York, NY, USA, 1991. ACM. ISBN 0-89791-428-7. doi: 10. 1145/113445.113474. URL http://doi.acm.org/10.1145/ 113445.113474. G. H. Koch, W. Rosenstiel, and U. Kebschull. Breakpoints and Breakpoint Detection in Source-level Emulation. ACM Trans. Des. Autom. Electron. Syst., 3(2):209–230, Apr. 1998. ISSN 1084-4309. doi: 10.1145/290833.290843. URL http://doi. acm.org/10.1145/290833.290843. S. Krishnaswamy, I. L. Markov, and J. P. Hayes. On the Role of Timing Masking in Reliable Logic Circuit Design. In Proceedings of the 45th Annual Design Automation Conference, DAC ’08, pages 924–929, New York, NY, USA, 2008. ACM. ISBN 978-1-60558-115-6. doi: 10.1145/1391469.1391703. URL http://doi.acm.org/10.1145/1391469.1391703. J. C. Lee and R. Lysecky. System-Level Observation Framework for Non-Intrusive Runtime Monitoring of Embedded Systems. ACM Trans. Des. Autom. Electron. Syst., 20(3):42:1–42:27, June 2015. ISSN 1084-4309. doi: 10.1145/2717310. URL http: //doi.acm.org/10.1145/2717310. P. E. McKechnie, M. Blott, and W. A. Vanderbauwhede. Debugging FPGA-based Packet Processing Systems Through Transaction-level Communication-centric Monitoring. SIGPLAN Not., 44(7):129–136, June 2009. ISSN 0362-1340. doi: 10.1145/1543136.1542470. URL http://doi.acm.org/10. 1145/1543136.1542470. R. Milner, M. Tofte, and R. Harper. The Definition of Standard ML. MIT Press, 1990. S. Mittal. A survey of techniques for improving energy efficiency in embedded computing systems. International Journal of Computer Aided Engineering and Technology, 6(4):440–459, 2014. P. Mockapetris. Domain names – concepts and facilities, Nov. 1987. https://tools.ietf.org/html/rfc1034. York, NY, USA, 2014. ACM. ISBN 978-1-4503-2671-1. doi: 10.1145/2554688.2554767. URL http://doi.acm.org/10. 1145/2554688.2554767. J. S. Monson and B. L. Hutchings. Using Source-Level Transformations to Improve High-Level Synthesis Debug and Validation on FPGAs. In Proceedings of the 2015 ACM/SIGDA International Symposium on Field-Programmable Gate Arrays, FPGA ’15, pages 5–8, New York, NY, USA, 2015. ACM. ISBN 9781-4503-3315-3. doi: 10.1145/2684746.2689087. URL http: //doi.acm.org/10.1145/2684746.2689087. M. Schäfer, T. Ekman, and O. de Moor. Challenge Proposal: Verification of Refactorings. In Proceedings of the 3rd Workshop on Programming Languages Meets Program Verification, PLPV ’09, pages 67–72, New York, NY, USA, 2008. ACM. ISBN 9781-60558-330-3. doi: 10.1145/1481848.1481859. URL http: //doi.acm.org/10.1145/1481848.1481859. T. Mytkowicz, P. F. Sweeney, M. Hauswirth, and A. Diwan. Observer Effect and Measurement Bias in Performance Analysis. Technical Report 1042-08, University of Colorado at Boulder, 6 2008. J. C. Shepherdson and H. E. Sturgis. Computability of Recursive Functions. J. ACM, 10(2):217–255, Apr. 1963. ISSN 0004-5411. doi: 10.1145/321160.321170. URL http://doi.acm.org/10. 1145/321160.321170. G. V. Neville-Neil. Outsourcing Responsibility. Commun. ACM, 57(10):28–29, Sept. 2014. ISSN 0001-0782. doi: 10.1145/ 2661051. URL http://doi.acm.org/10.1145/2661051. S. Singh and D. J. Greaves. Kiwi: Synthesis of FPGA Circuits from Parallel Programs. In Field-Programmable Custom Computing Machines, pages 3–12, 2008. Z. Panjkov, A. Wasserbauer, T. Ostermann, and R. Hagelauer. Hybrid FPGA debug approach. In 2015 25th International Conference on Field Programmable Logic and Applications (FPL), pages 1–8, Sept 2015. doi: 10.1109/FPL.2015.7294023. C. H. Smith and J. van Leeuwen. Microprogrammed Random Access Stored Program Machines. SIGACT News, 6(3):23–32, July 1974. ISSN 0163-5700. doi: 10.1145/1008311.1008315. URL http://doi.acm.org/10.1145/1008311.1008315. D. Pauli. ‘Pork Explosion’ flaw splatters Foxconn’s Android phones. Oct 2016. http://www.theregister.co.uk/2016/ 10/14/pork_explosion_foxconn_flaw/. B. So, M. W. Hall, and P. C. Diniz. A Compiler Approach to Fast Hardware Design Space Exploration in FPGA-based Systems. In Proceedings of the ACM SIGPLAN 2002 Conference on Programming Language Design and Implementation, PLDI ’02, pages 165–176, New York, NY, USA, 2002. ACM. ISBN 1-58113-463-0. doi: 10.1145/512529.512550. URL http: //doi.acm.org/10.1145/512529.512550. M. Potkonjak, S. Dey, and K. Wakabayashi. Design-for-debugging of Application Specific Designs. In Proceedings of the 1995 IEEE/ACM International Conference on Computer-aided Design, ICCAD ’95, pages 295–301, Washington, DC, USA, 1995. IEEE Computer Society. ISBN 0-8186-7213-7. URL http: //dl.acm.org/citation.cfm?id=224841.225054. R. Sosič and D. Abramson. Guard: A relative debugger. Software: Practice and Experience, 27(2):185–206, 1997. A. Putnam. Large-Scale Reconfigurable Computing in a Microsoft Datacenter. In Proceedings of the 26th IEEE HotChips Symposium on High-Performance Chips (HotChips 2014). IEEE, August 2014. R. Sosič. Dynascope: A Tool for Program Directing. SIGPLAN Not., 27(7):12–21, July 1992. ISSN 0362-1340. doi: 10. 1145/143103.143110. URL http://doi.acm.org/10.1145/ 143103.143110. A. Putnam, A. M. Caulfield, E. S. Chung, D. Chiou, K. Constantinides, J. Demme, H. Esmaeilzadeh, J. Fowers, G. P. Gopal, J. Gray, M. Haselman, S. Hauck, S. Heil, A. Hormati, J. Y. Kim, S. Lanka, J. Larus, E. Peterson, S. Pope, A. Smith, J. Thong, P. Y. Xiao, and D. Burger. A reconfigurable fabric for accelerating large-scale datacenter services. In 2014 ACM/IEEE 41st International Symposium on Computer Architecture (ISCA), pages 13–24, June 2014. doi: 10.1109/ISCA.2014.6853195. R. Sosič. A Procedural Interface for Program Directing. Software: Practice and Experience, 25(7):767–787, 1995. ISSN 1097024X. doi: 10.1002/spe.4380250704. URL http://dx.doi. org/10.1002/spe.4380250704. N. Ramsey and D. R. Hanson. A Retargetable Debugger. In Proceedings of the ACM SIGPLAN 1992 Conference on Programming Language Design and Implementation, PLDI ’92, pages 22–31, New York, NY, USA, 1992. ACM. ISBN 0-89791-4759. doi: 10.1145/143095.143112. URL http://doi.acm.org/ 10.1145/143095.143112. T. Todman, S. Stilkerich, and W. Luk. In-circuit Temporal Monitors for Runtime Verification of Reconfigurable Designs. In Proceedings of the 52Nd Annual Design Automation Conference, DAC ’15, pages 50:1–50:6, New York, NY, USA, 2015. ACM. ISBN 978-1-4503-3520-1. doi: 10.1145/2744769.2744856. URL http://doi.acm.org/10.1145/2744769.2744856. P. M. Sansom and S. L. Peyton Jones. Formally Based Profiling for Higher-order Functional Languages. ACM Trans. Program. Lang. Syst., 19(2):334–385, Mar. 1997. ISSN 0164-0925. doi: 10.1145/244795.244802. URL http://doi.acm.org/10. 1145/244795.244802. J. L. Tripp, P. A. Jackson, and B. L. Hutchings. Sea Cucumber: A Synthesizing Compiler for FPGAs, pages 875–885. Springer Berlin Heidelberg, Berlin, Heidelberg, 2002. ISBN 978-3-54046117-3. doi: 10.1007/3-540-46117-5_90. URL http://dx. doi.org/10.1007/3-540-46117-5_90. A. Sari, D. Agiakatsikas, and M. Psarakis. A Soft Error Vulnerability Analysis Framework for Xilinx FPGAs. In Proceedings of the 2014 ACM/SIGDA International Symposium on Fieldprogrammable Gate Arrays, FPGA ’14, pages 237–240, New D. Wang, N. E. Jerger, and J. G. Steffan. DART: A Programmable Architecture for NoC Simulation on FPGAs. In Proceedings of the Fifth ACM/IEEE International Symposium on Networks-on-Chip, NOCS ’11, pages 145–152, New York, K. Thompson. Reflections on Trusting Trust. Commun. ACM, 27(8):761–763, Aug. 1984. ISSN 0001-0782. doi: 10. 1145/358198.358210. URL http://doi.acm.org/10.1145/ 358198.358210. NY, USA, 2011. ACM. ISBN 978-1-4503-0720-8. doi: 10.1145/1999946.1999970. URL http://doi.acm.org/10. 1145/1999946.1999970. P. Winterbottom. ACID: A Debugger Built From A Language. In USENIX Winter Conference, pages 211–222, 1994. M.-Y. Zhu. Formal Specifications of Debuggers. SIGPLAN Not., 36(9):54–63, Sept. 2001. doi: 10.1145/609769.609778. URL http://doi.acm.org/10.1145/609769.609778. N. Zilberman, Y. Audzevich, G. A. Covington, and A. W. Moore. NetFPGA SUME: Toward 100 Gbps as Research Commodity. IEEE Micro, 34(5):32–41, 2014. A. More program direction commands Program-level predicates and functions mentioned in these definitions are given in §B. A.1 Tracing                    A.2 D̆ = {} C˘ = {} cur _idx ; Dc = λD0 . Xi for i = cur _idx to 0: Xa [i] N; print(N ); D0 Watching This bears some similarity to the rule to start tracing (in §3.5.2) since we inspect the variable after it’s updated, and carry out some action. When tracing, this action consists of writing to the trace buffer. When watching, it consists of breaking. X ∈ Varp ∀L ∈ XL . L 6∈ p Positionsp0 (XL ) = PostUpdatep0 (X) p <XL p0 We continue from §3.5.2, where the symbols we use here are introduced (such as Xi and Xof ). (trace start X hBi h$i) ∈ C p trace clear X @C p  D̆ = {}    ˘ C = {} 0   Dc = λD . Jtrace clear XK  D0 0; p watch X hBi @C p0  D̆ =  {(«w», X, 1)}      SP [L 7→ Jwatch X hBiKSP ]   ˘  C=  for each L ∈ XL    Dc = λD0 . if («w», X, 1) ∈ D0 then D0 else     for each L ∈ XL :     @L : {Jwatch X hBiKSP }    («w», X, 0 7→ 1) :∈ D0 pLq; where where Jtrace clear XK = Xi := 0; Xof := 0 Jwatch X hBiKSP = conditional hBi break Next we add the command to check whether the trace buffer is full. Unwatching a variable follows a pattern we’ve encountered before, when stopping tracing for instance. (watch X hBi) ∈ C Positionsp (XL ) = PostUpdatep (X) (trace start X hBi h$i) ∈ C p trace full X @C  D̆ = {}      C˘ = {} Dc = λD0 . Jtrace full XK    print(N );   D0 p p N; where Jtrace full XK = Xof (trace start X hBi h$i) ∈ C trace print X @C p  D̆ = {}      C˘ = {}     Dc = λD0 . if («w», X, 0) ∈ D0 then D0 else    for each L ∈ XL :     @L : {Junwatch XKSP }   («w», X, 1 7→ 0) :∈ D0 pLq; where Finally the command to retrieve the contents of the trace buffer. Here we first find out the current index value for the trace buffer, then we work back and extract the buffer’s contents. p unwatch X @C p Junwatch XKSP = continue A.3 Profiling We could profile programs to count the number of writes and reads of variables, or function calls. We show the rule for counting the number of writes; counting variable reads and function calls are similar, differing in the positioning of labels. That is, to count writes we position labels immediately after each line that updates that variable–this is similar to tracing (§3.5.2) and watching (§A.2). To count variable reads we position after lines in which those variables appear. To count function calls we position just before the first line in the function. X ∈ Varp ∀L ∈ XL . L 6∈ p Positionsp0 (XL ) = PostUpdatep0 (X) p <XL p0 p count write start X hBi h$i @C p0  D̆ =  {(«c», X, 1)}      C [Xcount ] = 0, C [Xof ] = 0, A[Xa [h$i]],       ˘= SP [L → 7 Jcount write start X hBi h$iK ]  C SP      for each L ∈ XL    Dc = λD0 . if («c», X, 1) ∈ D0 then D0 else     for each L ∈ XL :     @L : {Jcount write start X hBi h$iKSP }     pLq;    («c», X, 0 7→ 1) :∈ D0 where Jcount write start X hBi h$iKSP = conditional hBi   if Xcount < h$i then   inc Xcount ;     continue     else     inc Xof ; break Stopping the count, clearing it, printing the current count, and checking whether the maximum value has been reached, is done in a very similar way to the rules for tracing (§3.5.2). B. Program analyses and transformations A position of statement s in program p is a vector π ∈ Nd where 1 < d < ω. Intuitively, the first position of the vector refers to the function in which the statement is positioned. The second until the last positions indicate statements (and substatements, in the case of if-then statements) in which the statement is positioned, moving from the outermost to the innermost containing statement. Within the innermost containing statement, if the statement number is i, then the last component of the vector is either i+0 or i+1, depending on whether it points to just before or just after the statement. Definition B.1 (Positions). Let p = vdecl fdecl return fname(ē) Then def Πp = [ 0≤i≤n {i} × Πfdecl i  where n is |fdecl |, the number of function declarations in p. Let fdecl = τ fname(x̄){s; return e} and s = s0 ; . . . ; sn . Then [ def Πfdecl = ({i} × Πsi ) ∪ {n + 1} 0≤i≤n Finally,  S  0≤i≤n ({i} × Πri ) ∪ {n + 1} def Πs = if s = if e then r0 ; . . . ; rn  ∅ otherwise Next we define a function Posp maps a position π ∈ Πp in p to the corresponding statement s, in symbols: Posp (π) = s. Definition B.2 (Statement at a position). Let p = vdecl fdecl return fname(ē) Then we define def Posp ((i, π)) = FPosfdecl i (π) Let fdecl = τ fname(x̄){s; return e} and s = s0 ; . . . ; sn . Then def FPosfdecl ((i, π)) = SPossi (π) Finally,  0 0  SPosri (π ) if π = (i, π ) def SPoss (π) = and s = if e then r0 ; . . . ; rn   s if π = ∅ Definition B.3 (Program p contains label L). We write L ∈ p iff ∃π, S. Posp (π) = extend(S) ∧ L ∈ S. Note that a label L may only be used at most once in a program. We expect the following to hold for all programs. We do not include this as a premise to any of the rules, to reduce clutter. ∀π1 , π2 , S1 , S2 . (Posp (π1 ) = extend(S1 ) ∧ L ∈ S1 ) ∧ (Posp (π2 ) = extend(S2 ) ∧ L ∈ S2 ) −→ (S1 = S2 ∧ π1 = π2 ) We now formalise the predicate that programs p and p0 are identical save for the addition of L in one of the extension points. Definition B.4 (Program identity modulo label L). def p <1L p0 = ∀π, s, S. (Posp (π) = s −→ ((s 6= extend(S) −→ Posp0 (π) = s) ∧ (s = extend(S) −→ Posp0 (π) = extend(S 0 ) ∧ (S 0 = S ∨ S 0 \S ⊆ {L})))) ∧ (Posp0 (π) = s −→ ((s 6= extend(S) −→ Posp (π) = s) ∧ (s = extend(S 0 ) −→ Posp (π) = extend(S) ∧ (S 0 = S ∨ S 0 \S ⊆ {L})))) We define a related predicate that formalises whether two programs are related by the above predicate through an ‘interpolation’ of labels drawn from a set. Definition B.5 (Program identity modulo set of labels). Let S = {L0 , . . . , Ln } is a set of labels. Then, def p <S p0 = ∃p1 , . . . , pn−1 . p <1L0 p1 <1L1 p2 <1L2 . . . <1Ln p0 Definition B.6 (Set of variables in program p). Let p = vdecl fdecl return fname(ē) and vdecl = vdecl 0 . . . vdecl n . Then [ def Varp = {Xi | vdecl i = τi Xi } 0≤i≤n Definition B.7 (Set of variables in program p). def PostUpdatep (X) = {π + 1 | ∃E. Posp (π) = (X := E)} where if π = (m0 , . . . , mn ) then π+1 = (m0 , . . . , mn +1). The positions in which a label L occurs. This should be a singleton set. Definition B.8 (Positions of label L). def Positionsp (L) = {π | ∃S. Posp (π) = extend(S) ∧ L ∈ S} We lift this to work on sets of labels and overload the notation: if SL is a set of labels then def [ Positionsp (SL ) = (Positionsp (L)) L∈SL C. Language semantics C.1 CASP machines The specification of CASP machines was given in §3.2. The machine’s configuration consists of the triple (S, ia, P ), where ia ∈ {◦, •} indicates whether the machine is operating in batch or interactive modes respectively, and S = (C, A, SP ) indicates the machine’s memory: C ∈ (X * Z) are the counters, A ∈ (R * Z * Z) the arrays, and SP ∈ (L * P ) the stored procedures. The machine’s big-step operational semantics are described using the notation L ` (S, ia, P ) =⇒ (S 0 , ia 0 , N ) to indicate that the machine operates in the context of a specific label L to evaluate program P into numeral N , and possibly updating the other components of its configuration. We use the notation L ` (S, ia, P ) ⇓ N to abbreviate L ` (S, ia, P ) =⇒ (S, ia, N ) when S and ia are unaffected by the evaluation. The semantic rules are given in Figure 6. We use the notation pLq to denote a total injective map from labels to numerals. Thus we can identify which label is being executed. If in interactive mode the director sends “break” to the controller, the director learns the label that broke. Note that the “continue” and “break” commands change the state of the ia component of the configuration, switching it to batch (resuming the program) and interactive respectively. Note also that placement (@L : {P }) is only allowed during interactive mode (i.e., ia = •) since we do not want the controller to normally run code that updates other extension points’ code. C.2 Example language The syntax for the example language was given in §3.4.1. In this language we have a valuation function for identifiers R ∈ (X * Z), and a configuration for the reduction semantics consists of a triple hR, c̄, c̄i where c is either a statement, a ‘return’ statement, or an expression: c ::= s | return e | e. c̄ denotes a sequence of 1 or more such c: c0 , . . . , cn where n > 0. We define the concatenation operator : such that if d¯ = d0 , . . . , dm where m > 0, then c̄ : d¯ = c0 , . . . , cn , d0 , . . . , dm . Intuitively, hR, c̄1 , c̄2 i describes a configuration where c̄1 is to be evaluated “now”, and c̄2 is to be executed after c̄1 has been evaluated. The evaluation rules are given in Figure 7. To reduce clutter in the rules, we assume two pieces implicit state, that we avoid threading around the configurations. The first is a mapping F from function names to their bodies, and the second is the state of the CASP machine S, which includes the valuation R that models the store for program variables. We use the following evaluation context for syntactic objects in c (statements, ‘return’ statements, and expressions): E ::= | | | | | [] X := E if E then s; s fname(N0 , . . . , Nn , E, e0 . . . , em ) E op e N op E op ∈ {+, −, ==, <} We handle ‘extend’ by expanding it to a sequence of singleton extends, and invoking the rule in Figure 8. Rules for y model the interactive mode between the director and the controller. In these semantics we only see evaluation from the point of view of the program: the program’s evaluation −→ yields to the controller =⇒ at extension points, which either yields back to the program (in case of continue) or else switches to interactive mode (in case of break), leading to an interleaving between y (obtaining a command from the director) and =⇒ (executing it). Note that the rules for y are side-effecting, and are formalised as such similar to streams as used by Milner et al. (1990). In the rules for y, P is a command obtained from the director, and N is a result sent back to the director. L ` (S, ia, continue) =⇒ (S, ◦, pLq) L ` (S, ia, V ) ⇓ N L ` (S, ia, −V ) ⇓ −N L ` (S, ia, break) =⇒ (S, •, pLq) L ` (S, ia, V1 ) ⇓ N1 L ` (S, ia, V2 ) ⇓ N2 L ` (S, ia, V1 op V2 ) =⇒ (S, ia, N ) L ` (S, ia, U ) ⇓ N L ` (S, ia, op U ) =⇒ (S[U 7→ M ], ia, M ) ( 1 N= −1 (op = (=) ∧ N1 = N2 ) ∨ (op = (<) ∧ N1 < N2 ) o/w ( N +1 M= N −1 L ` (S, ia, E) ⇓ N L ` (S, ia, U := E) =⇒ (S[U 7→ N ], ia, N ) S(C, X) = N L ` (S, ia, X) ⇓ N op = inc op = dec L ` (S, ia, I) ⇓ N S(R[A], N ) = M L ` (S, ia, A[I]) ⇓ M L ` (S, ia, E) ⇓ N L ` (S, ia, P ) =⇒ (S 0 , ia 0 , M ) L ` (S, ia, if E then P1 else P2 ) =⇒ (S 0 , ia 0 , M ) ( P = P1 P2 N =1 N = −1 L ` (S, ia, P1 ) =⇒ (S 0 , ia 0 , N ) ia 6= ia 0 L ` (S, ia, P1 ; P2 ) =⇒ (S 0 , ia 0 , N ) L ` (S, ia, P1 ) =⇒ (S 0 , ia 0 , M ) ia = ia 0 L ` (S 0 , ia 0 , P2 ) =⇒ (S 00 , ia 00 , N ) L ` (S, ia, P1 ; P2 ) =⇒ (S 00 , ia 00 , N ) L ` (S, •, @L0 : {P }) =⇒ (S[SP [L0 ] 7→ P ], •, pL0 q) L ` (S, ia, N ) ⇓ N Figure 6. Dynamic semantics for CASP instructions (§3.2) hR, skip, s; resti −→ hR, s, resti hR, N, s; resti −→ hR, s, resti hR, X := N, resti −→ hR[X 7→ N ], skip, resti N ≤0 hR, if N then s̄, resti −→ hR, skip, resti hR, s; r̄, resti −→ hR, s, r̄ : resti hR, X, resti −→ hR, R(X), resti N >0 hR, if N then s̄, resti −→ hR, s̄, resti hR, e, skipi −→ hR0 , N, skipi hR, E[e], resti −→ hR0 , E[N ], resti  N1 + N2     N1 − N2    1 hR, N1 op N2 , skipi −→ hR, M, skipi M =  0     1    0 op op op op op op =+ =− = (==) ∧ N1 = N2 = (==) ∧ N1 6= N2 = (<) ∧ N1 < N2 = (<) ∧ N1 ≥ N2 (fname, s̄; return e) ∈ F hR, s̄; return e, skipi −→ hR0 , return N, skipi hR, fname(N̄ , resti −→ hR0 , N, resti Figure 7. Dynamic semantics for the example language (§3.4.1) L ` (S, ◦, SP [L]) =⇒ (S 0 , ◦, N ) hR, extend{L}, s; resti −→ hR0 , skip, resti L ` (S, •, P ) =⇒ (S 0 , •, N ) L ` (S 0 , •) y (S 00 , ◦) L ` (S, •) y (S 00 , ◦) L ` (S, •) y (S 0 , ◦) L ` (S, ◦, break) =⇒ (S, ◦, continue) L ` (S, •, P ) =⇒ (S 0 , ◦, N ) L ` (S, •) y (S 0 , ◦) Figure 8. Linking of the programming language evaluation with that of CASP controller
6cs.PL
Pseudorehearsal in actor-critic agents Marochko Vladimir∗ , Leonard Johard†,Manuel Mazzara‡ arXiv:1704.04912v1 [cs.AI] 17 Apr 2017 Innopolis University Email: ∗ [email protected], † [email protected], ‡ [email protected] Abstract—Catastrophic forgetting has a serious impact in reinforcement learning, as the data distribution is generally sparse and non-stationary over time. The purpose of this study is to investigate whether pseudorehearsal can increase performance of an actor-critic agent with neural-network based policy selection and function approximation in a pole balancing task and compare different pseudorehearsal approaches. We expect that pseudorehearsal assists learning even in such very simple problems, given proper initialization of the rehearsal parameters. I. I NTRODUCTION Reinforcement learning is a promising and growing area of machine learning based on training agents on positive or negative feedback to their actions. The agent gets an observation of the environment, chooses which action to perform, receives a reward and modifies its way of choosing future actions according to this reward. If the agent reached a state that is clearly better then the previous one in terms of the given task or successfully completed the task, then the reward is positive. If the agent reached a state clearly worse or failed the task, then the reward is negative. Reinforcement learning algorithms can be divided into two different classes based on their ways to choose long-term optimal actions. One is based on generation of a model of the environment and evaluation of the states in this model to predict future reward. This is the class of model-based algorithms. The other - model-free algorithms - are based on trial-and-error learning based on habitual and conditioned responses tied to certain stimuli. We will focus on modelbased algorithms. The best situation is if the environment is fully observable and the number of states defined by agent is finite and not too big. In this case agent can just keep all possible states in the memory and evaluate each state directly. Of course, in real life this situation is very rare, so different kinds of approximation are used. One of the possible model approximations widely used is neural networks, which constitutes a powerful tool for implementation of memory. Unfortunately neural networks are vulnerable to a problem known as catastrophic forgetting. Within reinforcement learning influence of catastrophic forgetting is usually even more serious then in supervised learning and pseudorehearsal is one of possible ways of catastrophic forgetting elimination. We have shown that in Q-learning algorithms pseudorehearsal can improve performance significantly. [1] and now want to test it on more interesting and complex actor-critic algorithm. Actor-critic methods are one of the types of reinforcement learning model-based algorithms based on TD-learning. Actor-critic agents have a separate memory structure to explicitly represent the policy independent of the value function. Policy function is used to choose the next action. A value function evaluates the state reached by agent. Actorcritic agent takes an action chosen by the policy structure - actor. This actor is a probabilistic function from state to action. After that the agent receives reward and the critic consequently evaluates the action done. Finally, the critic’s evaluation is used to update the actor. As a critic has two interacting neural networks, an actor-critic’s vulnerability to catastrophic forgetting may be very serious. II. T HEORETICAL ISSUES A. Actor-critic algorithm Actor-critic approaches achieves a high performance because they require minimal computation in order to select actions – if the policy is explicitly stored, no computations are needed for action selection. Actor-critics can also learn an explicitly stochastic policy which is very useful in continuous learning problems which are common for reinforcement learning. Actor-critic algorithms, as stated above, uses the actor to choose actions based on the current state. The actor is typically a policy gradient function. Policy gradient actors can take the shape of a neural network and constructs distribution of actions probabilities, och which one is then selected at each step. Policy gradient methods has good convergence properties, so they can reach its optimum quickly, but it does not store information about the environment. This means its performance is limited. Critics learn about and estimates the policy which is currently being followed by the actor. It provides a critique which takes the form of a TD error, which drives all learning in both the actor and the critic. The critic is typically a state-value function, which means it keeps information about environment and can predict which action will lead a better state. On the other hand the agent needs to explore an environment for a longer time to reach its optimum.[2] After each action selection critic determines whether things have gone better or worse than expected. If TD error is positive - tendency to select the last action done is a for the future. If TD error is negative – this tendency should be weakened. Both the actor and the critic can use neural networks as a function approximation, which allows the agent to execute tasks in continuous and partially observable environments. B. Catastrophic forgetting Catastrophic forgetting is a common problem in neural networks. The problem occurs when a neural network that has properly learnt to execute some tasks meets changing conditions or learns the new task. This neural network learns the new task without any problems, but the old information might be almost fully erased in the process. This might not be a serious problem in supervised learning tasks like digit recognition where network was trained ones and never retrained, but in reinforcement learning, where networks learning repeats regularly, e.g. at each episode or even each time step catastrophic forgetting can seriously damage performance. [3] During the online learning in continuous space things become even worse. In this case the networks rarely receives real feedback and most of its learning iterations are based on its own assumptions. Even minor noise after one thousand step can make network to forget everything it has learnt. The cause of catastrophic forgetting is based on the mathematical nature of neural networks. In linear networks that occurs because neural networks base their prediction from input data on the vector orthogonality. Two different sets with low orthogonality make the same neurons return different outputs on similar inputs, so that the learning of one set erases knowledge about the other. In the non-linear case the situation is not so clear, but tends to be similar - there is significant catastrophic forgetting when the information is very distributed and highly overlapping between sets. [4] C. Pseudorehearsal One of the methods or solving catastrophic forgetting is pseudorehearsal. It uses a two-step process: the first step is construction of the set of pseudopatterns and the second is training the network on pseudopatterns combined in batches with real patterns. The common way of pseudopattern construction is creating a set of pseudovectors, feeding them through the network and saving the outputs at each layer. This approach saves memory compared to rehearsal-based approaches because no real examples needed to be kept for catastrophic forgetting elimination. This approach doesn’t involve any changes to the network structure as some other approaches do. The generated approximations of the real data are sufficiently accurate in practice to reduce forgetting. Even extremely crude generative models have proven highly effective. In the original work in this area by [5], pure noise fed to the network was able to almost completely eliminate catastrophic interference. The argument of the authors was that, although the input is completely random, the activation distributions in deeper levels of the network will be representative of the learnt input data. Pseudorehearsal methods have been demonstrated to significantly decrease and almost completely eliminate the catastrophic forgetting in unsupervised learning [5], supervised learning [6] and reinforcement learning [7]. It is interesting to note that the results of Baddeley suggest that the widely studied ill conditioning might not be the main bottleneck of reinforcement learning after all. Instead, their results indicate that the catastrophic forgetting is the main bottleneck for reinforcement learning problems. We will try two basic pseudorehearsal approaches during our research. The one is using pseudopatterns for the correction of learning weights in learning with respect to orthogonality between the learned example and pseudovectors. The other is learning the network in classic batch-backpropagation way with one real example in a batch and others are pseudopatterns. We will vary size of the pseudopatterns batch and frequency of their reinitialization to find the ones which improve performance the most. III. E XPERIMENTAL DESIGN We apply pseudorehearsal algorithms to an actor-critic agent executing real reinforcement learning task. The task is a double pole-balancing problem, well-known reinforcement learning task mentioned for example by Sutton. [8]. The task of agent is to balance a two poles installed on a cart for as long as it possible by pushing the cart left or right. There is no positive reward in the problem and negative reward is given if any of poles falls down or the cart reaches the end of track. The primary result of these experiment is the number of steps for each agent can balance the pole. The bigger this number the better. Another secondary output is a time spent for computations. We want to know how good was the performance improvement compared to computational cost. 1) Observation: Two different observations are used for experimental comparison. The first observation type given to the agents constitute a fully observable Markov decision process - the agent knows all the information about the current cart’s state: cart position, velocity and acceleration and each poles’ falling angle, angular velocity and angular acceleration. Therefore the best possible behaviour can be easily calculated through analytical methods, while the complex structures as neural networks create a huge amount of data redundancy which leads to a high amounts of catastrophic forgetting. For this reason this observation type is a very good one for testing tools of elimination of catastrophic forgetting. The other observation type is a partially observable Markov decision process. In this case agent receives only information about current position of the cart and the poles. The neural networks are used appropriately - modelling the unknown environment. With this type of observation we might see how good is catastrophic forgetting in more realistic settings. The observation is represented as a real valued vector, where each ith observed parameter is written into one of two vector cells: 2 ∗ ith if the parameter is positive or (2 ∗ i + 1)th if parameter is negative. The second vector entity assigned to parameter is assigned to zero. After that, the linear parameters are divided by 20 and angular are divided by 60 for normalization . 2) Performance metric: Agent tries to complete the task for 1000 runs, then the number of successful steps and computation time in each try is saved. After that we can use different straight comparisons and statistical approaches to compare the results.The first step of straight comparisons is just subtraction of the one resulting vector from another, let’s call the resulting vector difference vector. The next simple comparison practices are: drawing episode/step graphs for visual evaluation of agent’s behaviour; drawing similar graphs but with mean of 10-20 consecutive steps instead of real values for evaluation of agent’s tendencies, drawing these graphs for difference vectors. Of course these are just preparation of data for further statistical processing. The main measures we use to analyze resulting vectors are the mean of the all resulting vector entities, the median and the root mean squared deviation. The mean of the vector tells us how good was the performance overall, the higher value the better. Root mean squared deviation tells us how strong was the influence of catastrophic forgetting, because cases of catastrophic forgetting intervention can be noted by significant change of performance between steps - usually to the side of decreasing. The median denotes how good is agent at removing bad information. Comparison of mean and median can give much information about the agent, which we can deduce from the nature of this parameters. If the median is higher than the mean, then this means that the largest deviations are on the side of lower than average performance. Therefore, the agent learns successfully and the catastrophic forgetting occasionaly has a strong impact, but this influence is then quickly eliminated. If the mean is higher then median - then while the agent tries to choose optimal policy, sometimes successfully, most of its runs are influenced by catastrophic forgetting being too high. If the mean and median are nearly the same then learning and forgetting counterbalance each other. Of course the higher absolute values of mean and median denote the higher overall performance of the agent and very important too. However, in some reinforcement learning tasks where the cost of mistake is high, like drone flight, we might choose the approach with worse performance, but with better catastrophic forgetting elimination, because reaching the goal slower is better then fast breaking of the machine in process. After the application of all this methods we need to apply significance test - like student’s t-test to the results to see if our results are significant and therefore if we can make statement based on research. IV. C ONCLUSION This work will show us if the actor-critic algorithm is vulnerable to the catastrophic forgetting, and how good is pseudoreharsal in decreasing of this problem in the case of two interacting neural networks. We will find the best possible parameters of pseudorehearsal approaches and try to find dependency between the pseudorehearsal parameters and agent’s performance and to explain this dependency. If the pseudorehearsal well be proved to successfully eliminate catastrophic forgetting for continuous actor-critic algorithms, many reinforcement learning tasks will become easier to solve, and let agents quickly react on the instant changes in the environment. So this research may widen the sphere of the applications of reinforcement learning agents. R EFERENCES [1] V. Marochko, L. Johard, and M. Mazzara, “Pseudorehearsal in value function approximation,” in 11th KES International Conference, KESAMSTA 2017 Vilamoura, Algarve, Portugal, June 2017 Proceedings, 2017. [2] J. Beitelspacher, J. Fager, G. Henriques, and A. McGovern, “Policy gradient vs. value function approximation: A reinforcement learning shootout,” School of Computer Science, University of Oklahoma, Tech. Rep, 2006. [3] A. Cahill, Catastrophic Forgetting in Reinforcement-Learning Environments. PhD thesis, University of Otago, 2011. [4] O.-M. Moe-Helgesen and H. Stranden, “Catastophic forgetting in neural networks,” Dept. Comput. & Information Sci., Norwegian Univ. Science & Technology (NTNU), Trondheim, Norway, Tech. Rep, vol. 1, p. 22, 2005. [5] A. Robins, “Catastrophic forgetting, rehearsal and pseudorehearsal,” Connection Science, vol. 7, no. 2, pp. 123–146, 1995. [6] R. Ratcliff, “Connectionist models of recognition memory: constraints imposed by learning and forgetting functions.,” Psychological review, vol. 97, no. 2, p. 285, 1990. [7] B. Baddeley, “Reinforcement learning in continuous time and space: Interference and not ill conditioning is the main problem when using distributed function approximators,” IEEE Transactions on Systems, Man, and Cybernetics, Part B (Cybernetics), vol. 38, no. 4, pp. 950–956, 2008. [8] R. S. Sutton and A. G. Barto, Reinforcement learning: An introduction. MIT press Cambridge, 1998.
2cs.AI